ZAP Scanning Report

Summary of Alerts

Generated on Sat, 17 Jul 2021 06:10:43

Risk LevelNumber of Alerts
High1
Medium2
Low4
Informational6

Alerts

NameRisk LevelNumber of Instances
PII DisclosureHigh1
Content Security Policy (CSP) Header Not SetMedium4
Source Code Disclosure - JavaMedium2
Dangerous JS FunctionsLow1
Incomplete or No Cache-control Header SetLow4
Permissions Policy Header Not SetLow9
Server Leaks Version Information via "Server" HTTP Response Header FieldLow11
Base64 DisclosureInformational1
Information Disclosure - Suspicious CommentsInformational4
Modern Web ApplicationInformational6
Non-Storable ContentInformational4
Storable and Cacheable ContentInformational7
Timestamp Disclosure - UnixInformational28

Alert Detail

High (High)PII Disclosure
Description

The response contains Personally Identifiable Information, such as CC number, SSN and similar sensitive data.

URLhttps://anais.beta.gouv.fr/main-es2015.153c6affb3ef3c75b08306b254d0a4f6fd8be68e.js
MethodGET
Evidence5686274509803921
Instances1
Solution

Other information

Credit Card Type detected: Maestro

Bank Identification Number: 568627

Brand: MAESTRO

Category: STANDARD

Issuer:

Reference

CWE Id359
WASC Id13
Source ID3
Medium (High)Content Security Policy (CSP) Header Not Set
Description

Content Security Policy (CSP) is an added layer of security that helps to detect and mitigate certain types of attacks, including Cross Site Scripting (XSS) and data injection attacks. These attacks are used for everything from data theft to site defacement or distribution of malware. CSP provides a set of standard HTTP headers that allow website owners to declare approved sources of content that browsers should be allowed to load on that page — covered types are JavaScript, CSS, HTML frames, fonts, images and embeddable objects such as Java applets, ActiveX, audio and video files.

URLhttps://anais.beta.gouv.fr/sitemap.xml
MethodGET
URLhttps://anais.beta.gouv.fr/robots.txt
MethodGET
URLhttps://anais.beta.gouv.fr
MethodGET
URLhttps://anais.beta.gouv.fr/
MethodGET
Instances4
Solution

Ensure that your web server, application server, load balancer, etc. is configured to set the Content-Security-Policy header, to achieve optimal browser support: "Content-Security-Policy" for Chrome 25+, Firefox 23+ and Safari 7+, "X-Content-Security-Policy" for Firefox 4.0+ and Internet Explorer 10+, and "X-WebKit-CSP" for Chrome 14+ and Safari 6+.

Reference

https://developer.mozilla.org/en-US/docs/Web/Security/CSP/Introducing_Content_Security_Policy

https://cheatsheetseries.owasp.org/cheatsheets/Content_Security_Policy_Cheat_Sheet.html

http://www.w3.org/TR/CSP/

http://w3c.github.io/webappsec/specs/content-security-policy/csp-specification.dev.html

http://www.html5rocks.com/en/tutorials/security/content-security-policy/

http://caniuse.com/#feat=contentsecuritypolicy

http://content-security-policy.com/

CWE Id693
WASC Id15
Source ID3
Medium (Medium)Source Code Disclosure - Java
Description

Application Source Code was disclosed by the web server - Java

URLhttps://anais.beta.gouv.fr/main-es2015.153c6affb3ef3c75b08306b254d0a4f6fd8be68e.js
MethodGET
Evidenceclass a{constructor(t,e=Number.POSITIVE_INFINITY){this.project=t,this.concurrent=e}call(t,e){return e.subscribe(new l(t,this.project,this.concurrent))}}class l extends s.b{constructor(t,e,i=Number.POSITIVE_INFINITY){super(t),this.project=e,this.concurrent=i,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)}_tryNext(t){let e;const i=this.index++;try{e=this.project(t,i)}catch(n){return void this.destination.error(n)}this.active++,this._innerSub(e)}_innerSub(t){const e=new s.a(this),i=this.destination;i.add(e);const n=Object(s.c)(t,e);n!==e&&i.add(n)}_complete(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()}notifyNext(t){this.destination.next(t)}notifyComplete(){const t=this.buffer;this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}},"7o/Q":function(t,e,i){"use strict";i.d(e,"a",function(){return c});var n=i("n6bG"),r=i("gRHU"),s=i("quSY"),o=i("2QA8"),a=i("2fFW"),l=i("NJ4a");class c extends s.a{constructor(t,e,i){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=r.a;break;case 1:if(!t){this.destination=r.a;break}if("object"==typeof t){t instanceof c?(this.syncErrorThrowable=t.syncErrorThrowable,this.destination=t,t.add(this)):(this.syncErrorThrowable=!0,this.destination=new h(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new h(this,t,e,i)}}[o.a](){return this}static create(t,e,i){const n=new c(t,e,i);return n.syncErrorThrowable=!1,n}next(t){this.isStopped||this._next(t)}error(t){this.isStopped||(this.isStopped=!0,this._error(t))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(t){this.destination.next(t)}_error(t){this.destination.error(t),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:t}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this}}class h extends c{constructor(t,e,i,s){let o;super(),this._parentSubscriber=t;let a=this;Object(n.a)(e)?o=e:e&&(o=e.next,i=e.error,s=e.complete,e!==r.a&&(a=Object.create(e),Object(n.a)(a.unsubscribe)&&this.add(a.unsubscribe.bind(a)),a.unsubscribe=this.unsubscribe.bind(this))),this._context=a,this._next=o,this._error=i,this._complete=s}next(t){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;a.a.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}}error(t){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:i}=a.a;if(this._error)i&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)i?(e.syncErrorValue=t,e.syncErrorThrown=!0):Object(l.a)(t),this.unsubscribe();else{if(this.unsubscribe(),i)throw t;Object(l.a)(t)}}}complete(){if(!this.isStopped){const{_parentSubscriber:t}=this;if(this._complete){const e=()=>this._complete.call(this._context);a.a.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(t,e){try{t.call(this._context,e)}catch(i){if(this.unsubscribe(),a.a.useDeprecatedSynchronousErrorHandling)throw i;Object(l.a)(i)}}__tryOrSetError(t,e,i){if(!a.a.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,i)}catch(n){return a.a.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=n,t.syncErrorThrown=!0,!0):(Object(l.a)(n),!0)}return!1}_unsubscribe(){const{_parentSubscriber:t}=this;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}},"9/Zf":function(t,e,i){"use strict";i.d(e,"e",function(){return s}),i.d(e,"i",function(){return o}),i.d(e,"h",function(){return a}),i.d(e,"d",function(){return l}),i.d(e,"c",function(){return c}),i.d(e,"b",function(){return h}),i.d(e,"a",function(){return u}),i.d(e,"f",function(){return d}),i.d(e,"g",function(){return p});var n=i("+A1k"),r=(i("+924"),{});function s(){return Object(n.b)()?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:r}function o(){var t=s(),e=t.crypto||t.msCrypto;if(void 0!==e&&e.getRandomValues){var i=new Uint16Array(8);e.getRandomValues(i),i[3]=4095&i[3]|16384,i[4]=16383&i[4]|32768;var n=function(t){for(var e=t.toString(16);e.length<4;)e="0"+e;return e};return n(i[0])+n(i[1])+n(i[2])+n(i[3])+n(i[4])+n(i[5])+n(i[6])+n(i[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})}function a(t){if(!t)return{};var e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);return e?{host:e[4],path:e[5],protocol:e[2],relative:e[5]+(e[6]||"")+(e[8]||"")}:{}}function l(t){if(t.message)return t.message;if(t.exception&&t.exception.values&&t.exception.values[0]){var e=t.exception.values[0];return e.type&&e.value?e.type+": "+e.value:e.type||e.value||t.event_id||"<unknown>"}return t.event_id||"<unknown>"}function c(t){var e=s();if(!("console"in e))return t();var i=e.console,n={};["debug","info","warn","error","log","assert"].forEach(function(t){t in e.console&&i[t].__sentry_original__&&(n[t]=i[t],i[t]=i[t].__sentry_original__)});var r=t();return Object.keys(n).forEach(function(t){i[t]=n[t]}),r}function h(t,e,i){t.exception=t.exception||{},t.exception.values=t.exception.values||[],t.exception.values[0]=t.exception.values[0]||{},t.exception.values[0].value=t.exception.values[0].value||e||"",t.exception.values[0].type=t.exception.values[0].type||i||"Error"}function u(t,e){void 0===e&&(e={});try{t.exception.values[0].mechanism=t.exception.values[0].mechanism||{},Object.keys(e).forEach(function(i){t.exception.values[0].mechanism[i]=e[i]})}catch(i){}}function d(){try{return document.location.href}catch(t){return""}}function p(t,e){if(!e)return 6e4;var i=parseInt(""+e,10);if(!isNaN(i))return 1e3*i;var n=Date.parse(""+e);return isNaN(n)?6e4:n-t}},"9AQC":function(t,e,i){"use strict";function n(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return m(t,Error)}}function r(t){return"[object ErrorEvent]"===Object.prototype.toString.call(t)}function s(t){return"[object DOMError]"===Object.prototype.toString.call(t)}function o(t){return"[object DOMException]"===Object.prototype.toString.call(t)}function a(t){return"[object String]"===Object.prototype.toString.call(t)}function l(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function c(t){return"[object Object]"===Object.prototype.toString.call(t)}function h(t){return"undefined"!=typeof Event&&m(t,Event)}function u(t){return"undefined"!=typeof Element&&m(t,Element)}function d(t){return"[object RegExp]"===Object.prototype.toString.call(t)}function p(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function f(t){return c(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function m(t,e){try{return t instanceof e}catch(i){return!1}}i.d(e,"d",function(){return n}),i.d(e,"e",function(){return r}),i.d(e,"a",function(){return s}),i.d(e,"b",function(){return o}),i.d(e,"k",function(){return a}),i.d(e,"i",function(){return l}),i.d(e,"h",function(){return c}),i.d(e,"f",function(){return h}),i.d(e,"c",function(){return u}),i.d(e,"j",function(){return d}),i.d(e,"m",function(){return p}),i.d(e,"l",function(){return f}),i.d(e,"g",function(){return m})},"9ppp":function(t,e,i){"use strict";i.d(e,"a",function(){return n});const n=(()=>{function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t})()},"A/ap":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={update:function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}}),i=function(){};window.addEventListener("testPassiveEventSupport",i,e),window.removeEventListener("testPassiveEventSupport",i,e),n.hasSupport=t}}};n.update(),e.default=n},AytR:function(t,e,i){"use strict";i.d(e,"a",function(){return n});const n={production:!0,applicationVersion:"2f11f73f",applicationDate:"2021-07-16",anaisServerURL:r("https://api.anais.beta.gouv.fr/","https://api.anais.fabnum.fr/"),sentryURL:r("https://1b980e78cdd641da8e250c85863eb958@sentry.anais.beta.gouv.fr/2",""),shipPhotoURL:r("{{SHIP_PHOTO_URL}}","https://photos.marinetraffic.com/ais/showphoto.aspx?mmsi={{mmsi}}&size=thumb300"),migrationEnable:r("{{MIGRATION_ENABLE}}",!1),portCallsEnable:r("{{PORTCALLS_ENABLE}}",!1),osmURL:r("{{OSM_URL}}","https://{a-c}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png"),shomURL:r("{{SHOM_URL}}","https://maps.anais.beta.gouv.fr/tile-alt/shom/gray1/{z}/{x}/{y}"),grayURL:r("{{GRAY_URL}}","https://maps.anais.beta.gouv.fr/tile/gray1/{z}/{x}/{y}"),darkURL:r("{{DARK_URL}}","https://maps.anais.beta.gouv.fr/tile/dark1/{z}/{x}/{y}"),terrainURL:r("{{TERRAIN_URL}}","https://maps.anais.beta.gouv.fr/tile/terrain1/{z}/{x}/{y}"),topoimageryURL:r("{{TOPOIMAGERY_URL}}","https://maps.anais.beta.gouv.fr/tile/topoimagery2/{z}/{x}/{y}"),openSeaMapURL:r("{{OPENSEAMAP_URL}}","https://maps.anais.beta.gouv.fr/tile/openseamap/{z}/{x}/{y}"),subcablesURL:r("{{SUBCABLES_URL}}","https://maps.anais.beta.gouv.fr/tile/subcables/{z}/{x}/{y}")};function r(t,e){return t.startsWith("{{")?e:t}},C3FG:function(t,e,i){"use strict";(function(t){i.d(e,"a",function(){return u});var n=i("mrSG"),r=i("PRU4"),s=i("XNiG"),o=i("2Vo4"),a=i("AytR"),l=i("fXoL");const c=new Worker(t,void 0),h=r.b(c);let u=(()=>{class t{constructor(t,e){this.ngZone=t,this.errorHandler=e,this.areaShipsFeeds$=new s.a,this.areaAircraftsFeeds$=new s.a,this.inflightRequests$=new o.a(!1),this.applicationHealth$=new o.a(null),c.addEventListener("message",t=>{"error"!==t.data.type&&"unhandledrejection"!==t.data.type||this.errorHandler.handleError(Object.assign(new Error,t.data))})}init(){return Object(n.a)(this,void 0,void 0,function*(){yield new Promise((t,e)=>{this.ngZone.runOutsideAngular(()=>Object(n.a)(this,void 0,void 0,function*(){try{this.worker=yield new h(a.a.anaisServerURL,r.a({areaShipsFeed:t=>Object(n.a)(this,void 0,void 0,function*(){this.areaShipsFeeds$.next(t)}),areaAircraftsFeed:t=>{this.areaAircraftsFeeds$.next(t)},inflightRequests:t=>{this.inflightRequests$.next(t)},applicationHealth:t=>{this.applicationHealth$.next(t)}})),t()}catch(i){e(i)}}))})})}get(){return this.worker}get aircrafts(){return this.worker.aircrafts}get alerts(){return this.worker.alerts}get alertRules(){return this.worker.alertRules}get annotations(){return this.worker.annotations}get application(){return this.worker.application}get authentication(){return this.worker.authentication}get containers(){return this.worker.containers}get fleets(){return this.worker.fleets}get ports(){return this.worker.ports}get ships(){return this.worker.ships}get users(){return this.worker.users}get zones(){return this.worker.zones}get view(){return this.worker.view}get viewport(){return this.worker.viewport}get aircraftsFeed(){return this.worker.aircraftsFeed}get shipsFeed(){return this.worker.shipsFeed}}return t.\u0275fac=function(e){return new(e||t)(l.Zb(l.B),l.Zb(l.n))},t.\u0275prov=l.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()}).call(this,i("gKCj"))},Cfvw:function(t,e,i){"use strict";i.d(e,"a",function(){return u});var n=i("HDdC"),r=i("SeVD"),s=i("quSY"),o=i("kJWO"),a=i("jZKg"),l=i("Lhse"),c=i("c2HN"),h=i("I55L");function u(t,e){return e?function(t,e){if(null!=t){if(function(t){return t&&"function"==typeof t[o.a]}(t))return function(t,e){return new n.a(i=>{const n=new s.a;return n.add(e.schedule(()=>{const r=t[o.a]();n.add(r.subscribe({next(t){n.add(e.schedule(()=>i.next(t)))},error(t){n.add(e.schedule(()=>i.error(t)))},complete(){n.add(e.schedule(()=>i.complete()))}}))})),n})}(t,e);if(Object(c.a)(t))return function(t,e){return new n.a(i=>{const n=new s.a;return n.add(e.schedule(()=>t.then(t=>{n.add(e.schedule(()=>{i.next(t),n.add(e.schedule(()=>i.complete()))}))},t=>{n.add(e.schedule(()=>i.error(t)))}))),n})}(t,e);if(Object(h.a)(t))return Object(a.a)(t,e);if(function(t){return t&&"function"==typeof t[l.a]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new n.a(i=>{const n=new s.a;let r;return n.add(()=>{r&&"function"==typeof r.return&&r.return()}),n.add(e.schedule(()=>{r=t[l.a](),n.add(e.schedule(function(){if(i.closed)return;let t,e;try{const i=r.next();t=i.value,e=i.done}catch(n){return void i.error(n)}e?i.complete():(i.next(t),this.schedule())}))})),n})}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}(t,e):t instanceof n.a?t:new n.a(Object(r.a)(t))}},DH7j:function(t,e,i){"use strict";i.d(e,"a",function(){return n});const n=(()=>Array.isArray||(t=>t&&"number"==typeof t.length))()},EQ5u:function(t,e,i){"use strict";i.d(e,"a",function(){return a}),i.d(e,"b",function(){return l});var n=i("XNiG"),r=i("HDdC"),s=(i("7o/Q"),i("quSY")),o=i("x+ZX");class a extends r.a{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject}connect(){let t=this._connection;return t||(this._isComplete=!1,t=this._connection=new s.a,t.add(this.source.subscribe(new c(this.getSubject(),this))),t.closed&&(this._connection=null,t=s.a.EMPTY)),t}refCount(){return Object(o.a)()(this)}}const l=(()=>{const t=a.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}})();class c extends n.b{constructor(t,e){super(t),this.connectable=e}_error(t){this._unsubscribe(),super._error(t)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const t=this.connectable;if(t){this.connectable=null;const e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}}}},FRV3:function(t,e,i){"use strict";function n(t){var e,i,n,s,o,a={"-":-1,N:1,S:-1,E:1,W:-1},l={N:"lat",S:"lat",E:"lon",W:"lon"};if(s=a[t[2]]||a[t[1]]||a[t[6]]||1,e=Number(t[3]),i=t[4]?Number(t[4]):0,n=t[5]?Number(t[5]):0,o=l[t[1]]||l[t[6]],!r(e,0,180))throw"Degrees out of range";if(!r(i,0,60))throw"Minutes out of range";if(!r(n,0,60))throw"Seconds out of range";return{decDeg:s*(e+i/60+n/3600),latLon:o}}function r(t,e,i){return t>=e&&t<=i}t.exports=function(t){var e,i,r,s,o,a=/([NSEW])?\s?(-)?(\d+(?:\.\d+)?)[\xb0\xba:d\s]?\s?(?:(\d+(?:\.\d+)?)['\u2019\u2018\u2032:]?\s?(?:(\d{1,2}(?:\.\d+)?)(?:"|\u2033|\u2019\u2019|'')?)?)?\s?([NSEW])?/i,l={};if(!(e=(t=t.trim()).match(a)))throw"Could not parse string";if(e[1]?(e[6]=void 0,o=t.substr(e[0].length-1).trim()):o=t.substr(e[0].length).trim(),r=n(e),s=(i=o.match(a))?n(i):{},void 0===r.latLon){if(!isNaN(r.decDeg)&&isNaN(s.decDeg))return r.decDeg;if(isNaN(r.decDeg)||isNaN(s.decDeg))throw"Could not parse string";r.latLon="lat",s.latLon="lon"}return void 0===s.latLon&&(s.latLon="lat"===r.latLon?"lon":"lat"),l[r.latLon]=r.decDeg,l[s.latLon]=s.decDeg,l}},HDdC:function(t,e,i){"use strict";i.d(e,"a",function(){return c});var n=i("7o/Q"),r=i("2QA8"),s=i("gRHU"),o=i("kJWO"),a=i("SpAZ"),l=i("2fFW");let c=(()=>{class t{constructor(t){this._isScalar=!1,t&&(this._subscribe=t)}lift(e){const i=new t;return i.source=this,i.operator=e,i}subscribe(t,e,i){const{operator:o}=this,a=function(t,e,i){if(t){if(t instanceof n.a)return t;if(t[r.a])return t[r.a]()}return t||e||i?new n.a(t,e,i):new n.a(s.a)}(t,e,i);if(a.add(o?o.call(a,this.source):this.source||l.a.useDeprecatedSynchronousErrorHandling&&!a.syncErrorThrowable?this._subscribe(a):this._trySubscribe(a)),l.a.useDeprecatedSynchronousErrorHandling&&a.syncErrorThrowable&&(a.syncErrorThrowable=!1,a.syncErrorThrown))throw a.syncErrorValue;return a}_trySubscribe(t){try{return this._subscribe(t)}catch(e){l.a.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function(t){for(;t;){const{closed:e,destination:i,isStopped:r}=t;if(e||r)return!1;t=i&&i instanceof n.a?i:null}return!0}(t)?t.error(e):console.warn(e)}}forEach(t,e){return new(e=h(e))((e,i)=>{let n;n=this.subscribe(e=>{try{t(e)}catch(r){i(r),n&&n.unsubscribe()}},i,e)})}_subscribe(t){const{source:e}=this;return e&&e.subscribe(t)}[o.a](){return this}pipe(...t){return 0===t.length?this:(0===(e=t).length?a.a:1===e.length?e[0]:function(t){return e.reduce((t,e)=>e(t),t)})(this);var e}toPromise(t){return new(t=h(t))((t,e)=>{let i;this.subscribe(t=>i=t,t=>e(t),()=>t(i))})}}return t.create=e=>new t(e),t})();function h(t){if(t||(t=l.a.Promise||Promise),!t)throw new Error("no Promise impl found");return t}},I55L:function(t,e,i){"use strict";i.d(e,"a",function(){return n});const n=t=>t&&"number"==typeof t.length&&"function"!=typeof t},JaUx:function(t,e,i){t.exports=function(){"use strict";function t(t,n,r,s,o){!function t(i,n,r,s,o){for(;s>r;){if(s-r>600){var a=s-r+1,l=n-r+1,c=Math.log(a),h=.5*Math.exp(2*c/3),u=.5*Math.sqrt(c*h*(a-h)/a)*(l-a/2<0?-1:1);t(i,n,Math.max(r,Math.floor(n-l*h/a+u)),Math.min(s,Math.floor(n+(a-l)*h/a+u)),o)}var d=i[n],p=r,f=s;for(e(i,r,n),o(i[s],d)>0&&e(i,r,s);p<f;){for(e(i,p,f),p++,f--;o(i[p],d)<0;)p++;for(;o(i[f],d)>0;)f--}0===o(i[r],d)?e(i,r,f):e(i,++f,s),f<=n&&(r=f+1),n<=f&&(s=f-1)}}(t,n,r||0,s||t.length-1,o||i)}function e(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function i(t,e){return t<e?-1:t>e?1:0}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function r(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n<e.length;n++)if(i(t,e[n]))return n;return-1}function s(t,e){o(t,0,t.children.length,e,t)}function o(t,e,i,n,r){r||(r=f(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var s=e;s<i;s++){var o=t.children[s];a(r,t.leaf?n(o):o)}return r}function a(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function l(t,e){return t.minX-e.minX}function c(t,e){return t.minY-e.minY}function h(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function u(t){return t.maxX-t.minX+(t.maxY-t.minY)}function d(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function p(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function f(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function m(e,i,n,r,s){for(var o=[i,n];o.length;)if(!((n=o.pop())-(i=o.pop())<=r)){var a=i+Math.ceil((n-i)/r/2)*r;t(e,a,i,n,s),o.push(i,a,a,n)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,i=[];if(!p(t,e))return i;for(var n=this.toBBox,r=[];e;){for(var s=0;s<e.children.length;s++){var o=e.children[s],a=e.leaf?n(o):o;p(t,a)&&(e.leaf?i.push(o):d(t,a)?this._all(o,i):r.push(o))}e=r.pop()}return i},n.prototype.collides=function(t){var e=this.data;if(!p(t,e))return!1;for(var i=[];e;){for(var n=0;n<e.children.length;n++){var r=e.children[n],s=e.leaf?this.toBBox(r):r;if(p(t,s)){if(e.leaf||d(t,s))return!0;i.push(r)}}e=i.pop()}return!1},n.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var i=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===i.height)this._splitRoot(this.data,i);else{if(this.data.height<i.height){var n=this.data;this.data=i,i=n}this._insert(i,this.data.height-i.height-1,!0)}else this.data=i;return this},n.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},n.prototype.clear=function(){return this.data=f([]),this},n.prototype.remove=function(t,e){if(!t)return this;for(var i,n,s,o=this.data,a=this.toBBox(t),l=[],c=[];o||l.length;){if(o||(o=l.pop(),n=l[l.length-1],i=c.pop(),s=!0),o.leaf){var h=r(t,o.children,e);if(-1!==h)return o.children.splice(h,1),l.push(o),this._condense(l),this}s||o.leaf||!d(o,a)?n?(i++,o=n.children[i],s=!1):o=null:(l.push(o),c.push(i),i=0,n=o,o=o.children[0])}return this},n.prototype.toBBox=function(t){return t},n.prototype.compareMinX=function(t,e){return t.minX-e.minX},n.prototype.compareMinY=function(t,e){return t.minY-e.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(t){return this.data=t,this},n.prototype._all=function(t,e){for(var i=[];t;)t.leaf?e.push.apply(e,t.children):i.push.apply(i,t.children),t=i.pop();return e},n.prototype._build=function(t,e,i,n){var r,o=i-e+1,a=this._maxEntries;if(o<=a)return s(r=f(t.slice(e,i+1)),this.toBBox),r;n||(n=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,n-1))),(r=f([])).leaf=!1,r.height=n;var l=Math.ceil(o/a),c=l*Math.ceil(Math.sqrt(a));m(t,e,i,c,this.compareMinX);for(var h=e;h<=i;h+=c){var u=Math.min(h+c-1,i);m(t,h,u,l,this.compareMinY);for(var d=h;d<=u;d+=l){var p=Math.min(d+l-1,u);r.children.push(this._build(t,d,p,n-1))}}return s(r,this.toBBox),r},n.prototype._chooseSubtree=function(t,e,i,n){for(;n.push(e),!e.leaf&&n.length-1!==i;){for(var r=1/0,s=1/0,o=void 0,a=0;a<e.children.length;a++){var l=e.children[a],c=h(l),u=(d=t,p=l,(Math.max(p.maxX,d.maxX)-Math.min(p.minX,d.minX))*(Math.max(p.maxY,d.maxY)-Math.min(p.minY,d.minY))-c);u<s?(s=u,r=c<r?c:r,o=l):u===s&&c<r&&(r=c,o=l)}e=o||e.children[0]}var d,p;return e},n.prototype._insert=function(t,e,i){var n=i?t:this.toBBox(t),r=[],s=this._chooseSubtree(n,this.data,e,r);for(s.children.push(t),a(s,n);e>=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},n.prototype._split=function(t,e){var i=t[e],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);var o=this._chooseSplitIndex(i,r,n),a=f(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,s(i,this.toBBox),s(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},n.prototype._splitRoot=function(t,e){this.data=f([t,e]),this.data.height=t.height+1,this.data.leaf=!1,s(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,e,i){for(var n,r,s,a,l,c,u,d=1/0,p=1/0,f=e;f<=i-e;f++){var m=o(t,0,f,this.toBBox),g=o(t,f,i,this.toBBox),A=(r=m,s=g,a=Math.max(r.minX,s.minX),l=Math.max(r.minY,s.minY),c=Math.min(r.maxX,s.maxX),u=Math.min(r.maxY,s.maxY),Math.max(0,c-a)*Math.max(0,u-l)),b=h(m)+h(g);A<d?(d=A,n=f,p=b<p?b:p):A===d&&b<p&&(p=b,n=f)}return n||i-e},n.prototype._chooseSplitAxis=function(t,e,i){var n=t.leaf?this.compareMinX:l,r=t.leaf?this.compareMinY:c;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,r)&&t.children.sort(n)},n.prototype._allDistMargin=function(t,e,i,n){t.children.sort(n);for(var r=this.toBBox,s=o(t,0,e,r),l=o(t,i-e,i,r),c=u(s)+u(l),h=e;h<i-e;h++){var d=t.children[h];a(s,t.leaf?r(d):d),c+=u(s)}for(var p=i-e-1;p>=e;p--){var f=t.children[p];a(l,t.leaf?r(f):f),c+=u(l)}return c},n.prototype._adjustParentBBoxes=function(t,e,i){for(var n=i;n>=0;n--)a(e[n],t)},n.prototype._condense=function(t){for(var e=t.length-1,i=void 0;e>=0;e--)0===t[e].children.length?e>0?(i=t[e-1].children).splice(i.indexOf(t[e]),1):this.clear():s(t[e],this.toBBox)},n}()},Lhse:function(t,e,i){"use strict";function n(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}i.d(e,"a",function(){return r});const r=n()},M39V:function(t,e,i){t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,(function(e){return t[e]}).bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=90)}({17:function(t,e,i){"use strict";e.__esModule=!0,e.default=void 0;var n=i(18),r=function(){function t(){}return t.getFirstMatch=function(t,e){var i=e.match(t);return i&&i.length>0&&i[1]||""},t.getSecondMatch=function(t,e){var i=e.match(t);return i&&i.length>1&&i[2]||""},t.matchAndReturnConst=function(t,e,i){if(t.test(e))return i},t.getWindowsVersionName=function(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},t.getMacOSVersionName=function(t){var e=t.split(".").splice(0,2).map(function(t){return parseInt(t,10)||0});if(e.push(0),10===e[0])switch(e[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},t.getAndroidVersionName=function(t){var e=t.split(".").splice(0,2).map(function(t){return parseInt(t,10)||0});if(e.push(0),!(1===e[0]&&e[1]<5))return 1===e[0]&&e[1]<6?"Cupcake":1===e[0]&&e[1]>=6?"Donut":2===e[0]&&e[1]<2?"Eclair":2===e[0]&&2===e[1]?"Froyo":2===e[0]&&e[1]>2?"Gingerbread":3===e[0]?"Honeycomb":4===e[0]&&e[1]<1?"Ice Cream Sandwich":4===e[0]&&e[1]<4?"Jelly Bean":4===e[0]&&e[1]>=4?"KitKat":5===e[0]?"Lollipop":6===e[0]?"Marshmallow":7===e[0]?"Nougat":8===e[0]?"Oreo":9===e[0]?"Pie":void 0},t.getVersionPrecision=function(t){return t.split(".").length},t.compareVersions=function(e,i,n){void 0===n&&(n=!1);var r=t.getVersionPrecision(e),s=t.getVersionPrecision(i),o=Math.max(r,s),a=0,l=t.map([e,i],function(e){var i=o-t.getVersionPrecision(e),n=e+new Array(i+1).join(".0");return t.map(n.split("."),function(t){return new Array(20-t.length).join("0")+t}).reverse()});for(n&&(a=o-Math.min(r,s)),o-=1;o>=a;){if(l[0][o]>l[1][o])return 1;if(l[0][o]===l[1][o]){if(o===a)return 0;o-=1}else if(l[0][o]<l[1][o])return-1}},t.map=function(t,e){var i,n=[];if(Array.prototype.map)return Array.prototype.map.call(t,e);for(i=0;i<t.length;i+=1)n.push(e(t[i]));return n},t.find=function(t,e){var i,n;if(Array.prototype.find)return Array.prototype.find.call(t,e);for(i=0,n=t.length;i<n;i+=1){var r=t[i];if(e(r,i))return r}},t.assign=function(t){for(var e,i,n=t,r=arguments.length,s=new Array(r>1?r-1:0),o=1;o<r;o++)s[o-1]=arguments[o];if(Object.assign)return Object.assign.apply(Object,[t].concat(s));var a=function(){var t=s[e];"object"==typeof t&&null!==t&&Object.keys(t).forEach(function(e){n[e]=t[e]})};for(e=0,i=s.length;e<i;e+=1)a();return t},t.getBrowserAlias=function(t){return n.BROWSER_ALIASES_MAP[t]},t.getBrowserTypeByAlias=function(t){return n.BROWSER_MAP[t]||""},t}();e.default=r,t.exports=e.default},18:function(t,e,i){"use strict";e.__esModule=!0,e.ENGINE_MAP=e.OS_MAP=e.PLATFORMS_MAP=e.BROWSER_MAP=e.BROWSER_ALIASES_MAP=void 0,e.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},e.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},e.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},e.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},e.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(t,e,i){"use strict";e.__esModule=!0,e.default=void 0;var n,r=(n=i(91))&&n.__esModule?n:{default:n},s=i(18);function o(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var a=function(){function t(){}var e,i;return t.getParser=function(t,e){if(void 0===e&&(e=!1),"string"!=typeof t)throw new Error("UserAgent should be a string");return new r.default(t,e)},t.parse=function(t){return new r.default(t).getResult()},e=t,(i=[{key:"BROWSER_MAP",get:function(){return s.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return s.ENGINE_MAP}},{key:"OS_MAP",get:function(){return s.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return s.PLATFORMS_MAP}}])&&o(e,i),t}();e.default=a,t.exports=e.default},91:function(t,e,i){"use strict";e.__esModule=!0,e.default=void 0;var n=l(i(92)),r=l(i(93)),s=l(i(94)),o=l(i(95)),a=l(i(17));function l(t){return t&&t.__esModule?t:{default:t}}var c=function(){function t(t,e){if(void 0===e&&(e=!1),null==t||""===t)throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},!0!==e&&this.parse()}var e=t.prototype;return e.getUA=function(){return this._ua},e.test=function(t){return t.test(this._ua)},e.parseBrowser=function(){var t=this;this.parsedResult.browser={};var e=a.default.find(n.default,function(e){if("function"==typeof e.test)return e.test(t);if(e.test instanceof Array)return e.test.some(function(e){return t.test(e)});throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser},e.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},e.getBrowserName=function(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},e.getBrowserVersion=function(){return this.getBrowser().version},e.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},e.parseOS=function(){var t=this;this.parsedResult.os={};var e=a.default.find(r.default,function(e){if("function"==typeof e.test)return e.test(t);if(e.test instanceof Array)return e.test.some(function(e){return t.test(e)});throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os},e.getOSName=function(t){var e=this.getOS().name;return t?String(e).toLowerCase()||"":e||""},e.getOSVersion=function(){return this.getOS().version},e.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},e.getPlatformType=function(t){void 0===t&&(t=!1);var e=this.getPlatform().type;return t?String(e).toLowerCase()||"":e||""},e.parsePlatform=function(){var t=this;this.parsedResult.platform={};var e=a.default.find(s.default,function(e){if("function"==typeof e.test)return e.test(t);if(e.test instanceof Array)return e.test.some(function(e){return t.test(e)});throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform},e.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},e.getEngineName=function(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},e.parseEngine=function(){var t=this;this.parsedResult.engine={};var e=a.default.find(o.default,function(e){if("function"==typeof e.test)return e.test(t);if(e.test instanceof Array)return e.test.some(function(e){return t.test(e)});throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine},e.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},e.getResult=function(){return a.default.assign({},this.parsedResult)},e.satisfies=function(t){var e=this,i={},n=0,r={},s=0;if(Object.keys(t).forEach(function(e){var o=t[e];"string"==typeof o?(r[e]=o,s+=1):"object"==typeof o&&(i[e]=o,n+=1)}),n>0){var o=Object.keys(i),l=a.default.find(o,function(t){return e.isOS(t)});if(l){var c=this.satisfies(i[l]);if(void 0!==c)return c}var h=a.default.find(o,function(t){return e.isPlatform(t)});if(h){var u=this.satisfies(i[h]);if(void 0!==u)return u}}if(s>0){var d=Object.keys(r),p=a.default.find(d,function(t){return e.isBrowser(t,!0)});if(void 0!==p)return this.compareVersion(r[p])}},e.isBrowser=function(t,e){void 0===e&&(e=!1);var i=this.getBrowserName().toLowerCase(),n=t.toLowerCase(),r=a.default.getBrowserTypeByAlias(n);return e&&r&&(n=r.toLowerCase()),n===i},e.compareVersion=function(t){var e=[0],i=t,n=!1,r=this.getBrowserVersion();if("string"==typeof r)return">"===t[0]||"<"===t[0]?(i=t.substr(1),"="===t[1]?(n=!0,i=t.substr(2)):e=[],e.push(">"===t[0]?1:-1)):"="===t[0]?i=t.substr(1):"~"===t[0]&&(n=!0,i=t.substr(1)),e.indexOf(a.default.compareVersions(r,i,n))>-1},e.isOS=function(t){return this.getOSName(!0)===String(t).toLowerCase()},e.isPlatform=function(t){return this.getPlatformType(!0)===String(t).toLowerCase()},e.isEngine=function(t){return this.getEngineName(!0)===String(t).toLowerCase()},e.is=function(t,e){return void 0===e&&(e=!1),this.isBrowser(t,e)||this.isOS(t)||this.isPlatform(t)},e.some=function(t){var e=this;return void 0===t&&(t=[]),t.some(function(t){return e.is(t)})},t}();e.default=c,t.exports=e.default},92:function(t,e,i){"use strict";e.__esModule=!0,e.default=void 0;var n,r=(n=i(17))&&n.__esModule?n:{default:n},s=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(t){var e={name:"Googlebot"},i=r.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||r.default.getFirstMatch(s,t);return i&&(e.version=i),e}},{test:[/opera/i],describe:function(t){var e={name:"Opera"},i=r.default.getFirstMatch(s,t)||r.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/opr\/|opios/i],describe:function(t){var e={name:"Opera"},i=r.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||r.default.getFirstMatch(s,t);return i&&(e.version=i),e}},{test:[/SamsungBrowser/i],describe:function(t){var e={name:"Samsung Internet for Android"},i=r.default.getFirstMatch(s,t)||r.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/Whale/i],describe:function(t){var e={name:"NAVER Whale Browser"},i=r.default.getFirstMatch(s,t)||r.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/MZBrowser/i],describe:function(t){var e={name:"MZ Browser"},i=r.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||r.default.getFirstMatch(s,t);return i&&(e.version=i),e}},{test:[/focus/i],describe:function(t){var e={name:"Focus"},i=r.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||r.default.getFirstMatch(s,t);return i&&(e.version=i),e}},{test:[/swing/i],describe:function(t){var e={name:"Swing"},i=r.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||r.default.getFirstMatch(s,t);return i&&(e.version=i),e}},{test:[/coast/i],describe:function(t){var e={name:"Opera Coast"},i=r.default.getFirstMatch(s,t)||r.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(t){var e={name:"Opera Touch"},i=r.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||r.default.getFirstMatch(s,t);return i&&(e.version=i),e}},{test:[/yabrowser/i],describe:function(t){var e={name:"Yandex Browser"},i=r.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||r.default.getFirstMatch(s,t);return i&&(e.version=i),e}},{test:[/ucbrowser/i],describe:function(t){var e={name:"UC Browser"},i=r.default.getFirstMatch(s,t)||r.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/Maxthon|mxios/i],describe:function(t){var e={name:"Maxthon"},i=r.default.getFirstMatch(s,t)||r.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/epiphany/i],describe:function(t){var e={name:"Epiphany"},i=r.default.getFirstMatch(s,t)||r.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/puffin/i],describe:function(t){var e={name:"Puffin"},i=r.default.getFirstMatch(s,t)||r.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/sleipnir/i],describe:function(t){var e={name:"Sleipnir"},i=r.default.getFirstMatch(s,t)||r.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/k-meleon/i],describe:function(t){var e={name:"K-Meleon"},i=r.default.getFirstMatch(s,t)||r.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/micromessenger/i],describe:function(t){var e={name:"WeChat"},i=r.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||r.default.getFirstMatch(s,t);return i&&(e.version=i),e}},{test:[/qqbrowser/i],describe:function(t){var e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},i=r.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||r.default.getFirstMatch(s,t);return i&&(e.version=i),e}},{test:[/msie|trident/i],describe:function(t){var e={name:"Internet Explorer"},i=r.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/\sedg\//i],describe:function(t){var e={name:"Microsoft Edge"},i=r.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/edg([ea]|ios)/i],describe:function(t){var e={name:"Microsoft Edge"},i=r.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/vivaldi/i],describe:function(t){var e={name:"Vivaldi"},i=r.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/seamonkey/i],describe:function(t){var e={name:"SeaMonkey"},i=r.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/sailfish/i],describe:function(t){var e={name:"Sailfish"},i=r.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return i&&(e.version=i),e}},{test:[/silk/i],describe:function(t){var e={name:"Amazon Silk"},i=r.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/phantom/i],describe:function(t){var e={name:"PhantomJS"},i=r.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/slimerjs/i],describe:function(t){var e={name:"SlimerJS"},i=r.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e={name:"BlackBerry"},i=r.default.getFirstMatch(s,t)||r.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e={name:"WebOS Browser"},i=r.default.getFirstMatch(s,t)||r.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/bada/i],describe:function(t){var e={name:"Bada"},i=r.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/tizen/i],describe:function(t){var e={name:"Tizen"},i=r.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||r.default.getFirstMatch(s,t);return i&&(e.version=i),e}},{test:[/qupzilla/i],describe:function(t){var e={name:"QupZilla"},i=r.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||r.default.getFirstMatch(s,t);return i&&(e.version=i),e}},{test:[/firefox|iceweasel|fxios/i],describe:function(t){var e={name:"Firefox"},i=r.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/electron/i],describe:function(t){var e={name:"Electron"},i=r.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/MiuiBrowser/i],describe:function(t){var e={name:"Miui"},i=r.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/chromium/i],describe:function(t){var e={name:"Chromium"},i=r.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||r.default.getFirstMatch(s,t);return i&&(e.version=i),e}},{test:[/chrome|crios|crmo/i],describe:function(t){var e={name:"Chrome"},i=r.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/GSA/i],describe:function(t){var e={name:"Google Search"},i=r.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:function(t){var e=!t.test(/like android/i),i=t.test(/android/i);return e&&i},describe:function(t){var e={name:"Android Browser"},i=r.default.getFirstMatch(s,t);return i&&(e.version=i),e}},{test:[/playstation 4/i],describe:function(t){var e={name:"PlayStation 4"},i=r.default.getFirstMatch(s,t);return i&&(e.version=i),e}},{test:[/safari|applewebkit/i],describe:function(t){var e={name:"Safari"},i=r.default.getFirstMatch(s,t);return i&&(e.version=i),e}},{test:[/.*/i],describe:function(t){var e=-1!==t.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:r.default.getFirstMatch(e,t),version:r.default.getSecondMatch(e,t)}}}];e.default=o,t.exports=e.default},93:function(t,e,i){"use strict";e.__esModule=!0,e.default=void 0;var n,r=(n=i(17))&&n.__esModule?n:{default:n},s=i(18),o=[{test:[/Roku\/DVP/],describe:function(t){var e=r.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:s.OS_MAP.Roku,version:e}}},{test:[/windows phone/i],describe:function(t){var e=r.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:s.OS_MAP.WindowsPhone,version:e}}},{test:[/windows /i],describe:function(t){var e=r.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),i=r.default.getWindowsVersionName(e);return{name:s.OS_MAP.Windows,version:e,versionName:i}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(t){var e={name:s.OS_MAP.iOS},i=r.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return i&&(e.version=i),e}},{test:[/macintosh/i],describe:function(t){var e=r.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),i=r.default.getMacOSVersionName(e),n={name:s.OS_MAP.MacOS,version:e};return i&&(n.versionName=i),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(t){var e=r.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:s.OS_MAP.iOS,version:e}}},{test:function(t){var e=!t.test(/like android/i),i=t.test(/android/i);return e&&i},describe:function(t){var e=r.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),i=r.default.getAndroidVersionName(e),n={name:s.OS_MAP.Android,version:e};return i&&(n.versionName=i),n}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e=r.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),i={name:s.OS_MAP.WebOS};return e&&e.length&&(i.version=e),i}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e=r.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||r.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||r.default.getFirstMatch(/\bbb(\d+)/i,t);return{name:s.OS_MAP.BlackBerry,version:e}}},{test:[/bada/i],describe:function(t){var e=r.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:s.OS_MAP.Bada,version:e}}},{test:[/tizen/i],describe:function(t){var e=r.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:s.OS_MAP.Tizen,version:e}}},{test:[/linux/i],describe:function(){return{name:s.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:s.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(t){var e=r.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:s.OS_MAP.PlayStation4,version:e}}}];e.default=o,t.exports=e.default},94:function(t,e,i){"use strict";e.__esModule=!0,e.default=void 0;var n,r=(n=i(17))&&n.__esModule?n:{default:n},s=i(18);e.default=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(t){var e=r.default.getFirstMatch(/(can-l01)/i,t)&&"Nova",i={type:s.PLATFORMS_MAP.mobile,vendor:"Huawei"};return e&&(i.model=e),i}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(t){var e=t.test(/ipod|iphone/i),i=t.test(/like (ipod|iphone)/i);return e&&!i},describe:function(t){var e=r.default.getFirstMatch(/(ipod|iphone)/i,t);return{type:s.PLATFORMS_MAP.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(t){return"blackberry"===t.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(t){return"bada"===t.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(t){return"windows phone"===t.getBrowserName()},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(t){var e=Number(String(t.getOSVersion()).split(".")[0]);return"android"===t.getOSName(!0)&&e>=3},describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(t){return"android"===t.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(t){return"macos"===t.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(t){return"windows"===t.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(t){return"linux"===t.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(t){return"playstation 4"===t.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}},{test:function(t){return"roku"===t.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}}],t.exports=e.default},95:function(t,e,i){"use strict";e.__esModule=!0,e.default=void 0;var n,r=(n=i(17))&&n.__esModule?n:{default:n},s=i(18),o=[{test:function(t){return"microsoft edge"===t.getBrowserName(!0)},describe:function(t){if(/\sedg\//i.test(t))return{name:s.ENGINE_MAP.Blink};var e=r.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:s.ENGINE_MAP.EdgeHTML,version:e}}},{test:[/trident/i],describe:function(t){var e={name:s.ENGINE_MAP.Trident},i=r.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:function(t){return t.test(/presto/i)},describe:function(t){var e={name:s.ENGINE_MAP.Presto},i=r.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:function(t){var e=t.test(/gecko/i),i=t.test(/like gecko/i);return e&&!i},describe:function(t){var e={name:s.ENGINE_MAP.Gecko},i=r.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:s.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(t){var e={name:s.ENGINE_MAP.WebKit},i=r.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}}];e.default=o,t.exports=e.default}})},NJ4a:function(t,e,i){"use strict";function n(t){setTimeout(()=>{throw t},0)}i.d(e,"a",function(){return n})},PRU4:function(t,e,i){"use strict";i.d(e,"a",function(){return g}),i.d(e,"b",function(){return u});const n=Symbol("Comlink.proxy"),r=Symbol("Comlink.endpoint"),s=Symbol("Comlink.releaseProxy"),o=Symbol("Comlink.thrown"),a=t=>"object"==typeof t&&null!==t||"function"==typeof t,l=new Map([["proxy",{canHandle:t=>a(t)&&t[n],serialize(t){const{port1:e,port2:i}=new MessageChannel;return c(t,e),[i,[i]]},deserialize:t=>(t.start(),u(t))}],["throw",{canHandle:t=>a(t)&&o in t,serialize({value:t}){let e;return e=t instanceof Error?{isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:{isError:!1,value:t},[e,[]]},deserialize(t){if(t.isError)throw Object.assign(new Error(t.value.message),t.value);throw t.value}}]]);function c(t,e=self){e.addEventListener("message",function i(n){if(!n||!n.data)return;const{id:r,type:s,path:a}=Object.assign({path:[]},n.data),l=(n.data.argumentList||[]).map(b);let u;try{const e=a.slice(0,-1).reduce((t,e)=>t[e],t),i=a.reduce((t,e)=>t[e],t);switch(s){case 0:u=i;break;case 1:e[a.slice(-1)[0]]=b(n.data.value),u=!0;break;case 2:u=i.apply(e,l);break;case 3:u=g(new i(...l));break;case 4:{const{port1:e,port2:i}=new MessageChannel;c(t,i),u=function(t,e){return m.set(t,e),t}(e,[e])}break;case 5:u=void 0}}catch(d){u={value:d,[o]:0}}Promise.resolve(u).catch(t=>({value:t,[o]:0})).then(t=>{const[n,o]=A(t);e.postMessage(Object.assign(Object.assign({},n),{id:r}),o),5===s&&(e.removeEventListener("message",i),h(e))})}),e.start&&e.start()}function h(t){(function(t){return"MessagePort"===t.constructor.name})(t)&&t.close()}function u(t,e){return p(t,[],e)}function d(t){if(t)throw new Error("Proxy has been released and is not useable")}function p(t,e=[],i=function(){}){let n=!1;const o=new Proxy(i,{get(i,r){if(d(n),r===s)return()=>v(t,{type:5,path:e.map(t=>t.toString())}).then(()=>{h(t),n=!0});if("then"===r){if(0===e.length)return{then:()=>o};const i=v(t,{type:0,path:e.map(t=>t.toString())}).then(b);return i.then.bind(i)}return p(t,[...e,r])},set(i,r,s){d(n);const[o,a]=A(s);return v(t,{type:1,path:[...e,r].map(t=>t.toString()),value:o},a).then(b)},apply(i,s,o){d(n);const a=e[e.length-1];if(a===r)return v(t,{type:4}).then(b);if("bind"===a)return p(t,e.slice(0,-1));const[l,c]=f(o);return v(t,{type:2,path:e.map(t=>t.toString()),argumentList:l},c).then(b)},construct(i,r){d(n);const[s,o]=f(r);return v(t,{type:3,path:e.map(t=>t.toString()),argumentList:s},o).then(b)}});return o}function f(t){const e=t.map(A);return[e.map(t=>t[0]),(i=e.map(t=>t[1]),Array.prototype.concat.apply([],i))];var i}const m=new WeakMap;function g(t){return Object.assign(t,{[n]:!0})}function A(t){for(const[e,i]of l)if(i.canHandle(t)){const[n,r]=i.serialize(t);return[{type:3,name:e,value:n},r]}return[{type:0,value:t},m.get(t)||[]]}function b(t){switch(t.type){case 3:return l.get(t.name).deserialize(t.value);case 0:return t.value}}function v(t,e,i){return new Promise(n=>{const r=new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-");t.addEventListener("message",function e(i){i.data&&i.data.id&&i.data.id===r&&(t.removeEventListener("message",e),n(i.data))}),t.start&&t.start(),t.postMessage(Object.assign({id:r},e),i)})}},SeVD:function(t,e,i){"use strict";i.d(e,"a",function(){return h});var n=i("ngJS"),r=i("NJ4a"),s=i("Lhse"),o=i("kJWO"),a=i("I55L"),l=i("c2HN"),c=i("XoHu");const h=t=>{if(t&&"function"==typeof t[o.a])return h=t,t=>{const e=h[o.a]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if(Object(a.a)(t))return Object(n.a)(t);if(Object(l.a)(t))return i=t,t=>(i.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,r.a),t);if(t&&"function"==typeof t[s.a])return e=t,t=>{const i=e[s.a]();for(;;){let e;try{e=i.next()}catch(n){return t.error(n),t}if(e.done){t.complete();break}if(t.next(e.value),t.closed)break}return"function"==typeof i.return&&t.add(()=>{i.return&&i.return()}),t};{const e=Object(c.a)(t)?"an invalid object":`'${t}'`;throw new TypeError(`You provided ${e} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`)}var e,i,h}},SpAZ:function(t,e,i){"use strict";function n(t){return t}i.d(e,"a",function(){return n})},VRyK:function(t,e,i){"use strict";i.d(e,"a",function(){return a});var n=i("HDdC"),r=i("z+Ro"),s=i("bHdf"),o=i("yCtX");function a(...t){let e=Number.POSITIVE_INFINITY,i=null,a=t[t.length-1];return Object(r.a)(a)?(i=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(e=t.pop())):"number"==typeof a&&(e=t.pop()),null===i&&1===t.length&&t[0]instanceof n.a?t[0]:Object(s.a)(e)(Object(o.a)(t,i))}},XNiG:function(t,e,i){"use strict";i.d(e,"b",function(){return c}),i.d(e,"a",function(){return h});var n=i("HDdC"),r=i("7o/Q"),s=i("quSY"),o=i("9ppp"),a=i("Ylt2"),l=i("2QA8");class c extends r.a{constructor(t){super(t),this.destination=t}}let h=(()=>{class t extends n.a{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[l.a](){return new c(this)}lift(t){const e=new u(this,this);return e.operator=t,e}next(t){if(this.closed)throw new o.a;if(!this.isStopped){const{observers:e}=this,i=e.length,n=e.slice();for(let r=0;r<i;r++)n[r].next(t)}}error(t){if(this.closed)throw new o.a;this.hasError=!0,this.thrownError=t,this.isStopped=!0;const{observers:e}=this,i=e.length,n=e.slice();for(let r=0;r<i;r++)n[r].error(t);this.observers.length=0}complete(){if(this.closed)throw new o.a;this.isStopped=!0;const{observers:t}=this,e=t.length,i=t.slice();for(let n=0;n<e;n++)i[n].complete();this.observers.length=0}unsubscribe(){this.isStopped=!0,this.closed=!0,this.observers=null}_trySubscribe(t){if(this.closed)throw new o.a;return super._trySubscribe(t)}_subscribe(t){if(this.closed)throw new o.a;return this.hasError?(t.error(this.thrownError),s.a.EMPTY):this.isStopped?(t.complete(),s.a.EMPTY):(this.observers.push(t),new a.a(this,t))}asObservable(){const t=new n.a;return t.source=this,t}}return t.create=(t,e)=>new u(t,e),t})();class u extends h{constructor(t,e){super(),this.destination=t,this.source=e}next(t){const{destination:e}=this;e&&e.next&&e.next(t)}error(t){const{destination:e}=this;e&&e.error&&this.destination.error(t)}complete(){const{destination:t}=this;t&&t.complete&&this.destination.complete()}_subscribe(t){const{source:e}=this;return e?this.source.subscribe(t):s.a.EMPTY}}},XoHu:function(t,e,i){"use strict";function n(t){return null!==t&&"object"==typeof t}i.d(e,"a",function(){return n})},Ylt2:function(t,e,i){"use strict";i.d(e,"a",function(){return r});var n=i("quSY");class r extends n.a{constructor(t,e){super(),this.subject=t,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const t=this.subject,e=t.observers;if(this.subject=null,!e||0===e.length||t.isStopped||t.closed)return;const i=e.indexOf(this.subscriber);-1!==i&&e.splice(i,1)}}},bHdf:function(t,e,i){"use strict";i.d(e,"a",function(){return s});var n=i("5+tZ"),r=i("SpAZ");function s(t=Number.POSITIVE_INFINITY){return Object(n.a)(r.a,t)}},c2HN:function(t,e,i){"use strict";function n(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}i.d(e,"a",function(){return n})},fXoL:function(t,e,i){"use strict";i.d(e,"a",function(){return si}),i.d(e,"b",function(){return Kc}),i.d(e,"c",function(){return Bc}),i.d(e,"d",function(){return Lc}),i.d(e,"e",function(){return Uc}),i.d(e,"f",function(){return Bh}),i.d(e,"g",function(){return Eh}),i.d(e,"h",function(){return Dl}),i.d(e,"i",function(){return eh}),i.d(e,"j",function(){return Xa}),i.d(e,"k",function(){return Wc}),i.d(e,"l",function(){return il}),i.d(e,"m",function(){return Vh}),i.d(e,"n",function(){return Vn}),i.d(e,"o",function(){return gc}),i.d(e,"p",function(){return Ss}),i.d(e,"q",function(){return Ti}),i.d(e,"r",function(){return I}),i.d(e,"s",function(){return ri}),i.d(e,"t",function(){return js}),i.d(e,"u",function(){return yl}),i.d(e,"v",function(){return xl}),i.d(e,"w",function(){return Gc}),i.d(e,"x",function(){return Bl}),i.d(e,"y",function(){return Ih}),i.d(e,"z",function(){return Ul}),i.d(e,"A",function(){return wh}),i.d(e,"B",function(){return rh}),i.d(e,"C",function(){return Ri}),i.d(e,"D",function(){return Hc}),i.d(e,"E",function(){return zc}),i.d(e,"F",function(){return bc}),i.d(e,"G",function(){return Po}),i.d(e,"H",function(){return sl}),i.d(e,"I",function(){return rl}),i.d(e,"J",function(){return zn}),i.d(e,"K",function(){return al}),i.d(e,"L",function(){return En}),i.d(e,"M",function(){return Fi}),i.d(e,"N",function(){return Mh}),i.d(e,"O",function(){return Rl}),i.d(e,"P",function(){return uh}),i.d(e,"Q",function(){return oi}),i.d(e,"R",function(){return ll}),i.d(e,"S",function(){return jl}),i.d(e,"T",function(){return V}),i.d(e,"U",function(){return xh}),i.d(e,"V",function(){return _h}),i.d(e,"W",function(){return p}),i.d(e,"X",function(){return Pi}),i.d(e,"Y",function(){return vh}),i.d(e,"Z",function(){return Lh}),i.d(e,"ab",function(){return fh}),i.d(e,"bb",function(){return $c}),i.d(e,"cb",function(){return Es}),i.d(e,"db",function(){return Ba}),i.d(e,"eb",function(){return Sn}),i.d(e,"fb",function(){return ln}),i.d(e,"gb",function(){return Yi}),i.d(e,"hb",function(){return Xi}),i.d(e,"ib",function(){return nn}),i.d(e,"jb",function(){return tn}),i.d(e,"kb",function(){return Ji}),i.d(e,"lb",function(){return en}),i.d(e,"mb",function(){return Va}),i.d(e,"nb",function(){return Fh}),i.d(e,"ob",function(){return Fa}),i.d(e,"pb",function(){return La}),i.d(e,"qb",function(){return Qi}),i.d(e,"rb",function(){return N}),i.d(e,"sb",function(){return Qs}),i.d(e,"tb",function(){return Ko}),i.d(e,"ub",function(){return zo}),i.d(e,"vb",function(){return Ho}),i.d(e,"wb",function(){return Ra}),i.d(e,"xb",function(){return xt}),i.d(e,"yb",function(){return h}),i.d(e,"zb",function(){return qi}),i.d(e,"Ab",function(){return Hs}),i.d(e,"Bb",function(){return At}),i.d(e,"Cb",function(){return qa}),i.d(e,"Db",function(){return Dr}),i.d(e,"Eb",function(){return no}),i.d(e,"Fb",function(){return ua}),i.d(e,"Gb",function(){return Da}),i.d(e,"Hb",function(){return ha}),i.d(e,"Ib",function(){return Pc}),i.d(e,"Jb",function(){return X}),i.d(e,"Kb",function(){return st}),i.d(e,"Lb",function(){return _}),i.d(e,"Mb",function(){return y}),i.d(e,"Nb",function(){return it}),i.d(e,"Ob",function(){return ot}),i.d(e,"Pb",function(){return Mo}),i.d(e,"Qb",function(){return Lo}),i.d(e,"Rb",function(){return No}),i.d(e,"Sb",function(){return Bo}),i.d(e,"Tb",function(){return Uo}),i.d(e,"Ub",function(){return Fo}),i.d(e,"Vb",function(){return Vo}),i.d(e,"Wb",function(){return jo}),i.d(e,"Xb",function(){return Je}),i.d(e,"Yb",function(){return Ia}),i.d(e,"Zb",function(){return Ii}),i.d(e,"ac",function(){return ei}),i.d(e,"bc",function(){return Fc}),i.d(e,"cc",function(){return $o}),i.d(e,"dc",function(){return Oc}),i.d(e,"ec",function(){return be}),i.d(e,"fc",function(){return Ae}),i.d(e,"gc",function(){return Yo}),i.d(e,"hc",function(){return hc}),i.d(e,"ic",function(){return uc}),i.d(e,"jc",function(){return dc}),i.d(e,"kc",function(){return pc}),i.d(e,"lc",function(){return Jo}),i.d(e,"mc",function(){return Xo}),i.d(e,"nc",function(){return To}),i.d(e,"oc",function(){return ta}),i.d(e,"pc",function(){return ea}),i.d(e,"qc",function(){return ia}),i.d(e,"rc",function(){return ic}),i.d(e,"sc",function(){return nc}),i.d(e,"tc",function(){return rc}),i.d(e,"uc",function(){return sc}),i.d(e,"vc",function(){return Dc}),i.d(e,"wc",function(){return ao}),i.d(e,"xc",function(){return Nn}),i.d(e,"yc",function(){return Bn}),i.d(e,"zc",function(){return Un}),i.d(e,"Ac",function(){return Ht}),i.d(e,"Bc",function(){return Dn}),i.d(e,"Cc",function(){return Pn}),i.d(e,"Dc",function(){return In}),i.d(e,"Ec",function(){return nt}),i.d(e,"Fc",function(){return ca}),i.d(e,"Gc",function(){return Go}),i.d(e,"Hc",function(){return Pa}),i.d(e,"Ic",function(){return oo}),i.d(e,"Jc",function(){return Vc}),i.d(e,"Kc",function(){return xa}),i.d(e,"Lc",function(){return Ca}),i.d(e,"Mc",function(){return Sa}),i.d(e,"Nc",function(){return ka}),i.d(e,"Oc",function(){return Ea}),i.d(e,"Pc",function(){return Ic});var n=i("XNiG"),r=i("quSY"),s=i("HDdC"),o=i("VRyK"),a=i("w1tV");function l(t){for(let e in t)if(t[e]===l)return e;throw Error("Could not find renamed property on target object.")}function c(t,e){for(const i in e)e.hasOwnProperty(i)&&!t.hasOwnProperty(i)&&(t[i]=e[i])}function h(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(h).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;const e=t.toString();if(null==e)return""+e;const i=e.indexOf("\n");return-1===i?e:e.substring(0,i)}function u(t,e){return null==t||""===t?null===e?"":e:null==e||""===e?t:t+" "+e}const d=l({__forward_ref__:l});function p(t){return t.__forward_ref__=p,t.toString=function(){return h(this())},t}function f(t){return m(t)?t():t}function m(t){return"function"==typeof t&&t.hasOwnProperty(d)&&t.__forward_ref__===p}class g extends Error{constructor(t,e){super(function(t,e){return`${t?`NG0${t}: `:""}${e}`}(t,e)),this.code=t}}function A(t){return"string"==typeof t?t:null==t?"":String(t)}function b(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():A(t)}function v(t,e){const i=e?` in ${e}`:"";throw new g("201",`No provider for ${b(t)} found${i}`)}function _(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function y(t){return{providers:t.providers||[],imports:t.imports||[]}}function w(t){return x(t,S)||x(t,E)}function x(t,e){return t.hasOwnProperty(e)?t[e]:null}function C(t){return t&&(t.hasOwnProperty(k)||t.hasOwnProperty(D))?t[k]:null}const S=l({"\u0275prov":l}),k=l({"\u0275inj":l}),E=l({ngInjectableDef:l}),D=l({ngInjectorDef:l});var I=function(t){return t[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional",t}({});let P;function O(t){const e=P;return P=t,e}function M(t,e,i){const n=w(t);return n&&"root"==n.providedIn?void 0===n.value?n.value=n.factory():n.value:i&I.Optional?null:void 0!==e?e:void v(h(t),"Injector")}function T(t){return{toString:t}.toString()}var R=function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t}({}),V=function(t){return t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t}({});const F="undefined"!=typeof globalThis&&globalThis,L="undefined"!=typeof window&&window,U="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,B="undefined"!=typeof global&&global,N=F||B||L||U,j={},z=[],H=[],K=l({"\u0275cmp":l}),$=l({"\u0275dir":l}),G=l({"\u0275pipe":l}),W=l({"\u0275mod":l}),Z=l({"\u0275loc":l}),q=l({"\u0275fac":l}),Y=l({__NG_ELEMENT_ID__:l});let Q=0;function X(t){return T(()=>{const e={},i={type:t.type,providersResolver:null,decls:t.decls,vars:t.vars,factory:null,template:t.template||null,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,inputs:null,outputs:null,exportAs:t.exportAs||null,onPush:t.changeDetection===R.OnPush,directiveDefs:null,pipeDefs:null,selectors:t.selectors||H,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||V.Emulated,id:"c",styles:t.styles||H,_:null,setInput:null,schemas:t.schemas||null,tView:null},n=t.directives,r=t.features,s=t.pipes;return i.id+=Q++,i.inputs=rt(t.inputs,e),i.outputs=rt(t.outputs),r&&r.forEach(t=>t(i)),i.directiveDefs=n?()=>("function"==typeof n?n():n).map(J):null,i.pipeDefs=s?()=>("function"==typeof s?s():s).map(tt):null,i})}function J(t){return at(t)||function(t){return t[$]||null}(t)}function tt(t){return function(t){return t[G]||null}(t)}const et={};function it(t){const e={type:t.type,bootstrap:t.bootstrap||H,declarations:t.declarations||H,imports:t.imports||H,exports:t.exports||H,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null};return null!=t.id&&T(()=>{et[t.id]=t.type}),e}function nt(t,e){return T(()=>{const i=lt(t,!0);i.declarations=e.declarations||H,i.imports=e.imports||H,i.exports=e.exports||H})}function rt(t,e){if(null==t)return j;const i={};for(const n in t)if(t.hasOwnProperty(n)){let r=t[n],s=r;Array.isArray(r)&&(s=r[1],r=r[0]),i[r]=n,e&&(e[r]=s)}return i}const st=X;function ot(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,onDestroy:t.type.prototype.ngOnDestroy||null}}function at(t){return t[K]||null}function lt(t,e){const i=t[W]||null;if(!i&&!0===e)throw new Error(`Type ${h(t)} does not have '\u0275mod' property.`);return i}function ct(t){return Array.isArray(t)&&"object"==typeof t[1]}function ht(t){return Array.isArray(t)&&!0===t[1]}function ut(t){return 0!=(8&t.flags)}function dt(t){return 2==(2&t.flags)}function pt(t){return 1==(1&t.flags)}function ft(t){return null!==t.template}function mt(t,e){return t.hasOwnProperty(q)?t[q]:null}class gt{constructor(t,e,i){this.previousValue=t,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}}function At(){return bt}function bt(t){return t.type.prototype.ngOnChanges&&(t.setInput=_t),vt}function vt(){const t=yt(this),e=null==t?void 0:t.current;if(e){const i=t.previous;if(i===j)t.previous=e;else for(let t in e)i[t]=e[t];t.current=null,this.ngOnChanges(e)}}function _t(t,e,i,n){const r=yt(t)||function(t,e){return t.__ngSimpleChanges__=e}(t,{previous:j,current:null}),s=r.current||(r.current={}),o=r.previous,a=this.declaredInputs[i],l=o[a];s[a]=new gt(l&&l.currentValue,e,o===j),t[n]=e}function yt(t){return t.__ngSimpleChanges__||null}let wt;function xt(t){wt=t}function Ct(){return void 0!==wt?wt:"undefined"!=typeof document?document:void 0}function St(t){return!!t.listen}At.ngInherit=!0;const kt={createRenderer:(t,e)=>Ct()};function Et(t){for(;Array.isArray(t);)t=t[0];return t}function Dt(t,e){return Et(e[t])}function It(t,e){return Et(e[t.index])}function Pt(t,e){return t.data[e]}function Ot(t,e){return t[e]}function Mt(t,e){const i=e[t];return ct(i)?i:i[0]}function Tt(t){const e=function(t){return t.__ngContext__||null}(t);return e?Array.isArray(e)?e:e.lView:null}function Rt(t){return 4==(4&t[2])}function Vt(t){return 128==(128&t[2])}function Ft(t,e){return null==e?null:t[e]}function Lt(t){t[18]=0}function Ut(t,e){t[5]+=e;let i=t,n=t[3];for(;null!==n&&(1===e&&1===i[5]||-1===e&&0===i[5]);)n[5]+=e,i=n,n=n[3]}const Bt={lFrame:he(null),bindingsEnabled:!0,isInCheckNoChangesMode:!1};function Nt(){return Bt.bindingsEnabled}function jt(){return Bt.lFrame.lView}function zt(){return Bt.lFrame.tView}function Ht(t){Bt.lFrame.contextLView=t}function Kt(){let t=$t();for(;null!==t&&64===t.type;)t=t.parent;return t}function $t(){return Bt.lFrame.currentTNode}function Gt(t,e){const i=Bt.lFrame;i.currentTNode=t,i.isParent=e}function Wt(){return Bt.lFrame.isParent}function Zt(){Bt.lFrame.isParent=!1}function qt(){return Bt.isInCheckNoChangesMode}function Yt(t){Bt.isInCheckNoChangesMode=t}function Qt(){const t=Bt.lFrame;let e=t.bindingRootIndex;return-1===e&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function Xt(){return Bt.lFrame.bindingIndex}function Jt(){return Bt.lFrame.bindingIndex++}function te(t){const e=Bt.lFrame,i=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,i}function ee(t,e){const i=Bt.lFrame;i.bindingIndex=i.bindingRootIndex=t,ie(e)}function ie(t){Bt.lFrame.currentDirectiveIndex=t}function ne(t){const e=Bt.lFrame.currentDirectiveIndex;return-1===e?null:t[e]}function re(){return Bt.lFrame.currentQueryIndex}function se(t){Bt.lFrame.currentQueryIndex=t}function oe(t){const e=t[1];return 2===e.type?e.declTNode:1===e.type?t[6]:null}function ae(t,e,i){if(i&I.SkipSelf){let n=e,r=t;for(;n=n.parent,!(null!==n||i&I.Host||(n=oe(r),null===n)||(r=r[15],10&n.type)););if(null===n)return!1;e=n,t=r}const n=Bt.lFrame=ce();return n.currentTNode=e,n.lView=t,!0}function le(t){const e=ce(),i=t[1];Bt.lFrame=e,e.currentTNode=i.firstChild,e.lView=t,e.tView=i,e.contextLView=t,e.bindingIndex=i.bindingStartIndex,e.inI18n=!1}function ce(){const t=Bt.lFrame,e=null===t?null:t.child;return null===e?he(t):e}function he(t){const e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return null!==t&&(t.child=e),e}function ue(){const t=Bt.lFrame;return Bt.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const de=ue;function pe(){const t=ue();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function fe(){return Bt.lFrame.selectedIndex}function me(t){Bt.lFrame.selectedIndex=t}function ge(){const t=Bt.lFrame;return Pt(t.tView,t.selectedIndex)}function Ae(){Bt.lFrame.currentNamespace="http://www.w3.org/2000/svg"}function be(){Bt.lFrame.currentNamespace=null}function ve(t,e){for(let i=e.directiveStart,n=e.directiveEnd;i<n;i++){const e=t.data[i].type.prototype,{ngAfterContentInit:n,ngAfterContentChecked:r,ngAfterViewInit:s,ngAfterViewChecked:o,ngOnDestroy:a}=e;n&&(t.contentHooks||(t.contentHooks=[])).push(-i,n),r&&((t.contentHooks||(t.contentHooks=[])).push(i,r),(t.contentCheckHooks||(t.contentCheckHooks=[])).push(i,r)),s&&(t.viewHooks||(t.viewHooks=[])).push(-i,s),o&&((t.viewHooks||(t.viewHooks=[])).push(i,o),(t.viewCheckHooks||(t.viewCheckHooks=[])).push(i,o)),null!=a&&(t.destroyHooks||(t.destroyHooks=[])).push(i,a)}}function _e(t,e,i){xe(t,e,3,i)}function ye(t,e,i,n){(3&t[2])===i&&xe(t,e,i,n)}function we(t,e){let i=t[2];(3&i)===e&&(i&=2047,i+=1,t[2]=i)}function xe(t,e,i,n){const r=null!=n?n:-1,s=e.length-1;let o=0;for(let a=void 0!==n?65535&t[18]:0;a<s;a++)if("number"==typeof e[a+1]){if(o=e[a],null!=n&&o>=n)break}else e[a]<0&&(t[18]+=65536),(o<r||-1==r)&&(Ce(t,i,e,a),t[18]=(4294901760&t[18])+a+2),a++}function Ce(t,e,i,n){const r=i[n]<0,s=i[n+1],o=t[r?-i[n]:i[n]];r?t[2]>>11<t[18]>>16&&(3&t[2])===e&&(t[2]+=2048,s.call(o)):s.call(o)}class Se{constructor(t,e,i){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=i}}function ke(t,e,i){const n=St(t);let r=0;for(;r<i.length;){const s=i[r];if("number"==typeof s){if(0!==s)break;r++;const o=i[r++],a=i[r++],l=i[r++];n?t.setAttribute(e,a,l,o):e.setAttributeNS(o,a,l)}else{const o=s,a=i[++r];De(o)?n&&t.setProperty(e,o,a):n?t.setAttribute(e,o,a):e.setAttribute(o,a),r++}}return r}function Ee(t){return 3===t||4===t||6===t}function De(t){return 64===t.charCodeAt(0)}function Ie(t,e){if(null===e||0===e.length);else if(null===t||0===t.length)t=e.slice();else{let i=-1;for(let n=0;n<e.length;n++){const r=e[n];"number"==typeof r?i=r:0===i||Pe(t,i,r,null,-1===i||2===i?e[++n]:null)}}return t}function Pe(t,e,i,n,r){let s=0,o=t.length;if(-1===e)o=-1;else for(;s<t.length;){const i=t[s++];if("number"==typeof i){if(i===e){o=-1;break}if(i>e){o=s-1;break}}}for(;s<t.length;){const e=t[s];if("number"==typeof e)break;if(e===i){if(null===n)return void(null!==r&&(t[s+1]=r));if(n===t[s+1])return void(t[s+2]=r)}s++,null!==n&&s++,null!==r&&s++}-1!==o&&(t.splice(o,0,e),s=o+1),t.splice(s++,0,i),null!==n&&t.splice(s++,0,n),null!==r&&t.splice(s++,0,r)}function Oe(t){return-1!==t}function Me(t){return 32767&t}function Te(t,e){let i=t>>16,n=e;for(;i>0;)n=n[15],i--;return n}let Re=!0;function Ve(t){const e=Re;return Re=t,e}let Fe=0;function Le(t,e){const i=Be(t,e);if(-1!==i)return i;const n=e[1];n.firstCreatePass&&(t.injectorIndex=e.length,Ue(n.data,t),Ue(e,null),Ue(n.blueprint,null));const r=Ne(t,e),s=t.injectorIndex;if(Oe(r)){const t=Me(r),i=Te(r,e),n=i[1].data;for(let r=0;r<8;r++)e[s+r]=i[t+r]|n[t+r]}return e[s+8]=r,s}function Ue(t,e){t.push(0,0,0,0,0,0,0,0,e)}function Be(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===e[t.injectorIndex+8]?-1:t.injectorIndex}function Ne(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let i=0,n=null,r=e;for(;null!==r;){const t=r[1],e=t.type;if(n=2===e?t.declTNode:1===e?r[6]:null,null===n)return-1;if(i++,r=r[15],-1!==n.injectorIndex)return n.injectorIndex|i<<16}return-1}function je(t,e,i){!function(t,e,i){let n;"string"==typeof i?n=i.charCodeAt(0)||0:i.hasOwnProperty(Y)&&(n=i[Y]),null==n&&(n=i[Y]=Fe++);const r=255&n;e.data[t+(r>>5)]|=1<<r}(t,e,i)}function ze(t,e,i){if(i&I.Optional)return t;v(e,"NodeInjector")}function He(t,e,i,n){if(i&I.Optional&&void 0===n&&(n=null),0==(i&(I.Self|I.Host))){const r=t[9],s=O(void 0);try{return r?r.get(e,n,i&I.Optional):M(e,n,i&I.Optional)}finally{O(s)}}return ze(n,e,i)}function Ke(t,e,i,n=I.Default,r){if(null!==t){const s=function(t){if("string"==typeof t)return t.charCodeAt(0)||0;const e=t.hasOwnProperty(Y)?t[Y]:void 0;return"number"==typeof e?e>=0?255&e:Ge:e}(i);if("function"==typeof s){if(!ae(e,t,n))return n&I.Host?ze(r,i,n):He(e,i,n,r);try{const t=s();if(null!=t||n&I.Optional)return t;v(i)}finally{de()}}else if("number"==typeof s){let r=null,o=Be(t,e),a=-1,l=n&I.Host?e[16][6]:null;for((-1===o||n&I.SkipSelf)&&(a=-1===o?Ne(t,e):e[o+8],-1!==a&&Qe(n,!1)?(r=e[1],o=Me(a),e=Te(a,e)):o=-1);-1!==o;){const t=e[1];if(Ye(s,o,t.data)){const t=We(o,e,i,r,n,l);if(t!==$e)return t}a=e[o+8],-1!==a&&Qe(n,e[1].data[o+8]===l)&&Ye(s,o,e)?(r=t,o=Me(a),e=Te(a,e)):o=-1}}}return He(e,i,n,r)}const $e={};function Ge(){return new Xe(Kt(),jt())}function We(t,e,i,n,r,s){const o=e[1],a=o.data[t+8],l=Ze(a,o,i,null==n?dt(a)&&Re:n!=o&&0!=(3&a.type),r&I.Host&&s===a);return null!==l?qe(e,o,l,a):$e}function Ze(t,e,i,n,r){const s=t.providerIndexes,o=e.data,a=1048575&s,l=t.directiveStart,c=s>>20,h=r?a+c:t.directiveEnd;for(let u=n?a:a+c;u<h;u++){const t=o[u];if(u<l&&i===t||u>=l&&t.type===i)return u}if(r){const t=o[l];if(t&&ft(t)&&t.type===i)return l}return null}function qe(t,e,i,n){let r=t[i];const s=e.data;if(r instanceof Se){const o=r;o.resolving&&function(t,e){throw new g("200",`Circular dependency in DI detected for ${t}`)}(b(s[i]));const a=Ve(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?O(o.injectImpl):null;ae(t,n,I.Default);try{r=t[i]=o.factory(void 0,s,t,n),e.firstCreatePass&&i>=n.directiveStart&&function(t,e,i){const{ngOnChanges:n,ngOnInit:r,ngDoCheck:s}=e.type.prototype;if(n){const n=bt(e);(i.preOrderHooks||(i.preOrderHooks=[])).push(t,n),(i.preOrderCheckHooks||(i.preOrderCheckHooks=[])).push(t,n)}r&&(i.preOrderHooks||(i.preOrderHooks=[])).push(0-t,r),s&&((i.preOrderHooks||(i.preOrderHooks=[])).push(t,s),(i.preOrderCheckHooks||(i.preOrderCheckHooks=[])).push(t,s))}(i,s[i],e)}finally{null!==l&&O(l),Ve(a),o.resolving=!1,de()}}return r}function Ye(t,e,i){return!!(i[e+(t>>5)]&1<<t)}function Qe(t,e){return!(t&I.Self||t&I.Host&&e)}class Xe{constructor(t,e){this._tNode=t,this._lView=e}get(t,e){return Ke(this._tNode,this._lView,t,void 0,e)}}function Je(t){return T(()=>{const e=t.prototype.constructor,i=e[q]||ti(e),n=Object.prototype;let r=Object.getPrototypeOf(t.prototype).constructor;for(;r&&r!==n;){const t=r[q]||ti(r);if(t&&t!==i)return t;r=Object.getPrototypeOf(r)}return t=>new t})}function ti(t){return m(t)?()=>{const e=ti(f(t));return e&&e()}:mt(t)}function ei(t){return function(t,e){if("class"===e)return t.classes;if("style"===e)return t.styles;const i=t.attrs;if(i){const t=i.length;let n=0;for(;n<t;){const r=i[n];if(Ee(r))break;if(0===r)n+=2;else if("number"==typeof r)for(n++;n<t&&"string"==typeof i[n];)n++;else{if(r===e)return i[n+1];n+=2}}}return null}(Kt(),t)}const ii="__parameters__";function ni(t,e,i){return T(()=>{const n=function(t){return function(...e){if(t){const i=t(...e);for(const t in i)this[t]=i[t]}}}(e);function r(...t){if(this instanceof r)return n.apply(this,t),this;const e=new r(...t);return i.annotation=e,i;function i(t,i,n){const r=t.hasOwnProperty(ii)?t[ii]:Object.defineProperty(t,ii,{value:[]})[ii];for(;r.length<=n;)r.push(null);return(r[n]=r[n]||[]).push(e),t}}return i&&(r.prototype=Object.create(i.prototype)),r.prototype.ngMetadataName=t,r.annotationCls=r,r})}class ri{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=_({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}toString(){return`InjectionToken ${this._desc}`}}const si=new ri("AnalyzeForEntryComponents"),oi=Function;function ai(t){return"function"==typeof t}function li(t,e){void 0===e&&(e=t);for(let i=0;i<t.length;i++){let n=t[i];Array.isArray(n)?(e===t&&(e=t.slice(0,i)),li(n,e)):e!==t&&e.push(n)}return e}function ci(t,e){t.forEach(t=>Array.isArray(t)?ci(t,e):e(t))}function hi(t,e,i){e>=t.length?t.push(i):t.splice(e,0,i)}function ui(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function di(t,e){const i=[];for(let n=0;n<t;n++)i.push(e);return i}function pi(t,e,i){let n=mi(t,e);return n>=0?t[1|n]=i:(n=~n,function(t,e,i,n){let r=t.length;if(r==e)t.push(i,n);else if(1===r)t.push(n,t[0]),t[0]=i;else{for(r--,t.push(t[r-1],t[r]);r>e;)t[r]=t[r-2],r--;t[e]=i,t[e+1]=n}}(t,n,e,i)),n}function fi(t,e){const i=mi(t,e);if(i>=0)return t[1|i]}function mi(t,e){return function(t,e,i){let n=0,r=t.length>>1;for(;r!==n;){const i=n+(r-n>>1),s=t[i<<1];if(e===s)return i<<1;s>e?r=i:n=i+1}return~(r<<1)}(t,e)}const gi=/^function\s+\S+\(\)\s*{[\s\S]+\.apply\(this,\s*(arguments|[^()]+\(arguments\))\)/,Ai=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{/,bi=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(/,vi=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(\)\s*{\s*super\(\.\.\.arguments\)/;class _i{constructor(t){this._reflect=t||N.Reflect}isReflectionEnabled(){return!0}factory(t){return(...e)=>new t(...e)}_zipTypesAndAnnotations(t,e){let i;i=di(void 0===t?e.length:t.length);for(let n=0;n<i.length;n++)i[n]=void 0===t?[]:t[n]&&t[n]!=Object?[t[n]]:[],e&&null!=e[n]&&(i[n]=i[n].concat(e[n]));return i}_ownParameters(t,e){if(i=t.toString(),gi.test(i)||vi.test(i)||Ai.test(i)&&!bi.test(i))return null;var i;if(t.parameters&&t.parameters!==e.parameters)return t.parameters;const n=t.ctorParameters;if(n&&n!==e.ctorParameters){const t="function"==typeof n?n():n,e=t.map(t=>t&&t.type),i=t.map(t=>t&&yi(t.decorators));return this._zipTypesAndAnnotations(e,i)}const r=t.hasOwnProperty(ii)&&t[ii],s=this._reflect&&this._reflect.getOwnMetadata&&this._reflect.getOwnMetadata("design:paramtypes",t);return s||r?this._zipTypesAndAnnotations(s,r):di(t.length)}parameters(t){if(!ai(t))return[];const e=wi(t);let i=this._ownParameters(t,e);return i||e===Object||(i=this.parameters(e)),i||[]}_ownAnnotations(t,e){if(t.annotations&&t.annotations!==e.annotations){let e=t.annotations;return"function"==typeof e&&e.annotations&&(e=e.annotations),e}return t.decorators&&t.decorators!==e.decorators?yi(t.decorators):t.hasOwnProperty("__annotations__")?t.__annotations__:null}annotations(t){if(!ai(t))return[];const e=wi(t),i=this._ownAnnotations(t,e)||[];return(e!==Object?this.annotations(e):[]).concat(i)}_ownPropMetadata(t,e){if(t.propMetadata&&t.propMetadata!==e.propMetadata){let e=t.propMetadata;return"function"==typeof e&&e.propMetadata&&(e=e.propMetadata),e}if(t.propDecorators&&t.propDecorators!==e.propDecorators){const e=t.propDecorators,i={};return Object.keys(e).forEach(t=>{i[t]=yi(e[t])}),i}return t.hasOwnProperty("__prop__metadata__")?t.__prop__metadata__:null}propMetadata(t){if(!ai(t))return{};const e=wi(t),i={};if(e!==Object){const t=this.propMetadata(e);Object.keys(t).forEach(e=>{i[e]=t[e]})}const n=this._ownPropMetadata(t,e);return n&&Object.keys(n).forEach(t=>{const e=[];i.hasOwnProperty(t)&&e.push(...i[t]),e.push(...n[t]),i[t]=e}),i}ownPropMetadata(t){return ai(t)&&this._ownPropMetadata(t,wi(t))||{}}hasLifecycleHook(t,e){return t instanceof oi&&e in t.prototype}guards(t){return{}}getter(t){return new Function("o","return o."+t+";")}setter(t){return new Function("o","v","return o."+t+" = v;")}method(t){return new Function("o","args",`if (!o.${t}) throw new Error('"${t}" is undefined');\n return o.${t}.apply(o, args);`)}importUri(t){return"object"==typeof t&&t.filePath?t.filePath:`./${h(t)}`}resourceUri(t){return`./${h(t)}`}resolveIdentifier(t,e,i,n){return n}resolveEnum(t,e){return t[e]}}function yi(t){return t?t.map(t=>new(0,t.type.annotationCls)(...t.args?t.args:[])):[]}function wi(t){const e=t.prototype?Object.getPrototypeOf(t.prototype):null;return(e?e.constructor:null)||Object}const xi={},Ci=/\n/gm,Si=l({provide:String,useValue:l});let ki;function Ei(t){const e=ki;return ki=t,e}function Di(t,e=I.Default){if(void 0===ki)throw new Error("inject() must be called from an injection context");return null===ki?M(t,void 0,e):ki.get(t,e&I.Optional?null:void 0,e)}function Ii(t,e=I.Default){return(P||Di)(f(t),e)}const Pi=Ii;function Oi(t){const e=[];for(let i=0;i<t.length;i++){const n=f(t[i]);if(Array.isArray(n)){if(0===n.length)throw new Error("Arguments array must have arguments.");let t,i=I.Default;for(let e=0;e<n.length;e++){const r=n[e],s=r.__NG_DI_FLAG__;"number"==typeof s?-1===s?t=r.token:i|=s:t=r}e.push(Ii(t,i))}else e.push(Ii(n))}return e}function Mi(t,e){return t.__NG_DI_FLAG__=e,t.prototype.__NG_DI_FLAG__=e,t}const Ti=Mi(ni("Inject",t=>({token:t})),-1),Ri=Mi(ni("Optional"),8),Vi=Mi(ni("Self"),2),Fi=Mi(ni("SkipSelf"),4);let Li,Ui;function Bi(t){var e;return(null===(e=function(){if(void 0===Li&&(Li=null,N.trustedTypes))try{Li=N.trustedTypes.createPolicy("angular",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch(e){}return Li}())||void 0===e?void 0:e.createHTML(t))||t}function Ni(){if(void 0===Ui&&(Ui=null,N.trustedTypes))try{Ui=N.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch(t){}return Ui}function ji(t){var e;return(null===(e=Ni())||void 0===e?void 0:e.createHTML(t))||t}function zi(t){var e;return(null===(e=Ni())||void 0===e?void 0:e.createScriptURL(t))||t}class Hi{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see https://g.co/ng/security#xss)`}}class Ki extends Hi{getTypeName(){return"HTML"}}class $i extends Hi{getTypeName(){return"Style"}}class Gi extends Hi{getTypeName(){return"Script"}}class Wi extends Hi{getTypeName(){return"URL"}}class Zi extends Hi{getTypeName(){return"ResourceURL"}}function qi(t){return t instanceof Hi?t.changingThisBreaksApplicationSecurity:t}function Yi(t,e){const i=Qi(t);if(null!=i&&i!==e){if("ResourceURL"===i&&"URL"===e)return!0;throw new Error(`Required a safe ${e}, got a ${i} (see https://g.co/ng/security#xss)`)}return i===e}function Qi(t){return t instanceof Hi&&t.getTypeName()||null}function Xi(t){return new Ki(t)}function Ji(t){return new $i(t)}function tn(t){return new Gi(t)}function en(t){return new Wi(t)}function nn(t){return new Zi(t)}class rn{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t="<body><remove></remove>"+t;try{const e=(new window.DOMParser).parseFromString(Bi(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch(e){return null}}}class sn{constructor(t){if(this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const t=this.inertDocument.createElement("html");this.inertDocument.appendChild(t);const e=this.inertDocument.createElement("body");t.appendChild(e)}}getInertBodyElement(t){const e=this.inertDocument.createElement("template");if("content"in e)return e.innerHTML=Bi(t),e;const i=this.inertDocument.createElement("body");return i.innerHTML=Bi(t),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(i),i}stripCustomNsAttrs(t){const e=t.attributes;for(let n=e.length-1;0<n;n--){const i=e.item(n).name;"xmlns:ns1"!==i&&0!==i.indexOf("ns1:")||t.removeAttribute(i)}let i=t.firstChild;for(;i;)i.nodeType===Node.ELEMENT_NODE&&this.stripCustomNsAttrs(i),i=i.nextSibling}}const on=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi,an=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;function ln(t){return(t=String(t)).match(on)||t.match(an)?t:"unsafe:"+t}function cn(t){const e={};for(const i of t.split(","))e[i]=!0;return e}function hn(...t){const e={};for(const i of t)for(const t in i)i.hasOwnProperty(t)&&(e[t]=!0);return e}const un=cn("area,br,col,hr,img,wbr"),dn=cn("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),pn=cn("rp,rt"),fn=hn(pn,dn),mn=hn(un,hn(dn,cn("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),hn(pn,cn("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),fn),gn=cn("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),An=cn("srcset"),bn=hn(gn,An,cn("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),cn("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),vn=cn("script,style,template");class _n{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(t){let e=t.firstChild,i=!0;for(;e;)if(e.nodeType===Node.ELEMENT_NODE?i=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,i&&e.firstChild)e=e.firstChild;else for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let t=this.checkClobberedElement(e,e.nextSibling);if(t){e=t;break}e=this.checkClobberedElement(e,e.parentNode)}return this.buf.join("")}startElement(t){const e=t.nodeName.toLowerCase();if(!mn.hasOwnProperty(e))return this.sanitizedSomething=!0,!vn.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);const i=t.attributes;for(let r=0;r<i.length;r++){const t=i.item(r),e=t.name,s=e.toLowerCase();if(!bn.hasOwnProperty(s)){this.sanitizedSomething=!0;continue}let o=t.value;gn[s]&&(o=ln(o)),An[s]&&(n=o,o=(n=String(n)).split(",").map(t=>ln(t.trim())).join(", ")),this.buf.push(" ",e,'="',xn(o),'"')}var n;return this.buf.push(">"),!0}endElement(t){const e=t.nodeName.toLowerCase();mn.hasOwnProperty(e)&&!un.hasOwnProperty(e)&&(this.buf.push("</"),this.buf.push(e),this.buf.push(">"))}chars(t){this.buf.push(xn(t))}checkClobberedElement(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`);return e}}const yn=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,wn=/([^\#-~ |!])/g;function xn(t){return t.replace(/&/g,"&amp;").replace(yn,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(wn,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}let Cn;function Sn(t,e){let i=null;try{Cn=Cn||function(t){const e=new sn(t);return function(){try{return!!(new window.DOMParser).parseFromString(Bi(""),"text/html")}catch(t){return!1}}()?new rn(e):e}(t);let n=e?String(e):"";i=Cn.getInertBodyElement(n);let r=5,s=n;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,n=s,s=i.innerHTML,i=Cn.getInertBodyElement(n)}while(n!==s);return Bi((new _n).sanitizeChildren(kn(i)||i))}finally{if(i){const t=kn(i)||i;for(;t.firstChild;)t.removeChild(t.firstChild)}}}function kn(t){return"content"in t&&function(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var En=function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t}({});function Dn(t){const e=On();return e?ji(e.sanitize(En.HTML,t)||""):Yi(t,"HTML")?ji(qi(t)):Sn(Ct(),A(t))}function In(t){const e=On();return e?e.sanitize(En.URL,t)||"":Yi(t,"URL")?qi(t):ln(A(t))}function Pn(t){const e=On();if(e)return zi(e.sanitize(En.RESOURCE_URL,t)||"");if(Yi(t,"ResourceURL"))return zi(qi(t));throw new Error("unsafe value used in a resource URL context (see https://g.co/ng/security#xss)")}function On(){const t=jt();return t&&t[12]}function Mn(t){return t.ngDebugContext}function Tn(t){return t.ngOriginalError}function Rn(t,...e){t.error(...e)}class Vn{constructor(){this._console=console}handleError(t){const e=this._findOriginalError(t),i=this._findContext(t),n=function(t){return t.ngErrorLogger||Rn}(t);n(this._console,"ERROR",t),e&&n(this._console,"ORIGINAL ERROR",e),i&&n(this._console,"ERROR CONTEXT",i)}_findContext(t){return t?Mn(t)?Mn(t):this._findContext(Tn(t)):null}_findOriginalError(t){let e=Tn(t);for(;e&&Tn(e);)e=Tn(e);return e}}function Fn(t,e){t.__ngContext__=e}const Ln=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(N))();function Un(t){return{name:"window",target:t.ownerDocument.defaultView}}function Bn(t){return{name:"document",target:t.ownerDocument}}function Nn(t){return{name:"body",target:t.ownerDocument.body}}function jn(t){return t instanceof Function?t():t}var zn=function(t){return t[t.Important=1]="Important",t[t.DashCase=2]="DashCase",t}({});function Hn(t,e){return(void 0)(t,e)}function Kn(t){const e=t[3];return ht(e)?e[3]:e}function $n(t){return Wn(t[13])}function Gn(t){return Wn(t[4])}function Wn(t){for(;null!==t&&!ht(t);)t=t[4];return t}function Zn(t,e,i,n,r){if(null!=n){let s,o=!1;ht(n)?s=n:ct(n)&&(o=!0,n=n[0]);const a=Et(n);0===t&&null!==i?null==r?ir(e,i,a):er(e,i,a,r||null,!0):1===t&&null!==i?er(e,i,a,r||null,!0):2===t?function(t,e,i){const n=rr(t,e);n&&function(t,e,i,n){St(t)?t.removeChild(e,i,n):e.removeChild(i)}(t,n,e,i)}(e,a,o):3===t&&e.destroyNode(a),null!=s&&function(t,e,i,n,r){const s=i[7];s!==Et(i)&&Zn(e,t,n,s,r);for(let o=10;o<i.length;o++){const r=i[o];dr(r[1],r,t,e,n,s)}}(e,t,s,i,r)}}function qn(t,e,i){return St(t)?t.createElement(e,i):null===i?t.createElement(e):t.createElementNS(i,e)}function Yn(t,e){const i=t[9],n=i.indexOf(e),r=e[3];1024&e[2]&&(e[2]&=-1025,Ut(r,-1)),i.splice(n,1)}function Qn(t,e){if(t.length<=10)return;const i=10+e,n=t[i];if(n){const s=n[17];null!==s&&s!==t&&Yn(s,n),e>0&&(t[i-1][4]=n[4]);const o=ui(t,10+e);dr(n[1],r=n,r[11],2,null,null),r[0]=null,r[6]=null;const a=o[19];null!==a&&a.detachView(o[1]),n[3]=null,n[4]=null,n[2]&=-129}var r;return n}function Xn(t,e){if(!(256&e[2])){const i=e[11];St(i)&&i.destroyNode&&dr(t,e,i,3,null,null),function(t){let e=t[13];if(!e)return Jn(t[1],t);for(;e;){let i=null;if(ct(e))i=e[13];else{const t=e[10];t&&(i=t)}if(!i){for(;e&&!e[4]&&e!==t;)ct(e)&&Jn(e[1],e),e=e[3];null===e&&(e=t),ct(e)&&Jn(e[1],e),i=e&&e[4]}e=i}}(e)}}function Jn(t,e){if(!(256&e[2])){e[2]&=-129,e[2]|=256,function(t,e){let i;if(null!=t&&null!=(i=t.destroyHooks))for(let n=0;n<i.length;n+=2){const t=e[i[n]];if(!(t instanceof Se)){const e=i[n+1];if(Array.isArray(e))for(let i=0;i<e.length;i+=2)e[i+1].call(t[e[i]]);else e.call(t)}}}(t,e),function(t,e){const i=t.cleanup,n=e[7];let r=-1;if(null!==i)for(let s=0;s<i.length-1;s+=2)if("string"==typeof i[s]){const t=i[s+1],o="function"==typeof t?t(e):Et(e[t]),a=n[r=i[s+2]],l=i[s+3];"boolean"==typeof l?o.removeEventListener(i[s],a,l):l>=0?n[r=l]():n[r=-l].unsubscribe(),s+=2}else{const t=n[r=i[s+1]];i[s].call(t)}if(null!==n){for(let t=r+1;t<n.length;t++)(0,n[t])();e[7]=null}}(t,e),1===e[1].type&&St(e[11])&&e[11].destroy();const i=e[17];if(null!==i&&ht(e[3])){i!==e[3]&&Yn(i,e);const n=e[19];null!==n&&n.detachView(t)}}}function tr(t,e,i){return function(t,e,i){let n=e;for(;null!==n&&40&n.type;)n=(e=n).parent;if(null===n)return i[0];if(2&n.flags){const e=t.data[n.directiveStart].encapsulation;if(e===V.None||e===V.Emulated)return null}return It(n,i)}(t,e.parent,i)}function er(t,e,i,n,r){St(t)?t.insertBefore(e,i,n,r):e.insertBefore(i,n,r)}function ir(t,e,i){St(t)?t.appendChild(e,i):e.appendChild(i)}function nr(t,e,i,n,r){null!==n?er(t,e,i,n,r):ir(t,e,i)}function rr(t,e){return St(t)?t.parentNode(e):e.parentNode}function sr(t,e,i){return or(t,e,i)}let or=function(t,e,i){return 40&t.type?It(t,i):null};function ar(t,e,i,n){const r=tr(t,n,e),s=e[11],o=sr(n.parent||e[6],n,e);if(null!=r)if(Array.isArray(i))for(let a=0;a<i.length;a++)nr(s,r,i[a],o,!1);else nr(s,r,i,o,!1)}function lr(t,e){if(null!==e){const i=e.type;if(3&i)return It(e,t);if(4&i)return hr(-1,t[e.index]);if(8&i){const i=e.child;if(null!==i)return lr(t,i);{const i=t[e.index];return ht(i)?hr(-1,i):Et(i)}}if(32&i)return Hn(e,t)()||Et(t[e.index]);{const i=cr(t,e);return null!==i?Array.isArray(i)?i[0]:lr(Kn(t[16]),i):lr(t,e.next)}}return null}function cr(t,e){return null!==e?t[16][6].projection[e.projection]:null}function hr(t,e){const i=10+t+1;if(i<e.length){const t=e[i],n=t[1].firstChild;if(null!==n)return lr(t,n)}return e[7]}function ur(t,e,i,n,r,s,o){for(;null!=i;){const a=n[i.index],l=i.type;if(o&&0===e&&(a&&Fn(Et(a),n),i.flags|=4),64!=(64&i.flags))if(8&l)ur(t,e,i.child,n,r,s,!1),Zn(e,t,r,a,s);else if(32&l){const o=Hn(i,n);let l;for(;l=o();)Zn(e,t,r,l,s);Zn(e,t,r,a,s)}else 16&l?pr(t,e,n,i,r,s):Zn(e,t,r,a,s);i=o?i.projectionNext:i.next}}function dr(t,e,i,n,r,s){ur(i,n,t.firstChild,e,r,s,!1)}function pr(t,e,i,n,r,s){const o=i[16],a=o[6].projection[n.projection];if(Array.isArray(a))for(let l=0;l<a.length;l++)Zn(e,t,r,a[l],s);else ur(t,e,a,o[3],r,s,!0)}function fr(t,e,i){St(t)?t.setAttribute(e,"style",i):e.style.cssText=i}function mr(t,e,i){St(t)?""===i?t.removeAttribute(e,"class"):t.setAttribute(e,"class",i):e.className=i}function gr(t,e,i){let n=t.length;for(;;){const r=t.indexOf(e,i);if(-1===r)return r;if(0===r||t.charCodeAt(r-1)<=32){const i=e.length;if(r+i===n||t.charCodeAt(r+i)<=32)return r}i=r+1}}function Ar(t,e,i){let n=0;for(;n<t.length;){let r=t[n++];if(i&&"class"===r){if(r=t[n],-1!==gr(r.toLowerCase(),e,0))return!0}else if(1===r){for(;n<t.length&&"string"==typeof(r=t[n++]);)if(r.toLowerCase()===e)return!0;return!1}}return!1}function br(t){return 4===t.type&&"ng-template"!==t.value}function vr(t,e,i){return e===(4!==t.type||i?t.value:"ng-template")}function _r(t,e,i){let n=4;const r=t.attrs||[],s=function(t){for(let e=0;e<t.length;e++)if(Ee(t[e]))return e;return t.length}(r);let o=!1;for(let a=0;a<e.length;a++){const l=e[a];if("number"!=typeof l){if(!o)if(4&n){if(n=2|1&n,""!==l&&!vr(t,l,i)||""===l&&1===e.length){if(yr(n))return!1;o=!0}}else{const c=8&n?l:e[++a];if(8&n&&null!==t.attrs){if(!Ar(t.attrs,c,i)){if(yr(n))return!1;o=!0}continue}const h=wr(8&n?"class":l,r,br(t),i);if(-1===h){if(yr(n))return!1;o=!0;continue}if(""!==c){let t;t=h>s?"":r[h+1].toLowerCase();const e=8&n?t:null;if(e&&-1!==gr(e,c,0)||2&n&&c!==t){if(yr(n))return!1;o=!0}}}}else{if(!o&&!yr(n)&&!yr(l))return!1;if(o&&yr(l))continue;o=!1,n=l|1&n}}return yr(n)||o}function yr(t){return 0==(1&t)}function wr(t,e,i,n){if(null===e)return-1;let r=0;if(n||!i){let i=!1;for(;r<e.length;){const n=e[r];if(n===t)return r;if(3===n||6===n)i=!0;else{if(1===n||2===n){let t=e[++r];for(;"string"==typeof t;)t=e[++r];continue}if(4===n)break;if(0===n){r+=4;continue}}r+=i?1:2}return-1}return function(t,e){let i=t.indexOf(4);if(i>-1)for(i++;i<t.length;){const n=t[i];if("number"==typeof n)return-1;if(n===e)return i;i++}return-1}(e,t)}function xr(t,e,i=!1){for(let n=0;n<e.length;n++)if(_r(t,e[n],i))return!0;return!1}function Cr(t,e){t:for(let i=0;i<e.length;i++){const n=e[i];if(t.length===n.length){for(let e=0;e<t.length;e++)if(t[e]!==n[e])continue t;return!0}}return!1}function Sr(t,e){return t?":not("+e.trim()+")":e}function kr(t){let e=t[0],i=1,n=2,r="",s=!1;for(;i<t.length;){let o=t[i];if("string"==typeof o)if(2&n){const e=t[++i];r+="["+o+(e.length>0?'="'+e+'"':"")+"]"}else 8&n?r+="."+o:4&n&&(r+=" "+o);else""===r||yr(o)||(e+=Sr(s,r),r=""),n=o,s=s||!yr(n);i++}return""!==r&&(e+=Sr(s,r)),e}const Er={};function Dr(t){Ir(zt(),jt(),fe()+t,qt())}function Ir(t,e,i,n){if(!n)if(3==(3&e[2])){const n=t.preOrderCheckHooks;null!==n&&_e(e,n,i)}else{const n=t.preOrderHooks;null!==n&&ye(e,n,0,i)}me(i)}function Pr(t,e){return t<<17|e<<2}function Or(t){return t>>17&32767}function Mr(t){return 2|t}function Tr(t){return(131068&t)>>2}function Rr(t,e){return-131069&t|e<<2}function Vr(t){return 1|t}function Fr(t,e){const i=t.contentQueries;if(null!==i)for(let n=0;n<i.length;n+=2){const r=i[n],s=i[n+1];if(-1!==s){const i=t.data[s];se(r),i.contentQueries(2,e[s],s)}}}function Lr(t,e,i,n,r,s,o,a,l,c){const h=e.blueprint.slice();return h[0]=r,h[2]=140|n,Lt(h),h[3]=h[15]=t,h[8]=i,h[10]=o||t&&t[10],h[11]=a||t&&t[11],h[12]=l||t&&t[12]||null,h[9]=c||t&&t[9]||null,h[6]=s,h[16]=2==e.type?t[16]:h,h}function Ur(t,e,i,n,r){let s=t.data[e];if(null===s)s=function(t,e,i,n,r){const s=$t(),o=Wt(),a=t.data[e]=function(t,e,i,n,r,s){return{type:i,index:n,insertBeforeIndex:null,injectorIndex:e?e.injectorIndex:-1,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,propertyBindings:null,flags:0,providerIndexes:0,value:r,attrs:s,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tViews:null,next:null,projectionNext:null,child:null,parent:e,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}(0,o?s:s&&s.parent,i,e,n,r);return null===t.firstChild&&(t.firstChild=a),null!==s&&(o?null==s.child&&null!==a.parent&&(s.child=a):null===s.next&&(s.next=a)),a}(t,e,i,n,r),Bt.lFrame.inI18n&&(s.flags|=64);else if(64&s.type){s.type=i,s.value=n,s.attrs=r;const t=function(){const t=Bt.lFrame,e=t.currentTNode;return t.isParent?e:e.parent}();s.injectorIndex=null===t?-1:t.injectorIndex}return Gt(s,!0),s}function Br(t,e,i,n){if(0===i)return-1;const r=e.length;for(let s=0;s<i;s++)e.push(n),t.blueprint.push(n),t.data.push(null);return r}function Nr(t,e,i){le(e);try{const n=t.viewQuery;null!==n&&gs(1,n,i);const r=t.template;null!==r&&Hr(t,e,r,1,i),t.firstCreatePass&&(t.firstCreatePass=!1),t.staticContentQueries&&Fr(t,e),t.staticViewQueries&&gs(2,t.viewQuery,i);const s=t.components;null!==s&&function(t,e){for(let i=0;i<e.length;i++)us(t,e[i])}(e,s)}catch(n){throw t.firstCreatePass&&(t.incompleteFirstPass=!0),n}finally{e[2]&=-5,pe()}}function jr(t,e,i,n){const r=e[2];if(256==(256&r))return;le(e);const s=qt();try{Lt(e),Bt.lFrame.bindingIndex=t.bindingStartIndex,null!==i&&Hr(t,e,i,2,n);const o=3==(3&r);if(!s)if(o){const i=t.preOrderCheckHooks;null!==i&&_e(e,i,null)}else{const i=t.preOrderHooks;null!==i&&ye(e,i,0,null),we(e,0)}if(function(t){for(let e=$n(t);null!==e;e=Gn(e)){if(!e[2])continue;const t=e[9];for(let e=0;e<t.length;e++){const i=t[e],n=i[3];0==(1024&i[2])&&Ut(n,1),i[2]|=1024}}}(e),function(t){for(let e=$n(t);null!==e;e=Gn(e))for(let t=10;t<e.length;t++){const i=e[t],n=i[1];Vt(i)&&jr(n,i,n.template,i[8])}}(e),null!==t.contentQueries&&Fr(t,e),!s)if(o){const i=t.contentCheckHooks;null!==i&&_e(e,i)}else{const i=t.contentHooks;null!==i&&ye(e,i,1),we(e,1)}!function(t,e){const i=t.hostBindingOpCodes;if(null!==i)try{for(let t=0;t<i.length;t++){const n=i[t];if(n<0)me(~n);else{const r=n,s=i[++t],o=i[++t];ee(s,r),o(2,e[r])}}}finally{me(-1)}}(t,e);const a=t.components;null!==a&&function(t,e){for(let i=0;i<e.length;i++)cs(t,e[i])}(e,a);const l=t.viewQuery;if(null!==l&&gs(2,l,n),!s)if(o){const i=t.viewCheckHooks;null!==i&&_e(e,i)}else{const i=t.viewHooks;null!==i&&ye(e,i,2),we(e,2)}!0===t.firstUpdatePass&&(t.firstUpdatePass=!1),s||(e[2]&=-73),1024&e[2]&&(e[2]&=-1025,Ut(e[3],-1))}finally{pe()}}function zr(t,e,i,n){const r=e[10],s=!qt(),o=Rt(e);try{s&&!o&&r.begin&&r.begin(),o&&Nr(t,e,n),jr(t,e,i,n)}finally{s&&!o&&r.end&&r.end()}}function Hr(t,e,i,n,r){const s=fe();try{me(-1),2&n&&e.length>20&&Ir(t,e,20,qt()),i(n,r)}finally{me(s)}}function Kr(t,e,i){if(ut(e)){const n=e.directiveEnd;for(let r=e.directiveStart;r<n;r++){const e=t.data[r];e.contentQueries&&e.contentQueries(1,i[r],r)}}}function $r(t,e,i){Nt()&&(function(t,e,i,n){const r=i.directiveStart,s=i.directiveEnd;t.firstCreatePass||Le(i,e),Fn(n,e);const o=i.initialInputs;for(let a=r;a<s;a++){const n=t.data[a],s=ft(n);s&&ss(e,i,n);const l=qe(e,t,a,i);Fn(l,e),null!==o&&os(0,a-r,l,n,0,o),s&&(Mt(i.index,e)[8]=l)}}(t,e,i,It(i,e)),128==(128&i.flags)&&function(t,e,i){const n=i.directiveStart,r=i.directiveEnd,s=i.index,o=Bt.lFrame.currentDirectiveIndex;try{me(s);for(let i=n;i<r;i++){const n=t.data[i],r=e[i];ie(i),null===n.hostBindings&&0===n.hostVars&&null===n.hostAttrs||ts(n,r)}}finally{me(-1),ie(o)}}(t,e,i))}function Gr(t,e,i=It){const n=e.localNames;if(null!==n){let r=e.index+1;for(let s=0;s<n.length;s+=2){const o=n[s+1],a=-1===o?i(e,t):t[o];t[r++]=a}}}function Wr(t){const e=t.tView;return null===e||e.incompleteFirstPass?t.tView=Zr(1,null,t.template,t.decls,t.vars,t.directiveDefs,t.pipeDefs,t.viewQuery,t.schemas,t.consts):e}function Zr(t,e,i,n,r,s,o,a,l,c){const h=20+n,u=h+r,d=function(t,e){const i=[];for(let n=0;n<e;n++)i.push(n<t?null:Er);return i}(h,u),p="function"==typeof c?c():c;return d[1]={type:t,blueprint:d,template:i,queries:null,viewQuery:a,declTNode:e,data:d.slice().fill(null,h),bindingStartIndex:h,expandoStartIndex:u,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:"function"==typeof s?s():s,pipeRegistry:"function"==typeof o?o():o,firstChild:null,schemas:l,consts:p,incompleteFirstPass:!1}}function qr(t,e,i,n){const r=bs(e);null===i?r.push(n):(r.push(i),t.firstCreatePass&&vs(t).push(n,r.length-1))}function Yr(t,e,i){for(let n in t)if(t.hasOwnProperty(n)){const r=t[n];(i=null===i?{}:i).hasOwnProperty(n)?i[n].push(e,r):i[n]=[e,r]}return i}function Qr(t,e,i,n,r,s,o,a){const l=It(e,i);let c,h=e.inputs;var u;!a&&null!=h&&(c=h[n])?(ws(t,i,c,n,r),dt(e)&&function(t,e){const i=Mt(e,t);16&i[2]||(i[2]|=64)}(i,e.index)):3&e.type&&(n="class"===(u=n)?"className":"for"===u?"htmlFor":"formaction"===u?"formAction":"innerHtml"===u?"innerHTML":"readonly"===u?"readOnly":"tabindex"===u?"tabIndex":u,r=null!=o?o(r,e.value||"",n):r,St(s)?s.setProperty(l,n,r):De(n)||(l.setProperty?l.setProperty(n,r):l[n]=r))}function Xr(t,e,i,n){let r=!1;if(Nt()){const s=function(t,e,i){const n=t.directiveRegistry;let r=null;if(n)for(let s=0;s<n.length;s++){const o=n[s];xr(i,o.selectors,!1)&&(r||(r=[]),je(Le(i,e),t,o.type),ft(o)?(es(t,i),r.unshift(o)):r.push(o))}return r}(t,e,i),o=null===n?null:{"":-1};if(null!==s){r=!0,ns(i,t.data.length,s.length);for(let t=0;t<s.length;t++){const e=s[t];e.providersResolver&&e.providersResolver(e)}let n=!1,a=!1,l=Br(t,e,s.length,null);for(let r=0;r<s.length;r++){const c=s[r];i.mergedAttrs=Ie(i.mergedAttrs,c.hostAttrs),rs(t,i,e,l,c),is(l,c,o),null!==c.contentQueries&&(i.flags|=8),null===c.hostBindings&&null===c.hostAttrs&&0===c.hostVars||(i.flags|=128);const h=c.type.prototype;!n&&(h.ngOnChanges||h.ngOnInit||h.ngDoCheck)&&((t.preOrderHooks||(t.preOrderHooks=[])).push(i.index),n=!0),a||!h.ngOnChanges&&!h.ngDoCheck||((t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(i.index),a=!0),l++}!function(t,e){const i=e.directiveEnd,n=t.data,r=e.attrs,s=[];let o=null,a=null;for(let l=e.directiveStart;l<i;l++){const t=n[l],i=t.inputs,c=null===r||br(e)?null:as(i,r);s.push(c),o=Yr(i,l,o),a=Yr(t.outputs,l,a)}null!==o&&(o.hasOwnProperty("class")&&(e.flags|=16),o.hasOwnProperty("style")&&(e.flags|=32)),e.initialInputs=s,e.inputs=o,e.outputs=a}(t,i)}o&&function(t,e,i){if(e){const n=t.localNames=[];for(let t=0;t<e.length;t+=2){const r=i[e[t+1]];if(null==r)throw new g("301",`Export of name '${e[t+1]}' not found!`);n.push(e[t],r)}}}(i,n,o)}return i.mergedAttrs=Ie(i.mergedAttrs,i.attrs),r}function Jr(t,e,i,n,r,s){const o=s.hostBindings;if(o){let i=t.hostBindingOpCodes;null===i&&(i=t.hostBindingOpCodes=[]);const s=~e.index;(function(t){let e=t.length;for(;e>0;){const i=t[--e];if("number"==typeof i&&i<0)return i}return 0})(i)!=s&&i.push(s),i.push(n,r,o)}}function ts(t,e){null!==t.hostBindings&&t.hostBindings(1,e)}function es(t,e){e.flags|=2,(t.components||(t.components=[])).push(e.index)}function is(t,e,i){if(i){if(e.exportAs)for(let n=0;n<e.exportAs.length;n++)i[e.exportAs[n]]=t;ft(e)&&(i[""]=t)}}function ns(t,e,i){t.flags|=1,t.directiveStart=e,t.directiveEnd=e+i,t.providerIndexes=e}function rs(t,e,i,n,r){t.data[n]=r;const s=r.factory||(r.factory=mt(r.type)),o=new Se(s,ft(r),null);t.blueprint[n]=o,i[n]=o,Jr(t,e,0,n,Br(t,i,r.hostVars,Er),r)}function ss(t,e,i){const n=It(e,t),r=Wr(i),s=t[10],o=ds(t,Lr(t,r,null,i.onPush?64:16,n,e,s,s.createRenderer(n,i),null,null));t[e.index]=o}function os(t,e,i,n,r,s){const o=s[e];if(null!==o){const t=n.setInput;for(let e=0;e<o.length;){const r=o[e++],s=o[e++],a=o[e++];null!==t?n.setInput(i,a,r,s):i[s]=a}}}function as(t,e){let i=null,n=0;for(;n<e.length;){const r=e[n];if(0!==r)if(5!==r){if("number"==typeof r)break;t.hasOwnProperty(r)&&(null===i&&(i=[]),i.push(r,t[r],e[n+1])),n+=2}else n+=2;else n+=4}return i}function ls(t,e,i,n){return new Array(t,!0,!1,e,null,0,n,i,null,null)}function cs(t,e){const i=Mt(e,t);if(Vt(i)){const t=i[1];80&i[2]?jr(t,i,t.template,i[8]):i[5]>0&&hs(i)}}function hs(t){for(let i=$n(t);null!==i;i=Gn(i))for(let t=10;t<i.length;t++){const e=i[t];if(1024&e[2]){const t=e[1];jr(t,e,t.template,e[8])}else e[5]>0&&hs(e)}const e=t[1].components;if(null!==e)for(let i=0;i<e.length;i++){const n=Mt(e[i],t);Vt(n)&&n[5]>0&&hs(n)}}function us(t,e){const i=Mt(e,t),n=i[1];!function(t,e){for(let i=e.length;i<t.blueprint.length;i++)e.push(t.blueprint[i])}(n,i),Nr(n,i,i[8])}function ds(t,e){return t[13]?t[14][4]=e:t[13]=e,t[14]=e,e}function ps(t){for(;t;){t[2]|=64;const e=Kn(t);if(0!=(512&t[2])&&!e)return t;t=e}return null}function fs(t,e,i){const n=e[10];n.begin&&n.begin();try{jr(t,e,t.template,i)}catch(r){throw ys(e,r),r}finally{n.end&&n.end()}}function ms(t){!function(t){for(let e=0;e<t.components.length;e++){const i=t.components[e],n=Tt(i),r=n[1];zr(r,n,r.template,i)}}(t[8])}function gs(t,e,i){se(0),e(t,i)}const As=(()=>Promise.resolve(null))();function bs(t){return t[7]||(t[7]=[])}function vs(t){return t.cleanup||(t.cleanup=[])}function _s(t,e,i){return(null===t||ft(t))&&(i=function(t){for(;Array.isArray(t);){if("object"==typeof t[1])return t;t=t[0]}return null}(i[e.index])),i[11]}function ys(t,e){const i=t[9],n=i?i.get(Vn,null):null;n&&n.handleError(e)}function ws(t,e,i,n,r){for(let s=0;s<i.length;){const o=i[s++],a=i[s++],l=e[o],c=t.data[o];null!==c.setInput?c.setInput(l,r,n,a):l[a]=r}}function xs(t,e,i){const n=Dt(e,t);!function(t,e,i){St(t)?t.setValue(e,i):e.textContent=i}(t[11],n,i)}function Cs(t,e,i){let n=i?t.styles:null,r=i?t.classes:null,s=0;if(null!==e)for(let o=0;o<e.length;o++){const t=e[o];"number"==typeof t?s=t:1==s?r=u(r,t):2==s&&(n=u(n,t+": "+e[++o]+";"))}i?t.styles=n:t.stylesWithoutHost=n,i?t.classes=r:t.classesWithoutHost=r}const Ss=new ri("INJECTOR",-1);class ks{get(t,e=xi){if(e===xi){const e=new Error(`NullInjectorError: No provider for ${h(t)}!`);throw e.name="NullInjectorError",e}return e}}const Es=new ri("Set Injector scope."),Ds={},Is={},Ps=[];let Os;function Ms(){return void 0===Os&&(Os=new ks),Os}function Ts(t,e=null,i=null,n){return new Rs(t,i,e||Ms(),n)}class Rs{constructor(t,e,i,n=null){this.parent=i,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;const r=[];e&&ci(e,i=>this.processProvider(i,t,e)),ci([t],t=>this.processInjectorType(t,[],r)),this.records.set(Ss,Ls(void 0,this));const s=this.records.get(Es);this.scope=null!=s?s.value:null,this.source=n||("object"==typeof t?null:h(t))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(t=>t.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(t,e=xi,i=I.Default){this.assertNotDestroyed();const n=Ei(this);try{if(!(i&I.SkipSelf)){let e=this.records.get(t);if(void 0===e){const i=("function"==typeof(r=t)||"object"==typeof r&&r instanceof ri)&&w(t);e=i&&this.injectableDefInScope(i)?Ls(Vs(t),Ds):null,this.records.set(t,e)}if(null!=e)return this.hydrate(t,e)}return(i&I.Self?Ms():this.parent).get(t,e=i&I.Optional&&e===xi?null:e)}catch(s){if("NullInjectorError"===s.name){if((s.ngTempTokenPath=s.ngTempTokenPath||[]).unshift(h(t)),n)throw s;return function(t,e,i,n){const r=t.ngTempTokenPath;throw e.__source&&r.unshift(e.__source),t.message=function(t,e,i,n=null){t=t&&"\n"===t.charAt(0)&&"\u0275"==t.charAt(1)?t.substr(2):t;let r=h(e);if(Array.isArray(e))r=e.map(h).join(" -> ");else if("object"==typeof e){let t=[];for(let i in e)if(e.hasOwnProperty(i)){let n=e[i];t.push(i+":"+("string"==typeof n?JSON.stringify(n):h(n)))}r=`{${t.join(", ")}}`}return`${i}${n?"("+n+")":""}[${r}]: ${t.replace(Ci,"\n ")}`}("\n"+t.message,r,i,n),t.ngTokenPath=r,t.ngTempTokenPath=null,t}(s,t,"R3InjectorError",this.source)}throw s}finally{Ei(n)}var r}_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(t=>this.get(t))}toString(){const t=[];return this.records.forEach((e,i)=>t.push(h(i))),`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}processInjectorType(t,e,i){if(!(t=f(t)))return!1;let n=C(t);const r=null==n&&t.ngModule||void 0,s=void 0===r?t:r,o=-1!==i.indexOf(s);if(void 0!==r&&(n=C(r)),null==n)return!1;if(null!=n.imports&&!o){let t;i.push(s);try{ci(n.imports,n=>{this.processInjectorType(n,e,i)&&(void 0===t&&(t=[]),t.push(n))})}finally{}if(void 0!==t)for(let e=0;e<t.length;e++){const{ngModule:i,providers:n}=t[e];ci(n,t=>this.processProvider(t,i,n||Ps))}}this.injectorDefTypes.add(s);const a=mt(s)||(()=>new s);this.records.set(s,Ls(a,Ds));const l=n.providers;if(null!=l&&!o){const e=t;ci(l,t=>this.processProvider(t,e,l))}return void 0!==r&&void 0!==t.providers}processProvider(t,e,i){let n=Bs(t=f(t))?t:f(t&&t.provide);const r=function(t,e,i){return Us(t)?Ls(void 0,t.useValue):Ls(Fs(t),Ds)}(t);if(Bs(t)||!0!==t.multi)this.records.get(n);else{let e=this.records.get(n);e||(e=Ls(void 0,Ds,!0),e.factory=()=>Oi(e.multi),this.records.set(n,e)),n=t,e.multi.push(t)}this.records.set(n,r)}hydrate(t,e){var i;return e.value===Ds&&(e.value=Is,e.value=e.factory()),"object"==typeof e.value&&e.value&&null!==(i=e.value)&&"object"==typeof i&&"function"==typeof i.ngOnDestroy&&this.onDestroy.add(e.value),e.value}injectableDefInScope(t){return!!t.providedIn&&("string"==typeof t.providedIn?"any"===t.providedIn||t.providedIn===this.scope:this.injectorDefTypes.has(t.providedIn))}}function Vs(t){const e=w(t),i=null!==e?e.factory:mt(t);if(null!==i)return i;if(t instanceof ri)throw new Error(`Token ${h(t)} is missing a \u0275prov definition.`);if(t instanceof Function)return function(t){const e=t.length;if(e>0){const i=di(e,"?");throw new Error(`Can't resolve all parameters for ${h(t)}: (${i.join(", ")}).`)}const i=function(t){const e=t&&(t[S]||t[E]);if(e){const i=function(t){if(t.hasOwnProperty("name"))return t.name;const e=(""+t).match(/^function\s*([^\s(]+)/);return null===e?"":e[1]}(t);return console.warn(`DEPRECATED: DI is instantiating a token "${i}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${i}" class.`),e}return null}(t);return null!==i?()=>i.factory(t):()=>new t}(t);throw new Error("unreachable")}function Fs(t,e,i){let n;if(Bs(t)){const e=f(t);return mt(e)||Vs(e)}if(Us(t))n=()=>f(t.useValue);else if((r=t)&&r.useFactory)n=()=>t.useFactory(...Oi(t.deps||[]));else if(function(t){return!(!t||!t.useExisting)}(t))n=()=>Ii(f(t.useExisting));else{const e=f(t&&(t.useClass||t.provide));if(!function(t){return!!t.deps}(t))return mt(e)||Vs(e);n=()=>new e(...Oi(t.deps))}var r;return n}function Ls(t,e,i=!1){return{factory:t,value:e,multi:i?[]:void 0}}function Us(t){return null!==t&&"object"==typeof t&&Si in t}function Bs(t){return"function"==typeof t}const Ns=function(t,e,i){return function(t,e=null,i=null,n){const r=Ts(t,e,i,n);return r._resolveInjectorDefTypes(),r}({name:i},e,t,i)};let js=(()=>{class t{static create(t,e){return Array.isArray(t)?Ns(t,e,""):Ns(t.providers,t.parent,t.name||"")}}return t.THROW_IF_NOT_FOUND=xi,t.NULL=new ks,t.\u0275prov=_({token:t,providedIn:"any",factory:()=>Ii(Ss)}),t.__NG_ELEMENT_ID__=-1,t})();function zs(t,e){ve(Tt(t)[1],Kt())}function Hs(t){let e=Object.getPrototypeOf(t.type.prototype).constructor,i=!0;const n=[t];for(;e;){let r;if(ft(t))r=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new Error("Directives cannot inherit Components");r=e.\u0275dir}if(r){if(i){n.push(r);const e=t;e.inputs=Ks(t.inputs),e.declaredInputs=Ks(t.declaredInputs),e.outputs=Ks(t.outputs);const i=r.hostBindings;i&&Ws(t,i);const s=r.viewQuery,o=r.contentQueries;if(s&&$s(t,s),o&&Gs(t,o),c(t.inputs,r.inputs),c(t.declaredInputs,r.declaredInputs),c(t.outputs,r.outputs),ft(r)&&r.data.animation){const e=t.data;e.animation=(e.animation||[]).concat(r.data.animation)}}const e=r.features;if(e)for(let n=0;n<e.length;n++){const r=e[n];r&&r.ngInherit&&r(t),r===Hs&&(i=!1)}}e=Object.getPrototypeOf(e)}!function(t){let e=0,i=null;for(let n=t.length-1;n>=0;n--){const r=t[n];r.hostVars=e+=r.hostVars,r.hostAttrs=Ie(r.hostAttrs,i=Ie(i,r.hostAttrs))}}(n)}function Ks(t){return t===j?{}:t===H?[]:t}function $s(t,e){const i=t.viewQuery;t.viewQuery=i?(t,n)=>{e(t,n),i(t,n)}:e}function Gs(t,e){const i=t.contentQueries;t.contentQueries=i?(t,n,r)=>{e(t,n,r),i(t,n,r)}:e}function Ws(t,e){const i=t.hostBindings;t.hostBindings=i?(t,n)=>{e(t,n),i(t,n)}:e}let Zs=null;function qs(){if(!Zs){const t=N.Symbol;if(t&&t.iterator)Zs=t.iterator;else{const t=Object.getOwnPropertyNames(Map.prototype);for(let e=0;e<t.length;++e){const i=t[e];"entries"!==i&&"size"!==i&&Map.prototype[i]===Map.prototype.entries&&(Zs=i)}}}return Zs}class Ys{constructor(t){this.wrapped=t}static wrap(t){return new Ys(t)}static unwrap(t){return Ys.isWrapped(t)?t.wrapped:t}static isWrapped(t){return t instanceof Ys}}function Qs(t){return!!Xs(t)&&(Array.isArray(t)||!(t instanceof Map)&&qs()in t)}function Xs(t){return null!==t&&("function"==typeof t||"object"==typeof t)}function Js(t,e,i){return t[e]=i}function to(t,e,i){return!Object.is(t[e],i)&&(t[e]=i,!0)}function eo(t,e,i,n){const r=to(t,e,i);return to(t,e+1,n)||r}function io(t,e,i,n,r){const s=eo(t,e,i,n);return to(t,e+2,r)||s}function no(t,e,i,n){const r=jt();return to(r,Jt(),e)&&(zt(),function(t,e,i,n,r,s){const o=It(t,e);!function(t,e,i,n,r,s,o){if(null==s)St(t)?t.removeAttribute(e,r,i):e.removeAttribute(r);else{const a=null==o?A(s):o(s,n||"",r);St(t)?t.setAttribute(e,r,a,i):i?e.setAttributeNS(i,r,a):e.setAttribute(r,a)}}(e[11],o,s,t.value,i,n,r)}(ge(),r,t,e,i,n)),no}function ro(t,e,i,n){return to(t,Jt(),i)?e+A(i)+n:Er}function so(t,e,i,n,r,s){const o=eo(t,Xt(),i,r);return te(2),o?e+A(i)+n+A(r)+s:Er}function oo(t,e,i,n,r,s,o,a){const l=jt(),c=zt(),h=t+20,u=c.firstCreatePass?function(t,e,i,n,r,s,o,a,l){const c=e.consts,h=Ur(e,t,4,o||null,Ft(c,a));Xr(e,i,h,Ft(c,l)),ve(e,h);const u=h.tViews=Zr(2,h,n,r,s,e.directiveRegistry,e.pipeRegistry,null,e.schemas,c);return null!==e.queries&&(e.queries.template(e,h),u.queries=e.queries.embeddedTView(h)),h}(h,c,l,e,i,n,r,s,o):c.data[h];Gt(u,!1);const d=l[11].createComment("");ar(c,l,d,u),Fn(d,l),ds(l,l[h]=ls(d,l,d,u)),pt(u)&&$r(c,l,u),null!=o&&Gr(l,u,a)}function ao(t){return Ot(Bt.lFrame.contextLView,20+t)}function lo(t){return t.length>1?" ("+function(t){const e=[];for(let i=0;i<t.length;++i){if(e.indexOf(t[i])>-1)return e.push(t[i]),e;e.push(t[i])}return e}(t.slice().reverse()).map(t=>h(t.token)).join(" -> ")+")":""}function co(t,e,i,n){const r=[e],s=i(r),o=n?function(t,e){const i=`${t} caused by: ${e instanceof Error?e.message:e}`,n=Error(i);return n.ngOriginalError=e,n}(s,n):Error(s);return o.addKey=ho,o.keys=r,o.injectors=[t],o.constructResolvingMessage=i,o.ngOriginalError=n,o}function ho(t,e){this.injectors.push(t),this.keys.push(e),this.message=this.constructResolvingMessage(this.keys)}function uo(t,e){const i=[];for(let n=0,r=e.length;n<r;n++){const t=e[n];i.push(t&&0!=t.length?t.map(h).join(" "):"?")}return Error("Cannot resolve all parameters for '"+h(t)+"'("+i.join(", ")+"). Make sure that all the parameters are decorated with Inject or have valid type annotations and that '"+h(t)+"' is decorated with Injectable.")}class po{constructor(t,e){if(this.token=t,this.id=e,!t)throw new Error("Token must be defined!");this.displayName=h(this.token)}static get(t){return mo.get(f(t))}static get numberOfKeys(){return mo.numberOfKeys}}class fo{constructor(){this._allKeys=new Map}get(t){if(t instanceof po)return t;if(this._allKeys.has(t))return this._allKeys.get(t);const e=new po(t,po.numberOfKeys);return this._allKeys.set(t,e),e}get numberOfKeys(){return this._allKeys.size}}const mo=new fo;class go{constructor(t){this.reflectionCapabilities=t}updateCapabilities(t){this.reflectionCapabilities=t}factory(t){return this.reflectionCapabilities.factory(t)}parameters(t){return this.reflectionCapabilities.parameters(t)}annotations(t){return this.reflectionCapabilities.annotations(t)}propMetadata(t){return this.reflectionCapabilities.propMetadata(t)}hasLifecycleHook(t,e){return this.reflectionCapabilities.hasLifecycleHook(t,e)}getter(t){return this.reflectionCapabilities.getter(t)}setter(t){return this.reflectionCapabilities.setter(t)}method(t){return this.reflectionCapabilities.method(t)}importUri(t){return this.reflectionCapabilities.importUri(t)}resourceUri(t){return this.reflectionCapabilities.resourceUri(t)}resolveIdentifier(t,e,i,n){return this.reflectionCapabilities.resolveIdentifier(t,e,i,n)}resolveEnum(t,e){return this.reflectionCapabilities.resolveEnum(t,e)}}const Ao=new go(new _i);class bo{constructor(t,e,i){this.key=t,this.optional=e,this.visibility=i}static fromKey(t){return new bo(t,!1,null)}}const vo=[];class _o{constructor(t,e,i){this.key=t,this.resolvedFactories=e,this.multiProvider=i,this.resolvedFactory=this.resolvedFactories[0]}}class yo{constructor(t,e){this.factory=t,this.dependencies=e}}function wo(t){let e,i;if(t.useClass){const n=f(t.useClass);e=Ao.factory(n),i=ko(n)}else t.useExisting?(e=t=>t,i=[bo.fromKey(po.get(t.useExisting))]):t.useFactory?(e=t.useFactory,i=function(t,e){if(e){const i=e.map(t=>[t]);return e.map(e=>Eo(t,e,i))}return ko(t)}(t.useFactory,t.deps)):(e=()=>t.useValue,i=vo);return new yo(e,i)}function xo(t){return new _o(po.get(t.provide),[wo(t)],t.multi||!1)}function Co(t){const e=function(t,e){for(let i=0;i<t.length;i++){const n=t[i],r=e.get(n.key.id);if(r){if(n.multiProvider!==r.multiProvider)throw Error(`Cannot mix multi providers and regular providers, got: ${r} ${n}`);if(n.multiProvider)for(let t=0;t<n.resolvedFactories.length;t++)r.resolvedFactories.push(n.resolvedFactories[t]);else e.set(n.key.id,n)}else{let t;t=n.multiProvider?new _o(n.key,n.resolvedFactories.slice(),n.multiProvider):n,e.set(n.key.id,t)}}return e}(So(t,[]).map(xo),new Map);return Array.from(e.values())}function So(t,e){return t.forEach(t=>{if(t instanceof oi)e.push({provide:t,useClass:t});else if(t&&"object"==typeof t&&void 0!==t.provide)e.push(t);else{if(!Array.isArray(t))throw Error(`Invalid provider - only instances of Provider and Type are allowed, got: ${t}`);So(t,e)}}),e}function ko(t){const e=Ao.parameters(t);if(!e)return[];if(e.some(t=>null==t))throw uo(t,e);return e.map(i=>Eo(t,i,e))}function Eo(t,e,i){let n=null,r=!1;if(!Array.isArray(e))return Do(e instanceof Ti?e.token:e,r,null);let s=null;for(let o=0;o<e.length;++o){const t=e[o];t instanceof oi?n=t:t instanceof Ti?n=t.token:t instanceof Ri?r=!0:t instanceof Vi||t instanceof Fi?s=t:t instanceof ri&&(n=t)}if(n=f(n),null!=n)return Do(n,r,s);throw uo(t,i)}function Do(t,e,i){return new bo(po.get(t),e,i)}const Io={};class Po{static resolve(t){return Co(t)}static resolveAndCreate(t,e){const i=Po.resolve(t);return Po.fromResolvedProviders(i,e)}static fromResolvedProviders(t,e){return new Oo(t,e)}}let Oo=(()=>{class t{constructor(t,e){this._constructionCounter=0,this._providers=t,this.parent=e||null;const i=t.length;this.keyIds=[],this.objs=[];for(let n=0;n<i;n++)this.keyIds[n]=t[n].key.id,this.objs[n]=Io}get(t,e=xi){return this._getByKey(po.get(t),null,e)}resolveAndCreateChild(t){const e=Po.resolve(t);return this.createChildFromResolved(e)}createChildFromResolved(e){const i=new t(e);return i.parent=this,i}resolveAndInstantiate(t){return this.instantiateResolved(Po.resolve([t])[0])}instantiateResolved(t){return this._instantiateProvider(t)}getProviderAtIndex(t){if(t<0||t>=this._providers.length)throw function(t){return Error(`Index ${t} is out-of-bounds.`)}(t);return this._providers[t]}_new(t){if(this._constructionCounter++>this._getMaxNumberOfObjects())throw co(this,t.key,function(t){return`Cannot instantiate cyclic dependency!${lo(t)}`});return this._instantiateProvider(t)}_getMaxNumberOfObjects(){return this.objs.length}_instantiateProvider(t){if(t.multiProvider){const e=[];for(let i=0;i<t.resolvedFactories.length;++i)e[i]=this._instantiate(t,t.resolvedFactories[i]);return e}return this._instantiate(t,t.resolvedFactories[0])}_instantiate(t,e){const i=e.factory;let n,r;try{n=e.dependencies.map(t=>this._getByReflectiveDependency(t))}catch(o){throw o.addKey&&o.addKey(this,t.key),o}try{r=i(...n)}catch(o){throw co(this,t.key,function(t){const e=h(t[0].token);return`${s.message}: Error during instantiation of ${e}!${lo(t)}.`},s=o)}var s;return r}_getByReflectiveDependency(t){return this._getByKey(t.key,t.visibility,t.optional?null:xi)}_getByKey(e,i,n){return e===t.INJECTOR_KEY?this:i instanceof Vi?this._getByKeySelf(e,n):this._getByKeyDefault(e,n,i)}_getObjByKeyId(t){for(let e=0;e<this.keyIds.length;e++)if(this.keyIds[e]===t)return this.objs[e]===Io&&(this.objs[e]=this._new(this._providers[e])),this.objs[e];return Io}_throwOrNull(t,e){if(e!==xi)return e;throw function(t,e){return co(t,e,function(t){return`No provider for ${h(t[0].token)}!${lo(t)}`})}(this,t)}_getByKeySelf(t,e){const i=this._getObjByKeyId(t.id);return i!==Io?i:this._throwOrNull(t,e)}_getByKeyDefault(e,i,n){let r;for(r=n instanceof Fi?this.parent:this;r instanceof t;){const t=r,i=t._getObjByKeyId(e.id);if(i!==Io)return i;r=t.parent}return null!==r?r.get(e.token,i):this._throwOrNull(e,i)}get displayName(){return`ReflectiveInjector(providers: [${function(t,e){const i=[];for(let n=0;n<t._providers.length;++n)i[n]=' "'+t.getProviderAtIndex(n).key.displayName+'" ';return i}(this).join(", ")}])`}toString(){return this.displayName}}return t.INJECTOR_KEY=po.get(js),t})();function Mo(t,e=I.Default){const i=jt();return null===i?Ii(t,e):Ke(Kt(),i,f(t),e)}function To(t,e,i){const n=jt();return to(n,Jt(),e)&&Qr(zt(),ge(),n,t,e,n[11],i,!1),To}function Ro(t,e,i,n,r){const s=r?"class":"style";ws(t,i,e.inputs[s],s,n)}function Vo(t,e,i,n){const r=jt(),s=zt(),o=20+t,a=r[11],l=r[o]=qn(a,e,Bt.lFrame.currentNamespace),c=s.firstCreatePass?function(t,e,i,n,r,s,o){const a=e.consts,l=Ur(e,t,2,r,Ft(a,s));return Xr(e,i,l,Ft(a,o)),null!==l.attrs&&Cs(l,l.attrs,!1),null!==l.mergedAttrs&&Cs(l,l.mergedAttrs,!0),null!==e.queries&&e.queries.elementStart(e,l),l}(o,s,r,0,e,i,n):s.data[o];Gt(c,!0);const h=c.mergedAttrs;null!==h&&ke(a,l,h);const u=c.classes;null!==u&&mr(a,l,u);const d=c.styles;null!==d&&fr(a,l,d),64!=(64&c.flags)&&ar(s,r,l,c),0===Bt.lFrame.elementDepthCount&&Fn(l,r),Bt.lFrame.elementDepthCount++,pt(c)&&($r(s,r,c),Kr(s,c,r)),null!==n&&Gr(r,c)}function Fo(){let t=Kt();Wt()?Zt():(t=t.parent,Gt(t,!1));const e=t;Bt.lFrame.elementDepthCount--;const i=zt();i.firstCreatePass&&(ve(i,t),ut(t)&&i.queries.elementEnd(t)),null!=e.classesWithoutHost&&function(t){return 0!=(16&t.flags)}(e)&&Ro(i,e,jt(),e.classesWithoutHost,!0),null!=e.stylesWithoutHost&&function(t){return 0!=(32&t.flags)}(e)&&Ro(i,e,jt(),e.stylesWithoutHost,!1)}function Lo(t,e,i,n){Vo(t,e,i,n),Fo()}function Uo(t,e,i){const n=jt(),r=zt(),s=t+20,o=r.firstCreatePass?function(t,e,i,n,r){const s=e.consts,o=Ft(s,n),a=Ur(e,t,8,"ng-container",o);return null!==o&&Cs(a,o,!0),Xr(e,i,a,Ft(s,r)),null!==e.queries&&e.queries.elementStart(e,a),a}(s,r,n,e,i):r.data[s];Gt(o,!0);const a=n[s]=n[11].createComment("");ar(r,n,a,o),Fn(a,n),pt(o)&&($r(r,n,o),Kr(r,o,n)),null!=i&&Gr(n,o)}function Bo(){let t=Kt();const e=zt();Wt()?Zt():(t=t.parent,Gt(t,!1)),e.firstCreatePass&&(ve(e,t),ut(t)&&e.queries.elementEnd(t))}function No(t,e,i){Uo(t,e,i),Bo()}function jo(){return jt()}function zo(t){return!!t&&"function"==typeof t.then}function Ho(t){return!!t&&"function"==typeof t.subscribe}const Ko=Ho;function $o(t,e,i=!1,n){const r=jt(),s=zt(),o=Kt();return Wo(s,r,r[11],o,t,e,i,n),$o}function Go(t,e,i=!1,n){const r=Kt(),s=jt(),o=zt();return Wo(o,s,_s(ne(o.data),r,s),r,t,e,i,n),Go}function Wo(t,e,i,n,r,s,o=!1,a){const l=pt(n),c=t.firstCreatePass&&vs(t),h=bs(e);let u=!0;if(3&n.type){const d=It(n,e),p=a?a(d):j,f=p.target||d,m=h.length,g=a?t=>a(Et(t[n.index])).target:n.index;if(St(i)){let o=null;if(!a&&l&&(o=function(t,e,i,n){const r=t.cleanup;if(null!=r)for(let s=0;s<r.length-1;s+=2){const t=r[s];if(t===i&&r[s+1]===n){const t=e[7],i=r[s+2];return t.length>i?t[i]:null}"string"==typeof t&&(s+=2)}return null}(t,e,r,n.index)),null!==o)(o.__ngLastListenerFn__||o).__ngNextListenerFn__=s,o.__ngLastListenerFn__=s,u=!1;else{s=qo(n,e,s,!1);const t=i.listen(p.name||f,r,s);h.push(s,t),c&&c.push(r,g,m,m+1)}}else s=qo(n,e,s,!0),f.addEventListener(r,s,o),h.push(s),c&&c.push(r,g,m,o)}else s=qo(n,e,s,!1);const d=n.outputs;let p;if(u&&null!==d&&(p=d[r])){const t=p.length;if(t)for(let i=0;i<t;i+=2){const t=e[p[i]][p[i+1]].subscribe(s),o=h.length;h.push(s,t),c&&c.push(r,n.index,o,-(o+1))}}}function Zo(t,e,i){try{return!1!==e(i)}catch(n){return ys(t,n),!1}}function qo(t,e,i,n){return function r(s){if(s===Function)return i;const o=2&t.flags?Mt(t.index,e):e;0==(32&e[2])&&ps(o);let a=Zo(e,i,s),l=r.__ngNextListenerFn__;for(;l;)a=Zo(e,l,s)&&a,l=l.__ngNextListenerFn__;return n&&!1===a&&(s.preventDefault(),s.returnValue=!1),a}}function Yo(t=1){return function(t){return(Bt.lFrame.contextLView=function(t,e){for(;t>0;)e=e[15],t--;return e}(t,Bt.lFrame.contextLView))[8]}(t)}function Qo(t,e){let i=null;const n=function(t){const e=t.attrs;if(null!=e){const t=e.indexOf(5);if(0==(1&t))return e[t+1]}return null}(t);for(let r=0;r<e.length;r++){const s=e[r];if("*"!==s){if(null===n?xr(t,s,!0):Cr(n,s))return r}else i=r}return i}function Xo(t){const e=jt()[16][6];if(!e.projection){const i=e.projection=di(t?t.length:1,null),n=i.slice();let r=e.child;for(;null!==r;){const e=t?Qo(r,t):0;null!==e&&(n[e]?n[e].projectionNext=r:i[e]=r,n[e]=r),r=r.next}}}function Jo(t,e=0,i){const n=jt(),r=zt(),s=Ur(r,20+t,16,null,i||null);null===s.projection&&(s.projection=e),Zt(),64!=(64&s.flags)&&function(t,e,i){pr(e[11],0,e,i,tr(t,i,e),sr(i.parent||e[6],i,e))}(r,n,s)}function ta(t,e,i){return ea(t,"",e,"",i),ta}function ea(t,e,i,n,r){const s=jt(),o=ro(s,e,i,n);return o!==Er&&Qr(zt(),ge(),s,t,o,s[11],r,!1),ea}function ia(t,e,i,n,r,s,o){const a=jt(),l=so(a,e,i,n,r,s);return l!==Er&&Qr(zt(),ge(),a,t,l,a[11],o,!1),ia}function na(t,e,i,n,r){const s=t[i+1],o=null===e;let a=n?Or(s):Tr(s),l=!1;for(;0!==a&&(!1===l||o);){const i=t[a+1];ra(t[a],e)&&(l=!0,t[a+1]=n?Vr(i):Mr(i)),a=n?Or(i):Tr(i)}l&&(t[i+1]=n?Mr(s):Vr(s))}function ra(t,e){return null===t||null==e||(Array.isArray(t)?t[1]:t)===e||!(!Array.isArray(t)||"string"!=typeof e)&&mi(t,e)>=0}const sa={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function oa(t){return t.substring(sa.key,sa.keyEnd)}function aa(t,e){const i=sa.textEnd;return i===e?-1:(e=sa.keyEnd=function(t,e,i){for(;e<i&&t.charCodeAt(e)>32;)e++;return e}(t,sa.key=e,i),la(t,e,i))}function la(t,e,i){for(;e<i&&t.charCodeAt(e)<=32;)e++;return e}function ca(t,e,i){return pa(t,e,i,!1),ca}function ha(t,e){return pa(t,e,null,!0),ha}function ua(t){fa(pi,da,t,!0)}function da(t,e){for(let i=function(t){return function(t){sa.key=0,sa.keyEnd=0,sa.value=0,sa.valueEnd=0,sa.textEnd=t.length}(t),aa(t,la(t,0,sa.textEnd))}(e);i>=0;i=aa(e,i))pi(t,oa(e),!0)}function pa(t,e,i,n){const r=jt(),s=zt(),o=te(2);s.firstUpdatePass&&ga(s,t,o,n),e!==Er&&to(r,o,e)&&va(s,s.data[fe()],r,r[11],t,r[o+1]=function(t,e){return null==t||("string"==typeof e?t+=e:"object"==typeof t&&(t=h(qi(t)))),t}(e,i),n,o)}function fa(t,e,i,n){const r=zt(),s=te(2);r.firstUpdatePass&&ga(r,null,s,n);const o=jt();if(i!==Er&&to(o,s,i)){const a=r.data[fe()];if(wa(a,n)&&!ma(r,s)){let t=n?a.classesWithoutHost:a.stylesWithoutHost;null!==t&&(i=u(t,i||"")),Ro(r,a,o,i,n)}else!function(t,e,i,n,r,s,o,a){r===Er&&(r=z);let l=0,c=0,h=0<r.length?r[0]:null,u=0<s.length?s[0]:null;for(;null!==h||null!==u;){const d=l<r.length?r[l+1]:void 0,p=c<s.length?s[c+1]:void 0;let f,m=null;h===u?(l+=2,c+=2,d!==p&&(m=u,f=p)):null===u||null!==h&&h<u?(l+=2,m=h):(c+=2,m=u,f=p),null!==m&&va(t,e,i,n,m,f,o,a),h=l<r.length?r[l]:null,u=c<s.length?s[c]:null}}(r,a,o,o[11],o[s+1],o[s+1]=function(t,e,i){if(null==i||""===i)return z;const n=[],r=qi(i);if(Array.isArray(r))for(let s=0;s<r.length;s++)t(n,r[s],!0);else if("object"==typeof r)for(const s in r)r.hasOwnProperty(s)&&t(n,s,r[s]);else"string"==typeof r&&e(n,r);return n}(t,e,i),n,s)}}function ma(t,e){return e>=t.expandoStartIndex}function ga(t,e,i,n){const r=t.data;if(null===r[i+1]){const s=r[fe()],o=ma(t,i);wa(s,n)&&null===e&&!o&&(e=!1),e=function(t,e,i,n){const r=ne(t);let s=n?e.residualClasses:e.residualStyles;if(null===r)0===(n?e.classBindings:e.styleBindings)&&(i=ba(i=Aa(null,t,e,i,n),e.attrs,n),s=null);else{const o=e.directiveStylingLast;if(-1===o||t[o]!==r)if(i=Aa(r,t,e,i,n),null===s){let i=function(t,e,i){const n=i?e.classBindings:e.styleBindings;if(0!==Tr(n))return t[Or(n)]}(t,e,n);void 0!==i&&Array.isArray(i)&&(i=Aa(null,t,e,i[1],n),i=ba(i,e.attrs,n),function(t,e,i,n){t[Or(i?e.classBindings:e.styleBindings)]=n}(t,e,n,i))}else s=function(t,e,i){let n;const r=e.directiveEnd;for(let s=1+e.directiveStylingLast;s<r;s++)n=ba(n,t[s].hostAttrs,i);return ba(n,e.attrs,i)}(t,e,n)}return void 0!==s&&(n?e.residualClasses=s:e.residualStyles=s),i}(r,s,e,n),function(t,e,i,n,r,s){let o=s?e.classBindings:e.styleBindings,a=Or(o),l=Tr(o);t[n]=i;let c,h=!1;if(Array.isArray(i)){const t=i;c=t[1],(null===c||mi(t,c)>0)&&(h=!0)}else c=i;if(r)if(0!==l){const e=Or(t[a+1]);t[n+1]=Pr(e,a),0!==e&&(t[e+1]=Rr(t[e+1],n)),t[a+1]=131071&t[a+1]|n<<17}else t[n+1]=Pr(a,0),0!==a&&(t[a+1]=Rr(t[a+1],n)),a=n;else t[n+1]=Pr(l,0),0===a?a=n:t[l+1]=Rr(t[l+1],n),l=n;h&&(t[n+1]=Mr(t[n+1])),na(t,c,n,!0),na(t,c,n,!1),function(t,e,i,n,r){const s=r?t.residualClasses:t.residualStyles;null!=s&&"string"==typeof e&&mi(s,e)>=0&&(i[n+1]=Vr(i[n+1]))}(e,c,t,n,s),o=Pr(a,l),s?e.classBindings=o:e.styleBindings=o}(r,s,e,i,o,n)}}function Aa(t,e,i,n,r){let s=null;const o=i.directiveEnd;let a=i.directiveStylingLast;for(-1===a?a=i.directiveStart:a++;a<o&&(s=e[a],n=ba(n,s.hostAttrs,r),s!==t);)a++;return null!==t&&(i.directiveStylingLast=a),n}function ba(t,e,i){const n=i?1:2;let r=-1;if(null!==e)for(let s=0;s<e.length;s++){const o=e[s];"number"==typeof o?r=o:r===n&&(Array.isArray(t)||(t=void 0===t?[]:["",t]),pi(t,o,!!i||e[++s]))}return void 0===t?null:t}function va(t,e,i,n,r,s,o,a){if(!(3&e.type))return;const l=t.data,c=l[a+1];ya(1==(1&c)?_a(l,e,i,r,Tr(c),o):void 0)||(ya(s)||2==(2&c)&&(s=_a(l,null,i,r,a,o)),function(t,e,i,n,r){const s=St(t);if(e)r?s?t.addClass(i,n):i.classList.add(n):s?t.removeClass(i,n):i.classList.remove(n);else{let e=-1===n.indexOf("-")?void 0:zn.DashCase;if(null==r)s?t.removeStyle(i,n,e):i.style.removeProperty(n);else{const o="string"==typeof r&&r.endsWith("!important");o&&(r=r.slice(0,-10),e|=zn.Important),s?t.setStyle(i,n,r,e):i.style.setProperty(n,r,o?"important":"")}}}(n,o,Dt(fe(),i),r,s))}function _a(t,e,i,n,r,s){const o=null===e;let a;for(;r>0;){const e=t[r],s=Array.isArray(e),l=s?e[1]:e,c=null===l;let h=i[r+1];h===Er&&(h=c?z:void 0);let u=c?fi(h,n):l===n?h:void 0;if(s&&!ya(u)&&(u=fi(e,n)),ya(u)&&(a=u,o))return a;const d=t[r+1];r=o?Or(d):Tr(d)}if(null!==e){let t=s?e.residualClasses:e.residualStyles;null!=t&&(a=fi(t,n))}return a}function ya(t){return void 0!==t}function wa(t,e){return 0!=(t.flags&(e?16:32))}function xa(t,e=""){const i=jt(),n=zt(),r=t+20,s=n.firstCreatePass?Ur(n,r,1,e,null):n.data[r],o=i[r]=function(t,e){return St(t)?t.createText(e):t.createTextNode(e)}(i[11],e);ar(n,i,o,s),Gt(s,!1)}function Ca(t){return Sa("",t,""),Ca}function Sa(t,e,i){const n=jt(),r=ro(n,t,e,i);return r!==Er&&xs(n,fe(),r),Sa}function ka(t,e,i,n,r){const s=jt(),o=so(s,t,e,i,n,r);return o!==Er&&xs(s,fe(),o),ka}function Ea(t,e,i,n,r,s,o){const a=jt(),l=function(t,e,i,n,r,s,o,a){const l=io(t,Xt(),i,r,o);return te(3),l?e+A(i)+n+A(r)+s+A(o)+a:Er}(a,t,e,i,n,r,s,o);return l!==Er&&xs(a,fe(),l),Ea}function Da(t,e,i){fa(pi,da,ro(jt(),t,e,i),!0)}function Ia(t,e,i){const n=jt();return to(n,Jt(),e)&&Qr(zt(),ge(),n,t,e,n[11],i,!0),Ia}function Pa(t,e,i){const n=jt();if(to(n,Jt(),e)){const r=zt(),s=ge();Qr(r,s,n,t,e,_s(ne(r.data),s,n),i,!0)}return Pa}const Oa=void 0;var Ma=["en",[["a","p"],["AM","PM"],Oa],[["AM","PM"],Oa,Oa],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Oa,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Oa,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",Oa,"{1} 'at' {0}",Oa],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(t){let e=Math.floor(Math.abs(t)),i=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===i?1:5}];let Ta={};function Ra(t,e,i){"string"!=typeof e&&(i=e,e=t[Ba.LocaleId]),e=e.toLowerCase().replace(/_/g,"-"),Ta[e]=t,i&&(Ta[e][Ba.ExtraData]=i)}function Va(t){const e=function(t){return t.toLowerCase().replace(/_/g,"-")}(t);let i=Ua(e);if(i)return i;const n=e.split("-")[0];if(i=Ua(n),i)return i;if("en"===n)return Ma;throw new Error(`Missing locale data for the locale "${t}".`)}function Fa(t){return Va(t)[Ba.CurrencyCode]||null}function La(t){return Va(t)[Ba.PluralCase]}function Ua(t){return t in Ta||(Ta[t]=N.ng&&N.ng.common&&N.ng.common.locales&&N.ng.common.locales[t]),Ta[t]}var Ba=function(t){return t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData",t}({});let Na="en-US";function ja(t){var e,i;i="Expected localeId to be defined",null==(e=t)&&function(t,e,i,n){throw new Error(`ASSERTION ERROR: ${t} [Expected=> null != ${e} <=Actual]`)}(i,e),"string"==typeof t&&(Na=t.toLowerCase().replace(/_/g,"-"))}function za(t,e,i,n,r){if(t=f(t),Array.isArray(t))for(let s=0;s<t.length;s++)za(t[s],e,i,n,r);else{const s=zt(),o=jt();let a=Bs(t)?t:f(t.provide),l=Fs(t);const c=Kt(),h=1048575&c.providerIndexes,u=c.directiveStart,d=c.providerIndexes>>20;if(Bs(t)||!t.multi){const n=new Se(l,r,Mo),p=$a(a,e,r?h:h+d,u);-1===p?(je(Le(c,o),s,a),Ha(s,t,e.length),e.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),i.push(n),o.push(n)):(i[p]=n,o[p]=n)}else{const p=$a(a,e,h+d,u),f=$a(a,e,h,h+d),m=p>=0&&i[p],g=f>=0&&i[f];if(r&&!g||!r&&!m){je(Le(c,o),s,a);const h=function(t,e,i,n,r){const s=new Se(t,i,Mo);return s.multi=[],s.index=e,s.componentProviders=0,Ka(s,r,n&&!i),s}(r?Wa:Ga,i.length,r,n,l);!r&&g&&(i[f].providerFactory=h),Ha(s,t,e.length,0),e.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),i.push(h),o.push(h)}else Ha(s,t,p>-1?p:f,Ka(i[r?f:p],l,!r&&n));!r&&n&&g&&i[f].componentProviders++}}}function Ha(t,e,i,n){const r=Bs(e);if(r||e.useClass){const s=(e.useClass||e).prototype.ngOnDestroy;if(s){const o=t.destroyHooks||(t.destroyHooks=[]);if(!r&&e.multi){const t=o.indexOf(i);-1===t?o.push(i,[n,s]):o[t+1].push(n,s)}else o.push(i,s)}}}function Ka(t,e,i){return i&&t.componentProviders++,t.multi.push(e)-1}function $a(t,e,i,n){for(let r=i;r<n;r++)if(e[r]===t)return r;return-1}function Ga(t,e,i,n){return Za(this.multi,[])}function Wa(t,e,i,n){const r=this.multi;let s;if(this.providerFactory){const t=this.providerFactory.componentProviders,e=qe(i,i[1],this.providerFactory.index,n);s=e.slice(0,t),Za(r,s);for(let i=t;i<e.length;i++)s.push(e[i])}else s=[],Za(r,s);return s}function Za(t,e){for(let i=0;i<t.length;i++)e.push((0,t[i])());return e}function qa(t,e=[]){return i=>{i.providersResolver=(i,n)=>function(t,e,i){const n=zt();if(n.firstCreatePass){const r=ft(t);za(i,n.data,n.blueprint,r,!0),za(e,n.data,n.blueprint,r,!1)}}(i,n?n(t):t,e)}}class Ya{}class Qa{resolveComponentFactory(t){throw function(t){const e=Error(`No component factory found for ${h(t)}. Did you add it to @NgModule.entryComponents?`);return e.ngComponent=t,e}(t)}}let Xa=(()=>{class t{}return t.NULL=new Qa,t})();function Ja(...t){}function tl(t,e){return new il(It(t,e))}const el=function(){return tl(Kt(),jt())};let il=(()=>{class t{constructor(t){this.nativeElement=t}}return t.__NG_ELEMENT_ID__=el,t})();function nl(t){return t instanceof il?t.nativeElement:t}class rl{}let sl=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>ol(),t})();const ol=function(){const t=jt(),e=Mt(Kt().index,t);return function(t){return t[11]}(ct(e)?e:t)};let al=(()=>{class t{}return t.\u0275prov=_({token:t,providedIn:"root",factory:()=>null}),t})();class ll{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const cl=new ll("11.2.6");class hl{constructor(){}supports(t){return Qs(t)}create(t){return new dl(t)}}const ul=(t,e)=>e;class dl{constructor(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||ul}forEachItem(t){let e;for(e=this._itHead;null!==e;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,i=this._removalsHead,n=0,r=null;for(;e||i;){const s=!i||e&&e.currentIndex<gl(i,n,r)?e:i,o=gl(s,n,r),a=s.currentIndex;if(s===i)n--,i=i._nextRemoved;else if(e=e._next,null==s.previousIndex)n++;else{r||(r=[]);const t=o-n,e=a-n;if(t!=e){for(let i=0;i<t;i++){const n=i<r.length?r[i]:r[i]=0,s=n+i;e<=s&&s<t&&(r[i]=n+1)}r[s.previousIndex]=e-t}}o!==a&&t(s,o,a)}}forEachPreviousItem(t){let e;for(e=this._previousItHead;null!==e;e=e._nextPrevious)t(e)}forEachAddedItem(t){let e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)}forEachMovedItem(t){let e;for(e=this._movesHead;null!==e;e=e._nextMoved)t(e)}forEachRemovedItem(t){let e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)}forEachIdentityChange(t){let e;for(e=this._identityChangesHead;null!==e;e=e._nextIdentityChange)t(e)}diff(t){if(null==t&&(t=[]),!Qs(t))throw new Error(`Error trying to diff '${h(t)}'. Only arrays and iterables are allowed`);return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let e,i,n,r=this._itHead,s=!1;if(Array.isArray(t)){this.length=t.length;for(let e=0;e<this.length;e++)i=t[e],n=this._trackByFn(e,i),null!==r&&Object.is(r.trackById,n)?(s&&(r=this._verifyReinsertion(r,i,n,e)),Object.is(r.item,i)||this._addIdentityChange(r,i)):(r=this._mismatch(r,i,n,e),s=!0),r=r._next}else e=0,function(t,e){if(Array.isArray(t))for(let i=0;i<t.length;i++)e(t[i]);else{const i=t[qs()]();let n;for(;!(n=i.next()).done;)e(n.value)}}(t,t=>{n=this._trackByFn(e,t),null!==r&&Object.is(r.trackById,n)?(s&&(r=this._verifyReinsertion(r,t,n,e)),Object.is(r.item,t)||this._addIdentityChange(r,t)):(r=this._mismatch(r,t,n,e),s=!0),r=r._next,e++}),this.length=e;return this._truncate(r),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,e,i,n){let r;return null===t?r=this._itTail:(r=t._prev,this._remove(t)),null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,r,n)):null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(i,n))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,r,n)):t=this._addAfter(new pl(e,i),r,n),t}_verifyReinsertion(t,e,i,n){let r=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==r?t=this._reinsertAfter(r,t._prev,n):t.currentIndex!=n&&(t.currentIndex=n,this._addToMoves(t,n)),t}_truncate(t){for(;null!==t;){const e=t._next;this._addToRemovals(this._unlink(t)),t=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(t,e,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const n=t._prevRemoved,r=t._nextRemoved;return null===n?this._removalsHead=r:n._nextRemoved=r,null===r?this._removalsTail=n:r._prevRemoved=n,this._insertAfter(t,e,i),this._addToMoves(t,i),t}_moveAfter(t,e,i){return this._unlink(t),this._insertAfter(t,e,i),this._addToMoves(t,i),t}_addAfter(t,e,i){return this._insertAfter(t,e,i),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,e,i){const n=null===e?this._itHead:e._next;return t._next=n,t._prev=e,null===n?this._itTail=t:n._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new ml),this._linkedRecords.put(t),t.currentIndex=i,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const e=t._prev,i=t._next;return null===e?this._itHead=i:e._next=i,null===i?this._itTail=e:i._prev=e,t}_addToMoves(t,e){return t.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new ml),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,e){return t.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}}class pl{constructor(t,e){this.item=t,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class fl{constructor(){this._head=null,this._tail=null}add(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,e){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===e||e<=i.currentIndex)&&Object.is(i.trackById,t))return i;return null}remove(t){const e=t._prevDup,i=t._nextDup;return null===e?this._head=i:e._nextDup=i,null===i?this._tail=e:i._prevDup=e,null===this._head}}class ml{constructor(){this.map=new Map}put(t){const e=t.trackById;let i=this.map.get(e);i||(i=new fl,this.map.set(e,i)),i.add(t)}get(t,e){const i=this.map.get(t);return i?i.get(t,e):null}remove(t){const e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function gl(t,e,i){const n=t.previousIndex;if(null===n)return n;let r=0;return i&&n<i.length&&(r=i[n]),n+e+r}class Al{constructor(){}supports(t){return t instanceof Map||Xs(t)}create(){return new bl}}class bl{constructor(){this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}get isDirty(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead}forEachItem(t){let e;for(e=this._mapHead;null!==e;e=e._next)t(e)}forEachPreviousItem(t){let e;for(e=this._previousMapHead;null!==e;e=e._nextPrevious)t(e)}forEachChangedItem(t){let e;for(e=this._changesHead;null!==e;e=e._nextChanged)t(e)}forEachAddedItem(t){let e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)}forEachRemovedItem(t){let e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)}diff(t){if(t){if(!(t instanceof Map||Xs(t)))throw new Error(`Error trying to diff '${h(t)}'. Only maps and objects are allowed`)}else t=new Map;return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let e=this._mapHead;if(this._appendAfter=null,this._forEach(t,(t,i)=>{if(e&&e.key===i)this._maybeAddToChanges(e,t),this._appendAfter=e,e=e._next;else{const n=this._getOrCreateRecordForKey(i,t);e=this._insertBeforeOrAppend(e,n)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let t=e;null!==t;t=t._nextRemoved)t===this._mapHead&&(this._mapHead=null),this._records.delete(t.key),t._nextRemoved=t._next,t.previousValue=t.currentValue,t.currentValue=null,t._prev=null,t._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,e){if(t){const i=t._prev;return e._next=t,e._prev=i,t._prev=e,i&&(i._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(t,e){if(this._records.has(t)){const i=this._records.get(t);this._maybeAddToChanges(i,e);const n=i._prev,r=i._next;return n&&(n._next=r),r&&(r._prev=n),i._next=null,i._prev=null,i}const i=new vl(t);return this._records.set(t,i),i.currentValue=e,this._addToAdditions(i),i}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,e){Object.is(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))}_addToAdditions(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(i=>e(t[i],i))}}class vl{constructor(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function _l(){return new yl([new hl])}let yl=(()=>{class t{constructor(t){this.factories=t}static create(e,i){if(null!=i){const t=i.factories.slice();e=e.concat(t)}return new t(e)}static extend(e){return{provide:t,useFactory:i=>t.create(e,i||_l()),deps:[[t,new Fi,new Ri]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(null!=e)return e;throw new Error(`Cannot find a differ supporting object '${t}' of type '${i=t,i.name||typeof i}'`);var i}}return t.\u0275prov=_({token:t,providedIn:"root",factory:_l}),t})();function wl(){return new xl([new Al])}let xl=(()=>{class t{constructor(t){this.factories=t}static create(e,i){if(i){const t=i.factories.slice();e=e.concat(t)}return new t(e)}static extend(e){return{provide:t,useFactory:i=>t.create(e,i||wl()),deps:[[t,new Fi,new Ri]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(e)return e;throw new Error(`Cannot find a differ supporting object '${t}'`)}}return t.\u0275prov=_({token:t,providedIn:"root",factory:wl}),t})();function Cl(t,e,i,n,r=!1){for(;null!==i;){const s=e[i.index];if(null!==s&&n.push(Et(s)),ht(s))for(let t=10;t<s.length;t++){const e=s[t],i=e[1].firstChild;null!==i&&Cl(e[1],e,i,n)}const o=i.type;if(8&o)Cl(t,e,i.child,n);else if(32&o){const t=Hn(i,e);let r;for(;r=t();)n.push(r)}else if(16&o){const t=cr(e,i);if(Array.isArray(t))n.push(...t);else{const i=Kn(e[16]);Cl(i[1],i,t,n,!0)}}i=r?i.projectionNext:i.next}return n}class Sl{constructor(t,e){this._lView=t,this._cdRefInjectingView=e,this._appRef=null,this._attachedToViewContainer=!1}get rootNodes(){const t=this._lView,e=t[1];return Cl(e,t,e.firstChild,[])}get context(){return this._lView[8]}get destroyed(){return 256==(256&this._lView[2])}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){const t=this._lView[3];if(ht(t)){const e=t[8],i=e?e.indexOf(this):-1;i>-1&&(Qn(t,i),ui(e,i))}this._attachedToViewContainer=!1}Xn(this._lView[1],this._lView)}onDestroy(t){qr(this._lView[1],this._lView,null,t)}markForCheck(){ps(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){fs(this._lView[1],this._lView,this.context)}checkNoChanges(){!function(t,e,i){Yt(!0);try{fs(t,e,i)}finally{Yt(!1)}}(this._lView[1],this._lView,this.context)}attachToViewContainerRef(){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._attachedToViewContainer=!0}detachFromAppRef(){var t;this._appRef=null,dr(this._lView[1],t=this._lView,t[11],2,null,null)}attachToAppRef(t){if(this._attachedToViewContainer)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t}}class kl extends Sl{constructor(t){super(t),this._view=t}detectChanges(){ms(this._view)}checkNoChanges(){!function(t){Yt(!0);try{ms(t)}finally{Yt(!1)}}(this._view)}get context(){return null}}const El=Il;let Dl=(()=>{class t{}return t.__NG_ELEMENT_ID__=El,t.__ChangeDetectorRef__=!0,t})();function Il(t=!1){return function(t,e,i){if(!i&&dt(t)){const i=Mt(t.index,e);return new Sl(i,i)}return 47&t.type?new Sl(e[16],e):null}(Kt(),jt(),t)}const Pl=[new Al],Ol=new yl([new hl]),Ml=new xl(Pl),Tl=function(){return Ll(Kt(),jt())};let Rl=(()=>{class t{}return t.__NG_ELEMENT_ID__=Tl,t})();const Vl=Rl,Fl=class extends Vl{constructor(t,e,i){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=i}createEmbeddedView(t){const e=this._declarationTContainer.tViews,i=Lr(this._declarationLView,e,t,16,null,e.declTNode,null,null,null,null);i[17]=this._declarationLView[this._declarationTContainer.index];const n=this._declarationLView[19];return null!==n&&(i[19]=n.createEmbeddedView(e)),Nr(e,i,t),new Sl(i)}};function Ll(t,e){return 4&t.type?new Fl(e,t,tl(t,e)):null}class Ul{}class Bl{}const Nl=function(){return Gl(Kt(),jt())};let jl=(()=>{class t{}return t.__NG_ELEMENT_ID__=Nl,t})();const zl=jl,Hl=class extends zl{constructor(t,e,i){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=i}get element(){return tl(this._hostTNode,this._hostLView)}get injector(){return new Xe(this._hostTNode,this._hostLView)}get parentInjector(){const t=Ne(this._hostTNode,this._hostLView);if(Oe(t)){const e=Te(t,this._hostLView),i=Me(t);return new Xe(e[1].data[i+8],e)}return new Xe(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=Kl(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-10}createEmbeddedView(t,e,i){const n=t.createEmbeddedView(e||{});return this.insert(n,i),n}createComponent(t,e,i,n,r){const s=i||this.parentInjector;if(!r&&null==t.ngModule&&s){const t=s.get(Ul,null);t&&(r=t)}const o=t.create(s,n,void 0,r);return this.insert(o.hostView,e),o}insert(t,e){const i=t._lView,n=i[1];if(ht(i[3])){const e=this.indexOf(t);if(-1!==e)this.detach(e);else{const e=i[3],n=new Hl(e,e[6],e[3]);n.detach(n.indexOf(t))}}const r=this._adjustIndex(e),s=this._lContainer;!function(t,e,i,n){const r=10+n,s=i.length;n>0&&(i[r-1][4]=e),n<s-10?(e[4]=i[r],hi(i,10+n,e)):(i.push(e),e[4]=null),e[3]=i;const o=e[17];null!==o&&i!==o&&function(t,e){const i=t[9];e[16]!==e[3][3][16]&&(t[2]=!0),null===i?t[9]=[e]:i.push(e)}(o,e);const a=e[19];null!==a&&a.insertView(t),e[2]|=128}(n,i,s,r);const o=hr(r,s),a=i[11],l=rr(a,s[7]);return null!==l&&function(t,e,i,n,r,s){n[0]=r,n[6]=e,dr(t,n,i,1,r,s)}(n,s[6],a,i,l,o),t.attachToViewContainerRef(),hi($l(s),r,t),t}move(t,e){return this.insert(t,e)}indexOf(t){const e=Kl(this._lContainer);return null!==e?e.indexOf(t):-1}remove(t){const e=this._adjustIndex(t,-1),i=Qn(this._lContainer,e);i&&(ui($l(this._lContainer),e),Xn(i[1],i))}detach(t){const e=this._adjustIndex(t,-1),i=Qn(this._lContainer,e);return i&&null!=ui($l(this._lContainer),e)?new Sl(i):null}_adjustIndex(t,e=0){return null==t?this.length+e:t}};function Kl(t){return t[8]}function $l(t){return t[8]||(t[8]=[])}function Gl(t,e){let i;const n=e[t.index];if(ht(n))i=n;else{let r;if(8&t.type)r=Et(n);else{const i=e[11];r=i.createComment("");const n=It(t,e);er(i,rr(i,n),r,function(t,e){return St(t)?t.nextSibling(e):e.nextSibling}(i,n),!1)}e[t.index]=i=ls(n,e,r,t),ds(e,i)}return new Hl(i,t,e)}const Wl={};class Zl extends Xa{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=at(t);return new Ql(e,this.ngModule)}}function ql(t){const e=[];for(let i in t)t.hasOwnProperty(i)&&e.push({propName:t[i],templateName:i});return e}const Yl=new ri("SCHEDULER_TOKEN",{providedIn:"root",factory:()=>Ln});class Ql extends Ya{constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=t.selectors.map(kr).join(","),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}get inputs(){return ql(this.componentDef.inputs)}get outputs(){return ql(this.componentDef.outputs)}create(t,e,i,n){const r=(n=n||this.ngModule)?function(t,e){return{get:(i,n,r)=>{const s=t.get(i,Wl,r);return s!==Wl||n===Wl?s:e.get(i,n,r)}}}(t,n.injector):t,s=r.get(rl,kt),o=r.get(al,null),a=s.createRenderer(null,this.componentDef),l=this.componentDef.selectors[0][0]||"div",c=i?function(t,e,i){if(St(t))return t.selectRootElement(e,i===V.ShadowDom);let n="string"==typeof e?t.querySelector(e):e;return n.textContent="",n}(a,i,this.componentDef.encapsulation):qn(s.createRenderer(null,this.componentDef),l,function(t){const e=t.toLowerCase();return"svg"===e?"http://www.w3.org/2000/svg":"math"===e?"http://www.w3.org/1998/MathML/":null}(l)),h=this.componentDef.onPush?576:528,u={components:[],scheduler:Ln,clean:As,playerHandler:null,flags:0},d=Zr(0,null,null,1,0,null,null,null,null,null),p=Lr(null,d,u,h,null,null,s,a,o,r);let f,m;le(p);try{const t=function(t,e,i,n,r,s){const o=i[1];i[20]=t;const a=Ur(o,20,2,"#host",null),l=a.mergedAttrs=e.hostAttrs;null!==l&&(Cs(a,l,!0),null!==t&&(ke(r,t,l),null!==a.classes&&mr(r,t,a.classes),null!==a.styles&&fr(r,t,a.styles)));const c=n.createRenderer(t,e),h=Lr(i,Wr(e),null,e.onPush?64:16,i[20],a,n,c,null,null);return o.firstCreatePass&&(je(Le(a,i),o,e.type),es(o,a),ns(a,i.length,1)),ds(i,h),i[20]=h}(c,this.componentDef,p,s,a);if(c)if(i)ke(a,c,["ng-version",cl.full]);else{const{attrs:t,classes:e}=function(t){const e=[],i=[];let n=1,r=2;for(;n<t.length;){let s=t[n];if("string"==typeof s)2===r?""!==s&&e.push(s,t[++n]):8===r&&i.push(s);else{if(!yr(r))break;r=s}n++}return{attrs:e,classes:i}}(this.componentDef.selectors[0]);t&&ke(a,c,t),e&&e.length>0&&mr(a,c,e.join(" "))}if(m=Pt(d,20),void 0!==e){const t=m.projection=[];for(let i=0;i<this.ngContentSelectors.length;i++){const n=e[i];t.push(null!=n?Array.from(n):null)}}f=function(t,e,i,n,r){const s=i[1],o=function(t,e,i){const n=Kt();t.firstCreatePass&&(i.providersResolver&&i.providersResolver(i),rs(t,n,e,Br(t,e,1,null),i));const r=qe(e,t,n.directiveStart,n);Fn(r,e);const s=It(n,e);return s&&Fn(s,e),r}(s,i,e);if(n.components.push(o),t[8]=o,r&&r.forEach(t=>t(o,e)),e.contentQueries){const t=Kt();e.contentQueries(1,o,t.directiveStart)}const a=Kt();return!s.firstCreatePass||null===e.hostBindings&&null===e.hostAttrs||(me(a.index),Jr(i[1],a,0,a.directiveStart,a.directiveEnd,e),ts(e,o)),o}(t,this.componentDef,p,u,[zs]),Nr(d,p,null)}finally{pe()}return new Xl(this.componentType,f,tl(m,p),p,m)}}class Xl extends class{}{constructor(t,e,i,n,r){super(),this.location=i,this._rootLView=n,this._tNode=r,this.instance=e,this.hostView=this.changeDetectorRef=new kl(n),this.componentType=t}get injector(){return new Xe(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(t){this.hostView.onDestroy(t)}}const Jl=new Map;class tc extends Ul{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new Zl(this);const i=lt(t),n=t[Z]||null;n&&ja(n),this._bootstrapComponents=jn(i.bootstrap),this._r3Injector=Ts(t,e,[{provide:Ul,useValue:this},{provide:Xa,useValue:this.componentFactoryResolver}],h(t)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(t)}get(t,e=js.THROW_IF_NOT_FOUND,i=I.Default){return t===js||t===Ul||t===Ss?this:this._r3Injector.get(t,e,i)}destroy(){const t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class ec extends Bl{constructor(t){super(),this.moduleType=t,null!==lt(t)&&function(t){const e=new Set;!function t(i){const n=lt(i,!0),r=n.id;null!==r&&(function(t,e,i){if(e&&e!==i)throw new Error(`Duplicate module registered for ${t} - ${h(e)} vs ${h(e.name)}`)}(r,Jl.get(r),i),Jl.set(r,i));const s=jn(n.imports);for(const o of s)e.has(o)||(e.add(o),t(o))}(t)}(t)}create(t){return new tc(this.moduleType,t)}}function ic(t,e,i){const n=Qt()+t,r=jt();return r[n]===Er?Js(r,n,i?e.call(i):e()):function(t,e){return t[e]}(r,n)}function nc(t,e,i,n){return ac(jt(),Qt(),t,e,i,n)}function rc(t,e,i,n,r){return lc(jt(),Qt(),t,e,i,n,r)}function sc(t,e,i,n,r,s){return cc(jt(),Qt(),t,e,i,n,r,s)}function oc(t,e){const i=t[e];return i===Er?void 0:i}function ac(t,e,i,n,r,s){const o=e+i;return to(t,o,r)?Js(t,o+1,s?n.call(s,r):n(r)):oc(t,o+1)}function lc(t,e,i,n,r,s,o){const a=e+i;return eo(t,a,r,s)?Js(t,a+2,o?n.call(o,r,s):n(r,s)):oc(t,a+2)}function cc(t,e,i,n,r,s,o,a){const l=e+i;return io(t,l,r,s,o)?Js(t,l+3,a?n.call(a,r,s,o):n(r,s,o)):oc(t,l+3)}function hc(t,e){const i=zt();let n;const r=t+20;i.firstCreatePass?(n=function(t,e){if(e)for(let i=e.length-1;i>=0;i--){const n=e[i];if(t===n.name)return n}throw new g("302",`The pipe '${t}' could not be found!`)}(e,i.pipeRegistry),i.data[r]=n,n.onDestroy&&(i.destroyHooks||(i.destroyHooks=[])).push(r,n.onDestroy)):n=i.data[r];const s=n.factory||(n.factory=mt(n.type)),o=O(Mo);try{const t=Ve(!1),e=s();return Ve(t),function(t,e,i,n){i>=t.data.length&&(t.data[i]=null,t.blueprint[i]=null),e[i]=n}(i,jt(),r,e),e}finally{O(o)}}function uc(t,e,i){const n=t+20,r=jt(),s=Ot(r,n);return mc(r,fc(r,n)?ac(r,Qt(),e,s.transform,i,s):s.transform(i))}function dc(t,e,i,n){const r=t+20,s=jt(),o=Ot(s,r);return mc(s,fc(s,r)?lc(s,Qt(),e,o.transform,i,n,o):o.transform(i,n))}function pc(t,e,i,n,r){const s=t+20,o=jt(),a=Ot(o,s);return mc(o,fc(o,s)?cc(o,Qt(),e,a.transform,i,n,r,a):a.transform(i,n,r))}function fc(t,e){return t[1].data[e].pure}function mc(t,e){return Ys.isWrapped(e)&&(e=Ys.unwrap(e),t[Xt()]=Er),e}const gc=class extends n.a{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,e,i){let n,s=t=>null,o=()=>null;t&&"object"==typeof t?(n=this.__isAsync?e=>{setTimeout(()=>t.next(e))}:e=>{t.next(e)},t.error&&(s=this.__isAsync?e=>{setTimeout(()=>t.error(e))}:e=>{t.error(e)}),t.complete&&(o=this.__isAsync?()=>{setTimeout(()=>t.complete())}:()=>{t.complete()})):(n=this.__isAsync?e=>{setTimeout(()=>t(e))}:e=>{t(e)},e&&(s=this.__isAsync?t=>{setTimeout(()=>e(t))}:t=>{e(t)}),i&&(o=this.__isAsync?()=>{setTimeout(()=>i())}:()=>{i()}));const a=super.subscribe(n,s,o);return t instanceof r.a&&t.add(a),a}};function Ac(){return this._results[qs()]()}class bc{constructor(t=!1){this._emitDistinctChangesOnly=t,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const e=qs(),i=bc.prototype;i[e]||(i[e]=Ac)}get changes(){return this._changes||(this._changes=new gc)}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,e){return this._results.reduce(t,e)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,e){this.dirty=!1;const i=li(t);(this._changesDetected=!function(t,e,i){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++){let r=t[n],s=e[n];if(i&&(r=i(r),s=i(s)),s!==r)return!1}return!0}(this._results,i,e))&&(this._results=i,this.length=i.length,this.last=i[this.length-1],this.first=i[0])}notifyOnChanges(){!this._changes||!this._changesDetected&&this._emitDistinctChangesOnly||this._changes.emit(this)}setDirty(){this.dirty=!0}destroy(){this.changes.complete(),this.changes.unsubscribe()}}class vc{constructor(t){this.queryList=t,this.matches=null}clone(){return new vc(this.queryList)}setDirty(){this.queryList.setDirty()}}class _c{constructor(t=[]){this.queries=t}createEmbeddedView(t){const e=t.queries;if(null!==e){const i=null!==t.contentQueries?t.contentQueries[0]:e.length,n=[];for(let t=0;t<i;t++){const i=e.getByIndex(t);n.push(this.queries[i.indexInDeclarationView].clone())}return new _c(n)}return null}insertView(t){this.dirtyQueriesWithMatches(t)}detachView(t){this.dirtyQueriesWithMatches(t)}dirtyQueriesWithMatches(t){for(let e=0;e<this.queries.length;e++)null!==Rc(t,e).matches&&this.queries[e].setDirty()}}class yc{constructor(t,e,i=null){this.predicate=t,this.flags=e,this.read=i}}class wc{constructor(t=[]){this.queries=t}elementStart(t,e){for(let i=0;i<this.queries.length;i++)this.queries[i].elementStart(t,e)}elementEnd(t){for(let e=0;e<this.queries.length;e++)this.queries[e].elementEnd(t)}embeddedTView(t){let e=null;for(let i=0;i<this.length;i++){const n=null!==e?e.length:0,r=this.getByIndex(i).embeddedTView(t,n);r&&(r.indexInDeclarationView=i,null!==e?e.push(r):e=[r])}return null!==e?new wc(e):null}template(t,e){for(let i=0;i<this.queries.length;i++)this.queries[i].template(t,e)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}}class xc{constructor(t,e=-1){this.metadata=t,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=e}elementStart(t,e){this.isApplyingToNode(e)&&this.matchTNode(t,e)}elementEnd(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}template(t,e){this.elementStart(t,e)}embeddedTView(t,e){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,e),new xc(this.metadata)):null}isApplyingToNode(t){if(this._appliesToNextNode&&1!=(1&this.metadata.flags)){const e=this._declarationNodeIndex;let i=t.parent;for(;null!==i&&8&i.type&&i.index!==e;)i=i.parent;return e===(null!==i?i.index:-1)}return this._appliesToNextNode}matchTNode(t,e){const i=this.metadata.predicate;if(Array.isArray(i))for(let n=0;n<i.length;n++){const r=i[n];this.matchTNodeWithReadOption(t,e,Cc(e,r)),this.matchTNodeWithReadOption(t,e,Ze(e,t,r,!1,!1))}else i===Rl?4&e.type&&this.matchTNodeWithReadOption(t,e,-1):this.matchTNodeWithReadOption(t,e,Ze(e,t,i,!1,!1))}matchTNodeWithReadOption(t,e,i){if(null!==i){const n=this.metadata.read;if(null!==n)if(n===il||n===jl||n===Rl&&4&e.type)this.addMatch(e.index,-2);else{const i=Ze(e,t,n,!1,!1);null!==i&&this.addMatch(e.index,i)}else this.addMatch(e.index,i)}}addMatch(t,e){null===this.matches?this.matches=[t,e]:this.matches.push(t,e)}}function Cc(t,e){const i=t.localNames;if(null!==i)for(let n=0;n<i.length;n+=2)if(i[n]===e)return i[n+1];return null}function Sc(t,e,i,n){return-1===i?function(t,e){return 11&t.type?tl(t,e):4&t.type?Ll(t,e):null}(e,t):-2===i?function(t,e,i){return i===il?tl(e,t):i===Rl?Ll(e,t):i===jl?Gl(e,t):void 0}(t,e,n):qe(t,t[1],i,e)}function kc(t,e,i,n){const r=e[19].queries[n];if(null===r.matches){const n=t.data,s=i.matches,o=[];for(let t=0;t<s.length;t+=2){const r=s[t];o.push(r<0?null:Sc(e,n[r],s[t+1],i.metadata.read))}r.matches=o}return r.matches}function Ec(t,e,i,n){const r=t.queries.getByIndex(i),s=r.matches;if(null!==s){const o=kc(t,e,r,i);for(let t=0;t<s.length;t+=2){const i=s[t];if(i>0)n.push(o[t/2]);else{const r=s[t+1],o=e[-i];for(let t=10;t<o.length;t++){const e=o[t];e[17]===e[3]&&Ec(e[1],e,r,n)}if(null!==o[9]){const t=o[9];for(let e=0;e<t.length;e++){const i=t[e];Ec(i[1],i,r,n)}}}}}return n}function Dc(t){const e=jt(),i=zt(),n=re();se(n+1);const r=Rc(i,n);if(t.dirty&&Rt(e)===(2==(2&r.metadata.flags))){if(null===r.matches)t.reset([]);else{const s=r.crossesNgTemplate?Ec(i,e,n,[]):kc(i,e,r,n);t.reset(s,nl),t.notifyOnChanges()}return!0}return!1}function Ic(t,e,i){const n=zt();n.firstCreatePass&&(Tc(n,new yc(t,e,i),-1),2==(2&e)&&(n.staticViewQueries=!0)),Mc(n,jt(),e)}function Pc(t,e,i,n){const r=zt();if(r.firstCreatePass){const s=Kt();Tc(r,new yc(e,i,n),s.index),function(t,e){const i=t.contentQueries||(t.contentQueries=[]);e!==(i.length?i[i.length-1]:-1)&&i.push(t.queries.length-1,e)}(r,t),2==(2&i)&&(r.staticContentQueries=!0)}Mc(r,jt(),i)}function Oc(){return t=jt(),e=re(),t[19].queries[e].queryList;var t,e}function Mc(t,e,i){const n=new bc(4==(4&i));qr(t,e,n,n.destroy),null===e[19]&&(e[19]=new _c),e[19].queries.push(new vc(n))}function Tc(t,e,i){null===t.queries&&(t.queries=new wc),t.queries.track(new xc(e,i))}function Rc(t,e){return t.queries.getByIndex(e)}function Vc(t,e){return Ll(t,e)}function Fc(t=I.Default){const e=Il(!0);if(null!=e||t&I.Optional)return e;v("ChangeDetectorRef")}const Lc=new ri("Application Initializer");let Uc=(()=>{class t{constructor(t){this.appInits=t,this.resolve=Ja,this.reject=Ja,this.initialized=!1,this.done=!1,this.donePromise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}runInitializers(){if(this.initialized)return;const t=[],e=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let i=0;i<this.appInits.length;i++){const e=this.appInits[i]();zo(e)&&t.push(e)}Promise.all(t).then(()=>{e()}).catch(t=>{this.reject(t)}),0===t.length&&e(),this.initialized=!0}}return t.\u0275fac=function(e){return new(e||t)(Ii(Lc,8))},t.\u0275prov=_({token:t,factory:t.\u0275fac}),t})();const Bc=new ri("AppId"),Nc={provide:Bc,useFactory:function(){return`${jc()}${jc()}${jc()}`},deps:[]};function jc(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const zc=new ri("Platform Initializer"),Hc=new ri("Platform ID"),Kc=new ri("appBootstrapListener");let $c=(()=>{class t{log(t){console.log(t)}warn(t){console.warn(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=_({token:t,factory:t.\u0275fac}),t})();const Gc=new ri("LocaleId"),Wc=new ri("DefaultCurrencyCode");class Zc{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}const qc=function(t){return new ec(t)},Yc=qc,Qc=function(t){return Promise.resolve(qc(t))},Xc=function(t){const e=qc(t),i=jn(lt(t).declarations).reduce((t,e)=>{const i=at(e);return i&&t.push(new Ql(i)),t},[]);return new Zc(e,i)},Jc=Xc,th=function(t){return Promise.resolve(Xc(t))};let eh=(()=>{class t{constructor(){this.compileModuleSync=Yc,this.compileModuleAsync=Qc,this.compileModuleAndAllComponentsSync=Jc,this.compileModuleAndAllComponentsAsync=th}clearCache(){}clearCacheFor(t){}getModuleId(t){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=_({token:t,factory:t.\u0275fac}),t})();const ih=(()=>Promise.resolve(0))();function nh(t){"undefined"==typeof Zone?ih.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class rh{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:i=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new gc(!1),this.onMicrotaskEmpty=new gc(!1),this.onStable=new gc(!1),this.onError=new gc(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched(),this._nesting=0,this._outer=this._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(this._inner=this._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(this._inner=this._inner.fork(Zone.longStackTraceZoneSpec)),this.shouldCoalesceEventChangeDetection=!i&&e,this.shouldCoalesceRunChangeDetection=i,this.lastRequestAnimationFrameId=-1,this.nativeRequestAnimationFrame=function(){let t=N.requestAnimationFrame,e=N.cancelAnimationFrame;if("undefined"!=typeof Zone&&t&&e){const i=t[Zone.__symbol__("OriginalDelegate")];i&&(t=i);const n=e[Zone.__symbol__("OriginalDelegate")];n&&(e=n)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function(t){const e=()=>{!function(t){-1===t.lastRequestAnimationFrameId&&(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(N,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,ah(t),oh(t)},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),ah(t))}(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(i,n,r,s,o,a)=>{try{return lh(t),i.invokeTask(r,s,o,a)}finally{(t.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||t.shouldCoalesceRunChangeDetection)&&e(),ch(t)}},onInvoke:(i,n,r,s,o,a,l)=>{try{return lh(t),i.invoke(r,s,o,a,l)}finally{t.shouldCoalesceRunChangeDetection&&e(),ch(t)}},onHasTask:(e,i,n,r)=>{e.hasTask(n,r),i===n&&("microTask"==r.change?(t._hasPendingMicrotasks=r.microTask,ah(t),oh(t)):"macroTask"==r.change&&(t.hasPendingMacrotasks=r.macroTask))},onHandleError:(e,i,n,r)=>(e.handleError(n,r),t.runOutsideAngular(()=>t.onError.emit(r)),!1)})}(this)}static isInAngularZone(){return!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!rh.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(rh.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(t,e,i){return this._inner.run(t,e,i)}runTask(t,e,i,n){const r=this._inner,s=r.scheduleEventTask("NgZoneEvent: "+n,t,sh,Ja,Ja);try{return r.runTask(s,e,i)}finally{r.cancelTask(s)}}runGuarded(t,e,i){return this._inner.runGuarded(t,e,i)}runOutsideAngular(t){return this._outer.run(t)}}const sh={};function oh(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function ah(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&-1!==t.lastRequestAnimationFrameId)}function lh(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function ch(t){t._nesting--,oh(t)}class hh{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new gc,this.onMicrotaskEmpty=new gc,this.onStable=new gc,this.onError=new gc}run(t,e,i){return t.apply(e,i)}runGuarded(t,e,i){return t.apply(e,i)}runOutsideAngular(t){return t()}runTask(t,e,i,n){return t.apply(e,i)}}let uh=(()=>{class t{constructor(t){this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),t.run(()=>{this.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{rh.assertNotInAngularZone(),nh(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())nh(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(this._didWork)}this._didWork=!1});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(e=>!e.updateCb||!e.updateCb(t)||(clearTimeout(e.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,e,i){let n=-1;e&&e>0&&(n=setTimeout(()=>{this._callbacks=this._callbacks.filter(t=>t.timeoutId!==n),t(this._didWork,this.getPendingTasks())},e)),this._callbacks.push({doneCb:t,timeoutId:n,updateCb:i})}whenStable(t,e,i){if(i&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(t,e,i),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(t,e,i){return[]}}return t.\u0275fac=function(e){return new(e||t)(Ii(rh))},t.\u0275prov=_({token:t,factory:t.\u0275fac}),t})(),dh=(()=>{class t{constructor(){this._applications=new Map,gh.addToWindow(this)}registerApplication(t,e){this._applications.set(t,e)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,e=!0){return gh.findTestabilityInTree(this,t,e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=_({token:t,factory:t.\u0275fac}),t})();class ph{addToWindow(t){}findTestabilityInTree(t,e,i){return null}}function fh(t){gh=t}let mh,gh=new ph,Ah=!0,bh=!1;function vh(){return bh=!0,Ah}function _h(){if(bh)throw new Error("Cannot enable prod mode after platform setup.");Ah=!1}const yh=new ri("AllowMultipleToken");class wh{constructor(t,e){this.name=t,this.token=e}}function xh(t,e,i=[]){const n=`Platform: ${e}`,r=new ri(n);return(e=[])=>{let s=Ch();if(!s||s.injector.get(yh,!1))if(t)t(i.concat(e).concat({provide:r,useValue:!0}));else{const t=i.concat(e).concat({provide:r,useValue:!0},{provide:Es,useValue:"platform"});!function(t){if(mh&&!mh.destroyed&&!mh.injector.get(yh,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");mh=t.get(Sh);const e=t.get(zc,null);e&&e.forEach(t=>t())}(js.create({providers:t,name:n}))}return function(t){const e=Ch();if(!e)throw new Error("No platform exists!");if(!e.injector.get(t,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return e}(r)}}function Ch(){return mh&&!mh.destroyed?mh:null}let Sh=(()=>{class t{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,e){const i=function(t,e){let i;return i="noop"===t?new hh:("zone.js"===t?void 0:t)||new rh({enableLongStackTrace:vh(),shouldCoalesceEventChangeDetection:!!(null==e?void 0:e.ngZoneEventCoalescing),shouldCoalesceRunChangeDetection:!!(null==e?void 0:e.ngZoneRunCoalescing)}),i}(e?e.ngZone:void 0,{ngZoneEventCoalescing:e&&e.ngZoneEventCoalescing||!1,ngZoneRunCoalescing:e&&e.ngZoneRunCoalescing||!1}),n=[{provide:rh,useValue:i}];return i.run(()=>{const e=js.create({providers:n,parent:this.injector,name:t.moduleType.name}),r=t.create(e),s=r.injector.get(Vn,null);if(!s)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return i.runOutsideAngular(()=>{const t=i.onError.subscribe({next:t=>{s.handleError(t)}});r.onDestroy(()=>{Dh(this._modules,r),t.unsubscribe()})}),function(t,e,i){try{const n=i();return zo(n)?n.catch(i=>{throw e.runOutsideAngular(()=>t.handleError(i)),i}):n}catch(n){throw e.runOutsideAngular(()=>t.handleError(n)),n}}(s,i,()=>{const t=r.injector.get(Uc);return t.runInitializers(),t.donePromise.then(()=>(ja(r.injector.get(Gc,"en-US")||"en-US"),this._moduleDoBootstrap(r),r))})})}bootstrapModule(t,e=[]){const i=kh({},e);return function(t,e,i){const n=new ec(i);return Promise.resolve(n)}(0,0,t).then(t=>this.bootstrapModuleFactory(t,i))}_moduleDoBootstrap(t){const e=t.injector.get(Eh);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(t=>e.bootstrap(t));else{if(!t.instance.ngDoBootstrap)throw new Error(`The module ${h(t.instance.constructor)} was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.`);t.instance.ngDoBootstrap(e)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(t=>t.destroy()),this._destroyListeners.forEach(t=>t()),this._destroyed=!0}get destroyed(){return this._destroyed}}return t.\u0275fac=function(e){return new(e||t)(Ii(js))},t.\u0275prov=_({token:t,factory:t.\u0275fac}),t})();function kh(t,e){return Array.isArray(e)?e.reduce(kh,t):Object.assign(Object.assign({},t),e)}let Eh=(()=>{class t{constructor(t,e,i,n,r){this._zone=t,this._injector=e,this._exceptionHandler=i,this._componentFactoryResolver=n,this._initStatus=r,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const l=new s.a(t=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{t.next(this._stable),t.complete()})}),c=new s.a(t=>{let e;this._zone.runOutsideAngular(()=>{e=this._zone.onStable.subscribe(()=>{rh.assertNotInAngularZone(),nh(()=>{this._stable||this._zone.hasPendingMacrotasks||this._zone.hasPendingMicrotasks||(this._stable=!0,t.next(!0))})})});const i=this._zone.onUnstable.subscribe(()=>{rh.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{t.next(!1)}))});return()=>{e.unsubscribe(),i.unsubscribe()}});this.isStable=Object(o.a)(l,c.pipe(Object(a.a)()))}bootstrap(t,e){if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");let i;i=t instanceof Ya?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(i.componentType);const n=i.isBoundToModule?void 0:this._injector.get(Ul),r=i.create(js.NULL,[],e||i.selector,n),s=r.location.nativeElement,o=r.injector.get(uh,null),a=o&&r.injector.get(dh);return o&&a&&a.registerApplication(s,o),r.onDestroy(()=>{this.detachView(r.hostView),Dh(this.components,r),a&&a.unregisterApplication(s)}),this._loadComponent(r),r}tick(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;for(let t of this._views)t.detectChanges()}catch(t){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(t))}finally{this._runningTick=!1}}attachView(t){const e=t;this._views.push(e),e.attachToAppRef(this)}detachView(t){const e=t;Dh(this._views,e),e.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(Kc,[]).concat(this._bootstrapListeners).forEach(e=>e(t))}ngOnDestroy(){this._views.slice().forEach(t=>t.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}get viewCount(){return this._views.length}}return t.\u0275fac=function(e){return new(e||t)(Ii(rh),Ii(js),Ii(Vn),Ii(Xa),Ii(Uc))},t.\u0275prov=_({token:t,factory:t.\u0275fac}),t})();function Dh(t,e){const i=t.indexOf(e);i>-1&&t.splice(i,1)}class Ih{}class Ph{}const Oh={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"};let Mh=(()=>{class t{constructor(t,e){this._compiler=t,this._config=e||Oh}load(t){return this.loadAndCompile(t)}loadAndCompile(t){let[e,n]=t.split("#");return void 0===n&&(n="default"),i("zn8P")(e).then(t=>t[n]).then(t=>Th(t,e,n)).then(t=>this._compiler.compileModuleAsync(t))}loadFactory(t){let[e,n]=t.split("#"),r="NgFactory";return void 0===n&&(n="default",r=""),i("zn8P")(this._config.factoryPathPrefix+e+this._config.factoryPathSuffix).then(t=>t[n+r]).then(t=>Th(t,e,n))}}return t.\u0275fac=function(e){return new(e||t)(Ii(eh),Ii(Ph,8))},t.\u0275prov=_({token:t,factory:t.\u0275fac}),t})();function Th(t,e,i){if(!t)throw new Error(`Cannot find '${i}' in '${e}'`);return t}class Rh extends Dl{}class Vh extends Rh{}const Fh=function(t){return null},Lh=xh(null,"core",[{provide:Hc,useValue:"unknown"},{provide:Sh,deps:[js]},{provide:dh,deps:[]},{provide:$c,deps:[]}]),Uh=[{provide:Eh,useClass:Eh,deps:[rh,js,Vn,Xa,Uc]},{provide:Yl,deps:[rh],useFactory:function(t){let e=[];return t.onStable.subscribe(()=>{for(;e.length;)e.pop()()}),function(t){e.push(t)}}},{provide:Uc,useClass:Uc,deps:[[new Ri,Lc]]},{provide:eh,useClass:eh,deps:[]},Nc,{provide:yl,useFactory:function(){return Ol},deps:[]},{provide:xl,useFactory:function(){return Ml},deps:[]},{provide:Gc,useFactory:function(t){return ja(t=t||"undefined"!=typeof $localize&&$localize.locale||"en-US"),t},deps:[[new Ti(Gc),new Ri,new Fi]]},{provide:Wc,useValue:"USD"}];let Bh=(()=>{class t{constructor(t){}}return t.\u0275fac=function(e){return new(e||t)(Ii(Eh))},t.\u0275mod=it({type:t}),t.\u0275inj=y({providers:Uh}),t})()},gKCj:function(t,e,i){t.exports=i.p+"0-es2015.38742f744abe6758427b.worker.js"},gRHU:function(t,e,i){"use strict";i.d(e,"a",function(){return s});var n=i("2fFW"),r=i("NJ4a");const s={closed:!0,next(t){},error(t){if(n.a.useDeprecatedSynchronousErrorHandling)throw t;Object(r.a)(t)},complete(){}}},gllA:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if(!t)return!1;if("string"!=typeof t)return!1;var e={A:10,B:12,C:13,D:14,E:15,F:16,G:17,H:18,I:19,J:20,K:21,L:23,M:24,N:25,O:26,P:27,Q:28,R:29,S:30,T:31,U:32,V:34,W:35,X:36,Y:37,Z:38},i=11!==(t=t.toUpperCase()).length,n=/^[A-Z]{4}\d{7}/.test(t);if(i||!n)return!1;var r=0,s=t.substr(10);return t.substr(0,10).split("").map(function(t,i){var n=Number(t);i<4&&(n=e[t]),n*=Math.pow(2,i),r+=n}),r%=11,(r%=10)===Number(s)}},jZKg:function(t,e,i){"use strict";i.d(e,"a",function(){return s});var n=i("HDdC"),r=i("quSY");function s(t,e){return new n.a(i=>{const n=new r.a;let s=0;return n.add(e.schedule(function(){s!==t.length?(i.next(t[s++]),i.closed||n.add(this.schedule())):i.complete()})),n})}},kJWO:function(t,e,i){"use strict";i.d(e,"a",function(){return n});const n=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")()},kdvv:function(t,e,i){"use strict";(function(t){i.d(e,"a",function(){return c});var n,r=i("9/Zf"),s=i("+A1k"),o={nowSeconds:function(){return Date.now()/1e3}},a=Object(s.b)()?function(){try{return Object(s.a)(t,"perf_hooks").performance}catch(e){return}}():function(){var t=Object(r.e)().performance;if(t&&t.now)return{now:function(){return t.now()},timeOrigin:Date.now()-t.now()}}(),l=void 0===a?o:{nowSeconds:function(){return(a.timeOrigin+a.now())/1e3}},c=o.nowSeconds.bind(o);l.nowSeconds.bind(l),(n=Object(r.e)().performance)&&(n.timeOrigin||n.timing&&n.timing.navigationStart||Date.now())}).call(this,i("3UD+")(t))},lJxs:function(t,e,i){"use strict";i.d(e,"a",function(){return r});var n=i("7o/Q");function r(t,e){return function(i){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return i.lift(new s(t,e))}}class s{constructor(t,e){this.project=t,this.thisArg=e}call(t,e){return e.subscribe(new o(t,this.project,this.thisArg))}}class o extends n.a{constructor(t,e,i){super(t),this.project=e,this.count=0,this.thisArg=i||this}_next(t){let e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(i){return void this.destination.error(i)}this.destination.next(e)}}},mrSG:function(t,e,i){"use strict";function n(t,e,i,n){var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o}function r(t,e){return function(i,n){e(i,n,t)}}function s(t,e,i,n){return new(i||(i=Promise))(function(r,s){function o(t){try{l(n.next(t))}catch(e){s(e)}}function a(t){try{l(n.throw(t))}catch(e){s(e)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(o,a)}l((n=n.apply(t,e||[])).next())})}i.d(e,"b",function(){return n}),i.d(e,"c",function(){return r}),i.d(e,"a",function(){return s})},n6bG:function(t,e,i){"use strict";function n(t){return"function"==typeof t}i.d(e,"a",function(){return n})},ngJS:function(t,e,i){"use strict";i.d(e,"a",function(){return n});const n=t=>e=>{for(let i=0,n=t.length;i<n&&!e.closed;i++)e.next(t[i]);e.complete()}},quSY:function(t,e,i){"use strict";i.d(e,"a",function(){return a});var n=i("DH7j"),r=i("XoHu"),s=i("n6bG");const o=(()=>{function t(t){return Error.call(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((t,e)=>`${e+1}) ${t.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t})();let a=(()=>{class t{constructor(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}unsubscribe(){let e;if(this.closed)return;let{_parentOrParents:i,_ctorUnsubscribe:a,_unsubscribe:c,_subscriptions:h}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,i instanceof t)i.remove(this);else if(null!==i)for(let t=0;t<i.length;++t)i[t].remove(this);if(Object(s.a)(c)){a&&(this._unsubscribe=void 0);try{c.call(this)}catch(u){e=u instanceof o?l(u.errors):[u]}}if(Object(n.a)(h)){let t=-1,i=h.length;for(;++t<i;){const i=h[t];if(Object(r.a)(i))try{i.unsubscribe()}catch(u){e=e||[],u instanceof o?e=e.concat(l(u.errors)):e.push(u)}}}if(e)throw new o(e)}add(e){let i=e;if(!e)return t.EMPTY;switch(typeof e){case"function":i=new t(e);case"object":if(i===this||i.closed||"function"!=typeof i.unsubscribe)return i;if(this.closed)return i.unsubscribe(),i;if(!(i instanceof t)){const e=i;i=new t,i._subscriptions=[e]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}let{_parentOrParents:n}=i;if(null===n)i._parentOrParents=this;else if(n instanceof t){if(n===this)return i;i._parentOrParents=[n,this]}else{if(-1!==n.indexOf(this))return i;n.push(this)}const r=this._subscriptions;return null===r?this._subscriptions=[i]:r.push(i),i}remove(t){const e=this._subscriptions;if(e){const i=e.indexOf(t);-1!==i&&e.splice(i,1)}}}var e;return t.EMPTY=((e=new t).closed=!0,e),t})();function l(t){return t.reduce((t,e)=>t.concat(e instanceof o?e.errors:e),[])}},w1tV:function(t,e,i){"use strict";i.d(e,"a",function(){return a});var n=i("EQ5u"),r=i("x+ZX"),s=i("XNiG");function o(){return new s.a}function a(){return t=>{return Object(r.a)()((e=o,function(t){let i;i="function"==typeof e?e:function(){return e};const r=Object.create(t,n.b);return r.source=t,r.subjectFactory=i,r})(t));var e}}},"x+ZX":function(t,e,i){"use strict";i.d(e,"a",function(){return r});var n=i("7o/Q");function r(){return function(t){return t.lift(new s(t))}}class s{constructor(t){this.connectable=t}call(t,e){const{connectable:i}=this;i._refCount++;const n=new o(t,i),r=e.subscribe(n);return n.closed||(n.connection=i.connect()),r}}class o extends n.a{constructor(t,e){super(t),this.connectable=e}_unsubscribe(){const{connectable:t}=this;if(!t)return void(this.connection=null);this.connectable=null;const e=t._refCount;if(e<=0)return void(this.connection=null);if(t._refCount=e-1,e>1)return void(this.connection=null);const{connection:i}=this,n=t._connection;this.connection=null,!n||i&&n!==i||n.unsubscribe()}}},yCtX:function(t,e,i){"use strict";i.d(e,"a",function(){return o});var n=i("HDdC"),r=i("ngJS"),s=i("jZKg");function o(t,e){return e?Object(s.a)(t,e):new n.a(Object(r.a)(t))}},yLV6:function(t,e,i){var n;!function(r,s,o,a){"use strict";var l,c=["","webkit","Moz","MS","ms","o"],h=s.createElement("div"),u=Math.round,d=Math.abs,p=Date.now;function f(t,e,i){return setTimeout(y(t,i),e)}function m(t,e,i){return!!Array.isArray(t)&&(g(t,i[e],i),!0)}function g(t,e,i){var n;if(t)if(t.forEach)t.forEach(e,i);else if(void 0!==t.length)for(n=0;n<t.length;)e.call(i,t[n],n,t),n++;else for(n in t)t.hasOwnProperty(n)&&e.call(i,t[n],n,t)}function A(t,e,i){var n="DEPRECATED METHOD: "+e+"\n"+i+" AT \n";return function(){var e=new Error("get-stack-trace"),i=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",s=r.console&&(r.console.warn||r.console.log);return s&&s.call(r.console,n,i),t.apply(this,arguments)}}l="function"!=typeof Object.assign?function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(null!=n)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}:Object.assign;var b=A(function(t,e,i){for(var n=Object.keys(e),r=0;r<n.length;)(!i||i&&void 0===t[n[r]])&&(t[n[r]]=e[n[r]]),r++;return t},"extend","Use `assign`."),v=A(function(t,e){return b(t,e,!0)},"merge","Use `assign`.");function _(t,e,i){var n,r=e.prototype;(n=t.prototype=Object.create(r)).constructor=t,n._super=r,i&&l(n,i)}function y(t,e){return function(){return t.apply(e,arguments)}}function w(t,e){return"function"==typeof t?t.apply(e&&e[0]||void 0,e):t}function x(t,e){return void 0===t?e:t}function C(t,e,i){g(D(e),function(e){t.addEventListener(e,i,!1)})}function S(t,e,i){g(D(e),function(e){t.removeEventListener(e,i,!1)})}function k(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function E(t,e){return t.indexOf(e)>-1}function D(t){return t.trim().split(/\s+/g)}function I(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var n=0;n<t.length;){if(i&&t[n][i]==e||!i&&t[n]===e)return n;n++}return-1}function P(t){return Array.prototype.slice.call(t,0)}function O(t,e,i){for(var n=[],r=[],s=0;s<t.length;){var o=e?t[s][e]:t[s];I(r,o)<0&&n.push(t[s]),r[s]=o,s++}return i&&(n=e?n.sort(function(t,i){return t[e]>i[e]}):n.sort()),n}function M(t,e){for(var i,n,r=e[0].toUpperCase()+e.slice(1),s=0;s<c.length;){if((n=(i=c[s])?i+r:e)in t)return n;s++}}var T=1;function R(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||r}var V="ontouchstart"in r,F=void 0!==M(r,"PointerEvent"),L=V&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),U=["x","y"],B=["clientX","clientY"];function N(t,e){var i=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){w(t.options.enable,[t])&&i.handler(e)},this.init()}function j(t,e,i){var n=i.pointers.length,r=i.changedPointers.length,s=1&e&&n-r==0,o=12&e&&n-r==0;i.isFirst=!!s,i.isFinal=!!o,s&&(t.session={}),i.eventType=e,function(t,e){var i=t.session,n=e.pointers,r=n.length;i.firstInput||(i.firstInput=z(e)),r>1&&!i.firstMultiple?i.firstMultiple=z(e):1===r&&(i.firstMultiple=!1);var s=i.firstInput,o=i.firstMultiple,a=o?o.center:s.center,l=e.center=H(n);e.timeStamp=p(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=W(a,l),e.distance=G(a,l),function(t,e){var i=e.center,n=t.offsetDelta||{},r=t.prevDelta||{},s=t.prevInput||{};1!==e.eventType&&4!==s.eventType||(r=t.prevDelta={x:s.deltaX||0,y:s.deltaY||0},n=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=r.x+(i.x-n.x),e.deltaY=r.y+(i.y-n.y)}(i,e),e.offsetDirection=$(e.deltaX,e.deltaY);var c,h,u=K(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=u.x,e.overallVelocityY=u.y,e.overallVelocity=d(u.x)>d(u.y)?u.x:u.y,e.scale=o?(c=o.pointers,G((h=n)[0],h[1],B)/G(c[0],c[1],B)):1,e.rotation=o?function(t,e){return W(e[1],e[0],B)+W(t[1],t[0],B)}(o.pointers,n):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,function(t,e){var i,n,r,s,o=t.lastInterval||e,a=e.timeStamp-o.timeStamp;if(8!=e.eventType&&(a>25||void 0===o.velocity)){var l=e.deltaX-o.deltaX,c=e.deltaY-o.deltaY,h=K(a,l,c);n=h.x,r=h.y,i=d(h.x)>d(h.y)?h.x:h.y,s=$(l,c),t.lastInterval=e}else i=o.velocity,n=o.velocityX,r=o.velocityY,s=o.direction;e.velocity=i,e.velocityX=n,e.velocityY=r,e.direction=s}(i,e);var f=t.element;k(e.srcEvent.target,f)&&(f=e.srcEvent.target),e.target=f}(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function z(t){for(var e=[],i=0;i<t.pointers.length;)e[i]={clientX:u(t.pointers[i].clientX),clientY:u(t.pointers[i].clientY)},i++;return{timeStamp:p(),pointers:e,center:H(e),deltaX:t.deltaX,deltaY:t.deltaY}}function H(t){var e=t.length;if(1===e)return{x:u(t[0].clientX),y:u(t[0].clientY)};for(var i=0,n=0,r=0;r<e;)i+=t[r].clientX,n+=t[r].clientY,r++;return{x:u(i/e),y:u(n/e)}}function K(t,e,i){return{x:e/t||0,y:i/t||0}}function $(t,e){return t===e?1:d(t)>=d(e)?t<0?2:4:e<0?8:16}function G(t,e,i){i||(i=U);var n=e[i[0]]-t[i[0]],r=e[i[1]]-t[i[1]];return Math.sqrt(n*n+r*r)}function W(t,e,i){return i||(i=U),180*Math.atan2(e[i[1]]-t[i[1]],e[i[0]]-t[i[0]])/Math.PI}N.prototype={handler:function(){},init:function(){this.evEl&&C(this.element,this.evEl,this.domHandler),this.evTarget&&C(this.target,this.evTarget,this.domHandler),this.evWin&&C(R(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&S(this.element,this.evEl,this.domHandler),this.evTarget&&S(this.target,this.evTarget,this.domHandler),this.evWin&&S(R(this.element),this.evWin,this.domHandler)}};var Z={mousedown:1,mousemove:2,mouseup:4};function q(){this.evEl="mousedown",this.evWin="mousemove mouseup",this.pressed=!1,N.apply(this,arguments)}_(q,N,{handler:function(t){var e=Z[t.type];1&e&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))}});var Y={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},Q={2:"touch",3:"pen",4:"mouse",5:"kinect"},X="pointerdown",J="pointermove pointerup pointercancel";function tt(){this.evEl=X,this.evWin=J,N.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}r.MSPointerEvent&&!r.PointerEvent&&(X="MSPointerDown",J="MSPointerMove MSPointerUp MSPointerCancel"),_(tt,N,{handler:function(t){var e=this.store,i=!1,n=t.type.toLowerCase().replace("ms",""),r=Y[n],s=Q[t.pointerType]||t.pointerType,o="touch"==s,a=I(e,t.pointerId,"pointerId");1&r&&(0===t.button||o)?a<0&&(e.push(t),a=e.length-1):12&r&&(i=!0),a<0||(e[a]=t,this.callback(this.manager,r,{pointers:e,changedPointers:[t],pointerType:s,srcEvent:t}),i&&e.splice(a,1))}});var et={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function it(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,N.apply(this,arguments)}function nt(t,e){var i=P(t.touches),n=P(t.changedTouches);return 12&e&&(i=O(i.concat(n),"identifier",!0)),[i,n]}_(it,N,{handler:function(t){var e=et[t.type];if(1===e&&(this.started=!0),this.started){var i=nt.call(this,t,e);12&e&&i[0].length-i[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:"touch",srcEvent:t})}}});var rt={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function st(){this.evTarget="touchstart touchmove touchend touchcancel",this.targetIds={},N.apply(this,arguments)}function ot(t,e){var i=P(t.touches),n=this.targetIds;if(3&e&&1===i.length)return n[i[0].identifier]=!0,[i,i];var r,s,o=P(t.changedTouches),a=[],l=this.target;if(s=i.filter(function(t){return k(t.target,l)}),1===e)for(r=0;r<s.length;)n[s[r].identifier]=!0,r++;for(r=0;r<o.length;)n[o[r].identifier]&&a.push(o[r]),12&e&&delete n[o[r].identifier],r++;return a.length?[O(s.concat(a),"identifier",!0),a]:void 0}function at(){N.apply(this,arguments);var t=y(this.handler,this);this.touch=new st(this.manager,t),this.mouse=new q(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function lt(t,e){1&t?(this.primaryTouch=e.changedPointers[0].identifier,ct.call(this,e)):12&t&&ct.call(this,e)}function ct(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var i={x:e.clientX,y:e.clientY};this.lastTouches.push(i);var n=this.lastTouches;setTimeout(function(){var t=n.indexOf(i);t>-1&&n.splice(t,1)},2500)}}function ht(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,n=0;n<this.lastTouches.length;n++){var r=this.lastTouches[n],s=Math.abs(e-r.x),o=Math.abs(i-r.y);if(s<=25&&o<=25)return!0}return!1}_(st,N,{handler:function(t){var e=rt[t.type],i=ot.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:"touch",srcEvent:t})}}),_(at,N,{handler:function(t,e,i){var n="mouse"==i.pointerType;if(!(n&&i.sourceCapabilities&&i.sourceCapabilities.firesTouchEvents)){if("touch"==i.pointerType)lt.call(this,e,i);else if(n&&ht.call(this,i))return;this.callback(t,e,i)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var ut=M(h.style,"touchAction"),dt=void 0!==ut,pt=function(){if(!dt)return!1;var t={},e=r.CSS&&r.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(i){t[i]=!e||r.CSS.supports("touch-action",i)}),t}();function ft(t,e){this.manager=t,this.set(e)}function mt(t){this.options=l({},this.defaults,t||{}),this.id=T++,this.manager=null,this.options.enable=x(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function gt(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}function At(t){return 16==t?"down":8==t?"up":2==t?"left":4==t?"right":""}function bt(t,e){var i=e.manager;return i?i.get(t):t}function vt(){mt.apply(this,arguments)}function _t(){vt.apply(this,arguments),this.pX=null,this.pY=null}function yt(){vt.apply(this,arguments)}function wt(){mt.apply(this,arguments),this._timer=null,this._input=null}function xt(){vt.apply(this,arguments)}function Ct(){vt.apply(this,arguments)}function St(){mt.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function kt(t,e){return(e=e||{}).recognizers=x(e.recognizers,kt.defaults.preset),new Et(t,e)}function Et(t,e){this.options=l({},kt.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new(this.options.inputClass||(F?tt:L?st:V?at:q))(this,j),this.touchAction=new ft(this,this.options.touchAction),Dt(this,!0),g(this.options.recognizers,function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}function Dt(t,e){var i,n=t.element;n.style&&(g(t.options.cssProps,function(r,s){i=M(n.style,s),e?(t.oldCssProps[i]=n.style[i],n.style[i]=r):n.style[i]=t.oldCssProps[i]||""}),e||(t.oldCssProps={}))}ft.prototype={set:function(t){"compute"==t&&(t=this.compute()),dt&&this.manager.element.style&&pt[t]&&(this.manager.element.style[ut]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return g(this.manager.recognizers,function(e){w(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),function(t){if(E(t,"none"))return"none";var e=E(t,"pan-x"),i=E(t,"pan-y");return e&&i?"none":e||i?e?"pan-x":"pan-y":E(t,"manipulation")?"manipulation":"auto"}(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,i=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var n=this.actions,r=E(n,"none")&&!pt.none,s=E(n,"pan-y")&&!pt["pan-y"],o=E(n,"pan-x")&&!pt["pan-x"];if(r&&1===t.pointers.length&&t.distance<2&&t.deltaTime<250)return;if(!o||!s)return r||s&&6&i||o&&24&i?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}},mt.prototype={defaults:{},set:function(t){return l(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(m(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=bt(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return m(t,"dropRecognizeWith",this)||(t=bt(t,this),delete this.simultaneous[t.id]),this},requireFailure:function(t){if(m(t,"requireFailure",this))return this;var e=this.requireFail;return-1===I(e,t=bt(t,this))&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(m(t,"dropRequireFailure",this))return this;t=bt(t,this);var e=I(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,i=this.state;function n(i){e.manager.emit(i,t)}i<8&&n(e.options.event+gt(i)),n(e.options.event),t.additionalEvent&&n(t.additionalEvent),i>=8&&n(e.options.event+gt(i))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0},recognize:function(t){var e=l({},t);if(!w(this.options.enable,[this,e]))return this.reset(),void(this.state=32);56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},process:function(t){},getTouchAction:function(){},reset:function(){}},_(vt,mt,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,i=t.eventType,n=6&e,r=this.attrTest(t);return n&&(8&i||!r)?16|e:n||r?4&i?8|e:2&e?4|e:2:32}}),_(_t,vt,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var t=this.options.direction,e=[];return 6&t&&e.push("pan-y"),24&t&&e.push("pan-x"),e},directionTest:function(t){var e=this.options,i=!0,n=t.distance,r=t.direction,s=t.deltaX,o=t.deltaY;return r&e.direction||(6&e.direction?(r=0===s?1:s<0?2:4,i=s!=this.pX,n=Math.abs(t.deltaX)):(r=0===o?1:o<0?8:16,i=o!=this.pY,n=Math.abs(t.deltaY))),t.direction=r,i&&n>e.threshold&&r&e.direction},attrTest:function(t){return vt.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=At(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),_(yt,vt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){1!==t.scale&&(t.additionalEvent=this.options.event+(t.scale<1?"in":"out")),this._super.emit.call(this,t)}}),_(wt,mt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distance<e.threshold,r=t.deltaTime>e.time;if(this._input=t,!n||!i||12&t.eventType&&!r)this.reset();else if(1&t.eventType)this.reset(),this._timer=f(function(){this.state=8,this.tryEmit()},e.time,this);else if(4&t.eventType)return 8;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&4&t.eventType?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=p(),this.manager.emit(this.options.event,this._input)))}}),_(xt,vt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),_(Ct,vt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return _t.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return 30&i?e=t.overallVelocity:6&i?e=t.overallVelocityX:24&i&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&d(e)>this.options.velocity&&4&t.eventType},emit:function(t){var e=At(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),_(St,mt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return["manipulation"]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distance<e.threshold,r=t.deltaTime<e.time;if(this.reset(),1&t.eventType&&0===this.count)return this.failTimeout();if(n&&r&&i){if(4!=t.eventType)return this.failTimeout();var s=!this.pTime||t.timeStamp-this.pTime<e.interval,o=!this.pCenter||G(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,o&&s?this.count+=1:this.count=1,this._input=t,0==this.count%e.taps)return this.hasRequireFailures()?(this._timer=f(function(){this.state=8,this.tryEmit()},e.interval,this),2):8}return 32},failTimeout:function(){return this._timer=f(function(){this.state=32},this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),kt.VERSION="2.0.7",kt.defaults={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,preset:[[xt,{enable:!1}],[yt,{enable:!1},["rotate"]],[Ct,{direction:6}],[_t,{direction:6},["swipe"]],[St],[St,{event:"doubletap",taps:2},["tap"]],[wt]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Et.prototype={set:function(t){return l(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e=this.session;if(!e.stopped){var i;this.touchAction.preventDefaults(t);var n=this.recognizers,r=e.curRecognizer;(!r||r&&8&r.state)&&(r=e.curRecognizer=null);for(var s=0;s<n.length;)i=n[s],2===e.stopped||r&&i!=r&&!i.canRecognizeWith(r)?i.reset():i.recognize(t),!r&&14&i.state&&(r=e.curRecognizer=i),s++}},get:function(t){if(t instanceof mt)return t;for(var e=this.recognizers,i=0;i<e.length;i++)if(e[i].options.event==t)return e[i];return null},add:function(t){if(m(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(m(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,i=I(e,t);-1!==i&&(e.splice(i,1),this.touchAction.update())}return this},on:function(t,e){if(void 0!==t&&void 0!==e){var i=this.handlers;return g(D(t),function(t){i[t]=i[t]||[],i[t].push(e)}),this}},off:function(t,e){if(void 0!==t){var i=this.handlers;return g(D(t),function(t){e?i[t]&&i[t].splice(I(i[t],e),1):delete i[t]}),this}},emit:function(t,e){this.options.domEvents&&function(t,e){var i=s.createEvent("Event");i.initEvent(t,!0,!0),i.gesture=e,e.target.dispatchEvent(i)}(t,e);var i=this.handlers[t]&&this.handlers[t].slice();if(i&&i.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var n=0;n<i.length;)i[n](e),n++}},destroy:function(){this.element&&Dt(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},l(kt,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:32,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:24,DIRECTION_ALL:30,Manager:Et,Input:N,TouchAction:ft,TouchInput:st,MouseInput:q,PointerEventInput:tt,TouchMouseInput:at,SingleTouchInput:it,Recognizer:mt,AttrRecognizer:vt,Tap:St,Pan:_t,Swipe:Ct,Pinch:yt,Rotate:xt,Press:wt,on:C,off:S,each:g,merge:v,extend:b,assign:l,inherit:_,bindFn:y,prefixed:M}),(void 0!==r?r:"undefined"!=typeof self?self:{}).Hammer=kt,void 0===(n=(function(){return kt}).call(e,i,e,t))||(t.exports=n)}(window,document)},"z+Ro":function(t,e,i){"use strict";function n(t){return t&&"function"==typeof t.schedule}i.d(e,"a",function(){return n})},zUnb:function(t,e,i){"use strict";i.r(e);var n={};i.r(n),i.d(n,"FunctionToString",function(){return hit}),i.d(n,"InboundFilters",function(){return dit});var r=i("fXoL");let s=null;function o(){return s}const a=new r.s("DocumentToken");let l=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(r.Lb)({factory:c,token:t,providedIn:"platform"}),t})();function c(){return Object(r.Zb)(u)}const h=new r.s("Location Initialized");let u=(()=>{class t extends l{constructor(t){super(),this._doc=t,this._init()}_init(){this.location=o().getLocation(),this._history=o().getHistory()}getBaseHrefFromDOM(){return o().getBaseHref(this._doc)}onPopState(t){o().getGlobalEventTarget(this._doc,"window").addEventListener("popstate",t,!1)}onHashChange(t){o().getGlobalEventTarget(this._doc,"window").addEventListener("hashchange",t,!1)}get href(){return this.location.href}get protocol(){return this.location.protocol}get hostname(){return this.location.hostname}get port(){return this.location.port}get pathname(){return this.location.pathname}get search(){return this.location.search}get hash(){return this.location.hash}set pathname(t){this.location.pathname=t}pushState(t,e,i){d()?this._history.pushState(t,e,i):this.location.hash=i}replaceState(t,e,i){d()?this._history.replaceState(t,e,i):this.location.hash=i}forward(){this._history.forward()}back(){this._history.back()}getState(){return this._history.state}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(a))},t.\u0275prov=Object(r.Lb)({factory:p,token:t,providedIn:"platform"}),t})();function d(){return!!window.history.pushState}function p(){return new u(Object(r.Zb)(a))}function f(t,e){if(0==t.length)return e;if(0==e.length)return t;let i=0;return t.endsWith("/")&&i++,e.startsWith("/")&&i++,2==i?t+e.substring(1):1==i?t+e:t+"/"+e}function m(t){const e=t.match(/#|\?|$/),i=e&&e.index||t.length;return t.slice(0,i-("/"===t[i-1]?1:0))+t.slice(i)}function g(t){return t&&"?"!==t[0]?"?"+t:t}let A=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(r.Lb)({factory:b,token:t,providedIn:"root"}),t})();function b(t){const e=Object(r.Zb)(a).location;return new _(Object(r.Zb)(l),e&&e.origin||"")}const v=new r.s("appBaseHref");let _=(()=>{class t extends A{constructor(t,e){if(super(),this._platformLocation=t,null==e&&(e=this._platformLocation.getBaseHrefFromDOM()),null==e)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");this._baseHref=e}onPopState(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)}getBaseHref(){return this._baseHref}prepareExternalUrl(t){return f(this._baseHref,t)}path(t=!1){const e=this._platformLocation.pathname+g(this._platformLocation.search),i=this._platformLocation.hash;return i&&t?`${e}${i}`:e}pushState(t,e,i,n){const r=this.prepareExternalUrl(i+g(n));this._platformLocation.pushState(t,e,r)}replaceState(t,e,i,n){const r=this.prepareExternalUrl(i+g(n));this._platformLocation.replaceState(t,e,r)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(l),r.Zb(v,8))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),y=(()=>{class t extends A{constructor(t,e){super(),this._platformLocation=t,this._baseHref="",null!=e&&(this._baseHref=e)}onPopState(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)}getBaseHref(){return this._baseHref}path(t=!1){let e=this._platformLocation.hash;return null==e&&(e="#"),e.length>0?e.substring(1):e}prepareExternalUrl(t){const e=f(this._baseHref,t);return e.length>0?"#"+e:e}pushState(t,e,i,n){let r=this.prepareExternalUrl(i+g(n));0==r.length&&(r=this._platformLocation.pathname),this._platformLocation.pushState(t,e,r)}replaceState(t,e,i,n){let r=this.prepareExternalUrl(i+g(n));0==r.length&&(r=this._platformLocation.pathname),this._platformLocation.replaceState(t,e,r)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(l),r.Zb(v,8))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),w=(()=>{class t{constructor(t,e){this._subject=new r.o,this._urlChangeListeners=[],this._platformStrategy=t;const i=this._platformStrategy.getBaseHref();this._platformLocation=e,this._baseHref=m(C(i)),this._platformStrategy.onPopState(t=>{this._subject.emit({url:this.path(!0),pop:!0,state:t.state,type:t.type})})}path(t=!1){return this.normalize(this._platformStrategy.path(t))}getState(){return this._platformLocation.getState()}isCurrentPathEqualTo(t,e=""){return this.path()==this.normalize(t+g(e))}normalize(e){return t.stripTrailingSlash(function(t,e){return t&&e.startsWith(t)?e.substring(t.length):e}(this._baseHref,C(e)))}prepareExternalUrl(t){return t&&"/"!==t[0]&&(t="/"+t),this._platformStrategy.prepareExternalUrl(t)}go(t,e="",i=null){this._platformStrategy.pushState(i,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+g(e)),i)}replaceState(t,e="",i=null){this._platformStrategy.replaceState(i,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+g(e)),i)}forward(){this._platformStrategy.forward()}back(){this._platformStrategy.back()}onUrlChange(t){this._urlChangeListeners.push(t),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(t=>{this._notifyUrlChangeListeners(t.url,t.state)}))}_notifyUrlChangeListeners(t="",e){this._urlChangeListeners.forEach(i=>i(t,e))}subscribe(t,e,i){return this._subject.subscribe({next:t,error:e,complete:i})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(A),r.Zb(l))},t.normalizeQueryParams=g,t.joinWithSlash=f,t.stripTrailingSlash=m,t.\u0275prov=Object(r.Lb)({factory:x,token:t,providedIn:"root"}),t})();function x(){return new w(Object(r.Zb)(A),Object(r.Zb)(l))}function C(t){return t.replace(/\/index.html$/,"")}var S=function(t){return t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Few=3]="Few",t[t.Many=4]="Many",t[t.Other=5]="Other",t}({}),k=function(t){return t[t.Format=0]="Format",t[t.Standalone=1]="Standalone",t}({}),E=function(t){return t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short",t}({}),D=function(t){return t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full",t}({}),I=function(t){return t[t.Decimal=0]="Decimal",t[t.Group=1]="Group",t[t.List=2]="List",t[t.PercentSign=3]="PercentSign",t[t.PlusSign=4]="PlusSign",t[t.MinusSign=5]="MinusSign",t[t.Exponential=6]="Exponential",t[t.SuperscriptingExponent=7]="SuperscriptingExponent",t[t.PerMille=8]="PerMille",t[t[1/0]=9]="Infinity",t[t.NaN=10]="NaN",t[t.TimeSeparator=11]="TimeSeparator",t[t.CurrencyDecimal=12]="CurrencyDecimal",t[t.CurrencyGroup=13]="CurrencyGroup",t}({});function P(t,e){return F(Object(r.mb)(t)[r.db.DateFormat],e)}function O(t,e){return F(Object(r.mb)(t)[r.db.TimeFormat],e)}function M(t,e){return F(Object(r.mb)(t)[r.db.DateTimeFormat],e)}function T(t,e){const i=Object(r.mb)(t),n=i[r.db.NumberSymbols][e];if(void 0===n){if(e===I.CurrencyDecimal)return i[r.db.NumberSymbols][I.Decimal];if(e===I.CurrencyGroup)return i[r.db.NumberSymbols][I.Group]}return n}const R=r.pb;function V(t){if(!t[r.db.ExtraData])throw new Error(`Missing extra locale data for the locale "${t[r.db.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function F(t,e){for(let i=e;i>-1;i--)if(void 0!==t[i])return t[i];throw new Error("Locale data API: locale data undefined")}function L(t){const[e,i]=t.split(":");return{hours:+e,minutes:+i}}const U=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,B={},N=/((?:[^GyYMLwWdEabBhHmsSzZO']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;var j=function(t){return t[t.Short=0]="Short",t[t.ShortGMT=1]="ShortGMT",t[t.Long=2]="Long",t[t.Extended=3]="Extended",t}({}),z=function(t){return t[t.FullYear=0]="FullYear",t[t.Month=1]="Month",t[t.Date=2]="Date",t[t.Hours=3]="Hours",t[t.Minutes=4]="Minutes",t[t.Seconds=5]="Seconds",t[t.FractionalSeconds=6]="FractionalSeconds",t[t.Day=7]="Day",t}({}),H=function(t){return t[t.DayPeriods=0]="DayPeriods",t[t.Days=1]="Days",t[t.Months=2]="Months",t[t.Eras=3]="Eras",t}({});function K(t,e,i,n){let r=function(t){if(nt(t))return t;if("number"==typeof t&&!isNaN(t))return new Date(t);if("string"==typeof t){if(t=t.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(t)){const[e,i=1,n=1]=t.split("-").map(t=>+t);return $(e,i-1,n)}const e=parseFloat(t);if(!isNaN(t-e))return new Date(e);let i;if(i=t.match(U))return function(t){const e=new Date(0);let i=0,n=0;const r=t[8]?e.setUTCFullYear:e.setFullYear,s=t[8]?e.setUTCHours:e.setHours;t[9]&&(i=Number(t[9]+t[10]),n=Number(t[9]+t[11])),r.call(e,Number(t[1]),Number(t[2])-1,Number(t[3]));const o=Number(t[4]||0)-i,a=Number(t[5]||0)-n,l=Number(t[6]||0),c=Math.floor(1e3*parseFloat("0."+(t[7]||0)));return s.call(e,o,a,l,c),e}(i)}const e=new Date(t);if(!nt(e))throw new Error(`Unable to convert "${t}" into a date`);return e}(t);e=G(i,e)||e;let s,o=[];for(;e;){if(s=N.exec(e),!s){o.push(e);break}{o=o.concat(s.slice(1));const t=o.pop();if(!t)break;e=t}}let a=r.getTimezoneOffset();n&&(a=it(n,a),r=function(t,e,i){const n=t.getTimezoneOffset();return function(t,e){return(t=new Date(t.getTime())).setMinutes(t.getMinutes()+e),t}(t,-1*(it(e,n)-n))}(r,n));let l="";return o.forEach(t=>{const e=function(t){if(et[t])return et[t];let e;switch(t){case"G":case"GG":case"GGG":e=Y(H.Eras,E.Abbreviated);break;case"GGGG":e=Y(H.Eras,E.Wide);break;case"GGGGG":e=Y(H.Eras,E.Narrow);break;case"y":e=q(z.FullYear,1,0,!1,!0);break;case"yy":e=q(z.FullYear,2,0,!0,!0);break;case"yyy":e=q(z.FullYear,3,0,!1,!0);break;case"yyyy":e=q(z.FullYear,4,0,!1,!0);break;case"Y":e=tt(1);break;case"YY":e=tt(2,!0);break;case"YYY":e=tt(3);break;case"YYYY":e=tt(4);break;case"M":case"L":e=q(z.Month,1,1);break;case"MM":case"LL":e=q(z.Month,2,1);break;case"MMM":e=Y(H.Months,E.Abbreviated);break;case"MMMM":e=Y(H.Months,E.Wide);break;case"MMMMM":e=Y(H.Months,E.Narrow);break;case"LLL":e=Y(H.Months,E.Abbreviated,k.Standalone);break;case"LLLL":e=Y(H.Months,E.Wide,k.Standalone);break;case"LLLLL":e=Y(H.Months,E.Narrow,k.Standalone);break;case"w":e=J(1);break;case"ww":e=J(2);break;case"W":e=J(1,!0);break;case"d":e=q(z.Date,1);break;case"dd":e=q(z.Date,2);break;case"E":case"EE":case"EEE":e=Y(H.Days,E.Abbreviated);break;case"EEEE":e=Y(H.Days,E.Wide);break;case"EEEEE":e=Y(H.Days,E.Narrow);break;case"EEEEEE":e=Y(H.Days,E.Short);break;case"a":case"aa":case"aaa":e=Y(H.DayPeriods,E.Abbreviated);break;case"aaaa":e=Y(H.DayPeriods,E.Wide);break;case"aaaaa":e=Y(H.DayPeriods,E.Narrow);break;case"b":case"bb":case"bbb":e=Y(H.DayPeriods,E.Abbreviated,k.Standalone,!0);break;case"bbbb":e=Y(H.DayPeriods,E.Wide,k.Standalone,!0);break;case"bbbbb":e=Y(H.DayPeriods,E.Narrow,k.Standalone,!0);break;case"B":case"BB":case"BBB":e=Y(H.DayPeriods,E.Abbreviated,k.Format,!0);break;case"BBBB":e=Y(H.DayPeriods,E.Wide,k.Format,!0);break;case"BBBBB":e=Y(H.DayPeriods,E.Narrow,k.Format,!0);break;case"h":e=q(z.Hours,1,-12);break;case"hh":e=q(z.Hours,2,-12);break;case"H":e=q(z.Hours,1);break;case"HH":e=q(z.Hours,2);break;case"m":e=q(z.Minutes,1);break;case"mm":e=q(z.Minutes,2);break;case"s":e=q(z.Seconds,1);break;case"ss":e=q(z.Seconds,2);break;case"S":e=q(z.FractionalSeconds,1);break;case"SS":e=q(z.FractionalSeconds,2);break;case"SSS":e=q(z.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":e=Q(j.Short);break;case"ZZZZZ":e=Q(j.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":e=Q(j.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":e=Q(j.Long);break;default:return null}return et[t]=e,e}(t);l+=e?e(r,i,a):"''"===t?"'":t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}function $(t,e,i){const n=new Date(0);return n.setFullYear(t,e,i),n.setHours(0,0,0),n}function G(t,e){const i=function(t){return Object(r.mb)(t)[r.db.LocaleId]}(t);if(B[i]=B[i]||{},B[i][e])return B[i][e];let n="";switch(e){case"shortDate":n=P(t,D.Short);break;case"mediumDate":n=P(t,D.Medium);break;case"longDate":n=P(t,D.Long);break;case"fullDate":n=P(t,D.Full);break;case"shortTime":n=O(t,D.Short);break;case"mediumTime":n=O(t,D.Medium);break;case"longTime":n=O(t,D.Long);break;case"fullTime":n=O(t,D.Full);break;case"short":const e=G(t,"shortTime"),i=G(t,"shortDate");n=W(M(t,D.Short),[e,i]);break;case"medium":const r=G(t,"mediumTime"),s=G(t,"mediumDate");n=W(M(t,D.Medium),[r,s]);break;case"long":const o=G(t,"longTime"),a=G(t,"longDate");n=W(M(t,D.Long),[o,a]);break;case"full":const l=G(t,"fullTime"),c=G(t,"fullDate");n=W(M(t,D.Full),[l,c])}return n&&(B[i][e]=n),n}function W(t,e){return e&&(t=t.replace(/\{([^}]+)}/g,function(t,i){return null!=e&&i in e?e[i]:t})),t}function Z(t,e,i="-",n,r){let s="";(t<0||r&&t<=0)&&(r?t=1-t:(t=-t,s=i));let o=String(t);for(;o.length<e;)o="0"+o;return n&&(o=o.substr(o.length-e)),s+o}function q(t,e,i=0,n=!1,r=!1){return function(s,o){let a=function(t,e){switch(t){case z.FullYear:return e.getFullYear();case z.Month:return e.getMonth();case z.Date:return e.getDate();case z.Hours:return e.getHours();case z.Minutes:return e.getMinutes();case z.Seconds:return e.getSeconds();case z.FractionalSeconds:return e.getMilliseconds();case z.Day:return e.getDay();default:throw new Error(`Unknown DateType value "${t}".`)}}(t,s);if((i>0||a>-i)&&(a+=i),t===z.Hours)0===a&&-12===i&&(a=12);else if(t===z.FractionalSeconds)return l=e,Z(a,3).substr(0,l);var l;const c=T(o,I.MinusSign);return Z(a,e,c,n,r)}}function Y(t,e,i=k.Format,n=!1){return function(s,o){return function(t,e,i,n,s,o){switch(i){case H.Months:return function(t,e,i){const n=Object(r.mb)(t),s=F([n[r.db.MonthsFormat],n[r.db.MonthsStandalone]],e);return F(s,i)}(e,s,n)[t.getMonth()];case H.Days:return function(t,e,i){const n=Object(r.mb)(t),s=F([n[r.db.DaysFormat],n[r.db.DaysStandalone]],e);return F(s,i)}(e,s,n)[t.getDay()];case H.DayPeriods:const a=t.getHours(),l=t.getMinutes();if(o){const t=function(t){const e=Object(r.mb)(t);return V(e),(e[r.db.ExtraData][2]||[]).map(t=>"string"==typeof t?L(t):[L(t[0]),L(t[1])])}(e),i=function(t,e,i){const n=Object(r.mb)(t);V(n);const s=F([n[r.db.ExtraData][0],n[r.db.ExtraData][1]],e)||[];return F(s,i)||[]}(e,s,n),o=t.findIndex(t=>{if(Array.isArray(t)){const[e,i]=t,n=a>=e.hours&&l>=e.minutes,r=a<i.hours||a===i.hours&&l<i.minutes;if(e.hours<i.hours){if(n&&r)return!0}else if(n||r)return!0}else if(t.hours===a&&t.minutes===l)return!0;return!1});if(-1!==o)return i[o]}return function(t,e,i){const n=Object(r.mb)(t),s=F([n[r.db.DayPeriodsFormat],n[r.db.DayPeriodsStandalone]],e);return F(s,i)}(e,s,n)[a<12?0:1];case H.Eras:return function(t,e){return F(Object(r.mb)(t)[r.db.Eras],e)}(e,n)[t.getFullYear()<=0?0:1];default:throw new Error(`unexpected translation type ${i}`)}}(s,o,t,e,i,n)}}function Q(t){return function(e,i,n){const r=-1*n,s=T(i,I.MinusSign),o=r>0?Math.floor(r/60):Math.ceil(r/60);switch(t){case j.Short:return(r>=0?"+":"")+Z(o,2,s)+Z(Math.abs(r%60),2,s);case j.ShortGMT:return"GMT"+(r>=0?"+":"")+Z(o,1,s);case j.Long:return"GMT"+(r>=0?"+":"")+Z(o,2,s)+":"+Z(Math.abs(r%60),2,s);case j.Extended:return 0===n?"Z":(r>=0?"+":"")+Z(o,2,s)+":"+Z(Math.abs(r%60),2,s);default:throw new Error(`Unknown zone width "${t}"`)}}}function X(t){return $(t.getFullYear(),t.getMonth(),t.getDate()+(4-t.getDay()))}function J(t,e=!1){return function(i,n){let r;if(e){const t=new Date(i.getFullYear(),i.getMonth(),1).getDay()-1,e=i.getDate();r=1+Math.floor((e+t)/7)}else{const t=X(i),e=function(t){const e=$(t,0,1).getDay();return $(t,0,1+(e<=4?4:11)-e)}(t.getFullYear()),n=t.getTime()-e.getTime();r=1+Math.round(n/6048e5)}return Z(r,t,T(n,I.MinusSign))}}function tt(t,e=!1){return function(i,n){return Z(X(i).getFullYear(),t,T(n,I.MinusSign),e)}}const et={};function it(t,e){t=t.replace(/:/g,"");const i=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(i)?e:i}function nt(t){return t instanceof Date&&!isNaN(t.valueOf())}class rt{}let st=(()=>{class t extends rt{constructor(t){super(),this.locale=t}getPluralCategory(t,e){switch(R(e||this.locale)(t)){case S.Zero:return"zero";case S.One:return"one";case S.Two:return"two";case S.Few:return"few";case S.Many:return"many";default:return"other"}}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.w))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();function ot(t,e){e=encodeURIComponent(e);for(const i of t.split(";")){const t=i.indexOf("="),[n,r]=-1==t?[i,""]:[i.slice(0,t),i.slice(t+1)];if(n.trim()===e)return decodeURIComponent(r)}return null}let at=(()=>{class t{constructor(t,e,i,n){this._iterableDiffers=t,this._keyValueDiffers=e,this._ngEl=i,this._renderer=n,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}set klass(t){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof t?t.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}set ngClass(t){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof t?t.split(/\s+/):t,this._rawClass&&(Object(r.sb)(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}ngDoCheck(){if(this._iterableDiffer){const t=this._iterableDiffer.diff(this._rawClass);t&&this._applyIterableChanges(t)}else if(this._keyValueDiffer){const t=this._keyValueDiffer.diff(this._rawClass);t&&this._applyKeyValueChanges(t)}}_applyKeyValueChanges(t){t.forEachAddedItem(t=>this._toggleClass(t.key,t.currentValue)),t.forEachChangedItem(t=>this._toggleClass(t.key,t.currentValue)),t.forEachRemovedItem(t=>{t.previousValue&&this._toggleClass(t.key,!1)})}_applyIterableChanges(t){t.forEachAddedItem(t=>{if("string"!=typeof t.item)throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${Object(r.yb)(t.item)}`);this._toggleClass(t.item,!0)}),t.forEachRemovedItem(t=>this._toggleClass(t.item,!1))}_applyClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(t=>this._toggleClass(t,!0)):Object.keys(t).forEach(e=>this._toggleClass(e,!!t[e])))}_removeClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(t=>this._toggleClass(t,!1)):Object.keys(t).forEach(t=>this._toggleClass(t,!1)))}_toggleClass(t,e){(t=t.trim())&&t.split(/\s+/g).forEach(t=>{e?this._renderer.addClass(this._ngEl.nativeElement,t):this._renderer.removeClass(this._ngEl.nativeElement,t)})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.u),r.Pb(r.v),r.Pb(r.l),r.Pb(r.H))},t.\u0275dir=r.Kb({type:t,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),t})();class lt{constructor(t,e,i,n){this.$implicit=t,this.ngForOf=e,this.index=i,this.count=n}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let ct=(()=>{class t{constructor(t,e,i){this._viewContainer=t,this._template=e,this._differs=i,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const e=this._ngForOf;if(!this._differ&&e)try{this._differ=this._differs.find(e).create(this.ngForTrackBy)}catch(Knt){throw new Error(`Cannot find a differ supporting object '${e}' of type '${t=e,t.name||typeof t}'. NgFor only supports binding to Iterables such as Arrays.`)}}var t;if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const e=[];t.forEachOperation((t,i,n)=>{if(null==t.previousIndex){const i=this._viewContainer.createEmbeddedView(this._template,new lt(null,this._ngForOf,-1,-1),null===n?void 0:n),r=new ht(t,i);e.push(r)}else if(null==n)this._viewContainer.remove(null===i?void 0:i);else if(null!==i){const r=this._viewContainer.get(i);this._viewContainer.move(r,n);const s=new ht(t,r);e.push(s)}});for(let i=0;i<e.length;i++)this._perViewChange(e[i].view,e[i].record);for(let i=0,n=this._viewContainer.length;i<n;i++){const t=this._viewContainer.get(i);t.context.index=i,t.context.count=n,t.context.ngForOf=this._ngForOf}t.forEachIdentityChange(t=>{this._viewContainer.get(t.currentIndex).context.$implicit=t.item})}_perViewChange(t,e){t.context.$implicit=e.item}static ngTemplateContextGuard(t,e){return!0}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.S),r.Pb(r.O),r.Pb(r.u))},t.\u0275dir=r.Kb({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),t})();class ht{constructor(t,e){this.record=t,this.view=e}}let ut=(()=>{class t{constructor(t,e){this._viewContainer=t,this._context=new dt,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=e}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){pt("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){pt("ngIfElse",t),this._elseTemplateRef=t,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(t,e){return!0}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.S),r.Pb(r.O))},t.\u0275dir=r.Kb({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),t})();class dt{constructor(){this.$implicit=null,this.ngIf=null}}function pt(t,e){if(e&&!e.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${Object(r.yb)(e)}'.`)}class ft{constructor(t,e){this._viewContainerRef=t,this._templateRef=e,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(t){t&&!this._created?this.create():!t&&this._created&&this.destroy()}}let mt=(()=>{class t{constructor(){this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(t){this._ngSwitch=t,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(t){this._defaultViews||(this._defaultViews=[]),this._defaultViews.push(t)}_matchCase(t){const e=t==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||e,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),e}_updateDefaultCases(t){if(this._defaultViews&&t!==this._defaultUsed){this._defaultUsed=t;for(let e=0;e<this._defaultViews.length;e++)this._defaultViews[e].enforceState(t)}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"}}),t})(),gt=(()=>{class t{constructor(t,e,i){this.ngSwitch=i,i._addCase(),this._view=new ft(t,e)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.S),r.Pb(r.O),r.Pb(mt,1))},t.\u0275dir=r.Kb({type:t,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"}}),t})(),At=(()=>{class t{constructor(t,e,i){i._addDefault(new ft(t,e))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.S),r.Pb(r.O),r.Pb(mt,1))},t.\u0275dir=r.Kb({type:t,selectors:[["","ngSwitchDefault",""]]}),t})(),bt=(()=>{class t{constructor(t,e,i){this._ngEl=t,this._differs=e,this._renderer=i,this._ngStyle=null,this._differ=null}set ngStyle(t){this._ngStyle=t,!this._differ&&t&&(this._differ=this._differs.find(t).create())}ngDoCheck(){if(this._differ){const t=this._differ.diff(this._ngStyle);t&&this._applyChanges(t)}}_setStyle(t,e){const[i,n]=t.split(".");null!=(e=null!=e&&n?`${e}${n}`:e)?this._renderer.setStyle(this._ngEl.nativeElement,i,e):this._renderer.removeStyle(this._ngEl.nativeElement,i)}_applyChanges(t){t.forEachRemovedItem(t=>this._setStyle(t.key,null)),t.forEachAddedItem(t=>this._setStyle(t.key,t.currentValue)),t.forEachChangedItem(t=>this._setStyle(t.key,t.currentValue))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.v),r.Pb(r.H))},t.\u0275dir=r.Kb({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}}),t})(),vt=(()=>{class t{constructor(t){this._viewContainerRef=t,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null}ngOnChanges(t){if(this._shouldRecreateView(t)){const t=this._viewContainerRef;this._viewRef&&t.remove(t.indexOf(this._viewRef)),this._viewRef=this.ngTemplateOutlet?t.createEmbeddedView(this.ngTemplateOutlet,this.ngTemplateOutletContext):null}else this._viewRef&&this.ngTemplateOutletContext&&this._updateExistingContext(this.ngTemplateOutletContext)}_shouldRecreateView(t){const e=t.ngTemplateOutletContext;return!!t.ngTemplateOutlet||e&&this._hasContextShapeChanged(e)}_hasContextShapeChanged(t){const e=Object.keys(t.previousValue||{}),i=Object.keys(t.currentValue||{});if(e.length===i.length){for(let t of i)if(-1===e.indexOf(t))return!0;return!1}return!0}_updateExistingContext(t){for(let e of Object.keys(t))this._viewRef.context[e]=this.ngTemplateOutletContext[e]}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.S))},t.\u0275dir=r.Kb({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet"},features:[r.Bb]}),t})();function _t(t,e){return Error(`InvalidPipeArgument: '${e}' for pipe '${Object(r.yb)(t)}'`)}class yt{createSubscription(t,e){return t.subscribe({next:e,error:t=>{throw t}})}dispose(t){t.unsubscribe()}onDestroy(t){t.unsubscribe()}}class wt{createSubscription(t,e){return t.then(e,t=>{throw t})}dispose(t){}onDestroy(t){}}const xt=new wt,Ct=new yt;let St=(()=>{class t{constructor(t){this._ref=t,this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null}ngOnDestroy(){this._subscription&&this._dispose()}transform(t){return this._obj?t!==this._obj?(this._dispose(),this.transform(t)):this._latestValue:(t&&this._subscribe(t),this._latestValue)}_subscribe(t){this._obj=t,this._strategy=this._selectStrategy(t),this._subscription=this._strategy.createSubscription(t,e=>this._updateLatestValue(t,e))}_selectStrategy(e){if(Object(r.ub)(e))return xt;if(Object(r.vb)(e))return Ct;throw _t(t,e)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(t,e){t===this._obj&&(this._latestValue=e,this._ref.markForCheck())}}return t.\u0275fac=function(e){return new(e||t)(r.bc())},t.\u0275pipe=r.Ob({name:"async",type:t,pure:!1}),t})(),kt=(()=>{class t{constructor(t){this.locale=t}transform(e,i="mediumDate",n,r){if(null==e||""===e||e!=e)return null;try{return K(e,i,r||this.locale,n)}catch(s){throw _t(t,s.message)}}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.w))},t.\u0275pipe=r.Ob({name:"date",type:t,pure:!0}),t})(),Et=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[{provide:rt,useClass:st}]}),t})();function Dt(t){return"browser"===t}let It=(()=>{class t{}return t.\u0275prov=Object(r.Lb)({token:t,providedIn:"root",factory:()=>new Pt(Object(r.Zb)(a),window)}),t})();class Pt{constructor(t,e){this.document=t,this.window=e,this.offset=()=>[0,0]}setOffset(t){this.offset=Array.isArray(t)?()=>t:t}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(t){this.supportsScrolling()&&this.window.scrollTo(t[0],t[1])}scrollToAnchor(t){var e;if(!this.supportsScrolling())return;const i=null!==(e=this.document.getElementById(t))&&void 0!==e?e:this.document.getElementsByName(t)[0];void 0!==i&&(this.scrollToElement(i),this.attemptFocus(i))}setHistoryScrollRestoration(t){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=t)}}scrollToElement(t){const e=t.getBoundingClientRect(),i=e.left+this.window.pageXOffset,n=e.top+this.window.pageYOffset,r=this.offset();this.window.scrollTo(i-r[0],n-r[1])}attemptFocus(t){return t.focus(),this.document.activeElement===t}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const t=Ot(this.window.history)||Ot(Object.getPrototypeOf(this.window.history));return!(!t||!t.writable&&!t.set)}catch(Knt){return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch(Knt){return!1}}}function Ot(t){return Object.getOwnPropertyDescriptor(t,"scrollRestoration")}class Mt extends class extends class{}{constructor(){super()}supportsDOMEvents(){return!0}}{static makeCurrent(){var t;t=new Mt,s||(s=t)}getProperty(t,e){return t[e]}log(t){window.console&&window.console.log&&window.console.log(t)}logGroup(t){window.console&&window.console.group&&window.console.group(t)}logGroupEnd(){window.console&&window.console.groupEnd&&window.console.groupEnd()}onAndCancel(t,e,i){return t.addEventListener(e,i,!1),()=>{t.removeEventListener(e,i,!1)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){return t.parentNode&&t.parentNode.removeChild(t),t}getValue(t){return t.value}createElement(t,e){return(e=e||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null}getHistory(){return window.history}getLocation(){return window.location}getBaseHref(t){const e=Rt||(Rt=document.querySelector("base"),Rt)?Rt.getAttribute("href"):null;return null==e?null:(i=e,Tt||(Tt=document.createElement("a")),Tt.setAttribute("href",i),"/"===Tt.pathname.charAt(0)?Tt.pathname:"/"+Tt.pathname);var i}resetBaseElement(){Rt=null}getUserAgent(){return window.navigator.userAgent}performanceNow(){return window.performance&&window.performance.now?window.performance.now():(new Date).getTime()}supportsCookies(){return!0}getCookie(t){return ot(document.cookie,t)}}let Tt,Rt=null;const Vt=new r.s("TRANSITION_ID"),Ft=[{provide:r.d,useFactory:function(t,e,i){return()=>{i.get(r.e).donePromise.then(()=>{const i=o();Array.prototype.slice.apply(e.querySelectorAll("style[ng-transition]")).filter(e=>e.getAttribute("ng-transition")===t).forEach(t=>i.remove(t))})}},deps:[Vt,a,r.t],multi:!0}];class Lt{static init(){Object(r.ab)(new Lt)}addToWindow(t){r.rb.getAngularTestability=(e,i=!0)=>{const n=t.findTestabilityInTree(e,i);if(null==n)throw new Error("Could not find testability for element.");return n},r.rb.getAllAngularTestabilities=()=>t.getAllTestabilities(),r.rb.getAllAngularRootElements=()=>t.getAllRootElements(),r.rb.frameworkStabilizers||(r.rb.frameworkStabilizers=[]),r.rb.frameworkStabilizers.push(t=>{const e=r.rb.getAllAngularTestabilities();let i=e.length,n=!1;const s=function(e){n=n||e,i--,0==i&&t(n)};e.forEach(function(t){t.whenStable(s)})})}findTestabilityInTree(t,e,i){if(null==e)return null;const n=t.getTestability(e);return null!=n?n:i?o().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null}}const Ut=new r.s("EventManagerPlugins");let Bt=(()=>{class t{constructor(t,e){this._zone=e,this._eventNameToPlugin=new Map,t.forEach(t=>t.manager=this),this._plugins=t.slice().reverse()}addEventListener(t,e,i){return this._findPluginFor(e).addEventListener(t,e,i)}addGlobalEventListener(t,e,i){return this._findPluginFor(e).addGlobalEventListener(t,e,i)}getZone(){return this._zone}_findPluginFor(t){const e=this._eventNameToPlugin.get(t);if(e)return e;const i=this._plugins;for(let n=0;n<i.length;n++){const e=i[n];if(e.supports(t))return this._eventNameToPlugin.set(t,e),e}throw new Error(`No event manager plugin found for event ${t}`)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Ut),r.Zb(r.B))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();class Nt{constructor(t){this._doc=t}addGlobalEventListener(t,e,i){const n=o().getGlobalEventTarget(this._doc,t);if(!n)throw new Error(`Unsupported event target ${n} for event ${e}`);return this.addEventListener(n,e,i)}}let jt=(()=>{class t{constructor(){this._stylesSet=new Set}addStyles(t){const e=new Set;t.forEach(t=>{this._stylesSet.has(t)||(this._stylesSet.add(t),e.add(t))}),this.onStylesAdded(e)}onStylesAdded(t){}getAllStyles(){return Array.from(this._stylesSet)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),zt=(()=>{class t extends jt{constructor(t){super(),this._doc=t,this._hostNodes=new Set,this._styleNodes=new Set,this._hostNodes.add(t.head)}_addStylesToHost(t,e){t.forEach(t=>{const i=this._doc.createElement("style");i.textContent=t,this._styleNodes.add(e.appendChild(i))})}addHost(t){this._addStylesToHost(this._stylesSet,t),this._hostNodes.add(t)}removeHost(t){this._hostNodes.delete(t)}onStylesAdded(t){this._hostNodes.forEach(e=>this._addStylesToHost(t,e))}ngOnDestroy(){this._styleNodes.forEach(t=>o().remove(t))}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(a))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();const Ht={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Kt=/%COMP%/g;function $t(t,e,i){for(let n=0;n<e.length;n++){let r=e[n];Array.isArray(r)?$t(t,r,i):(r=r.replace(Kt,t),i.push(r))}return i}function Gt(t){return e=>{if("__ngUnwrap__"===e)return t;!1===t(e)&&(e.preventDefault(),e.returnValue=!1)}}let Wt=(()=>{class t{constructor(t,e,i){this.eventManager=t,this.sharedStylesHost=e,this.appId=i,this.rendererByCompId=new Map,this.defaultRenderer=new Zt(t)}createRenderer(t,e){if(!t||!e)return this.defaultRenderer;switch(e.encapsulation){case r.T.Emulated:{let i=this.rendererByCompId.get(e.id);return i||(i=new qt(this.eventManager,this.sharedStylesHost,e,this.appId),this.rendererByCompId.set(e.id,i)),i.applyToHost(t),i}case 1:case r.T.ShadowDom:return new Yt(this.eventManager,this.sharedStylesHost,t,e);default:if(!this.rendererByCompId.has(e.id)){const t=$t(e.id,e.styles,[]);this.sharedStylesHost.addStyles(t),this.rendererByCompId.set(e.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Bt),r.Zb(zt),r.Zb(r.c))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();class Zt{constructor(t){this.eventManager=t,this.data=Object.create(null)}destroy(){}createElement(t,e){return e?document.createElementNS(Ht[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){t.appendChild(e)}insertBefore(t,e,i){t&&t.insertBefore(e,i)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t,e){let i="string"==typeof t?document.querySelector(t):t;if(!i)throw new Error(`The selector "${t}" did not match any elements`);return e||(i.textContent=""),i}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,i,n){if(n){e=n+":"+e;const r=Ht[n];r?t.setAttributeNS(r,e,i):t.setAttribute(e,i)}else t.setAttribute(e,i)}removeAttribute(t,e,i){if(i){const n=Ht[i];n?t.removeAttributeNS(n,e):t.removeAttribute(`${i}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,i,n){n&(r.J.DashCase|r.J.Important)?t.style.setProperty(e,i,n&r.J.Important?"important":""):t.style[e]=i}removeStyle(t,e,i){i&r.J.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,i){t[e]=i}setValue(t,e){t.nodeValue=e}listen(t,e,i){return"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,Gt(i)):this.eventManager.addEventListener(t,e,Gt(i))}}class qt extends Zt{constructor(t,e,i,n){super(t),this.component=i;const r=$t(n+"-"+i.id,i.styles,[]);e.addStyles(r),this.contentAttr="_ngcontent-%COMP%".replace(Kt,n+"-"+i.id),this.hostAttr="_nghost-%COMP%".replace(Kt,n+"-"+i.id)}applyToHost(t){super.setAttribute(t,this.hostAttr,"")}createElement(t,e){const i=super.createElement(t,e);return super.setAttribute(i,this.contentAttr,""),i}}class Yt extends Zt{constructor(t,e,i,n){super(t),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const r=$t(n.id,n.styles,[]);for(let s=0;s<r.length;s++){const t=document.createElement("style");t.textContent=r[s],this.shadowRoot.appendChild(t)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,i){return super.insertBefore(this.nodeOrShadowRoot(t),e,i)}removeChild(t,e){return super.removeChild(this.nodeOrShadowRoot(t),e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}}let Qt=(()=>{class t extends Nt{constructor(t){super(t)}supports(t){return!0}addEventListener(t,e,i){return t.addEventListener(e,i,!1),()=>this.removeEventListener(t,e,i)}removeEventListener(t,e,i){return t.removeEventListener(e,i)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(a))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();const Xt=["alt","control","meta","shift"],Jt={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},te={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"},ee={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};let ie=(()=>{class t extends Nt{constructor(t){super(t)}supports(e){return null!=t.parseEventName(e)}addEventListener(e,i,n){const r=t.parseEventName(i),s=t.eventCallback(r.fullKey,n,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>o().onAndCancel(e,r.domEventName,s))}static parseEventName(e){const i=e.toLowerCase().split("."),n=i.shift();if(0===i.length||"keydown"!==n&&"keyup"!==n)return null;const r=t._normalizeKey(i.pop());let s="";if(Xt.forEach(t=>{const e=i.indexOf(t);e>-1&&(i.splice(e,1),s+=t+".")}),s+=r,0!=i.length||0===r.length)return null;const o={};return o.domEventName=n,o.fullKey=s,o}static getEventFullKey(t){let e="",i=function(t){let e=t.key;if(null==e){if(e=t.keyIdentifier,null==e)return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===t.location&&te.hasOwnProperty(e)&&(e=te[e]))}return Jt[e]||e}(t);return i=i.toLowerCase()," "===i?i="space":"."===i&&(i="dot"),Xt.forEach(n=>{n!=i&&(0,ee[n])(t)&&(e+=n+".")}),e+=i,e}static eventCallback(e,i,n){return r=>{t.getEventFullKey(r)===e&&n.runGuarded(()=>i(r))}}static _normalizeKey(t){switch(t){case"esc":return"escape";default:return t}}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(a))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),ne=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(r.Lb)({factory:function(){return Object(r.Zb)(re)},token:t,providedIn:"root"}),t})(),re=(()=>{class t extends ne{constructor(t){super(),this._doc=t}sanitize(t,e){if(null==e)return null;switch(t){case r.L.NONE:return e;case r.L.HTML:return Object(r.gb)(e,"HTML")?Object(r.zb)(e):Object(r.eb)(this._doc,String(e)).toString();case r.L.STYLE:return Object(r.gb)(e,"Style")?Object(r.zb)(e):e;case r.L.SCRIPT:if(Object(r.gb)(e,"Script"))return Object(r.zb)(e);throw new Error("unsafe value used in a script context");case r.L.URL:return Object(r.qb)(e),Object(r.gb)(e,"URL")?Object(r.zb)(e):Object(r.fb)(String(e));case r.L.RESOURCE_URL:if(Object(r.gb)(e,"ResourceURL"))return Object(r.zb)(e);throw new Error("unsafe value used in a resource URL context (see https://g.co/ng/security#xss)");default:throw new Error(`Unexpected SecurityContext ${t} (see https://g.co/ng/security#xss)`)}}bypassSecurityTrustHtml(t){return Object(r.hb)(t)}bypassSecurityTrustStyle(t){return Object(r.kb)(t)}bypassSecurityTrustScript(t){return Object(r.jb)(t)}bypassSecurityTrustUrl(t){return Object(r.lb)(t)}bypassSecurityTrustResourceUrl(t){return Object(r.ib)(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(a))},t.\u0275prov=Object(r.Lb)({factory:function(){return t=Object(r.Zb)(r.p),new re(t.get(a));var t},token:t,providedIn:"root"}),t})();const se=[{provide:r.D,useValue:"browser"},{provide:r.E,useValue:function(){Mt.makeCurrent(),Lt.init()},multi:!0},{provide:a,useFactory:function(){return Object(r.xb)(document),document},deps:[]}],oe=Object(r.U)(r.Z,"browser",se),ae=[[],{provide:r.cb,useValue:"root"},{provide:r.n,useFactory:function(){return new r.n},deps:[]},{provide:Ut,useClass:Qt,multi:!0,deps:[a,r.B,r.D]},{provide:Ut,useClass:ie,multi:!0,deps:[a]},[],{provide:Wt,useClass:Wt,deps:[Bt,zt,r.c]},{provide:r.I,useExisting:Wt},{provide:jt,useExisting:zt},{provide:zt,useClass:zt,deps:[a]},{provide:r.P,useClass:r.P,deps:[r.B]},{provide:Bt,useClass:Bt,deps:[Ut,r.B]},[]];let le=(()=>{class t{constructor(t){if(t)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}static withServerTransition(e){return{ngModule:t,providers:[{provide:r.c,useValue:e.appId},{provide:Vt,useExisting:r.c},Ft]}}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(t,12))},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:ae,imports:[Et,r.f]}),t})();function ce(){return new he(Object(r.Zb)(a))}let he=(()=>{class t{constructor(t){this._doc=t}getTitle(){return this._doc.title}setTitle(t){this._doc.title=t||""}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(a))},t.\u0275prov=Object(r.Lb)({factory:ce,token:t,providedIn:"root"}),t})();"undefined"!=typeof window&&window,i("yLV6");var ue=i("mrSG");class de{attach(t){return this._attachedHost=t,t.attach(this)}detach(){let t=this._attachedHost;null!=t&&(this._attachedHost=null,t.detach())}get isAttached(){return null!=this._attachedHost}setAttachedHost(t){this._attachedHost=t}}class pe extends de{constructor(t,e,i,n){super(),this.component=t,this.viewContainerRef=e,this.injector=i,this.componentFactoryResolver=n}}class fe extends de{constructor(t,e,i){super(),this.templateRef=t,this.viewContainerRef=e,this.context=i}get origin(){return this.templateRef.elementRef}attach(t,e=this.context){return this.context=e,super.attach(t)}detach(){return this.context=void 0,super.detach()}}class me extends de{constructor(t){super(),this.element=t instanceof r.l?t.nativeElement:t}}class ge{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){return t instanceof pe?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof fe?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof me?(this._attachedPortal=t,this.attachDomPortal(t)):void 0}detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(t){this._disposeFn=t}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}}class Ae extends ge{constructor(t,e,i,n,r){super(),this.outletElement=t,this._componentFactoryResolver=e,this._appRef=i,this._defaultInjector=n,this.attachDomPortal=t=>{const e=t.element,i=this._document.createComment("dom-portal");e.parentNode.insertBefore(i,e),this.outletElement.appendChild(e),super.setDisposeFn(()=>{i.parentNode&&i.parentNode.replaceChild(e,i)})},this._document=r}attachComponentPortal(t){const e=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component);let i;return t.viewContainerRef?(i=t.viewContainerRef.createComponent(e,t.viewContainerRef.length,t.injector||t.viewContainerRef.injector),this.setDisposeFn(()=>i.destroy())):(i=e.create(t.injector||this._defaultInjector),this._appRef.attachView(i.hostView),this.setDisposeFn(()=>{this._appRef.detachView(i.hostView),i.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(i)),i}attachTemplatePortal(t){let e=t.viewContainerRef,i=e.createEmbeddedView(t.templateRef,t.context);return i.rootNodes.forEach(t=>this.outletElement.appendChild(t)),i.detectChanges(),this.setDisposeFn(()=>{let t=e.indexOf(i);-1!==t&&e.remove(t)}),i}dispose(){super.dispose(),null!=this.outletElement.parentNode&&this.outletElement.parentNode.removeChild(this.outletElement)}_getComponentRootNode(t){return t.hostView.rootNodes[0]}}let be=(()=>{class t extends ge{constructor(t,e,i){super(),this._componentFactoryResolver=t,this._viewContainerRef=e,this._isInitialized=!1,this.attached=new r.o,this.attachDomPortal=t=>{const e=t.element,i=this._document.createComment("dom-portal");t.setAttachedHost(this),e.parentNode.insertBefore(i,e),this._getRootNode().appendChild(e),super.setDisposeFn(()=>{i.parentNode&&i.parentNode.replaceChild(e,i)})},this._document=i}get portal(){return this._attachedPortal}set portal(t){(!this.hasAttached()||t||this._isInitialized)&&(this.hasAttached()&&super.detach(),t&&super.attach(t),this._attachedPortal=t)}get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedPortal=null,this._attachedRef=null}attachComponentPortal(t){t.setAttachedHost(this);const e=null!=t.viewContainerRef?t.viewContainerRef:this._viewContainerRef,i=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component),n=e.createComponent(i,e.length,t.injector||e.injector);return e!==this._viewContainerRef&&this._getRootNode().appendChild(n.hostView.rootNodes[0]),super.setDisposeFn(()=>n.destroy()),this._attachedPortal=t,this._attachedRef=n,this.attached.emit(n),n}attachTemplatePortal(t){t.setAttachedHost(this);const e=this._viewContainerRef.createEmbeddedView(t.templateRef,t.context);return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=t,this._attachedRef=e,this.attached.emit(e),e}_getRootNode(){const t=this._viewContainerRef.element.nativeElement;return t.nodeType===t.ELEMENT_NODE?t:t.parentNode}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.j),r.Pb(r.S),r.Pb(a))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[r.Ab]}),t})(),ve=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({}),t})();var _e=i("XNiG"),ye=i("quSY"),we=i("z+Ro"),xe=i("yCtX"),Ce=i("jZKg");function Se(...t){let e=t[t.length-1];return Object(we.a)(e)?(t.pop(),Object(Ce.a)(t,e)):Object(xe.a)(t)}function ke(t,...e){return e.length?e.some(e=>t[e]):t.altKey||t.shiftKey||t.ctrlKey||t.metaKey}var Ee=i("7o/Q");function De(){}var Ie=i("n6bG");function Pe(t,e,i){return function(n){return n.lift(new Oe(t,e,i))}}class Oe{constructor(t,e,i){this.nextOrObserver=t,this.error=e,this.complete=i}call(t,e){return e.subscribe(new Me(t,this.nextOrObserver,this.error,this.complete))}}class Me extends Ee.a{constructor(t,e,i,n){super(t),this._tapNext=De,this._tapError=De,this._tapComplete=De,this._tapError=i||De,this._tapComplete=n||De,Object(Ie.a)(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||De,this._tapError=e.error||De,this._tapComplete=e.complete||De)}_next(t){try{this._tapNext.call(this._context,t)}catch(e){return void this.destination.error(e)}this.destination.next(t)}_error(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)}_complete(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}class Te extends ye.a{constructor(t,e){super()}schedule(t,e=0){return this}}class Re extends Te{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){if(this.closed)return this;this.state=t;const i=this.id,n=this.scheduler;return null!=i&&(this.id=this.recycleAsyncId(n,i,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(n,this.id,e),this}requestAsyncId(t,e,i=0){return setInterval(t.flush.bind(t,this),i)}recycleAsyncId(t,e,i=0){if(null!==i&&this.delay===i&&!1===this.pending)return e;clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(t,e);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let i,n=!1;try{this.work(t)}catch(r){n=!0,i=!!r&&r||new Error(r)}if(n)return this.unsubscribe(),i}_unsubscribe(){const t=this.id,e=this.scheduler,i=e.actions,n=i.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==n&&i.splice(n,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null}}let Ve=(()=>{class t{constructor(e,i=t.now){this.SchedulerAction=e,this.now=i}schedule(t,e=0,i){return new this.SchedulerAction(this,t).schedule(i,e)}}return t.now=()=>Date.now(),t})();class Fe extends Ve{constructor(t,e=Ve.now){super(t,()=>Fe.delegate&&Fe.delegate!==this?Fe.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(t,e=0,i){return Fe.delegate&&Fe.delegate!==this?Fe.delegate.schedule(t,e,i):super.schedule(t,e,i)}flush(t){const{actions:e}=this;if(this.active)return void e.push(t);let i;this.active=!0;do{if(i=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,i){for(;t=e.shift();)t.unsubscribe();throw i}}}const Le=new Fe(Re),Ue=Le;function Be(t,e=Ue){return i=>i.lift(new Ne(t,e))}class Ne{constructor(t,e){this.dueTime=t,this.scheduler=e}call(t,e){return e.subscribe(new je(t,this.dueTime,this.scheduler))}}class je extends Ee.a{constructor(t,e,i){super(t),this.dueTime=e,this.scheduler=i,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(ze,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:t}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}}clearDebounce(){const t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)}}function ze(t){t.debouncedNext()}function He(t,e){return function(i){return i.lift(new Ke(t,e))}}class Ke{constructor(t,e){this.predicate=t,this.thisArg=e}call(t,e){return e.subscribe(new $e(t,this.predicate,this.thisArg))}}class $e extends Ee.a{constructor(t,e,i){super(t),this.predicate=e,this.thisArg=i,this.count=0}_next(t){let e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(i){return void this.destination.error(i)}e&&this.destination.next(t)}}var Ge=i("lJxs");const We=(()=>{function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t})();var Ze=i("HDdC");const qe=new Ze.a(t=>t.complete());function Ye(t){return t?function(t){return new Ze.a(e=>t.schedule(()=>e.complete()))}(t):qe}function Qe(t){return e=>0===t?Ye():e.lift(new Xe(t))}class Xe{constructor(t){if(this.total=t,this.total<0)throw new We}call(t,e){return e.subscribe(new Je(t,this.total))}}class Je extends Ee.a{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){const e=this.total,i=++this.count;i<=e&&(this.destination.next(t),i===e&&(this.destination.complete(),this.unsubscribe()))}}function ti(t){return null!=t&&"false"!=`${t}`}function ei(t,e=0){return ii(t)?Number(t):e}function ii(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}function ni(t){return Array.isArray(t)?t:[t]}function ri(t){return null==t?"":"string"==typeof t?t:`${t}px`}function si(t){return t instanceof r.l?t.nativeElement:t}function oi(t,e=/\s+/){const i=[];if(null!=t){const n=Array.isArray(t)?t:`${t}`.split(e);for(const t of n){const e=`${t}`.trim();e&&i.push(e)}}return i}let ai;try{ai="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(Knt){ai=!1}let li,ci=(()=>{class t{constructor(t){this._platformId=t,this.isBrowser=this._platformId?Dt(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!ai)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.D))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(r.D))},token:t,providedIn:"root"}),t})(),hi=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({}),t})();const ui=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function di(){if(li)return li;if("object"!=typeof document||!document)return li=new Set(ui),li;let t=document.createElement("input");return li=new Set(ui.filter(e=>(t.setAttribute("type",e),t.type===e))),li}let pi,fi,mi,gi;function Ai(t){return function(){if(null==pi&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>pi=!0}))}finally{pi=pi||!1}return pi}()?t:!!t.capture}function bi(){if(null==mi){if("object"!=typeof document||!document)return mi=!1,mi;if("scrollBehavior"in document.documentElement.style)mi=!0;else{const t=Element.prototype.scrollTo;mi=!!t&&!/\{\s*\[native code\]\s*\}/.test(t.toString())}}return mi}function vi(){if("object"!=typeof document||!document)return 0;if(null==fi){const t=document.createElement("div"),e=t.style;t.dir="rtl",e.width="1px",e.overflow="auto",e.visibility="hidden",e.pointerEvents="none",e.position="absolute";const i=document.createElement("div"),n=i.style;n.width="2px",n.height="1px",t.appendChild(i),document.body.appendChild(t),fi=0,0===t.scrollLeft&&(t.scrollLeft=1,fi=0===t.scrollLeft?1:2),t.parentNode.removeChild(t)}return fi}function _i(t){if(function(){if(null==gi){const t="undefined"!=typeof document?document.head:null;gi=!(!t||!t.createShadowRoot&&!t.attachShadow)}return gi}()){const e=t.getRootNode?t.getRootNode():null;if("undefined"!=typeof ShadowRoot&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}let yi=(()=>{class t{create(t){return"undefined"==typeof MutationObserver?null:new MutationObserver(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(r.Lb)({factory:function(){return new t},token:t,providedIn:"root"}),t})(),wi=(()=>{class t{constructor(t){this._mutationObserverFactory=t,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((t,e)=>this._cleanupObserver(e))}observe(t){const e=si(t);return new Ze.a(t=>{const i=this._observeElement(e).subscribe(t);return()=>{i.unsubscribe(),this._unobserveElement(e)}})}_observeElement(t){if(this._observedElements.has(t))this._observedElements.get(t).count++;else{const e=new _e.a,i=this._mutationObserverFactory.create(t=>e.next(t));i&&i.observe(t,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(t,{observer:i,stream:e,count:1})}return this._observedElements.get(t).stream}_unobserveElement(t){this._observedElements.has(t)&&(this._observedElements.get(t).count--,this._observedElements.get(t).count||this._cleanupObserver(t))}_cleanupObserver(t){if(this._observedElements.has(t)){const{observer:e,stream:i}=this._observedElements.get(t);e&&e.disconnect(),i.complete(),this._observedElements.delete(t)}}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(yi))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(yi))},token:t,providedIn:"root"}),t})(),xi=(()=>{class t{constructor(t,e,i){this._contentObserver=t,this._elementRef=e,this._ngZone=i,this.event=new r.o,this._disabled=!1,this._currentSubscription=null}get disabled(){return this._disabled}set disabled(t){this._disabled=ti(t),this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(t){this._debounce=ei(t),this._subscribe()}ngAfterContentInit(){this._currentSubscription||this.disabled||this._subscribe()}ngOnDestroy(){this._unsubscribe()}_subscribe(){this._unsubscribe();const t=this._contentObserver.observe(this._elementRef);this._ngZone.runOutsideAngular(()=>{this._currentSubscription=(this.debounce?t.pipe(Be(this.debounce)):t).subscribe(this.event)})}_unsubscribe(){var t;null===(t=this._currentSubscription)||void 0===t||t.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(wi),r.Pb(r.l),r.Pb(r.B))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),t})(),Ci=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[yi]}),t})();function Si(t,e){return(t.getAttribute(e)||"").match(/\S+/g)||[]}let ki=0;const Ei=new Map;let Di=null,Ii=(()=>{class t{constructor(t){this._document=t}describe(t,e,i){if(!this._canBeDescribed(t,e))return;const n=Pi(e,i);"string"!=typeof e?(Oi(e),Ei.set(n,{messageElement:e,referenceCount:0})):Ei.has(n)||this._createMessageElement(e,i),this._isElementDescribedByMessage(t,n)||this._addMessageReference(t,n)}removeDescription(t,e,i){if(!e||!this._isElementNode(t))return;const n=Pi(e,i);if(this._isElementDescribedByMessage(t,n)&&this._removeMessageReference(t,n),"string"==typeof e){const t=Ei.get(n);t&&0===t.referenceCount&&this._deleteMessageElement(n)}Di&&0===Di.childNodes.length&&this._deleteMessagesContainer()}ngOnDestroy(){const t=this._document.querySelectorAll("[cdk-describedby-host]");for(let e=0;e<t.length;e++)this._removeCdkDescribedByReferenceIds(t[e]),t[e].removeAttribute("cdk-describedby-host");Di&&this._deleteMessagesContainer(),Ei.clear()}_createMessageElement(t,e){const i=this._document.createElement("div");Oi(i),i.textContent=t,e&&i.setAttribute("role",e),this._createMessagesContainer(),Di.appendChild(i),Ei.set(Pi(t,e),{messageElement:i,referenceCount:0})}_deleteMessageElement(t){const e=Ei.get(t),i=e&&e.messageElement;Di&&i&&Di.removeChild(i),Ei.delete(t)}_createMessagesContainer(){if(!Di){const t=this._document.getElementById("cdk-describedby-message-container");t&&t.parentNode&&t.parentNode.removeChild(t),Di=this._document.createElement("div"),Di.id="cdk-describedby-message-container",Di.style.visibility="hidden",Di.classList.add("cdk-visually-hidden"),this._document.body.appendChild(Di)}}_deleteMessagesContainer(){Di&&Di.parentNode&&(Di.parentNode.removeChild(Di),Di=null)}_removeCdkDescribedByReferenceIds(t){const e=Si(t,"aria-describedby").filter(t=>0!=t.indexOf("cdk-describedby-message"));t.setAttribute("aria-describedby",e.join(" "))}_addMessageReference(t,e){const i=Ei.get(e);!function(t,e,i){const n=Si(t,e);n.some(t=>t.trim()==i.trim())||(n.push(i.trim()),t.setAttribute(e,n.join(" ")))}(t,"aria-describedby",i.messageElement.id),t.setAttribute("cdk-describedby-host",""),i.referenceCount++}_removeMessageReference(t,e){const i=Ei.get(e);i.referenceCount--,function(t,e,i){const n=Si(t,e).filter(t=>t!=i.trim());n.length?t.setAttribute(e,n.join(" ")):t.removeAttribute(e)}(t,"aria-describedby",i.messageElement.id),t.removeAttribute("cdk-describedby-host")}_isElementDescribedByMessage(t,e){const i=Si(t,"aria-describedby"),n=Ei.get(e),r=n&&n.messageElement.id;return!!r&&-1!=i.indexOf(r)}_canBeDescribed(t,e){if(!this._isElementNode(t))return!1;if(e&&"object"==typeof e)return!0;const i=null==e?"":`${e}`.trim(),n=t.getAttribute("aria-label");return!(!i||n&&n.trim()===i)}_isElementNode(t){return t.nodeType===this._document.ELEMENT_NODE}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(a))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(a))},token:t,providedIn:"root"}),t})();function Pi(t,e){return"string"==typeof t?`${e||""}/${t}`:t}function Oi(t){t.id||(t.id="cdk-describedby-message-"+ki++)}class Mi{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new _e.a,this._typeaheadSubscription=ye.a.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._skipPredicateFn=t=>t.disabled,this._pressedLetters=[],this.tabOut=new _e.a,this.change=new _e.a,t instanceof r.F&&t.changes.subscribe(t=>{if(this._activeItem){const e=t.toArray().indexOf(this._activeItem);e>-1&&e!==this._activeItemIndex&&(this._activeItemIndex=e)}})}skipPredicate(t){return this._skipPredicateFn=t,this}withWrap(t=!0){return this._wrap=t,this}withVerticalOrientation(t=!0){return this._vertical=t,this}withHorizontalOrientation(t){return this._horizontal=t,this}withAllowedModifierKeys(t){return this._allowedModifierKeys=t,this}withTypeAhead(t=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(Pe(t=>this._pressedLetters.push(t)),Be(t),He(()=>this._pressedLetters.length>0),Object(Ge.a)(()=>this._pressedLetters.join(""))).subscribe(t=>{const e=this._getItemsArray();for(let i=1;i<e.length+1;i++){const n=(this._activeItemIndex+i)%e.length,r=e[n];if(!this._skipPredicateFn(r)&&0===r.getLabel().toUpperCase().trim().indexOf(t)){this.setActiveItem(n);break}}this._pressedLetters=[]}),this}withHomeAndEnd(t=!0){return this._homeAndEnd=t,this}setActiveItem(t){const e=this._activeItem;this.updateActiveItem(t),this._activeItem!==e&&this.change.next(this._activeItemIndex)}onKeydown(t){const e=t.keyCode,i=["altKey","ctrlKey","metaKey","shiftKey"].every(e=>!t[e]||this._allowedModifierKeys.indexOf(e)>-1);switch(e){case 9:return void this.tabOut.next();case 40:if(this._vertical&&i){this.setNextItemActive();break}return;case 38:if(this._vertical&&i){this.setPreviousItemActive();break}return;case 39:if(this._horizontal&&i){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case 37:if(this._horizontal&&i){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case 36:if(this._homeAndEnd&&i){this.setFirstItemActive();break}return;case 35:if(this._homeAndEnd&&i){this.setLastItemActive();break}return;default:return void((i||ke(t,"shiftKey"))&&(t.key&&1===t.key.length?this._letterKeyStream.next(t.key.toLocaleUpperCase()):(e>=65&&e<=90||e>=48&&e<=57)&&this._letterKeyStream.next(String.fromCharCode(e))))}this._pressedLetters=[],t.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}isTyping(){return this._pressedLetters.length>0}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._items.length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(t){const e=this._getItemsArray(),i="number"==typeof t?t:e.indexOf(t),n=e[i];this._activeItem=null==n?null:n,this._activeItemIndex=i}_setActiveItemByDelta(t){this._wrap?this._setActiveInWrapMode(t):this._setActiveInDefaultMode(t)}_setActiveInWrapMode(t){const e=this._getItemsArray();for(let i=1;i<=e.length;i++){const n=(this._activeItemIndex+t*i+e.length)%e.length;if(!this._skipPredicateFn(e[n]))return void this.setActiveItem(n)}}_setActiveInDefaultMode(t){this._setActiveItemByIndex(this._activeItemIndex+t,t)}_setActiveItemByIndex(t,e){const i=this._getItemsArray();if(i[t]){for(;this._skipPredicateFn(i[t]);)if(!i[t+=e])return;this.setActiveItem(t)}}_getItemsArray(){return this._items instanceof r.F?this._items.toArray():this._items}}class Ti extends Mi{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}}class Ri extends Mi{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(t){return this._origin=t,this}setActiveItem(t){super.setActiveItem(t),this.activeItem&&this.activeItem.focus(this._origin)}}let Vi=(()=>{class t{constructor(t){this._platform=t}isDisabled(t){return t.hasAttribute("disabled")}isVisible(t){return function(t){return!!(t.offsetWidth||t.offsetHeight||"function"==typeof t.getClientRects&&t.getClientRects().length)}(t)&&"visible"===getComputedStyle(t).visibility}isTabbable(t){if(!this._platform.isBrowser)return!1;const e=function(t){try{return t.frameElement}catch(Knt){return null}}((i=t).ownerDocument&&i.ownerDocument.defaultView||window);var i;if(e){if(-1===Li(e))return!1;if(!this.isVisible(e))return!1}let n=t.nodeName.toLowerCase(),r=Li(t);return t.hasAttribute("contenteditable")?-1!==r:"iframe"!==n&&"object"!==n&&!(this._platform.WEBKIT&&this._platform.IOS&&!function(t){let e=t.nodeName.toLowerCase(),i="input"===e&&t.type;return"text"===i||"password"===i||"select"===e||"textarea"===e}(t))&&("audio"===n?!!t.hasAttribute("controls")&&-1!==r:"video"===n?-1!==r&&(null!==r||this._platform.FIREFOX||t.hasAttribute("controls")):t.tabIndex>=0)}isFocusable(t,e){return function(t){return!function(t){return function(t){return"input"==t.nodeName.toLowerCase()}(t)&&"hidden"==t.type}(t)&&(function(t){let e=t.nodeName.toLowerCase();return"input"===e||"select"===e||"button"===e||"textarea"===e}(t)||function(t){return function(t){return"a"==t.nodeName.toLowerCase()}(t)&&t.hasAttribute("href")}(t)||t.hasAttribute("contenteditable")||Fi(t))}(t)&&!this.isDisabled(t)&&((null==e?void 0:e.ignoreVisibility)||this.isVisible(t))}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(ci))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(ci))},token:t,providedIn:"root"}),t})();function Fi(t){if(!t.hasAttribute("tabindex")||void 0===t.tabIndex)return!1;let e=t.getAttribute("tabindex");return"-32768"!=e&&!(!e||isNaN(parseInt(e,10)))}function Li(t){if(!Fi(t))return null;const e=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}class Ui{constructor(t,e,i,n,r=!1){this._element=t,this._checker=e,this._ngZone=i,this._document=n,this._hasAttached=!1,this.startAnchorListener=()=>this.focusLastTabbableElement(),this.endAnchorListener=()=>this.focusFirstTabbableElement(),this._enabled=!0,r||this.attachAnchors()}get enabled(){return this._enabled}set enabled(t){this._enabled=t,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}destroy(){const t=this._startAnchor,e=this._endAnchor;t&&(t.removeEventListener("focus",this.startAnchorListener),t.parentNode&&t.parentNode.removeChild(t)),e&&(e.removeEventListener("focus",this.endAnchorListener),e.parentNode&&e.parentNode.removeChild(e)),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return!!this._hasAttached||(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(){return new Promise(t=>{this._executeOnStable(()=>t(this.focusInitialElement()))})}focusFirstTabbableElementWhenReady(){return new Promise(t=>{this._executeOnStable(()=>t(this.focusFirstTabbableElement()))})}focusLastTabbableElementWhenReady(){return new Promise(t=>{this._executeOnStable(()=>t(this.focusLastTabbableElement()))})}_getRegionBoundary(t){let e=this._element.querySelectorAll(`[cdk-focus-region-${t}], [cdkFocusRegion${t}], [cdk-focus-${t}]`);for(let i=0;i<e.length;i++)e[i].hasAttribute(`cdk-focus-${t}`)?console.warn(`Found use of deprecated attribute 'cdk-focus-${t}', use 'cdkFocusRegion${t}' instead. The deprecated attribute will be removed in 8.0.0.`,e[i]):e[i].hasAttribute(`cdk-focus-region-${t}`)&&console.warn(`Found use of deprecated attribute 'cdk-focus-region-${t}', use 'cdkFocusRegion${t}' instead. The deprecated attribute will be removed in 8.0.0.`,e[i]);return"start"==t?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(){const t=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(t){if(t.hasAttribute("cdk-focus-initial")&&console.warn("Found use of deprecated attribute 'cdk-focus-initial', use 'cdkFocusInitial' instead. The deprecated attribute will be removed in 8.0.0",t),!this._checker.isFocusable(t)){const e=this._getFirstTabbableElement(t);return null==e||e.focus(),!!e}return t.focus(),!0}return this.focusFirstTabbableElement()}focusFirstTabbableElement(){const t=this._getRegionBoundary("start");return t&&t.focus(),!!t}focusLastTabbableElement(){const t=this._getRegionBoundary("end");return t&&t.focus(),!!t}hasAttached(){return this._hasAttached}_getFirstTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;let e=t.children||t.childNodes;for(let i=0;i<e.length;i++){let t=e[i].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(e[i]):null;if(t)return t}return null}_getLastTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;let e=t.children||t.childNodes;for(let i=e.length-1;i>=0;i--){let t=e[i].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[i]):null;if(t)return t}return null}_createAnchor(){const t=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,t),t.classList.add("cdk-visually-hidden"),t.classList.add("cdk-focus-trap-anchor"),t.setAttribute("aria-hidden","true"),t}_toggleAnchorTabIndex(t,e){t?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}toggleAnchors(t){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}_executeOnStable(t){this._ngZone.isStable?t():this._ngZone.onStable.pipe(Qe(1)).subscribe(t)}}let Bi=(()=>{class t{constructor(t,e,i){this._checker=t,this._ngZone=e,this._document=i}create(t,e=!1){return new Ui(t,this._checker,this._ngZone,this._document,e)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Vi),r.Zb(r.B),r.Zb(a))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(Vi),Object(r.Zb)(r.B),Object(r.Zb)(a))},token:t,providedIn:"root"}),t})(),Ni=(()=>{class t{constructor(t,e,i){this._elementRef=t,this._focusTrapFactory=e,this._previouslyFocusedElement=null,this._document=i,this.focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement,!0)}get enabled(){return this.focusTrap.enabled}set enabled(t){this.focusTrap.enabled=ti(t)}get autoCapture(){return this._autoCapture}set autoCapture(t){this._autoCapture=ti(t)}ngOnDestroy(){this.focusTrap.destroy(),this._previouslyFocusedElement&&(this._previouslyFocusedElement.focus(),this._previouslyFocusedElement=null)}ngAfterContentInit(){this.focusTrap.attachAnchors(),this.autoCapture&&this._captureFocus()}ngDoCheck(){this.focusTrap.hasAttached()||this.focusTrap.attachAnchors()}ngOnChanges(t){const e=t.autoCapture;e&&!e.firstChange&&this.autoCapture&&this.focusTrap.hasAttached()&&this._captureFocus()}_captureFocus(){this._previouslyFocusedElement=this._document.activeElement,this.focusTrap.focusInitialElementWhenReady()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(Bi),r.Pb(a))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdkTrapFocus",""]],inputs:{enabled:["cdkTrapFocus","enabled"],autoCapture:["cdkTrapFocusAutoCapture","autoCapture"]},exportAs:["cdkTrapFocus"],features:[r.Bb]}),t})();"undefined"!=typeof Element&&Element;const ji=new r.s("liveAnnouncerElement",{providedIn:"root",factory:function(){return null}}),zi=new r.s("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let Hi=(()=>{class t{constructor(t,e,i,n){this._ngZone=e,this._defaultOptions=n,this._document=i,this._liveElement=t||this._createLiveElement()}announce(t,...e){const i=this._defaultOptions;let n,r;return 1===e.length&&"number"==typeof e[0]?r=e[0]:[n,r]=e,this.clear(),clearTimeout(this._previousTimeout),n||(n=i&&i.politeness?i.politeness:"polite"),null==r&&i&&(r=i.duration),this._liveElement.setAttribute("aria-live",n),this._ngZone.runOutsideAngular(()=>new Promise(e=>{clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=t,e(),"number"==typeof r&&(this._previousTimeout=setTimeout(()=>this.clear(),r))},100)}))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement&&this._liveElement.parentNode&&(this._liveElement.parentNode.removeChild(this._liveElement),this._liveElement=null)}_createLiveElement(){const t=this._document.getElementsByClassName("cdk-live-announcer-element"),e=this._document.createElement("div");for(let i=0;i<t.length;i++)t[i].parentNode.removeChild(t[i]);return e.classList.add("cdk-live-announcer-element"),e.classList.add("cdk-visually-hidden"),e.setAttribute("aria-atomic","true"),e.setAttribute("aria-live","polite"),this._document.body.appendChild(e),e}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(ji,8),r.Zb(r.B),r.Zb(a),r.Zb(zi,8))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(ji,8),Object(r.Zb)(r.B),Object(r.Zb)(a),Object(r.Zb)(zi,8))},token:t,providedIn:"root"}),t})(),Ki=(()=>{class t{constructor(t,e,i,n){this._elementRef=t,this._liveAnnouncer=e,this._contentObserver=i,this._ngZone=n,this._politeness="polite"}get politeness(){return this._politeness}set politeness(t){this._politeness="off"===t||"assertive"===t?t:"polite","off"===this._politeness?this._subscription&&(this._subscription.unsubscribe(),this._subscription=null):this._subscription||(this._subscription=this._ngZone.runOutsideAngular(()=>this._contentObserver.observe(this._elementRef).subscribe(()=>{const t=this._elementRef.nativeElement.textContent;t!==this._previousAnnouncedText&&(this._liveAnnouncer.announce(t,this._politeness),this._previousAnnouncedText=t)})))}ngOnDestroy(){this._subscription&&this._subscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(Hi),r.Pb(wi),r.Pb(r.B))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdkAriaLive",""]],inputs:{politeness:["cdkAriaLive","politeness"]},exportAs:["cdkAriaLive"]}),t})();function $i(t){return 0===t.buttons}function Gi(t){const e=t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0];return!(!e||-1!==e.identifier||null!=e.radiusX&&1!==e.radiusX||null!=e.radiusY&&1!==e.radiusY)}const Wi=new r.s("cdk-focus-monitor-default-options"),Zi=Ai({passive:!0,capture:!0});let qi=(()=>{class t{constructor(t,e,i,n){this._ngZone=t,this._platform=e,this._origin=null,this._windowFocused=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._documentKeydownListener=()=>{this._lastTouchTarget=null,this._setOriginForCurrentEventQueue("keyboard")},this._documentMousedownListener=t=>{if(!this._lastTouchTarget){const e=$i(t)?"keyboard":"mouse";this._setOriginForCurrentEventQueue(e)}},this._documentTouchstartListener=t=>{Gi(t)?this._lastTouchTarget||this._setOriginForCurrentEventQueue("keyboard"):(null!=this._touchTimeoutId&&clearTimeout(this._touchTimeoutId),this._lastTouchTarget=Yi(t),this._touchTimeoutId=setTimeout(()=>this._lastTouchTarget=null,650))},this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)},this._rootNodeFocusAndBlurListener=t=>{const e=Yi(t),i="focus"===t.type?this._onFocus:this._onBlur;for(let n=e;n;n=n.parentElement)i.call(this,t,n)},this._document=i,this._detectionMode=(null==n?void 0:n.detectionMode)||0}monitor(t,e=!1){const i=si(t);if(!this._platform.isBrowser||1!==i.nodeType)return Se(null);const n=_i(i)||this._getDocument(),r=this._elementInfo.get(i);if(r)return e&&(r.checkChildren=!0),r.subject;const s={checkChildren:e,subject:new _e.a,rootNode:n};return this._elementInfo.set(i,s),this._registerGlobalListeners(s),s.subject}stopMonitoring(t){const e=si(t),i=this._elementInfo.get(e);i&&(i.subject.complete(),this._setClasses(e),this._elementInfo.delete(e),this._removeGlobalListeners(i))}focusVia(t,e,i){const n=si(t);n===this._getDocument().activeElement?this._getClosestElementsInfo(n).forEach(([t,i])=>this._originChanged(t,e,i)):(this._setOriginForCurrentEventQueue(e),"function"==typeof n.focus&&n.focus(i))}ngOnDestroy(){this._elementInfo.forEach((t,e)=>this.stopMonitoring(e))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_toggleClass(t,e,i){i?t.classList.add(e):t.classList.remove(e)}_getFocusOrigin(t){return this._origin?this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:this._wasCausedByTouch(t)?"touch":"program"}_setClasses(t,e){this._toggleClass(t,"cdk-focused",!!e),this._toggleClass(t,"cdk-touch-focused","touch"===e),this._toggleClass(t,"cdk-keyboard-focused","keyboard"===e),this._toggleClass(t,"cdk-mouse-focused","mouse"===e),this._toggleClass(t,"cdk-program-focused","program"===e)}_setOriginForCurrentEventQueue(t){this._ngZone.runOutsideAngular(()=>{this._origin=t,0===this._detectionMode&&(this._originTimeoutId=setTimeout(()=>this._origin=null,1))})}_wasCausedByTouch(t){const e=Yi(t);return this._lastTouchTarget instanceof Node&&e instanceof Node&&(e===this._lastTouchTarget||e.contains(this._lastTouchTarget))}_onFocus(t,e){const i=this._elementInfo.get(e);i&&(i.checkChildren||e===Yi(t))&&this._originChanged(e,this._getFocusOrigin(t),i)}_onBlur(t,e){const i=this._elementInfo.get(e);!i||i.checkChildren&&t.relatedTarget instanceof Node&&e.contains(t.relatedTarget)||(this._setClasses(e),this._emitOrigin(i.subject,null))}_emitOrigin(t,e){this._ngZone.run(()=>t.next(e))}_registerGlobalListeners(t){if(!this._platform.isBrowser)return;const e=t.rootNode,i=this._rootNodeFocusListenerCount.get(e)||0;i||this._ngZone.runOutsideAngular(()=>{e.addEventListener("focus",this._rootNodeFocusAndBlurListener,Zi),e.addEventListener("blur",this._rootNodeFocusAndBlurListener,Zi)}),this._rootNodeFocusListenerCount.set(e,i+1),1==++this._monitoredElementCount&&this._ngZone.runOutsideAngular(()=>{const t=this._getDocument(),e=this._getWindow();t.addEventListener("keydown",this._documentKeydownListener,Zi),t.addEventListener("mousedown",this._documentMousedownListener,Zi),t.addEventListener("touchstart",this._documentTouchstartListener,Zi),e.addEventListener("focus",this._windowFocusListener)})}_removeGlobalListeners(t){const e=t.rootNode;if(this._rootNodeFocusListenerCount.has(e)){const t=this._rootNodeFocusListenerCount.get(e);t>1?this._rootNodeFocusListenerCount.set(e,t-1):(e.removeEventListener("focus",this._rootNodeFocusAndBlurListener,Zi),e.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Zi),this._rootNodeFocusListenerCount.delete(e))}if(!--this._monitoredElementCount){const t=this._getDocument(),e=this._getWindow();t.removeEventListener("keydown",this._documentKeydownListener,Zi),t.removeEventListener("mousedown",this._documentMousedownListener,Zi),t.removeEventListener("touchstart",this._documentTouchstartListener,Zi),e.removeEventListener("focus",this._windowFocusListener),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._touchTimeoutId),clearTimeout(this._originTimeoutId)}}_originChanged(t,e,i){this._setClasses(t,e),this._emitOrigin(i.subject,e),this._lastFocusOrigin=e}_getClosestElementsInfo(t){const e=[];return this._elementInfo.forEach((i,n)=>{(n===t||i.checkChildren&&n.contains(t))&&e.push([n,i])}),e}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.B),r.Zb(ci),r.Zb(a,8),r.Zb(Wi,8))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(r.B),Object(r.Zb)(ci),Object(r.Zb)(a,8),Object(r.Zb)(Wi,8))},token:t,providedIn:"root"}),t})();function Yi(t){return t.composedPath?t.composedPath()[0]:t.target}let Qi=(()=>{class t{constructor(t,e){this._elementRef=t,this._focusMonitor=e,this.cdkFocusChange=new r.o}ngAfterViewInit(){const t=this._elementRef.nativeElement;this._monitorSubscription=this._focusMonitor.monitor(t,1===t.nodeType&&t.hasAttribute("cdkMonitorSubtreeFocus")).subscribe(t=>this.cdkFocusChange.emit(t))}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._monitorSubscription&&this._monitorSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(qi))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdkMonitorElementFocus",""],["","cdkMonitorSubtreeFocus",""]],outputs:{cdkFocusChange:"cdkFocusChange"}}),t})(),Xi=(()=>{class t{constructor(t,e){this._platform=t,this._document=e}getHighContrastMode(){if(!this._platform.isBrowser)return 0;const t=this._document.createElement("div");t.style.backgroundColor="rgb(1,2,3)",t.style.position="absolute",this._document.body.appendChild(t);const e=this._document.defaultView||window,i=e&&e.getComputedStyle?e.getComputedStyle(t):null,n=(i&&i.backgroundColor||"").replace(/ /g,"");switch(this._document.body.removeChild(t),n){case"rgb(0,0,0)":return 2;case"rgb(255,255,255)":return 1}return 0}_applyBodyHighContrastModeCssClasses(){if(this._platform.isBrowser&&this._document.body){const t=this._document.body.classList;t.remove("cdk-high-contrast-active"),t.remove("cdk-high-contrast-black-on-white"),t.remove("cdk-high-contrast-white-on-black");const e=this.getHighContrastMode();1===e?(t.add("cdk-high-contrast-active"),t.add("cdk-high-contrast-black-on-white")):2===e&&(t.add("cdk-high-contrast-active"),t.add("cdk-high-contrast-white-on-black"))}}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(ci),r.Zb(a))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(ci),Object(r.Zb)(a))},token:t,providedIn:"root"}),t})(),Ji=(()=>{class t{constructor(t){t._applyBodyHighContrastModeCssClasses()}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Xi))},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[hi,Ci]]}),t})();var tn=i("DH7j");function en(t,e,i,n){return Object(Ie.a)(i)&&(n=i,i=void 0),n?en(t,e,i).pipe(Object(Ge.a)(t=>Object(tn.a)(t)?n(...t):n(t))):new Ze.a(n=>{nn(t,e,function(t){n.next(arguments.length>1?Array.prototype.slice.call(arguments):t)},n,i)})}function nn(t,e,i,n,r){let s;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){const n=t;t.addEventListener(e,i,r),s=()=>n.removeEventListener(e,i,r)}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){const n=t;t.on(e,i),s=()=>n.off(e,i)}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){const n=t;t.addListener(e,i),s=()=>n.removeListener(e,i)}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(let s=0,o=t.length;s<o;s++)nn(t[s],e,i,n,r)}n.add(s)}class rn extends Re{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,i=0){return null!==i&&i>0?super.requestAsyncId(t,e,i):(t.actions.push(this),t.scheduled||(t.scheduled=requestAnimationFrame(()=>t.flush(null))))}recycleAsyncId(t,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(t,e,i);0===t.actions.length&&(cancelAnimationFrame(e),t.scheduled=void 0)}}class sn extends Fe{flush(t){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let i,n=-1,r=e.length;t=t||e.shift();do{if(i=t.execute(t.state,t.delay))break}while(++n<r&&(t=e.shift()));if(this.active=!1,i){for(;++n<r&&(t=e.shift());)t.unsubscribe();throw i}}}const on=new sn(rn);let an=1;const ln=(()=>Promise.resolve())(),cn={};function hn(t){return t in cn&&(delete cn[t],!0)}const un={setImmediate(t){const e=an++;return cn[e]=!0,ln.then(()=>hn(e)&&t()),e},clearImmediate(t){hn(t)}};class dn extends Re{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,i=0){return null!==i&&i>0?super.requestAsyncId(t,e,i):(t.actions.push(this),t.scheduled||(t.scheduled=un.setImmediate(t.flush.bind(t,null))))}recycleAsyncId(t,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(t,e,i);0===t.actions.length&&(un.clearImmediate(e),t.scheduled=void 0)}}class pn extends Fe{flush(t){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let i,n=-1,r=e.length;t=t||e.shift();do{if(i=t.execute(t.state,t.delay))break}while(++n<r&&(t=e.shift()));if(this.active=!1,i){for(;++n<r&&(t=e.shift());)t.unsubscribe();throw i}}}const fn=new pn(dn);function mn(t,e){return i=>i.lift(new gn(t,e))}class gn{constructor(t,e){this.compare=t,this.keySelector=e}call(t,e){return e.subscribe(new An(t,this.compare,this.keySelector))}}class An extends Ee.a{constructor(t,e,i){super(t),this.keySelector=i,this.hasKey=!1,"function"==typeof e&&(this.compare=e)}compare(t,e){return t===e}_next(t){let e;try{const{keySelector:i}=this;e=i?i(t):t}catch(n){return this.destination.error(n)}let i=!1;if(this.hasKey)try{const{compare:t}=this;i=t(this.key,e)}catch(n){return this.destination.error(n)}else this.hasKey=!0;i||(this.key=e,this.destination.next(t))}}var bn=i("zx2A");class vn{constructor(t){this.durationSelector=t}call(t,e){return e.subscribe(new _n(t,this.durationSelector))}}class _n extends bn.b{constructor(t,e){super(t),this.durationSelector=e,this.hasValue=!1}_next(t){if(this.value=t,this.hasValue=!0,!this.throttled){let i;try{const{durationSelector:e}=this;i=e(t)}catch(e){return this.destination.error(e)}const n=Object(bn.c)(i,new bn.a(this));!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}}clearThrottle(){const{value:t,hasValue:e,throttled:i}=this;i&&(this.remove(i),this.throttled=void 0,i.unsubscribe()),e&&(this.value=void 0,this.hasValue=!1,this.destination.next(t))}notifyNext(){this.clearThrottle()}notifyComplete(){this.clearThrottle()}}function yn(t){return!Object(tn.a)(t)&&t-parseFloat(t)+1>=0}function wn(t=0,e,i){let n=-1;return yn(e)?n=Number(e)<1?1:Number(e):Object(we.a)(e)&&(i=e),Object(we.a)(i)||(i=Ue),new Ze.a(e=>{const r=yn(t)?t:+t-i.now();return i.schedule(xn,r,{index:0,period:n,subscriber:e})})}function xn(t){const{index:e,period:i,subscriber:n}=t;if(n.next(e),!n.closed){if(-1===i)return n.complete();t.index=e+1,this.schedule(t,i)}}function Cn(t,e=Ue){return i=()=>wn(t,e),function(t){return t.lift(new vn(i))};var i}function Sn(t){return e=>e.lift(new kn(t))}class kn{constructor(t){this.notifier=t}call(t,e){const i=new En(t),n=Object(bn.c)(this.notifier,new bn.a(i));return n&&!i.seenValue?(i.add(n),e.subscribe(i)):i}}class En extends bn.b{constructor(t){super(t),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}var Dn=i("bHdf");function In(...t){return Object(Dn.a)(1)(Se(...t))}function Pn(...t){const e=t[t.length-1];return Object(we.a)(e)?(t.pop(),i=>In(t,i,e)):e=>In(t,e)}var On=i("Cfvw");function Mn(t,e){return"function"==typeof e?i=>i.pipe(Mn((i,n)=>Object(On.a)(t(i,n)).pipe(Object(Ge.a)((t,r)=>e(i,t,n,r))))):e=>e.lift(new Tn(t))}class Tn{constructor(t){this.project=t}call(t,e){return e.subscribe(new Rn(t,this.project))}}class Rn extends bn.b{constructor(t,e){super(t),this.project=e,this.index=0}_next(t){let e;const i=this.index++;try{e=this.project(t,i)}catch(n){return void this.destination.error(n)}this._innerSub(e)}_innerSub(t){const e=this.innerSubscription;e&&e.unsubscribe();const i=new bn.a(this),n=this.destination;n.add(i),this.innerSubscription=Object(bn.c)(t,i),this.innerSubscription!==i&&n.add(this.innerSubscription)}_complete(){const{innerSubscription:t}=this;t&&!t.closed||super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(t){this.destination.next(t)}}class Vn extends Re{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}schedule(t,e=0){return e>0?super.schedule(t,e):(this.delay=e,this.state=t,this.scheduler.flush(this),this)}execute(t,e){return e>0||this.closed?super.execute(t,e):this._execute(t,e)}requestAsyncId(t,e,i=0){return null!==i&&i>0||null===i&&this.delay>0?super.requestAsyncId(t,e,i):t.flush(this)}}class Fn extends Fe{}const Ln=new Fn(Vn);function Un(t,e){return new Ze.a(e?i=>e.schedule(Bn,0,{error:t,subscriber:i}):e=>e.error(t))}function Bn({error:t,subscriber:e}){e.error(t)}let Nn=(()=>{class t{constructor(t,e,i){this.kind=t,this.value=e,this.error=i,this.hasValue="N"===t}observe(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}}do(t,e,i){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return i&&i()}}accept(t,e,i){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,i)}toObservable(){switch(this.kind){case"N":return Se(this.value);case"E":return Un(this.error);case"C":return Ye()}throw new Error("unexpected notification kind value")}static createNext(e){return void 0!==e?new t("N",e):t.undefinedValueNotification}static createError(e){return new t("E",void 0,e)}static createComplete(){return t.completeNotification}}return t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t})();class jn extends Ee.a{constructor(t,e,i=0){super(t),this.scheduler=e,this.delay=i}static dispatch(t){const{notification:e,destination:i}=t;e.observe(i),this.unsubscribe()}scheduleMessage(t){this.destination.add(this.scheduler.schedule(jn.dispatch,this.delay,new zn(t,this.destination)))}_next(t){this.scheduleMessage(Nn.createNext(t))}_error(t){this.scheduleMessage(Nn.createError(t)),this.unsubscribe()}_complete(){this.scheduleMessage(Nn.createComplete()),this.unsubscribe()}}class zn{constructor(t,e){this.notification=t,this.destination=e}}var Hn=i("9ppp"),Kn=i("Ylt2");class $n extends _e.a{constructor(t=Number.POSITIVE_INFINITY,e=Number.POSITIVE_INFINITY,i){super(),this.scheduler=i,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=t<1?1:t,this._windowTime=e<1?1:e,e===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(t){if(!this.isStopped){const e=this._events;e.push(t),e.length>this._bufferSize&&e.shift()}super.next(t)}nextTimeWindow(t){this.isStopped||(this._events.push(new Gn(this._getNow(),t)),this._trimBufferThenGetEvents()),super.next(t)}_subscribe(t){const e=this._infiniteTimeWindow,i=e?this._events:this._trimBufferThenGetEvents(),n=this.scheduler,r=i.length;let s;if(this.closed)throw new Hn.a;if(this.isStopped||this.hasError?s=ye.a.EMPTY:(this.observers.push(t),s=new Kn.a(this,t)),n&&t.add(t=new jn(t,n)),e)for(let o=0;o<r&&!t.closed;o++)t.next(i[o]);else for(let o=0;o<r&&!t.closed;o++)t.next(i[o].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),s}_getNow(){return(this.scheduler||Ln).now()}_trimBufferThenGetEvents(){const t=this._getNow(),e=this._bufferSize,i=this._windowTime,n=this._events,r=n.length;let s=0;for(;s<r&&!(t-n[s].time<i);)s++;return r>e&&(s=Math.max(s,r-e)),s>0&&n.splice(0,s),n}}class Gn{constructor(t,e){this.time=t,this.value=e}}const Wn=new r.s("cdk-dir-doc",{providedIn:"root",factory:function(){return Object(r.X)(a)}});let Zn=(()=>{class t{constructor(t){if(this.value="ltr",this.change=new r.o,t){const e=t.documentElement?t.documentElement.dir:null,i=(t.body?t.body.dir:null)||e;this.value="ltr"===i||"rtl"===i?i:"ltr"}}ngOnDestroy(){this.change.complete()}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Wn,8))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(Wn,8))},token:t,providedIn:"root"}),t})(),qn=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({}),t})();function Yn(t){return t&&"function"==typeof t.connect}class Qn{applyChanges(t,e,i,n,r){t.forEachOperation((t,n,s)=>{let o,a;if(null==t.previousIndex){const r=i(t,n,s);o=e.createEmbeddedView(r.templateRef,r.context,r.index),a=1}else null==s?(e.remove(n),a=3):(o=e.get(n),e.move(o,s),a=2);r&&r({context:null==o?void 0:o.context,operation:a,record:t})})}detach(){}}class Xn{constructor(t=!1,e,i=!0){this._multiple=t,this._emitChanges=i,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new _e.a,e&&e.length&&(t?e.forEach(t=>this._markSelected(t)):this._markSelected(e[0]),this._selectedToEmit.length=0)}get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}select(...t){this._verifyValueAssignment(t),t.forEach(t=>this._markSelected(t)),this._emitChangeEvent()}deselect(...t){this._verifyValueAssignment(t),t.forEach(t=>this._unmarkSelected(t)),this._emitChangeEvent()}toggle(t){this.isSelected(t)?this.deselect(t):this.select(t)}clear(){this._unmarkAll(),this._emitChangeEvent()}isSelected(t){return this._selection.has(t)}isEmpty(){return 0===this._selection.size}hasValue(){return!this.isEmpty()}sort(t){this._multiple&&this.selected&&this._selected.sort(t)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(t){this.isSelected(t)||(this._multiple||this._unmarkAll(),this._selection.add(t),this._emitChanges&&this._selectedToEmit.push(t))}_unmarkSelected(t){this.isSelected(t)&&(this._selection.delete(t),this._emitChanges&&this._deselectedToEmit.push(t))}_unmarkAll(){this.isEmpty()||this._selection.forEach(t=>this._unmarkSelected(t))}_verifyValueAssignment(t){}}let Jn=(()=>{class t{constructor(){this._listeners=[]}notify(t,e){for(let i of this._listeners)i(t,e)}listen(t){return this._listeners.push(t),()=>{this._listeners=this._listeners.filter(e=>t!==e)}}ngOnDestroy(){this._listeners=[]}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(r.Lb)({factory:function(){return new t},token:t,providedIn:"root"}),t})();const tr=new r.s("_ViewRepeater");let er=(()=>{class t{constructor(t,e,i){this._ngZone=t,this._platform=e,this._scrolled=new _e.a,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=i}register(t){this.scrollContainers.has(t)||this.scrollContainers.set(t,t.elementScrolled().subscribe(()=>this._scrolled.next(t)))}deregister(t){const e=this.scrollContainers.get(t);e&&(e.unsubscribe(),this.scrollContainers.delete(t))}scrolled(t=20){return this._platform.isBrowser?new Ze.a(e=>{this._globalSubscription||this._addGlobalListener();const i=t>0?this._scrolled.pipe(Cn(t)).subscribe(e):this._scrolled.subscribe(e);return this._scrolledCount++,()=>{i.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):Se()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((t,e)=>this.deregister(e)),this._scrolled.complete()}ancestorScrolled(t,e){const i=this.getAncestorScrollContainers(t);return this.scrolled(e).pipe(He(t=>!t||i.indexOf(t)>-1))}getAncestorScrollContainers(t){const e=[];return this.scrollContainers.forEach((i,n)=>{this._scrollableContainsElement(n,t)&&e.push(n)}),e}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(t,e){let i=si(e),n=t.getElementRef().nativeElement;do{if(i==n)return!0}while(i=i.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>en(this._getWindow().document,"scroll").subscribe(()=>this._scrolled.next()))}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.B),r.Zb(ci),r.Zb(a,8))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(r.B),Object(r.Zb)(ci),Object(r.Zb)(a,8))},token:t,providedIn:"root"}),t})(),ir=(()=>{class t{constructor(t,e,i,n){this.elementRef=t,this.scrollDispatcher=e,this.ngZone=i,this.dir=n,this._destroyed=new _e.a,this._elementScrolled=new Ze.a(t=>this.ngZone.runOutsideAngular(()=>en(this.elementRef.nativeElement,"scroll").pipe(Sn(this._destroyed)).subscribe(t)))}ngOnInit(){this.scrollDispatcher.register(this)}ngOnDestroy(){this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(t){const e=this.elementRef.nativeElement,i=this.dir&&"rtl"==this.dir.value;null==t.left&&(t.left=i?t.end:t.start),null==t.right&&(t.right=i?t.start:t.end),null!=t.bottom&&(t.top=e.scrollHeight-e.clientHeight-t.bottom),i&&0!=vi()?(null!=t.left&&(t.right=e.scrollWidth-e.clientWidth-t.left),2==vi()?t.left=t.right:1==vi()&&(t.left=t.right?-t.right:t.right)):null!=t.right&&(t.left=e.scrollWidth-e.clientWidth-t.right),this._applyScrollToOptions(t)}_applyScrollToOptions(t){const e=this.elementRef.nativeElement;bi()?e.scrollTo(t):(null!=t.top&&(e.scrollTop=t.top),null!=t.left&&(e.scrollLeft=t.left))}measureScrollOffset(t){const e=this.elementRef.nativeElement;if("top"==t)return e.scrollTop;if("bottom"==t)return e.scrollHeight-e.clientHeight-e.scrollTop;const i=this.dir&&"rtl"==this.dir.value;return"start"==t?t=i?"right":"left":"end"==t&&(t=i?"left":"right"),i&&2==vi()?"left"==t?e.scrollWidth-e.clientWidth-e.scrollLeft:e.scrollLeft:i&&1==vi()?"left"==t?e.scrollLeft+e.scrollWidth-e.clientWidth:-e.scrollLeft:"left"==t?e.scrollLeft:e.scrollWidth-e.clientWidth-e.scrollLeft}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(er),r.Pb(r.B),r.Pb(Zn,8))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]}),t})(),nr=(()=>{class t{constructor(t,e,i){this._platform=t,this._change=new _e.a,this._changeListener=t=>{this._change.next(t)},this._document=i,e.runOutsideAngular(()=>{if(t.isBrowser){const t=this._getWindow();t.addEventListener("resize",this._changeListener),t.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._updateViewportSize())})}ngOnDestroy(){if(this._platform.isBrowser){const t=this._getWindow();t.removeEventListener("resize",this._changeListener),t.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}getViewportRect(){const t=this.getViewportScrollPosition(),{width:e,height:i}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+i,right:t.left+e,height:i,width:e}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const t=this._document,e=this._getWindow(),i=t.documentElement,n=i.getBoundingClientRect();return{top:-n.top||t.body.scrollTop||e.scrollY||i.scrollTop||0,left:-n.left||t.body.scrollLeft||e.scrollX||i.scrollLeft||0}}change(t=20){return t>0?this._change.pipe(Cn(t)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){const t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(ci),r.Zb(r.B),r.Zb(a,8))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(ci),Object(r.Zb)(r.B),Object(r.Zb)(a,8))},token:t,providedIn:"root"}),t})(),rr=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({}),t})(),sr=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[qn,hi,rr],qn,rr]}),t})();var or=i("VRyK");function ar(t,e=!1){return i=>i.lift(new lr(t,e))}class lr{constructor(t,e){this.predicate=t,this.inclusive=e}call(t,e){return e.subscribe(new cr(t,this.predicate,this.inclusive))}}class cr extends Ee.a{constructor(t,e,i){super(t),this.predicate=e,this.inclusive=i,this.index=0}_next(t){const e=this.destination;let i;try{i=this.predicate(t,this.index++)}catch(n){return void e.error(n)}this.nextOrComplete(t,i)}nextOrComplete(t,e){const i=this.destination;Boolean(e)?i.next(t):(this.inclusive&&i.next(t),i.complete())}}const hr=bi();class ur{constructor(t,e){this._viewportRuler=t,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=e}attach(){}enable(){if(this._canBeEnabled()){const t=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=t.style.left||"",this._previousHTMLStyles.top=t.style.top||"",t.style.left=ri(-this._previousScrollPosition.left),t.style.top=ri(-this._previousScrollPosition.top),t.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){const t=this._document.documentElement,e=t.style,i=this._document.body.style,n=e.scrollBehavior||"",r=i.scrollBehavior||"";this._isEnabled=!1,e.left=this._previousHTMLStyles.left,e.top=this._previousHTMLStyles.top,t.classList.remove("cdk-global-scrollblock"),hr&&(e.scrollBehavior=i.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),hr&&(e.scrollBehavior=n,i.scrollBehavior=r)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;const t=this._document.body,e=this._viewportRuler.getViewportSize();return t.scrollHeight>e.height||t.scrollWidth>e.width}}class dr{constructor(t,e,i,n){this._scrollDispatcher=t,this._ngZone=e,this._viewportRuler=i,this._config=n,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(t){this._overlayRef=t}enable(){if(this._scrollSubscription)return;const t=this._scrollDispatcher.scrolled(0);this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=t.subscribe(()=>{const t=this._viewportRuler.getViewportScrollPosition().top;Math.abs(t-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=t.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}class pr{enable(){}disable(){}attach(){}}function fr(t,e){return e.some(e=>t.bottom<e.top||t.top>e.bottom||t.right<e.left||t.left>e.right)}function mr(t,e){return e.some(e=>t.top<e.top||t.bottom>e.bottom||t.left<e.left||t.right>e.right)}class gr{constructor(t,e,i,n){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=i,this._config=n,this._scrollSubscription=null}attach(t){this._overlayRef=t}enable(){this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){const t=this._overlayRef.overlayElement.getBoundingClientRect(),{width:e,height:i}=this._viewportRuler.getViewportSize();fr(t,[{width:e,height:i,bottom:i,right:e,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}}))}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}let Ar=(()=>{class t{constructor(t,e,i,n){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=i,this.noop=()=>new pr,this.close=t=>new dr(this._scrollDispatcher,this._ngZone,this._viewportRuler,t),this.block=()=>new ur(this._viewportRuler,this._document),this.reposition=t=>new gr(this._scrollDispatcher,this._viewportRuler,this._ngZone,t),this._document=n}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(er),r.Zb(nr),r.Zb(r.B),r.Zb(a))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(er),Object(r.Zb)(nr),Object(r.Zb)(r.B),Object(r.Zb)(a))},token:t,providedIn:"root"}),t})();class br{constructor(t){if(this.scrollStrategy=new pr,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,t){const e=Object.keys(t);for(const i of e)void 0!==t[i]&&(this[i]=t[i])}}}class vr{constructor(t,e,i,n,r){this.offsetX=i,this.offsetY=n,this.panelClass=r,this.originX=t.originX,this.originY=t.originY,this.overlayX=e.overlayX,this.overlayY=e.overlayY}}class _r{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}let yr=(()=>{class t{constructor(t){this._attachedOverlays=[],this._document=t}ngOnDestroy(){this.detach()}add(t){this.remove(t),this._attachedOverlays.push(t)}remove(t){const e=this._attachedOverlays.indexOf(t);e>-1&&this._attachedOverlays.splice(e,1),0===this._attachedOverlays.length&&this.detach()}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(a))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(a))},token:t,providedIn:"root"}),t})(),wr=(()=>{class t extends yr{constructor(t){super(t),this._keydownListener=t=>{const e=this._attachedOverlays;for(let i=e.length-1;i>-1;i--)if(e[i]._keydownEvents.observers.length>0){e[i]._keydownEvents.next(t);break}}}add(t){super.add(t),this._isAttached||(this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(a))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(a))},token:t,providedIn:"root"}),t})(),xr=(()=>{class t extends yr{constructor(t,e){super(t),this._platform=e,this._cursorStyleIsSet=!1,this._clickListener=t=>{const e=t.composedPath?t.composedPath()[0]:t.target,i=this._attachedOverlays.slice();for(let n=i.length-1;n>-1;n--){const r=i[n];if(!(r._outsidePointerEvents.observers.length<1)&&r.hasAttached()){if(r.overlayElement.contains(e))break;r._outsidePointerEvents.next(t)}}}}add(t){super.add(t),this._isAttached||(this._document.body.addEventListener("click",this._clickListener,!0),this._document.body.addEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=this._document.body.style.cursor,this._document.body.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("click",this._clickListener,!0),this._document.body.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(a),r.Zb(ci))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(a),Object(r.Zb)(ci))},token:t,providedIn:"root"}),t})();const Cr=!("undefined"==typeof window||!window||!window.__karma__&&!window.jasmine);let Sr=(()=>{class t{constructor(t,e){this._platform=e,this._document=t}ngOnDestroy(){const t=this._containerElement;t&&t.parentNode&&t.parentNode.removeChild(t)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){if(this._platform.isBrowser||Cr){const t=this._document.querySelectorAll('.cdk-overlay-container[platform="server"], .cdk-overlay-container[platform="test"]');for(let e=0;e<t.length;e++)t[e].parentNode.removeChild(t[e])}const t=this._document.createElement("div");t.classList.add("cdk-overlay-container"),Cr?t.setAttribute("platform","test"):this._platform.isBrowser||t.setAttribute("platform","server"),this._document.body.appendChild(t),this._containerElement=t}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(a),r.Zb(ci))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(a),Object(r.Zb)(ci))},token:t,providedIn:"root"}),t})();class kr{constructor(t,e,i,n,r,s,o,a,l){this._portalOutlet=t,this._host=e,this._pane=i,this._config=n,this._ngZone=r,this._keyboardDispatcher=s,this._document=o,this._location=a,this._outsideClickDispatcher=l,this._backdropElement=null,this._backdropClick=new _e.a,this._attachments=new _e.a,this._detachments=new _e.a,this._locationChanges=ye.a.EMPTY,this._backdropClickHandler=t=>this._backdropClick.next(t),this._keydownEvents=new _e.a,this._outsidePointerEvents=new _e.a,n.scrollStrategy&&(this._scrollStrategy=n.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=n.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(t){let e=this._portalOutlet.attach(t);return!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host),this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._ngZone.onStable.pipe(Qe(1)).subscribe(()=>{this.hasAttached()&&this.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),e}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();const t=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenStable(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),t}dispose(){const t=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this.detachBackdrop(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host&&this._host.parentNode&&(this._host.parentNode.removeChild(this._host),this._host=null),this._previousHostParent=this._pane=null,t&&this._detachments.next(),this._detachments.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(t){t!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=t,this.hasAttached()&&(t.attach(this),this.updatePosition()))}updateSize(t){this._config=Object.assign(Object.assign({},this._config),t),this._updateElementSize()}setDirection(t){this._config=Object.assign(Object.assign({},this._config),{direction:t}),this._updateElementDirection()}addPanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!0)}removePanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!1)}getDirection(){const t=this._config.direction;return t?"string"==typeof t?t:t.value:"ltr"}updateScrollStrategy(t){t!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=t,this.hasAttached()&&(t.attach(this),t.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;const t=this._pane.style;t.width=ri(this._config.width),t.height=ri(this._config.height),t.minWidth=ri(this._config.minWidth),t.minHeight=ri(this._config.minHeight),t.maxWidth=ri(this._config.maxWidth),t.maxHeight=ri(this._config.maxHeight)}_togglePointerEvents(t){this._pane.style.pointerEvents=t?"":"none"}_attachBackdrop(){this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),"undefined"!=typeof requestAnimationFrame?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add("cdk-overlay-backdrop-showing")})}):this._backdropElement.classList.add("cdk-overlay-backdrop-showing")}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){let t,e=this._backdropElement;if(!e)return;let i=()=>{e&&(e.removeEventListener("click",this._backdropClickHandler),e.removeEventListener("transitionend",i),e.parentNode&&e.parentNode.removeChild(e)),this._backdropElement==e&&(this._backdropElement=null),this._config.backdropClass&&this._toggleClasses(e,this._config.backdropClass,!1),clearTimeout(t)};e.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{e.addEventListener("transitionend",i)}),e.style.pointerEvents="none",t=this._ngZone.runOutsideAngular(()=>setTimeout(i,500))}_toggleClasses(t,e,i){const n=t.classList;ni(e).forEach(t=>{t&&(i?n.add(t):n.remove(t))})}_detachContentWhenStable(){this._ngZone.runOutsideAngular(()=>{const t=this._ngZone.onStable.pipe(Sn(Object(or.a)(this._attachments,this._detachments))).subscribe(()=>{this._pane&&this._host&&0!==this._pane.children.length||(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._previousHostParent.removeChild(this._host)),t.unsubscribe())})})}_disposeScrollStrategy(){const t=this._scrollStrategy;t&&(t.disable(),t.detach&&t.detach())}}const Er=/([A-Za-z%]+)$/;class Dr{constructor(t,e,i,n,r){this._viewportRuler=e,this._document=i,this._platform=n,this._overlayContainer=r,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new _e.a,this._resizeSubscription=ye.a.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}get positions(){return this._preferredPositions}attach(t){this._validatePositions(),t.hostElement.classList.add("cdk-overlay-connected-position-bounding-box"),this._overlayRef=t,this._boundingBox=t.hostElement,this._pane=t.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition)return void this.reapplyLastPosition();this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect();const t=this._originRect,e=this._overlayRect,i=this._viewportRect,n=[];let r;for(let s of this._preferredPositions){let o=this._getOriginPoint(t,s),a=this._getOverlayPoint(o,e,s),l=this._getOverlayFit(a,e,i,s);if(l.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(s,o);this._canFitWithFlexibleDimensions(l,a,i)?n.push({position:s,origin:o,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(o,s)}):(!r||r.overlayFit.visibleArea<l.visibleArea)&&(r={overlayFit:l,overlayPoint:a,originPoint:o,position:s,overlayRect:e})}if(n.length){let t=null,e=-1;for(const i of n){const n=i.boundingBoxRect.width*i.boundingBoxRect.height*(i.position.weight||1);n>e&&(e=n,t=i)}return this._isPushed=!1,void this._applyPosition(t.position,t.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(r.position,r.originPoint);this._applyPosition(r.position,r.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&Ir(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove("cdk-overlay-connected-position-bounding-box"),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(!this._isDisposed&&(!this._platform||this._platform.isBrowser)){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect();const t=this._lastPosition||this._preferredPositions[0],e=this._getOriginPoint(this._originRect,t);this._applyPosition(t,e)}}withScrollableContainers(t){return this._scrollables=t,this}withPositions(t){return this._preferredPositions=t,-1===t.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(t){return this._viewportMargin=t,this}withFlexibleDimensions(t=!0){return this._hasFlexibleDimensions=t,this}withGrowAfterOpen(t=!0){return this._growAfterOpen=t,this}withPush(t=!0){return this._canPush=t,this}withLockedPosition(t=!0){return this._positionLocked=t,this}setOrigin(t){return this._origin=t,this}withDefaultOffsetX(t){return this._offsetX=t,this}withDefaultOffsetY(t){return this._offsetY=t,this}withTransformOriginOn(t){return this._transformOriginSelector=t,this}_getOriginPoint(t,e){let i,n;if("center"==e.originX)i=t.left+t.width/2;else{const n=this._isRtl()?t.right:t.left,r=this._isRtl()?t.left:t.right;i="start"==e.originX?n:r}return n="center"==e.originY?t.top+t.height/2:"top"==e.originY?t.top:t.bottom,{x:i,y:n}}_getOverlayPoint(t,e,i){let n,r;return n="center"==i.overlayX?-e.width/2:"start"===i.overlayX?this._isRtl()?-e.width:0:this._isRtl()?0:-e.width,r="center"==i.overlayY?-e.height/2:"top"==i.overlayY?0:-e.height,{x:t.x+n,y:t.y+r}}_getOverlayFit(t,e,i,n){const r=Or(e);let{x:s,y:o}=t,a=this._getOffset(n,"x"),l=this._getOffset(n,"y");a&&(s+=a),l&&(o+=l);let c=0-o,h=o+r.height-i.height,u=this._subtractOverflows(r.width,0-s,s+r.width-i.width),d=this._subtractOverflows(r.height,c,h),p=u*d;return{visibleArea:p,isCompletelyWithinViewport:r.width*r.height===p,fitsInViewportVertically:d===r.height,fitsInViewportHorizontally:u==r.width}}_canFitWithFlexibleDimensions(t,e,i){if(this._hasFlexibleDimensions){const n=i.bottom-e.y,r=i.right-e.x,s=Pr(this._overlayRef.getConfig().minHeight),o=Pr(this._overlayRef.getConfig().minWidth),a=t.fitsInViewportHorizontally||null!=o&&o<=r;return(t.fitsInViewportVertically||null!=s&&s<=n)&&a}return!1}_pushOverlayOnScreen(t,e,i){if(this._previousPushAmount&&this._positionLocked)return{x:t.x+this._previousPushAmount.x,y:t.y+this._previousPushAmount.y};const n=Or(e),r=this._viewportRect,s=Math.max(t.x+n.width-r.width,0),o=Math.max(t.y+n.height-r.height,0),a=Math.max(r.top-i.top-t.y,0),l=Math.max(r.left-i.left-t.x,0);let c=0,h=0;return c=n.width<=r.width?l||-s:t.x<this._viewportMargin?r.left-i.left-t.x:0,h=n.height<=r.height?a||-o:t.y<this._viewportMargin?r.top-i.top-t.y:0,this._previousPushAmount={x:c,y:h},{x:t.x+c,y:t.y+h}}_applyPosition(t,e){if(this._setTransformOrigin(t),this._setOverlayElementStyles(e,t),this._setBoundingBoxStyles(e,t),t.panelClass&&this._addPanelClasses(t.panelClass),this._lastPosition=t,this._positionChanges.observers.length){const e=this._getScrollVisibility(),i=new _r(t,e);this._positionChanges.next(i)}this._isInitialRender=!1}_setTransformOrigin(t){if(!this._transformOriginSelector)return;const e=this._boundingBox.querySelectorAll(this._transformOriginSelector);let i,n=t.overlayY;i="center"===t.overlayX?"center":this._isRtl()?"start"===t.overlayX?"right":"left":"start"===t.overlayX?"left":"right";for(let r=0;r<e.length;r++)e[r].style.transformOrigin=`${i} ${n}`}_calculateBoundingBoxRect(t,e){const i=this._viewportRect,n=this._isRtl();let r,s,o,a,l,c;if("top"===e.overlayY)s=t.y,r=i.height-s+this._viewportMargin;else if("bottom"===e.overlayY)o=i.height-t.y+2*this._viewportMargin,r=i.height-o+this._viewportMargin;else{const e=Math.min(i.bottom-t.y+i.top,t.y),n=this._lastBoundingBoxSize.height;r=2*e,s=t.y-e,r>n&&!this._isInitialRender&&!this._growAfterOpen&&(s=t.y-n/2)}if("end"===e.overlayX&&!n||"start"===e.overlayX&&n)c=i.width-t.x+this._viewportMargin,a=t.x-this._viewportMargin;else if("start"===e.overlayX&&!n||"end"===e.overlayX&&n)l=t.x,a=i.right-t.x;else{const e=Math.min(i.right-t.x+i.left,t.x),n=this._lastBoundingBoxSize.width;a=2*e,l=t.x-e,a>n&&!this._isInitialRender&&!this._growAfterOpen&&(l=t.x-n/2)}return{top:s,left:l,bottom:o,right:c,width:a,height:r}}_setBoundingBoxStyles(t,e){const i=this._calculateBoundingBoxRect(t,e);this._isInitialRender||this._growAfterOpen||(i.height=Math.min(i.height,this._lastBoundingBoxSize.height),i.width=Math.min(i.width,this._lastBoundingBoxSize.width));const n={};if(this._hasExactPosition())n.top=n.left="0",n.bottom=n.right=n.maxHeight=n.maxWidth="",n.width=n.height="100%";else{const t=this._overlayRef.getConfig().maxHeight,r=this._overlayRef.getConfig().maxWidth;n.height=ri(i.height),n.top=ri(i.top),n.bottom=ri(i.bottom),n.width=ri(i.width),n.left=ri(i.left),n.right=ri(i.right),n.alignItems="center"===e.overlayX?"center":"end"===e.overlayX?"flex-end":"flex-start",n.justifyContent="center"===e.overlayY?"center":"bottom"===e.overlayY?"flex-end":"flex-start",t&&(n.maxHeight=ri(t)),r&&(n.maxWidth=ri(r))}this._lastBoundingBoxSize=i,Ir(this._boundingBox.style,n)}_resetBoundingBoxStyles(){Ir(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Ir(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(t,e){const i={},n=this._hasExactPosition(),r=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(n){const n=this._viewportRuler.getViewportScrollPosition();Ir(i,this._getExactOverlayY(e,t,n)),Ir(i,this._getExactOverlayX(e,t,n))}else i.position="static";let o="",a=this._getOffset(e,"x"),l=this._getOffset(e,"y");a&&(o+=`translateX(${a}px) `),l&&(o+=`translateY(${l}px)`),i.transform=o.trim(),s.maxHeight&&(n?i.maxHeight=ri(s.maxHeight):r&&(i.maxHeight="")),s.maxWidth&&(n?i.maxWidth=ri(s.maxWidth):r&&(i.maxWidth="")),Ir(this._pane.style,i)}_getExactOverlayY(t,e,i){let n={top:"",bottom:""},r=this._getOverlayPoint(e,this._overlayRect,t);this._isPushed&&(r=this._pushOverlayOnScreen(r,this._overlayRect,i));let s=this._overlayContainer.getContainerElement().getBoundingClientRect().top;return r.y-=s,"bottom"===t.overlayY?n.bottom=this._document.documentElement.clientHeight-(r.y+this._overlayRect.height)+"px":n.top=ri(r.y),n}_getExactOverlayX(t,e,i){let n,r={left:"",right:""},s=this._getOverlayPoint(e,this._overlayRect,t);return this._isPushed&&(s=this._pushOverlayOnScreen(s,this._overlayRect,i)),n=this._isRtl()?"end"===t.overlayX?"left":"right":"end"===t.overlayX?"right":"left","right"===n?r.right=this._document.documentElement.clientWidth-(s.x+this._overlayRect.width)+"px":r.left=ri(s.x),r}_getScrollVisibility(){const t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),i=this._scrollables.map(t=>t.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:mr(t,i),isOriginOutsideView:fr(t,i),isOverlayClipped:mr(e,i),isOverlayOutsideView:fr(e,i)}}_subtractOverflows(t,...e){return e.reduce((t,e)=>t-Math.max(e,0),t)}_getNarrowedViewportRect(){const t=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,i=this._viewportRuler.getViewportScrollPosition();return{top:i.top+this._viewportMargin,left:i.left+this._viewportMargin,right:i.left+t-this._viewportMargin,bottom:i.top+e-this._viewportMargin,width:t-2*this._viewportMargin,height:e-2*this._viewportMargin}}_isRtl(){return"rtl"===this._overlayRef.getDirection()}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(t,e){return"x"===e?null==t.offsetX?this._offsetX:t.offsetX:null==t.offsetY?this._offsetY:t.offsetY}_validatePositions(){}_addPanelClasses(t){this._pane&&ni(t).forEach(t=>{""!==t&&-1===this._appliedPanelClasses.indexOf(t)&&(this._appliedPanelClasses.push(t),this._pane.classList.add(t))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(t=>{this._pane.classList.remove(t)}),this._appliedPanelClasses=[])}_getOriginRect(){const t=this._origin;if(t instanceof r.l)return t.nativeElement.getBoundingClientRect();if(t instanceof Element)return t.getBoundingClientRect();const e=t.width||0,i=t.height||0;return{top:t.y,bottom:t.y+i,left:t.x,right:t.x+e,height:i,width:e}}}function Ir(t,e){for(let i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function Pr(t){if("number"!=typeof t&&null!=t){const[e,i]=t.split(Er);return i&&"px"!==i?null:parseFloat(e)}return t||null}function Or(t){return{top:Math.floor(t.top),right:Math.floor(t.right),bottom:Math.floor(t.bottom),left:Math.floor(t.left),width:Math.floor(t.width),height:Math.floor(t.height)}}class Mr{constructor(t,e,i,n,r,s,o){this._preferredPositions=[],this._positionStrategy=new Dr(i,n,r,s,o).withFlexibleDimensions(!1).withPush(!1).withViewportMargin(0),this.withFallbackPosition(t,e),this.onPositionChange=this._positionStrategy.positionChanges}get positions(){return this._preferredPositions}attach(t){this._overlayRef=t,this._positionStrategy.attach(t),this._direction&&(t.setDirection(this._direction),this._direction=null)}dispose(){this._positionStrategy.dispose()}detach(){this._positionStrategy.detach()}apply(){this._positionStrategy.apply()}recalculateLastPosition(){this._positionStrategy.reapplyLastPosition()}withScrollableContainers(t){this._positionStrategy.withScrollableContainers(t)}withFallbackPosition(t,e,i,n){const r=new vr(t,e,i,n);return this._preferredPositions.push(r),this._positionStrategy.withPositions(this._preferredPositions),this}withDirection(t){return this._overlayRef?this._overlayRef.setDirection(t):this._direction=t,this}withOffsetX(t){return this._positionStrategy.withDefaultOffsetX(t),this}withOffsetY(t){return this._positionStrategy.withDefaultOffsetY(t),this}withLockedPosition(t){return this._positionStrategy.withLockedPosition(t),this}withPositions(t){return this._preferredPositions=t.slice(),this._positionStrategy.withPositions(this._preferredPositions),this}setOrigin(t){return this._positionStrategy.setOrigin(t),this}}class Tr{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._leftOffset="",this._rightOffset="",this._alignItems="",this._justifyContent="",this._width="",this._height=""}attach(t){const e=t.getConfig();this._overlayRef=t,this._width&&!e.width&&t.updateSize({width:this._width}),this._height&&!e.height&&t.updateSize({height:this._height}),t.hostElement.classList.add("cdk-global-overlay-wrapper"),this._isDisposed=!1}top(t=""){return this._bottomOffset="",this._topOffset=t,this._alignItems="flex-start",this}left(t=""){return this._rightOffset="",this._leftOffset=t,this._justifyContent="flex-start",this}bottom(t=""){return this._topOffset="",this._bottomOffset=t,this._alignItems="flex-end",this}right(t=""){return this._leftOffset="",this._rightOffset=t,this._justifyContent="flex-end",this}width(t=""){return this._overlayRef?this._overlayRef.updateSize({width:t}):this._width=t,this}height(t=""){return this._overlayRef?this._overlayRef.updateSize({height:t}):this._height=t,this}centerHorizontally(t=""){return this.left(t),this._justifyContent="center",this}centerVertically(t=""){return this.top(t),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;const t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,i=this._overlayRef.getConfig(),{width:n,height:r,maxWidth:s,maxHeight:o}=i,a=!("100%"!==n&&"100vw"!==n||s&&"100%"!==s&&"100vw"!==s),l=!("100%"!==r&&"100vh"!==r||o&&"100%"!==o&&"100vh"!==o);t.position=this._cssPosition,t.marginLeft=a?"0":this._leftOffset,t.marginTop=l?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=this._rightOffset,a?e.justifyContent="flex-start":"center"===this._justifyContent?e.justifyContent="center":"rtl"===this._overlayRef.getConfig().direction?"flex-start"===this._justifyContent?e.justifyContent="flex-end":"flex-end"===this._justifyContent&&(e.justifyContent="flex-start"):e.justifyContent=this._justifyContent,e.alignItems=l?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;const t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,i=e.style;e.classList.remove("cdk-global-overlay-wrapper"),i.justifyContent=i.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}let Rr=(()=>{class t{constructor(t,e,i,n){this._viewportRuler=t,this._document=e,this._platform=i,this._overlayContainer=n}global(){return new Tr}connectedTo(t,e,i){return new Mr(e,i,t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}flexibleConnectedTo(t){return new Dr(t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(nr),r.Zb(a),r.Zb(ci),r.Zb(Sr))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(nr),Object(r.Zb)(a),Object(r.Zb)(ci),Object(r.Zb)(Sr))},token:t,providedIn:"root"}),t})(),Vr=0,Fr=(()=>{class t{constructor(t,e,i,n,r,s,o,a,l,c,h){this.scrollStrategies=t,this._overlayContainer=e,this._componentFactoryResolver=i,this._positionBuilder=n,this._keyboardDispatcher=r,this._injector=s,this._ngZone=o,this._document=a,this._directionality=l,this._location=c,this._outsideClickDispatcher=h}create(t){const e=this._createHostElement(),i=this._createPaneElement(e),n=this._createPortalOutlet(i),r=new br(t);return r.direction=r.direction||this._directionality.value,new kr(n,e,i,r,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher)}position(){return this._positionBuilder}_createPaneElement(t){const e=this._document.createElement("div");return e.id="cdk-overlay-"+Vr++,e.classList.add("cdk-overlay-pane"),t.appendChild(e),e}_createHostElement(){const t=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(t),t}_createPortalOutlet(t){return this._appRef||(this._appRef=this._injector.get(r.g)),new Ae(t,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Ar),r.Zb(Sr),r.Zb(r.j),r.Zb(Rr),r.Zb(wr),r.Zb(r.t),r.Zb(r.B),r.Zb(a),r.Zb(Zn),r.Zb(w),r.Zb(xr))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();const Lr=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],Ur=new r.s("cdk-connected-overlay-scroll-strategy");let Br=(()=>{class t{constructor(t){this.elementRef=t}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"]}),t})(),Nr=(()=>{class t{constructor(t,e,i,n,s){this._overlay=t,this._dir=s,this._hasBackdrop=!1,this._lockPosition=!1,this._growAfterOpen=!1,this._flexibleDimensions=!1,this._push=!1,this._backdropSubscription=ye.a.EMPTY,this._attachSubscription=ye.a.EMPTY,this._detachSubscription=ye.a.EMPTY,this._positionSubscription=ye.a.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new r.o,this.positionChange=new r.o,this.attach=new r.o,this.detach=new r.o,this.overlayKeydown=new r.o,this.overlayOutsideClick=new r.o,this._templatePortal=new fe(e,i),this._scrollStrategyFactory=n,this.scrollStrategy=this._scrollStrategyFactory()}get offsetX(){return this._offsetX}set offsetX(t){this._offsetX=t,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(t){this._offsetY=t,this._position&&this._updatePositionStrategy(this._position)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(t){this._hasBackdrop=ti(t)}get lockPosition(){return this._lockPosition}set lockPosition(t){this._lockPosition=ti(t)}get flexibleDimensions(){return this._flexibleDimensions}set flexibleDimensions(t){this._flexibleDimensions=ti(t)}get growAfterOpen(){return this._growAfterOpen}set growAfterOpen(t){this._growAfterOpen=ti(t)}get push(){return this._push}set push(t){this._push=ti(t)}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef&&this._overlayRef.dispose()}ngOnChanges(t){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),t.origin&&this.open&&this._position.apply()),t.open&&(this.open?this._attachOverlay():this._detachOverlay())}_createOverlay(){this.positions&&this.positions.length||(this.positions=Lr);const t=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=t.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=t.detachments().subscribe(()=>this.detach.emit()),t.keydownEvents().subscribe(t=>{this.overlayKeydown.next(t),27!==t.keyCode||this.disableClose||ke(t)||(t.preventDefault(),this._detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(t=>{this.overlayOutsideClick.next(t)})}_buildConfig(){const t=this._position=this.positionStrategy||this._createPositionStrategy(),e=new br({direction:this._dir,positionStrategy:t,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop});return(this.width||0===this.width)&&(e.width=this.width),(this.height||0===this.height)&&(e.height=this.height),(this.minWidth||0===this.minWidth)&&(e.minWidth=this.minWidth),(this.minHeight||0===this.minHeight)&&(e.minHeight=this.minHeight),this.backdropClass&&(e.backdropClass=this.backdropClass),this.panelClass&&(e.panelClass=this.panelClass),e}_updatePositionStrategy(t){const e=this.positions.map(t=>({originX:t.originX,originY:t.originY,overlayX:t.overlayX,overlayY:t.overlayY,offsetX:t.offsetX||this.offsetX,offsetY:t.offsetY||this.offsetY,panelClass:t.panelClass||void 0}));return t.setOrigin(this.origin.elementRef).withPositions(e).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){const t=this._overlay.position().flexibleConnectedTo(this.origin.elementRef);return this._updatePositionStrategy(t),t}_attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(t=>{this.backdropClick.emit(t)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(ar(()=>this.positionChange.observers.length>0)).subscribe(t=>{this.positionChange.emit(t),0===this.positionChange.observers.length&&this._positionSubscription.unsubscribe()}))}_detachOverlay(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Fr),r.Pb(r.O),r.Pb(r.S),r.Pb(Ur),r.Pb(Zn,8))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{viewportMargin:["cdkConnectedOverlayViewportMargin","viewportMargin"],open:["cdkConnectedOverlayOpen","open"],disableClose:["cdkConnectedOverlayDisableClose","disableClose"],scrollStrategy:["cdkConnectedOverlayScrollStrategy","scrollStrategy"],offsetX:["cdkConnectedOverlayOffsetX","offsetX"],offsetY:["cdkConnectedOverlayOffsetY","offsetY"],hasBackdrop:["cdkConnectedOverlayHasBackdrop","hasBackdrop"],lockPosition:["cdkConnectedOverlayLockPosition","lockPosition"],flexibleDimensions:["cdkConnectedOverlayFlexibleDimensions","flexibleDimensions"],growAfterOpen:["cdkConnectedOverlayGrowAfterOpen","growAfterOpen"],push:["cdkConnectedOverlayPush","push"],positions:["cdkConnectedOverlayPositions","positions"],origin:["cdkConnectedOverlayOrigin","origin"],positionStrategy:["cdkConnectedOverlayPositionStrategy","positionStrategy"],width:["cdkConnectedOverlayWidth","width"],height:["cdkConnectedOverlayHeight","height"],minWidth:["cdkConnectedOverlayMinWidth","minWidth"],minHeight:["cdkConnectedOverlayMinHeight","minHeight"],backdropClass:["cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:["cdkConnectedOverlayPanelClass","panelClass"],transformOriginSelector:["cdkConnectedOverlayTransformOriginOn","transformOriginSelector"]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],features:[r.Bb]}),t})();const jr={provide:Ur,deps:[Fr],useFactory:function(t){return()=>t.scrollStrategies.reposition()}};let zr=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[Fr,jr],imports:[[qn,ve,sr],sr]}),t})();const Hr=new r.R("11.2.5");class Kr{}function $r(t,e){return{type:7,name:t,definitions:e,options:{}}}function Gr(t,e=null){return{type:4,styles:e,timings:t}}function Wr(t,e=null){return{type:2,steps:t,options:e}}function Zr(t){return{type:6,styles:t,offset:null}}function qr(t,e,i){return{type:0,name:t,styles:e,options:i}}function Yr(t){return{type:5,steps:t}}function Qr(t,e,i=null){return{type:1,expr:t,animation:e,options:i}}function Xr(t=null){return{type:9,options:t}}function Jr(t,e,i=null){return{type:11,selector:t,animation:e,options:i}}function ts(t){Promise.resolve(null).then(t)}class es{constructor(t=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=t+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){ts(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){}setPosition(t){this._position=this.totalTime?t*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}class is{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let e=0,i=0,n=0;const r=this.players.length;0==r?ts(()=>this._onFinish()):this.players.forEach(t=>{t.onDone(()=>{++e==r&&this._onFinish()}),t.onDestroy(()=>{++i==r&&this._onDestroy()}),t.onStart(()=>{++n==r&&this._onStart()})}),this.totalTime=this.players.reduce((t,e)=>Math.max(t,e.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){const e=t*this.totalTime;this.players.forEach(t=>{const i=t.totalTime?Math.min(1,e/t.totalTime):1;t.setPosition(i)})}getPosition(){const t=this.players.reduce((t,e)=>null===t||e.totalTime>t.totalTime?e:t,null);return null!=t?t.getPosition():0}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}function ns(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function rs(t){switch(t.length){case 0:return new es;case 1:return t[0];default:return new is(t)}}function ss(t,e,i,n,r={},s={}){const o=[],a=[];let l=-1,c=null;if(n.forEach(t=>{const i=t.offset,n=i==l,h=n&&c||{};Object.keys(t).forEach(i=>{let n=i,a=t[i];if("offset"!==i)switch(n=e.normalizePropertyName(n,o),a){case"!":a=r[i];break;case"*":a=s[i];break;default:a=e.normalizeStyleValue(i,n,a,o)}h[n]=a}),n||a.push(h),c=h,l=i}),o.length){const t="\n - ";throw new Error(`Unable to animate due to the following errors:${t}${o.join(t)}`)}return a}function os(t,e,i,n){switch(e){case"start":t.onStart(()=>n(i&&as(i,"start",t)));break;case"done":t.onDone(()=>n(i&&as(i,"done",t)));break;case"destroy":t.onDestroy(()=>n(i&&as(i,"destroy",t)))}}function as(t,e,i){const n=i.totalTime,r=ls(t.element,t.triggerName,t.fromState,t.toState,e||t.phaseName,null==n?t.totalTime:n,!!i.disabled),s=t._data;return null!=s&&(r._data=s),r}function ls(t,e,i,n,r="",s=0,o){return{element:t,triggerName:e,fromState:i,toState:n,phaseName:r,totalTime:s,disabled:!!o}}function cs(t,e,i){let n;return t instanceof Map?(n=t.get(e),n||t.set(e,n=i)):(n=t[e],n||(n=t[e]=i)),n}function hs(t){const e=t.indexOf(":");return[t.substring(1,e),t.substr(e+1)]}let us=(t,e)=>!1,ds=(t,e)=>!1,ps=(t,e,i)=>[];const fs=ns();(fs||"undefined"!=typeof Element)&&(us=(t,e)=>t.contains(e),ds=(()=>{if(fs||Element.prototype.matches)return(t,e)=>t.matches(e);{const t=Element.prototype,e=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector;return e?(t,i)=>e.apply(t,[i]):ds}})(),ps=(t,e,i)=>{let n=[];if(i){const i=t.querySelectorAll(e);for(let t=0;t<i.length;t++)n.push(i[t])}else{const i=t.querySelector(e);i&&n.push(i)}return n});let ms=null,gs=!1;function As(t){ms||(ms=("undefined"!=typeof document?document.body:null)||{},gs=!!ms.style&&"WebkitAppearance"in ms.style);let e=!0;return ms.style&&!function(t){return"ebkit"==t.substring(1,6)}(t)&&(e=t in ms.style,!e&&gs)&&(e="Webkit"+t.charAt(0).toUpperCase()+t.substr(1)in ms.style),e}const bs=ds,vs=us,_s=ps;function ys(t){const e={};return Object.keys(t).forEach(i=>{const n=i.replace(/([a-z])([A-Z])/g,"$1-$2");e[n]=t[i]}),e}let ws=(()=>{class t{validateStyleProperty(t){return As(t)}matchesElement(t,e){return bs(t,e)}containsElement(t,e){return vs(t,e)}query(t,e,i){return _s(t,e,i)}computeStyle(t,e,i){return i||""}animate(t,e,i,n,r,s=[],o){return new es(i,n)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),xs=(()=>{class t{}return t.NOOP=new ws,t})();function Cs(t){if("number"==typeof t)return t;const e=t.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:Ss(parseFloat(e[1]),e[2])}function Ss(t,e){switch(e){case"s":return 1e3*t;default:return t}}function ks(t,e,i){return t.hasOwnProperty("duration")?t:function(t,e,i){let n,r=0,s="";if("string"==typeof t){const i=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===i)return e.push(`The provided timing value "${t}" is invalid.`),{duration:0,delay:0,easing:""};n=Ss(parseFloat(i[1]),i[2]);const o=i[3];null!=o&&(r=Ss(parseFloat(o),i[4]));const a=i[5];a&&(s=a)}else n=t;if(!i){let i=!1,s=e.length;n<0&&(e.push("Duration values below 0 are not allowed for this animation step."),i=!0),r<0&&(e.push("Delay values below 0 are not allowed for this animation step."),i=!0),i&&e.splice(s,0,`The provided timing value "${t}" is invalid.`)}return{duration:n,delay:r,easing:s}}(t,e,i)}function Es(t,e={}){return Object.keys(t).forEach(i=>{e[i]=t[i]}),e}function Ds(t,e,i={}){if(e)for(let n in t)i[n]=t[n];else Es(t,i);return i}function Is(t,e,i){return i?e+":"+i+";":""}function Ps(t){let e="";for(let i=0;i<t.style.length;i++){const n=t.style.item(i);e+=Is(0,n,t.style.getPropertyValue(n))}for(const i in t.style)t.style.hasOwnProperty(i)&&!i.startsWith("_")&&(e+=Is(0,i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),t.style[i]));t.setAttribute("style",e)}function Os(t,e,i){t.style&&(Object.keys(e).forEach(n=>{const r=Bs(n);i&&!i.hasOwnProperty(n)&&(i[n]=t.style[r]),t.style[r]=e[n]}),ns()&&Ps(t))}function Ms(t,e){t.style&&(Object.keys(e).forEach(e=>{const i=Bs(e);t.style[i]=""}),ns()&&Ps(t))}function Ts(t){return Array.isArray(t)?1==t.length?t[0]:Wr(t):t}const Rs=new RegExp("{{\\s*(.+?)\\s*}}","g");function Vs(t){let e=[];if("string"==typeof t){let i;for(;i=Rs.exec(t);)e.push(i[1]);Rs.lastIndex=0}return e}function Fs(t,e,i){const n=t.toString(),r=n.replace(Rs,(t,n)=>{let r=e[n];return e.hasOwnProperty(n)||(i.push(`Please provide a value for the animation param ${n}`),r=""),r.toString()});return r==n?t:r}function Ls(t){const e=[];let i=t.next();for(;!i.done;)e.push(i.value),i=t.next();return e}const Us=/-+([a-z0-9])/g;function Bs(t){return t.replace(Us,(...t)=>t[1].toUpperCase())}function Ns(t,e){return 0===t||0===e}function js(t,e,i){const n=Object.keys(i);if(n.length&&e.length){let s=e[0],o=[];if(n.forEach(t=>{s.hasOwnProperty(t)||o.push(t),s[t]=i[t]}),o.length)for(var r=1;r<e.length;r++){let i=e[r];o.forEach(function(e){i[e]=Hs(t,e)})}}return e}function zs(t,e,i){switch(e.type){case 7:return t.visitTrigger(e,i);case 0:return t.visitState(e,i);case 1:return t.visitTransition(e,i);case 2:return t.visitSequence(e,i);case 3:return t.visitGroup(e,i);case 4:return t.visitAnimate(e,i);case 5:return t.visitKeyframes(e,i);case 6:return t.visitStyle(e,i);case 8:return t.visitReference(e,i);case 9:return t.visitAnimateChild(e,i);case 10:return t.visitAnimateRef(e,i);case 11:return t.visitQuery(e,i);case 12:return t.visitStagger(e,i);default:throw new Error(`Unable to resolve animation metadata node #${e.type}`)}}function Hs(t,e){return window.getComputedStyle(t)[e]}function Ks(t,e){const i=[];return"string"==typeof t?t.split(/\s*,\s*/).forEach(t=>function(t,e,i){if(":"==t[0]){const n=function(t,e){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,e)=>parseFloat(e)>parseFloat(t);case":decrement":return(t,e)=>parseFloat(e)<parseFloat(t);default:return e.push(`The transition alias value "${t}" is not supported`),"* => *"}}(t,i);if("function"==typeof n)return void e.push(n);t=n}const n=t.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==n||n.length<4)return i.push(`The provided transition expression "${t}" is not supported`),e;const r=n[1],s=n[2],o=n[3];e.push(Ws(r,o)),"<"!=s[0]||"*"==r&&"*"==o||e.push(Ws(o,r))}(t,i,e)):i.push(t),i}const $s=new Set(["true","1"]),Gs=new Set(["false","0"]);function Ws(t,e){const i=$s.has(t)||Gs.has(t),n=$s.has(e)||Gs.has(e);return(r,s)=>{let o="*"==t||t==r,a="*"==e||e==s;return!o&&i&&"boolean"==typeof r&&(o=r?$s.has(t):Gs.has(t)),!a&&n&&"boolean"==typeof s&&(a=s?$s.has(e):Gs.has(e)),o&&a}}const Zs=new RegExp("s*:selfs*,?","g");function qs(t,e,i){return new Ys(t).build(e,i)}class Ys{constructor(t){this._driver=t}build(t,e){const i=new Qs(e);return this._resetContextStyleTimingState(i),zs(this,Ts(t),i)}_resetContextStyleTimingState(t){t.currentQuerySelector="",t.collectedStyles={},t.collectedStyles[""]={},t.currentTime=0}visitTrigger(t,e){let i=e.queryCount=0,n=e.depCount=0;const r=[],s=[];return"@"==t.name.charAt(0)&&e.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),t.definitions.forEach(t=>{if(this._resetContextStyleTimingState(e),0==t.type){const i=t,n=i.name;n.toString().split(/\s*,\s*/).forEach(t=>{i.name=t,r.push(this.visitState(i,e))}),i.name=n}else if(1==t.type){const r=this.visitTransition(t,e);i+=r.queryCount,n+=r.depCount,s.push(r)}else e.errors.push("only state() and transition() definitions can sit inside of a trigger()")}),{type:7,name:t.name,states:r,transitions:s,queryCount:i,depCount:n,options:null}}visitState(t,e){const i=this.visitStyle(t.styles,e),n=t.options&&t.options.params||null;if(i.containsDynamicStyles){const r=new Set,s=n||{};if(i.styles.forEach(t=>{if(Xs(t)){const e=t;Object.keys(e).forEach(t=>{Vs(e[t]).forEach(t=>{s.hasOwnProperty(t)||r.add(t)})})}}),r.size){const i=Ls(r.values());e.errors.push(`state("${t.name}", ...) must define default values for all the following style substitutions: ${i.join(", ")}`)}}return{type:0,name:t.name,style:i,options:n?{params:n}:null}}visitTransition(t,e){e.queryCount=0,e.depCount=0;const i=zs(this,Ts(t.animation),e);return{type:1,matchers:Ks(t.expr,e.errors),animation:i,queryCount:e.queryCount,depCount:e.depCount,options:Js(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(t=>zs(this,t,e)),options:Js(t.options)}}visitGroup(t,e){const i=e.currentTime;let n=0;const r=t.steps.map(t=>{e.currentTime=i;const r=zs(this,t,e);return n=Math.max(n,e.currentTime),r});return e.currentTime=n,{type:3,steps:r,options:Js(t.options)}}visitAnimate(t,e){const i=function(t,e){let i=null;if(t.hasOwnProperty("duration"))i=t;else if("number"==typeof t)return to(ks(t,e).duration,0,"");const n=t;if(n.split(/\s+/).some(t=>"{"==t.charAt(0)&&"{"==t.charAt(1))){const t=to(0,0,"");return t.dynamic=!0,t.strValue=n,t}return i=i||ks(n,e),to(i.duration,i.delay,i.easing)}(t.timings,e.errors);let n;e.currentAnimateTimings=i;let r=t.styles?t.styles:Zr({});if(5==r.type)n=this.visitKeyframes(r,e);else{let r=t.styles,s=!1;if(!r){s=!0;const t={};i.easing&&(t.easing=i.easing),r=Zr(t)}e.currentTime+=i.duration+i.delay;const o=this.visitStyle(r,e);o.isEmptyStep=s,n=o}return e.currentAnimateTimings=null,{type:4,timings:i,style:n,options:null}}visitStyle(t,e){const i=this._makeStyleAst(t,e);return this._validateStyleAst(i,e),i}_makeStyleAst(t,e){const i=[];Array.isArray(t.styles)?t.styles.forEach(t=>{"string"==typeof t?"*"==t?i.push(t):e.errors.push(`The provided style string value ${t} is not allowed.`):i.push(t)}):i.push(t.styles);let n=!1,r=null;return i.forEach(t=>{if(Xs(t)){const e=t,i=e.easing;if(i&&(r=i,delete e.easing),!n)for(let t in e)if(e[t].toString().indexOf("{{")>=0){n=!0;break}}}),{type:6,styles:i,easing:r,offset:t.offset,containsDynamicStyles:n,options:null}}_validateStyleAst(t,e){const i=e.currentAnimateTimings;let n=e.currentTime,r=e.currentTime;i&&r>0&&(r-=i.duration+i.delay),t.styles.forEach(t=>{"string"!=typeof t&&Object.keys(t).forEach(i=>{if(!this._driver.validateStyleProperty(i))return void e.errors.push(`The provided animation property "${i}" is not a supported CSS property for animations`);const s=e.collectedStyles[e.currentQuerySelector],o=s[i];let a=!0;o&&(r!=n&&r>=o.startTime&&n<=o.endTime&&(e.errors.push(`The CSS property "${i}" that exists between the times of "${o.startTime}ms" and "${o.endTime}ms" is also being animated in a parallel animation between the times of "${r}ms" and "${n}ms"`),a=!1),r=o.startTime),a&&(s[i]={startTime:r,endTime:n}),e.options&&function(t,e,i){const n=e.params||{},r=Vs(t);r.length&&r.forEach(t=>{n.hasOwnProperty(t)||i.push(`Unable to resolve the local animation param ${t} in the given list of values`)})}(t[i],e.options,e.errors)})})}visitKeyframes(t,e){const i={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push("keyframes() must be placed inside of a call to animate()"),i;let n=0;const r=[];let s=!1,o=!1,a=0;const l=t.steps.map(t=>{const i=this._makeStyleAst(t,e);let l=null!=i.offset?i.offset:function(t){if("string"==typeof t)return null;let e=null;if(Array.isArray(t))t.forEach(t=>{if(Xs(t)&&t.hasOwnProperty("offset")){const i=t;e=parseFloat(i.offset),delete i.offset}});else if(Xs(t)&&t.hasOwnProperty("offset")){const i=t;e=parseFloat(i.offset),delete i.offset}return e}(i.styles),c=0;return null!=l&&(n++,c=i.offset=l),o=o||c<0||c>1,s=s||c<a,a=c,r.push(c),i});o&&e.errors.push("Please ensure that all keyframe offsets are between 0 and 1"),s&&e.errors.push("Please ensure that all keyframe offsets are in order");const c=t.steps.length;let h=0;n>0&&n<c?e.errors.push("Not all style() steps within the declared keyframes() contain offsets"):0==n&&(h=1/(c-1));const u=c-1,d=e.currentTime,p=e.currentAnimateTimings,f=p.duration;return l.forEach((t,n)=>{const s=h>0?n==u?1:h*n:r[n],o=s*f;e.currentTime=d+p.delay+o,p.duration=o,this._validateStyleAst(t,e),t.offset=s,i.styles.push(t)}),i}visitReference(t,e){return{type:8,animation:zs(this,Ts(t.animation),e),options:Js(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:Js(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:Js(t.options)}}visitQuery(t,e){const i=e.currentQuerySelector,n=t.options||{};e.queryCount++,e.currentQuery=t;const[r,s]=function(t){const e=!!t.split(/\s*,\s*/).find(t=>":self"==t);return e&&(t=t.replace(Zs,"")),[t=t.replace(/@\*/g,".ng-trigger").replace(/@\w+/g,t=>".ng-trigger-"+t.substr(1)).replace(/:animating/g,".ng-animating"),e]}(t.selector);e.currentQuerySelector=i.length?i+" "+r:r,cs(e.collectedStyles,e.currentQuerySelector,{});const o=zs(this,Ts(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=i,{type:11,selector:r,limit:n.limit||0,optional:!!n.optional,includeSelf:s,animation:o,originalSelector:t.selector,options:Js(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push("stagger() can only be used inside of query()");const i="full"===t.timings?{duration:0,delay:0,easing:"full"}:ks(t.timings,e.errors,!0);return{type:12,animation:zs(this,Ts(t.animation),e),timings:i,options:null}}}class Qs{constructor(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null}}function Xs(t){return!Array.isArray(t)&&"object"==typeof t}function Js(t){var e;return t?(t=Es(t)).params&&(t.params=(e=t.params)?Es(e):null):t={},t}function to(t,e,i){return{duration:t,delay:e,easing:i}}function eo(t,e,i,n,r,s,o=null,a=!1){return{type:1,element:t,keyframes:e,preStyleProps:i,postStyleProps:n,duration:r,delay:s,totalTime:r+s,easing:o,subTimeline:a}}class io{constructor(){this._map=new Map}consume(t){let e=this._map.get(t);return e?this._map.delete(t):e=[],e}append(t,e){let i=this._map.get(t);i||this._map.set(t,i=[]),i.push(...e)}has(t){return this._map.has(t)}clear(){this._map.clear()}}const no=new RegExp(":enter","g"),ro=new RegExp(":leave","g");function so(t,e,i,n,r,s={},o={},a,l,c=[]){return(new oo).buildKeyframes(t,e,i,n,r,s,o,a,l,c)}class oo{buildKeyframes(t,e,i,n,r,s,o,a,l,c=[]){l=l||new io;const h=new lo(t,e,l,n,r,c,[]);h.options=a,h.currentTimeline.setStyles([s],null,h.errors,a),zs(this,i,h);const u=h.timelines.filter(t=>t.containsAnimation());if(u.length&&Object.keys(o).length){const t=u[u.length-1];t.allowOnlyTimelineStyles()||t.setStyles([o],null,h.errors,a)}return u.length?u.map(t=>t.buildKeyframes()):[eo(e,[],[],[],0,0,"",!1)]}visitTrigger(t,e){}visitState(t,e){}visitTransition(t,e){}visitAnimateChild(t,e){const i=e.subInstructions.consume(e.element);if(i){const n=e.createSubContext(t.options),r=e.currentTimeline.currentTime,s=this._visitSubInstructions(i,n,n.options);r!=s&&e.transformIntoNewTimeline(s)}e.previousNode=t}visitAnimateRef(t,e){const i=e.createSubContext(t.options);i.transformIntoNewTimeline(),this.visitReference(t.animation,i),e.transformIntoNewTimeline(i.currentTimeline.currentTime),e.previousNode=t}_visitSubInstructions(t,e,i){let n=e.currentTimeline.currentTime;const r=null!=i.duration?Cs(i.duration):null,s=null!=i.delay?Cs(i.delay):null;return 0!==r&&t.forEach(t=>{const i=e.appendInstructionToTimeline(t,r,s);n=Math.max(n,i.duration+i.delay)}),n}visitReference(t,e){e.updateOptions(t.options,!0),zs(this,t.animation,e),e.previousNode=t}visitSequence(t,e){const i=e.subContextCount;let n=e;const r=t.options;if(r&&(r.params||r.delay)&&(n=e.createSubContext(r),n.transformIntoNewTimeline(),null!=r.delay)){6==n.previousNode.type&&(n.currentTimeline.snapshotCurrentStyles(),n.previousNode=ao);const t=Cs(r.delay);n.delayNextStep(t)}t.steps.length&&(t.steps.forEach(t=>zs(this,t,n)),n.currentTimeline.applyStylesToKeyframe(),n.subContextCount>i&&n.transformIntoNewTimeline()),e.previousNode=t}visitGroup(t,e){const i=[];let n=e.currentTimeline.currentTime;const r=t.options&&t.options.delay?Cs(t.options.delay):0;t.steps.forEach(s=>{const o=e.createSubContext(t.options);r&&o.delayNextStep(r),zs(this,s,o),n=Math.max(n,o.currentTimeline.currentTime),i.push(o.currentTimeline)}),i.forEach(t=>e.currentTimeline.mergeTimelineCollectedStyles(t)),e.transformIntoNewTimeline(n),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){const i=t.strValue;return ks(e.params?Fs(i,e.params,e.errors):i,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,e){const i=e.currentAnimateTimings=this._visitTiming(t.timings,e),n=e.currentTimeline;i.delay&&(e.incrementTime(i.delay),n.snapshotCurrentStyles());const r=t.style;5==r.type?this.visitKeyframes(r,e):(e.incrementTime(i.duration),this.visitStyle(r,e),n.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}visitStyle(t,e){const i=e.currentTimeline,n=e.currentAnimateTimings;!n&&i.getCurrentStyleProperties().length&&i.forwardFrame();const r=n&&n.easing||t.easing;t.isEmptyStep?i.applyEmptyStep(r):i.setStyles(t.styles,r,e.errors,e.options),e.previousNode=t}visitKeyframes(t,e){const i=e.currentAnimateTimings,n=e.currentTimeline.duration,r=i.duration,s=e.createSubContext().currentTimeline;s.easing=i.easing,t.styles.forEach(t=>{s.forwardTime((t.offset||0)*r),s.setStyles(t.styles,t.easing,e.errors,e.options),s.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(s),e.transformIntoNewTimeline(n+r),e.previousNode=t}visitQuery(t,e){const i=e.currentTimeline.currentTime,n=t.options||{},r=n.delay?Cs(n.delay):0;r&&(6===e.previousNode.type||0==i&&e.currentTimeline.getCurrentStyleProperties().length)&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=ao);let s=i;const o=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!n.optional,e.errors);e.currentQueryTotal=o.length;let a=null;o.forEach((i,n)=>{e.currentQueryIndex=n;const o=e.createSubContext(t.options,i);r&&o.delayNextStep(r),i===e.element&&(a=o.currentTimeline),zs(this,t.animation,o),o.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,o.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),a&&(e.currentTimeline.mergeTimelineCollectedStyles(a),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){const i=e.parentContext,n=e.currentTimeline,r=t.timings,s=Math.abs(r.duration),o=s*(e.currentQueryTotal-1);let a=s*e.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":a=o-a;break;case"full":a=i.currentStaggerTime}const l=e.currentTimeline;a&&l.delayNextStep(a);const c=l.currentTime;zs(this,t.animation,e),e.previousNode=t,i.currentStaggerTime=n.currentTime-c+(n.startTime-i.currentTimeline.startTime)}}const ao={};class lo{constructor(t,e,i,n,r,s,o,a){this._driver=t,this.element=e,this.subInstructions=i,this._enterClassName=n,this._leaveClassName=r,this.errors=s,this.timelines=o,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=ao,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=a||new co(this._driver,e,0),o.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,e){if(!t)return;const i=t;let n=this.options;null!=i.duration&&(n.duration=Cs(i.duration)),null!=i.delay&&(n.delay=Cs(i.delay));const r=i.params;if(r){let t=n.params;t||(t=this.options.params={}),Object.keys(r).forEach(i=>{e&&t.hasOwnProperty(i)||(t[i]=Fs(r[i],t,this.errors))})}}_copyOptions(){const t={};if(this.options){const e=this.options.params;if(e){const i=t.params={};Object.keys(e).forEach(t=>{i[t]=e[t]})}}return t}createSubContext(t=null,e,i){const n=e||this.element,r=new lo(this._driver,n,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(n,i||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(t),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(t){return this.previousNode=ao,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,e,i){const n={duration:null!=e?e:t.duration,delay:this.currentTimeline.currentTime+(null!=i?i:0)+t.delay,easing:""},r=new ho(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,n,t.stretchStartingKeyframe);return this.timelines.push(r),n}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,e,i,n,r,s){let o=[];if(n&&o.push(this.element),t.length>0){t=(t=t.replace(no,"."+this._enterClassName)).replace(ro,"."+this._leaveClassName);let e=this._driver.query(this.element,t,1!=i);0!==i&&(e=i<0?e.slice(e.length+i,e.length):e.slice(0,i)),o.push(...e)}return r||0!=o.length||s.push(`\`query("${e}")\` returned zero elements. (Use \`query("${e}", { optional: true })\` if you wish to allow this.)`),o}}class co{constructor(t,e,i,n){this._driver=t,this.element=e,this.startTime=i,this._elementTimelineStylesLookup=n,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}}getCurrentStyleProperties(){return Object.keys(this._currentKeyframe)}get currentTime(){return this.startTime+this.duration}delayNextStep(t){const e=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,e){return this.applyStylesToKeyframe(),new co(this._driver,t,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,e){this._localTimelineStyles[t]=e,this._globalTimelineStyles[t]=e,this._styleSummary[t]={time:this.currentTime,value:e}}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&(this._previousKeyframe.easing=t),Object.keys(this._globalTimelineStyles).forEach(t=>{this._backFill[t]=this._globalTimelineStyles[t]||"*",this._currentKeyframe[t]="*"}),this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,i,n){e&&(this._previousKeyframe.easing=e);const r=n&&n.params||{},s=function(t,e){const i={};let n;return t.forEach(t=>{"*"===t?(n=n||Object.keys(e),n.forEach(t=>{i[t]="*"})):Ds(t,!1,i)}),i}(t,this._globalTimelineStyles);Object.keys(s).forEach(t=>{const e=Fs(s[t],r,i);this._pendingStyles[t]=e,this._localTimelineStyles.hasOwnProperty(t)||(this._backFill[t]=this._globalTimelineStyles.hasOwnProperty(t)?this._globalTimelineStyles[t]:"*"),this._updateStyle(t,e)})}applyStylesToKeyframe(){const t=this._pendingStyles,e=Object.keys(t);0!=e.length&&(this._pendingStyles={},e.forEach(e=>{this._currentKeyframe[e]=t[e]}),Object.keys(this._localTimelineStyles).forEach(t=>{this._currentKeyframe.hasOwnProperty(t)||(this._currentKeyframe[t]=this._localTimelineStyles[t])}))}snapshotCurrentStyles(){Object.keys(this._localTimelineStyles).forEach(t=>{const e=this._localTimelineStyles[t];this._pendingStyles[t]=e,this._updateStyle(t,e)})}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const t=[];for(let e in this._currentKeyframe)t.push(e);return t}mergeTimelineCollectedStyles(t){Object.keys(t._styleSummary).forEach(e=>{const i=this._styleSummary[e],n=t._styleSummary[e];(!i||n.time>i.time)&&this._updateStyle(e,n.value)})}buildKeyframes(){this.applyStylesToKeyframe();const t=new Set,e=new Set,i=1===this._keyframes.size&&0===this.duration;let n=[];this._keyframes.forEach((r,s)=>{const o=Ds(r,!0);Object.keys(o).forEach(i=>{const n=o[i];"!"==n?t.add(i):"*"==n&&e.add(i)}),i||(o.offset=s/this.duration),n.push(o)});const r=t.size?Ls(t.values()):[],s=e.size?Ls(e.values()):[];if(i){const t=n[0],e=Es(t);t.offset=0,e.offset=1,n=[t,e]}return eo(this.element,n,r,s,this.duration,this.startTime,this.easing,!1)}}class ho extends co{constructor(t,e,i,n,r,s,o=!1){super(t,e,s.delay),this.element=e,this.keyframes=i,this.preStyleProps=n,this.postStyleProps=r,this._stretchStartingKeyframe=o,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:e,duration:i,easing:n}=this.timings;if(this._stretchStartingKeyframe&&e){const r=[],s=i+e,o=e/s,a=Ds(t[0],!1);a.offset=0,r.push(a);const l=Ds(t[0],!1);l.offset=uo(o),r.push(l);const c=t.length-1;for(let n=1;n<=c;n++){let o=Ds(t[n],!1);o.offset=uo((e+o.offset*i)/s),r.push(o)}i=s,e=0,n="",t=r}return eo(this.element,t,this.preStyleProps,this.postStyleProps,i,e,n,!0)}}function uo(t,e=3){const i=Math.pow(10,e-1);return Math.round(t*i)/i}class po{}class fo extends po{normalizePropertyName(t,e){return Bs(t)}normalizeStyleValue(t,e,i,n){let r="";const s=i.toString().trim();if(mo[e]&&0!==i&&"0"!==i)if("number"==typeof i)r="px";else{const e=i.match(/^[+-]?[\d\.]+([a-z]*)$/);e&&0==e[1].length&&n.push(`Please provide a CSS unit value for ${t}:${i}`)}return s+r}}const mo=(()=>function(t){const e={};return t.forEach(t=>e[t]=!0),e}("width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective".split(",")))();function go(t,e,i,n,r,s,o,a,l,c,h,u,d){return{type:0,element:t,triggerName:e,isRemovalTransition:r,fromState:i,fromStyles:s,toState:n,toStyles:o,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:h,totalTime:u,errors:d}}const Ao={};class bo{constructor(t,e,i){this._triggerName=t,this.ast=e,this._stateStyles=i}match(t,e,i,n){return function(t,e,i,n,r){return t.some(t=>t(e,i,n,r))}(this.ast.matchers,t,e,i,n)}buildStyles(t,e,i){const n=this._stateStyles["*"],r=this._stateStyles[t],s=n?n.buildStyles(e,i):{};return r?r.buildStyles(e,i):s}build(t,e,i,n,r,s,o,a,l,c){const h=[],u=this.ast.options&&this.ast.options.params||Ao,d=this.buildStyles(i,o&&o.params||Ao,h),p=a&&a.params||Ao,f=this.buildStyles(n,p,h),m=new Set,g=new Map,A=new Map,b="void"===n,v={params:Object.assign(Object.assign({},u),p)},_=c?[]:so(t,e,this.ast.animation,r,s,d,f,v,l,h);let y=0;if(_.forEach(t=>{y=Math.max(t.duration+t.delay,y)}),h.length)return go(e,this._triggerName,i,n,b,d,f,[],[],g,A,y,h);_.forEach(t=>{const i=t.element,n=cs(g,i,{});t.preStyleProps.forEach(t=>n[t]=!0);const r=cs(A,i,{});t.postStyleProps.forEach(t=>r[t]=!0),i!==e&&m.add(i)});const w=Ls(m.values());return go(e,this._triggerName,i,n,b,d,f,_,w,g,A,y)}}class vo{constructor(t,e){this.styles=t,this.defaultParams=e}buildStyles(t,e){const i={},n=Es(this.defaultParams);return Object.keys(t).forEach(e=>{const i=t[e];null!=i&&(n[e]=i)}),this.styles.styles.forEach(t=>{if("string"!=typeof t){const r=t;Object.keys(r).forEach(t=>{let s=r[t];s.length>1&&(s=Fs(s,n,e)),i[t]=s})}}),i}}class _o{constructor(t,e){this.name=t,this.ast=e,this.transitionFactories=[],this.states={},e.states.forEach(t=>{this.states[t.name]=new vo(t.style,t.options&&t.options.params||{})}),yo(this.states,"true","1"),yo(this.states,"false","0"),e.transitions.forEach(e=>{this.transitionFactories.push(new bo(t,e,this.states))}),this.fallbackTransition=new bo(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[(t,e)=>!0],options:null,queryCount:0,depCount:0},this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,e,i,n){return this.transitionFactories.find(r=>r.match(t,e,i,n))||null}matchStyles(t,e,i){return this.fallbackTransition.buildStyles(t,e,i)}}function yo(t,e,i){t.hasOwnProperty(e)?t.hasOwnProperty(i)||(t[i]=t[e]):t.hasOwnProperty(i)&&(t[e]=t[i])}const wo=new io;class xo{constructor(t,e,i){this.bodyNode=t,this._driver=e,this._normalizer=i,this._animations={},this._playersById={},this.players=[]}register(t,e){const i=[],n=qs(this._driver,e,i);if(i.length)throw new Error(`Unable to build the animation due to the following errors: ${i.join("\n")}`);this._animations[t]=n}_buildPlayer(t,e,i){const n=t.element,r=ss(0,this._normalizer,0,t.keyframes,e,i);return this._driver.animate(n,r,t.duration,t.delay,t.easing,[],!0)}create(t,e,i={}){const n=[],r=this._animations[t];let s;const o=new Map;if(r?(s=so(this._driver,e,r,"ng-enter","ng-leave",{},{},i,wo,n),s.forEach(t=>{const e=cs(o,t.element,{});t.postStyleProps.forEach(t=>e[t]=null)})):(n.push("The requested animation doesn't exist or has already been destroyed"),s=[]),n.length)throw new Error(`Unable to create the animation due to the following errors: ${n.join("\n")}`);o.forEach((t,e)=>{Object.keys(t).forEach(i=>{t[i]=this._driver.computeStyle(e,i,"*")})});const a=rs(s.map(t=>{const e=o.get(t.element);return this._buildPlayer(t,{},e)}));return this._playersById[t]=a,a.onDestroy(()=>this.destroy(t)),this.players.push(a),a}destroy(t){const e=this._getPlayer(t);e.destroy(),delete this._playersById[t];const i=this.players.indexOf(e);i>=0&&this.players.splice(i,1)}_getPlayer(t){const e=this._playersById[t];if(!e)throw new Error(`Unable to find the timeline player referenced by ${t}`);return e}listen(t,e,i,n){const r=ls(e,"","","");return os(this._getPlayer(t),i,r,n),()=>{}}command(t,e,i,n){if("register"==i)return void this.register(t,n[0]);if("create"==i)return void this.create(t,e,n[0]||{});const r=this._getPlayer(t);switch(i){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(n[0]));break;case"destroy":this.destroy(t)}}}const Co=[],So={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},ko={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0};class Eo{constructor(t,e=""){this.namespaceId=e;const i=t&&t.hasOwnProperty("value");if(this.value=null!=(n=i?t.value:t)?n:null,i){const e=Es(t);delete e.value,this.options=e}else this.options={};var n;this.options.params||(this.options.params={})}get params(){return this.options.params}absorbOptions(t){const e=t.params;if(e){const t=this.options.params;Object.keys(e).forEach(i=>{null==t[i]&&(t[i]=e[i])})}}}const Do=new Eo("void");class Io{constructor(t,e,i){this.id=t,this.hostElement=e,this._engine=i,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,Fo(e,this._hostClassName)}listen(t,e,i,n){if(!this._triggers.hasOwnProperty(e))throw new Error(`Unable to listen on the animation trigger event "${i}" because the animation trigger "${e}" doesn't exist!`);if(null==i||0==i.length)throw new Error(`Unable to listen on the animation trigger "${e}" because the provided event is undefined!`);if("start"!=(r=i)&&"done"!=r)throw new Error(`The provided animation trigger event "${i}" for the animation trigger "${e}" is not supported!`);var r;const s=cs(this._elementListeners,t,[]),o={name:e,phase:i,callback:n};s.push(o);const a=cs(this._engine.statesByElement,t,{});return a.hasOwnProperty(e)||(Fo(t,"ng-trigger"),Fo(t,"ng-trigger-"+e),a[e]=Do),()=>{this._engine.afterFlush(()=>{const t=s.indexOf(o);t>=0&&s.splice(t,1),this._triggers[e]||delete a[e]})}}register(t,e){return!this._triggers[t]&&(this._triggers[t]=e,!0)}_getTrigger(t){const e=this._triggers[t];if(!e)throw new Error(`The provided animation trigger "${t}" has not been registered!`);return e}trigger(t,e,i,n=!0){const r=this._getTrigger(e),s=new Oo(this.id,e,t);let o=this._engine.statesByElement.get(t);o||(Fo(t,"ng-trigger"),Fo(t,"ng-trigger-"+e),this._engine.statesByElement.set(t,o={}));let a=o[e];const l=new Eo(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&a&&l.absorbOptions(a.options),o[e]=l,a||(a=Do),"void"!==l.value&&a.value===l.value){if(!function(t,e){const i=Object.keys(t),n=Object.keys(e);if(i.length!=n.length)return!1;for(let r=0;r<i.length;r++){const n=i[r];if(!e.hasOwnProperty(n)||t[n]!==e[n])return!1}return!0}(a.params,l.params)){const e=[],i=r.matchStyles(a.value,a.params,e),n=r.matchStyles(l.value,l.params,e);e.length?this._engine.reportError(e):this._engine.afterFlush(()=>{Ms(t,i),Os(t,n)})}return}const c=cs(this._engine.playersByElement,t,[]);c.forEach(t=>{t.namespaceId==this.id&&t.triggerName==e&&t.queued&&t.destroy()});let h=r.matchTransition(a.value,l.value,t,l.params),u=!1;if(!h){if(!n)return;h=r.fallbackTransition,u=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:h,fromState:a,toState:l,player:s,isFallbackTransition:u}),u||(Fo(t,"ng-animate-queued"),s.onStart(()=>{Lo(t,"ng-animate-queued")})),s.onDone(()=>{let e=this.players.indexOf(s);e>=0&&this.players.splice(e,1);const i=this._engine.playersByElement.get(t);if(i){let t=i.indexOf(s);t>=0&&i.splice(t,1)}}),this.players.push(s),c.push(s),s}deregister(t){delete this._triggers[t],this._engine.statesByElement.forEach((e,i)=>{delete e[t]}),this._elementListeners.forEach((e,i)=>{this._elementListeners.set(i,e.filter(e=>e.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);const e=this._engine.playersByElement.get(t);e&&(e.forEach(t=>t.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,e){const i=this._engine.driver.query(t,".ng-trigger",!0);i.forEach(t=>{if(t.__ng_removed)return;const i=this._engine.fetchNamespacesByElement(t);i.size?i.forEach(i=>i.triggerLeaveAnimation(t,e,!1,!0)):this.clearElementCache(t)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(t=>this.clearElementCache(t)))}triggerLeaveAnimation(t,e,i,n){const r=this._engine.statesByElement.get(t);if(r){const s=[];if(Object.keys(r).forEach(e=>{if(this._triggers[e]){const i=this.trigger(t,e,"void",n);i&&s.push(i)}}),s.length)return this._engine.markElementAsRemoved(this.id,t,!0,e),i&&rs(s).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){const e=this._elementListeners.get(t),i=this._engine.statesByElement.get(t);if(e&&i){const n=new Set;e.forEach(e=>{const r=e.name;if(n.has(r))return;n.add(r);const s=this._triggers[r].fallbackTransition,o=i[r]||Do,a=new Eo("void"),l=new Oo(this.id,r,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:r,transition:s,fromState:o,toState:a,player:l,isFallbackTransition:!0})})}}removeNode(t,e){const i=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),this.triggerLeaveAnimation(t,e,!0))return;let n=!1;if(i.totalAnimations){const e=i.players.length?i.playersByQueriedElement.get(t):[];if(e&&e.length)n=!0;else{let e=t;for(;e=e.parentNode;)if(i.statesByElement.get(e)){n=!0;break}}}if(this.prepareLeaveAnimationListeners(t),n)i.markElementAsRemoved(this.id,t,!1,e);else{const n=t.__ng_removed;n&&n!==So||(i.afterFlush(()=>this.clearElementCache(t)),i.destroyInnerAnimations(t),i._onRemovalComplete(t,e))}}insertNode(t,e){Fo(t,this._hostClassName)}drainQueuedTransitions(t){const e=[];return this._queue.forEach(i=>{const n=i.player;if(n.destroyed)return;const r=i.element,s=this._elementListeners.get(r);s&&s.forEach(e=>{if(e.name==i.triggerName){const n=ls(r,i.triggerName,i.fromState.value,i.toState.value);n._data=t,os(i.player,e.phase,n,e.callback)}}),n.markedForDestroy?this._engine.afterFlush(()=>{n.destroy()}):e.push(i)}),this._queue=[],e.sort((t,e)=>{const i=t.transition.ast.depCount,n=e.transition.ast.depCount;return 0==i||0==n?i-n:this._engine.driver.containsElement(t.element,e.element)?1:-1})}destroy(t){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}elementContainsData(t){let e=!1;return this._elementListeners.has(t)&&(e=!0),e=!!this._queue.find(e=>e.element===t)||e,e}}class Po{constructor(t,e,i){this.bodyNode=t,this.driver=e,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(t,e)=>{}}_onRemovalComplete(t,e){this.onRemovalComplete(t,e)}get queuedPlayers(){const t=[];return this._namespaceList.forEach(e=>{e.players.forEach(e=>{e.queued&&t.push(e)})}),t}createNamespace(t,e){const i=new Io(t,e,this);return e.parentNode?this._balanceNamespaceList(i,e):(this.newHostElements.set(e,i),this.collectEnterElement(e)),this._namespaceLookup[t]=i}_balanceNamespaceList(t,e){const i=this._namespaceList.length-1;if(i>=0){let n=!1;for(let r=i;r>=0;r--)if(this.driver.containsElement(this._namespaceList[r].hostElement,e)){this._namespaceList.splice(r+1,0,t),n=!0;break}n||this._namespaceList.splice(0,0,t)}else this._namespaceList.push(t);return this.namespacesByHostElement.set(e,t),t}register(t,e){let i=this._namespaceLookup[t];return i||(i=this.createNamespace(t,e)),i}registerTrigger(t,e,i){let n=this._namespaceLookup[t];n&&n.register(e,i)&&this.totalAnimations++}destroy(t,e){if(!t)return;const i=this._fetchNamespace(t);this.afterFlush(()=>{this.namespacesByHostElement.delete(i.hostElement),delete this._namespaceLookup[t];const e=this._namespaceList.indexOf(i);e>=0&&this._namespaceList.splice(e,1)}),this.afterFlushAnimationsDone(()=>i.destroy(e))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){const e=new Set,i=this.statesByElement.get(t);if(i){const t=Object.keys(i);for(let n=0;n<t.length;n++){const r=i[t[n]].namespaceId;if(r){const t=this._fetchNamespace(r);t&&e.add(t)}}}return e}trigger(t,e,i,n){if(Mo(e)){const r=this._fetchNamespace(t);if(r)return r.trigger(e,i,n),!0}return!1}insertNode(t,e,i,n){if(!Mo(e))return;const r=e.__ng_removed;if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;const t=this.collectedLeaveElements.indexOf(e);t>=0&&this.collectedLeaveElements.splice(t,1)}if(t){const n=this._fetchNamespace(t);n&&n.insertNode(e,i)}n&&this.collectEnterElement(e)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),Fo(t,"ng-animate-disabled")):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Lo(t,"ng-animate-disabled"))}removeNode(t,e,i,n){if(Mo(e)){const r=t?this._fetchNamespace(t):null;if(r?r.removeNode(e,n):this.markElementAsRemoved(t,e,!1,n),i){const i=this.namespacesByHostElement.get(e);i&&i.id!==t&&i.removeNode(e,n)}}else this._onRemovalComplete(e,n)}markElementAsRemoved(t,e,i,n){this.collectedLeaveElements.push(e),e.__ng_removed={namespaceId:t,setForRemoval:n,hasAnimation:i,removedBeforeQueried:!1}}listen(t,e,i,n,r){return Mo(e)?this._fetchNamespace(t).listen(e,i,n,r):()=>{}}_buildInstruction(t,e,i,n,r){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,i,n,t.fromState.options,t.toState.options,e,r)}destroyInnerAnimations(t){let e=this.driver.query(t,".ng-trigger",!0);e.forEach(t=>this.destroyActiveAnimationsForElement(t)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,".ng-animating",!0),e.forEach(t=>this.finishActiveQueriedAnimationOnElement(t)))}destroyActiveAnimationsForElement(t){const e=this.playersByElement.get(t);e&&e.forEach(t=>{t.queued?t.markedForDestroy=!0:t.destroy()})}finishActiveQueriedAnimationOnElement(t){const e=this.playersByQueriedElement.get(t);e&&e.forEach(t=>t.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return rs(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t.__ng_removed;if(e&&e.setForRemoval){if(t.__ng_removed=So,e.namespaceId){this.destroyInnerAnimations(t);const i=this._fetchNamespace(e.namespaceId);i&&i.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}this.driver.matchesElement(t,".ng-animate-disabled")&&this.markElementAsDisabled(t,!1),this.driver.query(t,".ng-animate-disabled",!0).forEach(t=>{this.markElementAsDisabled(t,!1)})}flush(t=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((t,e)=>this._balanceNamespaceList(t,e)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;i<this.collectedEnterElements.length;i++)Fo(this.collectedEnterElements[i],"ng-star-inserted");if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){const i=[];try{e=this._flushAnimations(i,t)}finally{for(let t=0;t<i.length;t++)i[t]()}}else for(let i=0;i<this.collectedLeaveElements.length;i++)this.processLeaveNode(this.collectedLeaveElements[i]);if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(t=>t()),this._flushFns=[],this._whenQuietFns.length){const t=this._whenQuietFns;this._whenQuietFns=[],e.length?rs(e).onDone(()=>{t.forEach(t=>t())}):t.forEach(t=>t())}}reportError(t){throw new Error(`Unable to process animations due to the following failed trigger transitions\n ${t.join("\n")}`)}_flushAnimations(t,e){const i=new io,n=[],r=new Map,s=[],o=new Map,a=new Map,l=new Map,c=new Set;this.disabledNodes.forEach(t=>{c.add(t);const e=this.driver.query(t,".ng-animate-queued",!0);for(let i=0;i<e.length;i++)c.add(e[i])});const h=this.bodyNode,u=Array.from(this.statesByElement.keys()),d=Vo(u,this.collectedEnterElements),p=new Map;let f=0;d.forEach((t,e)=>{const i="ng-enter"+f++;p.set(e,i),t.forEach(t=>Fo(t,i))});const m=[],g=new Set,A=new Set;for(let P=0;P<this.collectedLeaveElements.length;P++){const t=this.collectedLeaveElements[P],e=t.__ng_removed;e&&e.setForRemoval&&(m.push(t),g.add(t),e.hasAnimation?this.driver.query(t,".ng-star-inserted",!0).forEach(t=>g.add(t)):A.add(t))}const b=new Map,v=Vo(u,Array.from(g));v.forEach((t,e)=>{const i="ng-leave"+f++;b.set(e,i),t.forEach(t=>Fo(t,i))}),t.push(()=>{d.forEach((t,e)=>{const i=p.get(e);t.forEach(t=>Lo(t,i))}),v.forEach((t,e)=>{const i=b.get(e);t.forEach(t=>Lo(t,i))}),m.forEach(t=>{this.processLeaveNode(t)})});const _=[],y=[];for(let P=this._namespaceList.length-1;P>=0;P--)this._namespaceList[P].drainQueuedTransitions(e).forEach(t=>{const e=t.player,r=t.element;if(_.push(e),this.collectedEnterElements.length){const t=r.__ng_removed;if(t&&t.setForMove)return void e.destroy()}const c=!h||!this.driver.containsElement(h,r),u=b.get(r),d=p.get(r),f=this._buildInstruction(t,i,d,u,c);if(f.errors&&f.errors.length)y.push(f);else{if(c)return e.onStart(()=>Ms(r,f.fromStyles)),e.onDestroy(()=>Os(r,f.toStyles)),void n.push(e);if(t.isFallbackTransition)return e.onStart(()=>Ms(r,f.fromStyles)),e.onDestroy(()=>Os(r,f.toStyles)),void n.push(e);f.timelines.forEach(t=>t.stretchStartingKeyframe=!0),i.append(r,f.timelines),s.push({instruction:f,player:e,element:r}),f.queriedElements.forEach(t=>cs(o,t,[]).push(e)),f.preStyleProps.forEach((t,e)=>{const i=Object.keys(t);if(i.length){let t=a.get(e);t||a.set(e,t=new Set),i.forEach(e=>t.add(e))}}),f.postStyleProps.forEach((t,e)=>{const i=Object.keys(t);let n=l.get(e);n||l.set(e,n=new Set),i.forEach(t=>n.add(t))})}});if(y.length){const t=[];y.forEach(e=>{t.push(`@${e.triggerName} has failed due to:\n`),e.errors.forEach(e=>t.push(`- ${e}\n`))}),_.forEach(t=>t.destroy()),this.reportError(t)}const w=new Map,x=new Map;s.forEach(t=>{const e=t.element;i.has(e)&&(x.set(e,e),this._beforeAnimationBuild(t.player.namespaceId,t.instruction,w))}),n.forEach(t=>{const e=t.element;this._getPreviousPlayers(e,!1,t.namespaceId,t.triggerName,null).forEach(t=>{cs(w,e,[]).push(t),t.destroy()})});const C=m.filter(t=>No(t,a,l)),S=new Map;Ro(S,this.driver,A,l,"*").forEach(t=>{No(t,a,l)&&C.push(t)});const k=new Map;d.forEach((t,e)=>{Ro(k,this.driver,new Set(t),a,"!")}),C.forEach(t=>{const e=S.get(t),i=k.get(t);S.set(t,Object.assign(Object.assign({},e),i))});const E=[],D=[],I={};s.forEach(t=>{const{element:e,player:s,instruction:o}=t;if(i.has(e)){if(c.has(e))return s.onDestroy(()=>Os(e,o.toStyles)),s.disabled=!0,s.overrideTotalTime(o.totalTime),void n.push(s);let t=I;if(x.size>1){let i=e;const n=[];for(;i=i.parentNode;){const e=x.get(i);if(e){t=e;break}n.push(i)}n.forEach(e=>x.set(e,t))}const i=this._buildAnimation(s.namespaceId,o,w,r,k,S);if(s.setRealPlayer(i),t===I)E.push(s);else{const e=this.playersByElement.get(t);e&&e.length&&(s.parentPlayer=rs(e)),n.push(s)}}else Ms(e,o.fromStyles),s.onDestroy(()=>Os(e,o.toStyles)),D.push(s),c.has(e)&&n.push(s)}),D.forEach(t=>{const e=r.get(t.element);if(e&&e.length){const i=rs(e);t.setRealPlayer(i)}}),n.forEach(t=>{t.parentPlayer?t.syncPlayerEvents(t.parentPlayer):t.destroy()});for(let P=0;P<m.length;P++){const t=m[P],e=t.__ng_removed;if(Lo(t,"ng-leave"),e&&e.hasAnimation)continue;let i=[];if(o.size){let e=o.get(t);e&&e.length&&i.push(...e);let n=this.driver.query(t,".ng-animating",!0);for(let t=0;t<n.length;t++){let e=o.get(n[t]);e&&e.length&&i.push(...e)}}const n=i.filter(t=>!t.destroyed);n.length?Uo(this,t,n):this.processLeaveNode(t)}return m.length=0,E.forEach(t=>{this.players.push(t),t.onDone(()=>{t.destroy();const e=this.players.indexOf(t);this.players.splice(e,1)}),t.play()}),E}elementContainsData(t,e){let i=!1;const n=e.__ng_removed;return n&&n.setForRemoval&&(i=!0),this.playersByElement.has(e)&&(i=!0),this.playersByQueriedElement.has(e)&&(i=!0),this.statesByElement.has(e)&&(i=!0),this._fetchNamespace(t).elementContainsData(e)||i}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,e,i,n,r){let s=[];if(e){const e=this.playersByQueriedElement.get(t);e&&(s=e)}else{const e=this.playersByElement.get(t);if(e){const t=!r||"void"==r;e.forEach(e=>{e.queued||(t||e.triggerName==n)&&s.push(e)})}}return(i||n)&&(s=s.filter(t=>!(i&&i!=t.namespaceId||n&&n!=t.triggerName))),s}_beforeAnimationBuild(t,e,i){const n=e.element,r=e.isRemovalTransition?void 0:t,s=e.isRemovalTransition?void 0:e.triggerName;for(const o of e.timelines){const t=o.element,a=t!==n,l=cs(i,t,[]);this._getPreviousPlayers(t,a,r,s,e.toState).forEach(t=>{const e=t.getRealPlayer();e.beforeDestroy&&e.beforeDestroy(),t.destroy(),l.push(t)})}Ms(n,e.fromStyles)}_buildAnimation(t,e,i,n,r,s){const o=e.triggerName,a=e.element,l=[],c=new Set,h=new Set,u=e.timelines.map(e=>{const u=e.element;c.add(u);const d=u.__ng_removed;if(d&&d.removedBeforeQueried)return new es(e.duration,e.delay);const p=u!==a,f=function(t){const e=[];return Bo(t,e),e}((i.get(u)||Co).map(t=>t.getRealPlayer())).filter(t=>!!t.element&&t.element===u),m=r.get(u),g=s.get(u),A=ss(0,this._normalizer,0,e.keyframes,m,g),b=this._buildPlayer(e,A,f);if(e.subTimeline&&n&&h.add(u),p){const e=new Oo(t,o,u);e.setRealPlayer(b),l.push(e)}return b});l.forEach(t=>{cs(this.playersByQueriedElement,t.element,[]).push(t),t.onDone(()=>function(t,e,i){let n;if(t instanceof Map){if(n=t.get(e),n){if(n.length){const t=n.indexOf(i);n.splice(t,1)}0==n.length&&t.delete(e)}}else if(n=t[e],n){if(n.length){const t=n.indexOf(i);n.splice(t,1)}0==n.length&&delete t[e]}return n}(this.playersByQueriedElement,t.element,t))}),c.forEach(t=>Fo(t,"ng-animating"));const d=rs(u);return d.onDestroy(()=>{c.forEach(t=>Lo(t,"ng-animating")),Os(a,e.toStyles)}),h.forEach(t=>{cs(n,t,[]).push(d)}),d}_buildPlayer(t,e,i){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,i):new es(t.duration,t.delay)}}class Oo{constructor(t,e,i){this.namespaceId=t,this.triggerName=e,this.element=i,this._player=new es,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,Object.keys(this._queuedCallbacks).forEach(e=>{this._queuedCallbacks[e].forEach(i=>os(t,e,void 0,i))}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){const e=this._player;e.triggerCallback&&t.onStart(()=>e.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,e){cs(this._queuedCallbacks,t,[]).push(e)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){const e=this._player;e.triggerCallback&&e.triggerCallback(t)}}function Mo(t){return t&&1===t.nodeType}function To(t,e){const i=t.style.display;return t.style.display=null!=e?e:"none",i}function Ro(t,e,i,n,r){const s=[];i.forEach(t=>s.push(To(t)));const o=[];n.forEach((i,n)=>{const s={};i.forEach(t=>{const i=s[t]=e.computeStyle(n,t,r);i&&0!=i.length||(n.__ng_removed=ko,o.push(n))}),t.set(n,s)});let a=0;return i.forEach(t=>To(t,s[a++])),o}function Vo(t,e){const i=new Map;if(t.forEach(t=>i.set(t,[])),0==e.length)return i;const n=new Set(e),r=new Map;function s(t){if(!t)return 1;let e=r.get(t);if(e)return e;const o=t.parentNode;return e=i.has(o)?o:n.has(o)?1:s(o),r.set(t,e),e}return e.forEach(t=>{const e=s(t);1!==e&&i.get(e).push(t)}),i}function Fo(t,e){if(t.classList)t.classList.add(e);else{let i=t.$$classes;i||(i=t.$$classes={}),i[e]=!0}}function Lo(t,e){if(t.classList)t.classList.remove(e);else{let i=t.$$classes;i&&delete i[e]}}function Uo(t,e,i){rs(i).onDone(()=>t.processLeaveNode(e))}function Bo(t,e){for(let i=0;i<t.length;i++){const n=t[i];n instanceof is?Bo(n.players,e):e.push(n)}}function No(t,e,i){const n=i.get(t);if(!n)return!1;let r=e.get(t);return r?n.forEach(t=>r.add(t)):e.set(t,n),i.delete(t),!0}class jo{constructor(t,e,i){this.bodyNode=t,this._driver=e,this._triggerCache={},this.onRemovalComplete=(t,e)=>{},this._transitionEngine=new Po(t,e,i),this._timelineEngine=new xo(t,e,i),this._transitionEngine.onRemovalComplete=(t,e)=>this.onRemovalComplete(t,e)}registerTrigger(t,e,i,n,r){const s=t+"-"+n;let o=this._triggerCache[s];if(!o){const t=[],e=qs(this._driver,r,t);if(t.length)throw new Error(`The animation trigger "${n}" has failed to build due to the following errors:\n - ${t.join("\n - ")}`);o=function(t,e){return new _o(t,e)}(n,e),this._triggerCache[s]=o}this._transitionEngine.registerTrigger(e,n,o)}register(t,e){this._transitionEngine.register(t,e)}destroy(t,e){this._transitionEngine.destroy(t,e)}onInsert(t,e,i,n){this._transitionEngine.insertNode(t,e,i,n)}onRemove(t,e,i,n){this._transitionEngine.removeNode(t,e,n||!1,i)}disableAnimations(t,e){this._transitionEngine.markElementAsDisabled(t,e)}process(t,e,i,n){if("@"==i.charAt(0)){const[t,r]=hs(i);this._timelineEngine.command(t,e,r,n)}else this._transitionEngine.trigger(t,e,i,n)}listen(t,e,i,n,r){if("@"==i.charAt(0)){const[t,n]=hs(i);return this._timelineEngine.listen(t,e,n,r)}return this._transitionEngine.listen(t,e,i,n,r)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}function zo(t,e){let i=null,n=null;return Array.isArray(e)&&e.length?(i=Ko(e[0]),e.length>1&&(n=Ko(e[e.length-1]))):e&&(i=Ko(e)),i||n?new Ho(t,i,n):null}let Ho=(()=>{class t{constructor(e,i,n){this._element=e,this._startStyles=i,this._endStyles=n,this._state=0;let r=t.initialStylesByElement.get(e);r||t.initialStylesByElement.set(e,r={}),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&Os(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Os(this._element,this._initialStyles),this._endStyles&&(Os(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(Ms(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Ms(this._element,this._endStyles),this._endStyles=null),Os(this._element,this._initialStyles),this._state=3)}}return t.initialStylesByElement=new WeakMap,t})();function Ko(t){let e=null;const i=Object.keys(t);for(let n=0;n<i.length;n++){const r=i[n];$o(r)&&(e=e||{},e[r]=t[r])}return e}function $o(t){return"display"===t||"position"===t}class Go{constructor(t,e,i,n,r,s,o){this._element=t,this._name=e,this._duration=i,this._delay=n,this._easing=r,this._fillMode=s,this._onDoneFn=o,this._finished=!1,this._destroyed=!1,this._startTime=0,this._position=0,this._eventFn=t=>this._handleCallback(t)}apply(){!function(t,e){const i=Xo(t,"").trim();i.length&&(function(t,e){let i=0;for(let n=0;n<t.length;n++)","===t.charAt(n)&&i++}(i),e=`${i}, ${e}`),Qo(t,"",e)}(this._element,`${this._duration}ms ${this._easing} ${this._delay}ms 1 normal ${this._fillMode} ${this._name}`),Yo(this._element,this._eventFn,!1),this._startTime=Date.now()}pause(){Wo(this._element,this._name,"paused")}resume(){Wo(this._element,this._name,"running")}setPosition(t){const e=Zo(this._element,this._name);this._position=t*this._duration,Qo(this._element,"Delay",`-${this._position}ms`,e)}getPosition(){return this._position}_handleCallback(t){const e=t._ngTestManualTimestamp||Date.now(),i=1e3*parseFloat(t.elapsedTime.toFixed(3));t.animationName==this._name&&Math.max(e-this._startTime,0)>=this._delay&&i>=this._duration&&this.finish()}finish(){this._finished||(this._finished=!0,this._onDoneFn(),Yo(this._element,this._eventFn,!0))}destroy(){this._destroyed||(this._destroyed=!0,this.finish(),function(t,e){const i=Xo(t,"").split(","),n=qo(i,e);n>=0&&(i.splice(n,1),Qo(t,"",i.join(",")))}(this._element,this._name))}}function Wo(t,e,i){Qo(t,"PlayState",i,Zo(t,e))}function Zo(t,e){const i=Xo(t,"");return i.indexOf(",")>0?qo(i.split(","),e):qo([i],e)}function qo(t,e){for(let i=0;i<t.length;i++)if(t[i].indexOf(e)>=0)return i;return-1}function Yo(t,e,i){i?t.removeEventListener("animationend",e):t.addEventListener("animationend",e)}function Qo(t,e,i,n){const r="animation"+e;if(null!=n){const e=t.style[r];if(e.length){const t=e.split(",");t[n]=i,i=t.join(",")}}t.style[r]=i}function Xo(t,e){return t.style["animation"+e]||""}class Jo{constructor(t,e,i,n,r,s,o,a){this.element=t,this.keyframes=e,this.animationName=i,this._duration=n,this._delay=r,this._finalStyles=o,this._specialStyles=a,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=s||"linear",this.totalTime=n+r,this._buildStyler()}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}destroy(){this.init(),this._state>=4||(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}_flushDoneFns(){this._onDoneFns.forEach(t=>t()),this._onDoneFns=[]}_flushStartFns(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}finish(){this.init(),this._state>=3||(this._state=3,this._styler.finish(),this._flushStartFns(),this._specialStyles&&this._specialStyles.finish(),this._flushDoneFns())}setPosition(t){this._styler.setPosition(t)}getPosition(){return this._styler.getPosition()}hasStarted(){return this._state>=2}init(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())}play(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2,this._specialStyles&&this._specialStyles.start()),this._styler.resume()}pause(){this.init(),this._styler.pause()}restart(){this.reset(),this.play()}reset(){this._styler.destroy(),this._buildStyler(),this._styler.apply()}_buildStyler(){this._styler=new Go(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",()=>this.finish())}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}beforeDestroy(){this.init();const t={};if(this.hasStarted()){const e=this._state>=3;Object.keys(this._finalStyles).forEach(i=>{"offset"!=i&&(t[i]=e?this._finalStyles[i]:Hs(this.element,i))})}this.currentSnapshot=t}}class ta extends es{constructor(t,e){super(),this.element=t,this._startingStyles={},this.__initialized=!1,this._styles=ys(e)}init(){!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach(t=>{this._startingStyles[t]=this.element.style[t]}),super.init())}play(){this._startingStyles&&(this.init(),Object.keys(this._styles).forEach(t=>this.element.style.setProperty(t,this._styles[t])),super.play())}destroy(){this._startingStyles&&(Object.keys(this._startingStyles).forEach(t=>{const e=this._startingStyles[t];e?this.element.style.setProperty(t,e):this.element.style.removeProperty(t)}),this._startingStyles=null,super.destroy())}}class ea{constructor(){this._count=0,this._head=document.querySelector("head")}validateStyleProperty(t){return As(t)}matchesElement(t,e){return bs(t,e)}containsElement(t,e){return vs(t,e)}query(t,e,i){return _s(t,e,i)}computeStyle(t,e,i){return window.getComputedStyle(t)[e]}buildKeyframeElement(t,e,i){i=i.map(t=>ys(t));let n=`@keyframes ${e} {\n`,r="";i.forEach(t=>{r=" ";const e=parseFloat(t.offset);n+=`${r}${100*e}% {\n`,r+=" ",Object.keys(t).forEach(e=>{const i=t[e];switch(e){case"offset":return;case"easing":return void(i&&(n+=`${r}animation-timing-function: ${i};\n`));default:return void(n+=`${r}${e}: ${i};\n`)}}),n+=`${r}}\n`}),n+="}\n";const s=document.createElement("style");return s.textContent=n,s}animate(t,e,i,n,r,s=[],o){const a=s.filter(t=>t instanceof Jo),l={};Ns(i,n)&&a.forEach(t=>{let e=t.currentSnapshot;Object.keys(e).forEach(t=>l[t]=e[t])});const c=function(t){let e={};return t&&(Array.isArray(t)?t:[t]).forEach(t=>{Object.keys(t).forEach(i=>{"offset"!=i&&"easing"!=i&&(e[i]=t[i])})}),e}(e=js(t,e,l));if(0==i)return new ta(t,c);const h="gen_css_kf_"+this._count++,u=this.buildKeyframeElement(t,h,e);document.querySelector("head").appendChild(u);const d=zo(t,e),p=new Jo(t,e,h,i,n,r,c,d);return p.onDestroy(()=>{var t;(t=u).parentNode.removeChild(t)}),p}}class ia{constructor(t,e,i,n){this.element=t,this.keyframes=e,this.options=i,this._specialStyles=n,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:{},this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_triggerWebAnimation(t,e,i){return t.animate(e,i)}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=t*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const t={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(e=>{"offset"!=e&&(t[e]=this._finished?this._finalKeyframe[e]:Hs(this.element,e))}),this.currentSnapshot=t}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}class na{constructor(){this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(ra().toString()),this._cssKeyframesDriver=new ea}validateStyleProperty(t){return As(t)}matchesElement(t,e){return bs(t,e)}containsElement(t,e){return vs(t,e)}query(t,e,i){return _s(t,e,i)}computeStyle(t,e,i){return window.getComputedStyle(t)[e]}overrideWebAnimationsSupport(t){this._isNativeImpl=t}animate(t,e,i,n,r,s=[],o){if(!o&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(t,e,i,n,r,s);const a={duration:i,delay:n,fill:0==n?"both":"forwards"};r&&(a.easing=r);const l={},c=s.filter(t=>t instanceof ia);Ns(i,n)&&c.forEach(t=>{let e=t.currentSnapshot;Object.keys(e).forEach(t=>l[t]=e[t])});const h=zo(t,e=js(t,e=e.map(t=>Ds(t,!1)),l));return new ia(t,e,a,h)}}function ra(){return"undefined"!=typeof window&&void 0!==window.document&&Element.prototype.animate||{}}let sa=(()=>{class t extends Kr{constructor(t,e){super(),this._nextAnimationId=0,this._renderer=t.createRenderer(e.body,{id:"0",encapsulation:r.T.None,styles:[],data:{animation:[]}})}build(t){const e=this._nextAnimationId.toString();this._nextAnimationId++;const i=Array.isArray(t)?Wr(t):t;return la(this._renderer,null,e,"register",[i]),new oa(e,this._renderer)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.I),r.Zb(a))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();class oa extends class{}{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new aa(this._id,t,e||{},this._renderer)}}class aa{constructor(t,e,i,n){this.id=t,this.element=e,this._renderer=n,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}_listen(t,e){return this._renderer.listen(this.element,`@@${this.id}:${t}`,e)}_command(t,...e){return la(this._renderer,this.element,this.id,t,e)}onDone(t){this._listen("done",t)}onStart(t){this._listen("start",t)}onDestroy(t){this._listen("destroy",t)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset")}setPosition(t){this._command("setPosition",t)}getPosition(){var t,e;return null!==(e=null===(t=this._renderer.engine.players[+this.id])||void 0===t?void 0:t.getPosition())&&void 0!==e?e:0}}function la(t,e,i,n,r){return t.setProperty(e,`@@${i}:${n}`,r)}let ca=(()=>{class t{constructor(t,e,i){this.delegate=t,this.engine=e,this._zone=i,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),e.onRemovalComplete=(t,e)=>{e&&e.parentNode(t)&&e.removeChild(t.parentNode,t)}}createRenderer(t,e){const i=this.delegate.createRenderer(t,e);if(!(t&&e&&e.data&&e.data.animation)){let t=this._rendererCache.get(i);return t||(t=new ha("",i,this.engine),this._rendererCache.set(i,t)),t}const n=e.id,r=e.id+"-"+this._currentId;this._currentId++,this.engine.register(r,t);const s=e=>{Array.isArray(e)?e.forEach(s):this.engine.registerTrigger(n,r,t,e.name,e)};return e.data.animation.forEach(s),new ua(this,r,i,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(t,e,i){t>=0&&t<this._microtaskId?this._zone.run(()=>e(i)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(t=>{const[e,i]=t;e(i)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([e,i]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.I),r.Zb(jo),r.Zb(r.B))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();class ha{constructor(t,e,i){this.namespaceId=t,this.delegate=e,this.engine=i,this.destroyNode=this.delegate.destroyNode?t=>e.destroyNode(t):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)}insertBefore(t,e,i,n=!0){this.delegate.insertBefore(t,e,i),this.engine.onInsert(this.namespaceId,e,t,n)}removeChild(t,e,i){this.engine.onRemove(this.namespaceId,e,this.delegate,i)}selectRootElement(t,e){return this.delegate.selectRootElement(t,e)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,i,n){this.delegate.setAttribute(t,e,i,n)}removeAttribute(t,e,i){this.delegate.removeAttribute(t,e,i)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,i,n){this.delegate.setStyle(t,e,i,n)}removeStyle(t,e,i){this.delegate.removeStyle(t,e,i)}setProperty(t,e,i){"@"==e.charAt(0)&&"@.disabled"==e?this.disableAnimations(t,!!i):this.delegate.setProperty(t,e,i)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,i){return this.delegate.listen(t,e,i)}disableAnimations(t,e){this.engine.disableAnimations(t,e)}}class ua extends ha{constructor(t,e,i,n){super(e,i,n),this.factory=t,this.namespaceId=e}setProperty(t,e,i){"@"==e.charAt(0)?"."==e.charAt(1)&&"@.disabled"==e?this.disableAnimations(t,i=void 0===i||!!i):this.engine.process(this.namespaceId,t,e.substr(1),i):this.delegate.setProperty(t,e,i)}listen(t,e,i){if("@"==e.charAt(0)){const n=function(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(t);let r=e.substr(1),s="";return"@"!=r.charAt(0)&&([r,s]=function(t){const e=t.indexOf(".");return[t.substring(0,e),t.substr(e+1)]}(r)),this.engine.listen(this.namespaceId,n,r,s,t=>{this.factory.scheduleListenerCallback(t._data||-1,i,t)})}return this.delegate.listen(t,e,i)}}let da=(()=>{class t extends jo{constructor(t,e,i){super(t.body,e,i)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(a),r.Zb(xs),r.Zb(po))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();const pa=new r.s("AnimationModuleType"),fa=[{provide:xs,useFactory:function(){return"function"==typeof ra()?new na:new ea}},{provide:pa,useValue:"BrowserAnimations"},{provide:Kr,useClass:sa},{provide:po,useFactory:function(){return new fo}},{provide:jo,useClass:da},{provide:r.I,useFactory:function(t,e,i){return new ca(t,e,i)},deps:[Wt,jo,r.B]}];let ma=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:fa,imports:[le]}),t})();const ga=["*",[["mat-option"],["ng-container"]]],Aa=["*","mat-option, ng-container"];function ba(t,e){if(1&t&&r.Qb(0,"mat-pseudo-checkbox",4),2&t){const t=r.gc();r.nc("state",t.selected?"checked":"unchecked")("disabled",t.disabled)}}function va(t,e){if(1&t&&(r.Vb(0,"span",5),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Mc("(",t.group.label,")")}}const _a=["*"];let ya=(()=>{class t{}return t.STANDARD_CURVE="cubic-bezier(0.4,0.0,0.2,1)",t.DECELERATION_CURVE="cubic-bezier(0.0,0.0,0.2,1)",t.ACCELERATION_CURVE="cubic-bezier(0.4,0.0,1,1)",t.SHARP_CURVE="cubic-bezier(0.4,0.0,0.6,1)",t})(),wa=(()=>{class t{}return t.COMPLEX="375ms",t.ENTERING="225ms",t.EXITING="195ms",t})();const xa=new r.R("11.2.5"),Ca=new r.s("mat-sanity-checks",{providedIn:"root",factory:function(){return!0}});let Sa=(()=>{class t{constructor(t,e,i){this._hasDoneGlobalChecks=!1,this._document=i,t._applyBodyHighContrastModeCssClasses(),this._sanityChecks=e,this._hasDoneGlobalChecks||(this._checkDoctypeIsDefined(),this._checkThemeIsPresent(),this._checkCdkVersionMatch(),this._hasDoneGlobalChecks=!0)}_getWindow(){const t=this._document.defaultView||window;return"object"==typeof t&&t?t:null}_checksAreEnabled(){return Object(r.Y)()&&!this._isTestEnv()}_isTestEnv(){const t=this._getWindow();return t&&(t.__karma__||t.jasmine)}_checkDoctypeIsDefined(){this._checksAreEnabled()&&(!0===this._sanityChecks||this._sanityChecks.doctype)&&!this._document.doctype&&console.warn("Current document does not have a doctype. This may cause some Angular Material components not to behave as expected.")}_checkThemeIsPresent(){if(!this._checksAreEnabled()||!1===this._sanityChecks||!this._sanityChecks.theme||!this._document.body||"function"!=typeof getComputedStyle)return;const t=this._document.createElement("div");t.classList.add("mat-theme-loaded-marker"),this._document.body.appendChild(t);const e=getComputedStyle(t);e&&"none"!==e.display&&console.warn("Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming"),this._document.body.removeChild(t)}_checkCdkVersionMatch(){this._checksAreEnabled()&&(!0===this._sanityChecks||this._sanityChecks.version)&&xa.full!==Hr.full&&console.warn("The Angular Material version ("+xa.full+") does not match the Angular CDK version ("+Hr.full+").\nPlease ensure the versions of these two packages exactly match.")}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Xi),r.Zb(Ca,8),r.Zb(a))},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[qn],qn]}),t})();function ka(t){return class extends t{constructor(...t){super(...t),this._disabled=!1}get disabled(){return this._disabled}set disabled(t){this._disabled=ti(t)}}}function Ea(t,e){return class extends t{constructor(...t){super(...t),this.defaultColor=e,this.color=e}get color(){return this._color}set color(t){const e=t||this.defaultColor;e!==this._color&&(this._color&&this._elementRef.nativeElement.classList.remove(`mat-${this._color}`),e&&this._elementRef.nativeElement.classList.add(`mat-${e}`),this._color=e)}}}function Da(t){return class extends t{constructor(...t){super(...t),this._disableRipple=!1}get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=ti(t)}}}function Ia(t,e=0){return class extends t{constructor(...t){super(...t),this._tabIndex=e,this.defaultTabIndex=e}get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(t){this._tabIndex=null!=t?ei(t):this.defaultTabIndex}}}function Pa(t){return class extends t{constructor(...t){super(...t),this.errorState=!1,this.stateChanges=new _e.a}updateErrorState(){const t=this.errorState,e=(this.errorStateMatcher||this._defaultErrorStateMatcher).isErrorState(this.ngControl?this.ngControl.control:null,this._parentFormGroup||this._parentForm);e!==t&&(this.errorState=e,this.stateChanges.next())}}}function Oa(t){return class extends t{constructor(...t){super(...t),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new Ze.a(t=>{this._isInitialized?this._notifySubscriber(t):this._pendingSubscribers.push(t)})}_markInitialized(){this._isInitialized=!0,this._pendingSubscribers.forEach(this._notifySubscriber),this._pendingSubscribers=null}_notifySubscriber(t){t.next(),t.complete()}}}const Ma=new r.s("MAT_DATE_LOCALE",{providedIn:"root",factory:function(){return Object(r.X)(r.w)}});class Ta{constructor(){this._localeChanges=new _e.a,this.localeChanges=this._localeChanges}getValidDateOrNull(t){return this.isDateInstance(t)&&this.isValid(t)?t:null}deserialize(t){return null==t||this.isDateInstance(t)&&this.isValid(t)?t:this.invalid()}setLocale(t){this.locale=t,this._localeChanges.next()}compareDate(t,e){return this.getYear(t)-this.getYear(e)||this.getMonth(t)-this.getMonth(e)||this.getDate(t)-this.getDate(e)}sameDate(t,e){if(t&&e){let i=this.isValid(t),n=this.isValid(e);return i&&n?!this.compareDate(t,e):i==n}return t==e}clampDate(t,e,i){return e&&this.compareDate(t,e)<0?e:i&&this.compareDate(t,i)>0?i:t}}const Ra=new r.s("mat-date-formats");let Va;try{Va="undefined"!=typeof Intl}catch(Knt){Va=!1}const Fa={long:["January","February","March","April","May","June","July","August","September","October","November","December"],short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],narrow:["J","F","M","A","M","J","J","A","S","O","N","D"]},La=Na(31,t=>String(t+1)),Ua={long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],narrow:["S","M","T","W","T","F","S"]},Ba=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;function Na(t,e){const i=Array(t);for(let n=0;n<t;n++)i[n]=e(n);return i}let ja=(()=>{class t extends Ta{constructor(t,e){super(),this.useUtcForDisplay=!0,super.setLocale(t),this.useUtcForDisplay=!e.TRIDENT,this._clampDate=e.TRIDENT||e.EDGE}getYear(t){return t.getFullYear()}getMonth(t){return t.getMonth()}getDate(t){return t.getDate()}getDayOfWeek(t){return t.getDay()}getMonthNames(t){if(Va){const e=new Intl.DateTimeFormat(this.locale,{month:t,timeZone:"utc"});return Na(12,t=>this._stripDirectionalityCharacters(this._format(e,new Date(2017,t,1))))}return Fa[t]}getDateNames(){if(Va){const t=new Intl.DateTimeFormat(this.locale,{day:"numeric",timeZone:"utc"});return Na(31,e=>this._stripDirectionalityCharacters(this._format(t,new Date(2017,0,e+1))))}return La}getDayOfWeekNames(t){if(Va){const e=new Intl.DateTimeFormat(this.locale,{weekday:t,timeZone:"utc"});return Na(7,t=>this._stripDirectionalityCharacters(this._format(e,new Date(2017,0,t+1))))}return Ua[t]}getYearName(t){if(Va){const e=new Intl.DateTimeFormat(this.locale,{year:"numeric",timeZone:"utc"});return this._stripDirectionalityCharacters(this._format(e,t))}return String(this.getYear(t))}getFirstDayOfWeek(){return 0}getNumDaysInMonth(t){return this.getDate(this._createDateWithOverflow(this.getYear(t),this.getMonth(t)+1,0))}clone(t){return new Date(t.getTime())}createDate(t,e,i){let n=this._createDateWithOverflow(t,e,i);return n.getMonth(),n}today(){return new Date}parse(t){return"number"==typeof t?new Date(t):t?new Date(Date.parse(t)):null}format(t,e){if(!this.isValid(t))throw Error("NativeDateAdapter: Cannot format invalid date.");if(Va){this._clampDate&&(t.getFullYear()<1||t.getFullYear()>9999)&&(t=this.clone(t)).setFullYear(Math.max(1,Math.min(9999,t.getFullYear()))),e=Object.assign(Object.assign({},e),{timeZone:"utc"});const i=new Intl.DateTimeFormat(this.locale,e);return this._stripDirectionalityCharacters(this._format(i,t))}return this._stripDirectionalityCharacters(t.toDateString())}addCalendarYears(t,e){return this.addCalendarMonths(t,12*e)}addCalendarMonths(t,e){let i=this._createDateWithOverflow(this.getYear(t),this.getMonth(t)+e,this.getDate(t));return this.getMonth(i)!=((this.getMonth(t)+e)%12+12)%12&&(i=this._createDateWithOverflow(this.getYear(i),this.getMonth(i),0)),i}addCalendarDays(t,e){return this._createDateWithOverflow(this.getYear(t),this.getMonth(t),this.getDate(t)+e)}toIso8601(t){return[t.getUTCFullYear(),this._2digit(t.getUTCMonth()+1),this._2digit(t.getUTCDate())].join("-")}deserialize(t){if("string"==typeof t){if(!t)return null;if(Ba.test(t)){let e=new Date(t);if(this.isValid(e))return e}}return super.deserialize(t)}isDateInstance(t){return t instanceof Date}isValid(t){return!isNaN(t.getTime())}invalid(){return new Date(NaN)}_createDateWithOverflow(t,e,i){const n=new Date;return n.setFullYear(t,e,i),n.setHours(0,0,0,0),n}_2digit(t){return("00"+t).slice(-2)}_stripDirectionalityCharacters(t){return t.replace(/[\u200e\u200f]/g,"")}_format(t,e){const i=new Date;return i.setUTCFullYear(e.getFullYear(),e.getMonth(),e.getDate()),i.setUTCHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),t.format(i)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Ma,8),r.Zb(ci))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),za=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[{provide:Ta,useClass:ja}],imports:[[hi]]}),t})();const Ha={parse:{dateInput:null},display:{dateInput:{year:"numeric",month:"numeric",day:"numeric"},monthYearLabel:{year:"numeric",month:"short"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"}}};let Ka=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[{provide:Ra,useValue:Ha}],imports:[[za]]}),t})(),$a=(()=>{class t{isErrorState(t,e){return!!(t&&t.invalid&&(t.touched||e&&e.submitted))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(r.Lb)({factory:function(){return new t},token:t,providedIn:"root"}),t})(),Ga=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","mat-line",""],["","matLine",""]],hostAttrs:[1,"mat-line"]}),t})();function Wa(t,e,i){const n=t.nativeElement.classList;i?n.add(e):n.remove(e)}let Za=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Sa],Sa]}),t})();class qa{constructor(t,e,i){this._renderer=t,this.element=e,this.config=i,this.state=3}fadeOut(){this._renderer.fadeOutRipple(this)}}const Ya={enterDuration:450,exitDuration:400},Qa=Ai({passive:!0}),Xa=["mousedown","touchstart"],Ja=["mouseup","mouseleave","touchend","touchcancel"];class tl{constructor(t,e,i,n){this._target=t,this._ngZone=e,this._isPointerDown=!1,this._activeRipples=new Set,this._pointerUpEventsRegistered=!1,n.isBrowser&&(this._containerElement=si(i))}fadeInRipple(t,e,i={}){const n=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),r=Object.assign(Object.assign({},Ya),i.animation);i.centered&&(t=n.left+n.width/2,e=n.top+n.height/2);const s=i.radius||function(t,e,i){const n=Math.max(Math.abs(t-i.left),Math.abs(t-i.right)),r=Math.max(Math.abs(e-i.top),Math.abs(e-i.bottom));return Math.sqrt(n*n+r*r)}(t,e,n),o=t-n.left,a=e-n.top,l=r.enterDuration,c=document.createElement("div");c.classList.add("mat-ripple-element"),c.style.left=o-s+"px",c.style.top=a-s+"px",c.style.height=2*s+"px",c.style.width=2*s+"px",null!=i.color&&(c.style.backgroundColor=i.color),c.style.transitionDuration=`${l}ms`,this._containerElement.appendChild(c),window.getComputedStyle(c).getPropertyValue("opacity"),c.style.transform="scale(1)";const h=new qa(this,c,i);return h.state=0,this._activeRipples.add(h),i.persistent||(this._mostRecentTransientRipple=h),this._runTimeoutOutsideZone(()=>{const t=h===this._mostRecentTransientRipple;h.state=1,i.persistent||t&&this._isPointerDown||h.fadeOut()},l),h}fadeOutRipple(t){const e=this._activeRipples.delete(t);if(t===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),this._activeRipples.size||(this._containerRect=null),!e)return;const i=t.element,n=Object.assign(Object.assign({},Ya),t.config.animation);i.style.transitionDuration=`${n.exitDuration}ms`,i.style.opacity="0",t.state=2,this._runTimeoutOutsideZone(()=>{t.state=3,i.parentNode.removeChild(i)},n.exitDuration)}fadeOutAll(){this._activeRipples.forEach(t=>t.fadeOut())}setupTriggerEvents(t){const e=si(t);e&&e!==this._triggerElement&&(this._removeTriggerEvents(),this._triggerElement=e,this._registerEvents(Xa))}handleEvent(t){"mousedown"===t.type?this._onMousedown(t):"touchstart"===t.type?this._onTouchStart(t):this._onPointerUp(),this._pointerUpEventsRegistered||(this._registerEvents(Ja),this._pointerUpEventsRegistered=!0)}_onMousedown(t){const e=$i(t),i=this._lastTouchStartEvent&&Date.now()<this._lastTouchStartEvent+800;this._target.rippleDisabled||e||i||(this._isPointerDown=!0,this.fadeInRipple(t.clientX,t.clientY,this._target.rippleConfig))}_onTouchStart(t){if(!this._target.rippleDisabled&&!Gi(t)){this._lastTouchStartEvent=Date.now(),this._isPointerDown=!0;const e=t.changedTouches;for(let t=0;t<e.length;t++)this.fadeInRipple(e[t].clientX,e[t].clientY,this._target.rippleConfig)}}_onPointerUp(){this._isPointerDown&&(this._isPointerDown=!1,this._activeRipples.forEach(t=>{!t.config.persistent&&(1===t.state||t.config.terminateOnPointerUp&&0===t.state)&&t.fadeOut()}))}_runTimeoutOutsideZone(t,e=0){this._ngZone.runOutsideAngular(()=>setTimeout(t,e))}_registerEvents(t){this._ngZone.runOutsideAngular(()=>{t.forEach(t=>{this._triggerElement.addEventListener(t,this,Qa)})})}_removeTriggerEvents(){this._triggerElement&&(Xa.forEach(t=>{this._triggerElement.removeEventListener(t,this,Qa)}),this._pointerUpEventsRegistered&&Ja.forEach(t=>{this._triggerElement.removeEventListener(t,this,Qa)}))}}const el=new r.s("mat-ripple-global-options");let il=(()=>{class t{constructor(t,e,i,n,r){this._elementRef=t,this._animationMode=r,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=n||{},this._rippleRenderer=new tl(this,e,t,i)}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._setupTriggerEventsIfEnabled()}get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(t){this._trigger=t,this._setupTriggerEventsIfEnabled()}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:Object.assign(Object.assign(Object.assign({},this._globalOptions.animation),"NoopAnimations"===this._animationMode?{enterDuration:0,exitDuration:0}:{}),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(t,e=0,i){return"number"==typeof t?this._rippleRenderer.fadeInRipple(t,e,Object.assign(Object.assign({},this.rippleConfig),i)):this._rippleRenderer.fadeInRipple(0,0,Object.assign(Object.assign({},this.rippleConfig),t))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.B),r.Pb(ci),r.Pb(el,8),r.Pb(pa,8))},t.\u0275dir=r.Kb({type:t,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(t,e){2&t&&r.Hb("mat-ripple-unbounded",e.unbounded)},inputs:{radius:["matRippleRadius","radius"],disabled:["matRippleDisabled","disabled"],trigger:["matRippleTrigger","trigger"],color:["matRippleColor","color"],unbounded:["matRippleUnbounded","unbounded"],centered:["matRippleCentered","centered"],animation:["matRippleAnimation","animation"]},exportAs:["matRipple"]}),t})(),nl=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Sa,hi],Sa]}),t})(),rl=(()=>{class t{constructor(t){this._animationMode=t,this.state="unchecked",this.disabled=!1}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(pa,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:8,hostBindings:function(t,e){2&t&&r.Hb("mat-pseudo-checkbox-indeterminate","indeterminate"===e.state)("mat-pseudo-checkbox-checked","checked"===e.state)("mat-pseudo-checkbox-disabled",e.disabled)("_mat-animation-noopable","NoopAnimations"===e._animationMode)},inputs:{state:"state",disabled:"disabled"},decls:0,vars:0,template:function(t,e){},styles:['.mat-pseudo-checkbox{width:16px;height:16px;border:2px solid;border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate{border-color:transparent}._mat-animation-noopable.mat-pseudo-checkbox{transition:none;animation:none}._mat-animation-noopable.mat-pseudo-checkbox::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{top:5px;left:1px;width:10px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{top:2.4px;left:1px;width:8px;height:3px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}\n'],encapsulation:2,changeDetection:0}),t})(),sl=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Sa]]}),t})();const al=new r.s("MAT_OPTION_PARENT_COMPONENT");class ll{}const cl=ka(ll);let hl=0,ul=(()=>{class t extends cl{constructor(t){var e;super(),this._labelId="mat-optgroup-label-"+hl++,this._inert=null!==(e=null==t?void 0:t.inertGroups)&&void 0!==e&&e}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(al,8))},t.\u0275dir=r.Kb({type:t,inputs:{label:"label"},features:[r.Ab]}),t})();const dl=new r.s("MatOptgroup");let pl=(()=>{class t extends ul{}return t.\u0275fac=function(e){return fl(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-optgroup"]],hostAttrs:[1,"mat-optgroup"],hostVars:5,hostBindings:function(t,e){2&t&&(r.Eb("role",e._inert?null:"group")("aria-disabled",e._inert?null:e.disabled.toString())("aria-labelledby",e._inert?null:e._labelId),r.Hb("mat-optgroup-disabled",e.disabled))},inputs:{disabled:"disabled"},exportAs:["matOptgroup"],features:[r.Cb([{provide:dl,useExisting:t}]),r.Ab],ngContentSelectors:Aa,decls:4,vars:2,consts:[["aria-hidden","true",1,"mat-optgroup-label",3,"id"]],template:function(t,e){1&t&&(r.mc(ga),r.Vb(0,"span",0),r.Kc(1),r.lc(2),r.Ub(),r.lc(3,1)),2&t&&(r.nc("id",e._labelId),r.Db(1),r.Mc("",e.label," "))},styles:[".mat-optgroup-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-optgroup-label[disabled]{cursor:default}[dir=rtl] .mat-optgroup-label{text-align:right}.mat-optgroup-label .mat-icon{margin-right:16px;vertical-align:middle}.mat-optgroup-label .mat-icon svg{vertical-align:top}[dir=rtl] .mat-optgroup-label .mat-icon{margin-left:16px;margin-right:0}\n"],encapsulation:2,changeDetection:0}),t})();const fl=r.Xb(pl);let ml=0;class gl{constructor(t,e=!1){this.source=t,this.isUserInput=e}}let Al=(()=>{class t{constructor(t,e,i,n){this._element=t,this._changeDetectorRef=e,this._parent=i,this.group=n,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id="mat-option-"+ml++,this.onSelectionChange=new r.o,this._stateChanges=new _e.a}get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}get disabled(){return this.group&&this.group.disabled||this._disabled}set disabled(t){this._disabled=ti(t)}get disableRipple(){return this._parent&&this._parent.disableRipple}get active(){return this._active}get viewValue(){return(this._getHostElement().textContent||"").trim()}select(){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}deselect(){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}focus(t,e){const i=this._getHostElement();"function"==typeof i.focus&&i.focus(e)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(t){13!==t.keyCode&&32!==t.keyCode||ke(t)||(this._selectViaInteraction(),t.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getAriaSelected(){return this.selected||!this.multiple&&null}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){const t=this.viewValue;t!==this._mostRecentViewValue&&(this._mostRecentViewValue=t,this._stateChanges.next())}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(t=!1){this.onSelectionChange.emit(new gl(this,t))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.h),r.Pb(void 0),r.Pb(ul))},t.\u0275dir=r.Kb({type:t,inputs:{id:"id",disabled:"disabled",value:"value"},outputs:{onSelectionChange:"onSelectionChange"}}),t})(),bl=(()=>{class t extends Al{constructor(t,e,i,n){super(t,e,i,n)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.h),r.Pb(al,8),r.Pb(dl,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-option","mat-focus-indicator"],hostVars:12,hostBindings:function(t,e){1&t&&r.cc("click",function(){return e._selectViaInteraction()})("keydown",function(t){return e._handleKeydown(t)}),2&t&&(r.Yb("id",e.id),r.Eb("tabindex",e._getTabIndex())("aria-selected",e._getAriaSelected())("aria-disabled",e.disabled.toString()),r.Hb("mat-selected",e.selected)("mat-option-multiple",e.multiple)("mat-active",e.active)("mat-option-disabled",e.disabled))},exportAs:["matOption"],features:[r.Ab],ngContentSelectors:_a,decls:5,vars:4,consts:[["class","mat-option-pseudo-checkbox",3,"state","disabled",4,"ngIf"],[1,"mat-option-text"],["class","cdk-visually-hidden",4,"ngIf"],["mat-ripple","",1,"mat-option-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-option-pseudo-checkbox",3,"state","disabled"],[1,"cdk-visually-hidden"]],template:function(t,e){1&t&&(r.mc(),r.Ic(0,ba,1,2,"mat-pseudo-checkbox",0),r.Vb(1,"span",1),r.lc(2),r.Ub(),r.Ic(3,va,2,1,"span",2),r.Qb(4,"div",3)),2&t&&(r.nc("ngIf",e.multiple),r.Db(3),r.nc("ngIf",e.group&&e.group._inert),r.Db(1),r.nc("matRippleTrigger",e._getHostElement())("matRippleDisabled",e.disabled||e.disableRipple))},directives:[ut,il,rl],styles:[".mat-option{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative;cursor:pointer;outline:none;display:flex;flex-direction:row;max-width:100%;box-sizing:border-box;align-items:center;-webkit-tap-highlight-color:transparent}.mat-option[disabled]{cursor:default}[dir=rtl] .mat-option{text-align:right}.mat-option .mat-icon{margin-right:16px;vertical-align:middle}.mat-option .mat-icon svg{vertical-align:top}[dir=rtl] .mat-option .mat-icon{margin-left:16px;margin-right:0}.mat-option[aria-disabled=true]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:32px}[dir=rtl] .mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:16px;padding-right:32px}.cdk-high-contrast-active .mat-option{margin:0 1px}.cdk-high-contrast-active .mat-option.mat-active{border:solid 1px currentColor;margin:0}.cdk-high-contrast-active .mat-option[aria-disabled=true]{opacity:.5}.mat-option-text{display:inline-block;flex-grow:1;overflow:hidden;text-overflow:ellipsis}.mat-option .mat-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-option-pseudo-checkbox{margin-right:8px}[dir=rtl] .mat-option-pseudo-checkbox{margin-left:8px;margin-right:0}\n"],encapsulation:2,changeDetection:0}),t})();function vl(t,e,i){if(i.length){let n=e.toArray(),r=i.toArray(),s=0;for(let e=0;e<t+1;e++)n[e].group&&n[e].group===r[s]&&s++;return s}return 0}function _l(t,e,i,n){return t<i?t:t+e>i+n?Math.max(0,t-n+e):i}let yl=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[nl,Et,Sa,sl]]}),t})();const wl=["mat-button",""],xl=["*"],Cl=".mat-button .mat-button-focus-overlay,.mat-icon-button .mat-button-focus-overlay{opacity:0}.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:.04}@media(hover: none){.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:0}}.mat-button,.mat-icon-button,.mat-stroked-button,.mat-flat-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-button.mat-button-disabled,.mat-icon-button.mat-button-disabled,.mat-stroked-button.mat-button-disabled,.mat-flat-button.mat-button-disabled{cursor:default}.mat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-button.cdk-program-focused .mat-button-focus-overlay,.mat-icon-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-icon-button.cdk-program-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-program-focused .mat-button-focus-overlay,.mat-flat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-flat-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-raised-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button.mat-button-disabled{cursor:default}.mat-raised-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-raised-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-raised-button::-moz-focus-inner{border:0}._mat-animation-noopable.mat-raised-button{transition:none;animation:none}.mat-stroked-button{border:1px solid currentColor;padding:0 15px;line-height:34px}.mat-stroked-button .mat-button-ripple.mat-ripple,.mat-stroked-button .mat-button-focus-overlay{top:-1px;left:-1px;right:-1px;bottom:-1px}.mat-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:56px;height:56px;padding:0;flex-shrink:0}.mat-fab::-moz-focus-inner{border:0}.mat-fab.mat-button-disabled{cursor:default}.mat-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-fab::-moz-focus-inner{border:0}._mat-animation-noopable.mat-fab{transition:none;animation:none}.mat-fab .mat-button-wrapper{padding:16px 0;display:inline-block;line-height:24px}.mat-mini-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:40px;height:40px;padding:0;flex-shrink:0}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab.mat-button-disabled{cursor:default}.mat-mini-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-mini-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-mini-fab::-moz-focus-inner{border:0}._mat-animation-noopable.mat-mini-fab{transition:none;animation:none}.mat-mini-fab .mat-button-wrapper{padding:8px 0;display:inline-block;line-height:24px}.mat-icon-button{padding:0;min-width:0;width:40px;height:40px;flex-shrink:0;line-height:40px;border-radius:50%}.mat-icon-button i,.mat-icon-button .mat-icon{line-height:24px}.mat-button-ripple.mat-ripple,.mat-button-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-button-ripple.mat-ripple:not(:empty){transform:translateZ(0)}.mat-button-focus-overlay{opacity:0;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1),background-color 200ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-button-focus-overlay{transition:none}.mat-button-ripple-round{border-radius:50%;z-index:1}.mat-button .mat-button-wrapper>*,.mat-flat-button .mat-button-wrapper>*,.mat-stroked-button .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-fab .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*{vertical-align:middle}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button{display:inline-flex;justify-content:center;align-items:center;font-size:inherit;width:2.5em;height:2.5em}.cdk-high-contrast-active .mat-button,.cdk-high-contrast-active .mat-flat-button,.cdk-high-contrast-active .mat-raised-button,.cdk-high-contrast-active .mat-icon-button,.cdk-high-contrast-active .mat-fab,.cdk-high-contrast-active .mat-mini-fab{outline:solid 1px}.cdk-high-contrast-active .mat-button-base.cdk-keyboard-focused,.cdk-high-contrast-active .mat-button-base.cdk-program-focused{outline:solid 3px}\n",Sl=["mat-button","mat-flat-button","mat-icon-button","mat-raised-button","mat-stroked-button","mat-mini-fab","mat-fab"];class kl{constructor(t){this._elementRef=t}}const El=Ea(ka(Da(kl)));let Dl=(()=>{class t extends El{constructor(t,e,i){super(t),this._focusMonitor=e,this._animationMode=i,this.isRoundButton=this._hasHostAttributes("mat-fab","mat-mini-fab"),this.isIconButton=this._hasHostAttributes("mat-icon-button");for(const n of Sl)this._hasHostAttributes(n)&&this._getHostElement().classList.add(n);t.nativeElement.classList.add("mat-button-base"),this.isRoundButton&&(this.color="accent")}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}focus(t,e){t?this._focusMonitor.focusVia(this._getHostElement(),t,e):this._getHostElement().focus(e)}_getHostElement(){return this._elementRef.nativeElement}_isRippleDisabled(){return this.disableRipple||this.disabled}_hasHostAttributes(...t){return t.some(t=>this._getHostElement().hasAttribute(t))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(qi),r.Pb(pa,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-icon-button",""],["button","mat-fab",""],["button","mat-mini-fab",""],["button","mat-stroked-button",""],["button","mat-flat-button",""]],viewQuery:function(t,e){if(1&t&&r.Pc(il,1),2&t){let t;r.vc(t=r.dc())&&(e.ripple=t.first)}},hostAttrs:[1,"mat-focus-indicator"],hostVars:5,hostBindings:function(t,e){2&t&&(r.Eb("disabled",e.disabled||null),r.Hb("_mat-animation-noopable","NoopAnimations"===e._animationMode)("mat-button-disabled",e.disabled))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color"},exportAs:["matButton"],features:[r.Ab],attrs:wl,ngContentSelectors:xl,decls:4,vars:5,consts:[[1,"mat-button-wrapper"],["matRipple","",1,"mat-button-ripple",3,"matRippleDisabled","matRippleCentered","matRippleTrigger"],[1,"mat-button-focus-overlay"]],template:function(t,e){1&t&&(r.mc(),r.Vb(0,"span",0),r.lc(1),r.Ub(),r.Qb(2,"span",1),r.Qb(3,"span",2)),2&t&&(r.Db(2),r.Hb("mat-button-ripple-round",e.isRoundButton||e.isIconButton),r.nc("matRippleDisabled",e._isRippleDisabled())("matRippleCentered",e.isIconButton)("matRippleTrigger",e._getHostElement()))},directives:[il],styles:[Cl],encapsulation:2,changeDetection:0}),t})(),Il=(()=>{class t extends Dl{constructor(t,e,i){super(e,t,i)}_haltDisabledEvents(t){this.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(qi),r.Pb(r.l),r.Pb(pa,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["a","mat-button",""],["a","mat-raised-button",""],["a","mat-icon-button",""],["a","mat-fab",""],["a","mat-mini-fab",""],["a","mat-stroked-button",""],["a","mat-flat-button",""]],hostAttrs:[1,"mat-focus-indicator"],hostVars:7,hostBindings:function(t,e){1&t&&r.cc("click",function(t){return e._haltDisabledEvents(t)}),2&t&&(r.Eb("tabindex",e.disabled?-1:e.tabIndex||0)("disabled",e.disabled||null)("aria-disabled",e.disabled.toString()),r.Hb("_mat-animation-noopable","NoopAnimations"===e._animationMode)("mat-button-disabled",e.disabled))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex"},exportAs:["matButton","matAnchor"],features:[r.Ab],attrs:wl,ngContentSelectors:xl,decls:4,vars:5,consts:[[1,"mat-button-wrapper"],["matRipple","",1,"mat-button-ripple",3,"matRippleDisabled","matRippleCentered","matRippleTrigger"],[1,"mat-button-focus-overlay"]],template:function(t,e){1&t&&(r.mc(),r.Vb(0,"span",0),r.lc(1),r.Ub(),r.Qb(2,"span",1),r.Qb(3,"span",2)),2&t&&(r.Db(2),r.Hb("mat-button-ripple-round",e.isRoundButton||e.isIconButton),r.nc("matRippleDisabled",e._isRippleDisabled())("matRippleCentered",e.isIconButton)("matRippleTrigger",e._getHostElement()))},directives:[il],styles:[Cl],encapsulation:2,changeDetection:0}),t})(),Pl=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[nl,Sa],Sa]}),t})();function Ol(t){return new Ze.a(e=>{let i;try{i=t()}catch(n){return void e.error(n)}return(i?Object(On.a)(i):Ye()).subscribe(e)})}function Ml(t,e){}class Tl{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.maxWidth="80vw",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.autoFocus=!0,this.restoreFocus=!0,this.closeOnNavigation=!0}}const Rl={dialogContainer:$r("dialogContainer",[qr("void, exit",Zr({opacity:0,transform:"scale(0.7)"})),qr("enter",Zr({transform:"none"})),Qr("* => enter",Gr("150ms cubic-bezier(0, 0, 0.2, 1)",Zr({transform:"none",opacity:1}))),Qr("* => void, * => exit",Gr("75ms cubic-bezier(0.4, 0.0, 0.2, 1)",Zr({opacity:0})))])};let Vl=(()=>{class t extends ge{constructor(t,e,i,n,s,o){super(),this._elementRef=t,this._focusTrapFactory=e,this._changeDetectorRef=i,this._config=s,this._focusMonitor=o,this._animationStateChanged=new r.o,this._elementFocusedBeforeDialogWasOpened=null,this._closeInteractionType=null,this.attachDomPortal=t=>(this._portalOutlet.hasAttached(),this._portalOutlet.attachDomPortal(t)),this._ariaLabelledBy=s.ariaLabelledBy||null,this._document=n}_initializeWithAttachedContent(){this._setupFocusTrap(),this._capturePreviouslyFocusedElement(),this._focusDialogContainer()}attachComponentPortal(t){return this._portalOutlet.hasAttached(),this._portalOutlet.attachComponentPortal(t)}attachTemplatePortal(t){return this._portalOutlet.hasAttached(),this._portalOutlet.attachTemplatePortal(t)}_recaptureFocus(){this._containsFocus()||(!this._config.autoFocus||!this._focusTrap.focusInitialElement())&&this._elementRef.nativeElement.focus()}_trapFocus(){this._config.autoFocus?this._focusTrap.focusInitialElementWhenReady():this._containsFocus()||this._elementRef.nativeElement.focus()}_restoreFocus(){const t=this._elementFocusedBeforeDialogWasOpened;if(this._config.restoreFocus&&t&&"function"==typeof t.focus){const e=this._getActiveElement(),i=this._elementRef.nativeElement;e&&e!==this._document.body&&e!==i&&!i.contains(e)||(this._focusMonitor?(this._focusMonitor.focusVia(t,this._closeInteractionType),this._closeInteractionType=null):t.focus())}this._focusTrap&&this._focusTrap.destroy()}_setupFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement)}_capturePreviouslyFocusedElement(){this._document&&(this._elementFocusedBeforeDialogWasOpened=this._getActiveElement())}_focusDialogContainer(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}_containsFocus(){const t=this._elementRef.nativeElement,e=this._getActiveElement();return t===e||t.contains(e)}_getActiveElement(){var t;const e=this._document.activeElement;return(null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.activeElement)||e}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(Bi),r.Pb(r.h),r.Pb(a,8),r.Pb(Tl),r.Pb(qi))},t.\u0275dir=r.Kb({type:t,viewQuery:function(t,e){if(1&t&&r.Pc(be,3),2&t){let t;r.vc(t=r.dc())&&(e._portalOutlet=t.first)}},features:[r.Ab]}),t})(),Fl=(()=>{class t extends Vl{constructor(){super(...arguments),this._state="enter"}_onAnimationDone({toState:t,totalTime:e}){"enter"===t?(this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:e})):"exit"===t&&(this._restoreFocus(),this._animationStateChanged.next({state:"closed",totalTime:e}))}_onAnimationStart({toState:t,totalTime:e}){"enter"===t?this._animationStateChanged.next({state:"opening",totalTime:e}):"exit"!==t&&"void"!==t||this._animationStateChanged.next({state:"closing",totalTime:e})}_startExitAnimation(){this._state="exit",this._changeDetectorRef.markForCheck()}}return t.\u0275fac=function(e){return Ll(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1","aria-modal","true",1,"mat-dialog-container"],hostVars:6,hostBindings:function(t,e){1&t&&r.Gc("@dialogContainer.start",function(t){return e._onAnimationStart(t)})("@dialogContainer.done",function(t){return e._onAnimationDone(t)}),2&t&&(r.Yb("id",e._id),r.Eb("role",e._config.role)("aria-labelledby",e._config.ariaLabel?null:e._ariaLabelledBy)("aria-label",e._config.ariaLabel)("aria-describedby",e._config.ariaDescribedBy||null),r.Hc("@dialogContainer",e._state))},features:[r.Ab],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,e){1&t&&r.Ic(0,Ml,0,0,"ng-template",0)},directives:[be],styles:[".mat-dialog-container{display:block;padding:24px;border-radius:4px;box-sizing:border-box;overflow:auto;outline:0;width:100%;height:100%;min-height:inherit;max-height:inherit}.cdk-high-contrast-active .mat-dialog-container{outline:solid 1px}.mat-dialog-content{display:block;margin:0 -24px;padding:0 24px;max-height:65vh;overflow:auto;-webkit-overflow-scrolling:touch}.mat-dialog-title{margin:0 0 20px;display:block}.mat-dialog-actions{padding:8px 0;display:flex;flex-wrap:wrap;min-height:52px;align-items:center;box-sizing:content-box;margin-bottom:-24px}.mat-dialog-actions[align=end]{justify-content:flex-end}.mat-dialog-actions[align=center]{justify-content:center}.mat-dialog-actions .mat-button-base+.mat-button-base,.mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}\n"],encapsulation:2,data:{animation:[Rl.dialogContainer]}}),t})();const Ll=r.Xb(Fl);let Ul=0;class Bl{constructor(t,e,i="mat-dialog-"+Ul++){this._overlayRef=t,this._containerInstance=e,this.id=i,this.disableClose=this._containerInstance._config.disableClose,this._afterOpened=new _e.a,this._afterClosed=new _e.a,this._beforeClosed=new _e.a,this._state=0,e._id=i,e._animationStateChanged.pipe(He(t=>"opened"===t.state),Qe(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),e._animationStateChanged.pipe(He(t=>"closed"===t.state),Qe(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._afterClosed.next(this._result),this._afterClosed.complete(),this.componentInstance=null,this._overlayRef.dispose()}),t.keydownEvents().pipe(He(t=>27===t.keyCode&&!this.disableClose&&!ke(t))).subscribe(t=>{t.preventDefault(),Nl(this,"keyboard")}),t.backdropClick().subscribe(()=>{this.disableClose?this._containerInstance._recaptureFocus():Nl(this,"mouse")})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(He(t=>"closing"===t.state),Qe(1)).subscribe(e=>{this._beforeClosed.next(t),this._beforeClosed.complete(),this._overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),e.totalTime+100)}),this._state=1,this._containerInstance._startExitAnimation()}afterOpened(){return this._afterOpened}afterClosed(){return this._afterClosed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._overlayRef.backdropClick()}keydownEvents(){return this._overlayRef.keydownEvents()}updatePosition(t){let e=this._getPositionStrategy();return t&&(t.left||t.right)?t.left?e.left(t.left):e.right(t.right):e.centerHorizontally(),t&&(t.top||t.bottom)?t.top?e.top(t.top):e.bottom(t.bottom):e.centerVertically(),this._overlayRef.updatePosition(),this}updateSize(t="",e=""){return this._overlayRef.updateSize({width:t,height:e}),this._overlayRef.updatePosition(),this}addPanelClass(t){return this._overlayRef.addPanelClass(t),this}removePanelClass(t){return this._overlayRef.removePanelClass(t),this}getState(){return this._state}_finishDialogClose(){this._state=2,this._overlayRef.dispose()}_getPositionStrategy(){return this._overlayRef.getConfig().positionStrategy}}function Nl(t,e,i){return void 0!==t._containerInstance&&(t._containerInstance._closeInteractionType=e),t.close(i)}const jl=new r.s("MatDialogData"),zl=new r.s("mat-dialog-default-options"),Hl=new r.s("mat-dialog-scroll-strategy"),Kl={provide:Hl,deps:[Fr],useFactory:function(t){return()=>t.scrollStrategies.block()}};let $l=(()=>{class t{constructor(t,e,i,n,r,s,o,a,l){this._overlay=t,this._injector=e,this._defaultOptions=i,this._parentDialog=n,this._overlayContainer=r,this._dialogRefConstructor=o,this._dialogContainerType=a,this._dialogDataToken=l,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new _e.a,this._afterOpenedAtThisLevel=new _e.a,this._ariaHiddenElements=new Map,this.afterAllClosed=Ol(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Pn(void 0))),this._scrollStrategy=s}get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){const t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}open(t,e){(e=function(t,e){return Object.assign(Object.assign({},e),t)}(e,this._defaultOptions||new Tl)).id&&this.getDialogById(e.id);const i=this._createOverlay(e),n=this._attachDialogContainer(i,e),r=this._attachDialogContent(t,n,i,e);return this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(r),r.afterClosed().subscribe(()=>this._removeOpenDialog(r)),this.afterOpened.next(r),n._initializeWithAttachedContent(),r}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(t){return this.openDialogs.find(e=>e.id===t)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_createOverlay(t){const e=this._getOverlayConfig(t);return this._overlay.create(e)}_getOverlayConfig(t){const e=new br({positionStrategy:this._overlay.position().global(),scrollStrategy:t.scrollStrategy||this._scrollStrategy(),panelClass:t.panelClass,hasBackdrop:t.hasBackdrop,direction:t.direction,minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight,disposeOnNavigation:t.closeOnNavigation});return t.backdropClass&&(e.backdropClass=t.backdropClass),e}_attachDialogContainer(t,e){const i=r.t.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:Tl,useValue:e}]}),n=new pe(this._dialogContainerType,e.viewContainerRef,i,e.componentFactoryResolver);return t.attach(n).instance}_attachDialogContent(t,e,i,n){const s=new this._dialogRefConstructor(i,e,n.id);if(t instanceof r.O)e.attachTemplatePortal(new fe(t,null,{$implicit:n.data,dialogRef:s}));else{const i=this._createInjector(n,s,e),r=e.attachComponentPortal(new pe(t,n.viewContainerRef,i));s.componentInstance=r.instance}return s.updateSize(n.width,n.height).updatePosition(n.position),s}_createInjector(t,e,i){const n=t&&t.viewContainerRef&&t.viewContainerRef.injector,s=[{provide:this._dialogContainerType,useValue:i},{provide:this._dialogDataToken,useValue:t.data},{provide:this._dialogRefConstructor,useValue:e}];return!t.direction||n&&n.get(Zn,null)||s.push({provide:Zn,useValue:{value:t.direction,change:Se()}}),r.t.create({parent:n||this._injector,providers:s})}_removeOpenDialog(t){const e=this.openDialogs.indexOf(t);e>-1&&(this.openDialogs.splice(e,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((t,e)=>{t?e.setAttribute("aria-hidden",t):e.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){const t=this._overlayContainer.getContainerElement();if(t.parentElement){const e=t.parentElement.children;for(let i=e.length-1;i>-1;i--){let n=e[i];n===t||"SCRIPT"===n.nodeName||"STYLE"===n.nodeName||n.hasAttribute("aria-live")||(this._ariaHiddenElements.set(n,n.getAttribute("aria-hidden")),n.setAttribute("aria-hidden","true"))}}}_closeDialogs(t){let e=t.length;for(;e--;)t[e].close()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Fr),r.Pb(r.t),r.Pb(void 0),r.Pb(void 0),r.Pb(Sr),r.Pb(void 0),r.Pb(r.Q),r.Pb(r.Q),r.Pb(r.s))},t.\u0275dir=r.Kb({type:t}),t})(),Gl=(()=>{class t extends $l{constructor(t,e,i,n,r,s,o){super(t,e,n,s,o,r,Bl,Fl,jl)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Fr),r.Zb(r.t),r.Zb(w,8),r.Zb(zl,8),r.Zb(Hl),r.Zb(t,12),r.Zb(Sr))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),Wl=0,Zl=(()=>{class t{constructor(t,e,i){this.dialogRef=t,this._elementRef=e,this._dialog=i,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=Xl(this._elementRef,this._dialog.openDialogs))}ngOnChanges(t){const e=t._matDialogClose||t._matDialogCloseResult;e&&(this.dialogResult=e.currentValue)}_onButtonClick(t){Nl(this.dialogRef,0===t.screenX&&0===t.screenY?"keyboard":"mouse",this.dialogResult)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Bl,8),r.Pb(r.l),r.Pb(Gl))},t.\u0275dir=r.Kb({type:t,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(t,e){1&t&&r.cc("click",function(t){return e._onButtonClick(t)}),2&t&&r.Eb("aria-label",e.ariaLabel||null)("type",e.type)},inputs:{type:"type",dialogResult:["mat-dialog-close","dialogResult"],ariaLabel:["aria-label","ariaLabel"],_matDialogClose:["matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],features:[r.Bb]}),t})(),ql=(()=>{class t{constructor(t,e,i){this._dialogRef=t,this._elementRef=e,this._dialog=i,this.id="mat-dialog-title-"+Wl++}ngOnInit(){this._dialogRef||(this._dialogRef=Xl(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{const t=this._dialogRef._containerInstance;t&&!t._ariaLabelledBy&&(t._ariaLabelledBy=this.id)})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Bl,8),r.Pb(r.l),r.Pb(Gl))},t.\u0275dir=r.Kb({type:t,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-dialog-title"],hostVars:1,hostBindings:function(t,e){2&t&&r.Yb("id",e.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),t})(),Yl=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-dialog-content"]}),t})(),Ql=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-dialog-actions"]}),t})();function Xl(t,e){let i=t.nativeElement.parentElement;for(;i&&!i.classList.contains("mat-dialog-container");)i=i.parentElement;return i?e.find(t=>t.id===i.id):null}let Jl=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[Gl,Kl],imports:[[zr,ve,Sa],Sa]}),t})();var tc=i("XoHu");function ec(...t){if(1===t.length){const e=t[0];if(Object(tn.a)(e))return ic(e,null);if(Object(tc.a)(e)&&Object.getPrototypeOf(e)===Object.prototype){const t=Object.keys(e);return ic(t.map(t=>e[t]),t)}}if("function"==typeof t[t.length-1]){const e=t.pop();return ic(t=1===t.length&&Object(tn.a)(t[0])?t[0]:t,null).pipe(Object(Ge.a)(t=>e(...t)))}return ic(t,null)}function ic(t,e){return new Ze.a(i=>{const n=t.length;if(0===n)return void i.complete();const r=new Array(n);let s=0,o=0;for(let a=0;a<n;a++){const l=Object(On.a)(t[a]);let c=!1;i.add(l.subscribe({next:t=>{c||(c=!0,o++),r[a]=t},error:t=>i.error(t),complete:()=>{s++,s!==n&&c||(o===n&&i.next(e?e.reduce((t,e,i)=>(t[e]=r[i],t),{}):r),i.complete())}}))}})}class nc{}const rc=new r.s("NgValueAccessor"),sc={provide:rc,useExisting:Object(r.W)(()=>ac),multi:!0},oc=new r.s("CompositionEventMode");let ac=(()=>{class t{constructor(t,e,i){this._renderer=t,this._elementRef=e,this._compositionMode=i,this.onChange=t=>{},this.onTouched=()=>{},this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function(){const t=o()?o().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.H),r.Pb(r.l),r.Pb(oc,8))},t.\u0275dir=r.Kb({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(t,e){1&t&&r.cc("input",function(t){return e._handleInput(t.target.value)})("blur",function(){return e.onTouched()})("compositionstart",function(){return e._compositionStart()})("compositionend",function(t){return e._compositionEnd(t.target.value)})},features:[r.Cb([sc])]}),t})();function lc(t){return null==t||0===t.length}function cc(t){return null!=t&&"number"==typeof t.length}const hc=new r.s("NgValidators"),uc=new r.s("NgAsyncValidators"),dc=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class pc{static min(t){return function(t){return e=>{if(lc(e.value)||lc(t))return null;const i=parseFloat(e.value);return!isNaN(i)&&i<t?{min:{min:t,actual:e.value}}:null}}(t)}static max(t){return function(t){return e=>{if(lc(e.value)||lc(t))return null;const i=parseFloat(e.value);return!isNaN(i)&&i>t?{max:{max:t,actual:e.value}}:null}}(t)}static required(t){return fc(t)}static requiredTrue(t){return function(t){return!0===t.value?null:{required:!0}}(t)}static email(t){return function(t){return lc(t.value)||dc.test(t.value)?null:{email:!0}}(t)}static minLength(t){return mc(t)}static maxLength(t){return gc(t)}static pattern(t){return function(t){if(!t)return Ac;let e,i;return"string"==typeof t?(i="","^"!==t.charAt(0)&&(i+="^"),i+=t,"$"!==t.charAt(t.length-1)&&(i+="$"),e=new RegExp(i)):(i=t.toString(),e=t),t=>{if(lc(t.value))return null;const n=t.value;return e.test(n)?null:{pattern:{requiredPattern:i,actualValue:n}}}}(t)}static nullValidator(t){return null}static compose(t){return xc(t)}static composeAsync(t){return Sc(t)}}function fc(t){return lc(t.value)?{required:!0}:null}function mc(t){return e=>lc(e.value)||!cc(e.value)?null:e.value.length<t?{minlength:{requiredLength:t,actualLength:e.value.length}}:null}function gc(t){return e=>cc(e.value)&&e.value.length>t?{maxlength:{requiredLength:t,actualLength:e.value.length}}:null}function Ac(t){return null}function bc(t){return null!=t}function vc(t){const e=Object(r.ub)(t)?Object(On.a)(t):t;return Object(r.tb)(e),e}function _c(t){let e={};return t.forEach(t=>{e=null!=t?Object.assign(Object.assign({},e),t):e}),0===Object.keys(e).length?null:e}function yc(t,e){return e.map(e=>e(t))}function wc(t){return t.map(t=>function(t){return!t.validate}(t)?t:e=>t.validate(e))}function xc(t){if(!t)return null;const e=t.filter(bc);return 0==e.length?null:function(t){return _c(yc(t,e))}}function Cc(t){return null!=t?xc(wc(t)):null}function Sc(t){if(!t)return null;const e=t.filter(bc);return 0==e.length?null:function(t){return ec(yc(t,e).map(vc)).pipe(Object(Ge.a)(_c))}}function kc(t){return null!=t?Sc(wc(t)):null}function Ec(t,e){return null===t?[e]:Array.isArray(t)?[...t,e]:[t,e]}function Dc(t){return t._rawValidators}function Ic(t){return t._rawAsyncValidators}let Pc=(()=>{class t{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=Cc(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=kc(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t){this.control&&this.control.reset(t)}hasError(t,e){return!!this.control&&this.control.hasError(t,e)}getError(t,e){return this.control?this.control.getError(t,e):null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t}),t})(),Oc=(()=>{class t extends Pc{get formDirective(){return null}get path(){return null}}return t.\u0275fac=function(e){return Mc(e||t)},t.\u0275dir=r.Kb({type:t,features:[r.Ab]}),t})();const Mc=r.Xb(Oc);class Tc extends Pc{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Rc{constructor(t){this._cd=t}is(t){var e,i;return!!(null===(i=null===(e=this._cd)||void 0===e?void 0:e.control)||void 0===i?void 0:i[t])}}let Vc=(()=>{class t extends Rc{constructor(t){super(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Tc,2))},t.\u0275dir=r.Kb({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,e){2&t&&r.Hb("ng-untouched",e.is("untouched"))("ng-touched",e.is("touched"))("ng-pristine",e.is("pristine"))("ng-dirty",e.is("dirty"))("ng-valid",e.is("valid"))("ng-invalid",e.is("invalid"))("ng-pending",e.is("pending"))},features:[r.Ab]}),t})(),Fc=(()=>{class t extends Rc{constructor(t){super(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Oc,10))},t.\u0275dir=r.Kb({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:14,hostBindings:function(t,e){2&t&&r.Hb("ng-untouched",e.is("untouched"))("ng-touched",e.is("touched"))("ng-pristine",e.is("pristine"))("ng-dirty",e.is("dirty"))("ng-valid",e.is("valid"))("ng-invalid",e.is("invalid"))("ng-pending",e.is("pending"))},features:[r.Ab]}),t})();function Lc(t,e){return[...e.path,t]}function Uc(t,e){jc(t,e,!0),e.valueAccessor.writeValue(t.value),function(t,e){e.valueAccessor.registerOnChange(i=>{t._pendingValue=i,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&Hc(t,e)})}(t,e),function(t,e){const i=(t,i)=>{e.valueAccessor.writeValue(t),i&&e.viewToModelUpdate(t)};t.registerOnChange(i),e._registerOnDestroy(()=>{t._unregisterOnChange(i)})}(t,e),function(t,e){e.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&Hc(t,e),"submit"!==t.updateOn&&t.markAsTouched()})}(t,e),function(t,e){if(e.valueAccessor.setDisabledState){const i=t=>{e.valueAccessor.setDisabledState(t)};t.registerOnDisabledChange(i),e._registerOnDestroy(()=>{t._unregisterOnDisabledChange(i)})}}(t,e)}function Bc(t,e,i=!0){const n=()=>{};e.valueAccessor&&(e.valueAccessor.registerOnChange(n),e.valueAccessor.registerOnTouched(n)),zc(t,e,!0),t&&(e._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function Nc(t,e){t.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function jc(t,e,i){const n=Dc(t);null!==e.validator?t.setValidators(Ec(n,e.validator)):"function"==typeof n&&t.setValidators([n]);const r=Ic(t);if(null!==e.asyncValidator?t.setAsyncValidators(Ec(r,e.asyncValidator)):"function"==typeof r&&t.setAsyncValidators([r]),i){const i=()=>t.updateValueAndValidity();Nc(e._rawValidators,i),Nc(e._rawAsyncValidators,i)}}function zc(t,e,i){let n=!1;if(null!==t){if(null!==e.validator){const i=Dc(t);if(Array.isArray(i)&&i.length>0){const r=i.filter(t=>t!==e.validator);r.length!==i.length&&(n=!0,t.setValidators(r))}}if(null!==e.asyncValidator){const i=Ic(t);if(Array.isArray(i)&&i.length>0){const r=i.filter(t=>t!==e.asyncValidator);r.length!==i.length&&(n=!0,t.setAsyncValidators(r))}}}if(i){const t=()=>{};Nc(e._rawValidators,t),Nc(e._rawAsyncValidators,t)}return n}function Hc(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function Kc(t,e){jc(t,e,!1)}function $c(t,e){if(!t.hasOwnProperty("model"))return!1;const i=t.model;return!!i.isFirstChange()||!Object.is(e,i.currentValue)}function Gc(t,e){t._syncPendingControls(),e.forEach(t=>{const e=t.control;"submit"===e.updateOn&&e._pendingChange&&(t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1)})}function Wc(t,e){if(!e)return null;let i,n,r;return Array.isArray(e),e.forEach(t=>{t.constructor===ac?i=t:Object.getPrototypeOf(t.constructor)===nc?n=t:r=t}),r||n||i||null}function Zc(t,e){const i=t.indexOf(e);i>-1&&t.splice(i,1)}function qc(t){return(Jc(t)?t.validators:t)||null}function Yc(t){return Array.isArray(t)?Cc(t):t||null}function Qc(t,e){return(Jc(e)?e.asyncValidators:t)||null}function Xc(t){return Array.isArray(t)?kc(t):t||null}function Jc(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}class th{constructor(t,e){this._hasOwnPendingAsyncValidator=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=t,this._rawAsyncValidators=e,this._composedValidatorFn=Yc(this._rawValidators),this._composedAsyncValidatorFn=Xc(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get valid(){return"VALID"===this.status}get invalid(){return"INVALID"===this.status}get pending(){return"PENDING"==this.status}get disabled(){return"DISABLED"===this.status}get enabled(){return"DISABLED"!==this.status}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._rawValidators=t,this._composedValidatorFn=Yc(t)}setAsyncValidators(t){this._rawAsyncValidators=t,this._composedAsyncValidatorFn=Xc(t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(t=>t.markAllAsTouched())}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status="PENDING",!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status="DISABLED",this.errors=null,this._forEachChild(e=>{e.disable(Object.assign(Object.assign({},t),{onlySelf:!0}))}),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(t=>t(!0))}enable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status="VALID",this._forEachChild(e=>{e.enable(Object.assign(Object.assign({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(t=>t(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}updateValueAndValidity(t={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),"VALID"!==this.status&&"PENDING"!==this.status||this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?"DISABLED":"VALID"}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status="PENDING",this._hasOwnPendingAsyncValidator=!0;const e=vc(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(e=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(e,{emitEvent:t})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)}get(t){return function(t,e,i){if(null==e)return null;if(Array.isArray(e)||(e=e.split(".")),Array.isArray(e)&&0===e.length)return null;let n=t;return e.forEach(t=>{n=n instanceof ih?n.controls.hasOwnProperty(t)?n.controls[t]:null:n instanceof nh&&n.at(t)||null}),n}(this,t)}getError(t,e){const i=e?this.get(e):this;return i&&i.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new r.o,this.statusChanges=new r.o}_calculateStatus(){return this._allControlsDisabled()?"DISABLED":this.errors?"INVALID":this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus("PENDING")?"PENDING":this._anyControlsHaveStatus("INVALID")?"INVALID":"VALID"}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_isBoxedValue(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){Jc(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}}class eh extends th{constructor(t=null,e,i){super(qc(e),Qc(i,e)),this._onChange=[],this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!i})}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(t=>t(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=null,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){Zc(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Zc(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(t){this._isBoxedValue(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}}class ih extends th{constructor(t,e,i){super(qc(e),Qc(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!i})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e){this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}removeControl(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity(),this._onCollectionChange()}setControl(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){this._checkAllValuesPresent(t),Object.keys(t).forEach(i=>{this._throwIfControlMissing(i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){null!=t&&(Object.keys(t).forEach(i=>{this.controls[i]&&this.controls[i].patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,n)=>{i.reset(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e instanceof eh?e.value:e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(t,e)=>!!e._syncPendingControls()||t);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_throwIfControlMissing(t){if(!Object.keys(this.controls).length)throw new Error("\n There are no form controls registered with this group yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.controls[t])throw new Error(`Cannot find form control with name: ${t}.`)}_forEachChild(t){Object.keys(this.controls).forEach(e=>{const i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(const e of Object.keys(this.controls)){const i=this.controls[e];if(this.contains(e)&&t(i))return!0}return!1}_reduceValue(){return this._reduceChildren({},(t,e,i)=>((e.enabled||this.disabled)&&(t[i]=e.value),t))}_reduceChildren(t,e){let i=t;return this._forEachChild((t,n)=>{i=e(i,t,n)}),i}_allControlsDisabled(){for(const t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_checkAllValuesPresent(t){this._forEachChild((e,i)=>{if(void 0===t[i])throw new Error(`Must supply a value for form control with name: '${i}'.`)})}}class nh extends th{constructor(t,e,i){super(qc(e),Qc(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!i})}at(t){return this.controls[t]}push(t){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity(),this._onCollectionChange()}insert(t,e){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity()}removeAt(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),this.updateValueAndValidity()}setControl(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),e&&(this.controls.splice(t,0,e),this._registerControl(e)),this.updateValueAndValidity(),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){this._checkAllValuesPresent(t),t.forEach((t,i)=>{this._throwIfControlMissing(i),this.at(i).setValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){null!=t&&(t.forEach((t,i)=>{this.at(i)&&this.at(i).patchValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((i,n)=>{i.reset(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t instanceof eh?t.value:t.getRawValue())}clear(){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity())}_syncPendingControls(){let t=this.controls.reduce((t,e)=>!!e._syncPendingControls()||t,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_throwIfControlMissing(t){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(t))throw new Error(`Cannot find form control at index ${t}`)}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_checkAllValuesPresent(t){this._forEachChild((e,i)=>{if(void 0===t[i])throw new Error(`Must supply a value for form control at index: ${i}.`)})}_allControlsDisabled(){for(const t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}}const rh={provide:Oc,useExisting:Object(r.W)(()=>oh)},sh=(()=>Promise.resolve(null))();let oh=(()=>{class t extends Oc{constructor(t,e){super(),this.submitted=!1,this._directives=[],this.ngSubmit=new r.o,this.form=new ih({},Cc(t),kc(e))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){sh.then(()=>{const e=this._findContainer(t.path);t.control=e.registerControl(t.name,t.control),Uc(t.control,t),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.push(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){sh.then(()=>{const e=this._findContainer(t.path);e&&e.removeControl(t.name),Zc(this._directives,t)})}addFormGroup(t){sh.then(()=>{const e=this._findContainer(t.path),i=new ih({});Kc(i,t),e.registerControl(t.name,i),i.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){sh.then(()=>{const e=this._findContainer(t.path);e&&e.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,e){sh.then(()=>{this.form.get(t.path).setValue(e)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submitted=!0,Gc(this.form,this._directives),this.ngSubmit.emit(t),!1}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(hc,10),r.Pb(uc,10))},t.\u0275dir=r.Kb({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,e){1&t&&r.cc("submit",function(t){return e.onSubmit(t)})("reset",function(){return e.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[r.Cb([rh]),r.Ab]}),t})(),ah=(()=>{class t extends Oc{ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return Lc(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}}return t.\u0275fac=function(e){return lh(e||t)},t.\u0275dir=r.Kb({type:t,features:[r.Ab]}),t})();const lh=r.Xb(ah),ch={provide:Tc,useExisting:Object(r.W)(()=>uh)},hh=(()=>Promise.resolve(null))();let uh=(()=>{class t extends Tc{constructor(t,e,i,n){super(),this.control=new eh,this._registered=!1,this.update=new r.o,this._parent=t,this._setValidators(e),this._setAsyncValidators(i),this.valueAccessor=Wc(0,n)}ngOnChanges(t){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in t&&this._updateDisabled(t),$c(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._parent?Lc(this.name,this._parent):[this.name]}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){Uc(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(t){hh.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1})})}_updateDisabled(t){const e=t.isDisabled.currentValue,i=""===e||e&&"false"!==e;hh.then(()=>{i&&!this.control.disabled?this.control.disable():!i&&this.control.disabled&&this.control.enable()})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Oc,9),r.Pb(hc,10),r.Pb(uc,10),r.Pb(rc,10))},t.\u0275dir=r.Kb({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[r.Cb([ch]),r.Ab,r.Bb]}),t})(),dh=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),t})();const ph={provide:rc,useExisting:Object(r.W)(()=>fh),multi:!0};let fh=(()=>{class t extends nc{constructor(t,e){super(),this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}registerOnChange(t){this.onChange=e=>{t(""==e?null:parseFloat(e))}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.H),r.Pb(r.l))},t.\u0275dir=r.Kb({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(t,e){1&t&&r.cc("input",function(t){return e.onChange(t.target.value)})("blur",function(){return e.onTouched()})},features:[r.Cb([ph]),r.Ab]}),t})(),mh=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({}),t})();const gh=new r.s("NgModelWithFormControlWarning"),Ah={provide:Tc,useExisting:Object(r.W)(()=>bh)};let bh=(()=>{class t extends Tc{constructor(t,e,i,n){super(),this._ngModelWarningConfig=n,this.update=new r.o,this._ngModelWarningSent=!1,this._setValidators(t),this._setAsyncValidators(e),this.valueAccessor=Wc(0,i)}set isDisabled(t){}ngOnChanges(t){if(this._isControlChanged(t)){const e=t.form.previousValue;e&&Bc(e,this,!1),Uc(this.form,this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this.form.updateValueAndValidity({emitEvent:!1})}$c(t,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&Bc(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_isControlChanged(t){return t.hasOwnProperty("form")}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(hc,10),r.Pb(uc,10),r.Pb(rc,10),r.Pb(gh,8))},t.\u0275dir=r.Kb({type:t,selectors:[["","formControl",""]],inputs:{isDisabled:["disabled","isDisabled"],form:["formControl","form"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[r.Cb([Ah]),r.Ab,r.Bb]}),t._ngModelWarningSentOnce=!1,t})();const vh={provide:Oc,useExisting:Object(r.W)(()=>_h)};let _h=(()=>{class t extends Oc{constructor(t,e){super(),this.validators=t,this.asyncValidators=e,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new r.o,this._setValidators(t),this._setAsyncValidators(e)}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(zc(this.form,this,!1),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){const e=this.form.get(t.path);return Uc(e,t),e.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),e}getControl(t){return this.form.get(t.path)}removeControl(t){Bc(t.control||null,t,!1),Zc(this.directives,t)}addFormGroup(t){this._setUpFormContainer(t)}removeFormGroup(t){this._cleanUpFormContainer(t)}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){this._setUpFormContainer(t)}removeFormArray(t){this._cleanUpFormContainer(t)}getFormArray(t){return this.form.get(t.path)}updateModel(t,e){this.form.get(t.path).setValue(e)}onSubmit(t){return this.submitted=!0,Gc(this.form,this.directives),this.ngSubmit.emit(t),!1}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_updateDomValue(){this.directives.forEach(t=>{const e=t.control,i=this.form.get(t.path);e!==i&&(Bc(e||null,t),i instanceof eh&&(Uc(i,t),t.control=i))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(t){const e=this.form.get(t.path);Kc(e,t),e.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(t){if(this.form){const e=this.form.get(t.path);e&&function(t,e){return zc(t,e,!1)}(e,t)&&e.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){jc(this.form,this,!1),this._oldForm&&zc(this._oldForm,this,!1)}_checkFormPresent(){}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(hc,10),r.Pb(uc,10))},t.\u0275dir=r.Kb({type:t,selectors:[["","formGroup",""]],hostBindings:function(t,e){1&t&&r.cc("submit",function(t){return e.onSubmit(t)})("reset",function(){return e.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[r.Cb([vh]),r.Ab,r.Bb]}),t})();const yh={provide:Oc,useExisting:Object(r.W)(()=>wh)};let wh=(()=>{class t extends ah{constructor(t,e,i){super(),this._parent=t,this._setValidators(e),this._setAsyncValidators(i)}_checkParentType(){Sh(this._parent)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Oc,13),r.Pb(hc,10),r.Pb(uc,10))},t.\u0275dir=r.Kb({type:t,selectors:[["","formGroupName",""]],inputs:{name:["formGroupName","name"]},features:[r.Cb([yh]),r.Ab]}),t})();const xh={provide:Oc,useExisting:Object(r.W)(()=>Ch)};let Ch=(()=>{class t extends Oc{constructor(t,e,i){super(),this._parent=t,this._setValidators(e),this._setAsyncValidators(i)}ngOnInit(){this._checkParentType(),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return Lc(null==this.name?this.name:this.name.toString(),this._parent)}_checkParentType(){Sh(this._parent)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Oc,13),r.Pb(hc,10),r.Pb(uc,10))},t.\u0275dir=r.Kb({type:t,selectors:[["","formArrayName",""]],inputs:{name:["formArrayName","name"]},features:[r.Cb([xh]),r.Ab]}),t})();function Sh(t){return!(t instanceof wh||t instanceof _h||t instanceof Ch)}const kh={provide:Tc,useExisting:Object(r.W)(()=>Eh)};let Eh=(()=>{class t extends Tc{constructor(t,e,i,n,s){super(),this._ngModelWarningConfig=s,this._added=!1,this.update=new r.o,this._ngModelWarningSent=!1,this._parent=t,this._setValidators(e),this._setAsyncValidators(i),this.valueAccessor=Wc(0,n)}set isDisabled(t){}ngOnChanges(t){this._added||this._setUpControl(),$c(t,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}get path(){return Lc(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this._added=!0}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Oc,13),r.Pb(hc,10),r.Pb(uc,10),r.Pb(rc,10),r.Pb(gh,8))},t.\u0275dir=r.Kb({type:t,selectors:[["","formControlName",""]],inputs:{isDisabled:["disabled","isDisabled"],name:["formControlName","name"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[r.Cb([kh]),r.Ab,r.Bb]}),t._ngModelWarningSentOnce=!1,t})();const Dh={provide:hc,useExisting:Object(r.W)(()=>Ih),multi:!0};let Ih=(()=>{class t{constructor(){this._required=!1}get required(){return this._required}set required(t){this._required=null!=t&&!1!==t&&"false"!=`${t}`,this._onChange&&this._onChange()}validate(t){return this.required?fc(t):null}registerOnValidatorChange(t){this._onChange=t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(t,e){2&t&&r.Eb("required",e.required?"":null)},inputs:{required:"required"},features:[r.Cb([Dh])]}),t})();const Ph={provide:hc,useExisting:Object(r.W)(()=>Oh),multi:!0};let Oh=(()=>{class t{constructor(){this._validator=Ac}ngOnChanges(t){"minlength"in t&&(this._createValidator(),this._onChange&&this._onChange())}validate(t){return null==this.minlength?null:this._validator(t)}registerOnValidatorChange(t){this._onChange=t}_createValidator(){this._validator=mc("number"==typeof this.minlength?this.minlength:parseInt(this.minlength,10))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&r.Eb("minlength",e.minlength?e.minlength:null)},inputs:{minlength:"minlength"},features:[r.Cb([Ph]),r.Bb]}),t})();const Mh={provide:hc,useExisting:Object(r.W)(()=>Th),multi:!0};let Th=(()=>{class t{constructor(){this._validator=Ac}ngOnChanges(t){"maxlength"in t&&(this._createValidator(),this._onChange&&this._onChange())}validate(t){return null!=this.maxlength?this._validator(t):null}registerOnValidatorChange(t){this._onChange=t}_createValidator(){this._validator=gc("number"==typeof this.maxlength?this.maxlength:parseInt(this.maxlength,10))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&r.Eb("maxlength",e.maxlength?e.maxlength:null)},inputs:{maxlength:"maxlength"},features:[r.Cb([Mh]),r.Bb]}),t})(),Rh=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[mh]]}),t})(),Vh=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[Rh]}),t})(),Fh=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:gh,useValue:e.warnOnNgModelWithFormControl}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[Rh]}),t})(),Lh=(()=>{class t{group(t,e=null){const i=this._reduceControls(t);let n,r=null,s=null;return null!=e&&(function(t){return void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn}(e)?(r=null!=e.validators?e.validators:null,s=null!=e.asyncValidators?e.asyncValidators:null,n=null!=e.updateOn?e.updateOn:void 0):(r=null!=e.validator?e.validator:null,s=null!=e.asyncValidator?e.asyncValidator:null)),new ih(i,{asyncValidators:s,updateOn:n,validators:r})}control(t,e,i){return new eh(t,e,i)}array(t,e,i){const n=t.map(t=>this._createControl(t));return new nh(n,e,i)}_reduceControls(t){const e={};return Object.keys(t).forEach(i=>{e[i]=this._createControl(t[i])}),e}_createControl(t){return t instanceof eh||t instanceof ih||t instanceof nh?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(r.Lb)({factory:function(){return new t},token:t,providedIn:Fh}),t})();const Uh=["underline"],Bh=["connectionContainer"],Nh=["inputContainer"],jh=["label"];function zh(t,e){1&t&&(r.Tb(0),r.Vb(1,"div",14),r.Qb(2,"div",15),r.Qb(3,"div",16),r.Qb(4,"div",17),r.Ub(),r.Vb(5,"div",18),r.Qb(6,"div",15),r.Qb(7,"div",16),r.Qb(8,"div",17),r.Ub(),r.Sb())}function Hh(t,e){1&t&&(r.Vb(0,"div",19),r.lc(1,1),r.Ub())}function Kh(t,e){if(1&t&&(r.Tb(0),r.lc(1,2),r.Vb(2,"span"),r.Kc(3),r.Ub(),r.Sb()),2&t){const t=r.gc(2);r.Db(3),r.Lc(t._control.placeholder)}}function $h(t,e){1&t&&r.lc(0,3,["*ngSwitchCase","true"])}function Gh(t,e){1&t&&(r.Vb(0,"span",23),r.Kc(1," *"),r.Ub())}function Wh(t,e){if(1&t){const t=r.Wb();r.Vb(0,"label",20,21),r.cc("cdkObserveContent",function(){return r.Ac(t),r.gc().updateOutlineGap()}),r.Ic(2,Kh,4,1,"ng-container",12),r.Ic(3,$h,1,0,"ng-content",12),r.Ic(4,Gh,2,0,"span",22),r.Ub()}if(2&t){const t=r.gc();r.Hb("mat-empty",t._control.empty&&!t._shouldAlwaysFloat())("mat-form-field-empty",t._control.empty&&!t._shouldAlwaysFloat())("mat-accent","accent"==t.color)("mat-warn","warn"==t.color),r.nc("cdkObserveContentDisabled","outline"!=t.appearance)("id",t._labelId)("ngSwitch",t._hasLabel()),r.Eb("for",t._control.id)("aria-owns",t._control.id),r.Db(2),r.nc("ngSwitchCase",!1),r.Db(1),r.nc("ngSwitchCase",!0),r.Db(1),r.nc("ngIf",!t.hideRequiredMarker&&t._control.required&&!t._control.disabled)}}function Zh(t,e){1&t&&(r.Vb(0,"div",24),r.lc(1,4),r.Ub())}function qh(t,e){if(1&t&&(r.Vb(0,"div",25,26),r.Qb(2,"span",27),r.Ub()),2&t){const t=r.gc();r.Db(2),r.Hb("mat-accent","accent"==t.color)("mat-warn","warn"==t.color)}}function Yh(t,e){if(1&t&&(r.Vb(0,"div"),r.lc(1,5),r.Ub()),2&t){const t=r.gc();r.nc("@transitionMessages",t._subscriptAnimationState)}}function Qh(t,e){if(1&t&&(r.Vb(0,"div",31),r.Kc(1),r.Ub()),2&t){const t=r.gc(2);r.nc("id",t._hintLabelId),r.Db(1),r.Lc(t.hintLabel)}}function Xh(t,e){if(1&t&&(r.Vb(0,"div",28),r.Ic(1,Qh,2,2,"div",29),r.lc(2,6),r.Qb(3,"div",30),r.lc(4,7),r.Ub()),2&t){const t=r.gc();r.nc("@transitionMessages",t._subscriptAnimationState),r.Db(1),r.nc("ngIf",t.hintLabel)}}const Jh=["*",[["","matPrefix",""]],[["mat-placeholder"]],[["mat-label"]],[["","matSuffix",""]],[["mat-error"]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],tu=["*","[matPrefix]","mat-placeholder","mat-label","[matSuffix]","mat-error","mat-hint:not([align='end'])","mat-hint[align='end']"];let eu=0;const iu=new r.s("MatError");let nu=(()=>{class t{constructor(){this.id="mat-error-"+eu++}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["mat-error"]],hostAttrs:["role","alert",1,"mat-error"],hostVars:1,hostBindings:function(t,e){2&t&&r.Eb("id",e.id)},inputs:{id:"id"},features:[r.Cb([{provide:iu,useExisting:t}])]}),t})();const ru={transitionMessages:$r("transitionMessages",[qr("enter",Zr({opacity:1,transform:"translateY(0%)"})),Qr("void => enter",[Zr({opacity:0,transform:"translateY(-5px)"}),Gr("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let su=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t}),t})(),ou=0;const au=new r.s("MatHint");let lu=(()=>{class t{constructor(){this.align="start",this.id="mat-hint-"+ou++}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["mat-hint"]],hostAttrs:[1,"mat-hint"],hostVars:4,hostBindings:function(t,e){2&t&&(r.Eb("id",e.id)("align",null),r.Hb("mat-form-field-hint-end","end"===e.align))},inputs:{align:"align",id:"id"},features:[r.Cb([{provide:au,useExisting:t}])]}),t})(),cu=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["mat-label"]]}),t})(),hu=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["mat-placeholder"]]}),t})();const uu=new r.s("MatPrefix");let du=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","matPrefix",""]],features:[r.Cb([{provide:uu,useExisting:t}])]}),t})();const pu=new r.s("MatSuffix");let fu=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","matSuffix",""]],features:[r.Cb([{provide:pu,useExisting:t}])]}),t})(),mu=0;class gu{constructor(t){this._elementRef=t}}const Au=Ea(gu,"primary"),bu=new r.s("MAT_FORM_FIELD_DEFAULT_OPTIONS"),vu=new r.s("MatFormField");let _u=(()=>{class t extends Au{constructor(t,e,i,n,r,s,o,a){super(t),this._elementRef=t,this._changeDetectorRef=e,this._dir=n,this._defaults=r,this._platform=s,this._ngZone=o,this._outlineGapCalculationNeededImmediately=!1,this._outlineGapCalculationNeededOnStable=!1,this._destroyed=new _e.a,this._showAlwaysAnimate=!1,this._subscriptAnimationState="",this._hintLabel="",this._hintLabelId="mat-hint-"+mu++,this._labelId="mat-form-field-label-"+mu++,this.floatLabel=this._getDefaultFloatLabelState(),this._animationsEnabled="NoopAnimations"!==a,this.appearance=r&&r.appearance?r.appearance:"legacy",this._hideRequiredMarker=!(!r||null==r.hideRequiredMarker)&&r.hideRequiredMarker}get appearance(){return this._appearance}set appearance(t){const e=this._appearance;this._appearance=t||this._defaults&&this._defaults.appearance||"legacy","outline"===this._appearance&&e!==t&&(this._outlineGapCalculationNeededOnStable=!0)}get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(t){this._hideRequiredMarker=ti(t)}_shouldAlwaysFloat(){return"always"===this.floatLabel&&!this._showAlwaysAnimate}_canLabelFloat(){return"never"!==this.floatLabel}get hintLabel(){return this._hintLabel}set hintLabel(t){this._hintLabel=t,this._processHints()}get floatLabel(){return"legacy"!==this.appearance&&"never"===this._floatLabel?"auto":this._floatLabel}set floatLabel(t){t!==this._floatLabel&&(this._floatLabel=t||this._getDefaultFloatLabelState(),this._changeDetectorRef.markForCheck())}get _control(){return this._explicitFormFieldControl||this._controlNonStatic||this._controlStatic}set _control(t){this._explicitFormFieldControl=t}getLabelId(){return this._hasFloatingLabel()?this._labelId:null}getConnectedOverlayOrigin(){return this._connectionContainerRef||this._elementRef}ngAfterContentInit(){this._validateControlChild();const t=this._control;t.controlType&&this._elementRef.nativeElement.classList.add(`mat-form-field-type-${t.controlType}`),t.stateChanges.pipe(Pn(null)).subscribe(()=>{this._validatePlaceholders(),this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),t.ngControl&&t.ngControl.valueChanges&&t.ngControl.valueChanges.pipe(Sn(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe(Sn(this._destroyed)).subscribe(()=>{this._outlineGapCalculationNeededOnStable&&this.updateOutlineGap()})}),Object(or.a)(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._outlineGapCalculationNeededOnStable=!0,this._changeDetectorRef.markForCheck()}),this._hintChildren.changes.pipe(Pn(null)).subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.pipe(Pn(null)).subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._dir&&this._dir.change.pipe(Sn(this._destroyed)).subscribe(()=>{"function"==typeof requestAnimationFrame?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this.updateOutlineGap())}):this.updateOutlineGap()})}ngAfterContentChecked(){this._validateControlChild(),this._outlineGapCalculationNeededImmediately&&this.updateOutlineGap()}ngAfterViewInit(){this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_shouldForward(t){const e=this._control?this._control.ngControl:null;return e&&e[t]}_hasPlaceholder(){return!!(this._control&&this._control.placeholder||this._placeholderChild)}_hasLabel(){return!(!this._labelChildNonStatic&&!this._labelChildStatic)}_shouldLabelFloat(){return this._canLabelFloat()&&(this._control&&this._control.shouldLabelFloat||this._shouldAlwaysFloat())}_hideControlPlaceholder(){return"legacy"===this.appearance&&!this._hasLabel()||this._hasLabel()&&!this._shouldLabelFloat()}_hasFloatingLabel(){return this._hasLabel()||"legacy"===this.appearance&&this._hasPlaceholder()}_getDisplayedMessages(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_animateAndLockLabel(){this._hasFloatingLabel()&&this._canLabelFloat()&&(this._animationsEnabled&&this._label&&(this._showAlwaysAnimate=!0,en(this._label.nativeElement,"transitionend").pipe(Qe(1)).subscribe(()=>{this._showAlwaysAnimate=!1})),this.floatLabel="always",this._changeDetectorRef.markForCheck())}_validatePlaceholders(){}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){}_getDefaultFloatLabelState(){return this._defaults&&this._defaults.floatLabel||"auto"}_syncDescribedByIds(){if(this._control){let t=[];if(this._control.userAriaDescribedBy&&"string"==typeof this._control.userAriaDescribedBy&&t.push(...this._control.userAriaDescribedBy.split(" ")),"hint"===this._getDisplayedMessages()){const e=this._hintChildren?this._hintChildren.find(t=>"start"===t.align):null,i=this._hintChildren?this._hintChildren.find(t=>"end"===t.align):null;e?t.push(e.id):this._hintLabel&&t.push(this._hintLabelId),i&&t.push(i.id)}else this._errorChildren&&t.push(...this._errorChildren.map(t=>t.id));this._control.setDescribedByIds(t)}}_validateControlChild(){}updateOutlineGap(){const t=this._label?this._label.nativeElement:null;if("outline"!==this.appearance||!t||!t.children.length||!t.textContent.trim())return;if(!this._platform.isBrowser)return;if(!this._isAttachedToDOM())return void(this._outlineGapCalculationNeededImmediately=!0);let e=0,i=0;const n=this._connectionContainerRef.nativeElement,r=n.querySelectorAll(".mat-form-field-outline-start"),s=n.querySelectorAll(".mat-form-field-outline-gap");if(this._label&&this._label.nativeElement.children.length){const r=n.getBoundingClientRect();if(0===r.width&&0===r.height)return this._outlineGapCalculationNeededOnStable=!0,void(this._outlineGapCalculationNeededImmediately=!1);const s=this._getStartEnd(r),o=t.children,a=this._getStartEnd(o[0].getBoundingClientRect());let l=0;for(let t=0;t<o.length;t++)l+=o[t].offsetWidth;e=Math.abs(a-s)-5,i=l>0?.75*l+10:0}for(let o=0;o<r.length;o++)r[o].style.width=`${e}px`;for(let o=0;o<s.length;o++)s[o].style.width=`${i}px`;this._outlineGapCalculationNeededOnStable=this._outlineGapCalculationNeededImmediately=!1}_getStartEnd(t){return this._dir&&"rtl"===this._dir.value?t.right:t.left}_isAttachedToDOM(){const t=this._elementRef.nativeElement;if(t.getRootNode){const e=t.getRootNode();return e&&e!==t}return document.documentElement.contains(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.h),r.Pb(r.l),r.Pb(Zn,8),r.Pb(bu,8),r.Pb(ci),r.Pb(r.B),r.Pb(pa,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-form-field"]],contentQueries:function(t,e,i){if(1&t&&(r.Ib(i,su,1),r.Ib(i,su,3),r.Ib(i,cu,1),r.Ib(i,cu,3),r.Ib(i,hu,1),r.Ib(i,iu,1),r.Ib(i,au,1),r.Ib(i,uu,1),r.Ib(i,pu,1)),2&t){let t;r.vc(t=r.dc())&&(e._controlNonStatic=t.first),r.vc(t=r.dc())&&(e._controlStatic=t.first),r.vc(t=r.dc())&&(e._labelChildNonStatic=t.first),r.vc(t=r.dc())&&(e._labelChildStatic=t.first),r.vc(t=r.dc())&&(e._placeholderChild=t.first),r.vc(t=r.dc())&&(e._errorChildren=t),r.vc(t=r.dc())&&(e._hintChildren=t),r.vc(t=r.dc())&&(e._prefixChildren=t),r.vc(t=r.dc())&&(e._suffixChildren=t)}},viewQuery:function(t,e){if(1&t&&(r.Pc(Uh,1),r.Pc(Bh,3),r.Pc(Nh,1),r.Pc(jh,1)),2&t){let t;r.vc(t=r.dc())&&(e.underlineRef=t.first),r.vc(t=r.dc())&&(e._connectionContainerRef=t.first),r.vc(t=r.dc())&&(e._inputContainerRef=t.first),r.vc(t=r.dc())&&(e._label=t.first)}},hostAttrs:[1,"mat-form-field"],hostVars:44,hostBindings:function(t,e){2&t&&r.Hb("mat-form-field-appearance-standard","standard"==e.appearance)("mat-form-field-appearance-fill","fill"==e.appearance)("mat-form-field-appearance-outline","outline"==e.appearance)("mat-form-field-appearance-legacy","legacy"==e.appearance)("mat-form-field-invalid",e._control.errorState)("mat-form-field-can-float",e._canLabelFloat())("mat-form-field-should-float",e._shouldLabelFloat())("mat-form-field-has-label",e._hasFloatingLabel())("mat-form-field-hide-placeholder",e._hideControlPlaceholder())("mat-form-field-disabled",e._control.disabled)("mat-form-field-autofilled",e._control.autofilled)("mat-focused",e._control.focused)("mat-accent","accent"==e.color)("mat-warn","warn"==e.color)("ng-untouched",e._shouldForward("untouched"))("ng-touched",e._shouldForward("touched"))("ng-pristine",e._shouldForward("pristine"))("ng-dirty",e._shouldForward("dirty"))("ng-valid",e._shouldForward("valid"))("ng-invalid",e._shouldForward("invalid"))("ng-pending",e._shouldForward("pending"))("_mat-animation-noopable",!e._animationsEnabled)},inputs:{color:"color",floatLabel:"floatLabel",appearance:"appearance",hideRequiredMarker:"hideRequiredMarker",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[r.Cb([{provide:vu,useExisting:t}]),r.Ab],ngContentSelectors:tu,decls:15,vars:8,consts:[[1,"mat-form-field-wrapper"],[1,"mat-form-field-flex",3,"click"],["connectionContainer",""],[4,"ngIf"],["class","mat-form-field-prefix",4,"ngIf"],[1,"mat-form-field-infix"],["inputContainer",""],[1,"mat-form-field-label-wrapper"],["class","mat-form-field-label",3,"cdkObserveContentDisabled","id","mat-empty","mat-form-field-empty","mat-accent","mat-warn","ngSwitch","cdkObserveContent",4,"ngIf"],["class","mat-form-field-suffix",4,"ngIf"],["class","mat-form-field-underline",4,"ngIf"],[1,"mat-form-field-subscript-wrapper",3,"ngSwitch"],[4,"ngSwitchCase"],["class","mat-form-field-hint-wrapper",4,"ngSwitchCase"],[1,"mat-form-field-outline"],[1,"mat-form-field-outline-start"],[1,"mat-form-field-outline-gap"],[1,"mat-form-field-outline-end"],[1,"mat-form-field-outline","mat-form-field-outline-thick"],[1,"mat-form-field-prefix"],[1,"mat-form-field-label",3,"cdkObserveContentDisabled","id","ngSwitch","cdkObserveContent"],["label",""],["class","mat-placeholder-required mat-form-field-required-marker","aria-hidden","true",4,"ngIf"],["aria-hidden","true",1,"mat-placeholder-required","mat-form-field-required-marker"],[1,"mat-form-field-suffix"],[1,"mat-form-field-underline"],["underline",""],[1,"mat-form-field-ripple"],[1,"mat-form-field-hint-wrapper"],["class","mat-hint",3,"id",4,"ngIf"],[1,"mat-form-field-hint-spacer"],[1,"mat-hint",3,"id"]],template:function(t,e){1&t&&(r.mc(Jh),r.Vb(0,"div",0),r.Vb(1,"div",1,2),r.cc("click",function(t){return e._control.onContainerClick&&e._control.onContainerClick(t)}),r.Ic(3,zh,9,0,"ng-container",3),r.Ic(4,Hh,2,0,"div",4),r.Vb(5,"div",5,6),r.lc(7),r.Vb(8,"span",7),r.Ic(9,Wh,5,16,"label",8),r.Ub(),r.Ub(),r.Ic(10,Zh,2,0,"div",9),r.Ub(),r.Ic(11,qh,3,4,"div",10),r.Vb(12,"div",11),r.Ic(13,Yh,2,1,"div",12),r.Ic(14,Xh,5,2,"div",13),r.Ub(),r.Ub()),2&t&&(r.Db(3),r.nc("ngIf","outline"==e.appearance),r.Db(1),r.nc("ngIf",e._prefixChildren.length),r.Db(5),r.nc("ngIf",e._hasFloatingLabel()),r.Db(1),r.nc("ngIf",e._suffixChildren.length),r.Db(1),r.nc("ngIf","outline"!=e.appearance),r.Db(1),r.nc("ngSwitch",e._getDisplayedMessages()),r.Db(1),r.nc("ngSwitchCase","error"),r.Db(1),r.nc("ngSwitchCase","hint"))},directives:[ut,mt,gt,xi],styles:[".mat-form-field{display:inline-block;position:relative;text-align:left}[dir=rtl] .mat-form-field{text-align:right}.mat-form-field-wrapper{position:relative}.mat-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-form-field-prefix,.mat-form-field-suffix{white-space:nowrap;flex:none;position:relative}.mat-form-field-infix{display:block;position:relative;flex:auto;min-width:0;width:180px}.cdk-high-contrast-active .mat-form-field-infix{border-image:linear-gradient(transparent, transparent)}.mat-form-field-label-wrapper{position:absolute;left:0;box-sizing:content-box;width:100%;height:100%;overflow:hidden;pointer-events:none}[dir=rtl] .mat-form-field-label-wrapper{left:auto;right:0}.mat-form-field-label{position:absolute;left:0;font:inherit;pointer-events:none;width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;transform-origin:0 0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),width 400ms cubic-bezier(0.25, 0.8, 0.25, 1);display:none}[dir=rtl] .mat-form-field-label{transform-origin:100% 0;left:auto;right:0}.mat-form-field-empty.mat-form-field-label,.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label{display:block}.mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:block;transition:none}.mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-form-field-can-float .mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:block}.mat-form-field-label:not(.mat-form-field-empty){transition:none}.mat-form-field-underline{position:absolute;width:100%;pointer-events:none;transform:scale3d(1, 1.0001, 1)}.mat-form-field-ripple{position:absolute;left:0;width:100%;transform-origin:50%;transform:scaleX(0.5);opacity:0;transition:background-color 300ms cubic-bezier(0.55, 0, 0.55, 0.2)}.mat-form-field.mat-focused .mat-form-field-ripple,.mat-form-field.mat-form-field-invalid .mat-form-field-ripple{opacity:1;transform:none;transition:transform 300ms cubic-bezier(0.25, 0.8, 0.25, 1),opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 300ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-subscript-wrapper{position:absolute;box-sizing:border-box;width:100%;overflow:hidden}.mat-form-field-subscript-wrapper .mat-icon,.mat-form-field-label-wrapper .mat-icon{width:1em;height:1em;font-size:inherit;vertical-align:baseline}.mat-form-field-hint-wrapper{display:flex}.mat-form-field-hint-spacer{flex:1 0 1em}.mat-error{display:block}.mat-form-field-control-wrapper{position:relative}.mat-form-field-hint-end{order:1}.mat-form-field._mat-animation-noopable .mat-form-field-label,.mat-form-field._mat-animation-noopable .mat-form-field-ripple{transition:none}\n",'.mat-form-field-appearance-fill .mat-form-field-flex{border-radius:4px 4px 0 0;padding:.75em .75em 0 .75em}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-flex{outline:solid 1px}.mat-form-field-appearance-fill .mat-form-field-underline::before{content:"";display:block;position:absolute;bottom:0;height:1px;width:100%}.mat-form-field-appearance-fill .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-fill:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-fill._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}.mat-form-field-appearance-fill .mat-form-field-subscript-wrapper{padding:0 1em}\n','.mat-input-element{font:inherit;background:transparent;color:currentColor;border:none;outline:none;padding:0;margin:0;width:100%;max-width:100%;vertical-align:bottom;text-align:inherit;box-sizing:content-box}.mat-input-element:-moz-ui-invalid{box-shadow:none}.mat-input-element::-ms-clear,.mat-input-element::-ms-reveal{display:none}.mat-input-element,.mat-input-element::-webkit-search-cancel-button,.mat-input-element::-webkit-search-decoration,.mat-input-element::-webkit-search-results-button,.mat-input-element::-webkit-search-results-decoration{-webkit-appearance:none}.mat-input-element::-webkit-contacts-auto-fill-button,.mat-input-element::-webkit-caps-lock-indicator,.mat-input-element::-webkit-credentials-auto-fill-button{visibility:hidden}.mat-input-element[type=date],.mat-input-element[type=datetime],.mat-input-element[type=datetime-local],.mat-input-element[type=month],.mat-input-element[type=week],.mat-input-element[type=time]{line-height:1}.mat-input-element[type=date]::after,.mat-input-element[type=datetime]::after,.mat-input-element[type=datetime-local]::after,.mat-input-element[type=month]::after,.mat-input-element[type=week]::after,.mat-input-element[type=time]::after{content:" ";white-space:pre;width:1px}.mat-input-element::-webkit-inner-spin-button,.mat-input-element::-webkit-calendar-picker-indicator,.mat-input-element::-webkit-clear-button{font-size:.75em}.mat-input-element::placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element::-moz-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-moz-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element::-webkit-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-webkit-input-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element:-ms-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element:-ms-input-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-form-field-hide-placeholder .mat-input-element::placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element::-moz-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element::-webkit-input-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element:-ms-input-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}textarea.mat-input-element{resize:vertical;overflow:auto}textarea.mat-input-element.cdk-textarea-autosize{resize:none}textarea.mat-input-element{padding:2px 0;margin:-2px 0}select.mat-input-element{-moz-appearance:none;-webkit-appearance:none;position:relative;background-color:transparent;display:inline-flex;box-sizing:border-box;padding-top:1em;top:-1em;margin-bottom:-1em}select.mat-input-element::-ms-expand{display:none}select.mat-input-element::-moz-focus-inner{border:0}select.mat-input-element:not(:disabled){cursor:pointer}select.mat-input-element::-ms-value{color:inherit;background:none}.mat-focused .cdk-high-contrast-active select.mat-input-element::-ms-value{color:inherit}.mat-form-field-type-mat-native-select .mat-form-field-infix::after{content:"";width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;position:absolute;top:50%;right:0;margin-top:-2.5px;pointer-events:none}[dir=rtl] .mat-form-field-type-mat-native-select .mat-form-field-infix::after{right:auto;left:0}.mat-form-field-type-mat-native-select .mat-input-element{padding-right:15px}[dir=rtl] .mat-form-field-type-mat-native-select .mat-input-element{padding-right:0;padding-left:15px}.mat-form-field-type-mat-native-select .mat-form-field-label-wrapper{max-width:calc(100% - 10px)}.mat-form-field-type-mat-native-select.mat-form-field-appearance-outline .mat-form-field-infix::after{margin-top:-5px}.mat-form-field-type-mat-native-select.mat-form-field-appearance-fill .mat-form-field-infix::after{margin-top:-10px}\n',".mat-form-field-appearance-legacy .mat-form-field-label{transform:perspective(100px);-ms-transform:none}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon{width:1em}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button{font:inherit;vertical-align:baseline}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button .mat-icon{font-size:inherit}.mat-form-field-appearance-legacy .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-legacy .mat-form-field-ripple{top:0;height:2px;overflow:hidden}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}.cdk-high-contrast-active .mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-legacy.mat-form-field-invalid:not(.mat-focused) .mat-form-field-ripple{height:1px}\n",".mat-form-field-appearance-outline .mat-form-field-wrapper{margin:.25em 0}.mat-form-field-appearance-outline .mat-form-field-flex{padding:0 .75em 0 .75em;margin-top:-0.25em;position:relative}.mat-form-field-appearance-outline .mat-form-field-prefix,.mat-form-field-appearance-outline .mat-form-field-suffix{top:.25em}.mat-form-field-appearance-outline .mat-form-field-outline{display:flex;position:absolute;top:.25em;left:0;right:0;bottom:0;pointer-events:none}.mat-form-field-appearance-outline .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-end{border:1px solid currentColor;min-width:5px}.mat-form-field-appearance-outline .mat-form-field-outline-start{border-radius:5px 0 0 5px;border-right-style:none}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-start{border-right-style:solid;border-left-style:none;border-radius:0 5px 5px 0}.mat-form-field-appearance-outline .mat-form-field-outline-end{border-radius:0 5px 5px 0;border-left-style:none;flex-grow:1}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-end{border-left-style:solid;border-right-style:none;border-radius:5px 0 0 5px}.mat-form-field-appearance-outline .mat-form-field-outline-gap{border-radius:.000001px;border:1px solid currentColor;border-left-style:none;border-right-style:none}.mat-form-field-appearance-outline.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-outline-gap{border-top-color:transparent}.mat-form-field-appearance-outline .mat-form-field-outline-thick{opacity:0}.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-end,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-gap{border-width:2px}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline{opacity:0;transition:opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline{opacity:0;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline .mat-form-field-subscript-wrapper{padding:0 1em}.mat-form-field-appearance-outline._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-start,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-end,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-gap{transition:none}\n",".mat-form-field-appearance-standard .mat-form-field-flex{padding-top:.75em}.mat-form-field-appearance-standard .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-standard .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}.cdk-high-contrast-active .mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-standard:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-standard._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}\n"],encapsulation:2,data:{animation:[ru.transitionMessages]},changeDetection:0}),t})(),yu=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Et,Sa,Ci],Sa]}),t})();const wu=Ai({passive:!0});let xu=(()=>{class t{constructor(t,e){this._platform=t,this._ngZone=e,this._monitoredElements=new Map}monitor(t){if(!this._platform.isBrowser)return qe;const e=si(t),i=this._monitoredElements.get(e);if(i)return i.subject;const n=new _e.a,r="cdk-text-field-autofilled",s=t=>{"cdk-text-field-autofill-start"!==t.animationName||e.classList.contains(r)?"cdk-text-field-autofill-end"===t.animationName&&e.classList.contains(r)&&(e.classList.remove(r),this._ngZone.run(()=>n.next({target:t.target,isAutofilled:!1}))):(e.classList.add(r),this._ngZone.run(()=>n.next({target:t.target,isAutofilled:!0})))};return this._ngZone.runOutsideAngular(()=>{e.addEventListener("animationstart",s,wu),e.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(e,{subject:n,unlisten:()=>{e.removeEventListener("animationstart",s,wu)}}),n}stopMonitoring(t){const e=si(t),i=this._monitoredElements.get(e);i&&(i.unlisten(),i.subject.complete(),e.classList.remove("cdk-text-field-autofill-monitored"),e.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(e))}ngOnDestroy(){this._monitoredElements.forEach((t,e)=>this.stopMonitoring(e))}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(ci),r.Zb(r.B))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(ci),Object(r.Zb)(r.B))},token:t,providedIn:"root"}),t})(),Cu=(()=>{class t{constructor(t,e,i,n){this._elementRef=t,this._platform=e,this._ngZone=i,this._destroyed=new _e.a,this._enabled=!0,this._previousMinRows=-1,this._document=n,this._textareaElement=this._elementRef.nativeElement,this._measuringClass=e.FIREFOX?"cdk-textarea-autosize-measuring-firefox":"cdk-textarea-autosize-measuring"}get minRows(){return this._minRows}set minRows(t){this._minRows=ei(t),this._setMinHeight()}get maxRows(){return this._maxRows}set maxRows(t){this._maxRows=ei(t),this._setMaxHeight()}get enabled(){return this._enabled}set enabled(t){t=ti(t),this._enabled!==t&&((this._enabled=t)?this.resizeToFitContent(!0):this.reset())}_setMinHeight(){const t=this.minRows&&this._cachedLineHeight?this.minRows*this._cachedLineHeight+"px":null;t&&(this._textareaElement.style.minHeight=t)}_setMaxHeight(){const t=this.maxRows&&this._cachedLineHeight?this.maxRows*this._cachedLineHeight+"px":null;t&&(this._textareaElement.style.maxHeight=t)}ngAfterViewInit(){this._platform.isBrowser&&(this._initialHeight=this._textareaElement.style.height,this.resizeToFitContent(),this._ngZone.runOutsideAngular(()=>{en(this._getWindow(),"resize").pipe(Cn(16),Sn(this._destroyed)).subscribe(()=>this.resizeToFitContent(!0))}))}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_cacheTextareaLineHeight(){if(this._cachedLineHeight)return;let t=this._textareaElement.cloneNode(!1);t.rows=1,t.style.position="absolute",t.style.visibility="hidden",t.style.border="none",t.style.padding="0",t.style.height="",t.style.minHeight="",t.style.maxHeight="",t.style.overflow="hidden",this._textareaElement.parentNode.appendChild(t),this._cachedLineHeight=t.clientHeight,this._textareaElement.parentNode.removeChild(t),this._setMinHeight(),this._setMaxHeight()}ngDoCheck(){this._platform.isBrowser&&this.resizeToFitContent()}resizeToFitContent(t=!1){if(!this._enabled)return;if(this._cacheTextareaLineHeight(),!this._cachedLineHeight)return;const e=this._elementRef.nativeElement,i=e.value;if(!t&&this._minRows===this._previousMinRows&&i===this._previousValue)return;const n=e.placeholder;e.classList.add(this._measuringClass),e.placeholder="",e.style.height=e.scrollHeight-4+"px",e.classList.remove(this._measuringClass),e.placeholder=n,this._ngZone.runOutsideAngular(()=>{"undefined"!=typeof requestAnimationFrame?requestAnimationFrame(()=>this._scrollToCaretPosition(e)):setTimeout(()=>this._scrollToCaretPosition(e))}),this._previousValue=i,this._previousMinRows=this._minRows}reset(){void 0!==this._initialHeight&&(this._textareaElement.style.height=this._initialHeight)}_noopInputHandler(){}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_scrollToCaretPosition(t){const{selectionStart:e,selectionEnd:i}=t,n=this._getDocument();this._destroyed.isStopped||n.activeElement!==t||t.setSelectionRange(e,i)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(ci),r.Pb(r.B),r.Pb(a,8))},t.\u0275dir=r.Kb({type:t,selectors:[["textarea","cdkTextareaAutosize",""]],hostAttrs:["rows","1",1,"cdk-textarea-autosize"],hostBindings:function(t,e){1&t&&r.cc("input",function(){return e._noopInputHandler()})},inputs:{minRows:["cdkAutosizeMinRows","minRows"],maxRows:["cdkAutosizeMaxRows","maxRows"],enabled:["cdkTextareaAutosize","enabled"]},exportAs:["cdkTextareaAutosize"]}),t})(),Su=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[hi]]}),t})();const ku=new r.s("MAT_INPUT_VALUE_ACCESSOR"),Eu=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let Du=0;class Iu{constructor(t,e,i,n){this._defaultErrorStateMatcher=t,this._parentForm=e,this._parentFormGroup=i,this.ngControl=n}}const Pu=Pa(Iu);let Ou=(()=>{class t extends Pu{constructor(t,e,i,n,r,s,o,a,l,c){super(s,n,r,i),this._elementRef=t,this._platform=e,this.ngControl=i,this._autofillMonitor=a,this._formField=c,this._uid="mat-input-"+Du++,this.focused=!1,this.stateChanges=new _e.a,this.controlType="mat-input",this.autofilled=!1,this._disabled=!1,this._required=!1,this._type="text",this._readonly=!1,this._neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(t=>di().has(t));const h=this._elementRef.nativeElement,u=h.nodeName.toLowerCase();this._inputValueAccessor=o||h,this._previousNativeValue=this.value,this.id=this.id,e.IOS&&l.runOutsideAngular(()=>{t.nativeElement.addEventListener("keyup",t=>{let e=t.target;e.value||e.selectionStart||e.selectionEnd||(e.setSelectionRange(1,1),e.setSelectionRange(0,0))})}),this._isServer=!this._platform.isBrowser,this._isNativeSelect="select"===u,this._isTextarea="textarea"===u,this._isNativeSelect&&(this.controlType=h.multiple?"mat-native-select-multiple":"mat-native-select")}get disabled(){return this.ngControl&&null!==this.ngControl.disabled?this.ngControl.disabled:this._disabled}set disabled(t){this._disabled=ti(t),this.focused&&(this.focused=!1,this.stateChanges.next())}get id(){return this._id}set id(t){this._id=t||this._uid}get required(){return this._required}set required(t){this._required=ti(t)}get type(){return this._type}set type(t){this._type=t||"text",this._validateType(),!this._isTextarea&&di().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}get value(){return this._inputValueAccessor.value}set value(t){t!==this.value&&(this._inputValueAccessor.value=t,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(t){this._readonly=ti(t)}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(t=>{this.autofilled=t.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement)}ngDoCheck(){this.ngControl&&this.updateErrorState(),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(t){this._elementRef.nativeElement.focus(t)}_focusChanged(t){t===this.focused||this.readonly&&t||(this.focused=t,this.stateChanges.next())}_onInput(){}_dirtyCheckPlaceholder(){var t,e;const i=(null===(e=null===(t=this._formField)||void 0===t?void 0:t._hideControlPlaceholder)||void 0===e?void 0:e.call(t))?null:this.placeholder;if(i!==this._previousPlaceholder){const t=this._elementRef.nativeElement;this._previousPlaceholder=i,i?t.setAttribute("placeholder",i):t.removeAttribute("placeholder")}}_dirtyCheckNativeValue(){const t=this._elementRef.nativeElement.value;this._previousNativeValue!==t&&(this._previousNativeValue=t,this.stateChanges.next())}_validateType(){Eu.indexOf(this._type)}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let t=this._elementRef.nativeElement.validity;return t&&t.badInput}get empty(){return!(this._isNeverEmpty()||this._elementRef.nativeElement.value||this._isBadInput()||this.autofilled)}get shouldLabelFloat(){if(this._isNativeSelect){const t=this._elementRef.nativeElement,e=t.options[0];return this.focused||t.multiple||!this.empty||!!(t.selectedIndex>-1&&e&&e.label)}return this.focused||!this.empty}setDescribedByIds(t){t.length?this._elementRef.nativeElement.setAttribute("aria-describedby",t.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(ci),r.Pb(Tc,10),r.Pb(oh,8),r.Pb(_h,8),r.Pb($a),r.Pb(ku,10),r.Pb(xu),r.Pb(r.B),r.Pb(vu,8))},t.\u0275dir=r.Kb({type:t,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-input-element","mat-form-field-autofill-control"],hostVars:9,hostBindings:function(t,e){1&t&&r.cc("focus",function(){return e._focusChanged(!0)})("blur",function(){return e._focusChanged(!1)})("input",function(){return e._onInput()}),2&t&&(r.Yb("disabled",e.disabled)("required",e.required),r.Eb("id",e.id)("data-placeholder",e.placeholder)("readonly",e.readonly&&!e._isNativeSelect||null)("aria-invalid",e.errorState&&!e.empty)("aria-required",e.required),r.Hb("mat-input-server",e._isServer))},inputs:{id:"id",disabled:"disabled",required:"required",type:"type",value:"value",readonly:"readonly",placeholder:"placeholder",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"]},exportAs:["matInput"],features:[r.Cb([{provide:su,useExisting:t}]),r.Ab,r.Bb]}),t})(),Mu=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[$a],imports:[[Su,yu,Sa],Su,yu]}),t})();const Tu=["mat-calendar-body",""];function Ru(t,e){if(1&t&&(r.Vb(0,"tr",2),r.Vb(1,"td",3),r.Kc(2),r.Ub(),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Fc("padding-top",t._cellPadding)("padding-bottom",t._cellPadding),r.Eb("colspan",t.numCols),r.Db(1),r.Mc(" ",t.label," ")}}function Vu(t,e){if(1&t&&(r.Vb(0,"td",7),r.Kc(1),r.Ub()),2&t){const t=r.gc(2);r.Fc("padding-top",t._cellPadding)("padding-bottom",t._cellPadding),r.Eb("colspan",t._firstRowOffset),r.Db(1),r.Mc(" ",t._firstRowOffset>=t.labelMinRequiredCells?t.label:""," ")}}function Fu(t,e){if(1&t){const t=r.Wb();r.Vb(0,"td",8),r.cc("click",function(i){r.Ac(t);const n=e.$implicit;return r.gc(2)._cellClicked(n,i)}),r.Vb(1,"div",9),r.Kc(2),r.Ub(),r.Qb(3,"div",10),r.Ub()}if(2&t){const t=e.$implicit,i=e.index,n=r.gc().index,s=r.gc();r.Fc("width",s._cellWidth)("padding-top",s._cellPadding)("padding-bottom",s._cellPadding),r.Hb("mat-calendar-body-disabled",!t.enabled)("mat-calendar-body-active",s._isActiveCell(n,i))("mat-calendar-body-range-start",s._isRangeStart(t.compareValue))("mat-calendar-body-range-end",s._isRangeEnd(t.compareValue))("mat-calendar-body-in-range",s._isInRange(t.compareValue))("mat-calendar-body-comparison-bridge-start",s._isComparisonBridgeStart(t.compareValue,n,i))("mat-calendar-body-comparison-bridge-end",s._isComparisonBridgeEnd(t.compareValue,n,i))("mat-calendar-body-comparison-start",s._isComparisonStart(t.compareValue))("mat-calendar-body-comparison-end",s._isComparisonEnd(t.compareValue))("mat-calendar-body-in-comparison-range",s._isInComparisonRange(t.compareValue))("mat-calendar-body-preview-start",s._isPreviewStart(t.compareValue))("mat-calendar-body-preview-end",s._isPreviewEnd(t.compareValue))("mat-calendar-body-in-preview",s._isInPreview(t.compareValue)),r.nc("ngClass",t.cssClasses)("tabindex",s._isActiveCell(n,i)?0:-1),r.Eb("data-mat-row",n)("data-mat-col",i)("aria-label",t.ariaLabel)("aria-disabled",!t.enabled||null)("aria-selected",s._isSelected(t.compareValue)),r.Db(1),r.Hb("mat-calendar-body-selected",s._isSelected(t.compareValue))("mat-calendar-body-comparison-identical",s._isComparisonIdentical(t.compareValue))("mat-calendar-body-today",s.todayValue===t.compareValue),r.Db(1),r.Mc(" ",t.displayValue," ")}}function Lu(t,e){if(1&t&&(r.Vb(0,"tr",4),r.Ic(1,Vu,2,6,"td",5),r.Ic(2,Fu,4,46,"td",6),r.Ub()),2&t){const t=e.$implicit,i=e.index,n=r.gc();r.Db(1),r.nc("ngIf",0===i&&n._firstRowOffset),r.Db(1),r.nc("ngForOf",t)}}function Uu(t,e){if(1&t&&(r.Vb(0,"th",5),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.Eb("aria-label",t.long),r.Db(1),r.Lc(t.narrow)}}const Bu=["*"];function Nu(t,e){}function ju(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-month-view",5),r.cc("activeDateChange",function(e){return r.Ac(t),r.gc().activeDate=e})("_userSelection",function(e){return r.Ac(t),r.gc()._dateSelected(e)}),r.Ub()}if(2&t){const t=r.gc();r.nc("activeDate",t.activeDate)("selected",t.selected)("dateFilter",t.dateFilter)("maxDate",t.maxDate)("minDate",t.minDate)("dateClass",t.dateClass)("comparisonStart",t.comparisonStart)("comparisonEnd",t.comparisonEnd)}}function zu(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-year-view",6),r.cc("activeDateChange",function(e){return r.Ac(t),r.gc().activeDate=e})("monthSelected",function(e){return r.Ac(t),r.gc()._monthSelectedInYearView(e)})("selectedChange",function(e){return r.Ac(t),r.gc()._goToDateInView(e,"month")}),r.Ub()}if(2&t){const t=r.gc();r.nc("activeDate",t.activeDate)("selected",t.selected)("dateFilter",t.dateFilter)("maxDate",t.maxDate)("minDate",t.minDate)("dateClass",t.dateClass)}}function Hu(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-multi-year-view",7),r.cc("activeDateChange",function(e){return r.Ac(t),r.gc().activeDate=e})("yearSelected",function(e){return r.Ac(t),r.gc()._yearSelectedInMultiYearView(e)})("selectedChange",function(e){return r.Ac(t),r.gc()._goToDateInView(e,"year")}),r.Ub()}if(2&t){const t=r.gc();r.nc("activeDate",t.activeDate)("selected",t.selected)("dateFilter",t.dateFilter)("maxDate",t.maxDate)("minDate",t.minDate)("dateClass",t.dateClass)}}function Ku(t,e){}const $u=["button"];function Gu(t,e){1&t&&(r.fc(),r.Vb(0,"svg",3),r.Qb(1,"path",4),r.Ub())}const Wu=[[["","matDatepickerToggleIcon",""]]],Zu=["[matDatepickerToggleIcon]"],qu=[[["input","matStartDate",""]],[["input","matEndDate",""]]],Yu=["input[matStartDate]","input[matEndDate]"];let Qu=(()=>{class t{constructor(){this.changes=new _e.a,this.calendarLabel="Calendar",this.openCalendarLabel="Open calendar",this.closeCalendarLabel="Close calendar",this.prevMonthLabel="Previous month",this.nextMonthLabel="Next month",this.prevYearLabel="Previous year",this.nextYearLabel="Next year",this.prevMultiYearLabel="Previous 20 years",this.nextMultiYearLabel="Next 20 years",this.switchToMonthViewLabel="Choose date",this.switchToMultiYearViewLabel="Choose month and year"}formatYearRange(t,e){return`${t} \u2013 ${e}`}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(r.Lb)({factory:function(){return new t},token:t,providedIn:"root"}),t})();class Xu{constructor(t,e,i,n,r={},s=t,o){this.value=t,this.displayValue=e,this.ariaLabel=i,this.enabled=n,this.cssClasses=r,this.compareValue=s,this.rawValue=o}}let Ju=(()=>{class t{constructor(t,e){this._elementRef=t,this._ngZone=e,this.numCols=7,this.activeCell=0,this.isRange=!1,this.cellAspectRatio=1,this.previewStart=null,this.previewEnd=null,this.selectedValueChange=new r.o,this.previewChange=new r.o,this._enterHandler=t=>{if(this._skipNextFocus&&"focus"===t.type)this._skipNextFocus=!1;else if(t.target&&this.isRange){const e=this._getCellFromElement(t.target);e&&this._ngZone.run(()=>this.previewChange.emit({value:e.enabled?e:null,event:t}))}},this._leaveHandler=t=>{null!==this.previewEnd&&this.isRange&&t.target&&td(t.target)&&this._ngZone.run(()=>this.previewChange.emit({value:null,event:t}))},e.runOutsideAngular(()=>{const e=t.nativeElement;e.addEventListener("mouseenter",this._enterHandler,!0),e.addEventListener("focus",this._enterHandler,!0),e.addEventListener("mouseleave",this._leaveHandler,!0),e.addEventListener("blur",this._leaveHandler,!0)})}_cellClicked(t,e){t.enabled&&this.selectedValueChange.emit({value:t.value,event:e})}_isSelected(t){return this.startValue===t||this.endValue===t}ngOnChanges(t){const e=t.numCols,{rows:i,numCols:n}=this;(t.rows||e)&&(this._firstRowOffset=i&&i.length&&i[0].length?n-i[0].length:0),(t.cellAspectRatio||e||!this._cellPadding)&&(this._cellPadding=50*this.cellAspectRatio/n+"%"),!e&&this._cellWidth||(this._cellWidth=100/n+"%")}ngOnDestroy(){const t=this._elementRef.nativeElement;t.removeEventListener("mouseenter",this._enterHandler,!0),t.removeEventListener("focus",this._enterHandler,!0),t.removeEventListener("mouseleave",this._leaveHandler,!0),t.removeEventListener("blur",this._leaveHandler,!0)}_isActiveCell(t,e){let i=t*this.numCols+e;return t&&(i-=this._firstRowOffset),i==this.activeCell}_focusActiveCell(t=!0){this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe(Qe(1)).subscribe(()=>{const e=this._elementRef.nativeElement.querySelector(".mat-calendar-body-active");e&&(t||(this._skipNextFocus=!0),e.focus())})})}_isRangeStart(t){return ed(t,this.startValue,this.endValue)}_isRangeEnd(t){return id(t,this.startValue,this.endValue)}_isInRange(t){return nd(t,this.startValue,this.endValue,this.isRange)}_isComparisonStart(t){return ed(t,this.comparisonStart,this.comparisonEnd)}_isComparisonBridgeStart(t,e,i){if(!this._isComparisonStart(t)||this._isRangeStart(t)||!this._isInRange(t))return!1;let n=this.rows[e][i-1];if(!n){const t=this.rows[e-1];n=t&&t[t.length-1]}return n&&!this._isRangeEnd(n.compareValue)}_isComparisonBridgeEnd(t,e,i){if(!this._isComparisonEnd(t)||this._isRangeEnd(t)||!this._isInRange(t))return!1;let n=this.rows[e][i+1];if(!n){const t=this.rows[e+1];n=t&&t[0]}return n&&!this._isRangeStart(n.compareValue)}_isComparisonEnd(t){return id(t,this.comparisonStart,this.comparisonEnd)}_isInComparisonRange(t){return nd(t,this.comparisonStart,this.comparisonEnd,this.isRange)}_isComparisonIdentical(t){return this.comparisonStart===this.comparisonEnd&&t===this.comparisonStart}_isPreviewStart(t){return ed(t,this.previewStart,this.previewEnd)}_isPreviewEnd(t){return id(t,this.previewStart,this.previewEnd)}_isInPreview(t){return nd(t,this.previewStart,this.previewEnd,this.isRange)}_getCellFromElement(t){let e;if(td(t)?e=t:td(t.parentNode)&&(e=t.parentNode),e){const t=e.getAttribute("data-mat-row"),i=e.getAttribute("data-mat-col");if(t&&i)return this.rows[parseInt(t)][parseInt(i)]}return null}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.B))},t.\u0275cmp=r.Jb({type:t,selectors:[["","mat-calendar-body",""]],hostAttrs:["role","grid","aria-readonly","true",1,"mat-calendar-body"],inputs:{numCols:"numCols",activeCell:"activeCell",isRange:"isRange",cellAspectRatio:"cellAspectRatio",previewStart:"previewStart",previewEnd:"previewEnd",label:"label",rows:"rows",todayValue:"todayValue",startValue:"startValue",endValue:"endValue",labelMinRequiredCells:"labelMinRequiredCells",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},outputs:{selectedValueChange:"selectedValueChange",previewChange:"previewChange"},exportAs:["matCalendarBody"],features:[r.Bb],attrs:Tu,decls:2,vars:2,consts:[["aria-hidden","true",4,"ngIf"],["role","row",4,"ngFor","ngForOf"],["aria-hidden","true"],[1,"mat-calendar-body-label"],["role","row"],["aria-hidden","true","class","mat-calendar-body-label",3,"paddingTop","paddingBottom",4,"ngIf"],["role","gridcell","class","mat-calendar-body-cell",3,"ngClass","tabindex","mat-calendar-body-disabled","mat-calendar-body-active","mat-calendar-body-range-start","mat-calendar-body-range-end","mat-calendar-body-in-range","mat-calendar-body-comparison-bridge-start","mat-calendar-body-comparison-bridge-end","mat-calendar-body-comparison-start","mat-calendar-body-comparison-end","mat-calendar-body-in-comparison-range","mat-calendar-body-preview-start","mat-calendar-body-preview-end","mat-calendar-body-in-preview","width","paddingTop","paddingBottom","click",4,"ngFor","ngForOf"],["aria-hidden","true",1,"mat-calendar-body-label"],["role","gridcell",1,"mat-calendar-body-cell",3,"ngClass","tabindex","click"],[1,"mat-calendar-body-cell-content","mat-focus-indicator"],[1,"mat-calendar-body-cell-preview"]],template:function(t,e){1&t&&(r.Ic(0,Ru,3,6,"tr",0),r.Ic(1,Lu,3,2,"tr",1)),2&t&&(r.nc("ngIf",e._firstRowOffset<e.labelMinRequiredCells),r.Db(1),r.nc("ngForOf",e.rows))},directives:[ut,ct,at],styles:['.mat-calendar-body{min-width:224px}.mat-calendar-body-label{height:0;line-height:0;text-align:left;padding-left:4.7142857143%;padding-right:4.7142857143%}.mat-calendar-body-cell{position:relative;height:0;line-height:0;text-align:center;outline:none;cursor:pointer}.mat-calendar-body-cell::before,.mat-calendar-body-cell::after,.mat-calendar-body-cell-preview{content:"";position:absolute;top:5%;left:0;z-index:0;box-sizing:border-box;height:90%;width:100%}.mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-start::after,.mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,.mat-calendar-body-comparison-start::after,.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:5%;width:95%;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,[dir=rtl] .mat-calendar-body-comparison-start::after,[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:0;border-radius:0;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,.mat-calendar-body-comparison-end::after,.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}[dir=rtl] .mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,[dir=rtl] .mat-calendar-body-comparison-end::after,[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{left:5%;border-radius:0;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-comparison-bridge-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-bridge-end.mat-calendar-body-range-start::after{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end.mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-end.mat-calendar-body-range-start::after{width:90%}.mat-calendar-body-in-preview .mat-calendar-body-cell-preview{border-top:dashed 1px;border-bottom:dashed 1px}.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:dashed 1px}[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:0;border-right:dashed 1px}.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:dashed 1px}[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:0;border-left:dashed 1px}.mat-calendar-body-disabled{cursor:default}.cdk-high-contrast-active .mat-calendar-body-disabled{opacity:.5}.mat-calendar-body-cell-content{top:5%;left:5%;z-index:1;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;line-height:1;border-width:1px;border-style:solid;border-radius:999px}.mat-calendar-body-cell-content.mat-focus-indicator{position:absolute}.cdk-high-contrast-active .mat-calendar-body-cell-content{border:none}.mat-datepicker-dialog .mat-dialog-container{position:relative;overflow:visible}.cdk-high-contrast-active .mat-datepicker-popup:not(:empty),.cdk-high-contrast-active .mat-calendar-body-selected{outline:solid 1px}.cdk-high-contrast-active .mat-calendar-body-today{outline:dotted 1px}.cdk-high-contrast-active .cdk-keyboard-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected),.cdk-high-contrast-active .cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){outline:dotted 2px}[dir=rtl] .mat-calendar-body-label{text-align:right}@media(hover: none){.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){background-color:transparent}}\n'],encapsulation:2,changeDetection:0}),t})();function td(t){return"TD"===t.nodeName}function ed(t,e,i){return null!==i&&e!==i&&t<i&&t===e}function id(t,e,i){return null!==e&&e!==i&&t>=e&&t===i}function nd(t,e,i,n){return n&&null!==e&&null!==i&&e!==i&&t>=e&&t<=i}class rd{constructor(t,e){this.start=t,this.end=e}}let sd=(()=>{class t{constructor(t,e){this.selection=t,this._adapter=e,this._selectionChanged=new _e.a,this.selectionChanged=this._selectionChanged,this.selection=t}updateSelection(t,e){this.selection=t,this._selectionChanged.next({selection:t,source:e})}ngOnDestroy(){this._selectionChanged.complete()}_isValidDateInstance(t){return this._adapter.isDateInstance(t)&&this._adapter.isValid(t)}clone(){return null}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(void 0),r.Zb(Ta))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),od=(()=>{class t extends sd{constructor(t){super(null,t)}add(t){super.updateSelection(t,this)}isValid(){return null!=this.selection&&this._isValidDateInstance(this.selection)}isComplete(){return null!=this.selection}clone(){const e=new t(this._adapter);return e.updateSelection(this.selection,this),e}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Ta))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),ad=(()=>{class t extends sd{constructor(t){super(new rd(null,null),t)}add(t){let{start:e,end:i}=this.selection;null==e?e=t:null==i?i=t:(e=t,i=null),super.updateSelection(new rd(e,i),this)}isValid(){const{start:t,end:e}=this.selection;return null==t&&null==e||(null!=t&&null!=e?this._isValidDateInstance(t)&&this._isValidDateInstance(e)&&this._adapter.compareDate(t,e)<=0:(null==t||this._isValidDateInstance(t))&&(null==e||this._isValidDateInstance(e)))}isComplete(){return null!=this.selection.start&&null!=this.selection.end}clone(){const e=new t(this._adapter);return e.updateSelection(this.selection,this),e}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Ta))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();const ld={provide:sd,deps:[[new r.C,new r.M,sd],Ta],useFactory:function(t,e){return t||new od(e)}},cd={provide:sd,deps:[[new r.C,new r.M,sd],Ta],useFactory:function(t,e){return t||new ad(e)}},hd=new r.s("MAT_DATE_RANGE_SELECTION_STRATEGY");let ud=(()=>{class t{constructor(t){this._dateAdapter=t}selectionFinished(t,e){let{start:i,end:n}=e;return null==i?i=t:null==n&&t&&this._dateAdapter.compareDate(t,i)>=0?n=t:(i=t,n=null),new rd(i,n)}createPreview(t,e){let i=null,n=null;return e.start&&!e.end&&t&&(i=e.start,n=t),new rd(i,n)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Ta))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();const dd={provide:hd,deps:[[new r.C,new r.M,hd],Ta],useFactory:function(t,e){return t||new ud(e)}};let pd=(()=>{class t{constructor(t,e,i,n,s){this._changeDetectorRef=t,this._dateFormats=e,this._dateAdapter=i,this._dir=n,this._rangeStrategy=s,this._rerenderSubscription=ye.a.EMPTY,this.selectedChange=new r.o,this._userSelection=new r.o,this.activeDateChange=new r.o,this._activeDate=this._dateAdapter.today()}get activeDate(){return this._activeDate}set activeDate(t){const e=this._activeDate,i=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(i,this.minDate,this.maxDate),this._hasSameMonthAndYear(e,this._activeDate)||this._init()}get selected(){return this._selected}set selected(t){this._selected=t instanceof rd?t:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setRanges(this._selected)}get minDate(){return this._minDate}set minDate(t){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get maxDate(){return this._maxDate}set maxDate(t){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(Pn(null)).subscribe(()=>this._init())}ngOnChanges(t){const e=t.comparisonStart||t.comparisonEnd;e&&!e.firstChange&&this._setRanges(this.selected)}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_dateSelected(t){const e=t.value,i=this._dateAdapter.getYear(this.activeDate),n=this._dateAdapter.getMonth(this.activeDate),r=this._dateAdapter.createDate(i,n,e);let s,o;this._selected instanceof rd?(s=this._getDateInCurrentMonth(this._selected.start),o=this._getDateInCurrentMonth(this._selected.end)):s=o=this._getDateInCurrentMonth(this._selected),s===e&&o===e||this.selectedChange.emit(r),this._userSelection.emit({value:r,event:t.event}),this._previewStart=this._previewEnd=null,this._changeDetectorRef.markForCheck()}_handleCalendarBodyKeydown(t){const e=this._activeDate,i=this._isRtl();switch(t.keyCode){case 37:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,i?1:-1);break;case 39:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,i?-1:1);break;case 38:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,-7);break;case 40:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,7);break;case 36:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,1-this._dateAdapter.getDate(this._activeDate));break;case 35:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,this._dateAdapter.getNumDaysInMonth(this._activeDate)-this._dateAdapter.getDate(this._activeDate));break;case 33:this.activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,-1):this._dateAdapter.addCalendarMonths(this._activeDate,-1);break;case 34:this.activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,1):this._dateAdapter.addCalendarMonths(this._activeDate,1);break;case 13:case 32:return void(this.dateFilter&&!this.dateFilter(this._activeDate)||(this._dateSelected({value:this._dateAdapter.getDate(this._activeDate),event:t}),t.preventDefault()));case 27:return void(null==this._previewEnd||ke(t)||(this._previewStart=this._previewEnd=null,this.selectedChange.emit(null),this._userSelection.emit({value:null,event:t}),t.preventDefault(),t.stopPropagation()));default:return}this._dateAdapter.compareDate(e,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),t.preventDefault()}_init(){this._setRanges(this.selected),this._todayDate=this._getCellCompareValue(this._dateAdapter.today()),this._monthLabel=this._dateFormats.display.monthLabel?this._dateAdapter.format(this.activeDate,this._dateFormats.display.monthLabel):this._dateAdapter.getMonthNames("short")[this._dateAdapter.getMonth(this.activeDate)].toLocaleUpperCase();let t=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),1);this._firstWeekOffset=(7+this._dateAdapter.getDayOfWeek(t)-this._dateAdapter.getFirstDayOfWeek())%7,this._initWeekdays(),this._createWeekCells(),this._changeDetectorRef.markForCheck()}_focusActiveCell(t){this._matCalendarBody._focusActiveCell(t)}_previewChanged({event:t,value:e}){if(this._rangeStrategy){const i=this._rangeStrategy.createPreview(e?e.rawValue:null,this.selected,t);this._previewStart=this._getCellCompareValue(i.start),this._previewEnd=this._getCellCompareValue(i.end),this._changeDetectorRef.detectChanges()}}_initWeekdays(){const t=this._dateAdapter.getFirstDayOfWeek(),e=this._dateAdapter.getDayOfWeekNames("narrow");let i=this._dateAdapter.getDayOfWeekNames("long").map((t,i)=>({long:t,narrow:e[i]}));this._weekdays=i.slice(t).concat(i.slice(0,t))}_createWeekCells(){const t=this._dateAdapter.getNumDaysInMonth(this.activeDate),e=this._dateAdapter.getDateNames();this._weeks=[[]];for(let i=0,n=this._firstWeekOffset;i<t;i++,n++){7==n&&(this._weeks.push([]),n=0);const t=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),i+1),r=this._shouldEnableDate(t),s=this._dateAdapter.format(t,this._dateFormats.display.dateA11yLabel),o=this.dateClass?this.dateClass(t,"month"):void 0;this._weeks[this._weeks.length-1].push(new Xu(i+1,e[i],s,r,o,this._getCellCompareValue(t),t))}}_shouldEnableDate(t){return!!t&&(!this.minDate||this._dateAdapter.compareDate(t,this.minDate)>=0)&&(!this.maxDate||this._dateAdapter.compareDate(t,this.maxDate)<=0)&&(!this.dateFilter||this.dateFilter(t))}_getDateInCurrentMonth(t){return t&&this._hasSameMonthAndYear(t,this.activeDate)?this._dateAdapter.getDate(t):null}_hasSameMonthAndYear(t,e){return!(!t||!e||this._dateAdapter.getMonth(t)!=this._dateAdapter.getMonth(e)||this._dateAdapter.getYear(t)!=this._dateAdapter.getYear(e))}_getCellCompareValue(t){if(t){const e=this._dateAdapter.getYear(t),i=this._dateAdapter.getMonth(t),n=this._dateAdapter.getDate(t);return new Date(e,i,n).getTime()}return null}_isRtl(){return this._dir&&"rtl"===this._dir.value}_setRanges(t){t instanceof rd?(this._rangeStart=this._getCellCompareValue(t.start),this._rangeEnd=this._getCellCompareValue(t.end),this._isRange=!0):(this._rangeStart=this._rangeEnd=this._getCellCompareValue(t),this._isRange=!1),this._comparisonRangeStart=this._getCellCompareValue(this.comparisonStart),this._comparisonRangeEnd=this._getCellCompareValue(this.comparisonEnd)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(Ra,8),r.Pb(Ta,8),r.Pb(Zn,8),r.Pb(hd,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-month-view"]],viewQuery:function(t,e){if(1&t&&r.Pc(Ju,1),2&t){let t;r.vc(t=r.dc())&&(e._matCalendarBody=t.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},outputs:{selectedChange:"selectedChange",_userSelection:"_userSelection",activeDateChange:"activeDateChange"},exportAs:["matMonthView"],features:[r.Bb],decls:7,vars:13,consts:[["role","presentation",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["scope","col",4,"ngFor","ngForOf"],["colspan","7","aria-hidden","true",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"label","rows","todayValue","startValue","endValue","comparisonStart","comparisonEnd","previewStart","previewEnd","isRange","labelMinRequiredCells","activeCell","selectedValueChange","previewChange","keydown"],["scope","col"]],template:function(t,e){1&t&&(r.Vb(0,"table",0),r.Vb(1,"thead",1),r.Vb(2,"tr"),r.Ic(3,Uu,2,2,"th",2),r.Ub(),r.Vb(4,"tr"),r.Qb(5,"th",3),r.Ub(),r.Ub(),r.Vb(6,"tbody",4),r.cc("selectedValueChange",function(t){return e._dateSelected(t)})("previewChange",function(t){return e._previewChanged(t)})("keydown",function(t){return e._handleCalendarBodyKeydown(t)}),r.Ub(),r.Ub()),2&t&&(r.Db(3),r.nc("ngForOf",e._weekdays),r.Db(3),r.nc("label",e._monthLabel)("rows",e._weeks)("todayValue",e._todayDate)("startValue",e._rangeStart)("endValue",e._rangeEnd)("comparisonStart",e._comparisonRangeStart)("comparisonEnd",e._comparisonRangeEnd)("previewStart",e._previewStart)("previewEnd",e._previewEnd)("isRange",e._isRange)("labelMinRequiredCells",3)("activeCell",e._dateAdapter.getDate(e.activeDate)-1))},directives:[ct,Ju],encapsulation:2,changeDetection:0}),t})(),fd=(()=>{class t{constructor(t,e,i){this._changeDetectorRef=t,this._dateAdapter=e,this._dir=i,this._rerenderSubscription=ye.a.EMPTY,this.selectedChange=new r.o,this.yearSelected=new r.o,this.activeDateChange=new r.o,this._activeDate=this._dateAdapter.today()}get activeDate(){return this._activeDate}set activeDate(t){let e=this._activeDate;const i=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(i,this.minDate,this.maxDate),md(this._dateAdapter,e,this._activeDate,this.minDate,this.maxDate)||this._init()}get selected(){return this._selected}set selected(t){this._selected=t instanceof rd?t:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setSelectedYear(t)}get minDate(){return this._minDate}set minDate(t){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get maxDate(){return this._maxDate}set maxDate(t){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(Pn(null)).subscribe(()=>this._init())}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_init(){this._todayYear=this._dateAdapter.getYear(this._dateAdapter.today());const t=this._dateAdapter.getYear(this._activeDate)-gd(this._dateAdapter,this.activeDate,this.minDate,this.maxDate);this._years=[];for(let e=0,i=[];e<24;e++)i.push(t+e),4==i.length&&(this._years.push(i.map(t=>this._createCellForYear(t))),i=[]);this._changeDetectorRef.markForCheck()}_yearSelected(t){const e=t.value;this.yearSelected.emit(this._dateAdapter.createDate(e,0,1));let i=this._dateAdapter.getMonth(this.activeDate),n=this._dateAdapter.getNumDaysInMonth(this._dateAdapter.createDate(e,i,1));this.selectedChange.emit(this._dateAdapter.createDate(e,i,Math.min(this._dateAdapter.getDate(this.activeDate),n)))}_handleCalendarBodyKeydown(t){const e=this._activeDate,i=this._isRtl();switch(t.keyCode){case 37:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,i?1:-1);break;case 39:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,i?-1:1);break;case 38:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-4);break;case 40:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,4);break;case 36:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-gd(this._dateAdapter,this.activeDate,this.minDate,this.maxDate));break;case 35:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,24-gd(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)-1);break;case 33:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?-240:-24);break;case 34:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?240:24);break;case 13:case 32:this._yearSelected({value:this._dateAdapter.getYear(this._activeDate),event:t});break;default:return}this._dateAdapter.compareDate(e,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),t.preventDefault()}_getActiveCell(){return gd(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)}_focusActiveCell(){this._matCalendarBody._focusActiveCell()}_createCellForYear(t){const e=this._dateAdapter.createDate(t,0,1),i=this._dateAdapter.getYearName(e),n=this.dateClass?this.dateClass(e,"multi-year"):void 0;return new Xu(t,i,i,this._shouldEnableYear(t),n)}_shouldEnableYear(t){if(null==t||this.maxDate&&t>this._dateAdapter.getYear(this.maxDate)||this.minDate&&t<this._dateAdapter.getYear(this.minDate))return!1;if(!this.dateFilter)return!0;for(let e=this._dateAdapter.createDate(t,0,1);this._dateAdapter.getYear(e)==t;e=this._dateAdapter.addCalendarDays(e,1))if(this.dateFilter(e))return!0;return!1}_isRtl(){return this._dir&&"rtl"===this._dir.value}_setSelectedYear(t){if(this._selectedYear=null,t instanceof rd){const e=t.start||t.end;e&&(this._selectedYear=this._dateAdapter.getYear(e))}else t&&(this._selectedYear=this._dateAdapter.getYear(t))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(Ta,8),r.Pb(Zn,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-multi-year-view"]],viewQuery:function(t,e){if(1&t&&r.Pc(Ju,1),2&t){let t;r.vc(t=r.dc())&&(e._matCalendarBody=t.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass"},outputs:{selectedChange:"selectedChange",yearSelected:"yearSelected",activeDateChange:"activeDateChange"},exportAs:["matMultiYearView"],decls:5,vars:7,consts:[["role","presentation",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["colspan","4",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"rows","todayValue","startValue","endValue","numCols","cellAspectRatio","activeCell","selectedValueChange","keydown"]],template:function(t,e){1&t&&(r.Vb(0,"table",0),r.Vb(1,"thead",1),r.Vb(2,"tr"),r.Qb(3,"th",2),r.Ub(),r.Ub(),r.Vb(4,"tbody",3),r.cc("selectedValueChange",function(t){return e._yearSelected(t)})("keydown",function(t){return e._handleCalendarBodyKeydown(t)}),r.Ub(),r.Ub()),2&t&&(r.Db(4),r.nc("rows",e._years)("todayValue",e._todayYear)("startValue",e._selectedYear)("endValue",e._selectedYear)("numCols",4)("cellAspectRatio",4/7)("activeCell",e._getActiveCell()))},directives:[Ju],encapsulation:2,changeDetection:0}),t})();function md(t,e,i,n,r){const s=t.getYear(e),o=t.getYear(i),a=Ad(t,n,r);return Math.floor((s-a)/24)===Math.floor((o-a)/24)}function gd(t,e,i,n){return((t.getYear(e)-Ad(t,i,n))%24+24)%24}function Ad(t,e,i){let n=0;return i?n=t.getYear(i)-24+1:e&&(n=t.getYear(e)),n}let bd=(()=>{class t{constructor(t,e,i,n){this._changeDetectorRef=t,this._dateFormats=e,this._dateAdapter=i,this._dir=n,this._rerenderSubscription=ye.a.EMPTY,this.selectedChange=new r.o,this.monthSelected=new r.o,this.activeDateChange=new r.o,this._activeDate=this._dateAdapter.today()}get activeDate(){return this._activeDate}set activeDate(t){let e=this._activeDate;const i=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(i,this.minDate,this.maxDate),this._dateAdapter.getYear(e)!==this._dateAdapter.getYear(this._activeDate)&&this._init()}get selected(){return this._selected}set selected(t){this._selected=t instanceof rd?t:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setSelectedMonth(t)}get minDate(){return this._minDate}set minDate(t){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get maxDate(){return this._maxDate}set maxDate(t){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(Pn(null)).subscribe(()=>this._init())}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_monthSelected(t){const e=t.value,i=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),e,1);this.monthSelected.emit(i);const n=this._dateAdapter.getNumDaysInMonth(i);this.selectedChange.emit(this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),e,Math.min(this._dateAdapter.getDate(this.activeDate),n)))}_handleCalendarBodyKeydown(t){const e=this._activeDate,i=this._isRtl();switch(t.keyCode){case 37:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,i?1:-1);break;case 39:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,i?-1:1);break;case 38:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-4);break;case 40:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,4);break;case 36:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-this._dateAdapter.getMonth(this._activeDate));break;case 35:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,11-this._dateAdapter.getMonth(this._activeDate));break;case 33:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?-10:-1);break;case 34:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?10:1);break;case 13:case 32:this._monthSelected({value:this._dateAdapter.getMonth(this._activeDate),event:t});break;default:return}this._dateAdapter.compareDate(e,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),t.preventDefault()}_init(){this._setSelectedMonth(this.selected),this._todayMonth=this._getMonthInCurrentYear(this._dateAdapter.today()),this._yearLabel=this._dateAdapter.getYearName(this.activeDate);let t=this._dateAdapter.getMonthNames("short");this._months=[[0,1,2,3],[4,5,6,7],[8,9,10,11]].map(e=>e.map(e=>this._createCellForMonth(e,t[e]))),this._changeDetectorRef.markForCheck()}_focusActiveCell(){this._matCalendarBody._focusActiveCell()}_getMonthInCurrentYear(t){return t&&this._dateAdapter.getYear(t)==this._dateAdapter.getYear(this.activeDate)?this._dateAdapter.getMonth(t):null}_createCellForMonth(t,e){const i=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),t,1),n=this._dateAdapter.format(i,this._dateFormats.display.monthYearA11yLabel),r=this.dateClass?this.dateClass(i,"year"):void 0;return new Xu(t,e.toLocaleUpperCase(),n,this._shouldEnableMonth(t),r)}_shouldEnableMonth(t){const e=this._dateAdapter.getYear(this.activeDate);if(null==t||this._isYearAndMonthAfterMaxDate(e,t)||this._isYearAndMonthBeforeMinDate(e,t))return!1;if(!this.dateFilter)return!0;for(let i=this._dateAdapter.createDate(e,t,1);this._dateAdapter.getMonth(i)==t;i=this._dateAdapter.addCalendarDays(i,1))if(this.dateFilter(i))return!0;return!1}_isYearAndMonthAfterMaxDate(t,e){if(this.maxDate){const i=this._dateAdapter.getYear(this.maxDate),n=this._dateAdapter.getMonth(this.maxDate);return t>i||t===i&&e>n}return!1}_isYearAndMonthBeforeMinDate(t,e){if(this.minDate){const i=this._dateAdapter.getYear(this.minDate),n=this._dateAdapter.getMonth(this.minDate);return t<i||t===i&&e<n}return!1}_isRtl(){return this._dir&&"rtl"===this._dir.value}_setSelectedMonth(t){this._selectedMonth=t instanceof rd?this._getMonthInCurrentYear(t.start)||this._getMonthInCurrentYear(t.end):this._getMonthInCurrentYear(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(Ra,8),r.Pb(Ta,8),r.Pb(Zn,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-year-view"]],viewQuery:function(t,e){if(1&t&&r.Pc(Ju,1),2&t){let t;r.vc(t=r.dc())&&(e._matCalendarBody=t.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass"},outputs:{selectedChange:"selectedChange",monthSelected:"monthSelected",activeDateChange:"activeDateChange"},exportAs:["matYearView"],decls:5,vars:9,consts:[["role","presentation",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["colspan","4",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"label","rows","todayValue","startValue","endValue","labelMinRequiredCells","numCols","cellAspectRatio","activeCell","selectedValueChange","keydown"]],template:function(t,e){1&t&&(r.Vb(0,"table",0),r.Vb(1,"thead",1),r.Vb(2,"tr"),r.Qb(3,"th",2),r.Ub(),r.Ub(),r.Vb(4,"tbody",3),r.cc("selectedValueChange",function(t){return e._monthSelected(t)})("keydown",function(t){return e._handleCalendarBodyKeydown(t)}),r.Ub(),r.Ub()),2&t&&(r.Db(4),r.nc("label",e._yearLabel)("rows",e._months)("todayValue",e._todayMonth)("startValue",e._selectedMonth)("endValue",e._selectedMonth)("labelMinRequiredCells",2)("numCols",4)("cellAspectRatio",4/7)("activeCell",e._dateAdapter.getMonth(e.activeDate)))},directives:[Ju],encapsulation:2,changeDetection:0}),t})(),vd=0,_d=(()=>{class t{constructor(t,e,i,n,r){this._intl=t,this.calendar=e,this._dateAdapter=i,this._dateFormats=n,this._buttonDescriptionId="mat-calendar-button-"+vd++,this.calendar.stateChanges.subscribe(()=>r.markForCheck())}get periodButtonText(){if("month"==this.calendar.currentView)return this._dateAdapter.format(this.calendar.activeDate,this._dateFormats.display.monthYearLabel).toLocaleUpperCase();if("year"==this.calendar.currentView)return this._dateAdapter.getYearName(this.calendar.activeDate);const t=this._dateAdapter.getYear(this.calendar.activeDate)-gd(this._dateAdapter,this.calendar.activeDate,this.calendar.minDate,this.calendar.maxDate),e=t+24-1,i=this._dateAdapter.getYearName(this._dateAdapter.createDate(t,0,1)),n=this._dateAdapter.getYearName(this._dateAdapter.createDate(e,0,1));return this._intl.formatYearRange(i,n)}get periodButtonLabel(){return"month"==this.calendar.currentView?this._intl.switchToMultiYearViewLabel:this._intl.switchToMonthViewLabel}get prevButtonLabel(){return{month:this._intl.prevMonthLabel,year:this._intl.prevYearLabel,"multi-year":this._intl.prevMultiYearLabel}[this.calendar.currentView]}get nextButtonLabel(){return{month:this._intl.nextMonthLabel,year:this._intl.nextYearLabel,"multi-year":this._intl.nextMultiYearLabel}[this.calendar.currentView]}currentPeriodClicked(){this.calendar.currentView="month"==this.calendar.currentView?"multi-year":"month"}previousClicked(){this.calendar.activeDate="month"==this.calendar.currentView?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,-1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,"year"==this.calendar.currentView?-1:-24)}nextClicked(){this.calendar.activeDate="month"==this.calendar.currentView?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,"year"==this.calendar.currentView?1:24)}previousEnabled(){return!this.calendar.minDate||!this.calendar.minDate||!this._isSameView(this.calendar.activeDate,this.calendar.minDate)}nextEnabled(){return!this.calendar.maxDate||!this._isSameView(this.calendar.activeDate,this.calendar.maxDate)}_isSameView(t,e){return"month"==this.calendar.currentView?this._dateAdapter.getYear(t)==this._dateAdapter.getYear(e)&&this._dateAdapter.getMonth(t)==this._dateAdapter.getMonth(e):"year"==this.calendar.currentView?this._dateAdapter.getYear(t)==this._dateAdapter.getYear(e):md(this._dateAdapter,t,e,this.calendar.minDate,this.calendar.maxDate)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Qu),r.Pb(Object(r.W)(()=>yd)),r.Pb(Ta,8),r.Pb(Ra,8),r.Pb(r.h))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-calendar-header"]],exportAs:["matCalendarHeader"],ngContentSelectors:Bu,decls:10,vars:10,consts:[[1,"mat-calendar-header"],[1,"mat-calendar-controls"],["mat-button","","type","button","cdkAriaLive","polite",1,"mat-calendar-period-button",3,"click"],[1,"mat-calendar-arrow"],[1,"mat-calendar-spacer"],["mat-icon-button","","type","button",1,"mat-calendar-previous-button",3,"disabled","click"],["mat-icon-button","","type","button",1,"mat-calendar-next-button",3,"disabled","click"]],template:function(t,e){1&t&&(r.mc(),r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"button",2),r.cc("click",function(){return e.currentPeriodClicked()}),r.Vb(3,"span"),r.Kc(4),r.Ub(),r.Qb(5,"div",3),r.Ub(),r.Qb(6,"div",4),r.lc(7),r.Vb(8,"button",5),r.cc("click",function(){return e.previousClicked()}),r.Ub(),r.Vb(9,"button",6),r.cc("click",function(){return e.nextClicked()}),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(2),r.Eb("aria-label",e.periodButtonLabel)("aria-describedby",e._buttonDescriptionId),r.Db(1),r.Eb("id",e._buttonDescriptionId),r.Db(1),r.Lc(e.periodButtonText),r.Db(1),r.Hb("mat-calendar-invert","month"!==e.calendar.currentView),r.Db(3),r.nc("disabled",!e.previousEnabled()),r.Eb("aria-label",e.prevButtonLabel),r.Db(1),r.nc("disabled",!e.nextEnabled()),r.Eb("aria-label",e.nextButtonLabel))},directives:[Dl,Ki],encapsulation:2,changeDetection:0}),t})(),yd=(()=>{class t{constructor(t,e,i,n){this._dateAdapter=e,this._dateFormats=i,this._changeDetectorRef=n,this._moveFocusOnNextTick=!1,this.startView="month",this.selectedChange=new r.o,this.yearSelected=new r.o,this.monthSelected=new r.o,this.viewChanged=new r.o(!0),this._userSelection=new r.o,this.stateChanges=new _e.a,this._intlChanges=t.changes.subscribe(()=>{n.markForCheck(),this.stateChanges.next()})}get startAt(){return this._startAt}set startAt(t){this._startAt=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get selected(){return this._selected}set selected(t){this._selected=t instanceof rd?t:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get minDate(){return this._minDate}set minDate(t){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get maxDate(){return this._maxDate}set maxDate(t){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get activeDate(){return this._clampedActiveDate}set activeDate(t){this._clampedActiveDate=this._dateAdapter.clampDate(t,this.minDate,this.maxDate),this.stateChanges.next(),this._changeDetectorRef.markForCheck()}get currentView(){return this._currentView}set currentView(t){const e=this._currentView!==t?t:null;this._currentView=t,this._moveFocusOnNextTick=!0,this._changeDetectorRef.markForCheck(),e&&this.viewChanged.emit(e)}ngAfterContentInit(){this._calendarHeaderPortal=new pe(this.headerComponent||_d),this.activeDate=this.startAt||this._dateAdapter.today(),this._currentView=this.startView}ngAfterViewChecked(){this._moveFocusOnNextTick&&(this._moveFocusOnNextTick=!1,this.focusActiveCell())}ngOnDestroy(){this._intlChanges.unsubscribe(),this.stateChanges.complete()}ngOnChanges(t){const e=t.minDate||t.maxDate||t.dateFilter;if(e&&!e.firstChange){const t=this._getCurrentViewComponent();t&&(this._changeDetectorRef.detectChanges(),t._init())}this.stateChanges.next()}focusActiveCell(){this._getCurrentViewComponent()._focusActiveCell(!1)}updateTodaysDate(){const t=this.currentView;let e;e="month"===t?this.monthView:"year"===t?this.yearView:this.multiYearView,e._init()}_dateSelected(t){const e=t.value;(this.selected instanceof rd||e&&!this._dateAdapter.sameDate(e,this.selected))&&this.selectedChange.emit(e),this._userSelection.emit(t)}_yearSelectedInMultiYearView(t){this.yearSelected.emit(t)}_monthSelectedInYearView(t){this.monthSelected.emit(t)}_goToDateInView(t,e){this.activeDate=t,this.currentView=e}_getCurrentViewComponent(){return this.monthView||this.yearView||this.multiYearView}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Qu),r.Pb(Ta,8),r.Pb(Ra,8),r.Pb(r.h))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-calendar"]],viewQuery:function(t,e){if(1&t&&(r.Pc(pd,1),r.Pc(bd,1),r.Pc(fd,1)),2&t){let t;r.vc(t=r.dc())&&(e.monthView=t.first),r.vc(t=r.dc())&&(e.yearView=t.first),r.vc(t=r.dc())&&(e.multiYearView=t.first)}},hostAttrs:[1,"mat-calendar"],inputs:{startView:"startView",startAt:"startAt",selected:"selected",minDate:"minDate",maxDate:"maxDate",headerComponent:"headerComponent",dateFilter:"dateFilter",dateClass:"dateClass",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},outputs:{selectedChange:"selectedChange",yearSelected:"yearSelected",monthSelected:"monthSelected",viewChanged:"viewChanged",_userSelection:"_userSelection"},exportAs:["matCalendar"],features:[r.Cb([ld]),r.Bb],decls:5,vars:5,consts:[[3,"cdkPortalOutlet"],["cdkMonitorSubtreeFocus","","tabindex","-1",1,"mat-calendar-content",3,"ngSwitch"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","comparisonStart","comparisonEnd","activeDateChange","_userSelection",4,"ngSwitchCase"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","monthSelected","selectedChange",4,"ngSwitchCase"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","yearSelected","selectedChange",4,"ngSwitchCase"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","comparisonStart","comparisonEnd","activeDateChange","_userSelection"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","monthSelected","selectedChange"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","yearSelected","selectedChange"]],template:function(t,e){1&t&&(r.Ic(0,Nu,0,0,"ng-template",0),r.Vb(1,"div",1),r.Ic(2,ju,1,8,"mat-month-view",2),r.Ic(3,zu,1,6,"mat-year-view",3),r.Ic(4,Hu,1,6,"mat-multi-year-view",4),r.Ub()),2&t&&(r.nc("cdkPortalOutlet",e._calendarHeaderPortal),r.Db(1),r.nc("ngSwitch",e.currentView),r.Db(1),r.nc("ngSwitchCase","month"),r.Db(1),r.nc("ngSwitchCase","year"),r.Db(1),r.nc("ngSwitchCase","multi-year"))},directives:[be,Qi,mt,gt,pd,bd,fd],styles:['.mat-calendar{display:block}.mat-calendar-header{padding:8px 8px 0 8px}.mat-calendar-content{padding:0 8px 8px 8px;outline:none}.mat-calendar-controls{display:flex;margin:5% calc(33% / 7 - 16px)}.mat-calendar-controls .mat-icon-button:hover .mat-button-focus-overlay{opacity:.04}.mat-calendar-spacer{flex:1 1 auto}.mat-calendar-period-button{min-width:0}.mat-calendar-arrow{display:inline-block;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top-width:5px;border-top-style:solid;margin:0 0 0 5px;vertical-align:middle}.mat-calendar-arrow.mat-calendar-invert{transform:rotate(180deg)}[dir=rtl] .mat-calendar-arrow{margin:0 5px 0 0}.mat-calendar-previous-button,.mat-calendar-next-button{position:relative}.mat-calendar-previous-button::after,.mat-calendar-next-button::after{top:0;left:0;right:0;bottom:0;position:absolute;content:"";margin:15.5px;border:0 solid currentColor;border-top-width:2px}[dir=rtl] .mat-calendar-previous-button,[dir=rtl] .mat-calendar-next-button{transform:rotate(180deg)}.mat-calendar-previous-button::after{border-left-width:2px;transform:translateX(2px) rotate(-45deg)}.mat-calendar-next-button::after{border-right-width:2px;transform:translateX(-2px) rotate(45deg)}.mat-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.mat-calendar-table-header th{text-align:center;padding:0 0 8px 0}.mat-calendar-table-header-divider{position:relative;height:1px}.mat-calendar-table-header-divider::after{content:"";position:absolute;top:0;left:-8px;right:-8px;height:1px}\n'],encapsulation:2,changeDetection:0}),t})();const wd={transformPanel:$r("transformPanel",[qr("void",Zr({opacity:0,transform:"scale(1, 0.8)"})),Qr("void => enter",Gr("120ms cubic-bezier(0, 0, 0.2, 1)",Zr({opacity:1,transform:"scale(1, 1)"}))),Qr("* => void",Gr("100ms linear",Zr({opacity:0})))]),fadeInCalendar:$r("fadeInCalendar",[qr("void",Zr({opacity:0})),qr("enter",Zr({opacity:1})),Qr("void => *",Gr("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])};let xd=0;const Cd=new r.s("mat-datepicker-scroll-strategy"),Sd={provide:Cd,deps:[Fr],useFactory:function(t){return()=>t.scrollStrategies.reposition()}};class kd{constructor(t){this._elementRef=t}}const Ed=Ea(kd);let Dd=(()=>{class t extends Ed{constructor(t,e,i,n,r,s){super(t),this._changeDetectorRef=e,this._globalModel=i,this._dateAdapter=n,this._rangeSelectionStrategy=r,this._subscriptions=new ye.a,this._animationState="enter",this._animationDone=new _e.a,this._actionsPortal=null,this._closeButtonText=(null==s?void 0:s.closeCalendarLabel)||"Close calendar"}ngOnInit(){this._model=this._actionsPortal?this._globalModel.clone():this._globalModel}ngAfterViewInit(){this._subscriptions.add(this.datepicker.stateChanges.subscribe(()=>{this._changeDetectorRef.markForCheck()})),this._calendar.focusActiveCell()}ngOnDestroy(){this._subscriptions.unsubscribe(),this._animationDone.complete()}_handleUserSelection(t){const e=this._model.selection,i=t.value,n=e instanceof rd;if(n&&this._rangeSelectionStrategy){const n=this._rangeSelectionStrategy.selectionFinished(i,e,t.event);this._model.updateSelection(n,this)}else!i||!n&&this._dateAdapter.sameDate(i,e)||this._model.add(i);this._model&&!this._model.isComplete()||this._actionsPortal||this.datepicker.close()}_startExitAnimation(){this._animationState="void",this._changeDetectorRef.markForCheck()}_getSelected(){return this._model.selection}_applyPendingSelection(){this._model!==this._globalModel&&this._globalModel.updateSelection(this._model.selection,this)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.h),r.Pb(sd),r.Pb(Ta),r.Pb(hd,8),r.Pb(Qu))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-datepicker-content"]],viewQuery:function(t,e){if(1&t&&r.Pc(yd,1),2&t){let t;r.vc(t=r.dc())&&(e._calendar=t.first)}},hostAttrs:[1,"mat-datepicker-content"],hostVars:3,hostBindings:function(t,e){1&t&&r.Gc("@transformPanel.done",function(){return e._animationDone.next()}),2&t&&(r.Hc("@transformPanel",e._animationState),r.Hb("mat-datepicker-content-touch",e.datepicker.touchUi))},inputs:{color:"color"},exportAs:["matDatepickerContent"],features:[r.Ab],decls:5,vars:20,consts:[["cdkTrapFocus","",1,"mat-datepicker-content-container"],[3,"id","ngClass","startAt","startView","minDate","maxDate","dateFilter","headerComponent","selected","dateClass","comparisonStart","comparisonEnd","yearSelected","monthSelected","viewChanged","_userSelection"],[3,"cdkPortalOutlet"],["type","button","mat-raised-button","",1,"mat-datepicker-close-button",3,"color","focus","blur","click"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"mat-calendar",1),r.cc("yearSelected",function(t){return e.datepicker._selectYear(t)})("monthSelected",function(t){return e.datepicker._selectMonth(t)})("viewChanged",function(t){return e.datepicker._viewChanged(t)})("_userSelection",function(t){return e._handleUserSelection(t)}),r.Ub(),r.Ic(2,Ku,0,0,"ng-template",2),r.Vb(3,"button",3),r.cc("focus",function(){return e._closeButtonFocused=!0})("blur",function(){return e._closeButtonFocused=!1})("click",function(){return e.datepicker.close()}),r.Kc(4),r.Ub(),r.Ub()),2&t&&(r.Hb("mat-datepicker-content-container-with-actions",e._actionsPortal),r.Db(1),r.nc("id",e.datepicker.id)("ngClass",e.datepicker.panelClass)("startAt",e.datepicker.startAt)("startView",e.datepicker.startView)("minDate",e.datepicker._getMinDate())("maxDate",e.datepicker._getMaxDate())("dateFilter",e.datepicker._getDateFilter())("headerComponent",e.datepicker.calendarHeaderComponent)("selected",e._getSelected())("dateClass",e.datepicker.dateClass)("comparisonStart",e.comparisonStart)("comparisonEnd",e.comparisonEnd)("@fadeInCalendar","enter"),r.Db(1),r.nc("cdkPortalOutlet",e._actionsPortal),r.Db(1),r.Hb("cdk-visually-hidden",!e._closeButtonFocused),r.nc("color",e.color||"primary"),r.Db(1),r.Lc(e._closeButtonText))},directives:[Ni,yd,at,be,Dl],styles:[".mat-datepicker-content{display:block;border-radius:4px}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content .mat-datepicker-close-button{position:absolute;top:100%;left:0;margin-top:8px}.ng-animating .mat-datepicker-content .mat-datepicker-close-button{display:none}.mat-datepicker-content-container{display:flex;flex-direction:column;justify-content:space-between}.mat-datepicker-content-touch{display:block;max-height:80vh;overflow:auto;margin:-24px}.mat-datepicker-content-touch .mat-datepicker-content-container{min-height:312px;max-height:788px;min-width:250px;max-width:750px}.mat-datepicker-content-touch .mat-calendar{width:100%;height:auto}@media all and (orientation: landscape){.mat-datepicker-content-touch .mat-datepicker-content-container{width:64vh;height:80vh}}@media all and (orientation: portrait){.mat-datepicker-content-touch .mat-datepicker-content-container{width:80vw;height:100vw}.mat-datepicker-content-touch .mat-datepicker-content-container-with-actions{height:115vw}}\n"],encapsulation:2,data:{animation:[wd.transformPanel,wd.fadeInCalendar]},changeDetection:0}),t})(),Id=(()=>{class t{constructor(t,e,i,n,s,o,a,l,c){this._dialog=t,this._overlay=e,this._ngZone=i,this._viewContainerRef=n,this._dateAdapter=o,this._dir=a,this._document=l,this._model=c,this._inputStateChanges=ye.a.EMPTY,this.startView="month",this._touchUi=!1,this.xPosition="start",this.yPosition="below",this._restoreFocus=!0,this.yearSelected=new r.o,this.monthSelected=new r.o,this.viewChanged=new r.o(!0),this.openedStream=new r.o,this.closedStream=new r.o,this._opened=!1,this.id="mat-datepicker-"+xd++,this._focusedElementBeforeOpen=null,this._backdropHarnessClass=`${this.id}-backdrop`,this.stateChanges=new _e.a,this._scrollStrategy=s}get startAt(){return this._startAt||(this.datepickerInput?this.datepickerInput.getStartValue():null)}set startAt(t){this._startAt=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get color(){return this._color||(this.datepickerInput?this.datepickerInput.getThemePalette():void 0)}set color(t){this._color=t}get touchUi(){return this._touchUi}set touchUi(t){this._touchUi=ti(t)}get disabled(){return void 0===this._disabled&&this.datepickerInput?this.datepickerInput.disabled:!!this._disabled}set disabled(t){const e=ti(t);e!==this._disabled&&(this._disabled=e,this.stateChanges.next(void 0))}get restoreFocus(){return this._restoreFocus}set restoreFocus(t){this._restoreFocus=ti(t)}get panelClass(){return this._panelClass}set panelClass(t){this._panelClass=oi(t)}get opened(){return this._opened}set opened(t){ti(t)?this.open():this.close()}_getMinDate(){return this.datepickerInput&&this.datepickerInput.min}_getMaxDate(){return this.datepickerInput&&this.datepickerInput.max}_getDateFilter(){return this.datepickerInput&&this.datepickerInput.dateFilter}ngOnChanges(t){const e=t.xPosition||t.yPosition;e&&!e.firstChange&&this._popupRef&&(this._setConnectedPositions(this._popupRef.getConfig().positionStrategy),this.opened&&this._popupRef.updatePosition()),this.stateChanges.next(void 0)}ngOnDestroy(){this._destroyPopup(),this.close(),this._inputStateChanges.unsubscribe(),this.stateChanges.complete()}select(t){this._model.add(t)}_selectYear(t){this.yearSelected.emit(t)}_selectMonth(t){this.monthSelected.emit(t)}_viewChanged(t){this.viewChanged.emit(t)}registerInput(t){return this._inputStateChanges.unsubscribe(),this.datepickerInput=t,this._inputStateChanges=t.stateChanges.subscribe(()=>this.stateChanges.next(void 0)),this._model}registerActions(t){this._actionsPortal=t}removeActions(t){t===this._actionsPortal&&(this._actionsPortal=null)}open(){this._opened||this.disabled||(this._document&&(this._focusedElementBeforeOpen=this._document.activeElement),this.touchUi?this._openAsDialog():this._openAsPopup(),this._opened=!0,this.openedStream.emit())}close(){if(!this._opened)return;if(this._popupComponentRef&&this._popupRef){const t=this._popupComponentRef.instance;t._startExitAnimation(),t._animationDone.pipe(Qe(1)).subscribe(()=>this._destroyPopup())}this._dialogRef&&(this._dialogRef.close(),this._dialogRef=null);const t=()=>{this._opened&&(this._opened=!1,this.closedStream.emit(),this._focusedElementBeforeOpen=null)};this._restoreFocus&&this._focusedElementBeforeOpen&&"function"==typeof this._focusedElementBeforeOpen.focus?(this._focusedElementBeforeOpen.focus(),setTimeout(t)):t()}_applyPendingSelection(){var t,e;const i=(null===(t=this._popupComponentRef)||void 0===t?void 0:t.instance)||(null===(e=this._dialogRef)||void 0===e?void 0:e.componentInstance);null==i||i._applyPendingSelection()}_openAsDialog(){this._dialogRef&&this._dialogRef.close(),this._dialogRef=this._dialog.open(Dd,{direction:this._dir?this._dir.value:"ltr",viewContainerRef:this._viewContainerRef,panelClass:"mat-datepicker-dialog",hasBackdrop:!0,disableClose:!1,backdropClass:["cdk-overlay-dark-backdrop",this._backdropHarnessClass],width:"",height:"",minWidth:"",minHeight:"",maxWidth:"80vw",maxHeight:"",position:{},autoFocus:!1,restoreFocus:!1}),this._dialogRef.afterClosed().subscribe(()=>this.close()),this._forwardContentValues(this._dialogRef.componentInstance)}_openAsPopup(){const t=new pe(Dd,this._viewContainerRef);this._destroyPopup(),this._createPopup(),this._popupComponentRef=this._popupRef.attach(t),this._forwardContentValues(this._popupComponentRef.instance),this._ngZone.onStable.pipe(Qe(1)).subscribe(()=>{this._popupRef.updatePosition()})}_forwardContentValues(t){t.datepicker=this,t.color=this.color,t._actionsPortal=this._actionsPortal}_createPopup(){const t=this._overlay.position().flexibleConnectedTo(this.datepickerInput.getConnectedOverlayOrigin()).withTransformOriginOn(".mat-datepicker-content").withFlexibleDimensions(!1).withViewportMargin(8).withLockedPosition(),e=new br({positionStrategy:this._setConnectedPositions(t),hasBackdrop:!0,backdropClass:["mat-overlay-transparent-backdrop",this._backdropHarnessClass],direction:this._dir,scrollStrategy:this._scrollStrategy(),panelClass:"mat-datepicker-popup"});this._popupRef=this._overlay.create(e),this._popupRef.overlayElement.setAttribute("role","dialog"),Object(or.a)(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(He(t=>27===t.keyCode&&!ke(t)||this.datepickerInput&&ke(t,"altKey")&&38===t.keyCode))).subscribe(t=>{t&&t.preventDefault(),this.close()})}_destroyPopup(){this._popupRef&&(this._popupRef.dispose(),this._popupRef=this._popupComponentRef=null)}_setConnectedPositions(t){const e="end"===this.xPosition?"end":"start",i="start"===e?"end":"start",n="above"===this.yPosition?"bottom":"top",r="top"===n?"bottom":"top";return t.withPositions([{originX:e,originY:r,overlayX:e,overlayY:n},{originX:e,originY:n,overlayX:e,overlayY:r},{originX:i,originY:r,overlayX:i,overlayY:n},{originX:i,originY:n,overlayX:i,overlayY:r}])}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Gl),r.Pb(Fr),r.Pb(r.B),r.Pb(r.S),r.Pb(Cd),r.Pb(Ta,8),r.Pb(Zn,8),r.Pb(a,8),r.Pb(sd))},t.\u0275dir=r.Kb({type:t,inputs:{startView:"startView",xPosition:"xPosition",yPosition:"yPosition",startAt:"startAt",color:"color",touchUi:"touchUi",disabled:"disabled",restoreFocus:"restoreFocus",panelClass:"panelClass",opened:"opened",calendarHeaderComponent:"calendarHeaderComponent",dateClass:"dateClass"},outputs:{yearSelected:"yearSelected",monthSelected:"monthSelected",viewChanged:"viewChanged",openedStream:"opened",closedStream:"closed"},features:[r.Bb]}),t})(),Pd=(()=>{class t extends Id{}return t.\u0275fac=function(e){return Od(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-datepicker"]],exportAs:["matDatepicker"],features:[r.Cb([ld,{provide:Id,useExisting:t}]),r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();const Od=r.Xb(Pd);class Md{constructor(t,e){this.target=t,this.targetElement=e,this.value=this.target.value}}let Td=(()=>{class t{constructor(t,e,i){this._elementRef=t,this._dateAdapter=e,this._dateFormats=i,this.dateChange=new r.o,this.dateInput=new r.o,this.stateChanges=new _e.a,this._onTouched=()=>{},this._validatorOnChange=()=>{},this._cvaOnChange=()=>{},this._valueChangesSubscription=ye.a.EMPTY,this._localeSubscription=ye.a.EMPTY,this._parseValidator=()=>this._lastValueValid?null:{matDatepickerParse:{text:this._elementRef.nativeElement.value}},this._filterValidator=t=>{const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t.value));return!e||this._matchesFilter(e)?null:{matDatepickerFilter:!0}},this._minValidator=t=>{const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t.value)),i=this._getMinDate();return!i||!e||this._dateAdapter.compareDate(i,e)<=0?null:{matDatepickerMin:{min:i,actual:e}}},this._maxValidator=t=>{const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t.value)),i=this._getMaxDate();return!i||!e||this._dateAdapter.compareDate(i,e)>=0?null:{matDatepickerMax:{max:i,actual:e}}},this._lastValueValid=!1,this._localeSubscription=e.localeChanges.subscribe(()=>{this._assignValueProgrammatically(this.value)})}get value(){return this._model?this._getValueFromModel(this._model.selection):this._pendingValue}set value(t){this._assignValueProgrammatically(t)}get disabled(){return!!this._disabled||this._parentDisabled()}set disabled(t){const e=ti(t),i=this._elementRef.nativeElement;this._disabled!==e&&(this._disabled=e,this.stateChanges.next(void 0)),e&&this._isInitialized&&i.blur&&i.blur()}_getValidators(){return[this._parseValidator,this._minValidator,this._maxValidator,this._filterValidator]}_registerModel(t){this._model=t,this._valueChangesSubscription.unsubscribe(),this._pendingValue&&this._assignValue(this._pendingValue),this._valueChangesSubscription=this._model.selectionChanged.subscribe(t=>{if(this._shouldHandleChangeEvent(t)){const e=this._getValueFromModel(t.selection);this._lastValueValid=this._isValidValue(e),this._cvaOnChange(e),this._onTouched(),this._formatValue(e),this.dateInput.emit(new Md(this,this._elementRef.nativeElement)),this.dateChange.emit(new Md(this,this._elementRef.nativeElement))}})}ngAfterViewInit(){this._isInitialized=!0}ngOnChanges(t){Rd(t,this._dateAdapter)&&this.stateChanges.next(void 0)}ngOnDestroy(){this._valueChangesSubscription.unsubscribe(),this._localeSubscription.unsubscribe(),this.stateChanges.complete()}registerOnValidatorChange(t){this._validatorOnChange=t}validate(t){return this._validator?this._validator(t):null}writeValue(t){this._assignValueProgrammatically(t)}registerOnChange(t){this._cvaOnChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t}_onKeydown(t){t.altKey&&40===t.keyCode&&!this._elementRef.nativeElement.readOnly&&(this._openPopup(),t.preventDefault())}_onInput(t){const e=this._lastValueValid;let i=this._dateAdapter.parse(t,this._dateFormats.parse.dateInput);this._lastValueValid=this._isValidValue(i),i=this._dateAdapter.getValidDateOrNull(i),this._dateAdapter.sameDate(i,this.value)?(t&&!this.value&&this._cvaOnChange(i),e!==this._lastValueValid&&this._validatorOnChange()):(this._assignValue(i),this._cvaOnChange(i),this.dateInput.emit(new Md(this,this._elementRef.nativeElement)))}_onChange(){this.dateChange.emit(new Md(this,this._elementRef.nativeElement))}_onBlur(){this.value&&this._formatValue(this.value),this._onTouched()}_formatValue(t){this._elementRef.nativeElement.value=t?this._dateAdapter.format(t,this._dateFormats.display.dateInput):""}_assignValue(t){this._model?(this._assignValueToModel(t),this._pendingValue=null):this._pendingValue=t}_isValidValue(t){return!t||this._dateAdapter.isValid(t)}_parentDisabled(){return!1}_assignValueProgrammatically(t){t=this._dateAdapter.deserialize(t),this._lastValueValid=this._isValidValue(t),t=this._dateAdapter.getValidDateOrNull(t),this._assignValue(t),this._formatValue(t)}_matchesFilter(t){const e=this._getDateFilter();return!e||e(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(Ta,8),r.Pb(Ra,8))},t.\u0275dir=r.Kb({type:t,inputs:{value:"value",disabled:"disabled"},outputs:{dateChange:"dateChange",dateInput:"dateInput"},features:[r.Bb]}),t})();function Rd(t,e){const i=Object.keys(t);for(let n of i){const{previousValue:i,currentValue:r}=t[n];if(!e.isDateInstance(i)||!e.isDateInstance(r))return!0;if(!e.sameDate(i,r))return!0}return!1}const Vd={provide:rc,useExisting:Object(r.W)(()=>Ld),multi:!0},Fd={provide:hc,useExisting:Object(r.W)(()=>Ld),multi:!0};let Ld=(()=>{class t extends Td{constructor(t,e,i,n){super(t,e,i),this._formField=n,this._closedSubscription=ye.a.EMPTY,this._validator=pc.compose(super._getValidators())}set matDatepicker(t){t&&(this._datepicker=t,this._closedSubscription=t.closedStream.subscribe(()=>this._onTouched()),this._registerModel(t.registerInput(this)))}get min(){return this._min}set min(t){const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t));this._dateAdapter.sameDate(e,this._min)||(this._min=e,this._validatorOnChange())}get max(){return this._max}set max(t){const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t));this._dateAdapter.sameDate(e,this._max)||(this._max=e,this._validatorOnChange())}get dateFilter(){return this._dateFilter}set dateFilter(t){const e=this._matchesFilter(this.value);this._dateFilter=t,this._matchesFilter(this.value)!==e&&this._validatorOnChange()}getConnectedOverlayOrigin(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef}getThemePalette(){return this._formField?this._formField.color:void 0}getStartValue(){return this.value}ngOnDestroy(){super.ngOnDestroy(),this._closedSubscription.unsubscribe()}_openPopup(){this._datepicker&&this._datepicker.open()}_getValueFromModel(t){return t}_assignValueToModel(t){this._model&&this._model.updateSelection(t,this)}_getMinDate(){return this._min}_getMaxDate(){return this._max}_getDateFilter(){return this._dateFilter}_shouldHandleChangeEvent(t){return t.source!==this}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(Ta,8),r.Pb(Ra,8),r.Pb(vu,8))},t.\u0275dir=r.Kb({type:t,selectors:[["input","matDatepicker",""]],hostAttrs:[1,"mat-datepicker-input"],hostVars:6,hostBindings:function(t,e){1&t&&r.cc("input",function(t){return e._onInput(t.target.value)})("change",function(){return e._onChange()})("blur",function(){return e._onBlur()})("keydown",function(t){return e._onKeydown(t)}),2&t&&(r.Yb("disabled",e.disabled),r.Eb("aria-haspopup",e._datepicker?"dialog":null)("aria-owns",(null==e._datepicker?null:e._datepicker.opened)&&e._datepicker.id||null)("min",e.min?e._dateAdapter.toIso8601(e.min):null)("max",e.max?e._dateAdapter.toIso8601(e.max):null)("data-mat-calendar",e._datepicker?e._datepicker.id:null))},inputs:{matDatepicker:"matDatepicker",min:"min",max:"max",dateFilter:["matDatepickerFilter","dateFilter"]},exportAs:["matDatepickerInput"],features:[r.Cb([Vd,Fd,{provide:ku,useExisting:t}]),r.Ab]}),t})(),Ud=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","matDatepickerToggleIcon",""]]}),t})(),Bd=(()=>{class t{constructor(t,e,i){this._intl=t,this._changeDetectorRef=e,this._stateChanges=ye.a.EMPTY;const n=Number(i);this.tabIndex=n||0===n?n:null}get disabled(){return void 0===this._disabled&&this.datepicker?this.datepicker.disabled:!!this._disabled}set disabled(t){this._disabled=ti(t)}ngOnChanges(t){t.datepicker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}_open(t){this.datepicker&&!this.disabled&&(this.datepicker.open(),t.stopPropagation())}_watchStateChanges(){const t=this.datepicker?this.datepicker.stateChanges:Se(),e=this.datepicker&&this.datepicker.datepickerInput?this.datepicker.datepickerInput.stateChanges:Se(),i=this.datepicker?Object(or.a)(this.datepicker.openedStream,this.datepicker.closedStream):Se();this._stateChanges.unsubscribe(),this._stateChanges=Object(or.a)(this._intl.changes,t,e,i).subscribe(()=>this._changeDetectorRef.markForCheck())}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Qu),r.Pb(r.h),r.ac("tabindex"))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-datepicker-toggle"]],contentQueries:function(t,e,i){if(1&t&&r.Ib(i,Ud,1),2&t){let t;r.vc(t=r.dc())&&(e._customIcon=t.first)}},viewQuery:function(t,e){if(1&t&&r.Pc($u,1),2&t){let t;r.vc(t=r.dc())&&(e._button=t.first)}},hostAttrs:[1,"mat-datepicker-toggle"],hostVars:8,hostBindings:function(t,e){1&t&&r.cc("click",function(t){return e._open(t)}),2&t&&(r.Eb("tabindex",null)("data-mat-calendar",e.datepicker?e.datepicker.id:null),r.Hb("mat-datepicker-toggle-active",e.datepicker&&e.datepicker.opened)("mat-accent",e.datepicker&&"accent"===e.datepicker.color)("mat-warn",e.datepicker&&"warn"===e.datepicker.color))},inputs:{tabIndex:"tabIndex",disabled:"disabled",datepicker:["for","datepicker"],ariaLabel:["aria-label","ariaLabel"],disableRipple:"disableRipple"},exportAs:["matDatepickerToggle"],features:[r.Bb],ngContentSelectors:Zu,decls:4,vars:6,consts:[["mat-icon-button","","type","button",3,"disabled","disableRipple"],["button",""],["class","mat-datepicker-toggle-default-icon","viewBox","0 0 24 24","width","24px","height","24px","fill","currentColor","focusable","false",4,"ngIf"],["viewBox","0 0 24 24","width","24px","height","24px","fill","currentColor","focusable","false",1,"mat-datepicker-toggle-default-icon"],["d","M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"]],template:function(t,e){1&t&&(r.mc(Wu),r.Vb(0,"button",0,1),r.Ic(2,Gu,2,0,"svg",2),r.lc(3),r.Ub()),2&t&&(r.nc("disabled",e.disabled)("disableRipple",e.disableRipple),r.Eb("aria-haspopup",e.datepicker?"dialog":null)("aria-label",e.ariaLabel||e._intl.openCalendarLabel)("tabindex",e.disabled?-1:e.tabIndex),r.Db(2),r.nc("ngIf",!e._customIcon))},directives:[Dl,ut],styles:[".mat-form-field-appearance-legacy .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-datepicker-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-datepicker-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-datepicker-toggle-default-icon{margin:auto}\n"],encapsulation:2,changeDetection:0}),t})();const Nd=new r.s("MAT_DATE_RANGE_INPUT_PARENT"),jd=Pa((()=>{class t extends Td{constructor(t,e,i,n,r,s,o,a){super(e,o,a),this._rangeInput=t,this._defaultErrorStateMatcher=i,this._injector=n,this._parentForm=r,this._parentFormGroup=s}ngOnInit(){const t=this._injector.get(Tc,null,r.r.Self);t&&(this.ngControl=t)}ngDoCheck(){this.ngControl&&this.updateErrorState()}isEmpty(){return 0===this._elementRef.nativeElement.value.length}_getPlaceholder(){return this._elementRef.nativeElement.placeholder}focus(){this._elementRef.nativeElement.focus()}_onInput(t){super._onInput(t),this._rangeInput._handleChildValueChange()}_openPopup(){this._rangeInput._openDatepicker()}_getMinDate(){return this._rangeInput.min}_getMaxDate(){return this._rangeInput.max}_getDateFilter(){return this._rangeInput.dateFilter}_parentDisabled(){return this._rangeInput._groupDisabled}_shouldHandleChangeEvent({source:t}){return t!==this._rangeInput._startInput&&t!==this._rangeInput._endInput}_assignValueProgrammatically(t){super._assignValueProgrammatically(t);const e=this===this._rangeInput._startInput?this._rangeInput._endInput:this._rangeInput._startInput;null==e||e._validatorOnChange()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Nd),r.Pb(r.l),r.Pb($a),r.Pb(r.t),r.Pb(oh,8),r.Pb(_h,8),r.Pb(Ta,8),r.Pb(Ra,8))},t.\u0275dir=r.Kb({type:t,features:[r.Ab]}),t})());let zd=(()=>{class t extends jd{constructor(t,e,i,n,r,s,o,a){super(t,e,i,n,r,s,o,a),this._startValidator=t=>{const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t.value)),i=this._model?this._model.selection.end:null;return!e||!i||this._dateAdapter.compareDate(e,i)<=0?null:{matStartDateInvalid:{end:i,actual:e}}},this._validator=pc.compose([...super._getValidators(),this._startValidator])}ngOnInit(){super.ngOnInit()}ngDoCheck(){super.ngDoCheck()}_getValueFromModel(t){return t.start}_assignValueToModel(t){if(this._model){const e=new rd(t,this._model.selection.end);this._model.updateSelection(e,this)}}_formatValue(t){super._formatValue(t),this._rangeInput._handleChildValueChange()}getMirrorValue(){const t=this._elementRef.nativeElement,e=t.value;return e.length>0?e:t.placeholder}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Nd),r.Pb(r.l),r.Pb($a),r.Pb(r.t),r.Pb(oh,8),r.Pb(_h,8),r.Pb(Ta,8),r.Pb(Ra,8))},t.\u0275dir=r.Kb({type:t,selectors:[["input","matStartDate",""]],hostAttrs:["type","text",1,"mat-start-date","mat-date-range-input-inner"],hostVars:6,hostBindings:function(t,e){1&t&&r.cc("input",function(t){return e._onInput(t.target.value)})("change",function(){return e._onChange()})("keydown",function(t){return e._onKeydown(t)})("blur",function(){return e._onBlur()}),2&t&&(r.Yb("disabled",e.disabled),r.Eb("id",e._rangeInput.id)("aria-haspopup",e._rangeInput.rangePicker?"dialog":null)("aria-owns",(null==e._rangeInput.rangePicker?null:e._rangeInput.rangePicker.opened)&&e._rangeInput.rangePicker.id||null)("min",e._getMinDate()?e._dateAdapter.toIso8601(e._getMinDate()):null)("max",e._getMaxDate()?e._dateAdapter.toIso8601(e._getMaxDate()):null))},inputs:{errorStateMatcher:"errorStateMatcher"},outputs:{dateChange:"dateChange",dateInput:"dateInput"},features:[r.Cb([{provide:rc,useExisting:t,multi:!0},{provide:hc,useExisting:t,multi:!0}]),r.Ab]}),t})(),Hd=(()=>{class t extends jd{constructor(t,e,i,n,r,s,o,a){super(t,e,i,n,r,s,o,a),this._endValidator=t=>{const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t.value)),i=this._model?this._model.selection.start:null;return!e||!i||this._dateAdapter.compareDate(e,i)>=0?null:{matEndDateInvalid:{start:i,actual:e}}},this._validator=pc.compose([...super._getValidators(),this._endValidator])}ngOnInit(){super.ngOnInit()}ngDoCheck(){super.ngDoCheck()}_getValueFromModel(t){return t.end}_assignValueToModel(t){if(this._model){const e=new rd(this._model.selection.start,t);this._model.updateSelection(e,this)}}_onKeydown(t){8!==t.keyCode||this._elementRef.nativeElement.value||this._rangeInput._startInput.focus(),super._onKeydown(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Nd),r.Pb(r.l),r.Pb($a),r.Pb(r.t),r.Pb(oh,8),r.Pb(_h,8),r.Pb(Ta,8),r.Pb(Ra,8))},t.\u0275dir=r.Kb({type:t,selectors:[["input","matEndDate",""]],hostAttrs:["type","text",1,"mat-end-date","mat-date-range-input-inner"],hostVars:5,hostBindings:function(t,e){1&t&&r.cc("input",function(t){return e._onInput(t.target.value)})("change",function(){return e._onChange()})("keydown",function(t){return e._onKeydown(t)})("blur",function(){return e._onBlur()}),2&t&&(r.Yb("disabled",e.disabled),r.Eb("aria-haspopup",e._rangeInput.rangePicker?"dialog":null)("aria-owns",(null==e._rangeInput.rangePicker?null:e._rangeInput.rangePicker.opened)&&e._rangeInput.rangePicker.id||null)("min",e._getMinDate()?e._dateAdapter.toIso8601(e._getMinDate()):null)("max",e._getMaxDate()?e._dateAdapter.toIso8601(e._getMaxDate()):null))},inputs:{errorStateMatcher:"errorStateMatcher"},outputs:{dateChange:"dateChange",dateInput:"dateInput"},features:[r.Cb([{provide:rc,useExisting:t,multi:!0},{provide:hc,useExisting:t,multi:!0}]),r.Ab]}),t})(),Kd=0,$d=(()=>{class t{constructor(t,e,i,n,r){this._changeDetectorRef=t,this._elementRef=e,this._dateAdapter=n,this._formField=r,this._closedSubscription=ye.a.EMPTY,this.id="mat-date-range-input-"+Kd++,this.focused=!1,this.controlType="mat-date-range-input",this._groupDisabled=!1,this._ariaDescribedBy=null,this.separator="\u2013",this.comparisonStart=null,this.comparisonEnd=null,this.stateChanges=new _e.a,this.ngControl=i}get value(){return this._model?this._model.selection:null}get shouldLabelFloat(){return this.focused||!this.empty}get placeholder(){var t,e;const i=(null===(t=this._startInput)||void 0===t?void 0:t._getPlaceholder())||"",n=(null===(e=this._endInput)||void 0===e?void 0:e._getPlaceholder())||"";return i||n?`${i} ${this.separator} ${n}`:""}get rangePicker(){return this._rangePicker}set rangePicker(t){t&&(this._model=t.registerInput(this),this._rangePicker=t,this._closedSubscription.unsubscribe(),this._closedSubscription=t.closedStream.subscribe(()=>{var t,e;null===(t=this._startInput)||void 0===t||t._onTouched(),null===(e=this._endInput)||void 0===e||e._onTouched()}),this._registerModel(this._model))}get required(){return!!this._required}set required(t){this._required=ti(t)}get dateFilter(){return this._dateFilter}set dateFilter(t){const e=this._startInput,i=this._endInput,n=e&&e._matchesFilter(e.value),r=i&&i._matchesFilter(e.value);this._dateFilter=t,e&&e._matchesFilter(e.value)!==n&&e._validatorOnChange(),i&&i._matchesFilter(i.value)!==r&&i._validatorOnChange()}get min(){return this._min}set min(t){const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t));this._dateAdapter.sameDate(e,this._min)||(this._min=e,this._revalidate())}get max(){return this._max}set max(t){const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t));this._dateAdapter.sameDate(e,this._max)||(this._max=e,this._revalidate())}get disabled(){return this._startInput&&this._endInput?this._startInput.disabled&&this._endInput.disabled:this._groupDisabled}set disabled(t){const e=ti(t);e!==this._groupDisabled&&(this._groupDisabled=e,this.stateChanges.next(void 0))}get errorState(){return!(!this._startInput||!this._endInput)&&(this._startInput.errorState||this._endInput.errorState)}get empty(){const t=!!this._startInput&&this._startInput.isEmpty(),e=!!this._endInput&&this._endInput.isEmpty();return t&&e}setDescribedByIds(t){this._ariaDescribedBy=t.length?t.join(" "):null}onContainerClick(){this.focused||this.disabled||(this._model&&this._model.selection.start?this._endInput.focus():this._startInput.focus())}ngAfterContentInit(){this._model&&this._registerModel(this._model),Object(or.a)(this._startInput.stateChanges,this._endInput.stateChanges).subscribe(()=>{this.stateChanges.next(void 0)})}ngOnChanges(t){Rd(t,this._dateAdapter)&&this.stateChanges.next(void 0)}ngOnDestroy(){this._closedSubscription.unsubscribe(),this.stateChanges.complete()}getStartValue(){return this.value?this.value.start:null}getThemePalette(){return this._formField?this._formField.color:void 0}getConnectedOverlayOrigin(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef}_getInputMirrorValue(){return this._startInput?this._startInput.getMirrorValue():""}_shouldHidePlaceholders(){return!!this._startInput&&!this._startInput.isEmpty()}_handleChildValueChange(){this.stateChanges.next(void 0),this._changeDetectorRef.markForCheck()}_openDatepicker(){this._rangePicker&&this._rangePicker.open()}_shouldHideSeparator(){return(!this._formField||this._formField._hideControlPlaceholder())&&this.empty}_getAriaLabelledby(){const t=this._formField;return t&&t._hasFloatingLabel()?t._labelId:null}_revalidate(){this._startInput&&this._startInput._validatorOnChange(),this._endInput&&this._endInput._validatorOnChange()}_registerModel(t){this._startInput&&this._startInput._registerModel(t),this._endInput&&this._endInput._registerModel(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(r.l),r.Pb(Oc,10),r.Pb(Ta,8),r.Pb(vu,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-date-range-input"]],contentQueries:function(t,e,i){if(1&t&&(r.Ib(i,zd,1),r.Ib(i,Hd,1)),2&t){let t;r.vc(t=r.dc())&&(e._startInput=t.first),r.vc(t=r.dc())&&(e._endInput=t.first)}},hostAttrs:["role","group",1,"mat-date-range-input"],hostVars:8,hostBindings:function(t,e){2&t&&(r.Eb("id",null)("aria-labelledby",e._getAriaLabelledby())("aria-describedby",e._ariaDescribedBy)("data-mat-calendar",e.rangePicker?e.rangePicker.id:null),r.Hb("mat-date-range-input-hide-placeholders",e._shouldHidePlaceholders())("mat-date-range-input-required",e.required))},inputs:{separator:"separator",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd",rangePicker:"rangePicker",required:"required",dateFilter:"dateFilter",min:"min",max:"max",disabled:"disabled"},exportAs:["matDateRangeInput"],features:[r.Cb([{provide:su,useExisting:t},{provide:Nd,useExisting:t}]),r.Bb],ngContentSelectors:Yu,decls:9,vars:4,consts:[["cdkMonitorSubtreeFocus","",1,"mat-date-range-input-container",3,"cdkFocusChange"],[1,"mat-date-range-input-start-wrapper"],["aria-hidden","true",1,"mat-date-range-input-mirror"],[1,"mat-date-range-input-separator"],[1,"mat-date-range-input-end-wrapper"]],template:function(t,e){1&t&&(r.mc(qu),r.Vb(0,"div",0),r.cc("cdkFocusChange",function(t){return e.focused=null!==t}),r.Vb(1,"div",1),r.lc(2),r.Vb(3,"span",2),r.Kc(4),r.Ub(),r.Ub(),r.Vb(5,"span",3),r.Kc(6),r.Ub(),r.Vb(7,"div",4),r.lc(8,1),r.Ub(),r.Ub()),2&t&&(r.Db(4),r.Lc(e._getInputMirrorValue()),r.Db(1),r.Hb("mat-date-range-input-separator-hidden",e._shouldHideSeparator()),r.Db(1),r.Lc(e.separator))},directives:[Qi],styles:[".mat-date-range-input{display:block;width:100%}.mat-date-range-input-container{display:flex;align-items:center}.mat-date-range-input-separator{transition:opacity 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);margin:0 4px}.mat-date-range-input-separator-hidden{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:0;transition:none}.mat-date-range-input-inner{font:inherit;background:transparent;color:currentColor;border:none;outline:none;padding:0;margin:0;vertical-align:bottom;text-align:inherit;-webkit-appearance:none;width:100%}.mat-date-range-input-inner::-ms-clear,.mat-date-range-input-inner::-ms-reveal{display:none}.mat-date-range-input-inner:-moz-ui-invalid{box-shadow:none}.mat-date-range-input-inner::placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-moz-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-webkit-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner:-ms-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-date-range-input-mirror{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;visibility:hidden;white-space:nowrap;display:inline-block;min-width:2px}.mat-date-range-input-start-wrapper{position:relative;overflow:hidden;max-width:calc(50% - 4px)}.mat-date-range-input-start-wrapper .mat-date-range-input-inner{position:absolute;top:0;left:0}.mat-date-range-input-end-wrapper{flex-grow:1;max-width:calc(50% - 4px)}.mat-form-field-type-mat-date-range-input .mat-form-field-infix{width:200px}\n"],encapsulation:2,changeDetection:0}),t})(),Gd=(()=>{class t extends Id{_forwardContentValues(t){super._forwardContentValues(t);const e=this.datepickerInput;e&&(t.comparisonStart=e.comparisonStart,t.comparisonEnd=e.comparisonEnd)}}return t.\u0275fac=function(e){return Wd(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-date-range-picker"]],exportAs:["matDateRangePicker"],features:[r.Cb([cd,dd,{provide:Id,useExisting:t}]),r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();const Wd=r.Xb(Gd);let Zd=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[Qu,Sd],imports:[[Et,Pl,Jl,zr,Ji,ve,Sa],rr]}),t})();function qd(t){return function(e){const i=new Yd(t),n=e.lift(i);return i.caught=n}}class Yd{constructor(t){this.selector=t}call(t,e){return e.subscribe(new Qd(t,this.selector,this.caught))}}class Qd extends bn.b{constructor(t,e,i){super(t),this.selector=e,this.caught=i}error(t){if(!this.isStopped){let i;try{i=this.selector(t,this.caught)}catch(e){return void super.error(e)}this._unsubscribeAndRecycle();const n=new bn.a(this);this.add(n);const r=Object(bn.c)(i,n);r!==n&&this.add(r)}}}function Xd(t){return e=>e.lift(new Jd(t))}class Jd{constructor(t){this.callback=t}call(t,e){return e.subscribe(new tp(t,this.callback))}}class tp extends Ee.a{constructor(t,e){super(t),this.add(new ye.a(e))}}var ep=i("w1tV"),ip=i("5+tZ");function np(t,e){return Object(ip.a)(t,e,1)}class rp{}class sp{}class op{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?()=>{this.headers=new Map,t.split("\n").forEach(t=>{const e=t.indexOf(":");if(e>0){const i=t.slice(0,e),n=i.toLowerCase(),r=t.slice(e+1).trim();this.maybeSetNormalizedName(i,n),this.headers.has(n)?this.headers.get(n).push(r):this.headers.set(n,[r])}})}:()=>{this.headers=new Map,Object.keys(t).forEach(e=>{let i=t[e];const n=e.toLowerCase();"string"==typeof i&&(i=[i]),i.length>0&&(this.headers.set(n,i),this.maybeSetNormalizedName(e,n))})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();const e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof op?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){const e=new op;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof op?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){const e=t.name.toLowerCase();switch(t.op){case"a":case"s":let i=t.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(t.name,e);const n=("a"===t.op?this.headers.get(e):void 0)||[];n.push(...i),this.headers.set(e,n);break;case"d":const r=t.value;if(r){let t=this.headers.get(e);if(!t)return;t=t.filter(t=>-1===r.indexOf(t)),0===t.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,t)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}}class ap{encodeKey(t){return lp(t)}encodeValue(t){return lp(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}function lp(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}class cp{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new ap,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function(t,e){const i=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(t=>{const n=t.indexOf("="),[r,s]=-1==n?[e.decodeKey(t),""]:[e.decodeKey(t.slice(0,n)),e.decodeValue(t.slice(n+1))],o=i.get(r)||[];o.push(s),i.set(r,o)}),i}(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{const i=t.fromObject[e];this.map.set(e,Array.isArray(i)?i:[i])})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();const e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}appendAll(t){const e=[];return Object.keys(t).forEach(i=>{const n=t[i];Array.isArray(n)?n.forEach(t=>{e.push({param:i,value:t,op:"a"})}):e.push({param:i,value:n,op:"a"})}),this.clone(e)}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{const e=this.encoder.encodeKey(t);return this.map.get(t).map(t=>e+"="+this.encoder.encodeValue(t)).join("&")}).filter(t=>""!==t).join("&")}clone(t){const e=new cp({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":const e=("a"===t.op?this.map.get(t.param):void 0)||[];e.push(t.value),this.map.set(t.param,e);break;case"d":if(void 0===t.value){this.map.delete(t.param);break}{let e=this.map.get(t.param)||[];const i=e.indexOf(t.value);-1!==i&&e.splice(i,1),e.length>0?this.map.set(t.param,e):this.map.delete(t.param)}}}),this.cloneFrom=this.updates=null)}}function hp(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer}function up(t){return"undefined"!=typeof Blob&&t instanceof Blob}function dp(t){return"undefined"!=typeof FormData&&t instanceof FormData}class pp{constructor(t,e,i,n){let r;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||n?(this.body=void 0!==i?i:null,r=n):r=i,r&&(this.reportProgress=!!r.reportProgress,this.withCredentials=!!r.withCredentials,r.responseType&&(this.responseType=r.responseType),r.headers&&(this.headers=r.headers),r.params&&(this.params=r.params)),this.headers||(this.headers=new op),this.params){const t=this.params.toString();if(0===t.length)this.urlWithParams=e;else{const i=e.indexOf("?");this.urlWithParams=e+(-1===i?"?":i<e.length-1?"&":"")+t}}else this.params=new cp,this.urlWithParams=e}serializeBody(){return null===this.body?null:hp(this.body)||up(this.body)||dp(this.body)||"string"==typeof this.body?this.body:this.body instanceof cp?this.body.toString():"object"==typeof this.body||"boolean"==typeof this.body||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return null===this.body||dp(this.body)?null:up(this.body)?this.body.type||null:hp(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof cp?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||Array.isArray(this.body)?"application/json":null}clone(t={}){const e=t.method||this.method,i=t.url||this.url,n=t.responseType||this.responseType,r=void 0!==t.body?t.body:this.body,s=void 0!==t.withCredentials?t.withCredentials:this.withCredentials,o=void 0!==t.reportProgress?t.reportProgress:this.reportProgress;let a=t.headers||this.headers,l=t.params||this.params;return void 0!==t.setHeaders&&(a=Object.keys(t.setHeaders).reduce((e,i)=>e.set(i,t.setHeaders[i]),a)),t.setParams&&(l=Object.keys(t.setParams).reduce((e,i)=>e.set(i,t.setParams[i]),l)),new pp(e,i,r,{params:l,headers:a,reportProgress:o,responseType:n,withCredentials:s})}}var fp=function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t}({});class mp{constructor(t,e=200,i="OK"){this.headers=t.headers||new op,this.status=void 0!==t.status?t.status:e,this.statusText=t.statusText||i,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}}class gp extends mp{constructor(t={}){super(t),this.type=fp.ResponseHeader}clone(t={}){return new gp({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class Ap extends mp{constructor(t={}){super(t),this.type=fp.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new Ap({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class bp extends mp{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${t.url||"(unknown url)"}`:`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}}function vp(t,e){return{body:e,headers:t.headers,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}let _p=(()=>{class t{constructor(t){this.handler=t}request(t,e,i={}){let n;if(t instanceof pp)n=t;else{let r,s;r=i.headers instanceof op?i.headers:new op(i.headers),i.params&&(s=i.params instanceof cp?i.params:new cp({fromObject:i.params})),n=new pp(t,e,void 0!==i.body?i.body:null,{headers:r,params:s,reportProgress:i.reportProgress,responseType:i.responseType||"json",withCredentials:i.withCredentials})}const r=Se(n).pipe(np(t=>this.handler.handle(t)));if(t instanceof pp||"events"===i.observe)return r;const s=r.pipe(He(t=>t instanceof Ap));switch(i.observe||"body"){case"body":switch(n.responseType){case"arraybuffer":return s.pipe(Object(Ge.a)(t=>{if(null!==t.body&&!(t.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return t.body}));case"blob":return s.pipe(Object(Ge.a)(t=>{if(null!==t.body&&!(t.body instanceof Blob))throw new Error("Response is not a Blob.");return t.body}));case"text":return s.pipe(Object(Ge.a)(t=>{if(null!==t.body&&"string"!=typeof t.body)throw new Error("Response is not a string.");return t.body}));case"json":default:return s.pipe(Object(Ge.a)(t=>t.body))}case"response":return s;default:throw new Error(`Unreachable: unhandled observe type ${i.observe}}`)}}delete(t,e={}){return this.request("DELETE",t,e)}get(t,e={}){return this.request("GET",t,e)}head(t,e={}){return this.request("HEAD",t,e)}jsonp(t,e){return this.request("JSONP",t,{params:(new cp).append(e,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,e={}){return this.request("OPTIONS",t,e)}patch(t,e,i={}){return this.request("PATCH",t,vp(i,e))}post(t,e,i={}){return this.request("POST",t,vp(i,e))}put(t,e,i={}){return this.request("PUT",t,vp(i,e))}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(rp))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();class yp{constructor(t,e){this.next=t,this.interceptor=e}handle(t){return this.interceptor.intercept(t,this.next)}}const wp=new r.s("HTTP_INTERCEPTORS");let xp=(()=>{class t{intercept(t,e){return e.handle(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();const Cp=/^\)\]\}',?\n/;class Sp{}let kp=(()=>{class t{constructor(){}build(){return new XMLHttpRequest}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),Ep=(()=>{class t{constructor(t){this.xhrFactory=t}handle(t){if("JSONP"===t.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new Ze.a(e=>{const i=this.xhrFactory.build();if(i.open(t.method,t.urlWithParams),t.withCredentials&&(i.withCredentials=!0),t.headers.forEach((t,e)=>i.setRequestHeader(t,e.join(","))),t.headers.has("Accept")||i.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){const e=t.detectContentTypeHeader();null!==e&&i.setRequestHeader("Content-Type",e)}if(t.responseType){const e=t.responseType.toLowerCase();i.responseType="json"!==e?e:"text"}const n=t.serializeBody();let r=null;const s=()=>{if(null!==r)return r;const e=1223===i.status?204:i.status,n=i.statusText||"OK",s=new op(i.getAllResponseHeaders()),o=function(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(i)||t.url;return r=new gp({headers:s,status:e,statusText:n,url:o}),r},o=()=>{let{headers:n,status:r,statusText:o,url:a}=s(),l=null;204!==r&&(l=void 0===i.response?i.responseText:i.response),0===r&&(r=l?200:0);let c=r>=200&&r<300;if("json"===t.responseType&&"string"==typeof l){const t=l;l=l.replace(Cp,"");try{l=""!==l?JSON.parse(l):null}catch(h){l=t,c&&(c=!1,l={error:h,text:l})}}c?(e.next(new Ap({body:l,headers:n,status:r,statusText:o,url:a||void 0})),e.complete()):e.error(new bp({error:l,headers:n,status:r,statusText:o,url:a||void 0}))},a=t=>{const{url:n}=s(),r=new bp({error:t,status:i.status||0,statusText:i.statusText||"Unknown Error",url:n||void 0});e.error(r)};let l=!1;const c=n=>{l||(e.next(s()),l=!0);let r={type:fp.DownloadProgress,loaded:n.loaded};n.lengthComputable&&(r.total=n.total),"text"===t.responseType&&i.responseText&&(r.partialText=i.responseText),e.next(r)},h=t=>{let i={type:fp.UploadProgress,loaded:t.loaded};t.lengthComputable&&(i.total=t.total),e.next(i)};return i.addEventListener("load",o),i.addEventListener("error",a),i.addEventListener("timeout",a),i.addEventListener("abort",a),t.reportProgress&&(i.addEventListener("progress",c),null!==n&&i.upload&&i.upload.addEventListener("progress",h)),i.send(n),e.next({type:fp.Sent}),()=>{i.removeEventListener("error",a),i.removeEventListener("abort",a),i.removeEventListener("load",o),i.removeEventListener("timeout",a),t.reportProgress&&(i.removeEventListener("progress",c),null!==n&&i.upload&&i.upload.removeEventListener("progress",h)),i.readyState!==i.DONE&&i.abort()}})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Sp))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();const Dp=new r.s("XSRF_COOKIE_NAME"),Ip=new r.s("XSRF_HEADER_NAME");class Pp{}let Op=(()=>{class t{constructor(t,e,i){this.doc=t,this.platform=e,this.cookieName=i,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=ot(t,this.cookieName),this.lastCookieString=t),this.lastToken}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(a),r.Zb(r.D),r.Zb(Dp))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),Mp=(()=>{class t{constructor(t,e){this.tokenService=t,this.headerName=e}intercept(t,e){const i=t.url.toLowerCase();if("GET"===t.method||"HEAD"===t.method||i.startsWith("http://")||i.startsWith("https://"))return e.handle(t);const n=this.tokenService.getToken();return null===n||t.headers.has(this.headerName)||(t=t.clone({headers:t.headers.set(this.headerName,n)})),e.handle(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Pp),r.Zb(Ip))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),Tp=(()=>{class t{constructor(t,e){this.backend=t,this.injector=e,this.chain=null}handle(t){if(null===this.chain){const t=this.injector.get(wp,[]);this.chain=t.reduceRight((t,e)=>new yp(t,e),this.backend)}return this.chain.handle(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(sp),r.Zb(r.t))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),Rp=(()=>{class t{static disable(){return{ngModule:t,providers:[{provide:Mp,useClass:xp}]}}static withOptions(e={}){return{ngModule:t,providers:[e.cookieName?{provide:Dp,useValue:e.cookieName}:[],e.headerName?{provide:Ip,useValue:e.headerName}:[]]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[Mp,{provide:wp,useExisting:Mp,multi:!0},{provide:Pp,useClass:Op},{provide:Dp,useValue:"XSRF-TOKEN"},{provide:Ip,useValue:"X-XSRF-TOKEN"}]}),t})(),Vp=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[_p,{provide:rp,useClass:Tp},Ep,{provide:sp,useExisting:Ep},kp,{provide:Sp,useExisting:kp}],imports:[[Rp.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),t})();const Fp=["*"];function Lp(t){return Error(`Unable to find icon with the name "${t}"`)}function Up(t){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${t}".`)}function Bp(t){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${t}".`)}class Np{constructor(t,e,i){this.url=t,this.svgText=e,this.options=i}}let jp=(()=>{class t{constructor(t,e,i,n){this._httpClient=t,this._sanitizer=e,this._errorHandler=n,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._resolvers=[],this._defaultFontSetClass="material-icons",this._document=i}addSvgIcon(t,e,i){return this.addSvgIconInNamespace("",t,e,i)}addSvgIconLiteral(t,e,i){return this.addSvgIconLiteralInNamespace("",t,e,i)}addSvgIconInNamespace(t,e,i,n){return this._addSvgIconConfig(t,e,new Np(i,null,n))}addSvgIconResolver(t){return this._resolvers.push(t),this}addSvgIconLiteralInNamespace(t,e,i,n){const s=this._sanitizer.sanitize(r.L.HTML,i);if(!s)throw Bp(i);return this._addSvgIconConfig(t,e,new Np("",s,n))}addSvgIconSet(t,e){return this.addSvgIconSetInNamespace("",t,e)}addSvgIconSetLiteral(t,e){return this.addSvgIconSetLiteralInNamespace("",t,e)}addSvgIconSetInNamespace(t,e,i){return this._addSvgIconSetConfig(t,new Np(e,null,i))}addSvgIconSetLiteralInNamespace(t,e,i){const n=this._sanitizer.sanitize(r.L.HTML,e);if(!n)throw Bp(e);return this._addSvgIconSetConfig(t,new Np("",n,i))}registerFontClassAlias(t,e=t){return this._fontCssClassesByAlias.set(t,e),this}classNameForFontAlias(t){return this._fontCssClassesByAlias.get(t)||t}setDefaultFontSetClass(t){return this._defaultFontSetClass=t,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(t){const e=this._sanitizer.sanitize(r.L.RESOURCE_URL,t);if(!e)throw Up(t);const i=this._cachedIconsByUrl.get(e);return i?Se(zp(i)):this._loadSvgIconFromConfig(new Np(t,null)).pipe(Pe(t=>this._cachedIconsByUrl.set(e,t)),Object(Ge.a)(t=>zp(t)))}getNamedSvgIcon(t,e=""){const i=Hp(e,t);let n=this._svgIconConfigs.get(i);if(n)return this._getSvgFromConfig(n);if(n=this._getIconConfigFromResolvers(e,t),n)return this._svgIconConfigs.set(i,n),this._getSvgFromConfig(n);const r=this._iconSetConfigs.get(e);return r?this._getSvgFromIconSetConfigs(t,r):Un(Lp(i))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(t){return t.svgText?Se(zp(this._svgElementFromConfig(t))):this._loadSvgIconFromConfig(t).pipe(Object(Ge.a)(t=>zp(t)))}_getSvgFromIconSetConfigs(t,e){const i=this._extractIconWithNameFromAnySet(t,e);return i?Se(i):ec(e.filter(t=>!t.svgText).map(t=>this._loadSvgIconSetFromConfig(t).pipe(qd(e=>{const i=this._sanitizer.sanitize(r.L.RESOURCE_URL,t.url);return this._errorHandler.handleError(new Error(`Loading icon set URL: ${i} failed: ${e.message}`)),Se(null)})))).pipe(Object(Ge.a)(()=>{const i=this._extractIconWithNameFromAnySet(t,e);if(!i)throw Lp(t);return i}))}_extractIconWithNameFromAnySet(t,e){for(let i=e.length-1;i>=0;i--){const n=e[i];if(n.svgText&&n.svgText.indexOf(t)>-1){const e=this._svgElementFromConfig(n),i=this._extractSvgIconFromSet(e,t,n.options);if(i)return i}}return null}_loadSvgIconFromConfig(t){return this._fetchIcon(t).pipe(Pe(e=>t.svgText=e),Object(Ge.a)(()=>this._svgElementFromConfig(t)))}_loadSvgIconSetFromConfig(t){return t.svgText?Se(null):this._fetchIcon(t).pipe(Pe(e=>t.svgText=e))}_extractSvgIconFromSet(t,e,i){const n=t.querySelector(`[id="${e}"]`);if(!n)return null;const r=n.cloneNode(!0);if(r.removeAttribute("id"),"svg"===r.nodeName.toLowerCase())return this._setSvgAttributes(r,i);if("symbol"===r.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(r),i);const s=this._svgElementFromString("<svg></svg>");return s.appendChild(r),this._setSvgAttributes(s,i)}_svgElementFromString(t){const e=this._document.createElement("DIV");e.innerHTML=t;const i=e.querySelector("svg");if(!i)throw Error("<svg> tag not found");return i}_toSvgElement(t){const e=this._svgElementFromString("<svg></svg>"),i=t.attributes;for(let n=0;n<i.length;n++){const{name:t,value:r}=i[n];"id"!==t&&e.setAttribute(t,r)}for(let n=0;n<t.childNodes.length;n++)t.childNodes[n].nodeType===this._document.ELEMENT_NODE&&e.appendChild(t.childNodes[n].cloneNode(!0));return e}_setSvgAttributes(t,e){return t.setAttribute("fit",""),t.setAttribute("height","100%"),t.setAttribute("width","100%"),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.setAttribute("focusable","false"),e&&e.viewBox&&t.setAttribute("viewBox",e.viewBox),t}_fetchIcon(t){var e;const{url:i,options:n}=t,s=null!==(e=null==n?void 0:n.withCredentials)&&void 0!==e&&e;if(!this._httpClient)throw Error("Could not find HttpClient provider for use with Angular Material icons. Please include the HttpClientModule from @angular/common/http in your app imports.");if(null==i)throw Error(`Cannot fetch icon from URL "${i}".`);const o=this._sanitizer.sanitize(r.L.RESOURCE_URL,i);if(!o)throw Up(i);const a=this._inProgressUrlFetches.get(o);if(a)return a;const l=this._httpClient.get(o,{responseType:"text",withCredentials:s}).pipe(Xd(()=>this._inProgressUrlFetches.delete(o)),Object(ep.a)());return this._inProgressUrlFetches.set(o,l),l}_addSvgIconConfig(t,e,i){return this._svgIconConfigs.set(Hp(t,e),i),this}_addSvgIconSetConfig(t,e){const i=this._iconSetConfigs.get(t);return i?i.push(e):this._iconSetConfigs.set(t,[e]),this}_svgElementFromConfig(t){if(!t.svgElement){const e=this._svgElementFromString(t.svgText);this._setSvgAttributes(e,t.options),t.svgElement=e}return t.svgElement}_getIconConfigFromResolvers(t,e){for(let n=0;n<this._resolvers.length;n++){const r=this._resolvers[n](e,t);if(r)return(i=r).url&&i.options?new Np(r.url,null,r.options):new Np(r,null)}var i}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(_p,8),r.Zb(ne),r.Zb(a,8),r.Zb(r.n))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(_p,8),Object(r.Zb)(ne),Object(r.Zb)(a,8),Object(r.Zb)(r.n))},token:t,providedIn:"root"}),t})();function zp(t){return t.cloneNode(!0)}function Hp(t,e){return t+":"+e}class Kp{constructor(t){this._elementRef=t}}const $p=Ea(Kp),Gp=new r.s("mat-icon-location",{providedIn:"root",factory:function(){const t=Object(r.X)(a),e=t?t.location:null;return{getPathname:()=>e?e.pathname+e.search:""}}}),Wp=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],Zp=Wp.map(t=>`[${t}]`).join(", "),qp=/^url\(['"]?#(.*?)['"]?\)$/;let Yp=(()=>{class t extends $p{constructor(t,e,i,n,r){super(t),this._iconRegistry=e,this._location=n,this._errorHandler=r,this._inline=!1,this._currentIconFetch=ye.a.EMPTY,i||t.nativeElement.setAttribute("aria-hidden","true")}get inline(){return this._inline}set inline(t){this._inline=ti(t)}get svgIcon(){return this._svgIcon}set svgIcon(t){t!==this._svgIcon&&(t?this._updateSvgIcon(t):this._svgIcon&&this._clearSvgElement(),this._svgIcon=t)}get fontSet(){return this._fontSet}set fontSet(t){const e=this._cleanupFontValue(t);e!==this._fontSet&&(this._fontSet=e,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(t){const e=this._cleanupFontValue(t);e!==this._fontIcon&&(this._fontIcon=e,this._updateFontIconClasses())}_splitIconName(t){if(!t)return["",""];const e=t.split(":");switch(e.length){case 1:return["",e[0]];case 2:return e;default:throw Error(`Invalid icon name: "${t}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){const t=this._elementsWithExternalReferences;if(t&&t.size){const t=this._location.getPathname();t!==this._previousPath&&(this._previousPath=t,this._prependPathToReferences(t))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(t){this._clearSvgElement();const e=t.querySelectorAll("style");for(let n=0;n<e.length;n++)e[n].textContent+=" ";const i=this._location.getPathname();this._previousPath=i,this._cacheChildrenWithExternalReferences(t),this._prependPathToReferences(i),this._elementRef.nativeElement.appendChild(t)}_clearSvgElement(){const t=this._elementRef.nativeElement;let e=t.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();e--;){const i=t.childNodes[e];1===i.nodeType&&"svg"!==i.nodeName.toLowerCase()||t.removeChild(i)}}_updateFontIconClasses(){if(!this._usingFontIcon())return;const t=this._elementRef.nativeElement,e=this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet):this._iconRegistry.getDefaultFontSetClass();e!=this._previousFontSetClass&&(this._previousFontSetClass&&t.classList.remove(this._previousFontSetClass),e&&t.classList.add(e),this._previousFontSetClass=e),this.fontIcon!=this._previousFontIconClass&&(this._previousFontIconClass&&t.classList.remove(this._previousFontIconClass),this.fontIcon&&t.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(t){return"string"==typeof t?t.trim().split(" ")[0]:t}_prependPathToReferences(t){const e=this._elementsWithExternalReferences;e&&e.forEach((e,i)=>{e.forEach(e=>{i.setAttribute(e.name,`url('${t}#${e.value}')`)})})}_cacheChildrenWithExternalReferences(t){const e=t.querySelectorAll(Zp),i=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let n=0;n<e.length;n++)Wp.forEach(t=>{const r=e[n],s=r.getAttribute(t),o=s?s.match(qp):null;if(o){let e=i.get(r);e||(e=[],i.set(r,e)),e.push({name:t,value:o[1]})}})}_updateSvgIcon(t){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),t){const[e,i]=this._splitIconName(t);e&&(this._svgNamespace=e),i&&(this._svgName=i),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(i,e).pipe(Qe(1)).subscribe(t=>this._setSvgElement(t),t=>{this._errorHandler.handleError(new Error(`Error retrieving icon ${e}:${i}! ${t.message}`))})}}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(jp),r.ac("aria-hidden"),r.Pb(Gp),r.Pb(r.n))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:7,hostBindings:function(t,e){2&t&&(r.Eb("data-mat-icon-type",e._usingFontIcon()?"font":"svg")("data-mat-icon-name",e._svgName||e.fontIcon)("data-mat-icon-namespace",e._svgNamespace||e.fontSet),r.Hb("mat-icon-inline",e.inline)("mat-icon-no-color","primary"!==e.color&&"accent"!==e.color&&"warn"!==e.color))},inputs:{color:"color",inline:"inline",svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],features:[r.Ab],ngContentSelectors:Fp,decls:1,vars:0,template:function(t,e){1&t&&(r.mc(),r.lc(0))},styles:[".mat-icon{background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}\n"],encapsulation:2,changeDetection:0}),t})(),Qp=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Sa],Sa]}),t})();const Xp=["ngx-mat-calendar-body",""];function Jp(t,e){if(1&t&&(r.Vb(0,"tr",2),r.Vb(1,"td",3),r.Kc(2),r.Ub(),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Fc("padding-top",t._cellPadding)("padding-bottom",t._cellPadding),r.Eb("colspan",t.numCols),r.Db(1),r.Mc(" ",t.label," ")}}function tf(t,e){if(1&t&&(r.Vb(0,"td",7),r.Kc(1),r.Ub()),2&t){const t=r.gc(2);r.Fc("padding-top",t._cellPadding)("padding-bottom",t._cellPadding),r.Eb("colspan",t._firstRowOffset),r.Db(1),r.Mc(" ",t._firstRowOffset>=t.labelMinRequiredCells?t.label:""," ")}}function ef(t,e){if(1&t){const t=r.Wb();r.Vb(0,"td",8),r.cc("click",function(i){r.Ac(t);const n=e.$implicit;return r.gc(2)._cellClicked(n,i)}),r.Vb(1,"div",9),r.Kc(2),r.Ub(),r.Qb(3,"div",10),r.Ub()}if(2&t){const t=e.$implicit,i=e.index,n=r.gc().index,s=r.gc();r.Fc("width",s._cellWidth)("padding-top",s._cellPadding)("padding-bottom",s._cellPadding),r.Hb("mat-calendar-body-disabled",!t.enabled)("mat-calendar-body-active",s._isActiveCell(n,i))("mat-calendar-body-range-start",s._isRangeStart(t.compareValue))("mat-calendar-body-range-end",s._isRangeEnd(t.compareValue))("mat-calendar-body-in-range",s._isInRange(t.compareValue))("mat-calendar-body-comparison-bridge-start",s._isComparisonBridgeStart(t.compareValue,n,i))("mat-calendar-body-comparison-bridge-end",s._isComparisonBridgeEnd(t.compareValue,n,i))("mat-calendar-body-comparison-start",s._isComparisonStart(t.compareValue))("mat-calendar-body-comparison-end",s._isComparisonEnd(t.compareValue))("mat-calendar-body-in-comparison-range",s._isInComparisonRange(t.compareValue))("mat-calendar-body-preview-start",s._isPreviewStart(t.compareValue))("mat-calendar-body-preview-end",s._isPreviewEnd(t.compareValue))("mat-calendar-body-in-preview",s._isInPreview(t.compareValue)),r.nc("ngClass",t.cssClasses)("tabindex",s._isActiveCell(n,i)?0:-1),r.Eb("data-mat-row",n)("data-mat-col",i)("aria-label",t.ariaLabel)("aria-disabled",!t.enabled||null)("aria-selected",s._isSelected(t)),r.Db(1),r.Hb("mat-calendar-body-selected",s._isSelected(t))("mat-calendar-body-today",s.todayValue===t.compareValue),r.Db(1),r.Mc(" ",t.displayValue," ")}}function nf(t,e){if(1&t&&(r.Vb(0,"tr",4),r.Ic(1,tf,2,6,"td",5),r.Ic(2,ef,4,44,"td",6),r.Ub()),2&t){const t=e.$implicit,i=e.index,n=r.gc();r.Db(1),r.nc("ngIf",0===i&&n._firstRowOffset),r.Db(1),r.nc("ngForOf",t)}}function rf(t,e){if(1&t&&(r.Vb(0,"th",5),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.Eb("aria-label",t.long),r.Db(1),r.Lc(t.narrow)}}const sf=["*"];function of(t,e){}function af(t,e){if(1&t){const t=r.Wb();r.Vb(0,"ngx-mat-month-view",5),r.cc("activeDateChange",function(e){return r.Ac(t),r.gc().activeDate=e})("selectedChange",function(e){return r.Ac(t),r.gc()._dateSelected(e)})("_userSelection",function(){return r.Ac(t),r.gc()._userSelected()}),r.Ub()}if(2&t){const t=r.gc();r.nc("activeDate",t.activeDate)("selected",t.selected)("dateFilter",t.dateFilter)("maxDate",t.maxDate)("minDate",t.minDate)("dateClass",t.dateClass)}}function lf(t,e){if(1&t){const t=r.Wb();r.Vb(0,"ngx-mat-year-view",6),r.cc("activeDateChange",function(e){return r.Ac(t),r.gc().activeDate=e})("monthSelected",function(e){return r.Ac(t),r.gc()._monthSelectedInYearView(e)})("selectedChange",function(e){return r.Ac(t),r.gc()._goToDateInView(e,"month")}),r.Ub()}if(2&t){const t=r.gc();r.nc("activeDate",t.activeDate)("selected",t.selected)("dateFilter",t.dateFilter)("maxDate",t.maxDate)("minDate",t.minDate)}}function cf(t,e){if(1&t){const t=r.Wb();r.Vb(0,"ngx-mat-multi-year-view",7),r.cc("activeDateChange",function(e){return r.Ac(t),r.gc().activeDate=e})("yearSelected",function(e){return r.Ac(t),r.gc()._yearSelectedInMultiYearView(e)})("selectedChange",function(e){return r.Ac(t),r.gc()._goToDateInView(e,"year")}),r.Ub()}if(2&t){const t=r.gc();r.nc("activeDate",t.activeDate)("selected",t.selected)("dateFilter",t.dateFilter)("maxDate",t.maxDate)("minDate",t.minDate)}}function hf(t,e){if(1&t){const t=r.Wb();r.Vb(0,"td"),r.Vb(1,"button",10),r.cc("click",function(){return r.Ac(t),r.gc(2).change("second",!0)}),r.Vb(2,"mat-icon"),r.Kc(3,"expand_less"),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=r.gc(2);r.Db(1),r.nc("disabled",t.disabled||t.disableMinute)}}function uf(t,e){1&t&&r.Qb(0,"td",6)}function df(t,e){1&t&&r.Qb(0,"td")}function pf(t,e){if(1&t){const t=r.Wb();r.Vb(0,"tr"),r.Vb(1,"td"),r.Vb(2,"button",10),r.cc("click",function(){return r.Ac(t),r.gc().change("hour",!0)}),r.Vb(3,"mat-icon"),r.Kc(4,"expand_less"),r.Ub(),r.Ub(),r.Ub(),r.Qb(5,"td"),r.Vb(6,"td"),r.Vb(7,"button",10),r.cc("click",function(){return r.Ac(t),r.gc().change("minute",!0)}),r.Vb(8,"mat-icon"),r.Kc(9,"expand_less"),r.Ub(),r.Ub(),r.Ub(),r.Qb(10,"td"),r.Ic(11,hf,4,1,"td",3),r.Ic(12,uf,1,0,"td",8),r.Ic(13,df,1,0,"td",3),r.Ub()}if(2&t){const t=r.gc();r.Db(2),r.nc("disabled",t.disabled),r.Db(5),r.nc("disabled",t.disabled||t.disableMinute),r.Db(4),r.nc("ngIf",t.showSeconds),r.Db(1),r.nc("ngIf",t.enableMeridian),r.Db(1),r.nc("ngIf",t.enableMeridian)}}function ff(t,e){1&t&&(r.Vb(0,"td",6),r.Kc(1,":"),r.Ub())}function mf(t,e){if(1&t){const t=r.Wb();r.Vb(0,"td"),r.Vb(1,"mat-form-field",4),r.Vb(2,"input",11),r.cc("input",function(e){return r.Ac(t),r.gc().formatInput(e.target)})("keydown.ArrowUp",function(e){return r.Ac(t),r.gc().change("second",!0),e.preventDefault()})("keydown.ArrowDown",function(e){return r.Ac(t),r.gc().change("second",!1),e.preventDefault()})("blur",function(){return r.Ac(t),r.gc().change("second")}),r.Ub(),r.Ub(),r.Ub()}}function gf(t,e){1&t&&r.Qb(0,"td",6)}function Af(t,e){if(1&t){const t=r.Wb();r.Vb(0,"td",12),r.Vb(1,"button",13),r.cc("click",function(){return r.Ac(t),r.gc().toggleMeridian()}),r.Kc(2),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.Db(1),r.nc("color",t.color)("disabled",t.disabled),r.Db(1),r.Mc(" ",t.meridian," ")}}function bf(t,e){1&t&&r.Qb(0,"td")}function vf(t,e){if(1&t){const t=r.Wb();r.Vb(0,"td"),r.Vb(1,"button",14),r.cc("click",function(){return r.Ac(t),r.gc(2).change("second",!1)}),r.Vb(2,"mat-icon"),r.Kc(3,"expand_more"),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=r.gc(2);r.Db(1),r.nc("disabled",t.disabled||t.disableMinute)}}function _f(t,e){1&t&&r.Qb(0,"td",6)}function yf(t,e){1&t&&r.Qb(0,"td")}function wf(t,e){if(1&t){const t=r.Wb();r.Vb(0,"tr"),r.Vb(1,"td"),r.Vb(2,"button",14),r.cc("click",function(){return r.Ac(t),r.gc().change("hour",!1)}),r.Vb(3,"mat-icon"),r.Kc(4,"expand_more"),r.Ub(),r.Ub(),r.Ub(),r.Qb(5,"td"),r.Vb(6,"td"),r.Vb(7,"button",14),r.cc("click",function(){return r.Ac(t),r.gc().change("minute",!1)}),r.Vb(8,"mat-icon"),r.Kc(9,"expand_more"),r.Ub(),r.Ub(),r.Ub(),r.Ic(10,bf,1,0,"td",3),r.Ic(11,vf,4,1,"td",3),r.Ic(12,_f,1,0,"td",8),r.Ic(13,yf,1,0,"td",3),r.Ub()}if(2&t){const t=r.gc();r.Db(2),r.nc("disabled",t.disabled),r.Db(5),r.nc("disabled",t.disabled||t.disableMinute),r.Db(3),r.nc("ngIf",t.showSeconds),r.Db(1),r.nc("ngIf",t.showSeconds),r.Db(1),r.nc("ngIf",t.enableMeridian),r.Db(1),r.nc("ngIf",t.enableMeridian)}}function xf(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",6),r.Vb(1,"ngx-mat-timepicker",7),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).datepicker._selected=e}),r.Ub(),r.Ub()}if(2&t){const t=r.gc(2);r.Hb("disable-seconds",!t.datepicker._showSeconds),r.Db(1),r.nc("showSpinners",t.datepicker._showSpinners)("showSeconds",t.datepicker._showSeconds)("disabled",t.datepicker._disabled)("stepHour",t.datepicker._stepHour)("stepMinute",t.datepicker._stepMinute)("stepSecond",t.datepicker._stepSecond)("ngModel",t.datepicker._selected)("color",t.datepicker._color)("enableMeridian",t.datepicker._enableMeridian)("disableMinute",t.datepicker._disableMinute)}}function Cf(t,e){1&t&&(r.Vb(0,"mat-icon"),r.Kc(1,"done"),r.Ub())}function Sf(t,e){}function kf(t,e){if(1&t){const t=r.Wb();r.Tb(0),r.Ic(1,xf,2,12,"div",2),r.Vb(2,"div",3),r.Vb(3,"button",4),r.cc("click",function(){return r.Ac(t),r.gc().datepicker.ok()}),r.Ic(4,Cf,2,0,"mat-icon",1),r.Ic(5,Sf,0,0,"ng-template",5),r.Ub(),r.Ub(),r.Sb()}if(2&t){const t=r.gc();r.Db(1),r.nc("ngIf",!t.datepicker._hideTime),r.Db(2),r.nc("color",t.datepicker._color)("disabled",!t.valid),r.Db(1),r.nc("ngIf",!t.datepicker._customIcon),r.Db(1),r.nc("cdkPortalOutlet",t._templateCustomIconPortal)}}class Ef extends Ta{isSameTime(t,e){return null==t||null==e||this.getHour(t)===this.getHour(e)&&this.getMinute(t)===this.getMinute(e)&&this.getSecond(t)===this.getSecond(e)}copyTime(t,e){this.setHour(t,this.getHour(e)),this.setMinute(t,this.getMinute(e)),this.setSecond(t,this.getSecond(e))}compareDateWithTime(t,e,i){let n=super.compareDate(t,e)||this.getHour(t)-this.getHour(e)||this.getMinute(t)-this.getMinute(e);return i&&(n=n||this.getSecond(t)-this.getSecond(e)),n}setTimeByDefaultValues(t,e){if(!Array.isArray(e))throw Error("@Input DefaultTime should be an array");this.setHour(t,e[0]||0),this.setMinute(t,e[1]||0),this.setSecond(t,e[2]||0)}}const Df=new r.s("ngx-mat-date-formats");class If{constructor(t,e,i,n,r={},s=t,o){this.value=t,this.displayValue=e,this.ariaLabel=i,this.enabled=n,this.cssClasses=r,this.compareValue=s,this.rawValue=o}}let Pf=(()=>{class t{constructor(t,e){this._elementRef=t,this._ngZone=e,this.numCols=7,this.activeCell=0,this.isRange=!1,this.cellAspectRatio=1,this.previewStart=null,this.previewEnd=null,this.selectedValueChange=new r.o,this.previewChange=new r.o,this._enterHandler=t=>{if(this._skipNextFocus&&"focus"===t.type)this._skipNextFocus=!1;else if(t.target&&this.isRange){const e=this._getCellFromElement(t.target);e&&this._ngZone.run(()=>this.previewChange.emit({value:e.enabled?e:null,event:t}))}},this._leaveHandler=t=>{null!==this.previewEnd&&this.isRange&&t.target&&Of(t.target)&&this._ngZone.run(()=>this.previewChange.emit({value:null,event:t}))},e.runOutsideAngular(()=>{const e=t.nativeElement;e.addEventListener("mouseenter",this._enterHandler,!0),e.addEventListener("focus",this._enterHandler,!0),e.addEventListener("mouseleave",this._leaveHandler,!0),e.addEventListener("blur",this._leaveHandler,!0)})}_cellClicked(t,e){t.enabled&&this.selectedValueChange.emit({value:t.value,event:e})}_isSelected(t){return this.startValue===t.compareValue||this.endValue===t.compareValue}ngOnChanges(t){const e=t.numCols,{rows:i,numCols:n}=this;(t.rows||e)&&(this._firstRowOffset=i&&i.length&&i[0].length?n-i[0].length:0),(t.cellAspectRatio||e||!this._cellPadding)&&(this._cellPadding=50*this.cellAspectRatio/n+"%"),!e&&this._cellWidth||(this._cellWidth=100/n+"%")}ngOnDestroy(){const t=this._elementRef.nativeElement;t.removeEventListener("mouseenter",this._enterHandler,!0),t.removeEventListener("focus",this._enterHandler,!0),t.removeEventListener("mouseleave",this._leaveHandler,!0),t.removeEventListener("blur",this._leaveHandler,!0)}_isActiveCell(t,e){let i=t*this.numCols+e;return t&&(i-=this._firstRowOffset),i==this.activeCell}_focusActiveCell(t=!0){this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.asObservable().pipe(Qe(1)).subscribe(()=>{const e=this._elementRef.nativeElement.querySelector(".ngx-mat-calendar-body-active");e&&(t||(this._skipNextFocus=!0),e.focus())})})}_isRangeStart(t){return Mf(t,this.startValue,this.endValue)}_isRangeEnd(t){return Tf(t,this.startValue,this.endValue)}_isInRange(t){return Rf(t,this.startValue,this.endValue,this.isRange)}_isComparisonStart(t){return Mf(t,this.comparisonStart,this.comparisonEnd)}_isComparisonBridgeStart(t,e,i){if(!this._isComparisonStart(t)||this._isRangeStart(t)||!this._isInRange(t))return!1;let n=this.rows[e][i-1];if(!n){const t=this.rows[e-1];n=t&&t[t.length-1]}return n&&!this._isRangeEnd(n.compareValue)}_isComparisonBridgeEnd(t,e,i){if(!this._isComparisonEnd(t)||this._isRangeEnd(t)||!this._isInRange(t))return!1;let n=this.rows[e][i+1];if(!n){const t=this.rows[e+1];n=t&&t[0]}return n&&!this._isRangeStart(n.compareValue)}_isComparisonEnd(t){return Tf(t,this.comparisonStart,this.comparisonEnd)}_isInComparisonRange(t){return Rf(t,this.comparisonStart,this.comparisonEnd,this.isRange)}_isPreviewStart(t){return Mf(t,this.previewStart,this.previewEnd)}_isPreviewEnd(t){return Tf(t,this.previewStart,this.previewEnd)}_isInPreview(t){return Rf(t,this.previewStart,this.previewEnd,this.isRange)}_getCellFromElement(t){let e;if(Of(t)?e=t:Of(t.parentNode)&&(e=t.parentNode),e){const t=e.getAttribute("data-ngx-mat-row"),i=e.getAttribute("data-ngx-mat-col");if(t&&i)return this.rows[parseInt(t)][parseInt(i)]}return null}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.B))},t.\u0275cmp=r.Jb({type:t,selectors:[["","ngx-mat-calendar-body",""]],hostAttrs:["role","grid","aria-readonly","true",1,"ngx-mat-calendar-body"],inputs:{numCols:"numCols",activeCell:"activeCell",isRange:"isRange",cellAspectRatio:"cellAspectRatio",previewStart:"previewStart",previewEnd:"previewEnd",label:"label",rows:"rows",todayValue:"todayValue",startValue:"startValue",endValue:"endValue",labelMinRequiredCells:"labelMinRequiredCells",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},outputs:{selectedValueChange:"selectedValueChange",previewChange:"previewChange"},exportAs:["NgxMatCalendarBody"],features:[r.Bb],attrs:Xp,decls:2,vars:2,consts:[["aria-hidden","true",4,"ngIf"],["role","row",4,"ngFor","ngForOf"],["aria-hidden","true"],[1,"mat-calendar-body-label"],["role","row"],["aria-hidden","true","class","mat-calendar-body-label",3,"paddingTop","paddingBottom",4,"ngIf"],["role","gridcell","class","mat-calendar-body-cell",3,"ngClass","tabindex","mat-calendar-body-disabled","mat-calendar-body-active","mat-calendar-body-range-start","mat-calendar-body-range-end","mat-calendar-body-in-range","mat-calendar-body-comparison-bridge-start","mat-calendar-body-comparison-bridge-end","mat-calendar-body-comparison-start","mat-calendar-body-comparison-end","mat-calendar-body-in-comparison-range","mat-calendar-body-preview-start","mat-calendar-body-preview-end","mat-calendar-body-in-preview","width","paddingTop","paddingBottom","click",4,"ngFor","ngForOf"],["aria-hidden","true",1,"mat-calendar-body-label"],["role","gridcell",1,"mat-calendar-body-cell",3,"ngClass","tabindex","click"],[1,"mat-calendar-body-cell-content","mat-focus-indicator"],[1,"mat-calendar-body-cell-preview"]],template:function(t,e){1&t&&(r.Ic(0,Jp,3,6,"tr",0),r.Ic(1,nf,3,2,"tr",1)),2&t&&(r.nc("ngIf",e._firstRowOffset<e.labelMinRequiredCells),r.Db(1),r.nc("ngForOf",e.rows))},directives:[ut,ct,at],styles:['.mat-calendar-body{min-width:224px}.mat-calendar-body-label{height:0;line-height:0;padding-left:4.7142857143%;padding-right:4.7142857143%;text-align:left}.mat-calendar-body-cell{cursor:pointer;height:0;line-height:0;outline:none;position:relative;text-align:center}.mat-calendar-body-cell-preview,.mat-calendar-body-cell:after,.mat-calendar-body-cell:before{box-sizing:border-box;content:"";height:90%;left:0;position:absolute;top:5%;width:100%;z-index:0}.mat-calendar-body-comparison-start:after,.mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start):before,.mat-calendar-body-preview-start .mat-calendar-body-cell-preview,.mat-calendar-body-range-start:after,.mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range):before{border-bottom-left-radius:999px;border-top-left-radius:999px;left:5%;width:95%}[dir=rtl] .mat-calendar-body-comparison-start:after,[dir=rtl] .mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start):before,[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview,[dir=rtl] .mat-calendar-body-range-start:after,[dir=rtl] .mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range):before{border-bottom-right-radius:999px;border-radius:0;border-top-right-radius:999px;left:0}.mat-calendar-body-comparison-end:after,.mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end):before,.mat-calendar-body-preview-end .mat-calendar-body-cell-preview,.mat-calendar-body-range-end:after,.mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range):before{border-bottom-right-radius:999px;border-top-right-radius:999px;width:95%}[dir=rtl] .mat-calendar-body-comparison-end:after,[dir=rtl] .mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end):before,[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview,[dir=rtl] .mat-calendar-body-range-end:after,[dir=rtl] .mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range):before{border-bottom-left-radius:999px;border-radius:0;border-top-left-radius:999px;left:5%}[dir=rtl] .mat-calendar-body-comparison-bridge-end.mat-calendar-body-range-start:after,[dir=rtl] .mat-calendar-body-comparison-bridge-start.mat-calendar-body-range-end:after{border-bottom-right-radius:999px;border-top-right-radius:999px;width:95%}.mat-calendar-body-comparison-end.mat-calendar-body-range-start:after,.mat-calendar-body-comparison-start.mat-calendar-body-range-end:after,[dir=rtl] .mat-calendar-body-comparison-end.mat-calendar-body-range-start:after,[dir=rtl] .mat-calendar-body-comparison-start.mat-calendar-body-range-end:after{width:90%}.mat-calendar-body-in-preview .mat-calendar-body-cell-preview{border-bottom:1px dashed;border-top:1px dashed}.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:1px dashed}[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:0;border-right:1px dashed}.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:1px dashed}[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-left:1px dashed;border-right:0}.mat-calendar-body-disabled{cursor:default}.mat-calendar-body-cell-content{align-items:center;border-radius:999px;border-style:solid;border-width:1px;box-sizing:border-box;display:flex;height:90%;justify-content:center;left:5%;line-height:1;top:5%;width:90%;z-index:1}.mat-calendar-body-cell-content.mat-focus-indicator{position:absolute}.cdk-high-contrast-active .mat-calendar-body-cell-content{border:none}.cdk-high-contrast-active .mat-calendar-body-selected,.cdk-high-contrast-active .mat-datepicker-popup:not(:empty){outline:1px solid}.cdk-high-contrast-active .mat-calendar-body-today{outline:1px dotted}.cdk-high-contrast-active .cdk-keyboard-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected),.cdk-high-contrast-active .cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){outline:2px dotted}[dir=rtl] .mat-calendar-body-label{text-align:right}@media (hover:none){.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){background-color:transparent}}'],encapsulation:2,changeDetection:0}),t})();function Of(t){return"TD"===t.nodeName}function Mf(t,e,i){return null!==i&&e!==i&&t<i&&t===e}function Tf(t,e,i){return null!==e&&e!==i&&t>=e&&t===i}function Rf(t,e,i,n){return n&&null!==e&&null!==i&&e!==i&&t>=e&&t<=i}const Vf=new r.s("NGX_MAT_DATE_RANGE_SELECTION_STRATEGY");let Ff=(()=>{class t{constructor(t){this._dateAdapter=t}selectionFinished(t,e){let{start:i,end:n}=e;return null==i?i=t:null==n&&t&&this._dateAdapter.compareDate(t,i)>=0?n=t:(i=t,n=null),new rd(i,n)}createPreview(t,e){let i=null,n=null;return e.start&&!e.end&&t&&(i=e.start,n=t),new rd(i,n)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Ef))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();const Lf={minHour:0,maxHour:24,minMinute:0,maxMinute:60,minSecond:0,maxSecond:60,meridian:12},Uf=/[^0-9]/g,Bf=/^(2[0-3]|[0-1][0-9]|[0-9])$/,Nf=/^([0-5][0-9]|[0-9])$/,jf=/^([0-5][0-9]|[0-9])$/;function zf(t){const e=t.toString();return e.length>1?e:`0${e}`}function Hf(t){return Error(`NgxMatDatepicker: No provider found for ${t}. You must import one of the following modules at your application root: NgxMatNativeDateModule, NgxMatMomentModule, or provide a custom implementation.`)}let Kf=(()=>{class t{constructor(t,e,i,n,s){if(this._changeDetectorRef=t,this._dateFormats=e,this._dateAdapter=i,this._dir=n,this._rangeStrategy=s,this._rerenderSubscription=ye.a.EMPTY,this.selectedChange=new r.o,this._userSelection=new r.o,this.activeDateChange=new r.o,!this._dateAdapter)throw Hf("NgxMatDateAdapter");if(!this._dateFormats)throw Hf("NGX_MAT_DATE_FORMATS");this._activeDate=this._dateAdapter.today()}get activeDate(){return this._activeDate}set activeDate(t){const e=this._activeDate,i=this._getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(i,this.minDate,this.maxDate),this._hasSameMonthAndYear(e,this._activeDate)||this._init()}get selected(){return this._selected}set selected(t){this._selected=t instanceof rd?t:this._getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setRanges(this._selected)}get minDate(){return this._minDate}set minDate(t){this._minDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))}get maxDate(){return this._maxDate}set maxDate(t){this._maxDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(Pn(null)).subscribe(()=>this._init())}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_dateSelected(t){const e=t.value,i=this._dateAdapter.getYear(this.activeDate),n=this._dateAdapter.getMonth(this.activeDate),r=this._dateAdapter.createDate(i,n,e);let s,o;this._selected instanceof rd?(s=this._getDateInCurrentMonth(this._selected.start),o=this._getDateInCurrentMonth(this._selected.end)):s=o=this._getDateInCurrentMonth(this._selected),s===e&&o===e||this.selectedChange.emit(r),this._userSelection.emit({value:r,event:t.event})}_handleCalendarBodyKeydown(t){const e=this._activeDate,i=this._isRtl();switch(t.keyCode){case 37:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,i?1:-1);break;case 39:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,i?-1:1);break;case 38:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,-7);break;case 40:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,7);break;case 36:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,1-this._dateAdapter.getDate(this._activeDate));break;case 35:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,this._dateAdapter.getNumDaysInMonth(this._activeDate)-this._dateAdapter.getDate(this._activeDate));break;case 33:this.activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,-1):this._dateAdapter.addCalendarMonths(this._activeDate,-1);break;case 34:this.activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,1):this._dateAdapter.addCalendarMonths(this._activeDate,1);break;case 13:case 32:return void(this.dateFilter&&!this.dateFilter(this._activeDate)||(this._dateSelected({value:this._dateAdapter.getDate(this._activeDate),event:t}),t.preventDefault()));case 27:return void(null!=this._previewEnd&&(this._previewStart=this._previewEnd=null,this.selectedChange.emit(null),this._userSelection.emit({value:null,event:t}),t.preventDefault(),t.stopPropagation()));default:return}this._dateAdapter.compareDate(e,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),t.preventDefault()}_init(){this._setRanges(this.selected),this._todayDate=this._getCellCompareValue(this._dateAdapter.today()),this._monthLabel=this._dateAdapter.getMonthNames("short")[this._dateAdapter.getMonth(this.activeDate)].toLocaleUpperCase();let t=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),1);this._firstWeekOffset=(7+this._dateAdapter.getDayOfWeek(t)-this._dateAdapter.getFirstDayOfWeek())%7,this._initWeekdays(),this._createWeekCells(),this._changeDetectorRef.markForCheck()}_focusActiveCell(t){this._matCalendarBody._focusActiveCell(t)}_previewChanged({event:t,value:e}){if(this._rangeStrategy){const i=this._rangeStrategy.createPreview(e?e.rawValue:null,this.selected,t);this._previewStart=this._getCellCompareValue(i.start),this._previewEnd=this._getCellCompareValue(i.end),this._changeDetectorRef.detectChanges()}}_initWeekdays(){const t=this._dateAdapter.getFirstDayOfWeek(),e=this._dateAdapter.getDayOfWeekNames("narrow");let i=this._dateAdapter.getDayOfWeekNames("long").map((t,i)=>({long:t,narrow:e[i]}));this._weekdays=i.slice(t).concat(i.slice(0,t))}_createWeekCells(){const t=this._dateAdapter.getNumDaysInMonth(this.activeDate),e=this._dateAdapter.getDateNames();this._weeks=[[]];for(let i=0,n=this._firstWeekOffset;i<t;i++,n++){7==n&&(this._weeks.push([]),n=0);const t=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),i+1),r=this._shouldEnableDate(t),s=this._dateAdapter.format(t,this._dateFormats.display.dateA11yLabel),o=this.dateClass?this.dateClass(t):void 0;this._weeks[this._weeks.length-1].push(new If(i+1,e[i],s,r,o,this._getCellCompareValue(t),t))}}_shouldEnableDate(t){return!!t&&(!this.minDate||this._dateAdapter.compareDate(t,this.minDate)>=0)&&(!this.maxDate||this._dateAdapter.compareDate(t,this.maxDate)<=0)&&(!this.dateFilter||this.dateFilter(t))}_getDateInCurrentMonth(t){return t&&this._hasSameMonthAndYear(t,this.activeDate)?this._dateAdapter.getDate(t):null}_hasSameMonthAndYear(t,e){return!(!t||!e||this._dateAdapter.getMonth(t)!=this._dateAdapter.getMonth(e)||this._dateAdapter.getYear(t)!=this._dateAdapter.getYear(e))}_getCellCompareValue(t){if(t){const e=this._dateAdapter.getYear(t),i=this._dateAdapter.getMonth(t),n=this._dateAdapter.getDate(t);return new Date(e,i,n).getTime()}return null}_getValidDateOrNull(t){return this._dateAdapter.isDateInstance(t)&&this._dateAdapter.isValid(t)?t:null}_isRtl(){return this._dir&&"rtl"===this._dir.value}_setRanges(t){t instanceof rd?(this._rangeStart=this._getCellCompareValue(t.start),this._rangeEnd=this._getCellCompareValue(t.end),this._isRange=!0):(this._rangeStart=this._rangeEnd=this._getCellCompareValue(t),this._isRange=!1),this._comparisonRangeStart=this._getCellCompareValue(this.comparisonStart),this._comparisonRangeEnd=this._getCellCompareValue(this.comparisonEnd)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(Df,8),r.Pb(Ef,8),r.Pb(Zn,8),r.Pb(Vf,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["ngx-mat-month-view"]],viewQuery:function(t,e){if(1&t&&r.Pc(Pf,1),2&t){let t;r.vc(t=r.dc())&&(e._matCalendarBody=t.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},outputs:{selectedChange:"selectedChange",_userSelection:"_userSelection",activeDateChange:"activeDateChange"},exportAs:["ngxMatMonthView"],decls:7,vars:13,consts:[["role","presentation",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["scope","col",4,"ngFor","ngForOf"],["colspan","7","aria-hidden","true",1,"mat-calendar-table-header-divider"],["ngx-mat-calendar-body","",3,"label","rows","todayValue","startValue","endValue","comparisonStart","comparisonEnd","previewStart","previewEnd","isRange","labelMinRequiredCells","activeCell","selectedValueChange","previewChange","keydown"],["scope","col"]],template:function(t,e){1&t&&(r.Vb(0,"table",0),r.Vb(1,"thead",1),r.Vb(2,"tr"),r.Ic(3,rf,2,2,"th",2),r.Ub(),r.Vb(4,"tr"),r.Qb(5,"th",3),r.Ub(),r.Ub(),r.Vb(6,"tbody",4),r.cc("selectedValueChange",function(t){return e._dateSelected(t)})("previewChange",function(t){return e._previewChanged(t)})("keydown",function(t){return e._handleCalendarBodyKeydown(t)}),r.Ub(),r.Ub()),2&t&&(r.Db(3),r.nc("ngForOf",e._weekdays),r.Db(3),r.nc("label",e._monthLabel)("rows",e._weeks)("todayValue",e._todayDate)("startValue",e._rangeStart)("endValue",e._rangeEnd)("comparisonStart",e._comparisonRangeStart)("comparisonEnd",e._comparisonRangeEnd)("previewStart",e._previewStart)("previewEnd",e._previewEnd)("isRange",e._isRange)("labelMinRequiredCells",3)("activeCell",e._dateAdapter.getDate(e.activeDate)-1))},directives:[ct,Pf],encapsulation:2,changeDetection:0}),t})(),$f=(()=>{class t{constructor(t,e,i){if(this._changeDetectorRef=t,this._dateAdapter=e,this._dir=i,this._rerenderSubscription=ye.a.EMPTY,this.selectedChange=new r.o,this.yearSelected=new r.o,this.activeDateChange=new r.o,!this._dateAdapter)throw Hf("NgxMatDateAdapter");this._activeDate=this._dateAdapter.today()}get activeDate(){return this._activeDate}set activeDate(t){let e=this._activeDate;const i=this._getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(i,this.minDate,this.maxDate),Gf(this._dateAdapter,e,this._activeDate,this.minDate,this.maxDate)||this._init()}get selected(){return this._selected}set selected(t){this._selected=t instanceof rd?t:this._getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setSelectedYear(t)}get minDate(){return this._minDate}set minDate(t){this._minDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))}get maxDate(){return this._maxDate}set maxDate(t){this._maxDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(Pn(null)).subscribe(()=>this._init())}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_init(){this._todayYear=this._dateAdapter.getYear(this._dateAdapter.today());const t=this._dateAdapter.getYear(this._activeDate)-Wf(this._dateAdapter,this.activeDate,this.minDate,this.maxDate);this._years=[];for(let e=0,i=[];e<24;e++)i.push(t+e),4==i.length&&(this._years.push(i.map(t=>this._createCellForYear(t))),i=[]);this._changeDetectorRef.markForCheck()}_yearSelected(t){const e=t.value;this.yearSelected.emit(this._dateAdapter.createDate(e,0,1));let i=this._dateAdapter.getMonth(this.activeDate),n=this._dateAdapter.getNumDaysInMonth(this._dateAdapter.createDate(e,i,1));this.selectedChange.emit(this._dateAdapter.createDate(e,i,Math.min(this._dateAdapter.getDate(this.activeDate),n)))}_handleCalendarBodyKeydown(t){const e=this._activeDate,i=this._isRtl();switch(t.keyCode){case 37:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,i?1:-1);break;case 39:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,i?-1:1);break;case 38:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-4);break;case 40:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,4);break;case 36:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-Wf(this._dateAdapter,this.activeDate,this.minDate,this.maxDate));break;case 35:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,24-Wf(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)-1);break;case 33:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?-240:-24);break;case 34:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?240:24);break;case 13:case 32:this._yearSelected({value:this._dateAdapter.getYear(this._activeDate),event:t});break;default:return}this._dateAdapter.compareDate(e,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),t.preventDefault()}_getActiveCell(){return Wf(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)}_focusActiveCell(){this._matCalendarBody._focusActiveCell()}_createCellForYear(t){let e=this._dateAdapter.getYearName(this._dateAdapter.createDate(t,0,1));return new If(t,e,e,this._shouldEnableYear(t))}_shouldEnableYear(t){if(null==t||this.maxDate&&t>this._dateAdapter.getYear(this.maxDate)||this.minDate&&t<this._dateAdapter.getYear(this.minDate))return!1;if(!this.dateFilter)return!0;for(let e=this._dateAdapter.createDate(t,0,1);this._dateAdapter.getYear(e)==t;e=this._dateAdapter.addCalendarDays(e,1))if(this.dateFilter(e))return!0;return!1}_getValidDateOrNull(t){return this._dateAdapter.isDateInstance(t)&&this._dateAdapter.isValid(t)?t:null}_isRtl(){return this._dir&&"rtl"===this._dir.value}_setSelectedYear(t){if(this._selectedYear=null,t instanceof rd){const e=t.start||t.end;e&&(this._selectedYear=this._dateAdapter.getYear(e))}else t&&(this._selectedYear=this._dateAdapter.getYear(t))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(Ef,8),r.Pb(Zn,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["ngx-mat-multi-year-view"]],viewQuery:function(t,e){if(1&t&&r.Pc(Pf,1),2&t){let t;r.vc(t=r.dc())&&(e._matCalendarBody=t.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter"},outputs:{selectedChange:"selectedChange",yearSelected:"yearSelected",activeDateChange:"activeDateChange"},exportAs:["ngxMatMultiYearView"],decls:5,vars:7,consts:[["role","presentation",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["colspan","4",1,"mat-calendar-table-header-divider"],["ngx-mat-calendar-body","",3,"rows","todayValue","startValue","endValue","numCols","cellAspectRatio","activeCell","selectedValueChange","keydown"]],template:function(t,e){1&t&&(r.Vb(0,"table",0),r.Vb(1,"thead",1),r.Vb(2,"tr"),r.Qb(3,"th",2),r.Ub(),r.Ub(),r.Vb(4,"tbody",3),r.cc("selectedValueChange",function(t){return e._yearSelected(t)})("keydown",function(t){return e._handleCalendarBodyKeydown(t)}),r.Ub(),r.Ub()),2&t&&(r.Db(4),r.nc("rows",e._years)("todayValue",e._todayYear)("startValue",e._selectedYear)("endValue",e._selectedYear)("numCols",4)("cellAspectRatio",4/7)("activeCell",e._getActiveCell()))},directives:[Pf],encapsulation:2,changeDetection:0}),t})();function Gf(t,e,i,n,r){const s=t.getYear(e),o=t.getYear(i),a=Zf(t,n,r);return Math.floor((s-a)/24)===Math.floor((o-a)/24)}function Wf(t,e,i,n){return((t.getYear(e)-Zf(t,i,n))%24+24)%24}function Zf(t,e,i){let n=0;return i?n=t.getYear(i)-24+1:e&&(n=t.getYear(e)),n}let qf=(()=>{class t{constructor(t,e,i,n){if(this._changeDetectorRef=t,this._dateFormats=e,this._dateAdapter=i,this._dir=n,this._rerenderSubscription=ye.a.EMPTY,this.selectedChange=new r.o,this.monthSelected=new r.o,this.activeDateChange=new r.o,!this._dateAdapter)throw Hf("NgxMatDateAdapter");if(!this._dateFormats)throw Hf("NGX_MAT_DATE_FORMATS");this._activeDate=this._dateAdapter.today()}get activeDate(){return this._activeDate}set activeDate(t){let e=this._activeDate;const i=this._getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(i,this.minDate,this.maxDate),this._dateAdapter.getYear(e)!==this._dateAdapter.getYear(this._activeDate)&&this._init()}get selected(){return this._selected}set selected(t){this._selected=t instanceof rd?t:this._getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setSelectedMonth(t)}get minDate(){return this._minDate}set minDate(t){this._minDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))}get maxDate(){return this._maxDate}set maxDate(t){this._maxDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(Pn(null)).subscribe(()=>this._init())}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_monthSelected(t){const e=t.value,i=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),e,1);this.monthSelected.emit(i);const n=this._dateAdapter.getNumDaysInMonth(i);this.selectedChange.emit(this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),e,Math.min(this._dateAdapter.getDate(this.activeDate),n)))}_handleCalendarBodyKeydown(t){const e=this._activeDate,i=this._isRtl();switch(t.keyCode){case 37:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,i?1:-1);break;case 39:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,i?-1:1);break;case 38:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-4);break;case 40:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,4);break;case 36:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-this._dateAdapter.getMonth(this._activeDate));break;case 35:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,11-this._dateAdapter.getMonth(this._activeDate));break;case 33:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?-10:-1);break;case 34:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?10:1);break;case 13:case 32:this._monthSelected({value:this._dateAdapter.getMonth(this._activeDate),event:t});break;default:return}this._dateAdapter.compareDate(e,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),t.preventDefault()}_init(){this._setSelectedMonth(this.selected),this._todayMonth=this._getMonthInCurrentYear(this._dateAdapter.today()),this._yearLabel=this._dateAdapter.getYearName(this.activeDate);let t=this._dateAdapter.getMonthNames("short");this._months=[[0,1,2,3],[4,5,6,7],[8,9,10,11]].map(e=>e.map(e=>this._createCellForMonth(e,t[e]))),this._changeDetectorRef.markForCheck()}_focusActiveCell(){this._matCalendarBody._focusActiveCell()}_getMonthInCurrentYear(t){return t&&this._dateAdapter.getYear(t)==this._dateAdapter.getYear(this.activeDate)?this._dateAdapter.getMonth(t):null}_createCellForMonth(t,e){let i=this._dateAdapter.format(this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),t,1),this._dateFormats.display.monthYearA11yLabel);return new If(t,e.toLocaleUpperCase(),i,this._shouldEnableMonth(t))}_shouldEnableMonth(t){const e=this._dateAdapter.getYear(this.activeDate);if(null==t||this._isYearAndMonthAfterMaxDate(e,t)||this._isYearAndMonthBeforeMinDate(e,t))return!1;if(!this.dateFilter)return!0;for(let i=this._dateAdapter.createDate(e,t,1);this._dateAdapter.getMonth(i)==t;i=this._dateAdapter.addCalendarDays(i,1))if(this.dateFilter(i))return!0;return!1}_isYearAndMonthAfterMaxDate(t,e){if(this.maxDate){const i=this._dateAdapter.getYear(this.maxDate),n=this._dateAdapter.getMonth(this.maxDate);return t>i||t===i&&e>n}return!1}_isYearAndMonthBeforeMinDate(t,e){if(this.minDate){const i=this._dateAdapter.getYear(this.minDate),n=this._dateAdapter.getMonth(this.minDate);return t<i||t===i&&e<n}return!1}_getValidDateOrNull(t){return this._dateAdapter.isDateInstance(t)&&this._dateAdapter.isValid(t)?t:null}_isRtl(){return this._dir&&"rtl"===this._dir.value}_setSelectedMonth(t){this._selectedMonth=t instanceof rd?this._getMonthInCurrentYear(t.start)||this._getMonthInCurrentYear(t.end):this._getMonthInCurrentYear(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(Df,8),r.Pb(Ef,8),r.Pb(Zn,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["ngx-mat-year-view"]],viewQuery:function(t,e){if(1&t&&r.Pc(Pf,1),2&t){let t;r.vc(t=r.dc())&&(e._matCalendarBody=t.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter"},outputs:{selectedChange:"selectedChange",monthSelected:"monthSelected",activeDateChange:"activeDateChange"},exportAs:["ngxMatYearView"],decls:5,vars:9,consts:[["role","presentation",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["colspan","4",1,"mat-calendar-table-header-divider"],["ngx-mat-calendar-body","",3,"label","rows","todayValue","startValue","endValue","labelMinRequiredCells","numCols","cellAspectRatio","activeCell","selectedValueChange","keydown"]],template:function(t,e){1&t&&(r.Vb(0,"table",0),r.Vb(1,"thead",1),r.Vb(2,"tr"),r.Qb(3,"th",2),r.Ub(),r.Ub(),r.Vb(4,"tbody",3),r.cc("selectedValueChange",function(t){return e._monthSelected(t)})("keydown",function(t){return e._handleCalendarBodyKeydown(t)}),r.Ub(),r.Ub()),2&t&&(r.Db(4),r.nc("label",e._yearLabel)("rows",e._months)("todayValue",e._todayMonth)("startValue",e._selectedMonth)("endValue",e._selectedMonth)("labelMinRequiredCells",2)("numCols",4)("cellAspectRatio",4/7)("activeCell",e._dateAdapter.getMonth(e.activeDate)))},directives:[Pf],encapsulation:2,changeDetection:0}),t})(),Yf=(()=>{class t{constructor(t,e,i,n,r){this._intl=t,this.calendar=e,this._dateAdapter=i,this._dateFormats=n,this.calendar.stateChanges.subscribe(()=>r.markForCheck())}get periodButtonText(){if("month"==this.calendar.currentView)return this._dateAdapter.format(this.calendar.activeDate,this._dateFormats.display.monthYearLabel).toLocaleUpperCase();if("year"==this.calendar.currentView)return this._dateAdapter.getYearName(this.calendar.activeDate);const t=this._dateAdapter.getYear(this.calendar.activeDate)-Wf(this._dateAdapter,this.calendar.activeDate,this.calendar.minDate,this.calendar.maxDate),e=t+24-1;return`${this._dateAdapter.getYearName(this._dateAdapter.createDate(t,0,1))} \u2013 ${this._dateAdapter.getYearName(this._dateAdapter.createDate(e,0,1))}`}get periodButtonLabel(){return"month"==this.calendar.currentView?this._intl.switchToMultiYearViewLabel:this._intl.switchToMonthViewLabel}get prevButtonLabel(){return{month:this._intl.prevMonthLabel,year:this._intl.prevYearLabel,"multi-year":this._intl.prevMultiYearLabel}[this.calendar.currentView]}get nextButtonLabel(){return{month:this._intl.nextMonthLabel,year:this._intl.nextYearLabel,"multi-year":this._intl.nextMultiYearLabel}[this.calendar.currentView]}currentPeriodClicked(){this.calendar.currentView="month"==this.calendar.currentView?"multi-year":"month"}previousClicked(){this.calendar.activeDate="month"==this.calendar.currentView?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,-1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,"year"==this.calendar.currentView?-1:-24)}nextClicked(){this.calendar.activeDate="month"==this.calendar.currentView?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,"year"==this.calendar.currentView?1:24)}previousEnabled(){return!this.calendar.minDate||!this.calendar.minDate||!this._isSameView(this.calendar.activeDate,this.calendar.minDate)}nextEnabled(){return!this.calendar.maxDate||!this._isSameView(this.calendar.activeDate,this.calendar.maxDate)}_isSameView(t,e){return"month"==this.calendar.currentView?this._dateAdapter.getYear(t)==this._dateAdapter.getYear(e)&&this._dateAdapter.getMonth(t)==this._dateAdapter.getMonth(e):"year"==this.calendar.currentView?this._dateAdapter.getYear(t)==this._dateAdapter.getYear(e):Gf(this._dateAdapter,t,e,this.calendar.minDate,this.calendar.maxDate)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Qu),r.Pb(Object(r.W)(()=>Qf)),r.Pb(Ef,8),r.Pb(Df,8),r.Pb(r.h))},t.\u0275cmp=r.Jb({type:t,selectors:[["ngx-mat-calendar-header"]],exportAs:["ngxMatCalendarHeader"],ngContentSelectors:sf,decls:9,vars:8,consts:[[1,"mat-calendar-header"],[1,"mat-calendar-controls"],["mat-button","","type","button","cdkAriaLive","polite",1,"mat-calendar-period-button",3,"click"],[1,"mat-calendar-arrow"],[1,"mat-calendar-spacer"],["mat-icon-button","","type","button",1,"mat-calendar-previous-button",3,"disabled","click"],["mat-icon-button","","type","button",1,"mat-calendar-next-button",3,"disabled","click"]],template:function(t,e){1&t&&(r.mc(),r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"button",2),r.cc("click",function(){return e.currentPeriodClicked()}),r.Kc(3),r.Qb(4,"div",3),r.Ub(),r.Qb(5,"div",4),r.lc(6),r.Vb(7,"button",5),r.cc("click",function(){return e.previousClicked()}),r.Ub(),r.Vb(8,"button",6),r.cc("click",function(){return e.nextClicked()}),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(2),r.Eb("aria-label",e.periodButtonLabel),r.Db(1),r.Mc(" ",e.periodButtonText," "),r.Db(1),r.Hb("mat-calendar-invert","month"!=e.calendar.currentView),r.Db(3),r.nc("disabled",!e.previousEnabled()),r.Eb("aria-label",e.prevButtonLabel),r.Db(1),r.nc("disabled",!e.nextEnabled()),r.Eb("aria-label",e.nextButtonLabel))},directives:[Dl],encapsulation:2,changeDetection:0}),t})(),Qf=(()=>{class t{constructor(t,e,i,n){if(this._dateAdapter=e,this._dateFormats=i,this._changeDetectorRef=n,this._moveFocusOnNextTick=!1,this.startView="month",this.selectedChange=new r.o,this.yearSelected=new r.o,this.monthSelected=new r.o,this._userSelection=new r.o,this.stateChanges=new _e.a,!this._dateAdapter)throw Hf("NgxDateAdapter");if(!this._dateFormats)throw Hf("NGX_MAT_DATE_FORMATS");this._intlChanges=t.changes.subscribe(()=>{n.markForCheck(),this.stateChanges.next()})}get startAt(){return this._startAt}set startAt(t){this._startAt=this._getValidDateOrNull(this._dateAdapter.deserialize(t))}get selected(){return this._selected}set selected(t){this._selected=this._getValidDateOrNull(this._dateAdapter.deserialize(t))}get minDate(){return this._minDate}set minDate(t){this._minDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))}get maxDate(){return this._maxDate}set maxDate(t){this._maxDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))}get activeDate(){return this._clampedActiveDate}set activeDate(t){this._clampedActiveDate=this._dateAdapter.clampDate(t,this.minDate,this.maxDate),this.stateChanges.next(),this._changeDetectorRef.markForCheck()}get currentView(){return this._currentView}set currentView(t){this._currentView=t,this._moveFocusOnNextTick=!0,this._changeDetectorRef.markForCheck()}ngAfterContentInit(){this._calendarHeaderPortal=new pe(this.headerComponent||Yf),this.activeDate=this.startAt||this._dateAdapter.today(),this._currentView=this.startView}ngAfterViewChecked(){this._moveFocusOnNextTick&&(this._moveFocusOnNextTick=!1,this.focusActiveCell())}ngOnDestroy(){this._intlChanges.unsubscribe(),this.stateChanges.complete()}ngOnChanges(t){const e=t.minDate||t.maxDate||t.dateFilter;if(e&&!e.firstChange){const t=this._getCurrentViewComponent();t&&(this._changeDetectorRef.detectChanges(),t._init())}this.stateChanges.next()}focusActiveCell(){this._getCurrentViewComponent()._focusActiveCell()}updateTodaysDate(){("month"==this.currentView?this.monthView:"year"==this.currentView?this.yearView:this.multiYearView).ngAfterContentInit()}_dateSelected(t){t&&!this._dateAdapter.sameDate(t,this.selected)&&this.selectedChange.emit(t)}_yearSelectedInMultiYearView(t){this.yearSelected.emit(t)}_monthSelectedInYearView(t){this.monthSelected.emit(t)}_userSelected(){this._userSelection.emit()}_goToDateInView(t,e){this.activeDate=t,this.currentView=e}_getValidDateOrNull(t){return this._dateAdapter.isDateInstance(t)&&this._dateAdapter.isValid(t)?t:null}_getCurrentViewComponent(){return this.monthView||this.yearView||this.multiYearView}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Qu),r.Pb(Ef,8),r.Pb(Df,8),r.Pb(r.h))},t.\u0275cmp=r.Jb({type:t,selectors:[["ngx-mat-calendar"]],viewQuery:function(t,e){if(1&t&&(r.Pc(Kf,1),r.Pc(qf,1),r.Pc($f,1)),2&t){let t;r.vc(t=r.dc())&&(e.monthView=t.first),r.vc(t=r.dc())&&(e.yearView=t.first),r.vc(t=r.dc())&&(e.multiYearView=t.first)}},hostAttrs:[1,"mat-calendar"],inputs:{startView:"startView",startAt:"startAt",selected:"selected",minDate:"minDate",maxDate:"maxDate",headerComponent:"headerComponent",dateFilter:"dateFilter",dateClass:"dateClass"},outputs:{selectedChange:"selectedChange",yearSelected:"yearSelected",monthSelected:"monthSelected",_userSelection:"_userSelection"},exportAs:["ngxMatCalendar"],features:[r.Bb],decls:5,vars:5,consts:[[3,"cdkPortalOutlet"],["cdkMonitorSubtreeFocus","","tabindex","-1",1,"mat-calendar-content",3,"ngSwitch"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","selectedChange","_userSelection",4,"ngSwitchCase"],[3,"activeDate","selected","dateFilter","maxDate","minDate","activeDateChange","monthSelected","selectedChange",4,"ngSwitchCase"],[3,"activeDate","selected","dateFilter","maxDate","minDate","activeDateChange","yearSelected","selectedChange",4,"ngSwitchCase"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","selectedChange","_userSelection"],[3,"activeDate","selected","dateFilter","maxDate","minDate","activeDateChange","monthSelected","selectedChange"],[3,"activeDate","selected","dateFilter","maxDate","minDate","activeDateChange","yearSelected","selectedChange"]],template:function(t,e){1&t&&(r.Ic(0,of,0,0,"ng-template",0),r.Vb(1,"div",1),r.Ic(2,af,1,6,"ngx-mat-month-view",2),r.Ic(3,lf,1,5,"ngx-mat-year-view",3),r.Ic(4,cf,1,5,"ngx-mat-multi-year-view",4),r.Ub()),2&t&&(r.nc("cdkPortalOutlet",e._calendarHeaderPortal),r.Db(1),r.nc("ngSwitch",e.currentView),r.Db(1),r.nc("ngSwitchCase","month"),r.Db(1),r.nc("ngSwitchCase","year"),r.Db(1),r.nc("ngSwitchCase","multi-year"))},directives:[be,mt,gt,Kf,qf,$f],styles:['.mat-calendar{display:block}.mat-calendar-header{padding:8px 8px 0}.mat-calendar-content{outline:none;padding:0 8px 8px}.mat-calendar-controls{display:flex;margin:5% calc(4.71429% - 16px)}.mat-calendar-spacer{flex:1 1 auto}.mat-calendar-period-button{min-width:0}.mat-calendar-arrow{border-left:5px solid transparent;border-right:5px solid transparent;border-top-style:solid;border-top-width:5px;display:inline-block;height:0;margin:0 0 0 5px;vertical-align:middle;width:0}.mat-calendar-arrow.mat-calendar-invert{transform:rotate(180deg)}[dir=rtl] .mat-calendar-arrow{margin:0 5px 0 0}.mat-calendar-next-button,.mat-calendar-previous-button{position:relative}.mat-calendar-next-button:after,.mat-calendar-previous-button:after{border:solid;border-width:2px 0 0;bottom:0;content:"";left:0;margin:15.5px;position:absolute;right:0;top:0}[dir=rtl] .mat-calendar-next-button,[dir=rtl] .mat-calendar-previous-button{transform:rotate(180deg)}.mat-calendar-previous-button:after{border-left-width:2px;transform:translateX(2px) rotate(-45deg)}.mat-calendar-next-button:after{border-right-width:2px;transform:translateX(-2px) rotate(45deg)}.mat-calendar-table{border-collapse:collapse;border-spacing:0;width:100%}.mat-calendar-table-header th{padding:0 0 8px;text-align:center}.mat-calendar-table-header-divider{height:1px;position:relative}.mat-calendar-table-header-divider:after{content:"";height:1px;left:-8px;position:absolute;right:-8px;top:0}'],encapsulation:2,changeDetection:0}),t})(),Xf=(()=>{class t{constructor(t,e,i){if(this._dateAdapter=t,this.cd=e,this.formBuilder=i,this.disabled=!1,this.showSpinners=!0,this.stepHour=1,this.stepMinute=1,this.stepSecond=1,this.showSeconds=!1,this.disableMinute=!1,this.enableMeridian=!1,this.color="primary",this.meridian="AM",this._onChange=()=>{},this._onTouched=()=>{},this._destroyed=new _e.a,this.pattern=Bf,!this._dateAdapter)throw Hf("NgxMatDateAdapter");this.form=this.formBuilder.group({hour:[{value:null,disabled:this.disabled},[pc.required,pc.pattern(Bf)]],minute:[{value:null,disabled:this.disabled},[pc.required,pc.pattern(Nf)]],second:[{value:null,disabled:this.disabled},[pc.required,pc.pattern(jf)]]})}get hour(){let t=Number(this.form.controls.hour.value);return isNaN(t)?0:t}get minute(){let t=Number(this.form.controls.minute.value);return isNaN(t)?0:t}get second(){let t=Number(this.form.controls.second.value);return isNaN(t)?0:t}get valid(){return this.form.valid}ngOnInit(){this.form.valueChanges.pipe(Sn(this._destroyed),Be(400)).subscribe(t=>{this._updateModel()})}ngOnChanges(t){(t.disabled||t.disableMinute)&&this._setDisableStates()}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}writeValue(t){null!=t?this._model=t:(this._model=this._dateAdapter.today(),null!=this.defaultTime&&this._dateAdapter.setTimeByDefaultValues(this._model,this.defaultTime)),this._updateHourMinuteSecond()}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this._disabled=t,this.cd.markForCheck()}formatInput(t){t.value=t.value.replace(Uf,"")}toggleMeridian(){this.meridian="AM"===this.meridian?"PM":"AM",this.change("hour")}change(t,e){const i=this._getNextValueByProp(t,e);this.form.controls[t].setValue(zf(i),{onlySelf:!1,emitEvent:!1}),this._updateModel()}_updateHourMinuteSecond(){let t=this._dateAdapter.getHour(this._model);const e=this._dateAdapter.getMinute(this._model),i=this._dateAdapter.getSecond(this._model);this.enableMeridian&&(t>Lf.meridian?(t-=Lf.meridian,this.meridian="PM"):this.meridian="AM"),this.form.controls.hour.setValue(zf(t)),this.form.controls.minute.setValue(zf(e)),this.form.controls.second.setValue(zf(i))}_updateModel(){let t=this.hour;this.enableMeridian&&"PM"===this.meridian&&t!==Lf.meridian&&(t+=Lf.meridian),this._dateAdapter.setHour(this._model,t),this._dateAdapter.setMinute(this._model,this.minute),this._dateAdapter.setSecond(this._model,this.second),this._onChange(this._model)}_getNextValueByProp(t,e){const i=t[0].toUpperCase()+t.slice(1),n=Lf[`min${i}`];let r,s=Lf[`max${i}`];return"hour"===t&&this.enableMeridian&&(s=Lf.meridian),null==e?r=this[t]%s:(r=e?this[t]+this[`step${i}`]:this[t]-this[`step${i}`],"hour"===t&&this.enableMeridian?(r%=s+1,0===r&&(r=e?1:s)):r%=s,r=e?r>s?r-s+n:r:r<n?r-n+s:r),r}_setDisableStates(){this.disabled?this.form.disable():(this.form.enable(),this.disableMinute&&(this.form.get("minute").disable(),this.showSeconds&&this.form.get("second").disable()))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Ef,8),r.Pb(r.h),r.Pb(Lh))},t.\u0275cmp=r.Jb({type:t,selectors:[["ngx-mat-timepicker"]],hostAttrs:[1,"ngx-mat-timepicker"],inputs:{disabled:"disabled",showSpinners:"showSpinners",stepHour:"stepHour",stepMinute:"stepMinute",stepSecond:"stepSecond",showSeconds:"showSeconds",disableMinute:"disableMinute",enableMeridian:"enableMeridian",color:"color",defaultTime:"defaultTime"},exportAs:["ngxMatTimepicker"],features:[r.Cb([{provide:rc,useExisting:Object(r.W)(()=>t),multi:!0}]),r.Bb],decls:18,vars:7,consts:[[3,"formGroup"],[1,"ngx-mat-timepicker-table"],[1,"ngx-mat-timepicker-tbody"],[4,"ngIf"],["appearance","legacy"],["type","text","matInput","","maxlength","2","formControlName","hour",3,"input","keydown.ArrowUp","keydown.ArrowDown","blur"],[1,"ngx-mat-timepicker-spacer"],["type","text","matInput","","maxlength","2","formControlName","minute",3,"input","keydown.ArrowUp","keydown.ArrowDown","blur"],["class","ngx-mat-timepicker-spacer",4,"ngIf"],["class","ngx-mat-timepicker-meridian",4,"ngIf"],["type","button","mat-icon-button","","aria-label","expand_less icon",3,"disabled","click"],["type","text","matInput","","maxlength","2","formControlName","second",3,"input","keydown.ArrowUp","keydown.ArrowDown","blur"],[1,"ngx-mat-timepicker-meridian"],["mat-button","","mat-stroked-button","",3,"color","disabled","click"],["type","button","mat-icon-button","","aria-label","expand_more icon",3,"disabled","click"]],template:function(t,e){1&t&&(r.Vb(0,"form",0),r.Vb(1,"table",1),r.Vb(2,"tbody",2),r.Ic(3,pf,14,5,"tr",3),r.Vb(4,"tr"),r.Vb(5,"td"),r.Vb(6,"mat-form-field",4),r.Vb(7,"input",5),r.cc("input",function(t){return e.formatInput(t.target)})("keydown.ArrowUp",function(t){return e.change("hour",!0),t.preventDefault()})("keydown.ArrowDown",function(t){return e.change("hour",!1),t.preventDefault()})("blur",function(){return e.change("hour")}),r.Ub(),r.Ub(),r.Ub(),r.Vb(8,"td",6),r.Kc(9,":"),r.Ub(),r.Vb(10,"td"),r.Vb(11,"mat-form-field",4),r.Vb(12,"input",7),r.cc("input",function(t){return e.formatInput(t.target)})("keydown.ArrowUp",function(t){return e.change("minute",!0),t.preventDefault()})("keydown.ArrowDown",function(t){return e.change("minute",!1),t.preventDefault()})("blur",function(){return e.change("minute")}),r.Ub(),r.Ub(),r.Ub(),r.Ic(13,ff,2,0,"td",8),r.Ic(14,mf,3,0,"td",3),r.Ic(15,gf,1,0,"td",8),r.Ic(16,Af,3,3,"td",9),r.Ub(),r.Ic(17,wf,14,6,"tr",3),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.nc("formGroup",e.form),r.Db(3),r.nc("ngIf",e.showSpinners),r.Db(10),r.nc("ngIf",e.showSeconds),r.Db(1),r.nc("ngIf",e.showSeconds),r.Db(1),r.nc("ngIf",e.enableMeridian),r.Db(1),r.nc("ngIf",e.enableMeridian),r.Db(1),r.nc("ngIf",e.showSpinners))},directives:[dh,Fc,_h,ut,_u,Ou,ac,Th,Vc,Eh,Dl,Yp],styles:[".ngx-mat-timepicker{font-size:13px}.ngx-mat-timepicker form{min-width:90px}.ngx-mat-timepicker form .ngx-mat-timepicker-table .ngx-mat-timepicker-tbody tr td{text-align:center}.ngx-mat-timepicker form .ngx-mat-timepicker-table .ngx-mat-timepicker-tbody tr td.ngx-mat-timepicker-spacer{font-weight:700}.ngx-mat-timepicker form .ngx-mat-timepicker-table .ngx-mat-timepicker-tbody tr td.ngx-mat-timepicker-meridian .mat-button{border-radius:4px;border-radius:50%;flex-shrink:0;height:36px;line-height:36px;min-width:64px;min-width:0;padding:0;width:36px}.ngx-mat-timepicker form .ngx-mat-timepicker-table .ngx-mat-timepicker-tbody tr td .mat-icon-button{height:24px;line-height:24px;width:24px}.ngx-mat-timepicker form .ngx-mat-timepicker-table .ngx-mat-timepicker-tbody tr td .mat-icon-button .mat-icon{font-size:24px}.ngx-mat-timepicker form .ngx-mat-timepicker-table .ngx-mat-timepicker-tbody tr td .mat-form-field{max-width:20px;text-align:center;width:20px}"],encapsulation:2}),t})(),Jf=0;const tm=Ea(class{constructor(t){this._elementRef=t}});let em=(()=>{class t extends tm{constructor(t,e,i){super(t),this.cd=e,this._viewContainerRef=i}get valid(){return(this.datepicker.hideTime||this._timePicker&&this._timePicker.valid)&&this.datepicker.valid}get isViewMonth(){return!this._calendar||null==this._calendar.currentView||"month"==this._calendar.currentView}ngAfterViewInit(){this._calendar.focusActiveCell(),this.datepicker._customIcon&&(this._templateCustomIconPortal=new fe(this.datepicker._customIcon,this._viewContainerRef),this.cd.detectChanges())}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.h),r.Pb(r.S))},t.\u0275cmp=r.Jb({type:t,selectors:[["ngx-mat-datetime-content"]],viewQuery:function(t,e){if(1&t&&(r.Pc(Qf,1),r.Pc(Xf,1)),2&t){let t;r.vc(t=r.dc())&&(e._calendar=t.first),r.vc(t=r.dc())&&(e._timePicker=t.first)}},hostAttrs:[1,"mat-datepicker-content"],hostVars:3,hostBindings:function(t,e){2&t&&(r.Hc("@transformPanel","enter"),r.Hb("mat-datepicker-content-touch",e.datepicker.touchUi))},inputs:{color:"color"},exportAs:["ngxMatDatetimeContent"],features:[r.Ab],decls:2,vars:12,consts:[["cdkTrapFocus","",3,"id","ngClass","startAt","startView","minDate","maxDate","dateFilter","headerComponent","selected","dateClass","selectedChange","yearSelected","monthSelected"],[4,"ngIf"],["class","time-container",3,"disable-seconds",4,"ngIf"],[1,"actions"],["mat-button","","mat-stroked-button","","cdkFocusInitial","",3,"color","disabled","click"],[3,"cdkPortalOutlet"],[1,"time-container"],[3,"showSpinners","showSeconds","disabled","stepHour","stepMinute","stepSecond","ngModel","color","enableMeridian","disableMinute","ngModelChange"]],template:function(t,e){1&t&&(r.Vb(0,"ngx-mat-calendar",0),r.cc("selectedChange",function(t){return e.datepicker.select(t)})("yearSelected",function(t){return e.datepicker._selectYear(t)})("monthSelected",function(t){return e.datepicker._selectMonth(t)}),r.Ub(),r.Ic(1,kf,6,5,"ng-container",1)),2&t&&(r.nc("id",e.datepicker.id)("ngClass",e.datepicker.panelClass)("startAt",e.datepicker.startAt)("startView",e.datepicker.startView)("minDate",e.datepicker._minDate)("maxDate",e.datepicker._maxDate)("dateFilter",e.datepicker._dateFilter)("headerComponent",e.datepicker.calendarHeaderComponent)("selected",e.datepicker._selected)("dateClass",e.datepicker.dateClass)("@fadeInCalendar","enter"),r.Db(1),r.nc("ngIf",e.isViewMonth))},directives:[Qf,at,ut,Dl,be,Xf,Vc,uh,Yp],styles:['.mat-datepicker-content{border-radius:4px;box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);display:block}.mat-datepicker-content .mat-calendar{width:296px}.mat-datepicker-content .time-container{display:flex;justify-content:center;padding-top:5px;position:relative}.mat-datepicker-content .time-container.disable-seconds .ngx-mat-timepicker .table{margin-left:9px}.mat-datepicker-content .time-container:before{background-color:rgba(0,0,0,.12);content:"";height:1px;left:0;position:absolute;right:0;top:0}.mat-datepicker-content .actions{display:flex;justify-content:flex-end;padding:5px 15px 10px}'],encapsulation:2,data:{animation:[wd.transformPanel,wd.fadeInCalendar]},changeDetection:0}),t})(),im=(()=>{class t{constructor(t,e,i,n,s,o,a,l){if(this._dialog=t,this._overlay=e,this._ngZone=i,this._viewContainerRef=n,this._dateAdapter=o,this._dir=a,this._document=l,this.startView="month",this._defaultColor="primary",this._touchUi=!1,this._hideTime=!1,this.yearSelected=new r.o,this.monthSelected=new r.o,this.openedStream=new r.o,this.closedStream=new r.o,this._opened=!1,this._showSpinners=!0,this._showSeconds=!1,this._stepHour=1,this._stepMinute=1,this._stepSecond=1,this._enableMeridian=!1,this._hasBackdrop=!0,this.id="mat-datepicker-"+Jf++,this._validSelected=null,this._focusedElementBeforeOpen=null,this._inputSubscription=ye.a.EMPTY,this.stateChanges=new _e.a,this._selectedChanged=new _e.a,this._minValidator=()=>!this._minDate||!this._selected||this._dateAdapter.compareDateWithTime(this._minDate,this._selected,this.showSeconds)<=0?null:{matDatetimePickerMin:{min:this._minDate,actual:this._selected}},this._maxValidator=()=>!this._maxDate||!this._selected||this._dateAdapter.compareDateWithTime(this._maxDate,this._selected,this.showSeconds)>=0?null:{matDatetimePickerMax:{max:this._maxDate,actual:this._selected}},!this._dateAdapter)throw Hf("NgxMatDateAdapter");this._scrollStrategy=s}get startAt(){return this._startAt||(this.datepickerInput?this.datepickerInput.value:null)}set startAt(t){this._startAt=this._getValidDateOrNull(this._dateAdapter.deserialize(t))}get defaultColor(){return this._defaultColor}set defaultColor(t){this._defaultColor=t}get color(){return this._color||(this.datepickerInput?this.datepickerInput._getThemePalette():"primary")}set color(t){this._color=t}get touchUi(){return this._touchUi}set touchUi(t){this._touchUi=ti(t)}get hideTime(){return this._hideTime}set hideTime(t){this._hideTime=ti(t)}get disabled(){return void 0===this._disabled&&this.datepickerInput?this.datepickerInput.disabled:!!this._disabled}set disabled(t){const e=ti(t);e!==this._disabled&&(this._disabled=e,this.stateChanges.next(e))}get opened(){return this._opened}set opened(t){t?this.open():this.close()}get showSpinners(){return this._showSpinners}set showSpinners(t){this._showSpinners=t}get showSeconds(){return this._showSeconds}set showSeconds(t){this._showSeconds=t}get stepHour(){return this._stepHour}set stepHour(t){this._stepHour=t}get stepMinute(){return this._stepMinute}set stepMinute(t){this._stepMinute=t}get stepSecond(){return this._stepSecond}set stepSecond(t){this._stepSecond=t}get enableMeridian(){return this._enableMeridian}set enableMeridian(t){this._enableMeridian=t}get disableMinute(){return this._disableMinute}set disableMinute(t){this._disableMinute=t}get defaultTime(){return this._defaultTime}set defaultTime(t){this._defaultTime=t}get _selected(){return this._validSelected}set _selected(t){this._validSelected=t}get _minDate(){return this.datepickerInput&&this.datepickerInput.min}get _maxDate(){return this.datepickerInput&&this.datepickerInput.max}get valid(){const t=this._minValidator(),e=this._maxValidator();return null==t&&null==e}get _dateFilter(){return this.datepickerInput&&this.datepickerInput._dateFilter}ngOnDestroy(){this.close(),this._popupRef&&(this._popupRef.dispose(),this._popupComponentRef=null),this._inputSubscription.unsubscribe(),this.stateChanges.complete()}select(t){this._dateAdapter.copyTime(t,this._selected),this._selected=t}_selectYear(t){this.yearSelected.emit(t)}_selectMonth(t){this.monthSelected.emit(t)}ok(){const t=this._dateAdapter.clone(this._selected);this._selectedChanged.next(t),this.close()}cancel(){this._selected=this._rawValue,this.close()}_registerInput(t){if(this.datepickerInput)throw Error("A NgxMatDatepicker can only be associated with a single input.");this.datepickerInput=t,this._inputSubscription=this.datepickerInput._valueChange.subscribe(t=>this._selected=t)}open(){if(this._rawValue=null!=this._selected?this._dateAdapter.clone(this._selected):null,null==this._selected&&(this._selected=this._dateAdapter.today(),null!=this.defaultTime&&this._dateAdapter.setTimeByDefaultValues(this._selected,this.defaultTime)),!this._opened&&!this.disabled){if(!this.datepickerInput)throw Error("Attempted to open an NgxMatDatepicker with no associated input.");this._document&&(this._focusedElementBeforeOpen=this._document.activeElement),this.touchUi?this._openAsDialog():this._openAsPopup(),this._opened=!0,this.openedStream.emit()}}close(){if(!this._opened)return;this._popupRef&&this._popupRef.hasAttached()&&this._popupRef.detach(),this._dialogRef&&(this._dialogRef.close(),this._dialogRef=null),this._calendarPortal&&this._calendarPortal.isAttached&&this._calendarPortal.detach();const t=()=>{this._opened&&(this._opened=!1,this.closedStream.emit(),this._focusedElementBeforeOpen=null)};this._focusedElementBeforeOpen&&"function"==typeof this._focusedElementBeforeOpen.focus?(this._focusedElementBeforeOpen.focus(),setTimeout(t)):t()}_openAsDialog(){this._dialogRef&&this._dialogRef.close(),this._dialogRef=this._dialog.open(em,{direction:this._dir?this._dir.value:"ltr",viewContainerRef:this._viewContainerRef,panelClass:"mat-datepicker-dialog",hasBackdrop:this._hasBackdrop}),this._dialogRef.afterClosed().subscribe(()=>this.close()),this._dialogRef.componentInstance.datepicker=this,this._setColor()}_openAsPopup(){this._calendarPortal||(this._calendarPortal=new pe(em,this._viewContainerRef)),this._popupRef||this._createPopup(),this._popupRef.hasAttached()||(this._popupComponentRef=this._popupRef.attach(this._calendarPortal),this._popupComponentRef.instance.datepicker=this,this._setColor(),this._ngZone.onStable.asObservable().pipe(Qe(1)).subscribe(()=>{this._popupRef.updatePosition()}))}_createPopup(){const t=new br({positionStrategy:this._createPopupPositionStrategy(),hasBackdrop:this._hasBackdrop,backdropClass:"mat-overlay-transparent-backdrop",direction:this._dir,scrollStrategy:this._scrollStrategy(),panelClass:"mat-datepicker-popup"});this._popupRef=this._overlay.create(t),this._popupRef.overlayElement.setAttribute("role","dialog"),Object(or.a)(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(He(t=>27===t.keyCode||this.datepickerInput&&t.altKey&&38===t.keyCode))).subscribe(t=>{t&&t.preventDefault(),this._hasBackdrop&&t?this.cancel():this.close()})}_createPopupPositionStrategy(){return this._overlay.position().flexibleConnectedTo(this.datepickerInput.getConnectedOverlayOrigin()).withTransformOriginOn(".mat-datepicker-content").withFlexibleDimensions(!1).withViewportMargin(8).withLockedPosition().withPositions([{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"}])}_getValidDateOrNull(t){return this._dateAdapter.isDateInstance(t)&&this._dateAdapter.isValid(t)?t:null}_setColor(){const t=this.color;this._popupComponentRef&&(this._popupComponentRef.instance.color=t),this._dialogRef&&(this._dialogRef.componentInstance.color=t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Gl),r.Pb(Fr),r.Pb(r.B),r.Pb(r.S),r.Pb(Cd),r.Pb(Ef,8),r.Pb(Zn,8),r.Pb(a,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["ngx-mat-datetime-picker"]],contentQueries:function(t,e,i){if(1&t&&r.Ib(i,r.O,1),2&t){let t;r.vc(t=r.dc())&&(e._customIcon=t.first)}},inputs:{startView:"startView",startAt:"startAt",defaultColor:"defaultColor",color:"color",touchUi:"touchUi",hideTime:"hideTime",disabled:"disabled",opened:"opened",showSpinners:"showSpinners",showSeconds:"showSeconds",stepHour:"stepHour",stepMinute:"stepMinute",stepSecond:"stepSecond",enableMeridian:"enableMeridian",disableMinute:"disableMinute",defaultTime:"defaultTime",calendarHeaderComponent:"calendarHeaderComponent",panelClass:"panelClass",dateClass:"dateClass"},outputs:{yearSelected:"yearSelected",monthSelected:"monthSelected",openedStream:"opened",closedStream:"closed"},exportAs:["ngxMatDatetimePicker"],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();const nm={provide:rc,useExisting:Object(r.W)(()=>am),multi:!0},rm={provide:hc,useExisting:Object(r.W)(()=>am),multi:!0};class sm{constructor(t,e){this.target=t,this.targetElement=e,this.value=this.target.value}}let om,am=(()=>{class t{constructor(t,e,i,n){if(this._elementRef=t,this._dateAdapter=e,this._dateFormats=i,this._formField=n,this.dateChange=new r.o,this.dateInput=new r.o,this._valueChange=new r.o,this.stateChanges=new r.o,this._onTouched=()=>{},this._cvaOnChange=()=>{},this._validatorOnChange=()=>{},this._datepickerSubscription=ye.a.EMPTY,this._localeSubscription=ye.a.EMPTY,this._parseValidator=()=>this._lastValueValid?null:{matDatetimePickerParse:{text:this._elementRef.nativeElement.value}},this._minValidator=t=>{const e=this._getValidDateOrNull(this._dateAdapter.deserialize(t.value));return!this.min||!e||this._dateAdapter.compareDateWithTime(this.min,e,this._datepicker.showSeconds)<=0?null:{matDatetimePickerMin:{min:this.min,actual:e}}},this._maxValidator=t=>{const e=this._getValidDateOrNull(this._dateAdapter.deserialize(t.value));return!this.max||!e||this._dateAdapter.compareDateWithTime(this.max,e,this._datepicker.showSeconds)>=0?null:{matDatetimePickerMax:{max:this.max,actual:e}}},this._filterValidator=t=>{const e=this._getValidDateOrNull(this._dateAdapter.deserialize(t.value));return this._dateFilter&&e&&!this._dateFilter(e)?{matDatetimePickerFilter:!0}:null},this._validator=pc.compose([this._parseValidator,this._minValidator,this._maxValidator,this._filterValidator]),this._lastValueValid=!1,!this._dateAdapter)throw Hf("NgxMatDateAdapter");if(!this._dateFormats)throw Hf("NGX_MAT_DATE_FORMATS");this._localeSubscription=e.localeChanges.subscribe(()=>{this.value=this.value})}set ngxMatDatetimePicker(t){t&&(this._datepicker=t,this._datepicker._registerInput(this),this._datepickerSubscription.unsubscribe(),this._datepickerSubscription=this._datepicker._selectedChanged.subscribe(t=>{this.value=t,this._cvaOnChange(t),this._onTouched(),this.dateInput.emit(new sm(this,this._elementRef.nativeElement)),this.dateChange.emit(new sm(this,this._elementRef.nativeElement))}))}set ngxMatDatetimePickerFilter(t){this._dateFilter=t,this._validatorOnChange()}get value(){return this._value}set value(t){t=this._dateAdapter.deserialize(t),this._lastValueValid=!t||this._dateAdapter.isValid(t),t=this._getValidDateOrNull(t);const e=this.value;this._value=t,this._formatValue(t),this._dateAdapter.sameDate(e,t)||this._valueChange.emit(t)}get min(){return this._min}set min(t){this._min=this._getValidDateOrNull(this._dateAdapter.deserialize(t)),this._validatorOnChange()}get max(){return this._max}set max(t){this._max=this._getValidDateOrNull(this._dateAdapter.deserialize(t)),this._validatorOnChange()}get disabled(){return!!this._disabled}set disabled(t){const e=null!=t&&"false"!=`${t}`,i=this._elementRef.nativeElement;this._disabled!==e&&(this._disabled=e,this.stateChanges.emit(void 0)),e&&i.blur&&i.blur()}ngOnDestroy(){this._datepickerSubscription.unsubscribe(),this._localeSubscription.unsubscribe(),this._valueChange.complete(),this.stateChanges.complete()}registerOnValidatorChange(t){this._validatorOnChange=t}validate(t){return this._validator?this._validator(t):null}getPopupConnectionElementRef(){return this.getConnectedOverlayOrigin()}getConnectedOverlayOrigin(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef}writeValue(t){this.value=t}registerOnChange(t){this._cvaOnChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t}_onKeydown(t){this._datepicker&&t.altKey&&40===t.keyCode&&!this._elementRef.nativeElement.readOnly&&(this._datepicker.open(),t.preventDefault())}_onInput(t){const e=this._lastValueValid;let i=this._dateAdapter.parse(t,this._dateFormats.parse.dateInput);this._lastValueValid=!i||this._dateAdapter.isValid(i),i=this._getValidDateOrNull(i);const n=this._dateAdapter.isSameTime(i,this._value);null!=i&&(!n||!this._dateAdapter.sameDate(i,this._value))||null==i&&null!=this._value?(this._value=i,this._cvaOnChange(i),this._valueChange.emit(i),this.dateInput.emit(new sm(this,this._elementRef.nativeElement))):e!==this._lastValueValid&&this._validatorOnChange()}_onChange(){this.dateChange.emit(new sm(this,this._elementRef.nativeElement))}_getThemePalette(){return this._formField?this._formField.color:void 0}_onBlur(){this.value&&this._formatValue(this.value),this._onTouched()}_onFocus(){this._datepicker&&this._datepicker.opened&&this._datepicker.cancel()}_formatValue(t){this._elementRef.nativeElement.value=t?this._dateAdapter.format(t,this._dateFormats.display.dateInput):""}_getValidDateOrNull(t){return this._dateAdapter.isDateInstance(t)&&this._dateAdapter.isValid(t)?t:null}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(Ef,8),r.Pb(Df,8),r.Pb(_u,8))},t.\u0275dir=r.Kb({type:t,selectors:[["input","ngxMatDatetimePicker",""]],hostVars:5,hostBindings:function(t,e){1&t&&r.cc("input",function(t){return e._onInput(t.target.value)})("change",function(){return e._onChange()})("blur",function(){return e._onBlur()})("focus",function(){return e._onFocus()})("keydown",function(t){return e._onKeydown(t)}),2&t&&(r.Yb("disabled",e.disabled),r.Eb("aria-haspopup",e._datepicker?"dialog":null)("aria-owns",(null==e._datepicker?null:e._datepicker.opened)&&e._datepicker.id||null)("min",e.min?e._dateAdapter.toIso8601(e.min):null)("max",e.max?e._dateAdapter.toIso8601(e.max):null))},inputs:{value:"value",ngxMatDatetimePicker:"ngxMatDatetimePicker",ngxMatDatetimePickerFilter:"ngxMatDatetimePickerFilter",min:"min",max:"max",disabled:"disabled"},outputs:{dateChange:"dateChange",dateInput:"dateInput"},exportAs:["ngxMatDatetimePickerInput"],features:[r.Cb([nm,rm,{provide:ku,useExisting:t}])]}),t})(),lm=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Et,Mu,Fh,Vh,Qp,Pl]]}),t})(),cm=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[Sd,{provide:Vf,useClass:Ff}],imports:[[Et,Zd,Jl,ve,Vh,Qp,Pl,Mu,lm]]}),t})();try{om="undefined"!=typeof Intl}catch(Knt){om=!1}const hm={long:["January","February","March","April","May","June","July","August","September","October","November","December"],short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],narrow:["J","F","M","A","M","J","J","A","S","O","N","D"]},um=fm(31,t=>String(t+1)),dm={long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],narrow:["S","M","T","W","T","F","S"]},pm=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;function fm(t,e){const i=Array(t);for(let n=0;n<t;n++)i[n]=e(n);return i}let mm=(()=>{class t extends Ef{constructor(t,e){super(),this.useUtcForDisplay=!0,super.setLocale(t),this.useUtcForDisplay=!e.TRIDENT,this._clampDate=e.TRIDENT||e.EDGE}getYear(t){return t.getFullYear()}getMonth(t){return t.getMonth()}getDate(t){return t.getDate()}getDayOfWeek(t){return t.getDay()}getMonthNames(t){if(om){const e=new Intl.DateTimeFormat(this.locale,{month:t,timeZone:"utc"});return fm(12,t=>this._stripDirectionalityCharacters(this._format(e,new Date(2017,t,1))))}return hm[t]}getDateNames(){if(om){const t=new Intl.DateTimeFormat(this.locale,{day:"numeric",timeZone:"utc"});return fm(31,e=>this._stripDirectionalityCharacters(this._format(t,new Date(2017,0,e+1))))}return um}getDayOfWeekNames(t){if(om){const e=new Intl.DateTimeFormat(this.locale,{weekday:t,timeZone:"utc"});return fm(7,t=>this._stripDirectionalityCharacters(this._format(e,new Date(2017,0,t+1))))}return dm[t]}getYearName(t){if(om){const e=new Intl.DateTimeFormat(this.locale,{year:"numeric",timeZone:"utc"});return this._stripDirectionalityCharacters(this._format(e,t))}return String(this.getYear(t))}getFirstDayOfWeek(){return 0}getNumDaysInMonth(t){return this.getDate(this._createDateWithOverflow(this.getYear(t),this.getMonth(t)+1,0))}clone(t){return new Date(t.getTime())}createDate(t,e,i){if(e<0||e>11)throw Error(`Invalid month index "${e}". Month index has to be between 0 and 11.`);if(i<1)throw Error(`Invalid date "${i}". Date has to be greater than 0.`);let n=this._createDateWithOverflow(t,e,i);if(n.getMonth()!=e)throw Error(`Invalid date "${i}" for month with index "${e}".`);return n}today(){return new Date}parse(t){return"number"==typeof t?new Date(t):t?new Date(Date.parse(t)):null}format(t,e){if(!this.isValid(t))throw Error("NativeDateAdapter: Cannot format invalid date.");if(om){this._clampDate&&(t.getFullYear()<1||t.getFullYear()>9999)&&(t=this.clone(t)).setFullYear(Math.max(1,Math.min(9999,t.getFullYear()))),e=Object.assign(Object.assign({},e),{timeZone:"utc"});const i=new Intl.DateTimeFormat(this.locale,e);return this._stripDirectionalityCharacters(this._format(i,t))}return this._stripDirectionalityCharacters(t.toDateString())}addCalendarYears(t,e){return this.addCalendarMonths(t,12*e)}addCalendarMonths(t,e){let i=this._createDateWithOverflow(this.getYear(t),this.getMonth(t)+e,this.getDate(t));return this.getMonth(i)!=((this.getMonth(t)+e)%12+12)%12&&(i=this._createDateWithOverflow(this.getYear(i),this.getMonth(i),0)),i}addCalendarDays(t,e){return this._createDateWithOverflow(this.getYear(t),this.getMonth(t),this.getDate(t)+e)}toIso8601(t){return[t.getUTCFullYear(),this._2digit(t.getUTCMonth()+1),this._2digit(t.getUTCDate())].join("-")}deserialize(t){if("string"==typeof t){if(!t)return null;if(pm.test(t)){let e=new Date(t);if(this.isValid(e))return e}}return super.deserialize(t)}isDateInstance(t){return t instanceof Date}isValid(t){return!isNaN(t.getTime())}invalid(){return new Date(NaN)}getHour(t){return t.getHours()}getMinute(t){return t.getMinutes()}getSecond(t){return t.getSeconds()}setHour(t,e){t.setHours(e)}setMinute(t,e){t.setMinutes(e)}setSecond(t,e){t.setSeconds(e)}_createDateWithOverflow(t,e,i){const n=new Date(t,e,i);return t>=0&&t<100&&n.setFullYear(this.getYear(n)-1900),n}_2digit(t){return("00"+t).slice(-2)}_stripDirectionalityCharacters(t){return t.replace(/[\u200e\u200f]/g,"")}_format(t,e){const i=new Date;return i.setUTCFullYear(e.getFullYear(),e.getMonth(),e.getDate()),i.setUTCHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),t.format(i)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Ma,8),r.Zb(ci))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();const gm={year:"numeric",month:"numeric",day:"numeric",hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"},Am={parse:{dateInput:gm},display:{dateInput:gm,monthYearLabel:{year:"numeric",month:"short"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"}}};let bm=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[{provide:Ef,useClass:mm}],imports:[[hi]]}),t})();const vm=Am;let _m=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[{provide:Df,useValue:vm}],imports:[[bm]]}),t})();const ym={leading:!0,trailing:!1};function wm(t,e=Ue,i=ym){return n=>n.lift(new xm(t,e,i.leading,i.trailing))}class xm{constructor(t,e,i,n){this.duration=t,this.scheduler=e,this.leading=i,this.trailing=n}call(t,e){return e.subscribe(new Cm(t,this.duration,this.scheduler,this.leading,this.trailing))}}class Cm extends Ee.a{constructor(t,e,i,n,r){super(t),this.duration=e,this.scheduler=i,this.leading=n,this.trailing=r,this._hasTrailingValue=!1,this._trailingValue=null}_next(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(Sm,this.duration,{subscriber:this})),this.leading?this.destination.next(t):this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0))}_complete(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()}clearThrottle(){const t=this.throttled;t&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),t.unsubscribe(),this.remove(t),this.throttled=null)}}function Sm(t){const{subscriber:e}=t;e.clearThrottle()}var km=i("A/ap"),Em=i.n(km);const Dm=["tooltipTemplate"],Im=["leftOuterSelectionBar"],Pm=["rightOuterSelectionBar"],Om=["fullBar"],Mm=["selectionBar"],Tm=["minHandle"],Rm=["maxHandle"],Vm=["floorLabel"],Fm=["ceilLabel"],Lm=["minHandleLabel"],Um=["maxHandleLabel"],Bm=["combinedLabel"],Nm=["ticksElement"];function jm(t,e){if(1&t&&r.Qb(0,"ngx-slider-tooltip-wrapper",31),2&t){const t=r.gc().$implicit,e=r.gc();r.nc("template",e.tooltipTemplate)("tooltip",t.valueTooltip)("placement",t.valueTooltipPlacement)("content",t.value)}}function zm(t,e){if(1&t&&r.Qb(0,"span",32),2&t){const t=r.gc().$implicit;r.nc("innerHTML",t.legend,r.Bc)}}const Hm=function(t){return{"ngx-slider-selected":t}};function Km(t,e){if(1&t&&(r.Vb(0,"span",27),r.Qb(1,"ngx-slider-tooltip-wrapper",28),r.Ic(2,jm,1,4,"ngx-slider-tooltip-wrapper",29),r.Ic(3,zm,1,1,"span",30),r.Ub()),2&t){const t=e.$implicit,i=r.gc();r.nc("ngClass",r.sc(7,Hm,t.selected))("ngStyle",t.style),r.Db(1),r.nc("template",i.tooltipTemplate)("tooltip",t.tooltip)("placement",t.tooltipPlacement),r.Db(1),r.nc("ngIf",null!=t.value),r.Db(1),r.nc("ngIf",null!=t.legend)}}function $m(t,e){}function Gm(t,e){1&t&&r.Ic(0,$m,0,0,"ng-template")}const Wm=function(t,e,i){return{tooltip:t,placement:e,content:i}};function Zm(t,e){if(1&t&&(r.Tb(0),r.Ic(1,Gm,1,0,void 0,1),r.Sb()),2&t){const t=r.gc();r.Db(1),r.nc("ngTemplateOutlet",t.template)("ngTemplateOutletContext",r.uc(2,Wm,t.tooltip,t.placement,t.content))}}function qm(t,e){if(1&t&&(r.Tb(0),r.Vb(1,"div",2),r.Kc(2),r.Ub(),r.Sb()),2&t){const t=r.gc();r.Db(1),r.Eb("title",t.tooltip)("data-tooltip-placement",t.placement),r.Db(1),r.Mc(" ",t.content," ")}}const Ym={Low:0,High:1,Floor:2,Ceil:3,TickValue:4};Ym[Ym.Low]="Low",Ym[Ym.High]="High",Ym[Ym.Floor]="Floor",Ym[Ym.Ceil]="Ceil",Ym[Ym.TickValue]="TickValue";class Qm{constructor(){this.floor=0,this.ceil=null,this.step=1,this.minRange=null,this.maxRange=null,this.pushRange=!1,this.minLimit=null,this.maxLimit=null,this.translate=null,this.combineLabels=null,this.getLegend=null,this.stepsArray=null,this.bindIndexForStepsArray=!1,this.draggableRange=!1,this.draggableRangeOnly=!1,this.showSelectionBar=!1,this.showSelectionBarEnd=!1,this.showSelectionBarFromValue=null,this.showOuterSelectionBars=!1,this.hidePointerLabels=!1,this.hideLimitLabels=!1,this.autoHideLimitLabels=!0,this.readOnly=!1,this.disabled=!1,this.mouseEventsInterval=50,this.touchEventsInterval=50,this.inputEventsInterval=100,this.outputEventsInterval=100,this.showTicks=!1,this.showTicksValues=!1,this.tickStep=null,this.tickValueStep=null,this.ticksArray=null,this.ticksTooltip=null,this.ticksValuesTooltip=null,this.vertical=!1,this.getSelectionBarColor=null,this.getTickColor=null,this.getPointerColor=null,this.keyboardSupport=!0,this.scale=1,this.enforceStep=!0,this.enforceRange=!0,this.enforceStepsArray=!0,this.noSwitching=!1,this.onlyBindHandles=!1,this.rightToLeft=!1,this.reversedControls=!1,this.boundPointerLabels=!0,this.logScale=!1,this.customValueToPosition=null,this.customPositionToValue=null,this.precisionLimit=12,this.selectionBarGradient=null,this.ariaLabel=null,this.ariaLabelledBy=null,this.ariaLabelHigh=null,this.ariaLabelledByHigh=null,this.handleDimension=null,this.barDimension=null,this.animate=!0,this.animateOnMove=!1}}const Xm={Min:0,Max:1};Xm[Xm.Min]="Min",Xm[Xm.Max]="Max";class Jm{}class tg{static isNullOrUndefined(t){return null==t}static areArraysEqual(t,e){if(t.length!==e.length)return!1;for(let i=0;i<t.length;++i)if(t[i]!==e[i])return!1;return!0}static linearValueToPosition(t,e,i){return(t-e)/(i-e)}static logValueToPosition(t,e,i){return((t=Math.log(t))-(e=Math.log(e)))/((i=Math.log(i))-e)}static linearPositionToValue(t,e,i){return t*(i-e)+e}static logPositionToValue(t,e,i){return e=Math.log(e),i=Math.log(i),Math.exp(t*(i-e)+e)}static findStepIndex(t,e){const i=e.map(e=>Math.abs(t-e.value));let n=0;for(let r=0;r<e.length;r++)i[r]!==i[n]&&i[r]<i[n]&&(n=r);return n}}class eg{static isTouchEvent(t){return void 0!==window.TouchEvent?t instanceof TouchEvent:void 0!==t.touches}static isResizeObserverAvailable(){return void 0!==window.ResizeObserver}}class ig{static roundToPrecisionLimit(t,e){return+t.toPrecision(e)}static isModuloWithinPrecisionLimit(t,e,i){const n=Math.pow(10,-i);return Math.abs(t%e)<=n||Math.abs(Math.abs(t%e)-e)<=n}static clampToRange(t,e,i){return Math.min(Math.max(t,e),i)}}class ng{constructor(){this.eventName=null,this.events=null,this.eventsSubscription=null,this.teardownCallback=null}}class rg{constructor(t){this.renderer=t}attachPassiveEventListener(t,e,i,n){if(!0!==Em.a.hasSupport)return this.attachEventListener(t,e,i,n);const r=new ng;r.eventName=e,r.events=new _e.a;const s=t=>{r.events.next(t)};return t.addEventListener(e,s,{passive:!0,capture:!1}),r.teardownCallback=()=>{t.removeEventListener(e,s,{passive:!0,capture:!1})},r.eventsSubscription=r.events.pipe(tg.isNullOrUndefined(n)?Pe(()=>{}):wm(n,void 0,{leading:!0,trailing:!0})).subscribe(t=>{i(t)}),r}detachEventListener(t){tg.isNullOrUndefined(t.eventsSubscription)||(t.eventsSubscription.unsubscribe(),t.eventsSubscription=null),tg.isNullOrUndefined(t.events)||(t.events.complete(),t.events=null),tg.isNullOrUndefined(t.teardownCallback)||(t.teardownCallback(),t.teardownCallback=null)}attachEventListener(t,e,i,n){const r=new ng;return r.eventName=e,r.events=new _e.a,r.teardownCallback=this.renderer.listen(t,e,t=>{r.events.next(t)}),r.eventsSubscription=r.events.pipe(tg.isNullOrUndefined(n)?Pe(()=>{}):wm(n,void 0,{leading:!0,trailing:!0})).subscribe(t=>{i(t)}),r}}let sg=(()=>{class t{constructor(t,e,i){this.elemRef=t,this.renderer=e,this.changeDetectionRef=i,this._position=0,this._dimension=0,this._alwaysHide=!1,this._vertical=!1,this._scale=1,this.opacity=1,this.visibility="visible",this.left="",this.bottom="",this.height="",this.width="",this.eventListeners=[],this.eventListenerHelper=new rg(this.renderer)}get position(){return this._position}get dimension(){return this._dimension}get alwaysHide(){return this._alwaysHide}get vertical(){return this._vertical}get scale(){return this._scale}setAlwaysHide(t){this._alwaysHide=t,this.visibility=t?"hidden":"visible"}hide(){this.opacity=0}show(){this.alwaysHide||(this.opacity=1)}isVisible(){return!this.alwaysHide&&0!==this.opacity}setVertical(t){this._vertical=t,this._vertical?(this.left="",this.width=""):(this.bottom="",this.height="")}setScale(t){this._scale=t}setPosition(t){this._position===t||this.isRefDestroyed()||this.changeDetectionRef.markForCheck(),this._position=t,this._vertical?this.bottom=Math.round(t)+"px":this.left=Math.round(t)+"px"}calculateDimension(){const t=this.getBoundingClientRect();this._dimension=this.vertical?(t.bottom-t.top)*this.scale:(t.right-t.left)*this.scale}setDimension(t){this._dimension===t||this.isRefDestroyed()||this.changeDetectionRef.markForCheck(),this._dimension=t,this._vertical?this.height=Math.round(t)+"px":this.width=Math.round(t)+"px"}getBoundingClientRect(){return this.elemRef.nativeElement.getBoundingClientRect()}on(t,e,i){const n=this.eventListenerHelper.attachEventListener(this.elemRef.nativeElement,t,e,i);this.eventListeners.push(n)}onPassive(t,e,i){const n=this.eventListenerHelper.attachPassiveEventListener(this.elemRef.nativeElement,t,e,i);this.eventListeners.push(n)}off(t){let e,i;tg.isNullOrUndefined(t)?(e=[],i=this.eventListeners):(e=this.eventListeners.filter(e=>e.eventName!==t),i=this.eventListeners.filter(e=>e.eventName===t));for(const n of i)this.eventListenerHelper.detachEventListener(n);this.eventListeners=e}isRefDestroyed(){return tg.isNullOrUndefined(this.changeDetectionRef)||this.changeDetectionRef.destroyed}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.H),r.Pb(r.h))},t.\u0275dir=r.Kb({type:t,selectors:[["","ngxSliderElement",""]],hostVars:12,hostBindings:function(t,e){2&t&&r.Fc("opacity",e.opacity)("visibility",e.visibility)("left",e.left)("bottom",e.bottom)("height",e.height)("width",e.width)}}),t})(),og=(()=>{class t extends sg{constructor(t,e,i){super(t,e,i),this.active=!1,this.role="",this.tabindex="",this.ariaOrientation="",this.ariaLabel="",this.ariaLabelledBy="",this.ariaValueNow="",this.ariaValueText="",this.ariaValueMin="",this.ariaValueMax=""}focus(){this.elemRef.nativeElement.focus()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.H),r.Pb(r.h))},t.\u0275dir=r.Kb({type:t,selectors:[["","ngxSliderHandle",""]],hostVars:11,hostBindings:function(t,e){2&t&&(r.Eb("role",e.role)("tabindex",e.tabindex)("aria-orientation",e.ariaOrientation)("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledBy)("aria-valuenow",e.ariaValueNow)("aria-valuetext",e.ariaValueText)("aria-valuemin",e.ariaValueMin)("aria-valuemax",e.ariaValueMax),r.Hb("ngx-slider-active",e.active))},features:[r.Ab]}),t})(),ag=(()=>{class t extends sg{constructor(t,e,i){super(t,e,i),this._value=null}get value(){return this._value}setValue(t){let e=!1;!this.alwaysHide&&(tg.isNullOrUndefined(this.value)||this.value.length!==t.length||this.value.length>0&&0===this.dimension)&&(e=!0),this._value=t,this.elemRef.nativeElement.innerHTML=t,e&&this.calculateDimension()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.H),r.Pb(r.h))},t.\u0275dir=r.Kb({type:t,selectors:[["","ngxSliderLabel",""]],features:[r.Ab]}),t})();class lg{constructor(){this.selected=!1,this.style={},this.tooltip=null,this.tooltipPlacement=null,this.value=null,this.valueTooltip=null,this.valueTooltipPlacement=null,this.legend=null}}class cg{constructor(){this.active=!1,this.value=0,this.difference=0,this.position=0,this.lowLimit=0,this.highLimit=0}}class hg{static compare(t,e){return!(tg.isNullOrUndefined(t)&&tg.isNullOrUndefined(e)||tg.isNullOrUndefined(t)!==tg.isNullOrUndefined(e)||t.value!==e.value||t.highValue!==e.highValue)}}class ug extends hg{static compare(t,e){return!(tg.isNullOrUndefined(t)&&tg.isNullOrUndefined(e)||tg.isNullOrUndefined(t)!==tg.isNullOrUndefined(e)||t.value!==e.value||t.highValue!==e.highValue||t.forceChange!==e.forceChange)}}const dg={provide:rc,useExisting:Object(r.W)(()=>pg),multi:!0};let pg=(()=>{class t{constructor(t,e,i,n){this.renderer=t,this.elementRef=e,this.changeDetectionRef=i,this.zone=n,this.value=null,this.valueChange=new r.o,this.highValue=null,this.highValueChange=new r.o,this.options=new Qm,this.userChangeStart=new r.o,this.userChange=new r.o,this.userChangeEnd=new r.o,this.initHasRun=!1,this.inputModelChangeSubject=new _e.a,this.inputModelChangeSubscription=null,this.outputModelChangeSubject=new _e.a,this.outputModelChangeSubscription=null,this.viewLowValue=null,this.viewHighValue=null,this.viewOptions=new Qm,this.handleHalfDimension=0,this.maxHandlePosition=0,this.currentTrackingPointer=null,this.currentFocusPointer=null,this.firstKeyDown=!1,this.touchId=null,this.dragging=new cg,this.sliderElementVerticalClass=!1,this.sliderElementAnimateClass=!1,this.sliderElementWithLegendClass=!1,this.sliderElementDisabledAttr=null,this.barStyle={},this.minPointerStyle={},this.maxPointerStyle={},this.fullBarTransparentClass=!1,this.selectionBarDraggableClass=!1,this.ticksUnderValuesClass=!1,this.intermediateTicks=!1,this.ticks=[],this.eventListenerHelper=null,this.onMoveEventListener=null,this.onEndEventListener=null,this.moving=!1,this.resizeObserver=null,this.onTouchedCallback=null,this.onChangeCallback=null,this.eventListenerHelper=new rg(this.renderer)}set manualRefresh(t){this.unsubscribeManualRefresh(),this.manualRefreshSubscription=t.subscribe(()=>{setTimeout(()=>this.calculateViewDimensionsAndDetectChanges())})}set triggerFocus(t){this.unsubscribeTriggerFocus(),this.triggerFocusSubscription=t.subscribe(t=>{this.focusPointer(t)})}get range(){return!tg.isNullOrUndefined(this.value)&&!tg.isNullOrUndefined(this.highValue)}get showTicks(){return this.viewOptions.showTicks}ngOnInit(){this.viewOptions=new Qm,Object.assign(this.viewOptions,this.options),this.updateDisabledState(),this.updateVerticalState()}ngAfterViewInit(){this.applyOptions(),this.subscribeInputModelChangeSubject(this.viewOptions.inputEventsInterval),this.subscribeOutputModelChangeSubject(this.viewOptions.outputEventsInterval),this.renormaliseModelValues(),this.viewLowValue=this.modelValueToViewValue(this.value),this.viewHighValue=this.range?this.modelValueToViewValue(this.highValue):null,this.updateVerticalState(),this.manageElementsStyle(),this.updateDisabledState(),this.calculateViewDimensions(),this.addAccessibility(),this.updateCeilLabel(),this.updateFloorLabel(),this.initHandles(),this.manageEventsBindings(),this.subscribeResizeObserver(),this.initHasRun=!0,this.isRefDestroyed()||this.changeDetectionRef.detectChanges()}ngOnChanges(t){tg.isNullOrUndefined(t.options)||this.onChangeOptions(),tg.isNullOrUndefined(t.value)&&tg.isNullOrUndefined(t.highValue)||this.inputModelChangeSubject.next({value:this.value,highValue:this.highValue,forceChange:!1,internalChange:!1})}ngOnDestroy(){this.unbindEvents(),this.unsubscribeResizeObserver(),this.unsubscribeInputModelChangeSubject(),this.unsubscribeOutputModelChangeSubject(),this.unsubscribeManualRefresh(),this.unsubscribeTriggerFocus()}writeValue(t){t instanceof Array?(this.value=t[0],this.highValue=t[1]):this.value=t,this.inputModelChangeSubject.next({value:this.value,highValue:this.highValue,forceChange:!1,internalChange:!1})}registerOnChange(t){this.onChangeCallback=t}registerOnTouched(t){this.onTouchedCallback=t}setDisabledState(t){this.viewOptions.disabled=t,this.updateDisabledState()}onResize(t){this.calculateViewDimensionsAndDetectChanges()}subscribeInputModelChangeSubject(t){this.inputModelChangeSubscription=this.inputModelChangeSubject.pipe(mn(ug.compare),He(t=>!t.forceChange&&!t.internalChange),tg.isNullOrUndefined(t)?Pe(()=>{}):wm(t,void 0,{leading:!0,trailing:!0})).subscribe(t=>this.applyInputModelChange(t))}subscribeOutputModelChangeSubject(t){this.outputModelChangeSubscription=this.outputModelChangeSubject.pipe(mn(ug.compare),tg.isNullOrUndefined(t)?Pe(()=>{}):wm(t,void 0,{leading:!0,trailing:!0})).subscribe(t=>this.publishOutputModelChange(t))}subscribeResizeObserver(){eg.isResizeObserverAvailable()&&(this.resizeObserver=new ResizeObserver(()=>this.calculateViewDimensionsAndDetectChanges()),this.resizeObserver.observe(this.elementRef.nativeElement))}unsubscribeResizeObserver(){eg.isResizeObserverAvailable()&&null!==this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}unsubscribeOnMove(){tg.isNullOrUndefined(this.onMoveEventListener)||(this.eventListenerHelper.detachEventListener(this.onMoveEventListener),this.onMoveEventListener=null)}unsubscribeOnEnd(){tg.isNullOrUndefined(this.onEndEventListener)||(this.eventListenerHelper.detachEventListener(this.onEndEventListener),this.onEndEventListener=null)}unsubscribeInputModelChangeSubject(){tg.isNullOrUndefined(this.inputModelChangeSubscription)||(this.inputModelChangeSubscription.unsubscribe(),this.inputModelChangeSubscription=null)}unsubscribeOutputModelChangeSubject(){tg.isNullOrUndefined(this.outputModelChangeSubscription)||(this.outputModelChangeSubscription.unsubscribe(),this.outputModelChangeSubscription=null)}unsubscribeManualRefresh(){tg.isNullOrUndefined(this.manualRefreshSubscription)||(this.manualRefreshSubscription.unsubscribe(),this.manualRefreshSubscription=null)}unsubscribeTriggerFocus(){tg.isNullOrUndefined(this.triggerFocusSubscription)||(this.triggerFocusSubscription.unsubscribe(),this.triggerFocusSubscription=null)}getPointerElement(t){return t===Xm.Min?this.minHandleElement:t===Xm.Max?this.maxHandleElement:null}getCurrentTrackingValue(){return this.currentTrackingPointer===Xm.Min?this.viewLowValue:this.currentTrackingPointer===Xm.Max?this.viewHighValue:null}modelValueToViewValue(t){return tg.isNullOrUndefined(t)?NaN:tg.isNullOrUndefined(this.viewOptions.stepsArray)||this.viewOptions.bindIndexForStepsArray?+t:tg.findStepIndex(+t,this.viewOptions.stepsArray)}viewValueToModelValue(t){return tg.isNullOrUndefined(this.viewOptions.stepsArray)||this.viewOptions.bindIndexForStepsArray?t:this.getStepValue(t)}getStepValue(t){const e=this.viewOptions.stepsArray[t];return tg.isNullOrUndefined(e)?NaN:e.value}applyViewChange(){this.value=this.viewValueToModelValue(this.viewLowValue),this.range&&(this.highValue=this.viewValueToModelValue(this.viewHighValue)),this.outputModelChangeSubject.next({value:this.value,highValue:this.highValue,userEventInitiated:!0,forceChange:!1}),this.inputModelChangeSubject.next({value:this.value,highValue:this.highValue,forceChange:!1,internalChange:!0})}applyInputModelChange(t){const e=this.normaliseModelValues(t),i=!hg.compare(t,e);i&&(this.value=e.value,this.highValue=e.highValue),this.viewLowValue=this.modelValueToViewValue(e.value),this.viewHighValue=this.range?this.modelValueToViewValue(e.highValue):null,this.updateLowHandle(this.valueToPosition(this.viewLowValue)),this.range&&this.updateHighHandle(this.valueToPosition(this.viewHighValue)),this.updateSelectionBar(),this.updateTicksScale(),this.updateAriaAttributes(),this.range&&this.updateCombinedLabel(),this.outputModelChangeSubject.next({value:e.value,highValue:e.highValue,forceChange:i,userEventInitiated:!1})}publishOutputModelChange(t){const e=()=>{this.valueChange.emit(t.value),this.range&&this.highValueChange.emit(t.highValue),tg.isNullOrUndefined(this.onChangeCallback)||this.onChangeCallback(this.range?[t.value,t.highValue]:t.value),tg.isNullOrUndefined(this.onTouchedCallback)||this.onTouchedCallback(this.range?[t.value,t.highValue]:t.value)};t.userEventInitiated?(e(),this.userChange.emit(this.getChangeContext())):setTimeout(()=>{e()})}normaliseModelValues(t){const e=new hg;if(e.value=t.value,e.highValue=t.highValue,!tg.isNullOrUndefined(this.viewOptions.stepsArray)){if(this.viewOptions.enforceStepsArray){const t=tg.findStepIndex(e.value,this.viewOptions.stepsArray);if(e.value=this.viewOptions.stepsArray[t].value,this.range){const t=tg.findStepIndex(e.highValue,this.viewOptions.stepsArray);e.highValue=this.viewOptions.stepsArray[t].value}}return e}if(this.viewOptions.enforceStep&&(e.value=this.roundStep(e.value),this.range&&(e.highValue=this.roundStep(e.highValue))),this.viewOptions.enforceRange&&(e.value=ig.clampToRange(e.value,this.viewOptions.floor,this.viewOptions.ceil),this.range&&(e.highValue=ig.clampToRange(e.highValue,this.viewOptions.floor,this.viewOptions.ceil)),this.range&&t.value>t.highValue))if(this.viewOptions.noSwitching)e.value=e.highValue;else{const i=t.value;e.value=t.highValue,e.highValue=i}return e}renormaliseModelValues(){const t={value:this.value,highValue:this.highValue},e=this.normaliseModelValues(t);hg.compare(e,t)||(this.value=e.value,this.highValue=e.highValue,this.outputModelChangeSubject.next({value:this.value,highValue:this.highValue,forceChange:!0,userEventInitiated:!1}))}onChangeOptions(){if(!this.initHasRun)return;const t=this.viewOptions.inputEventsInterval,e=this.viewOptions.outputEventsInterval,i=this.getOptionsInfluencingEventBindings(this.viewOptions);this.applyOptions();const n=this.getOptionsInfluencingEventBindings(this.viewOptions),r=!tg.areArraysEqual(i,n);t!==this.viewOptions.inputEventsInterval&&(this.unsubscribeInputModelChangeSubject(),this.subscribeInputModelChangeSubject(this.viewOptions.inputEventsInterval)),e!==this.viewOptions.outputEventsInterval&&(this.unsubscribeInputModelChangeSubject(),this.subscribeInputModelChangeSubject(this.viewOptions.outputEventsInterval)),this.renormaliseModelValues(),this.viewLowValue=this.modelValueToViewValue(this.value),this.viewHighValue=this.range?this.modelValueToViewValue(this.highValue):null,this.resetSlider(r)}applyOptions(){if(this.viewOptions=new Qm,Object.assign(this.viewOptions,this.options),this.viewOptions.draggableRange=this.range&&this.viewOptions.draggableRange,this.viewOptions.draggableRangeOnly=this.range&&this.viewOptions.draggableRangeOnly,this.viewOptions.draggableRangeOnly&&(this.viewOptions.draggableRange=!0),this.viewOptions.showTicks=this.viewOptions.showTicks||this.viewOptions.showTicksValues||!tg.isNullOrUndefined(this.viewOptions.ticksArray),!this.viewOptions.showTicks||tg.isNullOrUndefined(this.viewOptions.tickStep)&&tg.isNullOrUndefined(this.viewOptions.ticksArray)||(this.intermediateTicks=!0),this.viewOptions.showSelectionBar=this.viewOptions.showSelectionBar||this.viewOptions.showSelectionBarEnd||!tg.isNullOrUndefined(this.viewOptions.showSelectionBarFromValue),tg.isNullOrUndefined(this.viewOptions.stepsArray)?this.applyFloorCeilOptions():this.applyStepsArrayOptions(),tg.isNullOrUndefined(this.viewOptions.combineLabels)&&(this.viewOptions.combineLabels=(t,e)=>t+" - "+e),this.viewOptions.logScale&&0===this.viewOptions.floor)throw Error("Can't use floor=0 with logarithmic scale")}applyStepsArrayOptions(){this.viewOptions.floor=0,this.viewOptions.ceil=this.viewOptions.stepsArray.length-1,this.viewOptions.step=1,tg.isNullOrUndefined(this.viewOptions.translate)&&(this.viewOptions.translate=t=>String(this.viewOptions.bindIndexForStepsArray?this.getStepValue(t):t))}applyFloorCeilOptions(){if(tg.isNullOrUndefined(this.viewOptions.step)?this.viewOptions.step=1:(this.viewOptions.step=+this.viewOptions.step,this.viewOptions.step<=0&&(this.viewOptions.step=1)),tg.isNullOrUndefined(this.viewOptions.ceil)||tg.isNullOrUndefined(this.viewOptions.floor))throw Error("floor and ceil options must be supplied");this.viewOptions.ceil=+this.viewOptions.ceil,this.viewOptions.floor=+this.viewOptions.floor,tg.isNullOrUndefined(this.viewOptions.translate)&&(this.viewOptions.translate=t=>String(t))}resetSlider(t=!0){this.manageElementsStyle(),this.addAccessibility(),this.updateCeilLabel(),this.updateFloorLabel(),t&&(this.unbindEvents(),this.manageEventsBindings()),this.updateDisabledState(),this.calculateViewDimensions(),this.refocusPointerIfNeeded()}focusPointer(t){t!==Xm.Min&&t!==Xm.Max&&(t=Xm.Min),t===Xm.Min?this.minHandleElement.focus():this.range&&t===Xm.Max&&this.maxHandleElement.focus()}refocusPointerIfNeeded(){tg.isNullOrUndefined(this.currentFocusPointer)||(this.onPointerFocus(this.currentFocusPointer),this.getPointerElement(this.currentFocusPointer).focus())}manageElementsStyle(){this.updateScale(),this.floorLabelElement.setAlwaysHide(this.viewOptions.showTicksValues||this.viewOptions.hideLimitLabels),this.ceilLabelElement.setAlwaysHide(this.viewOptions.showTicksValues||this.viewOptions.hideLimitLabels);const t=this.viewOptions.showTicksValues&&!this.intermediateTicks;this.minHandleLabelElement.setAlwaysHide(t||this.viewOptions.hidePointerLabels),this.maxHandleLabelElement.setAlwaysHide(t||!this.range||this.viewOptions.hidePointerLabels),this.combinedLabelElement.setAlwaysHide(t||!this.range||this.viewOptions.hidePointerLabels),this.selectionBarElement.setAlwaysHide(!this.range&&!this.viewOptions.showSelectionBar),this.leftOuterSelectionBarElement.setAlwaysHide(!this.range||!this.viewOptions.showOuterSelectionBars),this.rightOuterSelectionBarElement.setAlwaysHide(!this.range||!this.viewOptions.showOuterSelectionBars),this.fullBarTransparentClass=this.range&&this.viewOptions.showOuterSelectionBars,this.selectionBarDraggableClass=this.viewOptions.draggableRange&&!this.viewOptions.onlyBindHandles,this.ticksUnderValuesClass=this.intermediateTicks&&this.options.showTicksValues,this.sliderElementVerticalClass!==this.viewOptions.vertical&&(this.updateVerticalState(),setTimeout(()=>{this.resetSlider()})),this.sliderElementAnimateClass!==this.viewOptions.animate&&setTimeout(()=>{this.sliderElementAnimateClass=this.viewOptions.animate})}manageEventsBindings(){this.viewOptions.disabled||this.viewOptions.readOnly?this.unbindEvents():this.bindEvents()}updateDisabledState(){this.sliderElementDisabledAttr=this.viewOptions.disabled?"disabled":null}updateVerticalState(){this.sliderElementVerticalClass=this.viewOptions.vertical;for(const t of this.getAllSliderElements())tg.isNullOrUndefined(t)||t.setVertical(this.viewOptions.vertical)}updateScale(){for(const t of this.getAllSliderElements())t.setScale(this.viewOptions.scale)}getAllSliderElements(){return[this.leftOuterSelectionBarElement,this.rightOuterSelectionBarElement,this.fullBarElement,this.selectionBarElement,this.minHandleElement,this.maxHandleElement,this.floorLabelElement,this.ceilLabelElement,this.minHandleLabelElement,this.maxHandleLabelElement,this.combinedLabelElement,this.ticksElement]}initHandles(){this.updateLowHandle(this.valueToPosition(this.viewLowValue)),this.range&&this.updateHighHandle(this.valueToPosition(this.viewHighValue)),this.updateSelectionBar(),this.range&&this.updateCombinedLabel(),this.updateTicksScale()}addAccessibility(){this.updateAriaAttributes(),this.minHandleElement.role="slider",this.minHandleElement.tabindex=!this.viewOptions.keyboardSupport||this.viewOptions.readOnly||this.viewOptions.disabled?"":"0",this.minHandleElement.ariaOrientation=this.viewOptions.vertical?"vertical":"horizontal",tg.isNullOrUndefined(this.viewOptions.ariaLabel)?tg.isNullOrUndefined(this.viewOptions.ariaLabelledBy)||(this.minHandleElement.ariaLabelledBy=this.viewOptions.ariaLabelledBy):this.minHandleElement.ariaLabel=this.viewOptions.ariaLabel,this.range&&(this.maxHandleElement.role="slider",this.maxHandleElement.tabindex=!this.viewOptions.keyboardSupport||this.viewOptions.readOnly||this.viewOptions.disabled?"":"0",this.maxHandleElement.ariaOrientation=this.viewOptions.vertical?"vertical":"horizontal",tg.isNullOrUndefined(this.viewOptions.ariaLabelHigh)?tg.isNullOrUndefined(this.viewOptions.ariaLabelledByHigh)||(this.maxHandleElement.ariaLabelledBy=this.viewOptions.ariaLabelledByHigh):this.maxHandleElement.ariaLabel=this.viewOptions.ariaLabelHigh)}updateAriaAttributes(){this.minHandleElement.ariaValueNow=(+this.value).toString(),this.minHandleElement.ariaValueText=this.viewOptions.translate(+this.value,Ym.Low),this.minHandleElement.ariaValueMin=this.viewOptions.floor.toString(),this.minHandleElement.ariaValueMax=this.viewOptions.ceil.toString(),this.range&&(this.maxHandleElement.ariaValueNow=(+this.highValue).toString(),this.maxHandleElement.ariaValueText=this.viewOptions.translate(+this.highValue,Ym.High),this.maxHandleElement.ariaValueMin=this.viewOptions.floor.toString(),this.maxHandleElement.ariaValueMax=this.viewOptions.ceil.toString())}calculateViewDimensions(){tg.isNullOrUndefined(this.viewOptions.handleDimension)?this.minHandleElement.calculateDimension():this.minHandleElement.setDimension(this.viewOptions.handleDimension);const t=this.minHandleElement.dimension;this.handleHalfDimension=t/2,tg.isNullOrUndefined(this.viewOptions.barDimension)?this.fullBarElement.calculateDimension():this.fullBarElement.setDimension(this.viewOptions.barDimension),this.maxHandlePosition=this.fullBarElement.dimension-t,this.initHasRun&&(this.updateFloorLabel(),this.updateCeilLabel(),this.initHandles())}calculateViewDimensionsAndDetectChanges(){this.calculateViewDimensions(),this.isRefDestroyed()||this.changeDetectionRef.detectChanges()}isRefDestroyed(){return this.changeDetectionRef.destroyed}updateTicksScale(){if(!this.viewOptions.showTicks)return void setTimeout(()=>{this.sliderElementWithLegendClass=!1});const t=tg.isNullOrUndefined(this.viewOptions.ticksArray)?this.getTicksArray():this.viewOptions.ticksArray,e=this.viewOptions.vertical?"translateY":"translateX";this.viewOptions.rightToLeft&&t.reverse();const i=tg.isNullOrUndefined(this.viewOptions.tickValueStep)?tg.isNullOrUndefined(this.viewOptions.tickStep)?this.viewOptions.step:this.viewOptions.tickStep:this.viewOptions.tickValueStep;let n=!1;const r=t.map(t=>{let r=this.valueToPosition(t);this.viewOptions.vertical&&(r=this.maxHandlePosition-r);const s=e+"("+Math.round(r)+"px)",o=new lg;o.selected=this.isTickSelected(t),o.style={"-webkit-transform":s,"-moz-transform":s,"-o-transform":s,"-ms-transform":s,transform:s},o.selected&&!tg.isNullOrUndefined(this.viewOptions.getSelectionBarColor)&&(o.style["background-color"]=this.getSelectionBarColor()),o.selected||tg.isNullOrUndefined(this.viewOptions.getTickColor)||(o.style["background-color"]=this.getTickColor(t)),tg.isNullOrUndefined(this.viewOptions.ticksTooltip)||(o.tooltip=this.viewOptions.ticksTooltip(t),o.tooltipPlacement=this.viewOptions.vertical?"right":"top"),this.viewOptions.showTicksValues&&!tg.isNullOrUndefined(i)&&ig.isModuloWithinPrecisionLimit(t,i,this.viewOptions.precisionLimit)&&(o.value=this.getDisplayValue(t,Ym.TickValue),tg.isNullOrUndefined(this.viewOptions.ticksValuesTooltip)||(o.valueTooltip=this.viewOptions.ticksValuesTooltip(t),o.valueTooltipPlacement=this.viewOptions.vertical?"right":"top"));let a=null;if(tg.isNullOrUndefined(this.viewOptions.stepsArray))tg.isNullOrUndefined(this.viewOptions.getLegend)||(a=this.viewOptions.getLegend(t));else{const e=this.viewOptions.stepsArray[t];tg.isNullOrUndefined(e)||(a=e.legend)}return tg.isNullOrUndefined(a)||(o.legend=a,n=!0),o});if(setTimeout(()=>{this.sliderElementWithLegendClass=n}),tg.isNullOrUndefined(this.ticks)||this.ticks.length!==r.length)this.ticks=r;else for(let s=0;s<r.length;++s)Object.assign(this.ticks[s],r[s]);this.isRefDestroyed()||this.changeDetectionRef.detectChanges()}getTicksArray(){const t=tg.isNullOrUndefined(this.viewOptions.tickStep)?this.viewOptions.step:this.viewOptions.tickStep,e=[],i=1+Math.floor(ig.roundToPrecisionLimit(Math.abs(this.viewOptions.ceil-this.viewOptions.floor)/t,this.viewOptions.precisionLimit));for(let n=0;n<i;++n)e.push(ig.roundToPrecisionLimit(this.viewOptions.floor+t*n,this.viewOptions.precisionLimit));return e}isTickSelected(t){if(!this.range)if(tg.isNullOrUndefined(this.viewOptions.showSelectionBarFromValue)){if(this.viewOptions.showSelectionBarEnd){if(t>=this.viewLowValue)return!0}else if(this.viewOptions.showSelectionBar&&t<=this.viewLowValue)return!0}else{const e=this.viewOptions.showSelectionBarFromValue;if(this.viewLowValue>e&&t>=e&&t<=this.viewLowValue)return!0;if(this.viewLowValue<e&&t<=e&&t>=this.viewLowValue)return!0}return!!(this.range&&t>=this.viewLowValue&&t<=this.viewHighValue)}updateFloorLabel(){this.floorLabelElement.alwaysHide||(this.floorLabelElement.setValue(this.getDisplayValue(this.viewOptions.floor,Ym.Floor)),this.floorLabelElement.calculateDimension(),this.floorLabelElement.setPosition(this.viewOptions.rightToLeft?this.fullBarElement.dimension-this.floorLabelElement.dimension:0))}updateCeilLabel(){this.ceilLabelElement.alwaysHide||(this.ceilLabelElement.setValue(this.getDisplayValue(this.viewOptions.ceil,Ym.Ceil)),this.ceilLabelElement.calculateDimension(),this.ceilLabelElement.setPosition(this.viewOptions.rightToLeft?0:this.fullBarElement.dimension-this.ceilLabelElement.dimension))}updateHandles(t,e){t===Xm.Min?this.updateLowHandle(e):t===Xm.Max&&this.updateHighHandle(e),this.updateSelectionBar(),this.updateTicksScale(),this.range&&this.updateCombinedLabel()}getHandleLabelPos(t,e){const i=t===Xm.Min?this.minHandleLabelElement.dimension:this.maxHandleLabelElement.dimension,n=e-i/2+this.handleHalfDimension,r=this.fullBarElement.dimension-i;return this.viewOptions.boundPointerLabels?this.viewOptions.rightToLeft&&t===Xm.Min||!this.viewOptions.rightToLeft&&t===Xm.Max?Math.min(n,r):Math.min(Math.max(n,0),r):n}updateLowHandle(t){this.minHandleElement.setPosition(t),this.minHandleLabelElement.setValue(this.getDisplayValue(this.viewLowValue,Ym.Low)),this.minHandleLabelElement.setPosition(this.getHandleLabelPos(Xm.Min,t)),tg.isNullOrUndefined(this.viewOptions.getPointerColor)||(this.minPointerStyle={backgroundColor:this.getPointerColor(Xm.Min)}),this.viewOptions.autoHideLimitLabels&&this.updateFloorAndCeilLabelsVisibility()}updateHighHandle(t){this.maxHandleElement.setPosition(t),this.maxHandleLabelElement.setValue(this.getDisplayValue(this.viewHighValue,Ym.High)),this.maxHandleLabelElement.setPosition(this.getHandleLabelPos(Xm.Max,t)),tg.isNullOrUndefined(this.viewOptions.getPointerColor)||(this.maxPointerStyle={backgroundColor:this.getPointerColor(Xm.Max)}),this.viewOptions.autoHideLimitLabels&&this.updateFloorAndCeilLabelsVisibility()}updateFloorAndCeilLabelsVisibility(){if(this.viewOptions.hidePointerLabels)return;let t=!1,e=!1;const i=this.isLabelBelowFloorLabel(this.minHandleLabelElement),n=this.isLabelAboveCeilLabel(this.minHandleLabelElement),r=this.isLabelAboveCeilLabel(this.maxHandleLabelElement),s=this.isLabelBelowFloorLabel(this.combinedLabelElement),o=this.isLabelAboveCeilLabel(this.combinedLabelElement);if(i?(t=!0,this.floorLabelElement.hide()):(t=!1,this.floorLabelElement.show()),n?(e=!0,this.ceilLabelElement.hide()):(e=!1,this.ceilLabelElement.show()),this.range){const n=this.combinedLabelElement.isVisible()?o:r,a=this.combinedLabelElement.isVisible()?s:i;n?this.ceilLabelElement.hide():e||this.ceilLabelElement.show(),a?this.floorLabelElement.hide():t||this.floorLabelElement.show()}}isLabelBelowFloorLabel(t){const e=t.position,i=this.floorLabelElement.position;return this.viewOptions.rightToLeft?e+t.dimension>=i-2:e<=i+this.floorLabelElement.dimension+2}isLabelAboveCeilLabel(t){const e=t.position,i=this.ceilLabelElement.position;return this.viewOptions.rightToLeft?e<=i+this.ceilLabelElement.dimension+2:e+t.dimension>=i-2}updateSelectionBar(){let t=0,e=0;const i=this.viewOptions.rightToLeft?!this.viewOptions.showSelectionBarEnd:this.viewOptions.showSelectionBarEnd,n=this.viewOptions.rightToLeft?this.maxHandleElement.position+this.handleHalfDimension:this.minHandleElement.position+this.handleHalfDimension;if(this.range)e=Math.abs(this.maxHandleElement.position-this.minHandleElement.position),t=n;else if(tg.isNullOrUndefined(this.viewOptions.showSelectionBarFromValue))i?(e=Math.ceil(Math.abs(this.maxHandlePosition-this.minHandleElement.position)+this.handleHalfDimension),t=Math.floor(this.minHandleElement.position+this.handleHalfDimension)):(e=this.minHandleElement.position+this.handleHalfDimension,t=0);else{const i=this.viewOptions.showSelectionBarFromValue,n=this.valueToPosition(i);(this.viewOptions.rightToLeft?this.viewLowValue<=i:this.viewLowValue>i)?(e=this.minHandleElement.position-n,t=n+this.handleHalfDimension):(e=n-this.minHandleElement.position,t=this.minHandleElement.position+this.handleHalfDimension)}if(this.selectionBarElement.setDimension(e),this.selectionBarElement.setPosition(t),this.range&&this.viewOptions.showOuterSelectionBars&&(this.viewOptions.rightToLeft?(this.rightOuterSelectionBarElement.setDimension(t),this.rightOuterSelectionBarElement.setPosition(0),this.fullBarElement.calculateDimension(),this.leftOuterSelectionBarElement.setDimension(this.fullBarElement.dimension-(t+e)),this.leftOuterSelectionBarElement.setPosition(t+e)):(this.leftOuterSelectionBarElement.setDimension(t),this.leftOuterSelectionBarElement.setPosition(0),this.fullBarElement.calculateDimension(),this.rightOuterSelectionBarElement.setDimension(this.fullBarElement.dimension-(t+e)),this.rightOuterSelectionBarElement.setPosition(t+e))),tg.isNullOrUndefined(this.viewOptions.getSelectionBarColor)){if(!tg.isNullOrUndefined(this.viewOptions.selectionBarGradient)){const n=tg.isNullOrUndefined(this.viewOptions.showSelectionBarFromValue)?0:this.valueToPosition(this.viewOptions.showSelectionBarFromValue),r=n-t>0&&!i||n-t<=0&&i;this.barStyle={backgroundImage:"linear-gradient(to "+(this.viewOptions.vertical?r?"bottom":"top":r?"left":"right")+", "+this.viewOptions.selectionBarGradient.from+" 0%,"+this.viewOptions.selectionBarGradient.to+" 100%)"},this.viewOptions.vertical?(this.barStyle.backgroundPosition="center "+(n+e+t+(r?-this.handleHalfDimension:0))+"px",this.barStyle.backgroundSize="100% "+(this.fullBarElement.dimension-this.handleHalfDimension)+"px"):(this.barStyle.backgroundPosition=n-t+(r?this.handleHalfDimension:0)+"px center",this.barStyle.backgroundSize=this.fullBarElement.dimension-this.handleHalfDimension+"px 100%")}}else{const t=this.getSelectionBarColor();this.barStyle={backgroundColor:t}}}getSelectionBarColor(){return this.range?this.viewOptions.getSelectionBarColor(this.value,this.highValue):this.viewOptions.getSelectionBarColor(this.value)}getPointerColor(t){return this.viewOptions.getPointerColor(t===Xm.Max?this.highValue:this.value,t)}getTickColor(t){return this.viewOptions.getTickColor(t)}updateCombinedLabel(){let t=null;if(t=this.viewOptions.rightToLeft?this.minHandleLabelElement.position-this.minHandleLabelElement.dimension-10<=this.maxHandleLabelElement.position:this.minHandleLabelElement.position+this.minHandleLabelElement.dimension+10>=this.maxHandleLabelElement.position,t){const t=this.getDisplayValue(this.viewLowValue,Ym.Low),e=this.getDisplayValue(this.viewHighValue,Ym.High),i=this.viewOptions.rightToLeft?this.viewOptions.combineLabels(e,t):this.viewOptions.combineLabels(t,e);this.combinedLabelElement.setValue(i);const n=this.viewOptions.boundPointerLabels?Math.min(Math.max(this.selectionBarElement.position+this.selectionBarElement.dimension/2-this.combinedLabelElement.dimension/2,0),this.fullBarElement.dimension-this.combinedLabelElement.dimension):this.selectionBarElement.position+this.selectionBarElement.dimension/2-this.combinedLabelElement.dimension/2;this.combinedLabelElement.setPosition(n),this.minHandleLabelElement.hide(),this.maxHandleLabelElement.hide(),this.combinedLabelElement.show()}else this.updateHighHandle(this.valueToPosition(this.viewHighValue)),this.updateLowHandle(this.valueToPosition(this.viewLowValue)),this.maxHandleLabelElement.show(),this.minHandleLabelElement.show(),this.combinedLabelElement.hide();this.viewOptions.autoHideLimitLabels&&this.updateFloorAndCeilLabelsVisibility()}getDisplayValue(t,e){return tg.isNullOrUndefined(this.viewOptions.stepsArray)||this.viewOptions.bindIndexForStepsArray||(t=this.getStepValue(t)),this.viewOptions.translate(t,e)}roundStep(t,e){const i=tg.isNullOrUndefined(e)?this.viewOptions.step:e;let n=ig.roundToPrecisionLimit((t-this.viewOptions.floor)/i,this.viewOptions.precisionLimit);return n=Math.round(n)*i,ig.roundToPrecisionLimit(this.viewOptions.floor+n,this.viewOptions.precisionLimit)}valueToPosition(t){let e=tg.linearValueToPosition;tg.isNullOrUndefined(this.viewOptions.customValueToPosition)?this.viewOptions.logScale&&(e=tg.logValueToPosition):e=this.viewOptions.customValueToPosition;let i=e(t=ig.clampToRange(t,this.viewOptions.floor,this.viewOptions.ceil),this.viewOptions.floor,this.viewOptions.ceil);return tg.isNullOrUndefined(i)&&(i=0),this.viewOptions.rightToLeft&&(i=1-i),i*this.maxHandlePosition}positionToValue(t){let e=t/this.maxHandlePosition;this.viewOptions.rightToLeft&&(e=1-e);let i=tg.linearPositionToValue;tg.isNullOrUndefined(this.viewOptions.customPositionToValue)?this.viewOptions.logScale&&(i=tg.logPositionToValue):i=this.viewOptions.customPositionToValue;const n=i(e,this.viewOptions.floor,this.viewOptions.ceil);return tg.isNullOrUndefined(n)?0:n}getEventXY(t,e){if(t instanceof MouseEvent)return this.viewOptions.vertical?t.clientY:t.clientX;let i=0;const n=t.touches;if(!tg.isNullOrUndefined(e))for(let r=0;r<n.length;r++)if(n[r].identifier===e){i=r;break}return this.viewOptions.vertical?n[i].clientY:n[i].clientX}getEventPosition(t,e){const i=this.elementRef.nativeElement.getBoundingClientRect(),n=this.viewOptions.vertical?i.bottom:i.left;let r=0;return r=this.viewOptions.vertical?-this.getEventXY(t,e)+n:this.getEventXY(t,e)-n,r*this.viewOptions.scale-this.handleHalfDimension}getNearestHandle(t){if(!this.range)return Xm.Min;const e=this.getEventPosition(t),i=Math.abs(e-this.minHandleElement.position),n=Math.abs(e-this.maxHandleElement.position);return i<n?Xm.Min:i>n?Xm.Max:this.viewOptions.rightToLeft?e>this.minHandleElement.position?Xm.Min:Xm.Max:e<this.minHandleElement.position?Xm.Min:Xm.Max}bindEvents(){const t=this.viewOptions.draggableRange;this.viewOptions.onlyBindHandles||this.selectionBarElement.on("mousedown",e=>this.onBarStart(null,t,e,!0,!0,!0)),this.viewOptions.draggableRangeOnly?(this.minHandleElement.on("mousedown",e=>this.onBarStart(Xm.Min,t,e,!0,!0)),this.maxHandleElement.on("mousedown",e=>this.onBarStart(Xm.Max,t,e,!0,!0))):(this.minHandleElement.on("mousedown",t=>this.onStart(Xm.Min,t,!0,!0)),this.range&&this.maxHandleElement.on("mousedown",t=>this.onStart(Xm.Max,t,!0,!0)),this.viewOptions.onlyBindHandles||(this.fullBarElement.on("mousedown",t=>this.onStart(null,t,!0,!0,!0)),this.ticksElement.on("mousedown",t=>this.onStart(null,t,!0,!0,!0,!0)))),this.viewOptions.onlyBindHandles||this.selectionBarElement.onPassive("touchstart",e=>this.onBarStart(null,t,e,!0,!0,!0)),this.viewOptions.draggableRangeOnly?(this.minHandleElement.onPassive("touchstart",e=>this.onBarStart(Xm.Min,t,e,!0,!0)),this.maxHandleElement.onPassive("touchstart",e=>this.onBarStart(Xm.Max,t,e,!0,!0))):(this.minHandleElement.onPassive("touchstart",t=>this.onStart(Xm.Min,t,!0,!0)),this.range&&this.maxHandleElement.onPassive("touchstart",t=>this.onStart(Xm.Max,t,!0,!0)),this.viewOptions.onlyBindHandles||(this.fullBarElement.onPassive("touchstart",t=>this.onStart(null,t,!0,!0,!0)),this.ticksElement.onPassive("touchstart",t=>this.onStart(null,t,!1,!1,!0,!0)))),this.viewOptions.keyboardSupport&&(this.minHandleElement.on("focus",()=>this.onPointerFocus(Xm.Min)),this.range&&this.maxHandleElement.on("focus",()=>this.onPointerFocus(Xm.Max)))}getOptionsInfluencingEventBindings(t){return[t.disabled,t.readOnly,t.draggableRange,t.draggableRangeOnly,t.onlyBindHandles,t.keyboardSupport]}unbindEvents(){this.unsubscribeOnMove(),this.unsubscribeOnEnd();for(const t of this.getAllSliderElements())tg.isNullOrUndefined(t)||t.off()}onBarStart(t,e,i,n,r,s,o){e?this.onDragStart(t,i,n,r):this.onStart(t,i,n,r,s,o)}onStart(t,e,i,n,r,s){e.stopPropagation(),eg.isTouchEvent(e)&&Em.a.hasSupport||e.preventDefault(),this.moving=!1,this.calculateViewDimensions(),tg.isNullOrUndefined(t)&&(t=this.getNearestHandle(e)),this.currentTrackingPointer=t;const o=this.getPointerElement(t);if(o.active=!0,this.viewOptions.keyboardSupport&&o.focus(),i){this.unsubscribeOnMove();const t=t=>this.dragging.active?this.onDragMove(t):this.onMove(t);this.onMoveEventListener=eg.isTouchEvent(e)?this.eventListenerHelper.attachPassiveEventListener(document,"touchmove",t,this.viewOptions.touchEventsInterval):this.eventListenerHelper.attachEventListener(document,"mousemove",t,this.viewOptions.mouseEventsInterval)}if(n){this.unsubscribeOnEnd();const t=t=>this.onEnd(t);this.onEndEventListener=eg.isTouchEvent(e)?this.eventListenerHelper.attachPassiveEventListener(document,"touchend",t):this.eventListenerHelper.attachEventListener(document,"mouseup",t)}this.userChangeStart.emit(this.getChangeContext()),eg.isTouchEvent(e)&&!tg.isNullOrUndefined(e.changedTouches)&&tg.isNullOrUndefined(this.touchId)&&(this.touchId=e.changedTouches[0].identifier),r&&this.onMove(e,!0),s&&this.onEnd(e)}onMove(t,e){let i=null;if(eg.isTouchEvent(t)){const e=t.changedTouches;for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchId){i=e[t];break}if(tg.isNullOrUndefined(i))return}this.viewOptions.animate&&!this.viewOptions.animateOnMove&&this.moving&&(this.sliderElementAnimateClass=!1),this.moving=!0;const n=tg.isNullOrUndefined(i)?this.getEventPosition(t):this.getEventPosition(t,i.identifier);let r;n<=0?r=this.viewOptions.rightToLeft?this.viewOptions.ceil:this.viewOptions.floor:n>=this.maxHandlePosition?r=this.viewOptions.rightToLeft?this.viewOptions.floor:this.viewOptions.ceil:(r=this.positionToValue(n),r=e&&!tg.isNullOrUndefined(this.viewOptions.tickStep)?this.roundStep(r,this.viewOptions.tickStep):this.roundStep(r)),this.positionTrackingHandle(r)}onEnd(t){eg.isTouchEvent(t)&&t.changedTouches[0].identifier!==this.touchId||(this.moving=!1,this.viewOptions.animate&&(this.sliderElementAnimateClass=!0),this.touchId=null,this.viewOptions.keyboardSupport||(this.minHandleElement.active=!1,this.maxHandleElement.active=!1,this.currentTrackingPointer=null),this.dragging.active=!1,this.unsubscribeOnMove(),this.unsubscribeOnEnd(),this.userChangeEnd.emit(this.getChangeContext()))}onPointerFocus(t){const e=this.getPointerElement(t);e.on("blur",()=>this.onPointerBlur(e)),e.on("keydown",t=>this.onKeyboardEvent(t)),e.on("keyup",()=>this.onKeyUp()),e.active=!0,this.currentTrackingPointer=t,this.currentFocusPointer=t,this.firstKeyDown=!0}onKeyUp(){this.firstKeyDown=!0,this.userChangeEnd.emit(this.getChangeContext())}onPointerBlur(t){t.off("blur"),t.off("keydown"),t.off("keyup"),t.active=!1,tg.isNullOrUndefined(this.touchId)&&(this.currentTrackingPointer=null,this.currentFocusPointer=null)}getKeyActions(t){const e=this.viewOptions.ceil-this.viewOptions.floor;let i=t+this.viewOptions.step,n=t-this.viewOptions.step,r=t+e/10,s=t-e/10;this.viewOptions.reversedControls&&(i=t-this.viewOptions.step,n=t+this.viewOptions.step,r=t-e/10,s=t+e/10);const o={UP:i,DOWN:n,LEFT:n,RIGHT:i,PAGEUP:r,PAGEDOWN:s,HOME:this.viewOptions.reversedControls?this.viewOptions.ceil:this.viewOptions.floor,END:this.viewOptions.reversedControls?this.viewOptions.floor:this.viewOptions.ceil};return this.viewOptions.rightToLeft&&(o.LEFT=i,o.RIGHT=n,this.viewOptions.vertical&&(o.UP=n,o.DOWN=i)),o}onKeyboardEvent(t){const e=this.getCurrentTrackingValue(),i=tg.isNullOrUndefined(t.keyCode)?t.which:t.keyCode,n=this.getKeyActions(e)[{38:"UP",40:"DOWN",37:"LEFT",39:"RIGHT",33:"PAGEUP",34:"PAGEDOWN",36:"HOME",35:"END"}[i]];if(tg.isNullOrUndefined(n)||tg.isNullOrUndefined(this.currentTrackingPointer))return;t.preventDefault(),this.firstKeyDown&&(this.firstKeyDown=!1,this.userChangeStart.emit(this.getChangeContext()));const r=ig.clampToRange(n,this.viewOptions.floor,this.viewOptions.ceil),s=this.roundStep(r);if(this.viewOptions.draggableRangeOnly){const t=this.viewHighValue-this.viewLowValue;let e,i;this.currentTrackingPointer===Xm.Min?(e=s,i=s+t,i>this.viewOptions.ceil&&(i=this.viewOptions.ceil,e=i-t)):this.currentTrackingPointer===Xm.Max&&(i=s,e=s-t,e<this.viewOptions.floor&&(e=this.viewOptions.floor,i=e+t)),this.positionTrackingBar(e,i)}else this.positionTrackingHandle(s)}onDragStart(t,e,i,n){const r=this.getEventPosition(e);this.dragging=new cg,this.dragging.active=!0,this.dragging.value=this.positionToValue(r),this.dragging.difference=this.viewHighValue-this.viewLowValue,this.dragging.lowLimit=this.viewOptions.rightToLeft?this.minHandleElement.position-r:r-this.minHandleElement.position,this.dragging.highLimit=this.viewOptions.rightToLeft?r-this.maxHandleElement.position:this.maxHandleElement.position-r,this.onStart(t,e,i,n)}getMinValue(t,e,i){const n=this.viewOptions.rightToLeft;let r=null;return r=e?i?n?this.viewOptions.floor:this.viewOptions.ceil-this.dragging.difference:n?this.viewOptions.ceil-this.dragging.difference:this.viewOptions.floor:this.positionToValue(n?t+this.dragging.lowLimit:t-this.dragging.lowLimit),this.roundStep(r)}getMaxValue(t,e,i){const n=this.viewOptions.rightToLeft;let r=null;return r=e?i?n?this.viewOptions.floor+this.dragging.difference:this.viewOptions.ceil:n?this.viewOptions.ceil:this.viewOptions.floor+this.dragging.difference:n?this.positionToValue(t+this.dragging.lowLimit)+this.dragging.difference:this.positionToValue(t-this.dragging.lowLimit)+this.dragging.difference,this.roundStep(r)}onDragMove(t){const e=this.getEventPosition(t);let i,n,r,s;this.viewOptions.animate&&!this.viewOptions.animateOnMove&&this.moving&&(this.sliderElementAnimateClass=!1),this.moving=!0,this.viewOptions.rightToLeft?(i=this.dragging.lowLimit,n=this.dragging.highLimit,r=this.maxHandleElement,s=this.minHandleElement):(i=this.dragging.highLimit,n=this.dragging.lowLimit,r=this.minHandleElement,s=this.maxHandleElement);const o=e>=this.maxHandlePosition-i;let a,l;if(e<=n){if(0===r.position)return;a=this.getMinValue(e,!0,!1),l=this.getMaxValue(e,!0,!1)}else if(o){if(s.position===this.maxHandlePosition)return;l=this.getMaxValue(e,!0,!0),a=this.getMinValue(e,!0,!0)}else a=this.getMinValue(e,!1,!1),l=this.getMaxValue(e,!1,!1);this.positionTrackingBar(a,l)}positionTrackingBar(t,e){!tg.isNullOrUndefined(this.viewOptions.minLimit)&&t<this.viewOptions.minLimit&&(e=ig.roundToPrecisionLimit((t=this.viewOptions.minLimit)+this.dragging.difference,this.viewOptions.precisionLimit)),!tg.isNullOrUndefined(this.viewOptions.maxLimit)&&e>this.viewOptions.maxLimit&&(t=ig.roundToPrecisionLimit((e=this.viewOptions.maxLimit)-this.dragging.difference,this.viewOptions.precisionLimit)),this.viewLowValue=t,this.viewHighValue=e,this.applyViewChange(),this.updateHandles(Xm.Min,this.valueToPosition(t)),this.updateHandles(Xm.Max,this.valueToPosition(e))}positionTrackingHandle(t){t=this.applyMinMaxLimit(t),this.range&&(this.viewOptions.pushRange?t=this.applyPushRange(t):(this.viewOptions.noSwitching&&(this.currentTrackingPointer===Xm.Min&&t>this.viewHighValue?t=this.applyMinMaxRange(this.viewHighValue):this.currentTrackingPointer===Xm.Max&&t<this.viewLowValue&&(t=this.applyMinMaxRange(this.viewLowValue))),t=this.applyMinMaxRange(t),this.currentTrackingPointer===Xm.Min&&t>this.viewHighValue?(this.viewLowValue=this.viewHighValue,this.applyViewChange(),this.updateHandles(Xm.Min,this.maxHandleElement.position),this.updateAriaAttributes(),this.currentTrackingPointer=Xm.Max,this.minHandleElement.active=!1,this.maxHandleElement.active=!0,this.viewOptions.keyboardSupport&&this.maxHandleElement.focus()):this.currentTrackingPointer===Xm.Max&&t<this.viewLowValue&&(this.viewHighValue=this.viewLowValue,this.applyViewChange(),this.updateHandles(Xm.Max,this.minHandleElement.position),this.updateAriaAttributes(),this.currentTrackingPointer=Xm.Min,this.maxHandleElement.active=!1,this.minHandleElement.active=!0,this.viewOptions.keyboardSupport&&this.minHandleElement.focus()))),this.getCurrentTrackingValue()!==t&&(this.currentTrackingPointer===Xm.Min?(this.viewLowValue=t,this.applyViewChange()):this.currentTrackingPointer===Xm.Max&&(this.viewHighValue=t,this.applyViewChange()),this.updateHandles(this.currentTrackingPointer,this.valueToPosition(t)),this.updateAriaAttributes())}applyMinMaxLimit(t){return!tg.isNullOrUndefined(this.viewOptions.minLimit)&&t<this.viewOptions.minLimit?this.viewOptions.minLimit:!tg.isNullOrUndefined(this.viewOptions.maxLimit)&&t>this.viewOptions.maxLimit?this.viewOptions.maxLimit:t}applyMinMaxRange(t){const e=Math.abs(t-(this.currentTrackingPointer===Xm.Min?this.viewHighValue:this.viewLowValue));if(!tg.isNullOrUndefined(this.viewOptions.minRange)&&e<this.viewOptions.minRange){if(this.currentTrackingPointer===Xm.Min)return ig.roundToPrecisionLimit(this.viewHighValue-this.viewOptions.minRange,this.viewOptions.precisionLimit);if(this.currentTrackingPointer===Xm.Max)return ig.roundToPrecisionLimit(this.viewLowValue+this.viewOptions.minRange,this.viewOptions.precisionLimit)}if(!tg.isNullOrUndefined(this.viewOptions.maxRange)&&e>this.viewOptions.maxRange){if(this.currentTrackingPointer===Xm.Min)return ig.roundToPrecisionLimit(this.viewHighValue-this.viewOptions.maxRange,this.viewOptions.precisionLimit);if(this.currentTrackingPointer===Xm.Max)return ig.roundToPrecisionLimit(this.viewLowValue+this.viewOptions.maxRange,this.viewOptions.precisionLimit)}return t}applyPushRange(t){const e=this.currentTrackingPointer===Xm.Min?this.viewHighValue-t:t-this.viewLowValue,i=tg.isNullOrUndefined(this.viewOptions.minRange)?this.viewOptions.step:this.viewOptions.minRange,n=this.viewOptions.maxRange;return e<i?(this.currentTrackingPointer===Xm.Min?(this.viewHighValue=ig.roundToPrecisionLimit(Math.min(t+i,this.viewOptions.ceil),this.viewOptions.precisionLimit),t=ig.roundToPrecisionLimit(this.viewHighValue-i,this.viewOptions.precisionLimit),this.applyViewChange(),this.updateHandles(Xm.Max,this.valueToPosition(this.viewHighValue))):this.currentTrackingPointer===Xm.Max&&(this.viewLowValue=ig.roundToPrecisionLimit(Math.max(t-i,this.viewOptions.floor),this.viewOptions.precisionLimit),t=ig.roundToPrecisionLimit(this.viewLowValue+i,this.viewOptions.precisionLimit),this.applyViewChange(),this.updateHandles(Xm.Min,this.valueToPosition(this.viewLowValue))),this.updateAriaAttributes()):!tg.isNullOrUndefined(n)&&e>n&&(this.currentTrackingPointer===Xm.Min?(this.viewHighValue=ig.roundToPrecisionLimit(t+n,this.viewOptions.precisionLimit),this.applyViewChange(),this.updateHandles(Xm.Max,this.valueToPosition(this.viewHighValue))):this.currentTrackingPointer===Xm.Max&&(this.viewLowValue=ig.roundToPrecisionLimit(t-n,this.viewOptions.precisionLimit),this.applyViewChange(),this.updateHandles(Xm.Min,this.valueToPosition(this.viewLowValue))),this.updateAriaAttributes()),t}getChangeContext(){const t=new Jm;return t.pointerType=this.currentTrackingPointer,t.value=+this.value,this.range&&(t.highValue=+this.highValue),t}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.H),r.Pb(r.l),r.Pb(r.h),r.Pb(r.B))},t.\u0275cmp=r.Jb({type:t,selectors:[["ngx-slider"]],contentQueries:function(t,e,i){if(1&t&&r.Ib(i,Dm,1),2&t){let t;r.vc(t=r.dc())&&(e.tooltipTemplate=t.first)}},viewQuery:function(t,e){if(1&t&&(r.Pc(Im,1,sg),r.Pc(Pm,1,sg),r.Pc(Om,1,sg),r.Pc(Mm,1,sg),r.Pc(Tm,1,og),r.Pc(Rm,1,og),r.Pc(Vm,1,ag),r.Pc(Fm,1,ag),r.Pc(Lm,1,ag),r.Pc(Um,1,ag),r.Pc(Bm,1,ag),r.Pc(Nm,1,sg)),2&t){let t;r.vc(t=r.dc())&&(e.leftOuterSelectionBarElement=t.first),r.vc(t=r.dc())&&(e.rightOuterSelectionBarElement=t.first),r.vc(t=r.dc())&&(e.fullBarElement=t.first),r.vc(t=r.dc())&&(e.selectionBarElement=t.first),r.vc(t=r.dc())&&(e.minHandleElement=t.first),r.vc(t=r.dc())&&(e.maxHandleElement=t.first),r.vc(t=r.dc())&&(e.floorLabelElement=t.first),r.vc(t=r.dc())&&(e.ceilLabelElement=t.first),r.vc(t=r.dc())&&(e.minHandleLabelElement=t.first),r.vc(t=r.dc())&&(e.maxHandleLabelElement=t.first),r.vc(t=r.dc())&&(e.combinedLabelElement=t.first),r.vc(t=r.dc())&&(e.ticksElement=t.first)}},hostAttrs:[1,"ngx-slider"],hostVars:7,hostBindings:function(t,e){1&t&&r.cc("resize",function(t){return e.onResize(t)},!1,r.zc),2&t&&(r.Eb("disabled",e.sliderElementDisabledAttr),r.Hb("vertical",e.sliderElementVerticalClass)("animate",e.sliderElementAnimateClass)("with-legend",e.sliderElementWithLegendClass))},inputs:{value:"value",highValue:"highValue",options:"options",manualRefresh:"manualRefresh",triggerFocus:"triggerFocus"},outputs:{valueChange:"valueChange",highValueChange:"highValueChange",userChangeStart:"userChangeStart",userChange:"userChange",userChangeEnd:"userChangeEnd"},features:[r.Cb([dg]),r.Bb],decls:29,vars:13,consts:[["ngxSliderElement","",1,"ngx-slider-span","ngx-slider-bar-wrapper","ngx-slider-left-out-selection"],["leftOuterSelectionBar",""],[1,"ngx-slider-span","ngx-slider-bar"],["ngxSliderElement","",1,"ngx-slider-span","ngx-slider-bar-wrapper","ngx-slider-right-out-selection"],["rightOuterSelectionBar",""],["ngxSliderElement","",1,"ngx-slider-span","ngx-slider-bar-wrapper","ngx-slider-full-bar"],["fullBar",""],["ngxSliderElement","",1,"ngx-slider-span","ngx-slider-bar-wrapper","ngx-slider-selection-bar"],["selectionBar",""],[1,"ngx-slider-span","ngx-slider-bar","ngx-slider-selection",3,"ngStyle"],["ngxSliderHandle","",1,"ngx-slider-span","ngx-slider-pointer","ngx-slider-pointer-min",3,"ngStyle"],["minHandle",""],["ngxSliderHandle","",1,"ngx-slider-span","ngx-slider-pointer","ngx-slider-pointer-max",3,"ngStyle"],["maxHandle",""],["ngxSliderLabel","",1,"ngx-slider-span","ngx-slider-bubble","ngx-slider-limit","ngx-slider-floor"],["floorLabel",""],["ngxSliderLabel","",1,"ngx-slider-span","ngx-slider-bubble","ngx-slider-limit","ngx-slider-ceil"],["ceilLabel",""],["ngxSliderLabel","",1,"ngx-slider-span","ngx-slider-bubble","ngx-slider-model-value"],["minHandleLabel",""],["ngxSliderLabel","",1,"ngx-slider-span","ngx-slider-bubble","ngx-slider-model-high"],["maxHandleLabel",""],["ngxSliderLabel","",1,"ngx-slider-span","ngx-slider-bubble","ngx-slider-combined"],["combinedLabel",""],["ngxSliderElement","",1,"ngx-slider-ticks",3,"hidden"],["ticksElement",""],["class","ngx-slider-tick",3,"ngClass","ngStyle",4,"ngFor","ngForOf"],[1,"ngx-slider-tick",3,"ngClass","ngStyle"],[3,"template","tooltip","placement"],["class","ngx-slider-span ngx-slider-tick-value",3,"template","tooltip","placement","content",4,"ngIf"],["class","ngx-slider-span ngx-slider-tick-legend",3,"innerHTML",4,"ngIf"],[1,"ngx-slider-span","ngx-slider-tick-value",3,"template","tooltip","placement","content"],[1,"ngx-slider-span","ngx-slider-tick-legend",3,"innerHTML"]],template:function(t,e){1&t&&(r.Vb(0,"span",0,1),r.Qb(2,"span",2),r.Ub(),r.Vb(3,"span",3,4),r.Qb(5,"span",2),r.Ub(),r.Vb(6,"span",5,6),r.Qb(8,"span",2),r.Ub(),r.Vb(9,"span",7,8),r.Qb(11,"span",9),r.Ub(),r.Qb(12,"span",10,11),r.Qb(14,"span",12,13),r.Qb(16,"span",14,15),r.Qb(18,"span",16,17),r.Qb(20,"span",18,19),r.Qb(22,"span",20,21),r.Qb(24,"span",22,23),r.Vb(26,"span",24,25),r.Ic(28,Km,4,9,"span",26),r.Ub()),2&t&&(r.Db(6),r.Hb("ngx-slider-transparent",e.fullBarTransparentClass),r.Db(3),r.Hb("ngx-slider-draggable",e.selectionBarDraggableClass),r.Db(2),r.nc("ngStyle",e.barStyle),r.Db(1),r.nc("ngStyle",e.minPointerStyle),r.Db(2),r.Fc("display",e.range?"inherit":"none"),r.nc("ngStyle",e.maxPointerStyle),r.Db(12),r.Hb("ngx-slider-ticks-values-under",e.ticksUnderValuesClass),r.nc("hidden",!e.showTicks),r.Db(2),r.nc("ngForOf",e.ticks))},directives:function(){return[sg,bt,og,ag,ct,at,fg,ut]},styles:[".ngx-slider{display:inline-block;position:relative;height:4px;width:100%;margin:35px 0 15px;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;touch-action:pan-y} .ngx-slider.with-legend{margin-bottom:40px} .ngx-slider[disabled]{cursor:not-allowed} .ngx-slider[disabled] .ngx-slider-pointer{cursor:not-allowed;background-color:#d8e0f3} .ngx-slider[disabled] .ngx-slider-draggable{cursor:not-allowed} .ngx-slider[disabled] .ngx-slider-selection{background:#8b91a2} .ngx-slider[disabled] .ngx-slider-tick{cursor:not-allowed} .ngx-slider[disabled] .ngx-slider-tick.ngx-slider-selected{background:#8b91a2} .ngx-slider .ngx-slider-span{white-space:nowrap;position:absolute;display:inline-block} .ngx-slider .ngx-slider-base{width:100%;height:100%;padding:0} .ngx-slider .ngx-slider-bar-wrapper{left:0;box-sizing:border-box;margin-top:-16px;padding-top:16px;width:100%;height:32px;z-index:1} .ngx-slider .ngx-slider-draggable{cursor:move} .ngx-slider .ngx-slider-bar{left:0;width:100%;height:4px;z-index:1;background:#d8e0f3;border-radius:2px} .ngx-slider .ngx-slider-bar-wrapper.ngx-slider-transparent .ngx-slider-bar{background:0 0} .ngx-slider .ngx-slider-bar-wrapper.ngx-slider-left-out-selection .ngx-slider-bar{background:#df002d} .ngx-slider .ngx-slider-bar-wrapper.ngx-slider-right-out-selection .ngx-slider-bar{background:#03a688} .ngx-slider .ngx-slider-selection{z-index:2;background:#0db9f0;border-radius:2px} .ngx-slider .ngx-slider-pointer{cursor:pointer;width:32px;height:32px;top:-14px;background-color:#0db9f0;z-index:3;border-radius:16px} .ngx-slider .ngx-slider-pointer:after{content:'';width:8px;height:8px;position:absolute;top:12px;left:12px;border-radius:4px;background:#fff} .ngx-slider .ngx-slider-pointer:hover:after{background-color:#fff} .ngx-slider .ngx-slider-pointer.ngx-slider-active{z-index:4} .ngx-slider .ngx-slider-pointer.ngx-slider-active:after{background-color:#451aff} .ngx-slider .ngx-slider-bubble{cursor:default;bottom:16px;padding:1px 3px;color:#55637d;font-size:16px} .ngx-slider .ngx-slider-bubble.ngx-slider-limit{color:#55637d} .ngx-slider .ngx-slider-ticks{box-sizing:border-box;width:100%;height:0;position:absolute;left:0;top:-3px;margin:0;z-index:1;list-style:none} .ngx-slider .ngx-slider-ticks-values-under .ngx-slider-tick-value{top:auto;bottom:-36px} .ngx-slider .ngx-slider-tick{text-align:center;cursor:pointer;width:10px;height:10px;background:#d8e0f3;border-radius:50%;position:absolute;top:0;left:0;margin-left:11px} .ngx-slider .ngx-slider-tick.ngx-slider-selected{background:#0db9f0} .ngx-slider .ngx-slider-tick-value{position:absolute;top:-34px;-webkit-transform:translate(-50%,0);transform:translate(-50%,0)} .ngx-slider .ngx-slider-tick-legend{position:absolute;top:24px;-webkit-transform:translate(-50%,0);transform:translate(-50%,0);max-width:50px;white-space:normal} .ngx-slider.vertical{position:relative;width:4px;height:100%;margin:0 20px;padding:0;vertical-align:baseline;touch-action:pan-x} .ngx-slider.vertical .ngx-slider-base{width:100%;height:100%;padding:0} .ngx-slider.vertical .ngx-slider-bar-wrapper{top:auto;left:0;margin:0 0 0 -16px;padding:0 0 0 16px;height:100%;width:32px} .ngx-slider.vertical .ngx-slider-bar{bottom:0;left:auto;width:4px;height:100%} .ngx-slider.vertical .ngx-slider-pointer{left:-14px!important;top:auto;bottom:0} .ngx-slider.vertical .ngx-slider-bubble{left:16px!important;bottom:0} .ngx-slider.vertical .ngx-slider-ticks{height:100%;width:0;left:-3px;top:0;z-index:1} .ngx-slider.vertical .ngx-slider-tick{vertical-align:middle;margin-left:auto;margin-top:11px} .ngx-slider.vertical .ngx-slider-tick-value{left:24px;top:auto;-webkit-transform:translate(0,-28%);transform:translate(0,-28%)} .ngx-slider.vertical .ngx-slider-tick-legend{top:auto;right:24px;-webkit-transform:translate(0,-28%);transform:translate(0,-28%);max-width:none;white-space:nowrap} .ngx-slider.vertical .ngx-slider-ticks-values-under .ngx-slider-tick-value{bottom:auto;left:auto;right:24px} .ngx-slider *{transition:none} .ngx-slider.animate .ngx-slider-bar-wrapper{transition:.3s linear} .ngx-slider.animate .ngx-slider-selection{transition:background-color .3s linear} .ngx-slider.animate .ngx-slider-pointer{transition:.3s linear} .ngx-slider.animate .ngx-slider-bubble{transition:.3s linear} .ngx-slider.animate .ngx-slider-bubble.ngx-slider-limit{transition:opacity .3s linear} .ngx-slider.animate .ngx-slider-bubble.ngx-slider-combined{transition:opacity .3s linear} .ngx-slider.animate .ngx-slider-tick{transition:background-color .3s linear}"]}),t})(),fg=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["ngx-slider-tooltip-wrapper"]],inputs:{template:"template",tooltip:"tooltip",placement:"placement",content:"content"},decls:2,vars:2,consts:[[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"ngx-slider-inner-tooltip"]],template:function(t,e){1&t&&(r.Ic(0,Zm,2,6,"ng-container",0),r.Ic(1,qm,3,3,"ng-container",0)),2&t&&(r.nc("ngIf",e.template),r.Db(1),r.nc("ngIf",!e.template))},directives:[ut,vt],styles:[".ngx-slider-inner-tooltip[_ngcontent-%COMP%]{height:100%}"]}),t})(),mg=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Et]]}),t})();const gg=["trigger"],Ag=["panel"];function bg(t,e){if(1&t&&(r.Vb(0,"span",8),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Lc(t.placeholder)}}function vg(t,e){if(1&t&&(r.Vb(0,"span",12),r.Kc(1),r.Ub()),2&t){const t=r.gc(2);r.Db(1),r.Lc(t.triggerValue)}}function _g(t,e){1&t&&r.lc(0,0,["*ngSwitchCase","true"])}function yg(t,e){if(1&t&&(r.Vb(0,"span",9),r.Ic(1,vg,2,1,"span",10),r.Ic(2,_g,1,0,"ng-content",11),r.Ub()),2&t){const t=r.gc();r.nc("ngSwitch",!!t.customTrigger),r.Db(2),r.nc("ngSwitchCase",!0)}}function wg(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",13),r.Vb(1,"div",14,15),r.cc("@transformPanel.done",function(e){return r.Ac(t),r.gc()._panelDoneAnimatingStream.next(e.toState)})("keydown",function(e){return r.Ac(t),r.gc()._handleKeydown(e)}),r.lc(3,1),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.nc("@transformPanelWrap",void 0),r.Db(1),r.Gb("mat-select-panel ",t._getPanelTheme(),""),r.Fc("transform-origin",t._transformOrigin)("font-size",t._triggerFontSize,"px"),r.nc("ngClass",t.panelClass)("@transformPanel",t.multiple?"showing-multiple":"showing"),r.Eb("id",t.id+"-panel")("aria-multiselectable",t.multiple)("aria-label",t.ariaLabel||null)("aria-labelledby",t._getPanelAriaLabelledby())}}const xg=[[["mat-select-trigger"]],"*"],Cg=["mat-select-trigger","*"],Sg={transformPanelWrap:$r("transformPanelWrap",[Qr("* => void",Jr("@transformPanel",[Xr()],{optional:!0}))]),transformPanel:$r("transformPanel",[qr("void",Zr({transform:"scaleY(0.8)",minWidth:"100%",opacity:0})),qr("showing",Zr({opacity:1,minWidth:"calc(100% + 32px)",transform:"scaleY(1)"})),qr("showing-multiple",Zr({opacity:1,minWidth:"calc(100% + 64px)",transform:"scaleY(1)"})),Qr("void => *",Gr("120ms cubic-bezier(0, 0, 0.2, 1)")),Qr("* => void",Gr("100ms 25ms linear",Zr({opacity:0})))])};let kg=0;const Eg=new r.s("mat-select-scroll-strategy"),Dg=new r.s("MAT_SELECT_CONFIG"),Ig={provide:Eg,deps:[Fr],useFactory:function(t){return()=>t.scrollStrategies.reposition()}};class Pg{constructor(t,e){this.source=t,this.value=e}}class Og{constructor(t,e,i,n,r){this._elementRef=t,this._defaultErrorStateMatcher=e,this._parentForm=i,this._parentFormGroup=n,this.ngControl=r}}const Mg=Da(Ia(ka(Pa(Og)))),Tg=new r.s("MatSelectTrigger");let Rg=(()=>{class t extends Mg{constructor(t,e,i,n,s,o,a,l,c,h,u,d,p,f){var m,g,A;super(s,n,a,l,h),this._viewportRuler=t,this._changeDetectorRef=e,this._ngZone=i,this._dir=o,this._parentFormField=c,this.ngControl=h,this._liveAnnouncer=p,this._defaultOptions=f,this._panelOpen=!1,this._compareWith=(t,e)=>t===e,this._uid="mat-select-"+kg++,this._triggerAriaLabelledBy=null,this._destroy=new _e.a,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+kg++,this._panelDoneAnimatingStream=new _e.a,this._overlayPanelClass=(null===(m=this._defaultOptions)||void 0===m?void 0:m.overlayPanelClass)||"",this._focused=!1,this.controlType="mat-select",this._required=!1,this._multiple=!1,this._disableOptionCentering=null!==(A=null===(g=this._defaultOptions)||void 0===g?void 0:g.disableOptionCentering)&&void 0!==A&&A,this.ariaLabel="",this.optionSelectionChanges=Ol(()=>{const t=this.options;return t?t.changes.pipe(Pn(t),Mn(()=>Object(or.a)(...t.map(t=>t.onSelectionChange)))):this._ngZone.onStable.pipe(Qe(1),Mn(()=>this.optionSelectionChanges))}),this.openedChange=new r.o,this._openedStream=this.openedChange.pipe(He(t=>t),Object(Ge.a)(()=>{})),this._closedStream=this.openedChange.pipe(He(t=>!t),Object(Ge.a)(()=>{})),this.selectionChange=new r.o,this.valueChange=new r.o,this.ngControl&&(this.ngControl.valueAccessor=this),null!=(null==f?void 0:f.typeaheadDebounceInterval)&&(this._typeaheadDebounceInterval=f.typeaheadDebounceInterval),this._scrollStrategyFactory=d,this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=parseInt(u)||0,this.id=this.id}get focused(){return this._focused||this._panelOpen}get placeholder(){return this._placeholder}set placeholder(t){this._placeholder=t,this.stateChanges.next()}get required(){return this._required}set required(t){this._required=ti(t),this.stateChanges.next()}get multiple(){return this._multiple}set multiple(t){this._multiple=ti(t)}get disableOptionCentering(){return this._disableOptionCentering}set disableOptionCentering(t){this._disableOptionCentering=ti(t)}get compareWith(){return this._compareWith}set compareWith(t){this._compareWith=t,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(t){(t!==this._value||this._multiple&&Array.isArray(t))&&(this.options&&this._setSelectionByValue(t),this._value=t)}get typeaheadDebounceInterval(){return this._typeaheadDebounceInterval}set typeaheadDebounceInterval(t){this._typeaheadDebounceInterval=ei(t)}get id(){return this._id}set id(t){this._id=t||this._uid,this.stateChanges.next()}ngOnInit(){this._selectionModel=new Xn(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(mn(),Sn(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(Sn(this._destroy)).subscribe(t=>{t.added.forEach(t=>t.select()),t.removed.forEach(t=>t.deselect())}),this.options.changes.pipe(Pn(null),Sn(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){const t=this._getTriggerAriaLabelledby();if(t!==this._triggerAriaLabelledBy){const e=this._elementRef.nativeElement;this._triggerAriaLabelledBy=t,t?e.setAttribute("aria-labelledby",t):e.removeAttribute("aria-labelledby")}this.ngControl&&this.updateErrorState()}ngOnChanges(t){t.disabled&&this.stateChanges.next(),t.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this._typeaheadDebounceInterval)}ngOnDestroy(){this._destroy.next(),this._destroy.complete(),this.stateChanges.complete()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck())}close(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched())}writeValue(t){this.value=t}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel.selected:this._selectionModel.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){const t=this._selectionModel.selected.map(t=>t.viewValue);return this._isRtl()&&t.reverse(),t.join(", ")}return this._selectionModel.selected[0].viewValue}_isRtl(){return!!this._dir&&"rtl"===this._dir.value}_handleKeydown(t){this.disabled||(this.panelOpen?this._handleOpenKeydown(t):this._handleClosedKeydown(t))}_handleClosedKeydown(t){const e=t.keyCode,i=40===e||38===e||37===e||39===e,n=13===e||32===e,r=this._keyManager;if(!r.isTyping()&&n&&!ke(t)||(this.multiple||t.altKey)&&i)t.preventDefault(),this.open();else if(!this.multiple){const e=this.selected;r.onKeydown(t);const i=this.selected;i&&e!==i&&this._liveAnnouncer.announce(i.viewValue,1e4)}}_handleOpenKeydown(t){const e=this._keyManager,i=t.keyCode,n=40===i||38===i,r=e.isTyping();if(n&&t.altKey)t.preventDefault(),this.close();else if(r||13!==i&&32!==i||!e.activeItem||ke(t))if(!r&&this._multiple&&65===i&&t.ctrlKey){t.preventDefault();const e=this.options.some(t=>!t.disabled&&!t.selected);this.options.forEach(t=>{t.disabled||(e?t.select():t.deselect())})}else{const i=e.activeItemIndex;e.onKeydown(t),this._multiple&&n&&t.shiftKey&&e.activeItem&&e.activeItemIndex!==i&&e.activeItem._selectViaInteraction()}else t.preventDefault(),e.activeItem._selectViaInteraction()}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this.disabled||this.panelOpen||(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_onAttached(){this.overlayDir.positionChange.pipe(Qe(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()})}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this._setSelectionByValue(this.ngControl?this.ngControl.value:this._value),this.stateChanges.next()})}_setSelectionByValue(t){if(this._selectionModel.selected.forEach(t=>t.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&t)Array.isArray(t),t.forEach(t=>this._selectValue(t)),this._sortValues();else{const e=this._selectValue(t);e?this._keyManager.updateActiveItem(e):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectValue(t){const e=this.options.find(e=>{if(this._selectionModel.isSelected(e))return!1;try{return null!=e.value&&this._compareWith(e.value,t)}catch(i){return!1}});return e&&this._selectionModel.select(e),e}_initKeyManager(){this._keyManager=new Ti(this.options).withTypeAhead(this._typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withAllowedModifierKeys(["shiftKey"]),this._keyManager.tabOut.pipe(Sn(this._destroy)).subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.pipe(Sn(this._destroy)).subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):this._panelOpen||this.multiple||!this._keyManager.activeItem||this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){const t=Object(or.a)(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Sn(t)).subscribe(t=>{this._onSelect(t.source,t.isUserInput),t.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Object(or.a)(...this.options.map(t=>t._stateChanges)).pipe(Sn(t)).subscribe(()=>{this._changeDetectorRef.markForCheck(),this.stateChanges.next()})}_onSelect(t,e){const i=this._selectionModel.isSelected(t);null!=t.value||this._multiple?(i!==t.selected&&(t.selected?this._selectionModel.select(t):this._selectionModel.deselect(t)),e&&this._keyManager.setActiveItem(t),this.multiple&&(this._sortValues(),e&&this.focus())):(t.deselect(),this._selectionModel.clear(),null!=this.value&&this._propagateChanges(t.value)),i!==this._selectionModel.isSelected(t)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){const t=this.options.toArray();this._selectionModel.sort((e,i)=>this.sortComparator?this.sortComparator(e,i,t):t.indexOf(e)-t.indexOf(i)),this.stateChanges.next()}}_propagateChanges(t){let e=null;e=this.multiple?this.selected.map(t=>t.value):this.selected?this.selected.value:t,this._value=e,this.valueChange.emit(e),this._onChange(e),this.selectionChange.emit(this._getChangeEvent(e)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){this._keyManager&&(this.empty?this._keyManager.setFirstItemActive():this._keyManager.setActiveItem(this._selectionModel.selected[0]))}_canOpen(){var t;return!this._panelOpen&&!this.disabled&&(null===(t=this.options)||void 0===t?void 0:t.length)>0}focus(t){this._elementRef.nativeElement.focus(t)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;const t=this._getLabelId();return this.ariaLabelledby?t+" "+this.ariaLabelledby:t}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getLabelId(){var t;return(null===(t=this._parentFormField)||void 0===t?void 0:t.getLabelId())||""}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;let t=this._getLabelId()+" "+this._valueId;return this.ariaLabelledby&&(t+=" "+this.ariaLabelledby),t}_panelDoneAnimating(t){this.openedChange.emit(t)}setDescribedByIds(t){this._ariaDescribedby=t.join(" ")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this._panelOpen||!this.empty||this._focused&&!!this._placeholder}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(nr),r.Pb(r.h),r.Pb(r.B),r.Pb($a),r.Pb(r.l),r.Pb(Zn,8),r.Pb(oh,8),r.Pb(_h,8),r.Pb(vu,8),r.Pb(Tc,10),r.ac("tabindex"),r.Pb(Eg),r.Pb(Hi),r.Pb(Dg,8))},t.\u0275dir=r.Kb({type:t,viewQuery:function(t,e){if(1&t&&(r.Pc(gg,1),r.Pc(Ag,1),r.Pc(Nr,1)),2&t){let t;r.vc(t=r.dc())&&(e.trigger=t.first),r.vc(t=r.dc())&&(e.panel=t.first),r.vc(t=r.dc())&&(e.overlayDir=t.first)}},inputs:{ariaLabel:["aria-label","ariaLabel"],id:"id",placeholder:"placeholder",required:"required",multiple:"multiple",disableOptionCentering:"disableOptionCentering",compareWith:"compareWith",value:"value",typeaheadDebounceInterval:"typeaheadDebounceInterval",panelClass:"panelClass",ariaLabelledby:["aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",sortComparator:"sortComparator"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},features:[r.Ab,r.Bb]}),t})(),Vg=(()=>{class t extends Rg{constructor(){super(...arguments),this._scrollTop=0,this._triggerFontSize=0,this._transformOrigin="top",this._offsetY=0,this._positions=[{originX:"start",originY:"top",overlayX:"start",overlayY:"top"},{originX:"start",originY:"bottom",overlayX:"start",overlayY:"bottom"}]}_calculateOverlayScroll(t,e,i){const n=this._getItemHeight();return Math.min(Math.max(0,n*t-e+n/2),i)}ngOnInit(){super.ngOnInit(),this._viewportRuler.change().pipe(Sn(this._destroy)).subscribe(()=>{this.panelOpen&&(this._triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this._changeDetectorRef.markForCheck())})}open(){super._canOpen()&&(super.open(),this._triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this._triggerFontSize=parseInt(getComputedStyle(this.trigger.nativeElement).fontSize||"0"),this._calculateOverlayPosition(),this._ngZone.onStable.pipe(Qe(1)).subscribe(()=>{this._triggerFontSize&&this.overlayDir.overlayRef&&this.overlayDir.overlayRef.overlayElement&&(this.overlayDir.overlayRef.overlayElement.style.fontSize=`${this._triggerFontSize}px`)}))}_scrollOptionIntoView(t){const e=vl(t,this.options,this.optionGroups),i=this._getItemHeight();this.panel.nativeElement.scrollTop=_l((t+e)*i,i,this.panel.nativeElement.scrollTop,256)}_positioningSettled(){this._calculateOverlayOffsetX(),this.panel.nativeElement.scrollTop=this._scrollTop}_panelDoneAnimating(t){this.panelOpen?this._scrollTop=0:(this.overlayDir.offsetX=0,this._changeDetectorRef.markForCheck()),super._panelDoneAnimating(t)}_getChangeEvent(t){return new Pg(this,t)}_calculateOverlayOffsetX(){const t=this.overlayDir.overlayRef.overlayElement.getBoundingClientRect(),e=this._viewportRuler.getViewportSize(),i=this._isRtl(),n=this.multiple?56:32;let r;if(this.multiple)r=40;else if(this.disableOptionCentering)r=16;else{let t=this._selectionModel.selected[0]||this.options.first;r=t&&t.group?32:16}i||(r*=-1);const s=0-(t.left+r-(i?n:0)),o=t.right+r-e.width+(i?0:n);s>0?r+=s+8:o>0&&(r-=o+8),this.overlayDir.offsetX=Math.round(r),this.overlayDir.overlayRef.updatePosition()}_calculateOverlayOffsetY(t,e,i){const n=this._getItemHeight(),r=(n-this._triggerRect.height)/2,s=Math.floor(256/n);let o;return this.disableOptionCentering?0:(o=0===this._scrollTop?t*n:this._scrollTop===i?(t-(this._getItemCount()-s))*n+(n-(this._getItemCount()*n-256)%n):e-n/2,Math.round(-1*o-r))}_checkOverlayWithinViewport(t){const e=this._getItemHeight(),i=this._viewportRuler.getViewportSize(),n=this._triggerRect.top-8,r=i.height-this._triggerRect.bottom-8,s=Math.abs(this._offsetY),o=Math.min(this._getItemCount()*e,256)-s-this._triggerRect.height;o>r?this._adjustPanelUp(o,r):s>n?this._adjustPanelDown(s,n,t):this._transformOrigin=this._getOriginBasedOnOption()}_adjustPanelUp(t,e){const i=Math.round(t-e);this._scrollTop-=i,this._offsetY-=i,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop<=0&&(this._scrollTop=0,this._offsetY=0,this._transformOrigin="50% bottom 0px")}_adjustPanelDown(t,e,i){const n=Math.round(t-e);if(this._scrollTop+=n,this._offsetY+=n,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop>=i)return this._scrollTop=i,this._offsetY=0,void(this._transformOrigin="50% top 0px")}_calculateOverlayPosition(){const t=this._getItemHeight(),e=this._getItemCount(),i=Math.min(e*t,256),n=e*t-i;let r;r=this.empty?0:Math.max(this.options.toArray().indexOf(this._selectionModel.selected[0]),0),r+=vl(r,this.options,this.optionGroups);const s=i/2;this._scrollTop=this._calculateOverlayScroll(r,s,n),this._offsetY=this._calculateOverlayOffsetY(r,s,n),this._checkOverlayWithinViewport(n)}_getOriginBasedOnOption(){const t=this._getItemHeight(),e=(t-this._triggerRect.height)/2;return`50% ${Math.abs(this._offsetY)-e+t/2}px 0px`}_getItemHeight(){return 3*this._triggerFontSize}_getItemCount(){return this.options.length+this.optionGroups.length}}return t.\u0275fac=function(e){return Fg(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-select"]],contentQueries:function(t,e,i){if(1&t&&(r.Ib(i,Tg,1),r.Ib(i,bl,1),r.Ib(i,dl,1)),2&t){let t;r.vc(t=r.dc())&&(e.customTrigger=t.first),r.vc(t=r.dc())&&(e.options=t),r.vc(t=r.dc())&&(e.optionGroups=t)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","true",1,"mat-select"],hostVars:20,hostBindings:function(t,e){1&t&&r.cc("keydown",function(t){return e._handleKeydown(t)})("focus",function(){return e._onFocus()})("blur",function(){return e._onBlur()}),2&t&&(r.Eb("id",e.id)("tabindex",e.tabIndex)("aria-controls",e.panelOpen?e.id+"-panel":null)("aria-expanded",e.panelOpen)("aria-label",e.ariaLabel||null)("aria-required",e.required.toString())("aria-disabled",e.disabled.toString())("aria-invalid",e.errorState)("aria-describedby",e._ariaDescribedby||null)("aria-activedescendant",e._getAriaActiveDescendant()),r.Hb("mat-select-disabled",e.disabled)("mat-select-invalid",e.errorState)("mat-select-required",e.required)("mat-select-empty",e.empty)("mat-select-multiple",e.multiple))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex"},exportAs:["matSelect"],features:[r.Cb([{provide:su,useExisting:t},{provide:al,useExisting:t}]),r.Ab],ngContentSelectors:Cg,decls:9,vars:12,consts:[["cdk-overlay-origin","",1,"mat-select-trigger",3,"click"],["origin","cdkOverlayOrigin","trigger",""],[1,"mat-select-value",3,"ngSwitch"],["class","mat-select-placeholder mat-select-min-line",4,"ngSwitchCase"],["class","mat-select-value-text",3,"ngSwitch",4,"ngSwitchCase"],[1,"mat-select-arrow-wrapper"],[1,"mat-select-arrow"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayMinWidth","cdkConnectedOverlayOffsetY","backdropClick","attach","detach"],[1,"mat-select-placeholder","mat-select-min-line"],[1,"mat-select-value-text",3,"ngSwitch"],["class","mat-select-min-line",4,"ngSwitchDefault"],[4,"ngSwitchCase"],[1,"mat-select-min-line"],[1,"mat-select-panel-wrap"],["role","listbox","tabindex","-1",3,"ngClass","keydown"],["panel",""]],template:function(t,e){if(1&t&&(r.mc(xg),r.Vb(0,"div",0,1),r.cc("click",function(){return e.toggle()}),r.Vb(3,"div",2),r.Ic(4,bg,2,1,"span",3),r.Ic(5,yg,3,2,"span",4),r.Ub(),r.Vb(6,"div",5),r.Qb(7,"div",6),r.Ub(),r.Ub(),r.Ic(8,wg,4,14,"ng-template",7),r.cc("backdropClick",function(){return e.close()})("attach",function(){return e._onAttached()})("detach",function(){return e.close()})),2&t){const t=r.wc(1);r.Eb("aria-owns",e.panelOpen?e.id+"-panel":null),r.Db(3),r.nc("ngSwitch",e.empty),r.Eb("id",e._valueId),r.Db(1),r.nc("ngSwitchCase",!0),r.Db(1),r.nc("ngSwitchCase",!1),r.Db(3),r.nc("cdkConnectedOverlayPanelClass",e._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",e._scrollStrategy)("cdkConnectedOverlayOrigin",t)("cdkConnectedOverlayOpen",e.panelOpen)("cdkConnectedOverlayPositions",e._positions)("cdkConnectedOverlayMinWidth",null==e._triggerRect?null:e._triggerRect.width)("cdkConnectedOverlayOffsetY",e._offsetY)}},directives:[Br,mt,gt,Nr,At,at],styles:['.mat-select{display:inline-block;width:100%;outline:none}.mat-select-trigger{display:inline-table;cursor:pointer;position:relative;box-sizing:border-box}.mat-select-disabled .mat-select-trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-select-value{display:table-cell;max-width:0;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-select-arrow-wrapper{display:table-cell;vertical-align:middle}.mat-form-field-appearance-fill .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-outline .mat-select-arrow-wrapper{transform:translateY(-25%)}.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:none}.mat-select-arrow{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;margin:0 4px}.mat-select-panel-wrap{flex-basis:100%}.mat-select-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;padding-top:0;padding-bottom:0;max-height:256px;min-width:100%;border-radius:4px;outline:0}.cdk-high-contrast-active .mat-select-panel{outline:solid 1px}.mat-select-panel .mat-optgroup-label,.mat-select-panel .mat-option{font-size:inherit;line-height:3em;height:3em}.mat-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-form-field-flex{cursor:pointer}.mat-form-field-type-mat-select .mat-form-field-label{width:calc(100% - 18px)}.mat-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable .mat-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-select-placeholder{color:transparent;-webkit-text-fill-color:transparent;transition:none;display:block}.mat-select-min-line:empty::before{content:" ";white-space:pre;width:1px}\n'],encapsulation:2,data:{animation:[Sg.transformPanelWrap,Sg.transformPanel]},changeDetection:0}),t})();const Fg=r.Xb(Vg);let Lg=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[Ig],imports:[[Et,zr,yl,Sa],rr,yu,yl,Sa]}),t})();class Ug extends Ee.a{notifyNext(t,e,i,n,r){this.destination.next(e)}notifyError(t,e){this.destination.error(t)}notifyComplete(t){this.destination.complete()}}class Bg extends Ee.a{constructor(t,e,i){super(),this.parent=t,this.outerValue=e,this.outerIndex=i,this.index=0}_next(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)}_error(t){this.parent.notifyError(t,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}var Ng=i("SeVD");function jg(t,e,i,n,r=new Bg(t,i,n)){if(!r.closed)return e instanceof Ze.a?e.subscribe(r):Object(Ng.a)(e)(r)}const zg={};function Hg(...t){let e,i;return Object(we.a)(t[t.length-1])&&(i=t.pop()),"function"==typeof t[t.length-1]&&(e=t.pop()),1===t.length&&Object(tn.a)(t[0])&&(t=t[0]),Object(xe.a)(t,i).lift(new Kg(e))}class Kg{constructor(t){this.resultSelector=t}call(t,e){return e.subscribe(new $g(t,this.resultSelector))}}class $g extends Ug{constructor(t,e){super(t),this.resultSelector=e,this.active=0,this.values=[],this.observables=[]}_next(t){this.values.push(zg),this.observables.push(t)}_complete(){const t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(let i=0;i<e;i++)this.add(jg(this,t[i],void 0,i))}}notifyComplete(t){0==(this.active-=1)&&this.destination.complete()}notifyNext(t,e,i){const n=this.values,r=this.toRespond?n[i]===zg?--this.toRespond:this.toRespond:0;n[i]=e,0===r&&(this.resultSelector?this._tryResultSelector(n):this.destination.next(n.slice()))}_tryResultSelector(t){let e;try{e=this.resultSelector.apply(this,t)}catch(i){return void this.destination.error(i)}this.destination.next(e)}}function Gg(t){return e=>e.lift(new Wg(t))}class Wg{constructor(t){this.total=t}call(t,e){return e.subscribe(new Zg(t,this.total))}}class Zg extends Ee.a{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){++this.count>this.total&&this.destination.next(t)}}const qg=new Set;let Yg,Qg=(()=>{class t{constructor(t){this._platform=t,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):Xg}matchMedia(t){return this._platform.WEBKIT&&function(t){if(!qg.has(t))try{Yg||(Yg=document.createElement("style"),Yg.setAttribute("type","text/css"),document.head.appendChild(Yg)),Yg.sheet&&(Yg.sheet.insertRule(`@media ${t} {.fx-query-test{ }}`,0),qg.add(t))}catch(e){console.error(e)}}(t),this._matchMedia(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(ci))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(ci))},token:t,providedIn:"root"}),t})();function Xg(t){return{matches:"all"===t||""===t,media:t,addListener:()=>{},removeListener:()=>{}}}let Jg=(()=>{class t{constructor(t,e){this._mediaMatcher=t,this._zone=e,this._queries=new Map,this._destroySubject=new _e.a}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(t){return tA(ni(t)).some(t=>this._registerQuery(t).mql.matches)}observe(t){let e=Hg(tA(ni(t)).map(t=>this._registerQuery(t).observable));return e=In(e.pipe(Qe(1)),e.pipe(Gg(1),Be(0))),e.pipe(Object(Ge.a)(t=>{const e={matches:!1,breakpoints:{}};return t.forEach(({matches:t,query:i})=>{e.matches=e.matches||t,e.breakpoints[i]=t}),e}))}_registerQuery(t){if(this._queries.has(t))return this._queries.get(t);const e=this._mediaMatcher.matchMedia(t),i={observable:new Ze.a(t=>{const i=e=>this._zone.run(()=>t.next(e));return e.addListener(i),()=>{e.removeListener(i)}}).pipe(Pn(e),Object(Ge.a)(({matches:e})=>({query:t,matches:e})),Sn(this._destroySubject)),mql:e};return this._queries.set(t,i),i}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Qg),r.Zb(r.B))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(Qg),Object(r.Zb)(r.B))},token:t,providedIn:"root"}),t})();function tA(t){return t.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}const eA={tooltipState:$r("state",[qr("initial, void, hidden",Zr({opacity:0,transform:"scale(0)"})),qr("visible",Zr({transform:"scale(1)"})),Qr("* => visible",Gr("200ms cubic-bezier(0, 0, 0.2, 1)",Yr([Zr({opacity:0,transform:"scale(0)",offset:0}),Zr({opacity:.5,transform:"scale(0.99)",offset:.5}),Zr({opacity:1,transform:"scale(1)",offset:1})]))),Qr("* => hidden",Gr("100ms cubic-bezier(0, 0, 0.2, 1)",Zr({opacity:0})))])},iA=Ai({passive:!0}),nA=new r.s("mat-tooltip-scroll-strategy"),rA={provide:nA,deps:[Fr],useFactory:function(t){return()=>t.scrollStrategies.reposition({scrollThrottle:20})}},sA=new r.s("mat-tooltip-default-options",{providedIn:"root",factory:function(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}});let oA=(()=>{class t{constructor(t,e,i,n,r,s,o,a,l,c,h,u){this._overlay=t,this._elementRef=e,this._scrollDispatcher=i,this._viewContainerRef=n,this._ngZone=r,this._platform=s,this._ariaDescriber=o,this._focusMonitor=a,this._dir=c,this._defaultOptions=h,this._position="below",this._disabled=!1,this._viewInitialized=!1,this._pointerExitEventsInitialized=!1,this.showDelay=this._defaultOptions.showDelay,this.hideDelay=this._defaultOptions.hideDelay,this.touchGestures="auto",this._message="",this._passiveListeners=[],this._destroyed=new _e.a,this._handleKeydown=t=>{this._isTooltipVisible()&&27===t.keyCode&&!ke(t)&&(t.preventDefault(),t.stopPropagation(),this._ngZone.run(()=>this.hide(0)))},this._scrollStrategy=l,h&&(h.position&&(this.position=h.position),h.touchGestures&&(this.touchGestures=h.touchGestures)),r.runOutsideAngular(()=>{e.nativeElement.addEventListener("keydown",this._handleKeydown)})}get position(){return this._position}set position(t){t!==this._position&&(this._position=t,this._overlayRef&&(this._updatePosition(),this._tooltipInstance&&this._tooltipInstance.show(0),this._overlayRef.updatePosition()))}get disabled(){return this._disabled}set disabled(t){this._disabled=ti(t),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}get message(){return this._message}set message(t){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message,"tooltip"),this._message=null!=t?String(t).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage(),this._ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip")})}))}get tooltipClass(){return this._tooltipClass}set tooltipClass(t){this._tooltipClass=t,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Sn(this._destroyed)).subscribe(t=>{t?"keyboard"===t&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0))})}ngOnDestroy(){const t=this._elementRef.nativeElement;clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),t.removeEventListener("keydown",this._handleKeydown),this._passiveListeners.forEach(([e,i])=>{t.removeEventListener(e,i,iA)}),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(t,this.message,"tooltip"),this._focusMonitor.stopMonitoring(t)}show(t=this.showDelay){if(this.disabled||!this.message||this._isTooltipVisible()&&!this._tooltipInstance._showTimeoutId&&!this._tooltipInstance._hideTimeoutId)return;const e=this._createOverlay();this._detach(),this._portal=this._portal||new pe(aA,this._viewContainerRef),this._tooltipInstance=e.attach(this._portal).instance,this._tooltipInstance.afterHidden().pipe(Sn(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),this._tooltipInstance.show(t)}hide(t=this.hideDelay){this._tooltipInstance&&this._tooltipInstance.hide(t)}toggle(){this._isTooltipVisible()?this.hide():this.show()}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(){if(this._overlayRef)return this._overlayRef;const t=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),e=this._overlay.position().flexibleConnectedTo(this._elementRef).withTransformOriginOn(".mat-tooltip").withFlexibleDimensions(!1).withViewportMargin(8).withScrollableContainers(t);return e.positionChanges.pipe(Sn(this._destroyed)).subscribe(t=>{this._tooltipInstance&&t.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:e,panelClass:"mat-tooltip-panel",scrollStrategy:this._scrollStrategy()}),this._updatePosition(),this._overlayRef.detachments().pipe(Sn(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(){const t=this._overlayRef.getConfig().positionStrategy,e=this._getOrigin(),i=this._getOverlayPosition();t.withPositions([Object.assign(Object.assign({},e.main),i.main),Object.assign(Object.assign({},e.fallback),i.fallback)])}_getOrigin(){const t=!this._dir||"ltr"==this._dir.value,e=this.position;let i;"above"==e||"below"==e?i={originX:"center",originY:"above"==e?"top":"bottom"}:"before"==e||"left"==e&&t||"right"==e&&!t?i={originX:"start",originY:"center"}:("after"==e||"right"==e&&t||"left"==e&&!t)&&(i={originX:"end",originY:"center"});const{x:n,y:r}=this._invertPosition(i.originX,i.originY);return{main:i,fallback:{originX:n,originY:r}}}_getOverlayPosition(){const t=!this._dir||"ltr"==this._dir.value,e=this.position;let i;"above"==e?i={overlayX:"center",overlayY:"bottom"}:"below"==e?i={overlayX:"center",overlayY:"top"}:"before"==e||"left"==e&&t||"right"==e&&!t?i={overlayX:"end",overlayY:"center"}:("after"==e||"right"==e&&t||"left"==e&&!t)&&(i={overlayX:"start",overlayY:"center"});const{x:n,y:r}=this._invertPosition(i.overlayX,i.overlayY);return{main:i,fallback:{overlayX:n,overlayY:r}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),this._ngZone.onMicrotaskEmpty.pipe(Qe(1),Sn(this._destroyed)).subscribe(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()}))}_setTooltipClass(t){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=t,this._tooltipInstance._markForCheck())}_invertPosition(t,e){return"above"===this.position||"below"===this.position?"top"===e?e="bottom":"bottom"===e&&(e="top"):"end"===t?t="start":"start"===t&&(t="end"),{x:t,y:e}}_setupPointerEnterEventsIfNeeded(){!this._disabled&&this.message&&this._viewInitialized&&!this._passiveListeners.length&&(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",()=>{this._setupPointerExitEventsIfNeeded(),this.show()}]):"off"!==this.touchGestures&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",()=>{this._setupPointerExitEventsIfNeeded(),clearTimeout(this._touchstartTimeout),this._touchstartTimeout=setTimeout(()=>this.show(),500)}])),this._addListeners(this._passiveListeners))}_setupPointerExitEventsIfNeeded(){if(this._pointerExitEventsInitialized)return;this._pointerExitEventsInitialized=!0;const t=[];if(this._platformSupportsMouseEvents())t.push(["mouseleave",()=>this.hide()],["wheel",t=>this._wheelListener(t)]);else if("off"!==this.touchGestures){this._disableNativeGesturesIfNecessary();const e=()=>{clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions.touchendHideDelay)};t.push(["touchend",e],["touchcancel",e])}this._addListeners(t),this._passiveListeners.push(...t)}_addListeners(t){t.forEach(([t,e])=>{this._elementRef.nativeElement.addEventListener(t,e,iA)})}_platformSupportsMouseEvents(){return!this._platform.IOS&&!this._platform.ANDROID}_wheelListener(t){if(this._isTooltipVisible()){const e=(this._document||document).elementFromPoint(t.clientX,t.clientY),i=this._elementRef.nativeElement;e===i||i.contains(e)||this.hide()}}_disableNativeGesturesIfNecessary(){const t=this.touchGestures;if("off"!==t){const e=this._elementRef.nativeElement,i=e.style;("on"===t||"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName)&&(i.userSelect=i.msUserSelect=i.webkitUserSelect=i.MozUserSelect="none"),"on"!==t&&e.draggable||(i.webkitUserDrag="none"),i.touchAction="none",i.webkitTapHighlightColor="transparent"}}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Fr),r.Pb(r.l),r.Pb(er),r.Pb(r.S),r.Pb(r.B),r.Pb(ci),r.Pb(Ii),r.Pb(qi),r.Pb(nA),r.Pb(Zn,8),r.Pb(sA,8),r.Pb(a))},t.\u0275dir=r.Kb({type:t,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-tooltip-trigger"],inputs:{showDelay:["matTooltipShowDelay","showDelay"],hideDelay:["matTooltipHideDelay","hideDelay"],touchGestures:["matTooltipTouchGestures","touchGestures"],position:["matTooltipPosition","position"],disabled:["matTooltipDisabled","disabled"],message:["matTooltip","message"],tooltipClass:["matTooltipClass","tooltipClass"]},exportAs:["matTooltip"]}),t})(),aA=(()=>{class t{constructor(t,e){this._changeDetectorRef=t,this._breakpointObserver=e,this._visibility="initial",this._closeOnInteraction=!1,this._onHide=new _e.a,this._isHandset=this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait), (max-width: 959.98px) and (orientation: landscape)")}show(t){this._hideTimeoutId&&(clearTimeout(this._hideTimeoutId),this._hideTimeoutId=null),this._closeOnInteraction=!0,this._showTimeoutId=setTimeout(()=>{this._visibility="visible",this._showTimeoutId=null,this._markForCheck()},t)}hide(t){this._showTimeoutId&&(clearTimeout(this._showTimeoutId),this._showTimeoutId=null),this._hideTimeoutId=setTimeout(()=>{this._visibility="hidden",this._hideTimeoutId=null,this._markForCheck()},t)}afterHidden(){return this._onHide}isVisible(){return"visible"===this._visibility}ngOnDestroy(){this._onHide.complete()}_animationStart(){this._closeOnInteraction=!1}_animationDone(t){const e=t.toState;"hidden"!==e||this.isVisible()||this._onHide.next(),"visible"!==e&&"hidden"!==e||(this._closeOnInteraction=!0)}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(Jg))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-tooltip-component"]],hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(t,e){1&t&&r.cc("click",function(){return e._handleBodyInteraction()},!1,r.xc)("auxclick",function(){return e._handleBodyInteraction()},!1,r.xc),2&t&&r.Fc("zoom","visible"===e._visibility?1:null)},decls:3,vars:7,consts:[[1,"mat-tooltip",3,"ngClass"]],template:function(t,e){if(1&t&&(r.Vb(0,"div",0),r.cc("@state.start",function(){return e._animationStart()})("@state.done",function(t){return e._animationDone(t)}),r.hc(1,"async"),r.Kc(2),r.Ub()),2&t){let t=null;r.Hb("mat-tooltip-handset",null==(t=r.ic(1,5,e._isHandset))?null:t.matches),r.nc("ngClass",e.tooltipClass)("@state",e._visibility),r.Db(2),r.Lc(e.message)}},directives:[at],pipes:[St],styles:[".mat-tooltip-panel{pointer-events:none !important}.mat-tooltip{color:#fff;border-radius:4px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis}.cdk-high-contrast-active .mat-tooltip{outline:solid 1px}.mat-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}\n"],encapsulation:2,data:{animation:[eA.tooltipState]},changeDetection:0}),t})(),lA=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[rA],imports:[[Ji,Et,zr,Sa],Sa,rr]}),t})();function cA(t,e){if(1&t&&(r.Vb(0,"mat-option",19),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t),r.Db(1),r.Mc(" ",t," ")}}function hA(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-form-field",16),r.Vb(1,"mat-select",17),r.cc("selectionChange",function(e){return r.Ac(t),r.gc(2)._changePageSize(e.value)}),r.Ic(2,cA,2,2,"mat-option",18),r.Ub(),r.Ub()}if(2&t){const t=r.gc(2);r.nc("appearance",t._formFieldAppearance)("color",t.color),r.Db(1),r.nc("value",t.pageSize)("disabled",t.disabled)("aria-label",t._intl.itemsPerPageLabel),r.Db(1),r.nc("ngForOf",t._displayedPageSizeOptions)}}function uA(t,e){if(1&t&&(r.Vb(0,"div",20),r.Kc(1),r.Ub()),2&t){const t=r.gc(2);r.Db(1),r.Lc(t.pageSize)}}function dA(t,e){if(1&t&&(r.Vb(0,"div",12),r.Vb(1,"div",13),r.Kc(2),r.Ub(),r.Ic(3,hA,3,6,"mat-form-field",14),r.Ic(4,uA,2,1,"div",15),r.Ub()),2&t){const t=r.gc();r.Db(2),r.Mc(" ",t._intl.itemsPerPageLabel," "),r.Db(1),r.nc("ngIf",t._displayedPageSizeOptions.length>1),r.Db(1),r.nc("ngIf",t._displayedPageSizeOptions.length<=1)}}function pA(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",21),r.cc("click",function(){return r.Ac(t),r.gc().firstPage()}),r.fc(),r.Vb(1,"svg",7),r.Qb(2,"path",22),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.nc("matTooltip",t._intl.firstPageLabel)("matTooltipDisabled",t._previousButtonsDisabled())("matTooltipPosition","above")("disabled",t._previousButtonsDisabled()),r.Eb("aria-label",t._intl.firstPageLabel)}}function fA(t,e){if(1&t){const t=r.Wb();r.fc(),r.ec(),r.Vb(0,"button",23),r.cc("click",function(){return r.Ac(t),r.gc().lastPage()}),r.fc(),r.Vb(1,"svg",7),r.Qb(2,"path",24),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.nc("matTooltip",t._intl.lastPageLabel)("matTooltipDisabled",t._nextButtonsDisabled())("matTooltipPosition","above")("disabled",t._nextButtonsDisabled()),r.Eb("aria-label",t._intl.lastPageLabel)}}let mA=(()=>{class t{constructor(){this.changes=new _e.a,this.itemsPerPageLabel="Items per page:",this.nextPageLabel="Next page",this.previousPageLabel="Previous page",this.firstPageLabel="First page",this.lastPageLabel="Last page",this.getRangeLabel=(t,e,i)=>{if(0==i||0==e)return`0 of ${i}`;const n=t*e;return`${n+1} \u2013 ${n<(i=Math.max(i,0))?Math.min(n+e,i):n+e} of ${i}`}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(r.Lb)({factory:function(){return new t},token:t,providedIn:"root"}),t})();const gA={provide:mA,deps:[[new r.C,new r.M,mA]],useFactory:function(t){return t||new mA}},AA=new r.s("MAT_PAGINATOR_DEFAULT_OPTIONS");class bA{}const vA=ka(Oa(bA));let _A=(()=>{class t extends vA{constructor(t,e,i){if(super(),this._intl=t,this._changeDetectorRef=e,this._pageIndex=0,this._length=0,this._pageSizeOptions=[],this._hidePageSize=!1,this._showFirstLastButtons=!1,this.page=new r.o,this._intlChanges=t.changes.subscribe(()=>this._changeDetectorRef.markForCheck()),i){const{pageSize:t,pageSizeOptions:e,hidePageSize:n,showFirstLastButtons:r}=i;null!=t&&(this._pageSize=t),null!=e&&(this._pageSizeOptions=e),null!=n&&(this._hidePageSize=n),null!=r&&(this._showFirstLastButtons=r)}}get pageIndex(){return this._pageIndex}set pageIndex(t){this._pageIndex=Math.max(ei(t),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(t){this._length=ei(t),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(t){this._pageSize=Math.max(ei(t),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(t){this._pageSizeOptions=(t||[]).map(t=>ei(t)),this._updateDisplayedPageSizeOptions()}get hidePageSize(){return this._hidePageSize}set hidePageSize(t){this._hidePageSize=ti(t)}get showFirstLastButtons(){return this._showFirstLastButtons}set showFirstLastButtons(t){this._showFirstLastButtons=ti(t)}ngOnInit(){this._initialized=!0,this._updateDisplayedPageSizeOptions(),this._markInitialized()}ngOnDestroy(){this._intlChanges.unsubscribe()}nextPage(){if(!this.hasNextPage())return;const t=this.pageIndex;this.pageIndex++,this._emitPageEvent(t)}previousPage(){if(!this.hasPreviousPage())return;const t=this.pageIndex;this.pageIndex--,this._emitPageEvent(t)}firstPage(){if(!this.hasPreviousPage())return;const t=this.pageIndex;this.pageIndex=0,this._emitPageEvent(t)}lastPage(){if(!this.hasNextPage())return;const t=this.pageIndex;this.pageIndex=this.getNumberOfPages()-1,this._emitPageEvent(t)}hasPreviousPage(){return this.pageIndex>=1&&0!=this.pageSize}hasNextPage(){const t=this.getNumberOfPages()-1;return this.pageIndex<t&&0!=this.pageSize}getNumberOfPages(){return this.pageSize?Math.ceil(this.length/this.pageSize):0}_changePageSize(t){const e=this.pageIndex;this.pageIndex=Math.floor(this.pageIndex*this.pageSize/t)||0,this.pageSize=t,this._emitPageEvent(e)}_nextButtonsDisabled(){return this.disabled||!this.hasNextPage()}_previousButtonsDisabled(){return this.disabled||!this.hasPreviousPage()}_updateDisplayedPageSizeOptions(){this._initialized&&(this.pageSize||(this._pageSize=0!=this.pageSizeOptions.length?this.pageSizeOptions[0]:50),this._displayedPageSizeOptions=this.pageSizeOptions.slice(),-1===this._displayedPageSizeOptions.indexOf(this.pageSize)&&this._displayedPageSizeOptions.push(this.pageSize),this._displayedPageSizeOptions.sort((t,e)=>t-e),this._changeDetectorRef.markForCheck())}_emitPageEvent(t){this.page.emit({previousPageIndex:t,pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(mA),r.Pb(r.h),r.Pb(void 0))},t.\u0275dir=r.Kb({type:t,inputs:{pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",color:"color"},outputs:{page:"page"},features:[r.Ab]}),t})(),yA=(()=>{class t extends _A{constructor(t,e,i){super(t,e,i),i&&null!=i.formFieldAppearance&&(this._formFieldAppearance=i.formFieldAppearance)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(mA),r.Pb(r.h),r.Pb(AA,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-paginator"]],hostAttrs:[1,"mat-paginator"],inputs:{disabled:"disabled"},exportAs:["matPaginator"],features:[r.Ab],decls:14,vars:14,consts:[[1,"mat-paginator-outer-container"],[1,"mat-paginator-container"],["class","mat-paginator-page-size",4,"ngIf"],[1,"mat-paginator-range-actions"],[1,"mat-paginator-range-label"],["mat-icon-button","","type","button","class","mat-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click",4,"ngIf"],["mat-icon-button","","type","button",1,"mat-paginator-navigation-previous",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["viewBox","0 0 24 24","focusable","false",1,"mat-paginator-icon"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],["mat-icon-button","","type","button",1,"mat-paginator-navigation-next",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],["mat-icon-button","","type","button","class","mat-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click",4,"ngIf"],[1,"mat-paginator-page-size"],[1,"mat-paginator-page-size-label"],["class","mat-paginator-page-size-select",3,"appearance","color",4,"ngIf"],["class","mat-paginator-page-size-value",4,"ngIf"],[1,"mat-paginator-page-size-select",3,"appearance","color"],[3,"value","disabled","aria-label","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"mat-paginator-page-size-value"],["mat-icon-button","","type","button",1,"mat-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"],["mat-icon-button","","type","button",1,"mat-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Ic(2,dA,5,3,"div",2),r.Vb(3,"div",3),r.Vb(4,"div",4),r.Kc(5),r.Ub(),r.Ic(6,pA,3,5,"button",5),r.Vb(7,"button",6),r.cc("click",function(){return e.previousPage()}),r.fc(),r.Vb(8,"svg",7),r.Qb(9,"path",8),r.Ub(),r.Ub(),r.ec(),r.Vb(10,"button",9),r.cc("click",function(){return e.nextPage()}),r.fc(),r.Vb(11,"svg",7),r.Qb(12,"path",10),r.Ub(),r.Ub(),r.Ic(13,fA,3,5,"button",11),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(2),r.nc("ngIf",!e.hidePageSize),r.Db(3),r.Mc(" ",e._intl.getRangeLabel(e.pageIndex,e.pageSize,e.length)," "),r.Db(1),r.nc("ngIf",e.showFirstLastButtons),r.Db(1),r.nc("matTooltip",e._intl.previousPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),r.Eb("aria-label",e._intl.previousPageLabel),r.Db(3),r.nc("matTooltip",e._intl.nextPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),r.Eb("aria-label",e._intl.nextPageLabel),r.Db(3),r.nc("ngIf",e.showFirstLastButtons))},directives:[ut,Dl,oA,_u,Vg,ct,bl],styles:[".mat-paginator{display:block}.mat-paginator-outer-container{display:flex}.mat-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap-reverse;width:100%}.mat-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-paginator-page-size{margin-right:0;margin-left:8px}.mat-paginator-page-size-label{margin:0 4px}.mat-paginator-page-size-select{margin:6px 4px 0 4px;width:56px}.mat-paginator-page-size-select.mat-form-field-appearance-outline{width:64px}.mat-paginator-page-size-select.mat-form-field-appearance-fill{width:64px}.mat-paginator-range-label{margin:0 32px 0 24px}.mat-paginator-range-actions{display:flex;align-items:center}.mat-paginator-icon{width:28px;fill:currentColor}[dir=rtl] .mat-paginator-icon{transform:rotate(180deg)}\n"],encapsulation:2,changeDetection:0}),t})(),wA=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[gA],imports:[[Et,Pl,Lg,lA,Sa]]}),t})();function xA(t){return(xA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function CA(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function SA(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function kA(t,e,i){return e&&SA(t.prototype,e),i&&SA(t,i),t}function EA(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&IA(t,e)}function DA(t){return(DA=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function IA(t,e){return(IA=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function PA(t,e){if(null==t)return{};var i,n,r=function(t,e){if(null==t)return{};var i,n,r={},s=Object.keys(t);for(n=0;n<s.length;n++)e.indexOf(i=s[n])>=0||(r[i]=t[i]);return r}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)e.indexOf(i=s[n])>=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(r[i]=t[i])}return r}function OA(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function MA(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var i,n=DA(t);if(e){var r=DA(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return OA(this,i)}}function TA(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=DA(t)););return t}function RA(t,e,i){return(RA="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,i){var n=TA(t,e);if(n){var r=Object.getOwnPropertyDescriptor(n,e);return r.get?r.get.call(i):r.value}})(t,e,i||t)}function VA(t,e,i,n){return(VA="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function(t,e,i,n){var r,s=TA(t,e);if(s){if((r=Object.getOwnPropertyDescriptor(s,e)).set)return r.set.call(n,i),!0;if(!r.writable)return!1}if(r=Object.getOwnPropertyDescriptor(n,e)){if(!r.writable)return!1;r.value=i,Object.defineProperty(n,e,r)}else!function(t,e,i){e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i}(n,e,i);return!0})(t,e,i,n)}function FA(t,e,i,n,r){if(!VA(t,e,i,n||t)&&r)throw new Error("failed to set property");return i}function LA(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var i=[],n=!0,r=!1,s=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done)&&(i.push(o.value),!e||i.length!==e);n=!0);}catch(l){r=!0,s=l}finally{try{n||null==a.return||a.return()}finally{if(r)throw s}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return UA(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?UA(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function UA(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function BA(t){return"string"==typeof t||t instanceof String}function NA(t){switch(t){case"LEFT":return"FORCE_LEFT";case"RIGHT":return"FORCE_RIGHT";default:return t}}function jA(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function zA(t,e){if(e===t)return!0;var i,n=Array.isArray(e),r=Array.isArray(t);if(n&&r){if(e.length!=t.length)return!1;for(i=0;i<e.length;i++)if(!zA(e[i],t[i]))return!1;return!0}if(n!=r)return!1;if(e&&t&&"object"===xA(e)&&"object"===xA(t)){var s=e instanceof Date,o=t instanceof Date;if(s&&o)return e.getTime()==t.getTime();if(s!=o)return!1;var a=e instanceof RegExp,l=t instanceof RegExp;if(a&&l)return e.toString()==t.toString();if(a!=l)return!1;var c=Object.keys(e);for(i=0;i<c.length;i++)if(!Object.prototype.hasOwnProperty.call(t,c[i]))return!1;for(i=0;i<c.length;i++)if(!zA(t[c[i]],e[c[i]]))return!1;return!0}return!(!e||!t||"function"!=typeof e||"function"!=typeof t)&&e.toString()===t.toString()}var HA=function(){function t(e,i,n,r){for(CA(this,t),this.value=e,this.cursorPos=i,this.oldValue=n,this.oldSelection=r;this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start}return kA(t,[{key:"startChangePos",get:function(){return Math.min(this.cursorPos,this.oldSelection.start)}},{key:"insertedCount",get:function(){return this.cursorPos-this.startChangePos}},{key:"inserted",get:function(){return this.value.substr(this.startChangePos,this.insertedCount)}},{key:"removedCount",get:function(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}},{key:"removed",get:function(){return this.oldValue.substr(this.startChangePos,this.removedCount)}},{key:"head",get:function(){return this.value.substring(0,this.startChangePos)}},{key:"tail",get:function(){return this.value.substring(this.startChangePos+this.insertedCount)}},{key:"removeDirection",get:function(){return!this.removedCount||this.insertedCount?"NONE":this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos?"RIGHT":"LEFT"}}]),t}(),KA=function(){function t(e){CA(this,t),Object.assign(this,{inserted:"",rawInserted:"",skip:!1,tailShift:0},e)}return kA(t,[{key:"aggregate",value:function(t){return this.rawInserted+=t.rawInserted,this.skip=this.skip||t.skip,this.inserted+=t.inserted,this.tailShift+=t.tailShift,this}},{key:"offset",get:function(){return this.tailShift+this.inserted.length}}]),t}(),$A=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;CA(this,t),this.value=e,this.from=i,this.stop=n}return kA(t,[{key:"toString",value:function(){return this.value}},{key:"extend",value:function(t){this.value+=String(t)}},{key:"appendTo",value:function(t){return t.append(this.toString(),{tail:!0}).aggregate(t._appendPlaceholder())}},{key:"state",get:function(){return{value:this.value,from:this.from,stop:this.stop}},set:function(t){Object.assign(this,t)}},{key:"shiftBefore",value:function(t){if(this.from>=t||!this.value.length)return"";var e=this.value[0];return this.value=this.value.slice(1),e}}]),t}(),GA=function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new t.InputMask(e,i)},WA=function(){function t(e){CA(this,t),this._value="",this._update(Object.assign({},t.DEFAULTS,e)),this.isInitialized=!0}return kA(t,[{key:"updateOptions",value:function(t){Object.keys(t).length&&this.withValueRefresh(this._update.bind(this,t))}},{key:"_update",value:function(t){Object.assign(this,t)}},{key:"state",get:function(){return{_value:this.value}},set:function(t){this._value=t._value}},{key:"reset",value:function(){this._value=""}},{key:"value",get:function(){return this._value},set:function(t){this.resolve(t)}},{key:"resolve",value:function(t){return this.reset(),this.append(t,{input:!0},""),this.doCommit(),this.value}},{key:"unmaskedValue",get:function(){return this.value},set:function(t){this.reset(),this.append(t,{},""),this.doCommit()}},{key:"typedValue",get:function(){return this.doParse(this.value)},set:function(t){this.value=this.doFormat(t)}},{key:"rawInputValue",get:function(){return this.extractInput(0,this.value.length,{raw:!0})},set:function(t){this.reset(),this.append(t,{raw:!0},""),this.doCommit()}},{key:"isComplete",get:function(){return!0}},{key:"nearestInputPos",value:function(t,e){return t}},{key:"extractInput",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return this.value.slice(t,e)}},{key:"extractTail",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return new $A(this.extractInput(t,e),t)}},{key:"appendTail",value:function(t){return BA(t)&&(t=new $A(String(t))),t.appendTo(this)}},{key:"_appendCharRaw",value:function(t){return t?(this._value+=t,new KA({inserted:t,rawInserted:t})):new KA}},{key:"_appendChar",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,n=this.state,r=this._appendCharRaw(this.doPrepare(t,e),e);if(r.inserted){var s,o=!1!==this.doValidate(e);if(o&&null!=i){var a=this.state;this.overwrite&&(s=i.state,i.shiftBefore(this.value.length));var l=this.appendTail(i);(o=l.rawInserted===i.toString())&&l.inserted&&(this.state=a)}o||(r=new KA,this.state=n,i&&s&&(i.state=s))}return r}},{key:"_appendPlaceholder",value:function(){return new KA}},{key:"append",value:function(t,e,i){if(!BA(t))throw new Error("value should be string");var n=new KA,r=BA(i)?new $A(String(i)):i;e&&e.tail&&(e._beforeTailState=this.state);for(var s=0;s<t.length;++s)n.aggregate(this._appendChar(t[s],e,r));return null!=r&&(n.tailShift+=this.appendTail(r).tailShift),n}},{key:"remove",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return this._value=this.value.slice(0,t)+this.value.slice(e),new KA}},{key:"withValueRefresh",value:function(t){if(this._refreshing||!this.isInitialized)return t();this._refreshing=!0;var e=this.rawInputValue,i=this.value,n=t();return this.rawInputValue=e,this.value&&this.value!==i&&0===i.indexOf(this.value)&&this.append(i.slice(this.value.length),{},""),delete this._refreshing,n}},{key:"runIsolated",value:function(t){if(this._isolated||!this.isInitialized)return t(this);this._isolated=!0;var e=this.state,i=t(this);return this.state=e,delete this._isolated,i}},{key:"doPrepare",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.prepare?this.prepare(t,this,e):t}},{key:"doValidate",value:function(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}},{key:"doCommit",value:function(){this.commit&&this.commit(this.value,this)}},{key:"doFormat",value:function(t){return this.format?this.format(t,this):t}},{key:"doParse",value:function(t){return this.parse?this.parse(t,this):t}},{key:"splice",value:function(t,e,i,n){var r=this.extractTail(t+e),s=this.nearestInputPos(t,n);return new KA({tailShift:s-t}).aggregate(this.remove(s)).aggregate(this.append(i,{input:!0},r))}}]),t}();WA.DEFAULTS={format:function(t){return t},parse:function(t){return t}},GA.Masked=WA;var ZA=WA;function qA(t){if(null==t)throw new Error("mask property should be defined");return t instanceof RegExp?GA.MaskedRegExp:BA(t)?GA.MaskedPattern:t instanceof Date||t===Date?GA.MaskedDate:t instanceof Number||"number"==typeof t||t===Number?GA.MaskedNumber:Array.isArray(t)||t===Array?GA.MaskedDynamic:GA.Masked&&t.prototype instanceof GA.Masked?t:t instanceof Function?GA.MaskedFunction:t instanceof GA.Masked?t.constructor:(console.warn("Mask not found for mask",t),GA.Masked)}function YA(t){if(GA.Masked&&t instanceof GA.Masked)return t;var e=(t=Object.assign({},t)).mask;if(GA.Masked&&e instanceof GA.Masked)return e;var i=qA(e);if(!i)throw new Error("Masked class is not found for provided mask, appropriate module needs to be import manually before creating mask.");return new i(t)}GA.createMask=YA;var QA=YA,XA={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./},JA=function(){function t(e){CA(this,t);var i=e.mask,n=PA(e,["mask"]);this.masked=QA({mask:i}),Object.assign(this,n)}return kA(t,[{key:"reset",value:function(){this._isFilled=!1,this.masked.reset()}},{key:"remove",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return 0===t&&e>=1?(this._isFilled=!1,this.masked.remove(t,e)):new KA}},{key:"value",get:function(){return this.masked.value||(this._isFilled&&!this.isOptional?this.placeholderChar:"")}},{key:"unmaskedValue",get:function(){return this.masked.unmaskedValue}},{key:"isComplete",get:function(){return Boolean(this.masked.value)||this.isOptional}},{key:"_appendChar",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._isFilled)return new KA;var i=this.masked.state,n=this.masked._appendChar(t,e);return n.inserted&&!1===this.doValidate(e)&&(n.inserted=n.rawInserted="",this.masked.state=i),n.inserted||this.isOptional||this.lazy||e.input||(n.inserted=this.placeholderChar),n.skip=!n.inserted&&!this.isOptional,this._isFilled=Boolean(n.inserted),n}},{key:"append",value:function(){var t;return(t=this.masked).append.apply(t,arguments)}},{key:"_appendPlaceholder",value:function(){var t=new KA;return this._isFilled||this.isOptional||(this._isFilled=!0,t.inserted=this.placeholderChar),t}},{key:"extractTail",value:function(){var t;return(t=this.masked).extractTail.apply(t,arguments)}},{key:"appendTail",value:function(){var t;return(t=this.masked).appendTail.apply(t,arguments)}},{key:"extractInput",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,i=arguments.length>2?arguments[2]:void 0;return this.masked.extractInput(t,e,i)}},{key:"nearestInputPos",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"NONE",i=0,n=this.value.length,r=Math.min(Math.max(t,i),n);switch(e){case"LEFT":case"FORCE_LEFT":return this.isComplete?r:i;case"RIGHT":case"FORCE_RIGHT":return this.isComplete?r:n;case"NONE":default:return r}}},{key:"doValidate",value:function(){var t,e;return(t=this.masked).doValidate.apply(t,arguments)&&(!this.parent||(e=this.parent).doValidate.apply(e,arguments))}},{key:"doCommit",value:function(){this.masked.doCommit()}},{key:"state",get:function(){return{masked:this.masked.state,_isFilled:this._isFilled}},set:function(t){this.masked.state=t.masked,this._isFilled=t._isFilled}}]),t}(),tb=function(){function t(e){CA(this,t),Object.assign(this,e),this._value=""}return kA(t,[{key:"value",get:function(){return this._value}},{key:"unmaskedValue",get:function(){return this.isUnmasking?this.value:""}},{key:"reset",value:function(){this._isRawInput=!1,this._value=""}},{key:"remove",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._value.length;return this._value=this._value.slice(0,t)+this._value.slice(e),this._value||(this._isRawInput=!1),new KA}},{key:"nearestInputPos",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"NONE",i=0,n=this._value.length;switch(e){case"LEFT":case"FORCE_LEFT":return i;case"NONE":case"RIGHT":case"FORCE_RIGHT":default:return n}}},{key:"extractInput",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._value.length,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return i.raw&&this._isRawInput&&this._value.slice(t,e)||""}},{key:"isComplete",get:function(){return!0}},{key:"_appendChar",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=new KA;if(this._value)return i;var n=this.char===t[0],r=n&&(this.isUnmasking||e.input||e.raw)&&!e.tail;return r&&(i.rawInserted=this.char),this._value=i.inserted=this.char,this._isRawInput=r&&(e.raw||e.input),i}},{key:"_appendPlaceholder",value:function(){var t=new KA;return this._value||(this._value=t.inserted=this.char),t}},{key:"extractTail",value:function(){return new $A("")}},{key:"appendTail",value:function(t){return BA(t)&&(t=new $A(String(t))),t.appendTo(this)}},{key:"append",value:function(t,e,i){var n=this._appendChar(t,e);return null!=i&&(n.tailShift+=this.appendTail(i).tailShift),n}},{key:"doCommit",value:function(){}},{key:"state",get:function(){return{_value:this._value,_isRawInput:this._isRawInput}},set:function(t){Object.assign(this,t)}}]),t}(),eb=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;CA(this,t),this.chunks=e,this.from=i}return kA(t,[{key:"toString",value:function(){return this.chunks.map(String).join("")}},{key:"extend",value:function(e){if(String(e)){BA(e)&&(e=new $A(String(e)));var i=this.chunks[this.chunks.length-1],n=i&&(i.stop===e.stop||null==e.stop)&&e.from===i.from+i.toString().length;if(e instanceof $A)n?i.extend(e.toString()):this.chunks.push(e);else if(e instanceof t){if(null==e.stop)for(var r;e.chunks.length&&null==e.chunks[0].stop;)(r=e.chunks.shift()).from+=e.from,this.extend(r);e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}}},{key:"appendTo",value:function(e){if(!(e instanceof GA.MaskedPattern))return new $A(this.toString()).appendTo(e);for(var i=new KA,n=0;n<this.chunks.length&&!i.skip;++n){var r=this.chunks[n],s=e._mapPosToBlock(e.value.length),o=r.stop,a=void 0;if(null!=o&&(!s||s.index<=o)&&((r instanceof t||e._stops.indexOf(o)>=0)&&i.aggregate(e._appendPlaceholder(o)),a=r instanceof t&&e._blocks[o]),a){var l=a.appendTail(r);l.skip=!1,i.aggregate(l),e._value+=l.inserted;var c=r.toString().slice(l.rawInserted.length);c&&i.aggregate(e.append(c,{tail:!0}))}else i.aggregate(e.append(r.toString(),{tail:!0}))}return i}},{key:"state",get:function(){return{chunks:this.chunks.map(function(t){return t.state}),from:this.from,stop:this.stop,blockIndex:this.blockIndex}},set:function(e){var i=e.chunks,n=PA(e,["chunks"]);Object.assign(this,n),this.chunks=i.map(function(e){var i="chunks"in e?new t:new $A;return i.state=e,i})}},{key:"shiftBefore",value:function(t){if(this.from>=t||!this.chunks.length)return"";for(var e=t-this.from,i=0;i<this.chunks.length;){var n=this.chunks[i],r=n.shiftBefore(e);if(n.toString()){if(!r)break;++i}else this.chunks.splice(i,1);if(r)return r}return""}}]),t}();GA.MaskedRegExp=function(t){EA(i,t);var e=MA(i);function i(){return CA(this,i),e.apply(this,arguments)}return kA(i,[{key:"_update",value:function(t){t.mask&&(t.validate=function(e){return e.search(t.mask)>=0}),RA(DA(i.prototype),"_update",this).call(this,t)}}]),i}(ZA);var ib=function(t){EA(i,t);var e=MA(i);function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return CA(this,i),t.definitions=Object.assign({},XA,t.definitions),e.call(this,Object.assign({},i.DEFAULTS,t))}return kA(i,[{key:"_update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.definitions=Object.assign({},this.definitions,t.definitions),RA(DA(i.prototype),"_update",this).call(this,t),this._rebuildMask()}},{key:"_rebuildMask",value:function(){var t=this,e=this.definitions;this._blocks=[],this._stops=[],this._maskedBlocks={};var n=this.mask;if(n&&e)for(var r=!1,s=!1,o=0;o<n.length;++o)if(!this.blocks||"continue"!==function(){var e=n.slice(o),i=Object.keys(t.blocks).filter(function(t){return 0===e.indexOf(t)});i.sort(function(t,e){return e.length-t.length});var r=i[0];if(r){var s=QA(Object.assign({parent:t,lazy:t.lazy,placeholderChar:t.placeholderChar,overwrite:t.overwrite},t.blocks[r]));return s&&(t._blocks.push(s),t._maskedBlocks[r]||(t._maskedBlocks[r]=[]),t._maskedBlocks[r].push(t._blocks.length-1)),o+=r.length-1,"continue"}}()){var a=n[o],l=a in e;if(a!==i.STOP_CHAR)if("{"!==a&&"}"!==a)if("["!==a&&"]"!==a){if(a===i.ESCAPE_CHAR){if(++o,!(a=n[o]))break;l=!1}var c=l?new JA({parent:this,lazy:this.lazy,placeholderChar:this.placeholderChar,mask:e[a],isOptional:s}):new tb({char:a,isUnmasking:r});this._blocks.push(c)}else s=!s;else r=!r;else this._stops.push(this._blocks.length)}}},{key:"state",get:function(){return Object.assign({},RA(DA(i.prototype),"state",this),{_blocks:this._blocks.map(function(t){return t.state})})},set:function(t){var e=t._blocks,n=PA(t,["_blocks"]);this._blocks.forEach(function(t,i){return t.state=e[i]}),FA(DA(i.prototype),"state",n,this,!0)}},{key:"reset",value:function(){RA(DA(i.prototype),"reset",this).call(this),this._blocks.forEach(function(t){return t.reset()})}},{key:"isComplete",get:function(){return this._blocks.every(function(t){return t.isComplete})}},{key:"doCommit",value:function(){this._blocks.forEach(function(t){return t.doCommit()}),RA(DA(i.prototype),"doCommit",this).call(this)}},{key:"unmaskedValue",get:function(){return this._blocks.reduce(function(t,e){return t+e.unmaskedValue},"")},set:function(t){FA(DA(i.prototype),"unmaskedValue",t,this,!0)}},{key:"value",get:function(){return this._blocks.reduce(function(t,e){return t+e.value},"")},set:function(t){FA(DA(i.prototype),"value",t,this,!0)}},{key:"appendTail",value:function(t){return RA(DA(i.prototype),"appendTail",this).call(this,t).aggregate(this._appendPlaceholder())}},{key:"_appendCharRaw",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this._mapPosToBlock(this.value.length),n=new KA;if(!i)return n;for(var r=i.index;;++r){var s=this._blocks[r];if(!s)break;var o=s._appendChar(t,e),a=o.skip;if(n.aggregate(o),a||o.rawInserted)break}return n}},{key:"extractTail",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,n=new eb;return e===i||this._forEachBlocksInRange(e,i,function(e,i,r,s){var o=e.extractTail(r,s);o.stop=t._findStopBefore(i),o.from=t._blockStartPos(i),o instanceof eb&&(o.blockIndex=i),n.extend(o)}),n}},{key:"extractInput",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t===e)return"";var n="";return this._forEachBlocksInRange(t,e,function(t,e,r,s){n+=t.extractInput(r,s,i)}),n}},{key:"_findStopBefore",value:function(t){for(var e,i=0;i<this._stops.length;++i){var n=this._stops[i];if(!(n<=t))break;e=n}return e}},{key:"_appendPlaceholder",value:function(t){var e=this,i=new KA;if(this.lazy&&null==t)return i;var n=this._mapPosToBlock(this.value.length);return n?(this._blocks.slice(n.index,null!=t?t:this._blocks.length).forEach(function(n){if(!n.lazy||null!=t){var r=n._appendPlaceholder.apply(n,null!=n._blocks?[n._blocks.length]:[]);e._value+=r.inserted,i.aggregate(r)}}),i):i}},{key:"_mapPosToBlock",value:function(t){for(var e="",i=0;i<this._blocks.length;++i){var n=e.length;if(t<=(e+=this._blocks[i].value).length)return{index:i,offset:t-n}}}},{key:"_blockStartPos",value:function(t){return this._blocks.slice(0,t).reduce(function(t,e){return t+e.value.length},0)}},{key:"_forEachBlocksInRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,i=arguments.length>2?arguments[2]:void 0,n=this._mapPosToBlock(t);if(n){var r=this._mapPosToBlock(e),s=r&&n.index===r.index,o=n.offset,a=r&&s?r.offset:this._blocks[n.index].value.length;if(i(this._blocks[n.index],n.index,o,a),r&&!s){for(var l=n.index+1;l<r.index;++l)i(this._blocks[l],l,0,this._blocks[l].value.length);i(this._blocks[r.index],r.index,0,r.offset)}}}},{key:"remove",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,n=RA(DA(i.prototype),"remove",this).call(this,t,e);return this._forEachBlocksInRange(t,e,function(t,e,i,r){n.aggregate(t.remove(i,r))}),n}},{key:"nearestInputPos",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"NONE",i=this._mapPosToBlock(t)||{index:0,offset:0},n=i.offset,r=i.index,s=this._blocks[r];if(!s)return t;var o=n;0!==o&&o<s.value.length&&(o=s.nearestInputPos(n,NA(e)));var a=o===s.value.length,l=0===o;if(!l&&!a)return this._blockStartPos(r)+o;var c=a?r+1:r;if("NONE"===e){if(c>0){var h=c-1,u=this._blocks[h],d=u.nearestInputPos(0,"NONE");if(!u.value.length||d!==u.value.length)return this._blockStartPos(c)}for(var p=c,f=p;f<this._blocks.length;++f){var m=this._blocks[f],g=m.nearestInputPos(0,"NONE");if(!m.value.length||g!==m.value.length)return this._blockStartPos(f)+g}for(var A=c-1;A>=0;--A){var b=this._blocks[A],v=b.nearestInputPos(0,"NONE");if(!b.value.length||v!==b.value.length)return this._blockStartPos(A)+b.value.length}return t}if("LEFT"===e||"FORCE_LEFT"===e){for(var _,y=c;y<this._blocks.length;++y)if(this._blocks[y].value){_=y;break}if(null!=_){var w=this._blocks[_],x=w.nearestInputPos(0,"RIGHT");if(0===x&&w.unmaskedValue.length)return this._blockStartPos(_)+x}for(var C,S=-1,k=c-1;k>=0;--k){var E=this._blocks[k],D=E.nearestInputPos(E.value.length,"FORCE_LEFT");if(E.value&&0===D||(C=k),0!==D){if(D!==E.value.length)return this._blockStartPos(k)+D;S=k;break}}if("LEFT"===e)for(var I=S+1;I<=Math.min(c,this._blocks.length-1);++I){var P=this._blocks[I],O=P.nearestInputPos(0,"NONE"),M=this._blockStartPos(I)+O;if(M>t)break;if(O!==P.value.length)return M}if(S>=0)return this._blockStartPos(S)+this._blocks[S].value.length;if("FORCE_LEFT"===e||this.lazy&&!this.extractInput()&&!nb(this._blocks[c]))return 0;if(null!=C)return this._blockStartPos(C);for(var T=c;T<this._blocks.length;++T){var R=this._blocks[T],V=R.nearestInputPos(0,"NONE");if(!R.value.length||V!==R.value.length)return this._blockStartPos(T)+V}return 0}if("RIGHT"===e||"FORCE_RIGHT"===e){for(var F,L,U=c;U<this._blocks.length;++U){var B=this._blocks[U],N=B.nearestInputPos(0,"NONE");if(N!==B.value.length){L=this._blockStartPos(U)+N,F=U;break}}if(null!=F&&null!=L){for(var j=F;j<this._blocks.length;++j){var z=this._blocks[j],H=z.nearestInputPos(0,"FORCE_RIGHT");if(H!==z.value.length)return this._blockStartPos(j)+H}return"FORCE_RIGHT"===e?this.value.length:L}for(var K=Math.min(c,this._blocks.length-1);K>=0;--K){var $=this._blocks[K],G=$.nearestInputPos($.value.length,"LEFT");if(0!==G){var W=this._blockStartPos(K)+G;if(W>=t)return W;break}}}return t}},{key:"maskedBlock",value:function(t){return this.maskedBlocks(t)[0]}},{key:"maskedBlocks",value:function(t){var e=this,i=this._maskedBlocks[t];return i?i.map(function(t){return e._blocks[t]}):[]}}]),i}(ZA);function nb(t){if(!t)return!1;var e=t.value;return!e||t.nearestInputPos(0,"NONE")!==e.length}ib.DEFAULTS={lazy:!0,placeholderChar:"_"},ib.STOP_CHAR="`",ib.ESCAPE_CHAR="\\",ib.InputDefinition=JA,ib.FixedDefinition=tb,GA.MaskedPattern=ib;var rb=ib,sb=function(t){EA(i,t);var e=MA(i);function i(){return CA(this,i),e.apply(this,arguments)}return kA(i,[{key:"_matchFrom",get:function(){return this.maxLength-String(this.from).length}},{key:"_update",value:function(t){t=Object.assign({to:this.to||0,from:this.from||0},t);var e=String(t.to).length;null!=t.maxLength&&(e=Math.max(e,t.maxLength)),t.maxLength=e;for(var n=String(t.from).padStart(e,"0"),r=String(t.to).padStart(e,"0"),s=0;s<r.length&&r[s]===n[s];)++s;t.mask=r.slice(0,s).replace(/0/g,"\\0")+"0".repeat(e-s),RA(DA(i.prototype),"_update",this).call(this,t)}},{key:"isComplete",get:function(){return RA(DA(i.prototype),"isComplete",this)&&Boolean(this.value)}},{key:"boundaries",value:function(t){var e="",i="",n=LA(t.match(/^(\D*)(\d*)(\D*)/)||[],3),r=n[1],s=n[2];return s&&(e="0".repeat(r.length)+s,i="9".repeat(r.length)+s),[e=e.padEnd(this.maxLength,"0"),i=i.padEnd(this.maxLength,"9")]}},{key:"doPrepare",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t=RA(DA(i.prototype),"doPrepare",this).call(this,t,e).replace(/\D/g,""),!this.autofix)return t;for(var n=String(this.from).padStart(this.maxLength,"0"),r=String(this.to).padStart(this.maxLength,"0"),s=this.value,o="",a=0;a<t.length;++a){var l=s+o+t[a],c=this.boundaries(l),h=LA(c,2),u=h[0],d=h[1];Number(d)<this.from?o+=n[l.length-1]:Number(u)>this.to?o+=r[l.length-1]:o+=t[a]}return o}},{key:"doValidate",value:function(){var t,e=this.value,n=e.search(/[^0]/);if(-1===n&&e.length<=this._matchFrom)return!0;for(var r=this.boundaries(e),s=LA(r,2),o=s[0],a=s[1],l=arguments.length,c=new Array(l),h=0;h<l;h++)c[h]=arguments[h];return this.from<=Number(a)&&Number(o)<=this.to&&(t=RA(DA(i.prototype),"doValidate",this)).call.apply(t,[this].concat(c))}}]),i}(rb);GA.MaskedRange=sb;var ob=sb,ab=function(t){EA(i,t);var e=MA(i);function i(t){return CA(this,i),e.call(this,Object.assign({},i.DEFAULTS,t))}return kA(i,[{key:"_update",value:function(t){t.mask===Date&&delete t.mask,t.pattern&&(t.mask=t.pattern);var e=t.blocks;t.blocks=Object.assign({},i.GET_DEFAULT_BLOCKS()),t.min&&(t.blocks.Y.from=t.min.getFullYear()),t.max&&(t.blocks.Y.to=t.max.getFullYear()),t.min&&t.max&&t.blocks.Y.from===t.blocks.Y.to&&(t.blocks.m.from=t.min.getMonth()+1,t.blocks.m.to=t.max.getMonth()+1,t.blocks.m.from===t.blocks.m.to&&(t.blocks.d.from=t.min.getDate(),t.blocks.d.to=t.max.getDate())),Object.assign(t.blocks,e),Object.keys(t.blocks).forEach(function(e){var i=t.blocks[e];"autofix"in i||(i.autofix=t.autofix)}),RA(DA(i.prototype),"_update",this).call(this,t)}},{key:"doValidate",value:function(){for(var t,e=this.date,n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return(t=RA(DA(i.prototype),"doValidate",this)).call.apply(t,[this].concat(r))&&(!this.isComplete||this.isDateExist(this.value)&&null!=e&&(null==this.min||this.min<=e)&&(null==this.max||e<=this.max))}},{key:"isDateExist",value:function(t){return this.format(this.parse(t,this),this).indexOf(t)>=0}},{key:"date",get:function(){return this.typedValue},set:function(t){this.typedValue=t}},{key:"typedValue",get:function(){return this.isComplete?RA(DA(i.prototype),"typedValue",this):null},set:function(t){FA(DA(i.prototype),"typedValue",t,this,!0)}}]),i}(rb);ab.DEFAULTS={pattern:"d{.}`m{.}`Y",format:function(t){return[String(t.getDate()).padStart(2,"0"),String(t.getMonth()+1).padStart(2,"0"),t.getFullYear()].join(".")},parse:function(t){var e=LA(t.split("."),3);return new Date(e[2],e[1]-1,e[0])}},ab.GET_DEFAULT_BLOCKS=function(){return{d:{mask:ob,from:1,to:31,maxLength:2},m:{mask:ob,from:1,to:12,maxLength:2},Y:{mask:ob,from:1900,to:9999}}},GA.MaskedDate=ab;var lb=ab,cb=function(){function t(){CA(this,t)}return kA(t,[{key:"selectionStart",get:function(){var t;try{t=this._unsafeSelectionStart}catch(e){}return null!=t?t:this.value.length}},{key:"selectionEnd",get:function(){var t;try{t=this._unsafeSelectionEnd}catch(e){}return null!=t?t:this.value.length}},{key:"select",value:function(t,e){if(null!=t&&null!=e&&(t!==this.selectionStart||e!==this.selectionEnd))try{this._unsafeSelect(t,e)}catch(i){}}},{key:"_unsafeSelect",value:function(t,e){}},{key:"isActive",get:function(){return!1}},{key:"bindEvents",value:function(t){}},{key:"unbindEvents",value:function(){}}]),t}();GA.MaskElement=cb;var hb=cb,ub=function(t){EA(i,t);var e=MA(i);function i(t){var n;return CA(this,i),(n=e.call(this)).input=t,n._handlers={},n}return kA(i,[{key:"rootElement",get:function(){return this.input.getRootNode?this.input.getRootNode():document}},{key:"isActive",get:function(){return this.input===this.rootElement.activeElement}},{key:"_unsafeSelectionStart",get:function(){return this.input.selectionStart}},{key:"_unsafeSelectionEnd",get:function(){return this.input.selectionEnd}},{key:"_unsafeSelect",value:function(t,e){this.input.setSelectionRange(t,e)}},{key:"value",get:function(){return this.input.value},set:function(t){this.input.value=t}},{key:"bindEvents",value:function(t){var e=this;Object.keys(t).forEach(function(n){return e._toggleEventHandler(i.EVENTS_MAP[n],t[n])})}},{key:"unbindEvents",value:function(){var t=this;Object.keys(this._handlers).forEach(function(e){return t._toggleEventHandler(e)})}},{key:"_toggleEventHandler",value:function(t,e){this._handlers[t]&&(this.input.removeEventListener(t,this._handlers[t]),delete this._handlers[t]),e&&(this.input.addEventListener(t,e),this._handlers[t]=e)}}]),i}(hb);ub.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"blur"},GA.HTMLMaskElement=ub;var db=ub,pb=function(t){EA(i,t);var e=MA(i);function i(){return CA(this,i),e.apply(this,arguments)}return kA(i,[{key:"_unsafeSelectionStart",get:function(){var t=this.rootElement,e=t.getSelection&&t.getSelection();return e&&e.anchorOffset}},{key:"_unsafeSelectionEnd",get:function(){var t=this.rootElement,e=t.getSelection&&t.getSelection();return e&&this._unsafeSelectionStart+String(e).length}},{key:"_unsafeSelect",value:function(t,e){if(this.rootElement.createRange){var i=this.rootElement.createRange();i.setStart(this.input.firstChild||this.input,t),i.setEnd(this.input.lastChild||this.input,e);var n=this.rootElement,r=n.getSelection&&n.getSelection();r&&(r.removeAllRanges(),r.addRange(i))}}},{key:"value",get:function(){return this.input.textContent},set:function(t){this.input.textContent=t}}]),i}(db);GA.HTMLContenteditableMaskElement=pb;var fb=pb;GA.InputMask=function(){function t(e,i){CA(this,t),this.el=e instanceof hb?e:e.isContentEditable&&"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName?new fb(e):new db(e),this.masked=QA(i),this._listeners={},this._value="",this._unmaskedValue="",this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}return kA(t,[{key:"mask",get:function(){return this.masked.mask},set:function(t){if(!this.maskEquals(t))if(t instanceof GA.Masked||this.masked.constructor!==qA(t)){var e=QA({mask:t});e.unmaskedValue=this.masked.unmaskedValue,this.masked=e}else this.masked.updateOptions({mask:t})}},{key:"maskEquals",value:function(t){return null==t||t===this.masked.mask||t===Date&&this.masked instanceof lb}},{key:"value",get:function(){return this._value},set:function(t){this.masked.value=t,this.updateControl(),this.alignCursor()}},{key:"unmaskedValue",get:function(){return this._unmaskedValue},set:function(t){this.masked.unmaskedValue=t,this.updateControl(),this.alignCursor()}},{key:"typedValue",get:function(){return this.masked.typedValue},set:function(t){this.masked.typedValue=t,this.updateControl(),this.alignCursor()}},{key:"_bindEvents",value:function(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange})}},{key:"_unbindEvents",value:function(){this.el&&this.el.unbindEvents()}},{key:"_fireEvent",value:function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];var r=this._listeners[t];r&&r.forEach(function(t){return t.apply(void 0,i)})}},{key:"selectionStart",get:function(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}},{key:"cursorPos",get:function(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd},set:function(t){this.el&&this.el.isActive&&(this.el.select(t,t),this._saveSelection())}},{key:"_saveSelection",value:function(){this.value!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}},{key:"updateValue",value:function(){this.masked.value=this.el.value,this._value=this.masked.value}},{key:"updateControl",value:function(){var t=this.masked.unmaskedValue,e=this.masked.value,i=this.unmaskedValue!==t||this.value!==e;this._unmaskedValue=t,this._value=e,this.el.value!==e&&(this.el.value=e),i&&this._fireChangeEvents()}},{key:"updateOptions",value:function(t){var e=t.mask,i=PA(t,["mask"]),n=!this.maskEquals(e),r=!zA(this.masked,i);n&&(this.mask=e),r&&this.masked.updateOptions(i),(n||r)&&this.updateControl()}},{key:"updateCursor",value:function(t){null!=t&&(this.cursorPos=t,this._delayUpdateCursor(t))}},{key:"_delayUpdateCursor",value:function(t){var e=this;this._abortUpdateCursor(),this._changingCursorPos=t,this._cursorChanging=setTimeout(function(){e.el&&(e.cursorPos=e._changingCursorPos,e._abortUpdateCursor())},10)}},{key:"_fireChangeEvents",value:function(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}},{key:"_abortUpdateCursor",value:function(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}},{key:"alignCursor",value:function(){this.cursorPos=this.masked.nearestInputPos(this.cursorPos,"LEFT")}},{key:"alignCursorFriendly",value:function(){this.selectionStart===this.cursorPos&&this.alignCursor()}},{key:"on",value:function(t,e){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(e),this}},{key:"off",value:function(t,e){if(!this._listeners[t])return this;if(!e)return delete this._listeners[t],this;var i=this._listeners[t].indexOf(e);return i>=0&&this._listeners[t].splice(i,1),this}},{key:"_onInput",value:function(t){if(this._inputEvent=t,this._abortUpdateCursor(),!this._selection)return this.updateValue();var e=new HA(this.el.value,this.cursorPos,this.value,this._selection),i=this.masked.rawInputValue,n=this.masked.splice(e.startChangePos,e.removed.length,e.inserted,e.removeDirection).offset,r=this.masked.nearestInputPos(e.startChangePos+n,i===this.masked.rawInputValue?e.removeDirection:"NONE");this.updateControl(),this.updateCursor(r),delete this._inputEvent}},{key:"_onChange",value:function(){this.value!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}},{key:"_onDrop",value:function(t){t.preventDefault(),t.stopPropagation()}},{key:"_onFocus",value:function(t){this.alignCursorFriendly()}},{key:"_onClick",value:function(t){this.alignCursorFriendly()}},{key:"destroy",value:function(){this._unbindEvents(),this._listeners.length=0,delete this.el}}]),t}();var mb=function(t){EA(i,t);var e=MA(i);function i(){return CA(this,i),e.apply(this,arguments)}return kA(i,[{key:"_update",value:function(t){t.enum&&(t.mask="*".repeat(t.enum[0].length)),RA(DA(i.prototype),"_update",this).call(this,t)}},{key:"doValidate",value:function(){for(var t,e=this,n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return this.enum.some(function(t){return t.indexOf(e.unmaskedValue)>=0})&&(t=RA(DA(i.prototype),"doValidate",this)).call.apply(t,[this].concat(r))}}]),i}(rb);GA.MaskedEnum=mb;var gb=mb,Ab=function(t){EA(i,t);var e=MA(i);function i(t){return CA(this,i),e.call(this,Object.assign({},i.DEFAULTS,t))}return kA(i,[{key:"_update",value:function(t){RA(DA(i.prototype),"_update",this).call(this,t),this._updateRegExps()}},{key:"_updateRegExps",value:function(){var t="^"+(this.allowNegative?"[+|\\-]?":""),e=(this.scale?"("+jA(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExpInput=new RegExp(t+"(0|([1-9]+\\d*))?"+e),this._numberRegExp=new RegExp(t+"\\d*"+e),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(jA).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(jA(this.thousandsSeparator),"g")}},{key:"_removeThousandsSeparators",value:function(t){return t.replace(this._thousandsSeparatorRegExp,"")}},{key:"_insertThousandsSeparators",value:function(t){var e=t.split(this.radix);return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),e.join(this.radix)}},{key:"doPrepare",value:function(t){for(var e,n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return(e=RA(DA(i.prototype),"doPrepare",this)).call.apply(e,[this,this._removeThousandsSeparators(t.replace(this._mapToRadixRegExp,this.radix))].concat(r))}},{key:"_separatorsCount",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=0,n=0;n<t;++n)this._value.indexOf(this.thousandsSeparator,n)===n&&(++i,e&&(t+=this.thousandsSeparator.length));return i}},{key:"_separatorsCountFromSlice",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._value;return this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}},{key:"extractInput",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,n=arguments.length>2?arguments[2]:void 0,r=this._adjustRangeWithSeparators(t,e),s=LA(r,2);return t=s[0],e=s[1],this._removeThousandsSeparators(RA(DA(i.prototype),"extractInput",this).call(this,t,e,n))}},{key:"_appendCharRaw",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.thousandsSeparator)return RA(DA(i.prototype),"_appendCharRaw",this).call(this,t,e);var n=e.tail&&e._beforeTailState?e._beforeTailState._value:this._value,r=this._separatorsCountFromSlice(n);this._value=this._removeThousandsSeparators(this.value);var s=RA(DA(i.prototype),"_appendCharRaw",this).call(this,t,e);this._value=this._insertThousandsSeparators(this._value);var o=e.tail&&e._beforeTailState?e._beforeTailState._value:this._value,a=this._separatorsCountFromSlice(o);return s.tailShift+=(a-r)*this.thousandsSeparator.length,s.skip=!s.rawInserted&&t===this.thousandsSeparator,s}},{key:"_findSeparatorAround",value:function(t){if(this.thousandsSeparator){var e=this.value.indexOf(this.thousandsSeparator,t-this.thousandsSeparator.length+1);if(e<=t)return e}return-1}},{key:"_adjustRangeWithSeparators",value:function(t,e){var i=this._findSeparatorAround(t);i>=0&&(t=i);var n=this._findSeparatorAround(e);return n>=0&&(e=n+this.thousandsSeparator.length),[t,e]}},{key:"remove",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,i=this._adjustRangeWithSeparators(t,e),n=LA(i,2);e=n[1];var r=this.value.slice(0,t=n[0]),s=this.value.slice(e),o=this._separatorsCount(r.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(r+s));var a=this._separatorsCountFromSlice(r);return new KA({tailShift:(a-o)*this.thousandsSeparator.length})}},{key:"nearestInputPos",value:function(t,e){if(!this.thousandsSeparator)return t;switch(e){case"NONE":case"LEFT":case"FORCE_LEFT":var i=this._findSeparatorAround(t-1);if(i>=0){var n=i+this.thousandsSeparator.length;if(t<n||this.value.length<=n||"FORCE_LEFT"===e)return i}break;case"RIGHT":case"FORCE_RIGHT":var r=this._findSeparatorAround(t);if(r>=0)return r+this.thousandsSeparator.length}return t}},{key:"doValidate",value:function(t){var e=(t.input?this._numberRegExpInput:this._numberRegExp).test(this._removeThousandsSeparators(this.value));return e&&(e=e&&!isNaN(this.number)&&(null==this.min||this.min>=0||this.min<=this.number)&&(null==this.max||this.max<=0||this.number<=this.max)),e&&RA(DA(i.prototype),"doValidate",this).call(this,t)}},{key:"doCommit",value:function(){if(this.value){var t=this.number,e=t;null!=this.min&&(e=Math.max(e,this.min)),null!=this.max&&(e=Math.min(e,this.max)),e!==t&&(this.unmaskedValue=String(e));var n=this.value;this.normalizeZeros&&(n=this._normalizeZeros(n)),this.padFractionalZeros&&(n=this._padFractionalZeros(n)),this._value=n}RA(DA(i.prototype),"doCommit",this).call(this)}},{key:"_normalizeZeros",value:function(t){var e=this._removeThousandsSeparators(t).split(this.radix);return e[0]=e[0].replace(/^(\D*)(0*)(\d*)/,function(t,e,i,n){return e+n}),t.length&&!/\d$/.test(e[0])&&(e[0]=e[0]+"0"),e.length>1&&(e[1]=e[1].replace(/0*$/,""),e[1].length||(e.length=1)),this._insertThousandsSeparators(e.join(this.radix))}},{key:"_padFractionalZeros",value:function(t){if(!t)return t;var e=t.split(this.radix);return e.length<2&&e.push(""),e[1]=e[1].padEnd(this.scale,"0"),e.join(this.radix)}},{key:"unmaskedValue",get:function(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,".")},set:function(t){FA(DA(i.prototype),"unmaskedValue",t.replace(".",this.radix),this,!0)}},{key:"typedValue",get:function(){return Number(this.unmaskedValue)},set:function(t){FA(DA(i.prototype),"unmaskedValue",String(t),this,!0)}},{key:"number",get:function(){return this.typedValue},set:function(t){this.typedValue=t}},{key:"allowNegative",get:function(){return this.signed||null!=this.min&&this.min<0||null!=this.max&&this.max<0}}]),i}(ZA);Ab.DEFAULTS={radix:",",thousandsSeparator:"",mapToRadix:["."],scale:2,signed:!1,normalizeZeros:!0,padFractionalZeros:!1},GA.MaskedNumber=Ab,GA.MaskedFunction=function(t){EA(i,t);var e=MA(i);function i(){return CA(this,i),e.apply(this,arguments)}return kA(i,[{key:"_update",value:function(t){t.mask&&(t.validate=t.mask),RA(DA(i.prototype),"_update",this).call(this,t)}}]),i}(ZA);var bb=function(t){EA(i,t);var e=MA(i);function i(t){var n;return CA(this,i),(n=e.call(this,Object.assign({},i.DEFAULTS,t))).currentMask=null,n}return kA(i,[{key:"_update",value:function(t){RA(DA(i.prototype),"_update",this).call(this,t),"mask"in t&&(this.compiledMasks=Array.isArray(t.mask)?t.mask.map(function(t){return QA(t)}):[])}},{key:"_appendCharRaw",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this._applyDispatch(t,e);return this.currentMask&&i.aggregate(this.currentMask._appendChar(t,e)),i}},{key:"_applyDispatch",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.tail&&null!=e._beforeTailState?e._beforeTailState._value:this.value,n=this.rawInputValue,r=e.tail&&null!=e._beforeTailState?e._beforeTailState._rawInputValue:n,s=n.slice(r.length),o=this.currentMask,a=new KA,l=o&&o.state;if(this.currentMask=this.doDispatch(t,Object.assign({},e)),this.currentMask)if(this.currentMask!==o){if(this.currentMask.reset(),r){var c=this.currentMask.append(r,{raw:!0});a.tailShift=c.inserted.length-i.length}s&&(a.tailShift+=this.currentMask.append(s,{raw:!0,tail:!0}).tailShift)}else this.currentMask.state=l;return a}},{key:"_appendPlaceholder",value:function(){var t=this._applyDispatch.apply(this,arguments);return this.currentMask&&t.aggregate(this.currentMask._appendPlaceholder()),t}},{key:"doDispatch",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.dispatch(t,this,e)}},{key:"doValidate",value:function(){for(var t,e,n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return(t=RA(DA(i.prototype),"doValidate",this)).call.apply(t,[this].concat(r))&&(!this.currentMask||(e=this.currentMask).doValidate.apply(e,r))}},{key:"reset",value:function(){this.currentMask&&this.currentMask.reset(),this.compiledMasks.forEach(function(t){return t.reset()})}},{key:"value",get:function(){return this.currentMask?this.currentMask.value:""},set:function(t){FA(DA(i.prototype),"value",t,this,!0)}},{key:"unmaskedValue",get:function(){return this.currentMask?this.currentMask.unmaskedValue:""},set:function(t){FA(DA(i.prototype),"unmaskedValue",t,this,!0)}},{key:"typedValue",get:function(){return this.currentMask?this.currentMask.typedValue:""},set:function(t){var e=String(t);this.currentMask&&(this.currentMask.typedValue=t,e=this.currentMask.unmaskedValue),this.unmaskedValue=e}},{key:"isComplete",get:function(){return!!this.currentMask&&this.currentMask.isComplete}},{key:"remove",value:function(){var t,e=new KA;return this.currentMask&&e.aggregate((t=this.currentMask).remove.apply(t,arguments)).aggregate(this._applyDispatch()),e}},{key:"state",get:function(){return Object.assign({},RA(DA(i.prototype),"state",this),{_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(function(t){return t.state}),currentMaskRef:this.currentMask,currentMask:this.currentMask&&this.currentMask.state})},set:function(t){var e=t.compiledMasks,n=t.currentMaskRef,r=t.currentMask,s=PA(t,["compiledMasks","currentMaskRef","currentMask"]);this.compiledMasks.forEach(function(t,i){return t.state=e[i]}),null!=n&&(this.currentMask=n,this.currentMask.state=r),FA(DA(i.prototype),"state",s,this,!0)}},{key:"extractInput",value:function(){var t;return this.currentMask?(t=this.currentMask).extractInput.apply(t,arguments):""}},{key:"extractTail",value:function(){for(var t,e,n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return this.currentMask?(t=this.currentMask).extractTail.apply(t,r):(e=RA(DA(i.prototype),"extractTail",this)).call.apply(e,[this].concat(r))}},{key:"doCommit",value:function(){this.currentMask&&this.currentMask.doCommit(),RA(DA(i.prototype),"doCommit",this).call(this)}},{key:"nearestInputPos",value:function(){for(var t,e,n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return this.currentMask?(t=this.currentMask).nearestInputPos.apply(t,r):(e=RA(DA(i.prototype),"nearestInputPos",this)).call.apply(e,[this].concat(r))}},{key:"overwrite",get:function(){return this.currentMask?this.currentMask.overwrite:RA(DA(i.prototype),"overwrite",this)},set:function(t){console.warn('"overwrite" option is not available in dynamic mask, use this option in siblings')}}]),i}(ZA);bb.DEFAULTS={dispatch:function(t,e,i){if(e.compiledMasks.length){var n=e.rawInputValue,r=e.compiledMasks.map(function(e,r){return e.reset(),e.append(n,{raw:!0}),e.append(t,i),{weight:e.rawInputValue.length,index:r}});return r.sort(function(t,e){return e.weight-t.weight}),e.compiledMasks[r[0].index]}}},GA.MaskedDynamic=bb;var vb={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function _b(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:vb.MASKED,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:vb.MASKED,n=QA(t);return function(t){return n.runIsolated(function(n){return n[e]=t,n[i]})}}GA.PIPE_TYPE=vb,GA.createPipe=_b,GA.pipe=function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];return _b.apply(void 0,i)(t)};try{globalThis.IMask=GA}catch($nt){}let yb=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t.ngInjectableDef=Object(r.Lb)({factory:function(){return new t},token:t,providedIn:"root"}),t})();const wb={provide:rc,useExisting:Object(r.W)(()=>Cb),multi:!0},xb=t=>t.nativeElement;let Cb=(()=>{class t{constructor(t,e,i,n){this._elementRef=t,this._renderer=e,this._factory=i,this._compositionMode=n,this.onTouched=()=>{},this.onChange=()=>{},this.imaskElement=xb,this.accept=new r.o,this.complete=new r.o,this._viewInitialized=!1,this._composing=!1,this._writing=!1,null==this._compositionMode&&(this._compositionMode=!this._isAndroid())}get element(){return this.imaskElement(this._elementRef,this)}get maskValue(){return this.maskRef?"typed"===this.unmask?this.maskRef.typedValue:this.unmask?this.maskRef.unmaskedValue:this.maskRef.value:this.element.value}set maskValue(t){this.maskRef?"typed"===this.unmask?this.maskRef.typedValue=t:this.unmask?this.maskRef.unmaskedValue=t:this.maskRef.value=t:this._renderer.setProperty(this.element,"value",t)}ngAfterViewInit(){this.imask&&this.initMask(),this._viewInitialized=!0}ngOnChanges(t){t.elementRef&&!this.imaskElement&&(this.imaskElement=xb),t.imask&&this._viewInitialized&&(this.imask?this.maskRef?this.maskRef.updateOptions(this.imask):(this.initMask(),this.onChange(this.maskValue)):this.destroyMask())}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}ngOnDestroy(){this.destroyMask(),this.accept.complete(),this.complete.complete()}beginWrite(t){this._writing=!0,this._writingValue=t}endWrite(){return this._writing=!1,this._writingValue}writeValue(t){t=null==t?"":t,this.maskRef?(this.beginWrite(t),(this.maskValue!==t||"string"!=typeof t&&""===this.maskRef.value&&!this.maskRef.el.isActive)&&(this.maskValue=t)):this._renderer.setProperty(this.element,"value",t)}_onAccept(){const t=this.maskValue;this._writing&&t===this.endWrite()||(this.onChange(t),this.accept.emit(t))}_onComplete(){this.complete.emit(this.maskValue)}initMask(){this.maskRef=this._factory.create(this.element,this.imask).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this))}setDisabledState(t){this._renderer.setProperty(this.element,"disabled",t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}_handleInput(t){this.maskRef||(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this._handleInput(t)}_isAndroid(){return/android (\d+)/.test(navigator.userAgent.toLowerCase())}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.H),r.Pb(yb),r.Pb(oc,8))},t.\u0275dir=r.Kb({type:t,selectors:[["","imask",""]],hostBindings:function(t,e){1&t&&r.cc("input",function(t){return e._handleInput(t.target.value)})("blur",function(){return e.onTouched()})("compositionstart",function(){return e._compositionStart()})("compositionend",function(t){return e._compositionEnd(t.target.value)})},inputs:{imaskElement:"imaskElement",imask:"imask",unmask:"unmask"},outputs:{accept:"accept",complete:"complete"},features:[r.Cb([wb]),r.Bb]}),t})(),Sb=(()=>{class t{create(t,e){return GA(t,e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t.ngInjectableDef=Object(r.Lb)({factory:function(){return new t},token:t,providedIn:"root"}),t})(),kb=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[{provide:yb,useClass:Sb}],imports:[[Et]]}),t})(),Eb=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Et,kb],kb]}),t})();const Db=["dialogPopup"],Ib=["hueSlider"],Pb=["alphaSlider"];function Ob(t,e){if(1&t&&r.Qb(0,"div"),2&t){const t=r.gc();r.Gb("arrow arrow-",t.cpUsePosition,""),r.Fc("top",t.arrowTop,"px")}}function Mb(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",26),r.cc("newValue",function(e){return r.Ac(t),r.gc().onColorChange(e)})("dragStart",function(){return r.Ac(t),r.gc().onDragStart("saturation-lightness")})("dragEnd",function(){return r.Ac(t),r.gc().onDragEnd("saturation-lightness")}),r.Qb(1,"div",13),r.Ub()}if(2&t){const t=r.gc();r.Fc("background-color",t.hueSliderColor),r.nc("rgX",1)("rgY",1),r.Db(1),r.Fc("top",null==t.slider?null:t.slider.v,"px")("left",null==t.slider?null:t.slider.s,"px")}}function Tb(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",27),r.cc("click",function(e){r.Ac(t);const i=r.gc();return i.onAddPresetColor(e,i.selectedColor)}),r.Kc(1),r.Ub()}if(2&t){const t=r.gc();r.Fb(t.cpAddColorButtonClass),r.nc("disabled",t.cpPresetColors&&t.cpPresetColors.length>=t.cpMaxPresetColorsLength),r.Db(1),r.Mc(" ",t.cpAddColorButtonText," ")}}function Rb(t,e){1&t&&r.Qb(0,"div",28)}function Vb(t,e){if(1&t){const t=r.Wb();r.Vb(0,"input",34),r.cc("keyup.enter",function(e){return r.Ac(t),r.gc(2).onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc(2).onAlphaInput(e)}),r.Ub()}if(2&t){const t=r.gc(2);r.nc("rg",1)("value",null==t.cmykText?null:t.cmykText.a)}}function Fb(t,e){1&t&&(r.Vb(0,"div"),r.Kc(1,"A"),r.Ub())}function Lb(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",29),r.Vb(1,"div",30),r.Vb(2,"input",31),r.cc("keyup.enter",function(e){return r.Ac(t),r.gc().onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc().onCyanInput(e)}),r.Ub(),r.Vb(3,"input",31),r.cc("keyup.enter",function(e){return r.Ac(t),r.gc().onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc().onMagentaInput(e)}),r.Ub(),r.Vb(4,"input",31),r.cc("keyup.enter",function(e){return r.Ac(t),r.gc().onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc().onYellowInput(e)}),r.Ub(),r.Vb(5,"input",31),r.cc("keyup.enter",function(e){return r.Ac(t),r.gc().onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc().onBlackInput(e)}),r.Ub(),r.Ic(6,Vb,1,2,"input",32),r.Ub(),r.Vb(7,"div",30),r.Vb(8,"div"),r.Kc(9,"C"),r.Ub(),r.Vb(10,"div"),r.Kc(11,"M"),r.Ub(),r.Vb(12,"div"),r.Kc(13,"Y"),r.Ub(),r.Vb(14,"div"),r.Kc(15,"K"),r.Ub(),r.Ic(16,Fb,2,0,"div",33),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.Fc("display",3!==t.format?"none":"block"),r.Db(2),r.nc("rg",100)("value",null==t.cmykText?null:t.cmykText.c),r.Db(1),r.nc("rg",100)("value",null==t.cmykText?null:t.cmykText.m),r.Db(1),r.nc("rg",100)("value",null==t.cmykText?null:t.cmykText.y),r.Db(1),r.nc("rg",100)("value",null==t.cmykText?null:t.cmykText.k),r.Db(1),r.nc("ngIf","disabled"!==t.cpAlphaChannel),r.Db(10),r.nc("ngIf","disabled"!==t.cpAlphaChannel)}}function Ub(t,e){if(1&t){const t=r.Wb();r.Vb(0,"input",34),r.cc("keyup.enter",function(e){return r.Ac(t),r.gc(2).onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc(2).onAlphaInput(e)}),r.Ub()}if(2&t){const t=r.gc(2);r.nc("rg",1)("value",null==t.hslaText?null:t.hslaText.a)}}function Bb(t,e){1&t&&(r.Vb(0,"div"),r.Kc(1,"A"),r.Ub())}function Nb(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",35),r.Vb(1,"div",30),r.Vb(2,"input",36),r.cc("keyup.enter",function(e){return r.Ac(t),r.gc().onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc().onHueInput(e)}),r.Ub(),r.Vb(3,"input",31),r.cc("keyup.enter",function(e){return r.Ac(t),r.gc().onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc().onSaturationInput(e)}),r.Ub(),r.Vb(4,"input",31),r.cc("keyup.enter",function(e){return r.Ac(t),r.gc().onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc().onLightnessInput(e)}),r.Ub(),r.Ic(5,Ub,1,2,"input",32),r.Ub(),r.Vb(6,"div",30),r.Vb(7,"div"),r.Kc(8,"H"),r.Ub(),r.Vb(9,"div"),r.Kc(10,"S"),r.Ub(),r.Vb(11,"div"),r.Kc(12,"L"),r.Ub(),r.Ic(13,Bb,2,0,"div",33),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.Fc("display",2!==t.format?"none":"block"),r.Db(2),r.nc("rg",360)("value",null==t.hslaText?null:t.hslaText.h),r.Db(1),r.nc("rg",100)("value",null==t.hslaText?null:t.hslaText.s),r.Db(1),r.nc("rg",100)("value",null==t.hslaText?null:t.hslaText.l),r.Db(1),r.nc("ngIf","disabled"!==t.cpAlphaChannel),r.Db(8),r.nc("ngIf","disabled"!==t.cpAlphaChannel)}}function jb(t,e){if(1&t){const t=r.Wb();r.Vb(0,"input",34),r.cc("keyup.enter",function(e){return r.Ac(t),r.gc(2).onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc(2).onAlphaInput(e)}),r.Ub()}if(2&t){const t=r.gc(2);r.nc("rg",1)("value",null==t.rgbaText?null:t.rgbaText.a)}}function zb(t,e){1&t&&(r.Vb(0,"div"),r.Kc(1,"A"),r.Ub())}function Hb(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",37),r.Vb(1,"div",30),r.Vb(2,"input",38),r.cc("keyup.enter",function(e){return r.Ac(t),r.gc().onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc().onRedInput(e)}),r.Ub(),r.Vb(3,"input",38),r.cc("keyup.enter",function(e){return r.Ac(t),r.gc().onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc().onGreenInput(e)}),r.Ub(),r.Vb(4,"input",38),r.cc("keyup.enter",function(e){return r.Ac(t),r.gc().onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc().onBlueInput(e)}),r.Ub(),r.Ic(5,jb,1,2,"input",32),r.Ub(),r.Vb(6,"div",30),r.Vb(7,"div"),r.Kc(8,"R"),r.Ub(),r.Vb(9,"div"),r.Kc(10,"G"),r.Ub(),r.Vb(11,"div"),r.Kc(12,"B"),r.Ub(),r.Ic(13,zb,2,0,"div",33),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.Fc("display",1!==t.format?"none":"block"),r.Db(2),r.nc("rg",255)("value",null==t.rgbaText?null:t.rgbaText.r),r.Db(1),r.nc("rg",255)("value",null==t.rgbaText?null:t.rgbaText.g),r.Db(1),r.nc("rg",255)("value",null==t.rgbaText?null:t.rgbaText.b),r.Db(1),r.nc("ngIf","disabled"!==t.cpAlphaChannel),r.Db(8),r.nc("ngIf","disabled"!==t.cpAlphaChannel)}}function Kb(t,e){if(1&t){const t=r.Wb();r.Vb(0,"input",34),r.cc("keyup.enter",function(e){return r.Ac(t),r.gc(2).onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc(2).onAlphaInput(e)}),r.Ub()}if(2&t){const t=r.gc(2);r.nc("rg",1)("value",t.hexAlpha)}}function $b(t,e){1&t&&(r.Vb(0,"div"),r.Kc(1,"A"),r.Ub())}function Gb(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",39),r.Vb(1,"div",30),r.Vb(2,"input",40),r.cc("blur",function(){return r.Ac(t),r.gc().onHexInput(null)})("keyup.enter",function(e){return r.Ac(t),r.gc().onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc().onHexInput(e)}),r.Ub(),r.Ic(3,Kb,1,2,"input",32),r.Ub(),r.Vb(4,"div",30),r.Vb(5,"div"),r.Kc(6,"Hex"),r.Ub(),r.Ic(7,$b,2,0,"div",33),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.Fc("display",0!==t.format?"none":"block"),r.Hb("hex-alpha","forced"===t.cpAlphaChannel),r.Db(2),r.nc("value",t.hexText),r.Db(1),r.nc("ngIf","forced"===t.cpAlphaChannel),r.Db(4),r.nc("ngIf","forced"===t.cpAlphaChannel)}}function Wb(t,e){if(1&t){const t=r.Wb();r.Vb(0,"input",34),r.cc("keyup.enter",function(e){return r.Ac(t),r.gc(2).onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc(2).onAlphaInput(e)}),r.Ub()}if(2&t){const t=r.gc(2);r.nc("rg",1)("value",null==t.hslaText?null:t.hslaText.a)}}function Zb(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",41),r.Vb(1,"div",30),r.Vb(2,"input",31),r.cc("keyup.enter",function(e){return r.Ac(t),r.gc().onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc().onValueInput(e)}),r.Ub(),r.Ic(3,Wb,1,2,"input",32),r.Ub(),r.Vb(4,"div",30),r.Vb(5,"div"),r.Kc(6,"V"),r.Ub(),r.Vb(7,"div"),r.Kc(8,"A"),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.Db(2),r.nc("rg",100)("value",null==t.hslaText?null:t.hslaText.l),r.Db(1),r.nc("ngIf","disabled"!==t.cpAlphaChannel)}}function qb(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",42),r.Vb(1,"span",43),r.cc("click",function(){return r.Ac(t),r.gc().onFormatToggle(-1)}),r.Ub(),r.Vb(2,"span",43),r.cc("click",function(){return r.Ac(t),r.gc().onFormatToggle(1)}),r.Ub(),r.Ub()}}function Yb(t,e){if(1&t){const t=r.Wb();r.Vb(0,"span",50),r.cc("click",function(e){r.Ac(t);const i=r.gc().$implicit;return r.gc(3).onRemovePresetColor(e,i)}),r.Ub()}if(2&t){const t=r.gc(4);r.Fb(t.cpRemoveColorButtonClass)}}function Qb(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",48),r.cc("click",function(){r.Ac(t);const i=e.$implicit;return r.gc(3).setColorFromString(i)}),r.Ic(1,Yb,1,3,"span",49),r.Ub()}if(2&t){const t=e.$implicit,i=r.gc(3);r.Fc("background-color",t),r.Db(1),r.nc("ngIf",i.cpAddColorButton)}}function Xb(t,e){if(1&t&&(r.Vb(0,"div"),r.Ic(1,Qb,2,3,"div",47),r.Ub()),2&t){const t=r.gc(2);r.Fb(t.cpPresetColorsClass),r.Db(1),r.nc("ngForOf",t.cpPresetColors)}}function Jb(t,e){if(1&t&&(r.Vb(0,"div"),r.Kc(1),r.Ub()),2&t){const t=r.gc(2);r.Fb(t.cpPresetEmptyMessageClass),r.Db(1),r.Lc(t.cpPresetEmptyMessage)}}function tv(t,e){if(1&t&&(r.Vb(0,"div",44),r.Qb(1,"hr"),r.Vb(2,"div",45),r.Kc(3),r.Ub(),r.Ic(4,Xb,2,4,"div",46),r.Ic(5,Jb,2,4,"div",46),r.Ub()),2&t){const t=r.gc();r.Db(3),r.Lc(t.cpPresetLabel),r.Db(1),r.nc("ngIf",null==t.cpPresetColors?null:t.cpPresetColors.length),r.Db(1),r.nc("ngIf",!(null!=t.cpPresetColors&&t.cpPresetColors.length)&&t.cpAddColorButton)}}function ev(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",53),r.cc("click",function(e){return r.Ac(t),r.gc(2).onCancelColor(e)}),r.Kc(1),r.Ub()}if(2&t){const t=r.gc(2);r.Fb(t.cpCancelButtonClass),r.Db(1),r.Lc(t.cpCancelButtonText)}}function iv(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",53),r.cc("click",function(e){return r.Ac(t),r.gc(2).onAcceptColor(e)}),r.Kc(1),r.Ub()}if(2&t){const t=r.gc(2);r.Fb(t.cpOKButtonClass),r.Db(1),r.Lc(t.cpOKButtonText)}}function nv(t,e){if(1&t&&(r.Vb(0,"div",51),r.Ic(1,ev,2,4,"button",52),r.Ic(2,iv,2,4,"button",52),r.Ub()),2&t){const t=r.gc();r.Db(1),r.nc("ngIf",t.cpCancelButton),r.Db(1),r.nc("ngIf",t.cpOKButton)}}var rv=function(t){return t[t.HEX=0]="HEX",t[t.RGBA=1]="RGBA",t[t.HSLA=2]="HSLA",t[t.CMYK=3]="CMYK",t}({});class sv{constructor(t,e,i,n){this.r=t,this.g=e,this.b=i,this.a=n}}class ov{constructor(t,e,i,n){this.h=t,this.s=e,this.v=i,this.a=n}}class av{constructor(t,e,i,n){this.h=t,this.s=e,this.l=i,this.a=n}}class lv{constructor(t,e,i,n,r=1){this.c=t,this.m=e,this.y=i,this.k=n,this.a=r}}let cv=(()=>{class t{constructor(){this.newValue=new r.o}inputChange(t){const e=t.target.value;if(void 0===this.rg)this.newValue.emit(e);else{const t=parseFloat(e);this.newValue.emit({v:t,rg:this.rg})}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","text",""]],hostBindings:function(t,e){1&t&&r.cc("input",function(t){return e.inputChange(t)})},inputs:{rg:"rg",text:"text"},outputs:{newValue:"newValue"}}),t})(),hv=(()=>{class t{constructor(t){this.elRef=t,this.dragEnd=new r.o,this.dragStart=new r.o,this.newValue=new r.o,this.listenerMove=t=>this.move(t),this.listenerStop=()=>this.stop()}mouseDown(t){this.start(t)}touchStart(t){this.start(t)}move(t){t.preventDefault(),this.setCursor(t)}start(t){this.setCursor(t),t.stopPropagation(),document.addEventListener("mouseup",this.listenerStop),document.addEventListener("touchend",this.listenerStop),document.addEventListener("mousemove",this.listenerMove),document.addEventListener("touchmove",this.listenerMove),this.dragStart.emit()}stop(){document.removeEventListener("mouseup",this.listenerStop),document.removeEventListener("touchend",this.listenerStop),document.removeEventListener("mousemove",this.listenerMove),document.removeEventListener("touchmove",this.listenerMove),this.dragEnd.emit()}getX(t){const e=this.elRef.nativeElement.getBoundingClientRect();return(void 0!==t.pageX?t.pageX:t.touches[0].pageX)-e.left-window.pageXOffset}getY(t){const e=this.elRef.nativeElement.getBoundingClientRect();return(void 0!==t.pageY?t.pageY:t.touches[0].pageY)-e.top-window.pageYOffset}setCursor(t){const e=this.elRef.nativeElement.offsetWidth,i=this.elRef.nativeElement.offsetHeight,n=Math.max(0,Math.min(this.getX(t),e)),r=Math.max(0,Math.min(this.getY(t),i));void 0!==this.rgX&&void 0!==this.rgY?this.newValue.emit({s:n/e,v:1-r/i,rgX:this.rgX,rgY:this.rgY}):void 0===this.rgX&&void 0!==this.rgY?this.newValue.emit({v:r/i,rgY:this.rgY}):void 0!==this.rgX&&void 0===this.rgY&&this.newValue.emit({v:n/e,rgX:this.rgX})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l))},t.\u0275dir=r.Kb({type:t,selectors:[["","slider",""]],hostBindings:function(t,e){1&t&&r.cc("mousedown",function(t){return e.mouseDown(t)})("touchstart",function(t){return e.touchStart(t)})},inputs:{rgX:"rgX",rgY:"rgY",slider:"slider"},outputs:{dragEnd:"dragEnd",dragStart:"dragStart",newValue:"newValue"}}),t})();class uv{constructor(t,e,i,n){this.h=t,this.s=e,this.v=i,this.a=n}}class dv{constructor(t,e,i,n){this.h=t,this.s=e,this.v=i,this.a=n}}let pv=(()=>{class t{constructor(){this.active=null}setActive(t){this.active&&this.active!==t&&"inline"!==this.active.cpDialogDisplay&&this.active.closeDialog(),this.active=t}hsva2hsla(t){const e=t.h,i=t.s,n=t.v,r=t.a;if(0===n)return new av(e,0,0,r);if(0===i&&1===n)return new av(e,1,1,r);{const t=n*(2-i)/2;return new av(e,n*i/(1-Math.abs(2*t-1)),t,r)}}hsla2hsva(t){const e=Math.min(t.h,1),i=Math.min(t.s,1),n=Math.min(t.l,1),r=Math.min(t.a,1);if(0===n)return new ov(e,0,0,r);{const t=n+i*(1-Math.abs(2*n-1))/2;return new ov(e,2*(t-n)/t,t,r)}}hsvaToRgba(t){let e,i,n;const r=t.h,s=t.s,o=t.v,a=t.a,l=Math.floor(6*r),c=6*r-l,h=o*(1-s),u=o*(1-c*s),d=o*(1-(1-c)*s);switch(l%6){case 0:e=o,i=d,n=h;break;case 1:e=u,i=o,n=h;break;case 2:e=h,i=o,n=d;break;case 3:e=h,i=u,n=o;break;case 4:e=d,i=h,n=o;break;case 5:e=o,i=h,n=u;break;default:e=0,i=0,n=0}return new sv(e,i,n,a)}cmykToRgb(t){return new sv((1-t.c)*(1-t.k),(1-t.m)*(1-t.k),(1-t.y)*(1-t.k),t.a)}rgbaToCmyk(t){const e=1-Math.max(t.r,t.g,t.b);return 1===e?new lv(0,0,0,1,t.a):new lv((1-t.r-e)/(1-e),(1-t.g-e)/(1-e),(1-t.b-e)/(1-e),e,t.a)}rgbaToHsva(t){let e,i;const n=Math.min(t.r,1),r=Math.min(t.g,1),s=Math.min(t.b,1),o=Math.min(t.a,1),a=Math.max(n,r,s),l=Math.min(n,r,s),c=a,h=a-l;if(i=0===a?0:h/a,a===l)e=0;else{switch(a){case n:e=(r-s)/h+(r<s?6:0);break;case r:e=(s-n)/h+2;break;case s:e=(n-r)/h+4;break;default:e=0}e/=6}return new ov(e,i,c,o)}rgbaToHex(t,e){let i="#"+(1<<24|t.r<<16|t.g<<8|t.b).toString(16).substr(1);return e&&(i+=(256|Math.round(255*t.a)).toString(16).substr(1)),i}normalizeCMYK(t){return new lv(t.c/100,t.m/100,t.y/100,t.k/100,t.a)}denormalizeCMYK(t){return new lv(Math.floor(100*t.c),Math.floor(100*t.m),Math.floor(100*t.y),Math.floor(100*t.k),t.a)}denormalizeRGBA(t){return new sv(Math.round(255*t.r),Math.round(255*t.g),Math.round(255*t.b),t.a)}stringToHsva(t="",e=!1){let i=null;t=(t||"").toLowerCase();const n=[{re:/(rgb)a?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*%?,\s*(\d{1,3})\s*%?(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(t){return new sv(parseInt(t[2],10)/255,parseInt(t[3],10)/255,parseInt(t[4],10)/255,isNaN(parseFloat(t[5]))?1:parseFloat(t[5]))}},{re:/(hsl)a?\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(t){return new av(parseInt(t[2],10)/360,parseInt(t[3],10)/100,parseInt(t[4],10)/100,isNaN(parseFloat(t[5]))?1:parseFloat(t[5]))}}];n.push(e?{re:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})?$/,parse:function(t){return new sv(parseInt(t[1],16)/255,parseInt(t[2],16)/255,parseInt(t[3],16)/255,parseInt(t[4]||"FF",16)/255)}}:{re:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})$/,parse:function(t){return new sv(parseInt(t[1],16)/255,parseInt(t[2],16)/255,parseInt(t[3],16)/255,1)}}),n.push({re:/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])$/,parse:function(t){return new sv(parseInt(t[1]+t[1],16)/255,parseInt(t[2]+t[2],16)/255,parseInt(t[3]+t[3],16)/255,1)}});for(const r in n)if(n.hasOwnProperty(r)){const e=n[r],s=e.re.exec(t),o=s&&e.parse(s);if(o)return o instanceof sv?i=this.rgbaToHsva(o):o instanceof av&&(i=this.hsla2hsva(o)),i}return i}outputFormat(t,e,i){switch("auto"===e&&(e=t.a<1?"rgba":"hex"),e){case"hsla":const e=this.hsva2hsla(t),n=new av(Math.round(360*e.h),Math.round(100*e.s),Math.round(100*e.l),Math.round(100*e.a)/100);return t.a<1||"always"===i?"hsla("+n.h+","+n.s+"%,"+n.l+"%,"+n.a+")":"hsl("+n.h+","+n.s+"%,"+n.l+"%)";case"rgba":const r=this.denormalizeRGBA(this.hsvaToRgba(t));return t.a<1||"always"===i?"rgba("+r.r+","+r.g+","+r.b+","+Math.round(100*r.a)/100+")":"rgb("+r.r+","+r.g+","+r.b+")";default:const s="always"===i||"forced"===i;return this.rgbaToHex(this.denormalizeRGBA(this.hsvaToRgba(t)),s)}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),fv=(()=>{class t{constructor(t,e,i){this.elRef=t,this.cdRef=e,this.service=i,this.isIE10=!1,this.dialogArrowSize=10,this.dialogArrowOffset=15,this.dialogInputFields=[rv.HEX,rv.RGBA,rv.HSLA,rv.CMYK],this.useRootViewContainer=!1}handleEsc(t){this.show&&"popup"===this.cpDialogDisplay&&this.onCancelColor(t)}handleEnter(t){this.show&&"popup"===this.cpDialogDisplay&&this.onAcceptColor(t)}ngOnInit(){this.slider=new uv(0,0,0,0),this.sliderDimMax=new dv(this.hueSlider.nativeElement.offsetWidth||140,this.cpWidth,130,this.alphaSlider.nativeElement.offsetWidth||140),this.format=this.cpCmykEnabled?rv.CMYK:"rgba"===this.cpOutputFormat?rv.RGBA:"hsla"===this.cpOutputFormat?rv.HSLA:rv.HEX,this.listenerMouseDown=t=>{this.onMouseDown(t)},this.listenerResize=()=>{this.onResize()},this.openDialog(this.initialColor,!1)}ngOnDestroy(){this.closeDialog()}ngAfterViewInit(){230===this.cpWidth&&"inline"!==this.cpDialogDisplay||(this.sliderDimMax=new dv(this.hueSlider.nativeElement.offsetWidth||140,this.cpWidth,130,this.alphaSlider.nativeElement.offsetWidth||140),this.updateColorPicker(!1),this.cdRef.detectChanges())}openDialog(t,e=!0){this.service.setActive(this),this.width||(this.cpWidth=this.directiveElementRef.nativeElement.offsetWidth),this.height||(this.height=320),this.setInitialColor(t),this.setColorFromString(t,e),this.openColorPicker()}closeDialog(){this.closeColorPicker()}setupDialog(t,e,i,n,r,s,o,a,l,c,h,u,d,p,f,m,g,A,b,v,_,y,w,x,C,S,k,E,D,I,P,O,M,T,R,V){this.setInitialColor(i),this.setColorMode(a),this.isIE10=10===function(){let t="";"undefined"!=typeof navigator&&(t=navigator.userAgent.toLowerCase());const e=t.indexOf("msie ");return e>0&&parseInt(t.substring(e+5,t.indexOf(".",e)),10)}(),this.directiveInstance=t,this.directiveElementRef=e,this.cpDisableInput=u,this.cpCmykEnabled=l,this.cpAlphaChannel=c,this.cpOutputFormat=h,this.cpDialogDisplay=s,this.cpIgnoredElements=d,this.cpSaveClickOutside=p,this.cpCloseClickOutside=f,this.useRootViewContainer=m,this.width=this.cpWidth=parseInt(n,10),this.height=this.cpHeight=parseInt(r,10),this.cpPosition=g,this.cpPositionOffset=parseInt(A,10),this.cpOKButton=S,this.cpOKButtonText=E,this.cpOKButtonClass=k,this.cpCancelButton=D,this.cpCancelButtonText=P,this.cpCancelButtonClass=I,this.fallbackColor=o||"#fff",this.setPresetConfig(v,_),this.cpPresetColorsClass=y,this.cpMaxPresetColorsLength=w,this.cpPresetEmptyMessage=x,this.cpPresetEmptyMessageClass=C,this.cpAddColorButton=O,this.cpAddColorButtonText=T,this.cpAddColorButtonClass=M,this.cpRemoveColorButtonClass=R,this.cpTriggerElement=V,b||(this.dialogArrowOffset=0),"inline"===s&&(this.dialogArrowSize=0,this.dialogArrowOffset=0),"hex"===h&&"always"!==c&&"forced"!==c&&(this.cpAlphaChannel="disabled")}setColorMode(t){switch(t.toString().toUpperCase()){case"1":case"C":case"COLOR":this.cpColorMode=1;break;case"2":case"G":case"GRAYSCALE":this.cpColorMode=2;break;case"3":case"P":case"PRESETS":this.cpColorMode=3;break;default:this.cpColorMode=1}}setInitialColor(t){this.initialColor=t}setPresetConfig(t,e){this.cpPresetLabel=t,this.cpPresetColors=e}setColorFromString(t,e=!0,i=!0){let n;"always"===this.cpAlphaChannel||"forced"===this.cpAlphaChannel?(n=this.service.stringToHsva(t,!0),n||this.hsva||(n=this.service.stringToHsva(t,!1))):n=this.service.stringToHsva(t,!1),n||this.hsva||(n=this.service.stringToHsva(this.fallbackColor,!1)),n&&(this.hsva=n,this.sliderH=this.hsva.h,"hex"===this.cpOutputFormat&&"disabled"===this.cpAlphaChannel&&(this.hsva.a=1),this.updateColorPicker(e,i))}onResize(){"fixed"===this.position?this.setDialogPosition():"inline"!==this.cpDialogDisplay&&this.closeColorPicker()}onDragEnd(t){this.directiveInstance.sliderDragEnd({slider:t,color:this.outputColor})}onDragStart(t){this.directiveInstance.sliderDragStart({slider:t,color:this.outputColor})}onMouseDown(t){!this.show||this.isIE10||"popup"!==this.cpDialogDisplay||t.target===this.directiveElementRef.nativeElement||this.isDescendant(this.elRef.nativeElement,t.target)||this.isDescendant(this.directiveElementRef.nativeElement,t.target)||0!==this.cpIgnoredElements.filter(e=>e===t.target).length||(this.cpSaveClickOutside?this.directiveInstance.colorSelected(this.outputColor):(this.hsva=null,this.setColorFromString(this.initialColor,!1),this.cpCmykEnabled&&this.directiveInstance.cmykChanged(this.cmykColor),this.directiveInstance.colorChanged(this.initialColor),this.directiveInstance.colorCanceled()),this.cpCloseClickOutside&&this.closeColorPicker())}onAcceptColor(t){t.stopPropagation(),this.outputColor&&this.directiveInstance.colorSelected(this.outputColor),"popup"===this.cpDialogDisplay&&this.closeColorPicker()}onCancelColor(t){this.hsva=null,t.stopPropagation(),this.directiveInstance.colorCanceled(),this.setColorFromString(this.initialColor,!0),"popup"===this.cpDialogDisplay&&(this.cpCmykEnabled&&this.directiveInstance.cmykChanged(this.cmykColor),this.directiveInstance.colorChanged(this.initialColor,!0),this.closeColorPicker())}onFormatToggle(t){const e=this.dialogInputFields.length-(this.cpCmykEnabled?0:1),i=((this.dialogInputFields.indexOf(this.format)+t)%e+e)%e;this.format=this.dialogInputFields[i]}onColorChange(t){this.hsva.s=t.s/t.rgX,this.hsva.v=t.v/t.rgY,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"lightness",value:this.hsva.v,color:this.outputColor}),this.directiveInstance.sliderChanged({slider:"saturation",value:this.hsva.s,color:this.outputColor})}onHueChange(t){this.hsva.h=t.v/t.rgX,this.sliderH=this.hsva.h,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"hue",value:this.hsva.h,color:this.outputColor})}onValueChange(t){this.hsva.v=t.v/t.rgX,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"value",value:this.hsva.v,color:this.outputColor})}onAlphaChange(t){this.hsva.a=t.v/t.rgX,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"alpha",value:this.hsva.a,color:this.outputColor})}onHexInput(t){if(null===t)this.updateColorPicker();else{t&&"#"!==t[0]&&(t="#"+t);let e=/^#([a-f0-9]{3}|[a-f0-9]{6})$/gi;"always"===this.cpAlphaChannel&&(e=/^#([a-f0-9]{3}|[a-f0-9]{6}|[a-f0-9]{8})$/gi);const i=e.test(t);i&&(t.length<5&&(t="#"+t.substring(1).split("").map(t=>t+t).join("")),"forced"===this.cpAlphaChannel&&(t+=Math.round(255*this.hsva.a).toString(16)),this.setColorFromString(t,!0,!1)),this.directiveInstance.inputChanged({input:"hex",valid:i,value:t,color:this.outputColor})}}onRedInput(t){const e=this.service.hsvaToRgba(this.hsva),i=!isNaN(t.v)&&t.v>=0&&t.v<=t.rg;i&&(e.r=t.v/t.rg,this.hsva=this.service.rgbaToHsva(e),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"red",valid:i,value:e.r,color:this.outputColor})}onBlueInput(t){const e=this.service.hsvaToRgba(this.hsva),i=!isNaN(t.v)&&t.v>=0&&t.v<=t.rg;i&&(e.b=t.v/t.rg,this.hsva=this.service.rgbaToHsva(e),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"blue",valid:i,value:e.b,color:this.outputColor})}onGreenInput(t){const e=this.service.hsvaToRgba(this.hsva),i=!isNaN(t.v)&&t.v>=0&&t.v<=t.rg;i&&(e.g=t.v/t.rg,this.hsva=this.service.rgbaToHsva(e),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"green",valid:i,value:e.g,color:this.outputColor})}onHueInput(t){const e=!isNaN(t.v)&&t.v>=0&&t.v<=t.rg;e&&(this.hsva.h=t.v/t.rg,this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"hue",valid:e,value:this.hsva.h,color:this.outputColor})}onValueInput(t){const e=!isNaN(t.v)&&t.v>=0&&t.v<=t.rg;e&&(this.hsva.v=t.v/t.rg,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"value",valid:e,value:this.hsva.v,color:this.outputColor})}onAlphaInput(t){const e=!isNaN(t.v)&&t.v>=0&&t.v<=t.rg;e&&(this.hsva.a=t.v/t.rg,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"alpha",valid:e,value:this.hsva.a,color:this.outputColor})}onLightnessInput(t){const e=this.service.hsva2hsla(this.hsva),i=!isNaN(t.v)&&t.v>=0&&t.v<=t.rg;i&&(e.l=t.v/t.rg,this.hsva=this.service.hsla2hsva(e),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"lightness",valid:i,value:e.l,color:this.outputColor})}onSaturationInput(t){const e=this.service.hsva2hsla(this.hsva),i=!isNaN(t.v)&&t.v>=0&&t.v<=t.rg;i&&(e.s=t.v/t.rg,this.hsva=this.service.hsla2hsva(e),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"saturation",valid:i,value:e.s,color:this.outputColor})}onCyanInput(t){!isNaN(t.v)&&t.v>=0&&t.v<=t.rg&&(this.cmyk.c=t.v,this.updateColorPicker(!1,!0,!0)),this.directiveInstance.inputChanged({input:"cyan",valid:!0,value:this.cmyk.c,color:this.outputColor})}onMagentaInput(t){!isNaN(t.v)&&t.v>=0&&t.v<=t.rg&&(this.cmyk.m=t.v,this.updateColorPicker(!1,!0,!0)),this.directiveInstance.inputChanged({input:"magenta",valid:!0,value:this.cmyk.m,color:this.outputColor})}onYellowInput(t){!isNaN(t.v)&&t.v>=0&&t.v<=t.rg&&(this.cmyk.y=t.v,this.updateColorPicker(!1,!0,!0)),this.directiveInstance.inputChanged({input:"yellow",valid:!0,value:this.cmyk.y,color:this.outputColor})}onBlackInput(t){!isNaN(t.v)&&t.v>=0&&t.v<=t.rg&&(this.cmyk.k=t.v,this.updateColorPicker(!1,!0,!0)),this.directiveInstance.inputChanged({input:"black",valid:!0,value:this.cmyk.k,color:this.outputColor})}onAddPresetColor(t,e){t.stopPropagation(),this.cpPresetColors.filter(t=>t===e).length||(this.cpPresetColors=this.cpPresetColors.concat(e),this.directiveInstance.presetColorsChanged(this.cpPresetColors))}onRemovePresetColor(t,e){t.stopPropagation(),this.cpPresetColors=this.cpPresetColors.filter(t=>t!==e),this.directiveInstance.presetColorsChanged(this.cpPresetColors)}openColorPicker(){this.show||(this.show=!0,this.hidden=!0,setTimeout(()=>{this.hidden=!1,this.setDialogPosition(),this.cdRef.detectChanges()},0),this.directiveInstance.stateChanged(!0),this.isIE10||(document.addEventListener("mousedown",this.listenerMouseDown),document.addEventListener("touchstart",this.listenerMouseDown)),window.addEventListener("resize",this.listenerResize))}closeColorPicker(){this.show&&(this.show=!1,this.directiveInstance.stateChanged(!1),this.isIE10||(document.removeEventListener("mousedown",this.listenerMouseDown),document.removeEventListener("touchstart",this.listenerMouseDown)),window.removeEventListener("resize",this.listenerResize),this.cdRef.destroyed||this.cdRef.detectChanges())}updateColorPicker(t=!0,e=!0,i=!1){if(this.sliderDimMax){let n,r,s;2===this.cpColorMode&&(this.hsva.s=0);const o=this.outputColor;if(r=this.service.hsva2hsla(this.hsva),this.cpCmykEnabled?(i?(s=this.service.cmykToRgb(this.service.normalizeCMYK(this.cmyk)),this.hsva=this.service.rgbaToHsva(s)):(s=this.service.hsvaToRgba(this.hsva),this.cmyk=this.service.denormalizeCMYK(this.service.rgbaToCmyk(s))),s=this.service.denormalizeRGBA(s),this.sliderH=this.hsva.h):s=this.service.denormalizeRGBA(this.service.hsvaToRgba(this.hsva)),n=this.service.denormalizeRGBA(this.service.hsvaToRgba(new ov(this.sliderH||this.hsva.h,1,1,1))),e&&(this.hslaText=new av(Math.round(360*r.h),Math.round(100*r.s),Math.round(100*r.l),Math.round(100*r.a)/100),this.rgbaText=new sv(s.r,s.g,s.b,Math.round(100*s.a)/100),this.cpCmykEnabled&&(this.cmykText=new lv(this.cmyk.c,this.cmyk.m,this.cmyk.y,this.cmyk.k,Math.round(100*this.cmyk.a)/100)),this.hexText=this.service.rgbaToHex(s,"always"===this.cpAlphaChannel),this.hexAlpha=this.rgbaText.a),"auto"===this.cpOutputFormat&&this.format!==rv.RGBA&&this.format!==rv.CMYK&&this.hsva.a<1&&(this.format=this.hsva.a<1?rv.RGBA:rv.HEX),this.hueSliderColor="rgb("+n.r+","+n.g+","+n.b+")",this.alphaSliderColor="rgb("+s.r+","+s.g+","+s.b+")",this.outputColor=this.service.outputFormat(this.hsva,this.cpOutputFormat,this.cpAlphaChannel),this.selectedColor=this.service.outputFormat(this.hsva,"rgba",null),this.format!==rv.CMYK)this.cmykColor="";else if("always"===this.cpAlphaChannel||"enabled"===this.cpAlphaChannel||"forced"===this.cpAlphaChannel){const t=Math.round(100*this.cmyk.a)/100;this.cmykColor=`cmyka(${this.cmyk.c},${this.cmyk.m},${this.cmyk.y},${this.cmyk.k},${t})`}else this.cmykColor=`cmyk(${this.cmyk.c},${this.cmyk.m},${this.cmyk.y},${this.cmyk.k})`;this.slider=new uv((this.sliderH||this.hsva.h)*this.sliderDimMax.h-8,this.hsva.s*this.sliderDimMax.s-8,(1-this.hsva.v)*this.sliderDimMax.v-8,this.hsva.a*this.sliderDimMax.a-8),t&&o!==this.outputColor&&(this.cpCmykEnabled&&this.directiveInstance.cmykChanged(this.cmykColor),this.directiveInstance.colorChanged(this.outputColor))}}setDialogPosition(){if("inline"===this.cpDialogDisplay)this.position="relative";else{let t,e="static",i="",n=null,r=null,s=this.directiveElementRef.nativeElement.parentNode;const o=this.dialogElement.nativeElement.offsetHeight;for(;null!==s&&"HTML"!==s.tagName;){if(t=window.getComputedStyle(s),e=t.getPropertyValue("position"),i=t.getPropertyValue("transform"),"static"!==e&&null===n&&(n=s),i&&"none"!==i&&null===r&&(r=s),"fixed"===e){n=r;break}s=s.parentNode}const a=this.createDialogBox(this.directiveElementRef.nativeElement,"fixed"!==e);if(this.useRootViewContainer||"fixed"===e&&(!n||n instanceof HTMLUnknownElement))this.top=a.top,this.left=a.left;else{null===n&&(n=s);const t=this.createDialogBox(n,"fixed"!==e);this.top=a.top-t.top,this.left=a.left-t.left}"fixed"===e&&(this.position="fixed");let l=this.cpPosition;"auto"===this.cpPosition&&(l=function(t,e){let i="right",n="bottom";const{height:r,width:s}=t,{top:o,left:a}=e,l=o+e.height,c=a+e.width,h=o-r<0,u=l+r>(window.innerHeight||document.documentElement.clientHeight),d=a-s<0,p=c+s>(window.innerWidth||document.documentElement.clientWidth);return u&&(n="top"),h&&(n="bottom"),d&&(i="right"),p&&(i="left"),h&&u&&d&&p?["left","right","top","bottom"].reduce((e,i)=>t[e]>t[i]?e:i):d&&p?h?"bottom":u||o>l?"top":"bottom":h&&u?d?"right":p||a>c?"left":"right":`${n}-${i}`}(this.dialogElement.nativeElement.getBoundingClientRect(),this.cpTriggerElement.nativeElement.getBoundingClientRect())),"top"===l?(this.arrowTop=o-1,this.top-=o+this.dialogArrowSize,this.left+=this.cpPositionOffset/100*a.width-this.dialogArrowOffset):"bottom"===l?(this.top+=a.height+this.dialogArrowSize,this.left+=this.cpPositionOffset/100*a.width-this.dialogArrowOffset):"top-left"===l||"left-top"===l?(this.top-=o-a.height+a.height*this.cpPositionOffset/100,this.left-=this.cpWidth+this.dialogArrowSize-2-this.dialogArrowOffset):"top-right"===l||"right-top"===l?(this.top-=o-a.height+a.height*this.cpPositionOffset/100,this.left+=a.width+this.dialogArrowSize-2-this.dialogArrowOffset):"left"===l||"bottom-left"===l||"left-bottom"===l?(this.top+=a.height*this.cpPositionOffset/100-this.dialogArrowOffset,this.left-=this.cpWidth+this.dialogArrowSize-2):(this.top+=a.height*this.cpPositionOffset/100-this.dialogArrowOffset,this.left+=a.width+this.dialogArrowSize-2),this.cpUsePosition=l}}isDescendant(t,e){let i=e.parentNode;for(;null!==i;){if(i===t)return!0;i=i.parentNode}return!1}createDialogBox(t,e){return{top:t.getBoundingClientRect().top+(e?window.pageYOffset:0),left:t.getBoundingClientRect().left+(e?window.pageXOffset:0),width:t.offsetWidth,height:t.offsetHeight}}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.h),r.Pb(pv))},t.\u0275cmp=r.Jb({type:t,selectors:[["color-picker"]],viewQuery:function(t,e){if(1&t&&(r.Pc(Db,3),r.Pc(Ib,3),r.Pc(Pb,3)),2&t){let t;r.vc(t=r.dc())&&(e.dialogElement=t.first),r.vc(t=r.dc())&&(e.hueSlider=t.first),r.vc(t=r.dc())&&(e.alphaSlider=t.first)}},hostBindings:function(t,e){1&t&&r.cc("keyup.esc",function(t){return e.handleEsc(t)},!1,r.yc)("keyup.enter",function(t){return e.handleEnter(t)},!1,r.yc)},decls:28,vars:47,consts:[[1,"color-picker",3,"click"],["dialogPopup",""],[3,"class","top",4,"ngIf"],["class","saturation-lightness",3,"slider","rgX","rgY","background-color","newValue","dragStart","dragEnd",4,"ngIf"],[1,"hue-alpha","box"],[1,"left"],[1,"selected-color-background"],[1,"selected-color"],["type","button",3,"class","disabled","click",4,"ngIf"],[1,"right"],["style","height: 16px;",4,"ngIf"],[1,"hue",3,"slider","rgX","newValue","dragStart","dragEnd"],["hueSlider",""],[1,"cursor"],[1,"value",3,"slider","rgX","newValue","dragStart","dragEnd"],["valueSlider",""],[1,"alpha",3,"slider","rgX","newValue","dragStart","dragEnd"],["alphaSlider",""],["class","cmyk-text",3,"display",4,"ngIf"],["class","hsla-text",3,"display",4,"ngIf"],["class","rgba-text",3,"display",4,"ngIf"],["class","hex-text",3,"hex-alpha","display",4,"ngIf"],["class","value-text",4,"ngIf"],["class","type-policy",4,"ngIf"],["class","preset-area",4,"ngIf"],["class","button-area",4,"ngIf"],[1,"saturation-lightness",3,"slider","rgX","rgY","newValue","dragStart","dragEnd"],["type","button",3,"disabled","click"],[2,"height","16px"],[1,"cmyk-text"],[1,"box"],["type","number","pattern","[0-9]*","min","0","max","100",3,"text","rg","value","keyup.enter","newValue"],["type","number","pattern","[0-9]+([\\.,][0-9]{1,2})?","min","0","max","1","step","0.1",3,"text","rg","value","keyup.enter","newValue",4,"ngIf"],[4,"ngIf"],["type","number","pattern","[0-9]+([\\.,][0-9]{1,2})?","min","0","max","1","step","0.1",3,"text","rg","value","keyup.enter","newValue"],[1,"hsla-text"],["type","number","pattern","[0-9]*","min","0","max","360",3,"text","rg","value","keyup.enter","newValue"],[1,"rgba-text"],["type","number","pattern","[0-9]*","min","0","max","255",3,"text","rg","value","keyup.enter","newValue"],[1,"hex-text"],[3,"text","value","blur","keyup.enter","newValue"],[1,"value-text"],[1,"type-policy"],[1,"type-policy-arrow",3,"click"],[1,"preset-area"],[1,"preset-label"],[3,"class",4,"ngIf"],["class","preset-color",3,"backgroundColor","click",4,"ngFor","ngForOf"],[1,"preset-color",3,"click"],[3,"class","click",4,"ngIf"],[3,"click"],[1,"button-area"],["type","button",3,"class","click",4,"ngIf"],["type","button",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"div",0,1),r.cc("click",function(t){return t.stopPropagation()}),r.Ic(2,Ob,1,5,"div",2),r.Ic(3,Mb,2,8,"div",3),r.Vb(4,"div",4),r.Vb(5,"div",5),r.Qb(6,"div",6),r.Qb(7,"div",7),r.Ic(8,Tb,2,5,"button",8),r.Ub(),r.Vb(9,"div",9),r.Ic(10,Rb,1,0,"div",10),r.Vb(11,"div",11,12),r.cc("newValue",function(t){return e.onHueChange(t)})("dragStart",function(){return e.onDragStart("hue")})("dragEnd",function(){return e.onDragEnd("hue")}),r.Qb(13,"div",13),r.Ub(),r.Vb(14,"div",14,15),r.cc("newValue",function(t){return e.onValueChange(t)})("dragStart",function(){return e.onDragStart("value")})("dragEnd",function(){return e.onDragEnd("value")}),r.Qb(16,"div",13),r.Ub(),r.Vb(17,"div",16,17),r.cc("newValue",function(t){return e.onAlphaChange(t)})("dragStart",function(){return e.onDragStart("alpha")})("dragEnd",function(){return e.onDragEnd("alpha")}),r.Qb(19,"div",13),r.Ub(),r.Ub(),r.Ub(),r.Ic(20,Lb,17,12,"div",18),r.Ic(21,Nb,14,10,"div",19),r.Ic(22,Hb,14,10,"div",20),r.Ic(23,Gb,8,7,"div",21),r.Ic(24,Zb,9,3,"div",22),r.Ic(25,qb,3,0,"div",23),r.Ic(26,tv,6,3,"div",24),r.Ic(27,nv,3,2,"div",25),r.Ub()),2&t&&(r.Fc("display",e.show?"block":"none")("visibility",e.hidden?"hidden":"visible")("top",e.top,"px")("left",e.left,"px")("position",e.position)("height",e.cpHeight,"px")("width",e.cpWidth,"px"),r.Hb("open",e.show),r.Db(2),r.nc("ngIf","popup"==e.cpDialogDisplay),r.Db(1),r.nc("ngIf",1===(e.cpColorMode||1)),r.Db(4),r.Fc("background-color",e.selectedColor),r.Db(1),r.nc("ngIf",e.cpAddColorButton),r.Db(2),r.nc("ngIf","disabled"===e.cpAlphaChannel),r.Db(1),r.Fc("display",1===(e.cpColorMode||1)?"block":"none"),r.nc("rgX",1),r.Db(2),r.Fc("left",null==e.slider?null:e.slider.h,"px"),r.Db(1),r.Fc("display",2===(e.cpColorMode||1)?"block":"none"),r.nc("rgX",1),r.Db(2),r.Fc("right",null==e.slider?null:e.slider.v,"px"),r.Db(1),r.Fc("display","disabled"===e.cpAlphaChannel?"none":"block")("background-color",e.alphaSliderColor),r.nc("rgX",1),r.Db(2),r.Fc("left",null==e.slider?null:e.slider.a,"px"),r.Db(1),r.nc("ngIf",!e.cpDisableInput&&1===(e.cpColorMode||1)),r.Db(1),r.nc("ngIf",!e.cpDisableInput&&1===(e.cpColorMode||1)),r.Db(1),r.nc("ngIf",!e.cpDisableInput&&1===(e.cpColorMode||1)),r.Db(1),r.nc("ngIf",!e.cpDisableInput&&1===(e.cpColorMode||1)),r.Db(1),r.nc("ngIf",!e.cpDisableInput&&2===(e.cpColorMode||1)),r.Db(1),r.nc("ngIf",!e.cpDisableInput&&1===(e.cpColorMode||1)),r.Db(1),r.nc("ngIf",(null==e.cpPresetColors?null:e.cpPresetColors.length)||e.cpAddColorButton),r.Db(1),r.nc("ngIf",e.cpOKButton||e.cpCancelButton))},directives:[ut,hv,cv,ct],styles:['.color-picker{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;background-color:#fff;border:1px solid #777;cursor:default;height:auto;position:absolute;user-select:none;width:230px;z-index:1000}.color-picker *{box-sizing:border-box;font-size:11px;margin:0}.color-picker input{color:#000;font-size:13px;height:26px;min-width:0;text-align:center;width:0}.color-picker input:-moz-submit-invalid,.color-picker input:-moz-ui-invalid,.color-picker input:invalid{box-shadow:none}.color-picker input::-webkit-inner-spin-button,.color-picker input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.color-picker .arrow{border-style:solid;height:0;position:absolute;width:0;z-index:999999}.color-picker .arrow.arrow-top{border-color:#777 transparent transparent;border-width:10px 5px;left:8px}.color-picker .arrow.arrow-bottom{border-color:transparent transparent #777;border-width:10px 5px;left:8px;top:-20px}.color-picker .arrow.arrow-left-top,.color-picker .arrow.arrow-top-left{border-color:transparent transparent transparent #777;border-width:5px 10px;bottom:8px;right:-21px}.color-picker .arrow.arrow-right-top,.color-picker .arrow.arrow-top-right{border-color:transparent #777 transparent transparent;border-width:5px 10px;bottom:8px;left:-20px}.color-picker .arrow.arrow-bottom-left,.color-picker .arrow.arrow-left,.color-picker .arrow.arrow-left-bottom{border-color:transparent transparent transparent #777;border-width:5px 10px;right:-21px;top:8px}.color-picker .arrow.arrow-bottom-right,.color-picker .arrow.arrow-right,.color-picker .arrow.arrow-right-bottom{border-color:transparent #777 transparent transparent;border-width:5px 10px;left:-20px;top:8px}.color-picker .cursor{border:2px solid #222;border-radius:50%;cursor:default;height:16px;position:relative;width:16px}.color-picker .box{display:flex;padding:4px 8px}.color-picker .left{padding:16px 8px;position:relative}.color-picker .right{flex:1 1 auto;padding:12px 8px}.color-picker .button-area{padding:0 16px 16px;text-align:right}.color-picker .button-area button{margin-left:8px}.color-picker .preset-area{padding:4px 15px}.color-picker .preset-area .preset-label{color:#555;font-size:11px;overflow:hidden;padding:4px;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:100%}.color-picker .preset-area .preset-color{border:1px solid #a9a9a9;border-radius:25%;cursor:pointer;display:inline-block;height:18px;margin:4px 6px 8px;position:relative;width:18px}.color-picker .preset-area .preset-empty-message{font-style:italic;margin-bottom:8px;margin-top:4px;min-height:18px;text-align:center}.color-picker .hex-text{font-size:11px;padding:4px 8px;width:100%}.color-picker .hex-text .box{padding:0 24px 8px 8px}.color-picker .hex-text .box div{clear:left;color:#555;flex:1 1 auto;float:left;text-align:center}.color-picker .hex-text .box input{border:1px solid #a9a9a9;flex:1 1 auto;padding:1px}.color-picker .hex-alpha .box div:first-child,.color-picker .hex-alpha .box input:first-child{flex-grow:3;margin-right:8px}.color-picker .cmyk-text,.color-picker .hsla-text,.color-picker .rgba-text,.color-picker .value-text{font-size:11px;padding:4px 8px;width:100%}.color-picker .cmyk-text .box,.color-picker .hsla-text .box,.color-picker .rgba-text .box{padding:0 24px 8px 8px}.color-picker .value-text .box{padding:0 8px 8px}.color-picker .cmyk-text .box div,.color-picker .hsla-text .box div,.color-picker .rgba-text .box div,.color-picker .value-text .box div{color:#555;flex:1 1 auto;margin-right:8px;text-align:center}.color-picker .cmyk-text .box div:last-child,.color-picker .hsla-text .box div:last-child,.color-picker .rgba-text .box div:last-child,.color-picker .value-text .box div:last-child{margin-right:0}.color-picker .cmyk-text .box input,.color-picker .hsla-text .box input,.color-picker .rgba-text .box input,.color-picker .value-text .box input{border:1px solid #a9a9a9;flex:1;float:left;margin:0 8px 0 0;padding:1px}.color-picker .cmyk-text .box input:last-child,.color-picker .hsla-text .box input:last-child,.color-picker .rgba-text .box input:last-child,.color-picker .value-text .box input:last-child{margin-right:0}.color-picker .hue-alpha{align-items:center;margin-bottom:3px}.color-picker .hue{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwkUFWbCCAAAAFxJREFUaN7t0kEKg0AQAME2x83/n2qu5qCgD1iDhCoYdpnbQC9bbY1qVO/jvc6k3ad91s7/7F1/csgPrujuQ17BDYSFsBAWwgJhISyEBcJCWAgLhIWwEBYIi2f7Ar/1TCgFH2X9AAAAAElFTkSuQmCC");direction:ltr}.color-picker .hue,.color-picker .value{background-size:100% 100%;border:none;cursor:pointer;height:16px;margin-bottom:16px;width:100%}.color-picker .value{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAACTklEQVR42u3SYUcrABhA4U2SkmRJMmWSJklKJiWZZpKUJJskKUmaTFImKZOUzMySpGRmliRNJilJSpKSJEtmSpIpmWmSdO736/6D+x7OP3gUCoWCv1cqlSQlJZGcnExKSgqpqamkpaWRnp5ORkYGmZmZqFQqsrKyyM7OJicnh9zcXNRqNXl5eeTn56PRaCgoKKCwsJCioiK0Wi3FxcWUlJRQWlpKWVkZ5eXlVFRUUFlZiU6no6qqiurqampqaqitraWurg69Xk99fT0GgwGj0UhDQwONjY00NTXR3NxMS0sLra2ttLW10d7ejslkwmw209HRQWdnJ11dXXR3d9PT00Nvby99fX309/czMDDA4OAgFouFoaEhrFYrw8PDjIyMMDo6ytjYGDabjfHxcSYmJpicnGRqagq73c709DQzMzPMzs4yNzfH/Pw8DocDp9OJy+XC7XazsLDA4uIiS0tLLC8vs7KywurqKmtra3g8HrxeLz6fD7/fz/r6OhsbG2xubrK1tcX29jaBQICdnR2CwSC7u7vs7e2xv7/PwcEBh4eHHB0dcXx8zMnJCaenp5ydnXF+fs7FxQWXl5dcXV1xfX3Nzc0Nt7e33N3dEQqFuL+/5+HhgXA4TCQS4fHxkaenJ56fn3l5eeH19ZVoNMrb2xvv7+98fHwQi8WIx+N8fn6SSCT4+vri+/ubn58ffn9/+VcKgSWwBJbAElgCS2AJLIElsASWwBJYAktgCSyBJbAElsASWAJLYAksgSWwBJbAElgCS2AJLIElsP4/WH8AmJ5Z6jHS4h8AAAAASUVORK5CYII=");direction:rtl}.color-picker .alpha{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwYQlZMa3gAAAWVJREFUaN7tmEGO6jAQRCsOArHgBpyAJYGjcGocxAm4A2IHpmoWE0eBH+ezmFlNvU06shJ3W6VEelWMUQAIIF9f6qZpimsA1LYtS2uF51/u27YVAFZVRUkEoGHdPV/sIcbIEIIkUdI/9Xa7neyv61+SWFUVAVCSct00TWn2fv6u3+Ecfd3tXzy/0+nEUu+SPjo/kqzrmiQpScN6v98XewfA8/lMkiLJ2WxGSUopcT6fM6U0NX9/frfbjev1WtfrlZfLhYfDQQHG/AIOlnGwjINlHCxjHCzjYJm/TJWdCwquJXseFFzGwDNNeiKMOJTO8xQdDQaeB29+K9efeLaBo9J7vdvtJj1RjFFjfiv7qv95tjx/7leSQgh93e1ffMeIp6O+YQjho/N791t1XVOSSI7N//K+4/GoxWLBx+PB5/Op5XLJ+/3OlJJWqxU3m83ovv5iGf8KjYNlHCxjHCzjYBkHy5gf5gusvQU7U37jTAAAAABJRU5ErkJggg==");background-size:100% 100%;border:none;cursor:pointer;direction:ltr;height:16px;width:100%}.color-picker .type-policy{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAgCAYAAAAffCjxAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAACewAAAnsB01CO3AAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAIASURBVEiJ7ZY9axRRFIafsxMStrLQJpAgpBFhi+C9w1YSo00I6RZ/g9vZpBf/QOr4GyRgkSKNSrAadsZqQGwCkuAWyRZJsySwvhZ7N/vhzrgbLH3Ld8597jlzz50zJokyxXH8DqDVar0qi6v8BbItqSGpEcfxdlmsFWXkvX8AfAVWg3UKPEnT9GKujMzsAFgZsVaCN1VTQd77XUnrgE1kv+6935268WRpzrnHZvYRWC7YvC3pRZZl3wozqtVqiyH9IgjAspkd1Gq1xUJQtVrdB9ZKIAOthdg/Qc65LUk7wNIMoCVJO865rYFhkqjX6/d7vV4GPJwBMqofURS5JEk6FYBer/eeYb/Mo9WwFnPOvQbeAvfuAAK4BN4sAJtAG/gJIElmNuiJyba3EGNmZiPeZuEVmVell/Y/6N+CzDn3AXhEOOo7Hv/3BeAz8IzQkMPnJbuPx1wC+yYJ7/0nYIP5S/0FHKdp+rwCEEXRS/rf5Hl1Gtb2M0iSpCOpCZzPATmX1EySpHMLAsiy7MjMDoHrGSDXZnaYZdnRwBh7J91utwmczAA6CbG3GgPleX4jqUH/a1CktqRGnuc3hSCAMB32gKspkCtgb3KCQMmkjeP4WNJThrNNZval1WptTIsv7JtQ4tmIdRa8qSoEpWl6YWZNoAN0zKxZNPehpLSBZv2t+Q0CJ9lLnARQLAAAAABJRU5ErkJggg==");background-position:50%;background-repeat:no-repeat;background-size:8px 16px;height:24px;position:absolute;right:12px;top:218px;width:16px}.color-picker .type-policy .type-policy-arrow{display:block;height:50%;width:100%}.color-picker .selected-color{border:1px solid #a9a9a9;border-radius:50%;height:40px;left:8px;position:absolute;top:16px;width:40px}.color-picker .selected-color-background{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAh0lEQVRYR+2W0QlAMQgD60zdfwOdqa8TmI/wQMr5K0I5bZLIzLOa2nt37VVVbd+dDx5obgCC3KBLwJ2ff4PnVidkf+ucIhw80HQaCLo3DMH3CRK3iFsmAWVl6hPNDwt8EvNE5q+YuEXcMgkonVM6SdyCoEvAnZ8v1Hjx817MilmxSUB5rdLJDycZgUAZUch/AAAAAElFTkSuQmCC");border-radius:50%;height:40px;width:40px}.color-picker .saturation-lightness{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOYAAACCCAYAAABSD7T3AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwksPWR6lgAAIABJREFUeNrtnVuT47gRrAHN+P//Or/61Y5wONZ7mZ1u3XAeLMjJZGZVgdKsfc5xR3S0RIIUW+CHzCpc2McYo7XGv3ex7UiZd57rjyzzv+v+33X/R/+3r/f7vR386Y+TvKNcf/wdhTLPcv9qU2wZd74uth0t1821jkIZLPcsI/6nWa4XvutquU0Z85mnx80S/ZzgpnLnOtHNt7/ofx1TKXcSNzN/7qbMQ3ju7rNQmMYYd/4s2j9aa+P+gGaMcZrb1M/tdrvf7/d2v99P9/t93O/3cbvdxu12G9frdVwul3E+n8c///nP+2+//Xb66aefxl//+tfx5z//2YK5Al2rgvf4UsbpdGrB52bAvArXpuzjmiqAVSGz5eDmGYXzhbAZmCrnmzddpUU+8Y1dAOYeXCtDUwVwV7YCGH6uAmyMcZ9l5vkUaBPGMUZ7/J5w/792/fvv9Xq93263dr/fTxPECeME8nK5jM/Pz/HTTz/dv337dvrll1/GP/7xj/G3v/1t/OUvfwkVswongjdOp9PzH3U3D3zmWGnZVXn4jCqs7wC2BKP4/8tAzkZsoWx6XrqeHZymvp4ABCBJhTQwKfDT8gzrZCIqi5AhiACjBfEB2rP8/X63MM7f6/V6v9/v7Xa7bYC83W7jcrlsVHIq5ffv30+//fbb+OWXX8ZPP/00/v73v4+ff/75JSvbeu+bL2WMMaFbAlpBNM85QX+ct6qoSqkPAwuQlBVKqGNFSUOAA3Bmu7gC5hNOd15nSwvAOUW7C4giUCV8Sgn5L9hNFIqTsp0GxI0ysioyjAjkY/tGJVEpz+fz+OWXX+7fv38//f777+Pbt2/j119/HT///PP49ddfx8fHRwrmTjV779EXu2px2xhjwtdJZQcAWQIPLPISsMJaSwiD8gzIKrwSyATE5j5nAbR5c1dBUwBlsEWW0h6LqiYsqFPAQxCyRZ3wOSARxmlXMX5k64pQfvv27f75+dk+Pj5OHx8f4/v37+Pbt2/jt99+G9++fRsfHx/jcrmUFLO31gYDWblxRIs/TqfT7ousxJsAxXA2Gc7TA9XdgfdoHbFsj76X2+1WArgI1ageGwA3qupqoHsmcbI6Fu93quggFa9d7LeDtgKfAFHBJ+NEByIkcJ5KervdTmhhGcgJJSZ5vn//fj+fz+18Pp8+Pz/H5+fnmGD+/vvv4/v37+Pj42N8fn6O2+1Ws7JjjP6wraMI5E4RZ8x2vV5TSwkquotV7/d7Tz6HFWsD/qNcdw0CQ3q/321c686TwDVIdbuy73zNldhSHb8I2klZznm+InBS4U6n0302aBFsLhHDAKJVJVglfI9jhvu53W53sLANYNxAiDA6MCeUHx8f9+v12i6XS7tcLqcZW57P5yeY8/fz83Ocz+fnsSmYUyknWEG85WBst9stzSLyMdfr9Qi08iY15UZ0LlDGLhR3o5zK2j7OPUTD0E+nU3tk7Xb/16NFbhloAMuY1zjLUOO3BKeIDe+Z8s3/J4gFo4TM5jPmuRg28foUKKVSwo16TgA5npywcWLHgYl/Pz8/73/605/ab7/91m63W7tcLie0sZj4mao5gTyfz88E0f1+j8EcYzwTPEG2cqjyfHNF0M8fuqEiaOVnRzZZQNh5fwQyHg/HDGfJo89Q1zb/quu5XC6773I2XKfTqd/v9+d3wuqWva/YTdUdEV3fhIv/Viyps6YE3x3r43K5bJQS66zaxVGFsvd+//j4aF+/fm3fv39vt9utff36tf3+++/tdrudvn37ZuNLBaaCMgUzC+rZRiFowxUuJI8YMqcCp9Opq5vagaYU6lGJA1XQqejchw6Cj0Gw5nYBrGw01A2O206n04BGouNNyTfp/FwElhUey6nXrIKw7QQWddxuN2ldL5fL839gSPF8ahu/JvBO48CPSuqMf8Vp9/P53L58+dLu93s7n8/tfr8/39/v9/b5+TkhPJ3P56mQ436/j+/fv+/iSgbzer0+AZx/5+88bv6OMda6S5z6kd21fYC9dxv7cIJJ2d9AOS30fPMzyHiTM8B4DF6XUlYHp4KQW3W+1t77MNB1vGHxWq7Xa7vf78+y5/N5A+H1et29xuP5dbYtyaRu4AksbPq6936fjRzXRxBbPr/b+b18+fKljTHaBBBfn8/n0/1+H1++fBnn8zm0sB8fH5u4cr5GuBhMVk0EEn9RsctgVhM+ixlJtMA23R8B6yysAstBOgFXIKKCMIgToMqNEu2fYMH7ztc732dQKkCj1ytAZtY0Kx8pIr8GGJ+AT3V+2Hirhl++fBmXy2Wz73w+b17P8p+fn8/tUwGVleVkTyUb68DkfayWY4zxNRihU4EpLJPZVrK+u7J4/mgfKqeLW9X2REWlItL1diynbDDb3+jXgYjQqn0rrxWc+NkILP7F7xIbMvx7vV53x40xnlbWJF12ZSag/N0pW6t+ZzmOMzHjajKwDfond78zYTdfq18up97zr2q8v3IioBprRtBl0EZ9og5WBRGOdOHjIjXF7UotFbgOWnXzIJyzYvjG5IYgsmMOxHkz8OsMSrVNWeq5T8DaOcbEv1Od5rbs9aO7YvMet63EkF++fMExq+MRl4/L5bLZN/+ez+fnZ6KazuMqXSQVO5spJXflHAIzes/xJseckRJiDMog9d6VfRrqXMr6KpVV27jRwJacGovOAM1zMdQMnwK1AubK63kdCChvI1C7g0z9nf/D+Xze2Vj8H7Gx4P9duQlsYCrqyN8XqG3Hm/10Oj3jw/n+crlstuM+jPmmxT2dTuPz83Pzt2pn1XsEHX/bnPaVqVmh0xwOt0o6XLLAHePUU203wHfcrspCwmV3TryB5s0Mseeg97x/BwzCjBlbB+pRAPla0BVQuT6V6QHdBlj3d0KG147b+DqxQeUymDO43W4dQar+TIjwmAd0z8/h65vf0/yLv3Pb5XLpru/ydDo9s7ET0I+Pj6dKK9VUEIeKWQWPAOrJ8LKd4vE+t91Y3e7UFlWatg2VwJnb+HPmtvm/sfK59/OaWF3x/eP1UPHvA5DDYDpYXfb0drv1V2DkBkxtw/tEWVVlXWdC9pFYs5/jfh9dS/16vW7s6lTG+TfqsxSJHxkXXq/Xdr1eu4LsfD6P3vsT3N77DkL+zPm5jSdKL4zR3AxQd6rHkLkYlSowsrq7znzu6wSwdsMJOXmA5fBcjxtgMGBYHlr5zokhtsMCTgXLQOW4XC6dEyEMprL8mAQzXRgduix2yZzorxkYsDn3hB1VeMLGsXsVtgl2pW8S3svk0vw7R4hNaHvv4cACl5HFzwIH0Kc6zu4XjDPR/jpAVxWzO1Xk2DDb3vTcxeGU1iWZHkmIDWziWKvirCJ4Dravs6IJ/GG6cTqWdXDy+fArQDVVkLqkVjAoZIITdmmIqXwqa95N3+MGYoZQdRVNO53Y1xRkhO16vY7eu507Ca9lJnbGpxOemQhSw/AQsmmp5zU9BiU8G6wvX76M6/U6Pj4+do0Bz4CpgiknTUeDqwlKBmg3u4OVjrZ1A+rAcgaejWq6eJCvCYFDONSwOgHX4EQRw8lxbzDOdEK6gZ3Hk1b+8g2o1JFtKXyv/fEdTXuWjWXdAZiBp6ADeDrCFiim7B6ZFneeI7Gvm/PMkUDX67W7xI8b0D7/v8dA9qfN5oaCf74WZjH0mf1cmfY1Y0JUFmVrTWu8uzkNcLtEj7u5FXBTkfC6GOA5q8YMxO8KVvF6sAVGdcrUbsKODcQKkLMOMdmlxum642YrPm26AlhZW1YB1R+rrGswE8TaYAWeUMxdf+WjwSvZ2Ef3ytOyfn5+PpVPAaqOn43MtNBqvmjjxbjM4lZjZY4gqNMI5ktaW/sYKNwS+9lFQzGihmMCKPa7+Z0V6Eb0GRmobtpX8JljWu5FMLN5ja6hG9kwQgZqf5+1NH5UxzkFReCdWhJ8XdlGUkxO7HRlYRm4mVO43W7ter12TPJEw/rmEN3L5SKHIWZg9mz+pUoKOYq5bJTJdX2gme1UcxMZQFaEQIlHct32M+Y1BzGkGuzfiyAN9z+ugplZ1symCrDCYYkGxDTpI9RzBy0rHyeDUC1nWaeUaD9n4xkNyYMBDZtzZ3B++fJlY21XFDOcARJlabOyiS3uCpLI9jrZjCDkaVvcCCjwognKShWdzXZWlZMvVTgD8LpqlCLrqgbcB+qYwrgKYpT0ccCqbKyCValkEabn/FynogCrPKfqf51xJ7sGB2ZXcZmxoSOztjx300DZi7a0/2AIR0UlBag9SuDw6KcAzlaB7vHZvWpjK90dyrq6bKyDUZQbR0B05biLQkHIcSUmgIK+SwuqgHCnoio2RQU1yj+BnBy9pphVKLGyC7ZzFK1pxWK+E8IhVCWLN/uLtnUU4ayoYLoaANz8FdtaSvY4pV0BEW2ls61czqllBKpTyKgMAhrZ1cdc1RROtPmvWNkdcKZ7ZKxaWjiPLJMpp7OZKxA+rqG/oJLjxf0pnJlqLoDZo3gyU0mKGys2taKecj/d1C+rJSplBqlTyAqgR+D8KjKlmRL2gtUcAdCtsL+ijCNT1oqqqkH2OHEbG5sDFnUg5Aa+yLou2VU1ptj1S2ZQqv1ORZN9IWzRfgaRBxKoBE8UWyqlJFtrIc0AxNjSjed99CTY/XDfSzCz5M0IZoVEsWnPFNTsl8ooVC1TzbGgqFZNDSgVwKK+1sGDMKqxZCWGVMDysiEr1jVSQJUYwj5iHOlThdHt44SQg9CN+nl8D90NMIgAdgr46JqRiR9I8vRdFvbr17m/yxUMKjNLMiVUADwu2CWGhhi+F55TWM9M9cogzms1dnM4uOF/LAEYWdcqnM7yFmyq3IfwmOROd7Y1iFWtOjoY8To41mTV5IysgFFuRzsbWFGbNIIJCDv1dOo4lZG7jWBwRFtVTKuWyeCByJKOan8oZ3ep9XddNl0tDuaywLz9cXPYeDAA0SpkBO9sbVcTOVWldPv4uyzEkzxHtjvonHoSkFEWNoo1d8DhcQputd2ppNon4BzoAiJ1hBFQg0dVtdbGHHDQWushmNEQukLM2QO1G2Y8bgTXqFhcBJj7EjPgcPts8US8qPpPB/dXznOh5Z438tzH5ec6QgrOKrRRfKmysBmUDB+PhYabMlVPER+GCSITTzr7am2tArH3bgcEzPJm+cr5jJ4NnHNFDVrFXcI5Le9k5Jnw+bedbV+FfRzZIHaOOaOsLY0/7UGs58DjrGwKMIMFIGzOEW1/jGsdAtCN6hEAI4hBe9YXeRROBSVPAVPAqvIM5bx5hVKWAMP6zBRy3iescridVdFBinBxXDnG2GRY2XbCvp1lhvGtO9Bxu5h908XQu42lnSArMFdizMim8uwRCxPGnnOS8lwpnbOiDqTAjsrRN/PcoAScCbaACqVM40ylnjjTBs+bwWlAG23/UKbdkiwKWIQPGzWaczpoSlxPEj822cNWkpS7FyzsDrqpfgpG3jahw2vgbaSQAxuLWZYt7JzyNe8JoZpNAcvDFOdw0wqYT9AK1rZz/DdbSlLPp0ryIxgQJlK9AZlEq7IOXpohg9PIhrCng88JsOxiV4ZWAYfg4sikx/8ky2Z9l862uqwrfscIH8+ugTmVGyiddeVYUgEMn4GZzg14EwIsh9sx2cKKiWXReuOE5gzGOQgdlRKVVdlevqb279Xq0Qnsts2VDaBO0coezsruWtHApu6sKG4IBhN0aGU2kLrMKGRTN3HmbCDwKV14zvkMEDG4QfZVspVlaNU2mhc5TEZ3N1h/zqTheuLpW05ZWTGVjb3dbnNmxKZBnN8JqidaVLKAOyARNLS+MB54Z2+VaqoMLKroVBlngefnTPAcoHNWCSvlfA8CI0HEmBNBnBlXyMrzU7A7WVm94PPqQ2gmqKx+WDGsnvilmcSOBJqOK1nYyAIzuAyesq3UdSK3KfWcYKD95HmfYOU3qser2CtYEUA+FpfqdNvgPBZUBhDrGONRVlQsh8rLcaUCykHG0OOUwTlLBrsh5soEMGezi1E4HRVt1icp5wZEFXdibCkG8Y8vX75sbO4E0iom9z+hjSiOfy3DhpXItpVhE+UGQdvoWjtChmrGHf4YAzKgBNnGtuJxFCeGdhUAfQLLK8kBYAP6gvFJZajMG3Xkycy8KuC0q4Eyymwtwdxdv2M0mIBtK0LKnf640j00Auq4gUkdWGlhs22qJc6dZCsL19oxnlTJG4SYVRIGpD8TPFBuM6OElbS1pldid4mGAyN6ZIupbC5bXJN9fdpbThSxLUaI8IG1XIYBxW3Tjs6KQosKcxfxcQmdnwRGM10GnFcCy2XYunLMyAkdgk4mePiczsLygthcBut6goOqS7YVFXADLjaosB6s6ofcZWAZSIRYqSUkizYwttYab3vUOQ9w2HRxIIg8WwRVeE68xi4UtL3zRphxplzwuZrcqYCq1I3jPI5dnJIygEohMbPqVJSzrwzxBJTs5zN+ReUSgxikPQVF3JVBeNQxbHENrEMNvEdFZVV9lH9+ORGEsNZQpyTNc4C3AG7XF4ngzq+DrO2zbuaaOXgdaFcdkEotoSFBVX2qJ0C8OWZeG4KGlpghA0XfTOPCqV2qqwQ26QWfF2PMLhI2w1lVAa2aPsYd0za25MQRwgcZN6uQDCi+ZxiD4XEM2kZxOT41FnZnaRlcpZouzlRqqdbQVWopQoSB58RV50lBNrHi/AwXS5LrwDVlpY3Fc3ByiYGc52Trist6kOXdwInAQtJpp5QchyaquYOV7Su+fxVMaV3dc0RE2S6mUY0gLt2pMcYqrKIQ9w2l1gpQUMtQYcmmbt5DTNxdhnUCjQqtbK9SUSzvrC0mmhhE1e2FS2+oxypy/ZASutkmtjx3vcBC24PX65nbqkBCRhfjS9kIYPnee8cMagVOhI/3T1fAmdtAWZsCswTJCkQVNa0qWKSKPOpHAUhD9DrbVcyoYkwqhvh17vYAayXLQyKGYdxlUDFp494rBXRjYgO17DDYetNIUj/ezp6S0lnlpEwsWmJMkOwsKXeZKEAjIHn0EQJISaRBcO6UMINz7p/bEjjnw4ft+xmDvksxX4G2rIris7qaeKwAFMP2Oi7n4criuZwtpSUwpfLxSnORSrIqusc5ZFaXysqRWjiZ2DyAWEIL35tVSoQElFACjOeGGSE7AHEQgdo/LSvCOgGBvkxsmDbvlS3Fp5vhaB2TAGqRKrKKMrhLVpaGzEVjZ0OQxDhaCTA+QyRR1d15aQzrJntL3RibsipjG6jlgL4yqbS0sNYg1e84vhbBVrElK64CUcWYXDfKxhpIuxiVJZUxsbMy/uRBKTNRQ4kQ3LdRYLS0rJjRPlTPqY6gdJsEDc+aQXAn+HgsNUCbRuF0Oj0zwnA7bWDkbhO5Ens00qeQhS1laBMl5M/cAaxsLF8rKyql+Tf7ELLEGu/ixiimdCvo0TjfpjKwaggen4eh5v7LokLKbLuyvHhcZG8dhGrEDx7Hg93ZppJF7qBqO3iVveXEDQNInzeoe8Yq6ePaZBZ2JviM3W2UAGotekRCAGq4EkF1X3DOnR11yRsBL1tRa0PVcZiNFXZ2c34FskvomInQQ6lzpJoZbJxk43NwKJFBquJSsrByHydxKOnTxQASBmS3j+JMnsHSla3Ec6K9VWoJVn9zfjwOM7hqYAAqJQwE2a3nA48J2QGegRkpZNivSY+ys3EkKd4oJIwsvIHl3cWgLt5k4NH6OmtLWdpurOkwEMupYc7eMtDRhOcI2ui5JhVIzXzLyto/GAPuZoyo8wkoduVgJglCt7OhGbgID4Mq4si+63zUS1FuFFXFlqyaj2emHlLMcBqYu0FMuR28BbB7lOxRMSiCQXFhCKuwkhZ+pYDiGSgbsKKV8MiSRsuHSIWM9rklRiIlZZuqXjsQK8ooYJMgq3JKWVkhHbhsVxFUzthOWPkYijcbx54IKsSdT+uLr3crGKyoYgFiGR9iBk4kfloUX+JIlQRQqabmpgnhqtpQpb6RVQ1WH5DnrS4hEoGZqaerQ2dhFbz8XePxShmDbo70eISjoorO2vK8SJXI4SUmEU4zWKDzUDtWTYw7xXlbSTEj4FRg7zKnKoGRALv0Gs9Tgc1BpCywGZRQAtqVz2xrBcAMzEpfZwFSa2G5W0QBFjSMapWAEFa3HcGN7CxDzECyIkJ97qwrqWNTWVo876PPsjPkj2wvgroM5lLZKMETKVql/CvnWVFiFa/SzJUQwkoZsr67Y6vlSRV3/2tmNTOY3vnaxYwMuoPKqdzR1w7IqHymlPxaAThfU7Ko2ZXYj4AYJHL+kNdKwRQYESTRa5fsUZ/rVC1TMTyWVyYoqNtuzaHsMyv2tvoarxdfqwYgU1axFo/cnql1FGsqK+uAROV8BX4GU8WcZTATi2q7Qcyi0O0V+GhWBMNRUkn8H1SsWVE5By3Gi0ECqUeJoBfAtDa4amkdXG37AGP5Ggeb84p7UazpoKRzdFzeQ8HkoHGxprKy/Hpm5t12p47J6xTYDEz7uINEXSuxYXvFskYAc+ySxH9sf5ftKzU6IbwVBcUGg5e5FMCEXSErZR0wGayV19woM9guPjTqJdVTqR4uE4nJnLldWVkECCZLd2VLF+xtamex7IpiriSDUpvrpn9lrwGMCHyppMH+ps6LILsuFGUj1XEOXiqbqSHPUKnClpWV68kqtURVNDY4TNaocykoYeTU5ngGEQa/S1DnnE4AeXMcKjHPAmFVjCBENaeyLVNHfr3px8xUstJ94hIpfH4HKE/eDaArK6lSyVVFbdt1gxTIVk3pppVlFXi4pEhVBTObquohU85MLXn1iahvUkHJjSCMc01tLFveVVBx0DodM6jftCu7DOtIzYxrc0qp1JGP2ayYFz2Gb6HvMrO8cnGtV6Gjm3uImSfD2GpWK6uowbZGMxFKQCo1pOMtcMXFpRst+hXGoAomF3sSTBGgTglbBKWwsQ3tZqaYSp0Z1CimRDWFcCJUPYJ00BI5FkKYNoifuQxmN88SWVXWLMaUqqqgC0BmQJR6sk3u9NCf6jYLXxAfqsYEgVLAhRY2AtgtflZNFmFyhxdrLkAdWlk4D88M2ixHyepIdhMHrG/iR1ZGtq0MGpbDbRPYOXeSY1M6Ny4ZstvGSktK+XbFPATj2D371saPEsAMXhXrsZ0km/XStkhhMyBfsa6uXFZe2VCe+YMr1+GKgwrQyNYq1VRrB+EizAow6NsdNKcyVEkYeM73ys6q4kAHp6BiFklTkIrVC5oYV7uzwOGCz4UJ0Stq2lWMJy4wtb+RetL6tZFicnJmBw5UjCvXXMZVJX2MQkbf+XN5EWd78Vz8/JEsMZTBiKNzsm1inLRUQ74H4NidaqI68j5sAFgxcRveC7ieLJXfQYxjZZ2CsiWFewZXJmBIlZ1tdtrX4hSuateKso/RZOtOKW2nmq1oTzeK6dRWAWu2NRVb4hq0SXm1GvtugHrbr5IXqmSktg5CuDE2MSlPwsY5kNE2Wp3AqiZbWVLAxiBF+2iBZbuNj6MB6rsMLC7FyasaYDyo7KkoPyEtw3pEMXfPvxAJi2jAQQgjrz0rLIZSWZlIoNhwd5xK4AR9mYNjWAaLrnuImJeBVN9zBORObVvbr+mTTfFSEJLSRnHo7hEJoIi8MFqjxmvgmF5URZz4zLFgZZ8Ctu2X7ggVccKm9gVxIsOHqxXgNMKnFWZYnf1dBnOhayXq17QwFlWW09eNKyVJFmXqaONGA5aCegMbJ3UUkGY1ic3nKWgjq8qfVYGQG1gRt6rs62a6HiqqUOqdesK5NmX4nGofJoiE1d0dF9lVVkvT1/kEEaaCoYOwFpcVcoLM+7669PxC9rWqktH0sWUYld0VCpuBZ/stVRcGgy9WX2+U1Qthi9SzAqSxzZsy+OiFzBYnySGV6Gku44rD8BCOZBV3BvD5+AKRHNwMEsB6EzHnJpkTAeiUlEGkcECeB6GDZTp5YEJTlvdrknxYjTllMkfNtXwDjM7uVjK5JXUUn43rrqpK2jytaxHW0M5G8DC8rtHMYs7KSgduVQMGTYFqFvVS6rkD3sDJ46afdYFwoq11AOKCBLhvwoUgc8IGANycR6knZrdJPdsuxnyjfd3FovTlRMdEdtOl5CMV5EHsXQBis7TOwvIDZaGj2Vnpbh7cpK63VwYEMLwqbjzyl699sawFFkF1yqjUU31HfC6sW1ZFVFuXVXVgz9keEaw0ys1lWfm+azQAQSWA+hKYVfsZjPncAcUB9oIayy/UZXRNckDGji77GsWbvBo6tPrWPqOyVkBUq+INeqpzNdYs/u0ifh5qmpqIW+33JVSUcwY70KL4U9lYdU6ljtSls7lmfi9g3YzeQfVkaGFaV3ODCnaD2N8wsEDFklE3RzM3ZghdYkWHsszq70FIecnKkVkt8ezMzRq9bkGuKojRLBVSod3Y1yPqKgYW7JRQTPVyy5xIYLjOgxgT52RKJUY1dOrIiRd4futQx/A5AcSmEjz0vFWrkLzvbWAu9HOWbGgxFk1VNTpnBKk6TgwisI/HcxYXP1uAWO72ULFlBTq+aSu2VTUs6hrxM2CF+hEor1VIA9ZmFUaab1lSSgZsVs4sxzHlVLoJHr9H4DhONTkI1XC0/wiY2NoWAG5RlnHFnq6oLccpQddMuJ/O17JVA5OHLi0BqCztq7Y1++ucCd98qLI8MIHBV/cKjxQTme3hFBS3MyCqnDsuym2o80HjvFFTtrURmNaGJsmVahImjTsUXKtQZTAVs7Mvv8/+fzUrZAXcLJ6M4koe6XP0b6SmWWNDzyUpQ8bl+LtWx4tuqZ36cRYV3yuVxPNwvIiqiQCSmu7srgTzR6nkyhpCarXwFy1vGd5iP2cY06lFr5Njhhg1Y6+NB28ftbK83s8rf7kLJbKwDFPbLg25a0AdZJEiqr5phixKMDlRUtcssq1hriLqGoH+zeNgVm9OemjsETV8JdF0NHnkIFxWY1OB4Yrp7rtWJ7NgAAAPXklEQVQ3oNs5nplyVf8u2FoLu1JrHveaZWQjqAkshtFa2gzsSG3Zpkbvg3HafF9slPPlldjFlK80Gysm8Mr4MPhneNWENPGjAIpmilTPATdTRTXlCBYHYAQuPwA36xIpWtGN4q3Y2MhiGsUpuSSnlEJRD8PorC7CFYVw+F51qThgabxsTxWzCGY0ZSsb3lfqAy0OPNjNy8xiQQKsHYFQ2HBZVvVbBuq3m1oWKajqaonsM6uZUr6CjXWNZ0l5E3h3jURma6kP3MJIiy1Lm+kahQq41N2iZja5sjtlLYNZHZrH6qUGm4vMbDp6Rw2CFmvuyFkrBcCyMtFqBaECmsHoK9BZ2LA/lJcRqSaDqnaWbrZdGaz3DLgIvBln4woGztbyJGqslwxkhhHrTjTYFXCtOoKS8uLdofVdAbOylGU6nlYpXWZts4nXBq6WxJitMNokHUJnbnJplQm+aGpY2a5GMV2QD1hRubBPFKdumf5OHkLHz0F9luE5kjBjRa0nFE5CUGqHw32MmjZ6xkgINVnSnZ1VZStK2qKlRaLlQgK7uTq7JFXJwM+3SOEKyhZNI+tJ0I5qMYy9k2qJD7dVWdqKXa0CKNR0Ccjg+B2IYu2fcBZJZkMFgM11r0X92wilghFGgzVnexlqB7xL9mS29SiYUVY2nXOZjNBRsyDsQPRWW5hrZ4XcdC4HVWRbjgJr4sFofK5SzjQ7rhI1UebdPdEbj6sqIvTZQZ5va08rABsAW0UxeWytAk7A2KJ9ZpxzCioB24XFtYAeXYxr6anSqhLgppEqWbGwLunTgrV+IjWlL29ljaAl4EQMGsErp4apeZiquwRXLXAqOCeru32mmydc6oWTSWpFAGdzeTB8RTHVMEtlM90CbbQCYhPjq3egYr1FGdYIQjiuDGZ5zZ/AzobKGOyLxti6c4Rwtv2anyWlLICnlLhxJRXt6A5ebDBWFNONbxWZ2d02mnu4S9YECpeppV1zSWRBWxHYzVIv1CXSouwqqX3jBBBDZdYQbpTQW4ZQlS8r5kH4suSRmg2++3JN10x1PaAmEkmtYlEdeGpJEM6kOuCqCR22oSujj5IV2HdT0zj5prLKTjXFAPjdQlyq7xIBxAQP5yMczG4VxAKw0n6ilZ2QBce2pLulkuxxqnoIzFfgqyqjil9S1VNwBrFmeyeops8yOjZUybZdfS8CuaTIJumzs5tODaNtLpFDQ/PcJGweLhmeL1nB0KqiUDScsiUVD89Di3HtrKtSULw3RLiygZD+7sF8JTObgYsrGvDNUFRGl1iy0Ll1YkUc2aJYMog920I8qW6YDCg1Mqk0JHJFKXkbgbRreI+qpYNOZHrVcDUba7pjsphSJNtK6upgRNAVoOS0mugBeN4bIZgHhuPZ/s1ENaX6KsVr+YNrh1Nb7ipR0PE5zbNRegCbrHRUw6Yf07dLBJl1f8KB9as2V1nNqAsl62LBBhehwalerkHmB1JFIEZKSEusdl5JQj1nJlHXSCF342gJ9CYGrXelknJIXqVP8sD+qtplCR3XH2qfKq0ygMp+KnVkKxNlZ8m2YkIlVMiCnXUwl7qznBKSvQz3m3Pt6oQbXO5b5FixCh/fHxUQW/AEcK6zCNqKQnL9sywqmKuwvqSYzT/aPVNNpVyhvRW21aqciCsjdWvBwILUvh5VyCzbWoC1pJjJ680CWsl+udKB6T5RwG1mlohnlpbg47iz5U9ha0FGtmRLFYBtO99y97Ap0z+ZDTAog6kSLZsMHg/IFkkgp6CpvU2U0cYVSdnmkjwBdOmXbxTWNWzuIbipMioVxEckZEoahSOiy2M3K0jcC1LhVDwaqG0ZvkcWqCnrG4GIxykrqlbWdw6LQyBaZR8HmLRIhQWsHswD42ZXVLNkf9l+FlW0HVQ2lwFsC/Z1FdzlQR0KaPfo+Fdfu+/dwVRICu1CGR7AEIiAhc+AZUF0kOBaPxmUqg4i64vQnU4nFDYJ9Nz+1fVXveH9qmr+kPILx8oKcRV/BFbxbE0JMT0kSD4w6L/lNY8ocsqagVdU3A3MjxhxcGuqzsPH4irpaow1q6OyrVjvp9Npc59E91LldboYVzJWdimWfAW2SNEKcDaX2FmBLLA/uKxlmhh613Is1URQApbKfttwxL02q6Onx5pQxSbPojAg+v5hAnN6LHVRDXIsvKtRjiS0qJUyZTAXVbAK82ElFJWaQdVoqUC1Unt7BVaTQudM6SuqexjQJN4+0icaxv/utbKv83ETbT8H8gjcOKxOJmbUa6OOVXht3dFY6rHv9XoNzFLceEA1o8+pKm0LAHPHZ2rYKjFq0hfZFixsqHJgD3eD5n+U0kb1mFjXkn2lvMSSOsNE/CdIAKF0Sytq6urOHUN5gwg4GZosgbmggM5ucra2qrS2Ig1cbiBBcxYzgzUDNLCvL8GbZXNp6ORy3LmS+Kk83zRIAK6A1ioKa2I9NapIuiUFdfC9766PFZUtqUr6KbWk+zZU1a/ZrIXEztrjTOfz7hwKziCeXIaraHtbZIMz+2pGgazCmw4qWAFvEdhodYp0Xq0pV7G1YWYWbO4qhGq42+Z8BYtrLWvluNPpZAeaFFS1vubPgbgxsqcpnAaszBovKaFoDQ8BGtjfUOl4NAG2nmQV04feJgumvX2fsrQEWZghL0JnVdYkn3DOZIeRN86RqPWCmsvGVqEMRnwxQAxwS8EMYo3IzmY2+BCcLp4MKiuyuhImamlbZFcNoNl7tp+RHd18ZjQIRKyXdFRhN98/hyKqwXWNo7O1wiaXoHN108REZZWEq6grnIfjzeg8jdRf1XEL4kkXa5bBjKxoKaljBjeHlVxQ4GaycpW4lDOAKtnTxHAtOfzOtZwHAM7sqVXkV6yu6kap1nHkXKqWF/4XHqjenNKqBjpR3l1ch3Ejg1+EsgdQhsdG0B4FM9sWAVWpuAyiwTPleZxt9VyZVS2qXfReWqTAilpr9ApoWTjxymit7NwV4JTriZyOA9B0k7HFfULourmKYHVnRQvqGL5HMHdqFcR2qWpmcK6eTwx2dipWrviDilr+fKWq3OWRWdHKwA4eu8wjchbeRzFilqjjZN3ufCpfkJ0/scVpnYk6L0PI77lxdWCZ87WiWm7B/AGquQSnujGKsB8CJmiJq8q1pKIVWyqOiTK66r18BN8r74/AE71fdC3yPS2MxdOpnE1tlVxD9JmVOoggN+r4PjAXVFPa3Eg5jVJGFVUGNolH20GVrUB7BOySWq6WqYQdWR92pcFMYMwckbSgCKCqD67DiiWu1g8MQC9ByfcFqW1L+jL714qNCuznoSxt0da2gtWN1G8F0BK0NN0nuimelUF9dIdAfjO44UT3CjQLoUeLHJFTO3gmpRuIIOvwBQCbqNeo3qtZ9iF6xVK13GRlo4zqimq+CGdTiR1uRY8oqgE02hZBa79kZXPMquxRHKla2saZWN4mRqZUj0vLCKhkjKnqOQHNuSZVJoKvAqS1wpEquvWDC1B2ypwrCPsRMEPVTODMLJMDv6qeKXwi2JYV5Sq4qKyvgGsHCLiuj2jR59V8gMqSJ2FJZRXEHVRHj3sFPrct6OpqlW1GpatQdt0GvwfM6n63InsGVFhJGaBqgqqIV6IsXllZgySPq4R3bnt3wi5cv+cN2yqQLW1T95KYVsWWtKk4cB9W53WQQflQYR6Wl4HaJZjvVE0D5yvq+RKgZCs5qdBEP5sD94cAvQLlSgNaSMAtHx88BuNQ41zdFsX30zKbcs0MLD/ihkpQzl0wiTqKLTfbKmCmyYICnK0IbaieC4CG9iSyLQ7cIMGQwau6TKoq60Apl3WN40LZpca1CKKK9VQyyIEn8w0F8F6CL2h8o3ixGwC7s7EWzCOqmcApYxYD4jsAzVS0sl2t98pA7vrKophCVSonbYpgH6mvSn24pTBV4sdtV3BtMq5k82y+IADvUJ0uAlkCVTxIaPm+UNu/qkV4F1TzHXCGrXIAqItBKypqK99VtAOVs64O4ObX7pHLVCpYHcRmwvLR7TvYAKBBN58LGVzDuFz+hQbWgncQyCZAk+VbsPSouf93261iZgmfCpwRbAvqmSqriU2PwhjaoOyYqtIegVXViTsmyta6bGySpY3gyRrpIyAeaWDDxtpsXwKyalMDKNP7YBXMqEskUsi2uC8FNAPxAKTVfT1o6VzM0E0jF+1rWcUuHvdyg7vgoFplX8HpvHpMCOMRUPHzZkInsqlFKNX/EIO52E0SxSzOwob2VmRLW5D1XIU0rbgM1AzWgyC7fe8G7xUAK/taEBat7luqtyP7EmsaJQOj5F+mrnZfCuYCfBUAWwShyd6pMY/vAHG1UqOYpbI/gy5T0CMKm+UO3gFuC85dgfDVeguPDfITrIBLsLrcgdh3CFgFZjaKJ4Iv3F8ANEqvuxR1tVKOgLoCa1jxboBAkj6v7j/icFbA7f4rfRnQDLRViG13i0vqBQrYVqBbADZT0ZpiHoSzvQpopKIFS3sE1HfBWlHXd0H7LnArqvougMtljHBgZnh3Eoz/BKjLML4Z2Aq0+hEJr9jaVUBbvNzCIUiroC7AWmmFw4o5AK3MtB5VypZMSFgs05JyGVwlwBqsEGAAa2ZU1CjUexXGsE4rKriilBvFzOKKo3AuAroE6QFQU3u8YpNXwS5k+1TZt5UrwouN4KiUEw+k3ZWDp1RXHNRqXb21Ts39945yZSg3VnZFNQ9CF3XeZyr5DgBXKiwCMa2MxeTDYXgP1Fsf9QNKZc0k81RJk3r6EQ3rCmBVyLL75EjZ1pIVDHoFtiOAHoB0BdTVylqBsKKKS+AeBXJVLY+CXASuGvO/Auq7GuEjDfGKg1oKa1z/dmmi9I9SUGNhl0AtfulHAawoYrnSkmNXAVuGEhrEVXvUF+A5Ct2PqNOjDetyna4CmeUolmeXLN4Aq7C5Sj10Q7yjgl+t6CNxSRHmI5X+CpwreYB3Qfdqna4q21KdBuc4GoZsn49ZOOiVinwHqK9WzjvgeweEh2AU5+vtxZ9Cd9Wqkh49V18E5oj6vVyn0RStAyGIO5edXRKd5B0VGVXq2yr3xYp+5Ut+C4QJ4P1N339pQMjRejj4vb/Dcr6rQc3O/0rjmtZpeYCBiCHfCemRbNhbK/pNUPc3wfKy5f2D7OlL3/uPhve/oU4T0F8f+VNM2vyoiv0jK+KHQfdHq+0bncz4oz73/+Y6LbKw1o/5B7eOf1Rl/0du9B9tn/9bvrf/j+v0h6ttn2tp/r/4819y4/zv5391uvzzfwDifz6phT1MPgAAAABJRU5ErkJggg==");background-size:100% 100%;border:none;cursor:pointer;direction:ltr;height:130px;touch-action:manipulation;width:100%}.color-picker .cp-add-color-button-class{background:transparent;border:0;cursor:pointer;display:inline;margin:3px -3px;padding:0;position:absolute}.color-picker .cp-add-color-button-class:hover{text-decoration:underline}.color-picker .cp-add-color-button-class:disabled{color:#999;cursor:not-allowed}.color-picker .cp-add-color-button-class:disabled:hover{text-decoration:none}.color-picker .cp-remove-color-button-class{background:#fff;border-radius:50%;box-shadow:1px 1px 5px #333;cursor:pointer;display:block;height:10px;position:absolute;right:-5px;text-align:center;top:-5px;width:10px}.color-picker .cp-remove-color-button-class:before{bottom:3.5px;content:"x";display:inline-block;font-size:10px;position:relative}'],encapsulation:2}),t})(),mv=(()=>{class t{constructor(t,e,i,n,s,o){this.injector=t,this.cfr=e,this.appRef=i,this.vcRef=n,this.elRef=s,this._service=o,this.dialogCreated=!1,this.ignoreChanges=!1,this.viewAttachedToAppRef=!1,this.cpWidth="230px",this.cpHeight="auto",this.cpToggle=!1,this.cpDisabled=!1,this.cpIgnoredElements=[],this.cpFallbackColor="",this.cpColorMode="color",this.cpCmykEnabled=!1,this.cpOutputFormat="auto",this.cpAlphaChannel="enabled",this.cpDisableInput=!1,this.cpDialogDisplay="popup",this.cpSaveClickOutside=!0,this.cpCloseClickOutside=!0,this.cpUseRootViewContainer=!1,this.cpPosition="auto",this.cpPositionOffset="0%",this.cpPositionRelativeToArrow=!1,this.cpOKButton=!1,this.cpOKButtonText="OK",this.cpOKButtonClass="cp-ok-button-class",this.cpCancelButton=!1,this.cpCancelButtonText="Cancel",this.cpCancelButtonClass="cp-cancel-button-class",this.cpPresetLabel="Preset colors",this.cpPresetColorsClass="cp-preset-colors-class",this.cpMaxPresetColorsLength=6,this.cpPresetEmptyMessage="No colors added",this.cpPresetEmptyMessageClass="preset-empty-message",this.cpAddColorButton=!1,this.cpAddColorButtonText="Add color",this.cpAddColorButtonClass="cp-add-color-button-class",this.cpRemoveColorButtonClass="cp-remove-color-button-class",this.cpInputChange=new r.o(!0),this.cpToggleChange=new r.o(!0),this.cpSliderChange=new r.o(!0),this.cpSliderDragEnd=new r.o(!0),this.cpSliderDragStart=new r.o(!0),this.colorPickerOpen=new r.o(!0),this.colorPickerClose=new r.o(!0),this.colorPickerCancel=new r.o(!0),this.colorPickerSelect=new r.o(!0),this.colorPickerChange=new r.o(!1),this.cpCmykColorChange=new r.o(!0),this.cpPresetColorsChange=new r.o(!0)}handleClick(){this.inputFocus()}handleFocus(){this.inputFocus()}handleInput(t){this.inputChange(t)}ngOnDestroy(){null!=this.cmpRef&&(this.viewAttachedToAppRef&&this.appRef.detachView(this.cmpRef.hostView),this.cmpRef.destroy(),this.cmpRef=null,this.dialog=null)}ngOnChanges(t){t.cpToggle&&!this.cpDisabled&&(t.cpToggle.currentValue?this.openDialog():t.cpToggle.currentValue||this.closeDialog()),t.colorPicker&&(this.dialog&&!this.ignoreChanges&&("inline"===this.cpDialogDisplay&&this.dialog.setInitialColor(t.colorPicker.currentValue),this.dialog.setColorFromString(t.colorPicker.currentValue,!1),this.cpUseRootViewContainer&&"inline"!==this.cpDialogDisplay&&this.cmpRef.changeDetectorRef.detectChanges()),this.ignoreChanges=!1),(t.cpPresetLabel||t.cpPresetColors)&&this.dialog&&this.dialog.setPresetConfig(this.cpPresetLabel,this.cpPresetColors)}openDialog(){if(this.dialogCreated)this.dialog&&this.dialog.openDialog(this.colorPicker);else{let t=this.vcRef;if(this.dialogCreated=!0,this.viewAttachedToAppRef=!1,this.cpUseRootViewContainer&&"inline"!==this.cpDialogDisplay){const e=this.injector.get(this.appRef.componentTypes[0],r.t.NULL);e!==r.t.NULL?(t=e.vcRef||e.viewContainerRef||this.vcRef,t===this.vcRef&&console.warn("You are using cpUseRootViewContainer, but the root component is not exposing viewContainerRef!Please expose it by adding 'public vcRef: ViewContainerRef' to the constructor.")):this.viewAttachedToAppRef=!0}const e=this.cfr.resolveComponentFactory(fv);if(this.viewAttachedToAppRef)this.cmpRef=e.create(this.injector),this.appRef.attachView(this.cmpRef.hostView),document.body.appendChild(this.cmpRef.hostView.rootNodes[0]);else{const i=r.G.fromResolvedProviders([],t.parentInjector);this.cmpRef=t.createComponent(e,0,i,[])}this.cmpRef.instance.setupDialog(this,this.elRef,this.colorPicker,this.cpWidth,this.cpHeight,this.cpDialogDisplay,this.cpFallbackColor,this.cpColorMode,this.cpCmykEnabled,this.cpAlphaChannel,this.cpOutputFormat,this.cpDisableInput,this.cpIgnoredElements,this.cpSaveClickOutside,this.cpCloseClickOutside,this.cpUseRootViewContainer,this.cpPosition,this.cpPositionOffset,this.cpPositionRelativeToArrow,this.cpPresetLabel,this.cpPresetColors,this.cpPresetColorsClass,this.cpMaxPresetColorsLength,this.cpPresetEmptyMessage,this.cpPresetEmptyMessageClass,this.cpOKButton,this.cpOKButtonClass,this.cpOKButtonText,this.cpCancelButton,this.cpCancelButtonClass,this.cpCancelButtonText,this.cpAddColorButton,this.cpAddColorButtonClass,this.cpAddColorButtonText,this.cpRemoveColorButtonClass,this.elRef),this.dialog=this.cmpRef.instance,this.vcRef!==t&&this.cmpRef.changeDetectorRef.detectChanges()}}closeDialog(){this.dialog&&"popup"===this.cpDialogDisplay&&this.dialog.closeDialog()}cmykChanged(t){this.cpCmykColorChange.emit(t)}stateChanged(t){this.cpToggleChange.emit(t),t?this.colorPickerOpen.emit(this.colorPicker):this.colorPickerClose.emit(this.colorPicker)}colorChanged(t,e=!0){this.ignoreChanges=e,this.colorPickerChange.emit(t)}colorSelected(t){this.colorPickerSelect.emit(t)}colorCanceled(){this.colorPickerCancel.emit()}inputFocus(){const t=this.elRef.nativeElement,e=this.cpIgnoredElements.filter(e=>e===t);this.cpDisabled||e.length||("undefined"!=typeof document&&t===document.activeElement?this.openDialog():this.dialog&&this.dialog.show?this.closeDialog():this.openDialog())}inputChange(t){this.dialog?this.dialog.setColorFromString(t.target.value,!0):(this.colorPicker=t.target.value,this.colorPickerChange.emit(this.colorPicker))}inputChanged(t){this.cpInputChange.emit(t)}sliderChanged(t){this.cpSliderChange.emit(t)}sliderDragEnd(t){this.cpSliderDragEnd.emit(t)}sliderDragStart(t){this.cpSliderDragStart.emit(t)}presetColorsChanged(t){this.cpPresetColorsChange.emit(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.t),r.Pb(r.j),r.Pb(r.g),r.Pb(r.S),r.Pb(r.l),r.Pb(pv))},t.\u0275dir=r.Kb({type:t,selectors:[["","colorPicker",""]],hostBindings:function(t,e){1&t&&r.cc("click",function(){return e.handleClick()})("focus",function(){return e.handleFocus()})("input",function(t){return e.handleInput(t)})},inputs:{cpWidth:"cpWidth",cpHeight:"cpHeight",cpToggle:"cpToggle",cpDisabled:"cpDisabled",cpIgnoredElements:"cpIgnoredElements",cpFallbackColor:"cpFallbackColor",cpColorMode:"cpColorMode",cpCmykEnabled:"cpCmykEnabled",cpOutputFormat:"cpOutputFormat",cpAlphaChannel:"cpAlphaChannel",cpDisableInput:"cpDisableInput",cpDialogDisplay:"cpDialogDisplay",cpSaveClickOutside:"cpSaveClickOutside",cpCloseClickOutside:"cpCloseClickOutside",cpUseRootViewContainer:"cpUseRootViewContainer",cpPosition:"cpPosition",cpPositionOffset:"cpPositionOffset",cpPositionRelativeToArrow:"cpPositionRelativeToArrow",cpOKButton:"cpOKButton",cpOKButtonText:"cpOKButtonText",cpOKButtonClass:"cpOKButtonClass",cpCancelButton:"cpCancelButton",cpCancelButtonText:"cpCancelButtonText",cpCancelButtonClass:"cpCancelButtonClass",cpPresetLabel:"cpPresetLabel",cpPresetColorsClass:"cpPresetColorsClass",cpMaxPresetColorsLength:"cpMaxPresetColorsLength",cpPresetEmptyMessage:"cpPresetEmptyMessage",cpPresetEmptyMessageClass:"cpPresetEmptyMessageClass",cpAddColorButton:"cpAddColorButton",cpAddColorButtonText:"cpAddColorButtonText",cpAddColorButtonClass:"cpAddColorButtonClass",cpRemoveColorButtonClass:"cpRemoveColorButtonClass",colorPicker:"colorPicker",cpPresetColors:"cpPresetColors"},outputs:{cpInputChange:"cpInputChange",cpToggleChange:"cpToggleChange",cpSliderChange:"cpSliderChange",cpSliderDragEnd:"cpSliderDragEnd",cpSliderDragStart:"cpSliderDragStart",colorPickerOpen:"colorPickerOpen",colorPickerClose:"colorPickerClose",colorPickerCancel:"colorPickerCancel",colorPickerSelect:"colorPickerSelect",colorPickerChange:"colorPickerChange",cpCmykColorChange:"cpCmykColorChange",cpPresetColorsChange:"cpPresetColorsChange"},exportAs:["ngxColorPicker"],features:[r.Bb]}),t})(),gv=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[pv],imports:[[Et]]}),t})();var Av=i("2Vo4");const bv=(()=>{function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t})();var vv=i("EQ5u");function _v(t,e){let i=!1;return arguments.length>=2&&(i=!0),function(n){return n.lift(new yv(t,e,i))}}class yv{constructor(t,e,i=!1){this.accumulator=t,this.seed=e,this.hasSeed=i}call(t,e){return e.subscribe(new wv(t,this.accumulator,this.seed,this.hasSeed))}}class wv extends Ee.a{constructor(t,e,i,n){super(t),this.accumulator=e,this._seed=i,this.hasSeed=n,this.index=0}get seed(){return this._seed}set seed(t){this.hasSeed=!0,this._seed=t}_next(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)}_tryNext(t){const e=this.index++;let i;try{i=this.accumulator(this.seed,t,e)}catch(n){this.destination.error(n)}this.seed=i,this.destination.next(i)}}function xv(t){return function(e){return 0===t?Ye():e.lift(new Cv(t))}}class Cv{constructor(t){if(this.total=t,this.total<0)throw new We}call(t,e){return e.subscribe(new Sv(t,this.total))}}class Sv extends Ee.a{constructor(t,e){super(t),this.total=e,this.ring=new Array,this.count=0}_next(t){const e=this.ring,i=this.total,n=this.count++;e.length<i?e.push(t):e[n%i]=t}_complete(){const t=this.destination;let e=this.count;if(e>0){const i=this.count>=this.total?this.total:this.count,n=this.ring;for(let r=0;r<i;r++){const r=e++%i;t.next(n[r])}}t.complete()}}function kv(t=Iv){return e=>e.lift(new Ev(t))}class Ev{constructor(t){this.errorFactory=t}call(t,e){return e.subscribe(new Dv(t,this.errorFactory))}}class Dv extends Ee.a{constructor(t,e){super(t),this.errorFactory=e,this.hasValue=!1}_next(t){this.hasValue=!0,this.destination.next(t)}_complete(){if(this.hasValue)return this.destination.complete();{let t;try{t=this.errorFactory()}catch($nt){t=$nt}this.destination.error(t)}}}function Iv(){return new bv}function Pv(t=null){return e=>e.lift(new Ov(t))}class Ov{constructor(t){this.defaultValue=t}call(t,e){return e.subscribe(new Mv(t,this.defaultValue))}}class Mv extends Ee.a{constructor(t,e){super(t),this.defaultValue=e,this.isEmpty=!0}_next(t){this.isEmpty=!1,this.destination.next(t)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}var Tv=i("SpAZ");function Rv(t,e){const i=arguments.length>=2;return n=>n.pipe(t?He((e,i)=>t(e,i,n)):Tv.a,Qe(1),i?Pv(e):kv(()=>new bv))}var Vv=i("x+ZX");class Fv{constructor(t,e){this.id=t,this.url=e}}class Lv extends Fv{constructor(t,e,i="imperative",n=null){super(t,e),this.navigationTrigger=i,this.restoredState=n}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class Uv extends Fv{constructor(t,e,i){super(t,e),this.urlAfterRedirects=i}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class Bv extends Fv{constructor(t,e,i){super(t,e),this.reason=i}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class Nv extends Fv{constructor(t,e,i){super(t,e),this.error=i}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class jv extends Fv{constructor(t,e,i,n){super(t,e),this.urlAfterRedirects=i,this.state=n}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class zv extends Fv{constructor(t,e,i,n){super(t,e),this.urlAfterRedirects=i,this.state=n}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Hv extends Fv{constructor(t,e,i,n,r){super(t,e),this.urlAfterRedirects=i,this.state=n,this.shouldActivate=r}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class Kv extends Fv{constructor(t,e,i,n){super(t,e),this.urlAfterRedirects=i,this.state=n}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class $v extends Fv{constructor(t,e,i,n){super(t,e),this.urlAfterRedirects=i,this.state=n}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Gv{constructor(t){this.route=t}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class Wv{constructor(t){this.route=t}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Zv{constructor(t){this.snapshot=t}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class qv{constructor(t){this.snapshot=t}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Yv{constructor(t){this.snapshot=t}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Qv{constructor(t){this.snapshot=t}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Xv{constructor(t,e,i){this.routerEvent=t,this.position=e,this.anchor=i}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}class Jv{constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e[0]:e}return null}getAll(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}}function t_(t){return new Jv(t)}function e_(t){const e=Error("NavigationCancelingError: "+t);return e.ngNavigationCancelingError=!0,e}function i_(t,e,i){const n=i.path.split("/");if(n.length>t.length)return null;if("full"===i.pathMatch&&(e.hasChildren()||n.length<t.length))return null;const r={};for(let s=0;s<n.length;s++){const e=n[s],i=t[s];if(e.startsWith(":"))r[e.substring(1)]=i;else if(e!==i.path)return null}return{consumed:t.slice(0,n.length),posParams:r}}function n_(t,e){const i=t?Object.keys(t):void 0,n=e?Object.keys(e):void 0;if(!i||!n||i.length!=n.length)return!1;let r;for(let s=0;s<i.length;s++)if(r=i[s],!r_(t[r],e[r]))return!1;return!0}function r_(t,e){if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;const i=[...t].sort(),n=[...e].sort();return i.every((t,e)=>n[e]===t)}return t===e}function s_(t){return Array.prototype.concat.apply([],t)}function o_(t){return t.length>0?t[t.length-1]:null}function a_(t,e){for(const i in t)t.hasOwnProperty(i)&&e(t[i],i)}function l_(t){return Object(r.tb)(t)?t:Object(r.ub)(t)?Object(On.a)(Promise.resolve(t)):Se(t)}function c_(t,e,i){return i?function(t,e){return n_(t,e)}(t.queryParams,e.queryParams)&&h_(t.root,e.root):function(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every(i=>r_(t[i],e[i]))}(t.queryParams,e.queryParams)&&u_(t.root,e.root)}function h_(t,e){if(!g_(t.segments,e.segments))return!1;if(t.numberOfChildren!==e.numberOfChildren)return!1;for(const i in e.children){if(!t.children[i])return!1;if(!h_(t.children[i],e.children[i]))return!1}return!0}function u_(t,e){return d_(t,e,e.segments)}function d_(t,e,i){if(t.segments.length>i.length)return!!g_(t.segments.slice(0,i.length),i)&&!e.hasChildren();if(t.segments.length===i.length){if(!g_(t.segments,i))return!1;for(const i in e.children){if(!t.children[i])return!1;if(!u_(t.children[i],e.children[i]))return!1}return!0}{const n=i.slice(0,t.segments.length),r=i.slice(t.segments.length);return!!g_(t.segments,n)&&!!t.children.primary&&d_(t.children.primary,e,r)}}class p_{constructor(t,e,i){this.root=t,this.queryParams=e,this.fragment=i}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=t_(this.queryParams)),this._queryParamMap}toString(){return v_.serialize(this)}}class f_{constructor(t,e){this.segments=t,this.children=e,this.parent=null,a_(e,(t,e)=>t.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return __(this)}}class m_{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=t_(this.parameters)),this._parameterMap}toString(){return E_(this)}}function g_(t,e){return t.length===e.length&&t.every((t,i)=>t.path===e[i].path)}class A_{}class b_{parse(t){const e=new M_(t);return new p_(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){var e;return`/${y_(t.root,!0)}${function(t){const e=Object.keys(t).map(e=>{const i=t[e];return Array.isArray(i)?i.map(t=>`${x_(e)}=${x_(t)}`).join("&"):`${x_(e)}=${x_(i)}`});return e.length?`?${e.join("&")}`:""}(t.queryParams)}${"string"==typeof t.fragment?`#${e=t.fragment,encodeURI(e)}`:""}`}}const v_=new b_;function __(t){return t.segments.map(t=>E_(t)).join("/")}function y_(t,e){if(!t.hasChildren())return __(t);if(e){const e=t.children.primary?y_(t.children.primary,!1):"",i=[];return a_(t.children,(t,e)=>{"primary"!==e&&i.push(`${e}:${y_(t,!1)}`)}),i.length>0?`${e}(${i.join("//")})`:e}{const e=function(t,e){let i=[];return a_(t.children,(t,n)=>{"primary"===n&&(i=i.concat(e(t,n)))}),a_(t.children,(t,n)=>{"primary"!==n&&(i=i.concat(e(t,n)))}),i}(t,(e,i)=>"primary"===i?[y_(t.children.primary,!1)]:[`${i}:${y_(e,!1)}`]);return 1===Object.keys(t.children).length&&null!=t.children.primary?`${__(t)}/${e[0]}`:`${__(t)}/(${e.join("//")})`}}function w_(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function x_(t){return w_(t).replace(/%3B/gi,";")}function C_(t){return w_(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function S_(t){return decodeURIComponent(t)}function k_(t){return S_(t.replace(/\+/g,"%20"))}function E_(t){return`${C_(t.path)}${e=t.parameters,Object.keys(e).map(t=>`;${C_(t)}=${C_(e[t])}`).join("")}`;var e}const D_=/^[^\/()?;=#]+/;function I_(t){const e=t.match(D_);return e?e[0]:""}const P_=/^[^=?&#]+/,O_=/^[^?&#]+/;class M_{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new f_([],{}):new f_([],this.parseChildren())}parseQueryParams(){const t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(i.primary=new f_(t,e)),i}parseSegment(){const t=I_(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);return this.capture(t),new m_(S_(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=I_(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const t=I_(this.remaining);t&&(i=t,this.capture(i))}t[S_(e)]=S_(i)}parseQueryParam(t){const e=function(t){const e=t.match(P_);return e?e[0]:""}(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const t=function(t){const e=t.match(O_);return e?e[0]:""}(this.remaining);t&&(i=t,this.capture(i))}const n=k_(e),r=k_(i);if(t.hasOwnProperty(n)){let e=t[n];Array.isArray(e)||(e=[e],t[n]=e),e.push(r)}else t[n]=r}parseParens(t){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const i=I_(this.remaining),n=this.remaining[i.length];if("/"!==n&&")"!==n&&";"!==n)throw new Error(`Cannot parse url '${this.url}'`);let r;i.indexOf(":")>-1?(r=i.substr(0,i.indexOf(":")),this.capture(r),this.capture(":")):t&&(r="primary");const s=this.parseChildren();e[r]=1===Object.keys(s).length?s.primary:new f_([],s),this.consumeOptional("//")}return e}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)}capture(t){if(!this.consumeOptional(t))throw new Error(`Expected "${t}".`)}}class T_{constructor(t){this._root=t}get root(){return this._root.value}parent(t){const e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}children(t){const e=R_(t,this._root);return e?e.children.map(t=>t.value):[]}firstChild(t){const e=R_(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=V_(t,this._root);return e.length<2?[]:e[e.length-2].children.map(t=>t.value).filter(e=>e!==t)}pathFromRoot(t){return V_(t,this._root).map(t=>t.value)}}function R_(t,e){if(t===e.value)return e;for(const i of e.children){const e=R_(t,i);if(e)return e}return null}function V_(t,e){if(t===e.value)return[e];for(const i of e.children){const n=V_(t,i);if(n.length)return n.unshift(e),n}return[]}class F_{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}}function L_(t){const e={};return t&&t.children.forEach(t=>e[t.value.outlet]=t),e}class U_ extends T_{constructor(t,e){super(t),this.snapshot=e,K_(this,t)}toString(){return this.snapshot.toString()}}function B_(t,e){const i=function(t,e){const i=new z_([],{},{},"",{},"primary",e,null,t.root,-1,{});return new H_("",new F_(i,[]))}(t,e),n=new Av.a([new m_("",{})]),r=new Av.a({}),s=new Av.a({}),o=new Av.a({}),a=new Av.a(""),l=new N_(n,r,o,a,s,"primary",e,i.root);return l.snapshot=i.root,new U_(new F_(l,[]),i)}class N_{constructor(t,e,i,n,r,s,o,a){this.url=t,this.params=e,this.queryParams=i,this.fragment=n,this.data=r,this.outlet=s,this.component=o,this._futureSnapshot=a}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(Object(Ge.a)(t=>t_(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(Object(Ge.a)(t=>t_(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function j_(t,e="emptyOnly"){const i=t.pathFromRoot;let n=0;if("always"!==e)for(n=i.length-1;n>=1;){const t=i[n],e=i[n-1];if(t.routeConfig&&""===t.routeConfig.path)n--;else{if(e.component)break;n--}}return function(t){return t.reduce((t,e)=>({params:Object.assign(Object.assign({},t.params),e.params),data:Object.assign(Object.assign({},t.data),e.data),resolve:Object.assign(Object.assign({},t.resolve),e._resolvedData)}),{params:{},data:{},resolve:{}})}(i.slice(n))}class z_{constructor(t,e,i,n,r,s,o,a,l,c,h){this.url=t,this.params=e,this.queryParams=i,this.fragment=n,this.data=r,this.outlet=s,this.component=o,this.routeConfig=a,this._urlSegment=l,this._lastPathIndex=c,this._resolve=h}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=t_(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=t_(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(t=>t.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class H_ extends T_{constructor(t,e){super(e),this.url=t,K_(this,e)}toString(){return $_(this._root)}}function K_(t,e){e.value._routerState=t,e.children.forEach(e=>K_(t,e))}function $_(t){const e=t.children.length>0?` { ${t.children.map($_).join(", ")} } `:"";return`${t.value}${e}`}function G_(t){if(t.snapshot){const e=t.snapshot,i=t._futureSnapshot;t.snapshot=i,n_(e.queryParams,i.queryParams)||t.queryParams.next(i.queryParams),e.fragment!==i.fragment&&t.fragment.next(i.fragment),n_(e.params,i.params)||t.params.next(i.params),function(t,e){if(t.length!==e.length)return!1;for(let i=0;i<t.length;++i)if(!n_(t[i],e[i]))return!1;return!0}(e.url,i.url)||t.url.next(i.url),n_(e.data,i.data)||t.data.next(i.data)}else t.snapshot=t._futureSnapshot,t.data.next(t._futureSnapshot.data)}function W_(t,e){var i,n;return n_(t.params,e.params)&&g_(i=t.url,n=e.url)&&i.every((t,e)=>n_(t.parameters,n[e].parameters))&&!(!t.parent!=!e.parent)&&(!t.parent||W_(t.parent,e.parent))}function Z_(t,e,i){if(i&&t.shouldReuseRoute(e.value,i.value.snapshot)){const n=i.value;n._futureSnapshot=e.value;const r=function(t,e,i){return e.children.map(e=>{for(const n of i.children)if(t.shouldReuseRoute(e.value,n.value.snapshot))return Z_(t,e,n);return Z_(t,e)})}(t,e,i);return new F_(n,r)}{const i=t.retrieve(e.value);if(i){const t=i.route;return q_(e,t),t}{const i=new N_(new Av.a((n=e.value).url),new Av.a(n.params),new Av.a(n.queryParams),new Av.a(n.fragment),new Av.a(n.data),n.outlet,n.component,n),r=e.children.map(e=>Z_(t,e));return new F_(i,r)}}var n}function q_(t,e){if(t.value.routeConfig!==e.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(t.children.length!==e.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");e.value._futureSnapshot=t.value;for(let i=0;i<t.children.length;++i)q_(t.children[i],e.children[i])}function Y_(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function Q_(t){return"object"==typeof t&&null!=t&&t.outlets}function X_(t,e,i,n,r){let s={};return n&&a_(n,(t,e)=>{s[e]=Array.isArray(t)?t.map(t=>`${t}`):`${t}`}),new p_(i.root===t?e:J_(i.root,t,e),s,r)}function J_(t,e,i){const n={};return a_(t.children,(t,r)=>{n[r]=t===e?i:J_(t,e,i)}),new f_(t.segments,n)}class ty{constructor(t,e,i){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=i,t&&i.length>0&&Y_(i[0]))throw new Error("Root segment cannot have matrix parameters");const n=i.find(Q_);if(n&&n!==o_(i))throw new Error("{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class ey{constructor(t,e,i){this.segmentGroup=t,this.processChildren=e,this.index=i}}function iy(t,e,i){if(t||(t=new f_([],{})),0===t.segments.length&&t.hasChildren())return ny(t,e,i);const n=function(t,e,i){let n=0,r=e;const s={match:!1,pathIndex:0,commandIndex:0};for(;r<t.segments.length;){if(n>=i.length)return s;const e=t.segments[r],o=i[n];if(Q_(o))break;const a=`${o}`,l=n<i.length-1?i[n+1]:null;if(r>0&&void 0===a)break;if(a&&l&&"object"==typeof l&&void 0===l.outlets){if(!ay(a,l,e))return s;n+=2}else{if(!ay(a,{},e))return s;n++}r++}return{match:!0,pathIndex:r,commandIndex:n}}(t,e,i),r=i.slice(n.commandIndex);if(n.match&&n.pathIndex<t.segments.length){const e=new f_(t.segments.slice(0,n.pathIndex),{});return e.children.primary=new f_(t.segments.slice(n.pathIndex),t.children),ny(e,0,r)}return n.match&&0===r.length?new f_(t.segments,{}):n.match&&!t.hasChildren()?ry(t,e,i):n.match?ny(t,0,r):ry(t,e,i)}function ny(t,e,i){if(0===i.length)return new f_(t.segments,{});{const n=function(t){return Q_(t[0])?t[0].outlets:{primary:t}}(i),r={};return a_(n,(i,n)=>{"string"==typeof i&&(i=[i]),null!==i&&(r[n]=iy(t.children[n],e,i))}),a_(t.children,(t,e)=>{void 0===n[e]&&(r[e]=t)}),new f_(t.segments,r)}}function ry(t,e,i){const n=t.segments.slice(0,e);let r=0;for(;r<i.length;){const s=i[r];if(Q_(s)){const t=sy(s.outlets);return new f_(n,t)}if(0===r&&Y_(i[0])){n.push(new m_(t.segments[e].path,oy(i[0]))),r++;continue}const o=Q_(s)?s.outlets.primary:`${s}`,a=r<i.length-1?i[r+1]:null;o&&a&&Y_(a)?(n.push(new m_(o,oy(a))),r+=2):(n.push(new m_(o,{})),r++)}return new f_(n,{})}function sy(t){const e={};return a_(t,(t,i)=>{"string"==typeof t&&(t=[t]),null!==t&&(e[i]=ry(new f_([],{}),0,t))}),e}function oy(t){const e={};return a_(t,(t,i)=>e[i]=`${t}`),e}function ay(t,e,i){return t==i.path&&n_(e,i.parameters)}class ly{constructor(t,e,i,n){this.routeReuseStrategy=t,this.futureState=e,this.currState=i,this.forwardEvent=n}activate(t){const e=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,i,t),G_(this.futureState.root),this.activateChildRoutes(e,i,t)}deactivateChildRoutes(t,e,i){const n=L_(e);t.children.forEach(t=>{const e=t.value.outlet;this.deactivateRoutes(t,n[e],i),delete n[e]}),a_(n,(t,e)=>{this.deactivateRouteAndItsChildren(t,i)})}deactivateRoutes(t,e,i){const n=t.value,r=e?e.value:null;if(n===r)if(n.component){const r=i.getContext(n.outlet);r&&this.deactivateChildRoutes(t,e,r.children)}else this.deactivateChildRoutes(t,e,i);else r&&this.deactivateRouteAndItsChildren(e,i)}deactivateRouteAndItsChildren(t,e){this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)}detachAndStoreRouteSubtree(t,e){const i=e.getContext(t.value.outlet);if(i&&i.outlet){const e=i.outlet.detach(),n=i.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:e,route:t,contexts:n})}}deactivateRouteAndOutlet(t,e){const i=e.getContext(t.value.outlet),n=i&&t.value.component?i.children:e,r=L_(t);for(const s of Object.keys(r))this.deactivateRouteAndItsChildren(r[s],n);i&&i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated())}activateChildRoutes(t,e,i){const n=L_(e);t.children.forEach(t=>{this.activateRoutes(t,n[t.value.outlet],i),this.forwardEvent(new Qv(t.value.snapshot))}),t.children.length&&this.forwardEvent(new qv(t.value.snapshot))}activateRoutes(t,e,i){const n=t.value,r=e?e.value:null;if(G_(n),n===r)if(n.component){const r=i.getOrCreateContext(n.outlet);this.activateChildRoutes(t,e,r.children)}else this.activateChildRoutes(t,e,i);else if(n.component){const e=i.getOrCreateContext(n.outlet);if(this.routeReuseStrategy.shouldAttach(n.snapshot)){const t=this.routeReuseStrategy.retrieve(n.snapshot);this.routeReuseStrategy.store(n.snapshot,null),e.children.onOutletReAttached(t.contexts),e.attachRef=t.componentRef,e.route=t.route.value,e.outlet&&e.outlet.attach(t.componentRef,t.route.value),cy(t.route)}else{const i=function(t){for(let e=t.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig;if(t&&t.component)return null}return null}(n.snapshot),r=i?i.module.componentFactoryResolver:null;e.attachRef=null,e.route=n,e.resolver=r,e.outlet&&e.outlet.activateWith(n,r),this.activateChildRoutes(t,null,e.children)}}else this.activateChildRoutes(t,null,i)}}function cy(t){G_(t.value),t.children.forEach(cy)}class hy{constructor(t,e){this.routes=t,this.module=e}}function uy(t){return"function"==typeof t}function dy(t){return t instanceof p_}const py=Symbol("INITIAL_VALUE");function fy(){return Mn(t=>Hg(t.map(t=>t.pipe(Qe(1),Pn(py)))).pipe(_v((t,e)=>{let i=!1;return e.reduce((t,n,r)=>{if(t!==py)return t;if(n===py&&(i=!0),!i){if(!1===n)return n;if(r===e.length-1||dy(n))return n}return t},t)},py),He(t=>t!==py),Object(Ge.a)(t=>dy(t)?t:!0===t),Qe(1)))}let my=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["ng-component"]],decls:1,vars:0,template:function(t,e){1&t&&r.Qb(0,"router-outlet")},directives:function(){return[hw]},encapsulation:2}),t})();function gy(t,e=""){for(let i=0;i<t.length;i++){const n=t[i];Ay(n,by(e,n))}}function Ay(t,e){t.children&&gy(t.children,e)}function by(t,e){return e?t||e.path?t&&!e.path?`${t}/`:!t&&e.path?e.path:`${t}/${e.path}`:"":t}function vy(t){const e=t.children&&t.children.map(vy),i=e?Object.assign(Object.assign({},t),{children:e}):Object.assign({},t);return!i.component&&(e||i.loadChildren)&&i.outlet&&"primary"!==i.outlet&&(i.component=my),i}function _y(t){return t.outlet||"primary"}function yy(t,e){const i=t.filter(t=>_y(t)===e);return i.push(...t.filter(t=>_y(t)!==e)),i}const wy={matched:!1,consumedSegments:[],lastChild:0,parameters:{},positionalParamSegments:{}};function xy(t,e,i){var n;if(""===e.path)return"full"===e.pathMatch&&(t.hasChildren()||i.length>0)?Object.assign({},wy):{matched:!0,consumedSegments:[],lastChild:0,parameters:{},positionalParamSegments:{}};const r=(e.matcher||i_)(i,t,e);if(!r)return Object.assign({},wy);const s={};a_(r.posParams,(t,e)=>{s[e]=t.path});const o=r.consumed.length>0?Object.assign(Object.assign({},s),r.consumed[r.consumed.length-1].parameters):s;return{matched:!0,consumedSegments:r.consumed,lastChild:r.consumed.length,parameters:o,positionalParamSegments:null!==(n=r.posParams)&&void 0!==n?n:{}}}function Cy(t,e,i,n,r="corrected"){if(i.length>0&&function(t,e,i){return i.some(i=>Sy(t,e,i)&&"primary"!==_y(i))}(t,i,n)){const r=new f_(e,function(t,e,i,n){const r={};r.primary=n,n._sourceSegment=t,n._segmentIndexShift=e.length;for(const s of i)if(""===s.path&&"primary"!==_y(s)){const i=new f_([],{});i._sourceSegment=t,i._segmentIndexShift=e.length,r[_y(s)]=i}return r}(t,e,n,new f_(i,t.children)));return r._sourceSegment=t,r._segmentIndexShift=e.length,{segmentGroup:r,slicedSegments:[]}}if(0===i.length&&function(t,e,i){return i.some(i=>Sy(t,e,i))}(t,i,n)){const s=new f_(t.segments,function(t,e,i,n,r,s){const o={};for(const a of n)if(Sy(t,i,a)&&!r[_y(a)]){const i=new f_([],{});i._sourceSegment=t,i._segmentIndexShift="legacy"===s?t.segments.length:e.length,o[_y(a)]=i}return Object.assign(Object.assign({},r),o)}(t,e,i,n,t.children,r));return s._sourceSegment=t,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:i}}const s=new f_(t.segments,t.children);return s._sourceSegment=t,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:i}}function Sy(t,e,i){return(!(t.hasChildren()||e.length>0)||"full"!==i.pathMatch)&&""===i.path}function ky(t,e,i,n){return!!(_y(t)===n||"primary"!==n&&Sy(e,i,t))&&("**"===t.path||xy(e,t,i).matched)}function Ey(t,e,i){return 0===e.length&&!t.children[i]}class Dy{constructor(t){this.segmentGroup=t||null}}class Iy{constructor(t){this.urlTree=t}}function Py(t){return new Ze.a(e=>e.error(new Dy(t)))}function Oy(t){return new Ze.a(e=>e.error(new Iy(t)))}function My(t){return new Ze.a(e=>e.error(new Error(`Only absolute redirects can have named outlets. redirectTo: '${t}'`)))}class Ty{constructor(t,e,i,n,s){this.configLoader=e,this.urlSerializer=i,this.urlTree=n,this.config=s,this.allowRedirects=!0,this.ngModule=t.get(r.z)}apply(){const t=Cy(this.urlTree.root,[],[],this.config).segmentGroup,e=new f_(t.segments,t.children);return this.expandSegmentGroup(this.ngModule,this.config,e,"primary").pipe(Object(Ge.a)(t=>this.createUrlTree(Ry(t),this.urlTree.queryParams,this.urlTree.fragment))).pipe(qd(t=>{if(t instanceof Iy)return this.allowRedirects=!1,this.match(t.urlTree);if(t instanceof Dy)throw this.noMatchError(t);throw t}))}match(t){return this.expandSegmentGroup(this.ngModule,this.config,t.root,"primary").pipe(Object(Ge.a)(e=>this.createUrlTree(Ry(e),t.queryParams,t.fragment))).pipe(qd(t=>{if(t instanceof Dy)throw this.noMatchError(t);throw t}))}noMatchError(t){return new Error(`Cannot match any routes. URL Segment: '${t.segmentGroup}'`)}createUrlTree(t,e,i){const n=t.segments.length>0?new f_([],{primary:t}):t;return new p_(n,e,i)}expandSegmentGroup(t,e,i,n){return 0===i.segments.length&&i.hasChildren()?this.expandChildren(t,e,i).pipe(Object(Ge.a)(t=>new f_([],t))):this.expandSegment(t,i,e,i.segments,n,!0)}expandChildren(t,e,i){const n=[];for(const r of Object.keys(i.children))"primary"===r?n.unshift(r):n.push(r);return Object(On.a)(n).pipe(np(n=>{const r=i.children[n],s=yy(e,n);return this.expandSegmentGroup(t,s,r,n).pipe(Object(Ge.a)(t=>({segment:t,outlet:n})))}),_v((t,e)=>(t[e.outlet]=e.segment,t),{}),function(t,e){const i=arguments.length>=2;return n=>n.pipe(t?He((e,i)=>t(e,i,n)):Tv.a,xv(1),i?Pv(e):kv(()=>new bv))}())}expandSegment(t,e,i,n,r,s){return Object(On.a)(i).pipe(np(o=>this.expandSegmentAgainstRoute(t,e,i,o,n,r,s).pipe(qd(t=>{if(t instanceof Dy)return Se(null);throw t}))),Rv(t=>!!t),qd((t,i)=>{if(t instanceof bv||"EmptyError"===t.name){if(Ey(e,n,r))return Se(new f_([],{}));throw new Dy(e)}throw t}))}expandSegmentAgainstRoute(t,e,i,n,r,s,o){return ky(n,e,r,s)?void 0===n.redirectTo?this.matchSegmentAgainstRoute(t,e,n,r,s):o&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,i,n,r,s):Py(e):Py(e)}expandSegmentAgainstRouteUsingRedirect(t,e,i,n,r,s){return"**"===n.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,i,n,s):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,i,n,r,s)}expandWildCardWithParamsAgainstRouteUsingRedirect(t,e,i,n){const r=this.applyRedirectCommands([],i.redirectTo,{});return i.redirectTo.startsWith("/")?Oy(r):this.lineralizeSegments(i,r).pipe(Object(ip.a)(i=>{const r=new f_(i,{});return this.expandSegment(t,r,e,i,n,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(t,e,i,n,r,s){const{matched:o,consumedSegments:a,lastChild:l,positionalParamSegments:c}=xy(e,n,r);if(!o)return Py(e);const h=this.applyRedirectCommands(a,n.redirectTo,c);return n.redirectTo.startsWith("/")?Oy(h):this.lineralizeSegments(n,h).pipe(Object(ip.a)(n=>this.expandSegment(t,e,i,n.concat(r.slice(l)),s,!1)))}matchSegmentAgainstRoute(t,e,i,n,r){if("**"===i.path)return i.loadChildren?(i._loadedConfig?Se(i._loadedConfig):this.configLoader.load(t.injector,i)).pipe(Object(Ge.a)(t=>(i._loadedConfig=t,new f_(n,{})))):Se(new f_(n,{}));const{matched:s,consumedSegments:o,lastChild:a}=xy(e,i,n);if(!s)return Py(e);const l=n.slice(a);return this.getChildConfig(t,i,n).pipe(Object(ip.a)(t=>{const n=t.module,s=t.routes,{segmentGroup:a,slicedSegments:c}=Cy(e,o,l,s),h=new f_(a.segments,a.children);if(0===c.length&&h.hasChildren())return this.expandChildren(n,s,h).pipe(Object(Ge.a)(t=>new f_(o,t)));if(0===s.length&&0===c.length)return Se(new f_(o,{}));const u=_y(i)===r;return this.expandSegment(n,h,s,c,u?"primary":r,!0).pipe(Object(Ge.a)(t=>new f_(o.concat(t.segments),t.children)))}))}getChildConfig(t,e,i){return e.children?Se(new hy(e.children,t)):e.loadChildren?void 0!==e._loadedConfig?Se(e._loadedConfig):this.runCanLoadGuards(t.injector,e,i).pipe(Object(ip.a)(i=>i?this.configLoader.load(t.injector,e).pipe(Object(Ge.a)(t=>(e._loadedConfig=t,t))):function(t){return new Ze.a(e=>e.error(e_(`Cannot load children because the guard of the route "path: '${t.path}'" returned false`)))}(e))):Se(new hy([],t))}runCanLoadGuards(t,e,i){const n=e.canLoad;return n&&0!==n.length?Se(n.map(n=>{const r=t.get(n);let s;if(function(t){return t&&uy(t.canLoad)}(r))s=r.canLoad(e,i);else{if(!uy(r))throw new Error("Invalid CanLoad guard");s=r(e,i)}return l_(s)})).pipe(fy(),Pe(t=>{if(!dy(t))return;const e=e_(`Redirecting to "${this.urlSerializer.serialize(t)}"`);throw e.url=t,e}),Object(Ge.a)(t=>!0===t)):Se(!0)}lineralizeSegments(t,e){let i=[],n=e.root;for(;;){if(i=i.concat(n.segments),0===n.numberOfChildren)return Se(i);if(n.numberOfChildren>1||!n.children.primary)return My(t.redirectTo);n=n.children.primary}}applyRedirectCommands(t,e,i){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),t,i)}applyRedirectCreatreUrlTree(t,e,i,n){const r=this.createSegmentGroup(t,e.root,i,n);return new p_(r,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const i={};return a_(t,(t,n)=>{if("string"==typeof t&&t.startsWith(":")){const r=t.substring(1);i[n]=e[r]}else i[n]=t}),i}createSegmentGroup(t,e,i,n){const r=this.createSegments(t,e.segments,i,n);let s={};return a_(e.children,(e,r)=>{s[r]=this.createSegmentGroup(t,e,i,n)}),new f_(r,s)}createSegments(t,e,i,n){return e.map(e=>e.path.startsWith(":")?this.findPosParam(t,e,n):this.findOrReturn(e,i))}findPosParam(t,e,i){const n=i[e.path.substring(1)];if(!n)throw new Error(`Cannot redirect to '${t}'. Cannot find '${e.path}'.`);return n}findOrReturn(t,e){let i=0;for(const n of e){if(n.path===t.path)return e.splice(i),n;i++}return t}}function Ry(t){const e={};for(const i of Object.keys(t.children)){const n=Ry(t.children[i]);(n.segments.length>0||n.hasChildren())&&(e[i]=n)}return function(t){if(1===t.numberOfChildren&&t.children.primary){const e=t.children.primary;return new f_(t.segments.concat(e.segments),e.children)}return t}(new f_(t.segments,e))}class Vy{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class Fy{constructor(t,e){this.component=t,this.route=e}}function Ly(t,e,i){const n=t._root;return By(n,e?e._root:null,i,[n.value])}function Uy(t,e,i){const n=function(t){if(!t)return null;for(let e=t.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig}return null}(e);return(n?n.module.injector:i).get(t)}function By(t,e,i,n,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=L_(e);return t.children.forEach(t=>{!function(t,e,i,n,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=t.value,o=e?e.value:null,a=i?i.getContext(t.value.outlet):null;if(o&&s.routeConfig===o.routeConfig){const l=function(t,e,i){if("function"==typeof i)return i(t,e);switch(i){case"pathParamsChange":return!g_(t.url,e.url);case"pathParamsOrQueryParamsChange":return!g_(t.url,e.url)||!n_(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!W_(t,e)||!n_(t.queryParams,e.queryParams);case"paramsChange":default:return!W_(t,e)}}(o,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new Vy(n)):(s.data=o.data,s._resolvedData=o._resolvedData),By(t,e,s.component?a?a.children:null:i,n,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new Fy(a.outlet.component,o))}else o&&Ny(e,a,r),r.canActivateChecks.push(new Vy(n)),By(t,null,s.component?a?a.children:null:i,n,r)}(t,s[t.value.outlet],i,n.concat([t.value]),r),delete s[t.value.outlet]}),a_(s,(t,e)=>Ny(t,i.getContext(e),r)),r}function Ny(t,e,i){const n=L_(t),r=t.value;a_(n,(t,n)=>{Ny(t,r.component?e?e.children.getContext(n):null:e,i)}),i.canDeactivateChecks.push(new Fy(r.component&&e&&e.outlet&&e.outlet.isActivated?e.outlet.component:null,r))}class jy{}function zy(t){return new Ze.a(e=>e.error(t))}class Hy{constructor(t,e,i,n,r,s){this.rootComponentType=t,this.config=e,this.urlTree=i,this.url=n,this.paramsInheritanceStrategy=r,this.relativeLinkResolution=s}recognize(){const t=Cy(this.urlTree.root,[],[],this.config.filter(t=>void 0===t.redirectTo),this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,t,"primary");if(null===e)return null;const i=new z_([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},"primary",this.rootComponentType,null,this.urlTree.root,-1,{}),n=new F_(i,e),r=new H_(this.url,n);return this.inheritParamsAndData(r._root),r}inheritParamsAndData(t){const e=t.value,i=j_(e,this.paramsInheritanceStrategy);e.params=Object.freeze(i.params),e.data=Object.freeze(i.data),t.children.forEach(t=>this.inheritParamsAndData(t))}processSegmentGroup(t,e,i){return 0===e.segments.length&&e.hasChildren()?this.processChildren(t,e):this.processSegment(t,e,e.segments,i)}processChildren(t,e){const i=[];for(const r of Object.keys(e.children)){const n=e.children[r],s=yy(t,r),o=this.processSegmentGroup(s,n,r);if(null===o)return null;i.push(...o)}const n=function(t){const e=[];for(const i of t){if(!Ky(i)){e.push(i);continue}const t=e.find(t=>i.value.routeConfig===t.value.routeConfig);void 0!==t?t.children.push(...i.children):e.push(i)}return e}(i);return n.sort((t,e)=>"primary"===t.value.outlet?-1:"primary"===e.value.outlet?1:t.value.outlet.localeCompare(e.value.outlet)),n}processSegment(t,e,i,n){for(const r of t){const t=this.processSegmentAgainstRoute(r,e,i,n);if(null!==t)return t}return Ey(e,i,n)?[]:null}processSegmentAgainstRoute(t,e,i,n){if(t.redirectTo||!ky(t,e,i,n))return null;let r,s=[],o=[];if("**"===t.path){const n=i.length>0?o_(i).parameters:{};r=new z_(i,n,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,Wy(t),_y(t),t.component,t,$y(e),Gy(e)+i.length,Zy(t))}else{const n=xy(e,t,i);if(!n.matched)return null;s=n.consumedSegments,o=i.slice(n.lastChild),r=new z_(s,n.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,Wy(t),_y(t),t.component,t,$y(e),Gy(e)+s.length,Zy(t))}const a=function(t){return t.children?t.children:t.loadChildren?t._loadedConfig.routes:[]}(t),{segmentGroup:l,slicedSegments:c}=Cy(e,s,o,a.filter(t=>void 0===t.redirectTo),this.relativeLinkResolution);if(0===c.length&&l.hasChildren()){const t=this.processChildren(a,l);return null===t?null:[new F_(r,t)]}if(0===a.length&&0===c.length)return[new F_(r,[])];const h=_y(t)===n,u=this.processSegment(a,l,c,h?"primary":n);return null===u?null:[new F_(r,u)]}}function Ky(t){const e=t.value.routeConfig;return e&&""===e.path&&void 0===e.redirectTo}function $y(t){let e=t;for(;e._sourceSegment;)e=e._sourceSegment;return e}function Gy(t){let e=t,i=e._segmentIndexShift?e._segmentIndexShift:0;for(;e._sourceSegment;)e=e._sourceSegment,i+=e._segmentIndexShift?e._segmentIndexShift:0;return i-1}function Wy(t){return t.data||{}}function Zy(t){return t.resolve||{}}function qy(t){return Mn(e=>{const i=t(e);return i?Object(On.a)(i).pipe(Object(Ge.a)(()=>e)):Se(e)})}class Yy extends class{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}{}const Qy=new r.s("ROUTES");class Xy{constructor(t,e,i,n){this.loader=t,this.compiler=e,this.onLoadStartListener=i,this.onLoadEndListener=n}load(t,e){if(e._loader$)return e._loader$;this.onLoadStartListener&&this.onLoadStartListener(e);const i=this.loadModuleFactory(e.loadChildren).pipe(Object(Ge.a)(i=>{this.onLoadEndListener&&this.onLoadEndListener(e);const n=i.create(t);return new hy(s_(n.injector.get(Qy,void 0,r.r.Self|r.r.Optional)).map(vy),n)}),qd(t=>{throw e._loader$=void 0,t}));return e._loader$=new vv.a(i,()=>new _e.a).pipe(Object(Vv.a)()),e._loader$}loadModuleFactory(t){return"string"==typeof t?Object(On.a)(this.loader.load(t)):l_(t()).pipe(Object(ip.a)(t=>t instanceof r.x?Se(t):Object(On.a)(this.compiler.compileModuleAsync(t))))}}class Jy{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.children=new tw,this.attachRef=null}}class tw{constructor(){this.contexts=new Map}onChildOutletCreated(t,e){const i=this.getOrCreateContext(t);i.outlet=e,this.contexts.set(t,i)}onChildOutletDestroyed(t){const e=this.getContext(t);e&&(e.outlet=null)}onOutletDeactivated(){const t=this.contexts;return this.contexts=new Map,t}onOutletReAttached(t){this.contexts=t}getOrCreateContext(t){let e=this.getContext(t);return e||(e=new Jy,this.contexts.set(t,e)),e}getContext(t){return this.contexts.get(t)||null}}class ew{shouldProcessUrl(t){return!0}extract(t){return t}merge(t,e){return t}}function iw(t){throw t}function nw(t,e,i){return e.parse("/")}function rw(t,e){return Se(null)}let sw=(()=>{class t{constructor(t,e,i,n,s,o,a,l){this.rootComponentType=t,this.urlSerializer=e,this.rootContexts=i,this.location=n,this.config=l,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.disposed=!1,this.lastLocationChangeInfo=null,this.navigationId=0,this.isNgZoneEnabled=!1,this.events=new _e.a,this.errorHandler=iw,this.malformedUriErrorHandler=nw,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:rw,afterPreactivation:rw},this.urlHandlingStrategy=new ew,this.routeReuseStrategy=new Yy,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="corrected",this.ngModule=s.get(r.z),this.console=s.get(r.bb);const c=s.get(r.B);this.isNgZoneEnabled=c instanceof r.B&&r.B.isInAngularZone(),this.resetConfig(l),this.currentUrlTree=new p_(new f_([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new Xy(o,a,t=>this.triggerEvent(new Gv(t)),t=>this.triggerEvent(new Wv(t))),this.routerState=B_(this.currentUrlTree,this.rootComponentType),this.transitions=new Av.a({id:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}setupNavigations(t){const e=this.events;return t.pipe(He(t=>0!==t.id),Object(Ge.a)(t=>Object.assign(Object.assign({},t),{extractedUrl:this.urlHandlingStrategy.extract(t.rawUrl)})),Mn(t=>{let i=!1,n=!1;return Se(t).pipe(Pe(t=>{this.currentNavigation={id:t.id,initialUrl:t.currentRawUrl,extractedUrl:t.extractedUrl,trigger:t.source,extras:t.extras,previousNavigation:this.lastSuccessfulNavigation?Object.assign(Object.assign({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),Mn(t=>{const i=!this.navigated||t.extractedUrl.toString()!==this.browserUrlTree.toString();if(("reload"===this.onSameUrlNavigation||i)&&this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl))return Se(t).pipe(Mn(t=>{const i=this.transitions.getValue();return e.next(new Lv(t.id,this.serializeUrl(t.extractedUrl),t.source,t.restoredState)),i!==this.transitions.getValue()?qe:Promise.resolve(t)}),(n=this.ngModule.injector,r=this.configLoader,s=this.urlSerializer,o=this.config,Mn(t=>function(t,e,i,n,r){return new Ty(t,e,i,n,r).apply()}(n,r,s,t.extractedUrl,o).pipe(Object(Ge.a)(e=>Object.assign(Object.assign({},t),{urlAfterRedirects:e}))))),Pe(t=>{this.currentNavigation=Object.assign(Object.assign({},this.currentNavigation),{finalUrl:t.urlAfterRedirects})}),function(t,e,i,n,r){return Object(ip.a)(s=>function(t,e,i,n,r="emptyOnly",s="legacy"){try{const o=new Hy(t,e,i,n,r,s).recognize();return null===o?zy(new jy):Se(o)}catch($nt){return zy($nt)}}(t,e,s.urlAfterRedirects,i(s.urlAfterRedirects),n,r).pipe(Object(Ge.a)(t=>Object.assign(Object.assign({},s),{targetSnapshot:t}))))}(this.rootComponentType,this.config,t=>this.serializeUrl(t),this.paramsInheritanceStrategy,this.relativeLinkResolution),Pe(t=>{"eager"===this.urlUpdateStrategy&&(t.extras.skipLocationChange||this.setBrowserUrl(t.urlAfterRedirects,!!t.extras.replaceUrl,t.id,t.extras.state),this.browserUrlTree=t.urlAfterRedirects);const i=new jv(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.next(i)}));var n,r,s,o;if(i&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)){const{id:i,extractedUrl:n,source:r,restoredState:s,extras:o}=t,a=new Lv(i,this.serializeUrl(n),r,s);e.next(a);const l=B_(n,this.rootComponentType).snapshot;return Se(Object.assign(Object.assign({},t),{targetSnapshot:l,urlAfterRedirects:n,extras:Object.assign(Object.assign({},o),{skipLocationChange:!1,replaceUrl:!1})}))}return this.rawUrlTree=t.rawUrl,this.browserUrlTree=t.urlAfterRedirects,t.resolve(null),qe}),qy(t=>{const{targetSnapshot:e,id:i,extractedUrl:n,rawUrl:r,extras:{skipLocationChange:s,replaceUrl:o}}=t;return this.hooks.beforePreactivation(e,{navigationId:i,appliedUrlTree:n,rawUrlTree:r,skipLocationChange:!!s,replaceUrl:!!o})}),Pe(t=>{const e=new zv(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}),Object(Ge.a)(t=>Object.assign(Object.assign({},t),{guards:Ly(t.targetSnapshot,t.currentSnapshot,this.rootContexts)})),function(t,e){return Object(ip.a)(i=>{const{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=i;return 0===o.length&&0===s.length?Se(Object.assign(Object.assign({},i),{guardsResult:!0})):function(t,e,i,n){return Object(On.a)(t).pipe(Object(ip.a)(t=>function(t,e,i,n,r){const s=e&&e.routeConfig?e.routeConfig.canDeactivate:null;return s&&0!==s.length?Se(s.map(s=>{const o=Uy(s,e,r);let a;if(function(t){return t&&uy(t.canDeactivate)}(o))a=l_(o.canDeactivate(t,e,i,n));else{if(!uy(o))throw new Error("Invalid CanDeactivate guard");a=l_(o(t,e,i,n))}return a.pipe(Rv())})).pipe(fy()):Se(!0)}(t.component,t.route,i,e,n)),Rv(t=>!0!==t,!0))}(o,n,r,t).pipe(Object(ip.a)(i=>i&&"boolean"==typeof i?function(t,e,i,n){return Object(On.a)(e).pipe(np(e=>In(function(t,e){return null!==t&&e&&e(new Zv(t)),Se(!0)}(e.route.parent,n),function(t,e){return null!==t&&e&&e(new Yv(t)),Se(!0)}(e.route,n),function(t,e,i){const n=e[e.length-1],r=e.slice(0,e.length-1).reverse().map(t=>function(t){const e=t.routeConfig?t.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:t,guards:e}:null}(t)).filter(t=>null!==t).map(e=>Ol(()=>Se(e.guards.map(r=>{const s=Uy(r,e.node,i);let o;if(function(t){return t&&uy(t.canActivateChild)}(s))o=l_(s.canActivateChild(n,t));else{if(!uy(s))throw new Error("Invalid CanActivateChild guard");o=l_(s(n,t))}return o.pipe(Rv())})).pipe(fy())));return Se(r).pipe(fy())}(t,e.path,i),function(t,e,i){const n=e.routeConfig?e.routeConfig.canActivate:null;return n&&0!==n.length?Se(n.map(n=>Ol(()=>{const r=Uy(n,e,i);let s;if(function(t){return t&&uy(t.canActivate)}(r))s=l_(r.canActivate(e,t));else{if(!uy(r))throw new Error("Invalid CanActivate guard");s=l_(r(e,t))}return s.pipe(Rv())}))).pipe(fy()):Se(!0)}(t,e.route,i))),Rv(t=>!0!==t,!0))}(n,s,t,e):Se(i)),Object(Ge.a)(t=>Object.assign(Object.assign({},i),{guardsResult:t})))})}(this.ngModule.injector,t=>this.triggerEvent(t)),Pe(t=>{if(dy(t.guardsResult)){const e=e_(`Redirecting to "${this.serializeUrl(t.guardsResult)}"`);throw e.url=t.guardsResult,e}const e=new Hv(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot,!!t.guardsResult);this.triggerEvent(e)}),He(t=>{if(!t.guardsResult){this.resetUrlToCurrentUrlTree();const i=new Bv(t.id,this.serializeUrl(t.extractedUrl),"");return e.next(i),t.resolve(!1),!1}return!0}),qy(t=>{if(t.guards.canActivateChecks.length)return Se(t).pipe(Pe(t=>{const e=new Kv(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}),Mn(t=>{let i=!1;return Se(t).pipe((n=this.paramsInheritanceStrategy,r=this.ngModule.injector,Object(ip.a)(t=>{const{targetSnapshot:e,guards:{canActivateChecks:i}}=t;if(!i.length)return Se(t);let s=0;return Object(On.a)(i).pipe(np(t=>function(t,e,i,n){return function(t,e,i,n){const r=Object.keys(t);if(0===r.length)return Se({});const s={};return Object(On.a)(r).pipe(Object(ip.a)(r=>function(t,e,i,n){const r=Uy(t,e,n);return l_(r.resolve?r.resolve(e,i):r(e,i))}(t[r],e,i,n).pipe(Pe(t=>{s[r]=t}))),xv(1),Object(ip.a)(()=>Object.keys(s).length===r.length?Se(s):qe))}(t._resolve,t,e,n).pipe(Object(Ge.a)(e=>(t._resolvedData=e,t.data=Object.assign(Object.assign({},t.data),j_(t,i).resolve),null)))}(t.route,e,n,r)),Pe(()=>s++),xv(1),Object(ip.a)(e=>s===i.length?Se(t):qe))})),Pe({next:()=>i=!0,complete:()=>{if(!i){const i=new Bv(t.id,this.serializeUrl(t.extractedUrl),"At least one route resolver didn't emit any value.");e.next(i),t.resolve(!1)}}}));var n,r}),Pe(t=>{const e=new $v(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}))}),qy(t=>{const{targetSnapshot:e,id:i,extractedUrl:n,rawUrl:r,extras:{skipLocationChange:s,replaceUrl:o}}=t;return this.hooks.afterPreactivation(e,{navigationId:i,appliedUrlTree:n,rawUrlTree:r,skipLocationChange:!!s,replaceUrl:!!o})}),Object(Ge.a)(t=>{const e=function(t,e,i){const n=Z_(t,e._root,i?i._root:void 0);return new U_(n,e)}(this.routeReuseStrategy,t.targetSnapshot,t.currentRouterState);return Object.assign(Object.assign({},t),{targetRouterState:e})}),Pe(t=>{this.currentUrlTree=t.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,t.rawUrl),this.routerState=t.targetRouterState,"deferred"===this.urlUpdateStrategy&&(t.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,!!t.extras.replaceUrl,t.id,t.extras.state),this.browserUrlTree=t.urlAfterRedirects)}),(r=this.rootContexts,s=this.routeReuseStrategy,o=t=>this.triggerEvent(t),Object(Ge.a)(t=>(new ly(s,t.targetRouterState,t.currentRouterState,o).activate(r),t))),Pe({next(){i=!0},complete(){i=!0}}),Xd(()=>{if(!i&&!n){this.resetUrlToCurrentUrlTree();const i=new Bv(t.id,this.serializeUrl(t.extractedUrl),`Navigation ID ${t.id} is not equal to the current navigation id ${this.navigationId}`);e.next(i),t.resolve(!1)}this.currentNavigation=null}),qd(i=>{if(n=!0,(r=i)&&r.ngNavigationCancelingError){const n=dy(i.url);n||(this.navigated=!0,this.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl));const r=new Bv(t.id,this.serializeUrl(t.extractedUrl),i.message);e.next(r),n?setTimeout(()=>{const e=this.urlHandlingStrategy.merge(i.url,this.rawUrlTree);this.scheduleNavigation(e,"imperative",null,{skipLocationChange:t.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy},{resolve:t.resolve,reject:t.reject,promise:t.promise})},0):t.resolve(!1)}else{this.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl);const n=new Nv(t.id,this.serializeUrl(t.extractedUrl),i);e.next(n);try{t.resolve(this.errorHandler(i))}catch(s){t.reject(s)}}var r;return qe}));var r,s,o}))}resetRootComponentType(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType}getTransition(){const t=this.transitions.value;return t.urlAfterRedirects=this.browserUrlTree,t}setTransition(t){this.transitions.next(Object.assign(Object.assign({},this.getTransition()),t))}initialNavigation(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(t=>{const e=this.extractLocationChangeInfoFromEvent(t);this.shouldScheduleNavigation(this.lastLocationChangeInfo,e)&&setTimeout(()=>{const{source:t,state:i,urlTree:n}=e,r={replaceUrl:!0};if(i){const t=Object.assign({},i);delete t.navigationId,0!==Object.keys(t).length&&(r.state=t)}this.scheduleNavigation(n,t,i,r)},0),this.lastLocationChangeInfo=e}))}extractLocationChangeInfoFromEvent(t){var e;return{source:"popstate"===t.type?"popstate":"hashchange",urlTree:this.parseUrl(t.url),state:(null===(e=t.state)||void 0===e?void 0:e.navigationId)?t.state:null,transitionId:this.getTransition().id}}shouldScheduleNavigation(t,e){if(!t)return!0;const i=e.urlTree.toString()===t.urlTree.toString();return!(e.transitionId===t.transitionId&&i&&("hashchange"===e.source&&"popstate"===t.source||"popstate"===e.source&&"hashchange"===t.source))}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.currentNavigation}triggerEvent(t){this.events.next(t)}resetConfig(t){gy(t),this.config=t.map(vy),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.transitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(t,e={}){const{relativeTo:i,queryParams:n,fragment:r,queryParamsHandling:s,preserveFragment:o}=e,a=i||this.routerState.root,l=o?this.currentUrlTree.fragment:r;let c=null;switch(s){case"merge":c=Object.assign(Object.assign({},this.currentUrlTree.queryParams),n);break;case"preserve":c=this.currentUrlTree.queryParams;break;default:c=n||null}return null!==c&&(c=this.removeEmptyProps(c)),function(t,e,i,n,r){if(0===i.length)return X_(e.root,e.root,e,n,r);const s=function(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new ty(!0,0,t);let e=0,i=!1;const n=t.reduce((t,n,r)=>{if("object"==typeof n&&null!=n){if(n.outlets){const e={};return a_(n.outlets,(t,i)=>{e[i]="string"==typeof t?t.split("/"):t}),[...t,{outlets:e}]}if(n.segmentPath)return[...t,n.segmentPath]}return"string"!=typeof n?[...t,n]:0===r?(n.split("/").forEach((n,r)=>{0==r&&"."===n||(0==r&&""===n?i=!0:".."===n?e++:""!=n&&t.push(n))}),t):[...t,n]},[]);return new ty(i,e,n)}(i);if(s.toRoot())return X_(e.root,new f_([],{}),e,n,r);const o=function(t,e,i){if(t.isAbsolute)return new ey(e.root,!0,0);if(-1===i.snapshot._lastPathIndex){const t=i.snapshot._urlSegment;return new ey(t,t===e.root,0)}const n=Y_(t.commands[0])?0:1;return function(t,e,i){let n=t,r=e,s=i;for(;s>r;){if(s-=r,n=n.parent,!n)throw new Error("Invalid number of '../'");r=n.segments.length}return new ey(n,!1,r-s)}(i.snapshot._urlSegment,i.snapshot._lastPathIndex+n,t.numberOfDoubleDots)}(s,e,t),a=o.processChildren?ny(o.segmentGroup,o.index,s.commands):iy(o.segmentGroup,o.index,s.commands);return X_(o.segmentGroup,a,e,n,r)}(a,this.currentUrlTree,t,c,l)}navigateByUrl(t,e={skipLocationChange:!1}){const i=dy(t)?t:this.parseUrl(t),n=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(n,"imperative",null,e)}navigate(t,e={skipLocationChange:!1}){return function(t){for(let e=0;e<t.length;e++){const i=t[e];if(null==i)throw new Error(`The requested path contains ${i} segment at index ${e}`)}}(t),this.navigateByUrl(this.createUrlTree(t,e),e)}serializeUrl(t){return this.urlSerializer.serialize(t)}parseUrl(t){let e;try{e=this.urlSerializer.parse(t)}catch($nt){e=this.malformedUriErrorHandler($nt,this.urlSerializer,t)}return e}isActive(t,e){if(dy(t))return c_(this.currentUrlTree,t,e);const i=this.parseUrl(t);return c_(this.currentUrlTree,i,e)}removeEmptyProps(t){return Object.keys(t).reduce((e,i)=>{const n=t[i];return null!=n&&(e[i]=n),e},{})}processNavigations(){this.navigations.subscribe(t=>{this.navigated=!0,this.lastSuccessfulId=t.id,this.events.next(new Uv(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(this.currentUrlTree))),this.lastSuccessfulNavigation=this.currentNavigation,this.currentNavigation=null,t.resolve(!0)},t=>{this.console.warn("Unhandled Navigation Error: ")})}scheduleNavigation(t,e,i,n,r){if(this.disposed)return Promise.resolve(!1);const s=this.getTransition(),o="imperative"!==e&&"imperative"===(null==s?void 0:s.source),a=(this.lastSuccessfulId===s.id||this.currentNavigation?s.rawUrl:s.urlAfterRedirects).toString()===t.toString();if(o&&a)return Promise.resolve(!0);let l,c,h;r?(l=r.resolve,c=r.reject,h=r.promise):h=new Promise((t,e)=>{l=t,c=e});const u=++this.navigationId;return this.setTransition({id:u,source:e,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:t,extras:n,resolve:l,reject:c,promise:h,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),h.catch(t=>Promise.reject(t))}setBrowserUrl(t,e,i,n){const r=this.urlSerializer.serialize(t);n=n||{},this.location.isCurrentPathEqualTo(r)||e?this.location.replaceState(r,"",Object.assign(Object.assign({},n),{navigationId:i})):this.location.go(r,"",Object.assign(Object.assign({},n),{navigationId:i}))}resetStateAndUrl(t,e,i){this.routerState=t,this.currentUrlTree=e,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,i),this.resetUrlToCurrentUrlTree()}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",{navigationId:this.lastSuccessfulId})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.Q),r.Zb(A_),r.Zb(tw),r.Zb(w),r.Zb(r.t),r.Zb(r.y),r.Zb(r.i),r.Zb(void 0))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),ow=(()=>{class t{constructor(t,e,i,n,r){this.router=t,this.route=e,this.commands=[],this.onChanges=new _e.a,null==i&&n.setAttribute(r.nativeElement,"tabindex","0")}ngOnChanges(t){this.onChanges.next(this)}set routerLink(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]}onClick(){const t={skipLocationChange:lw(this.skipLocationChange),replaceUrl:lw(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,t),!0}get urlTree(){return this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:lw(this.preserveFragment)})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(sw),r.Pb(N_),r.ac("tabindex"),r.Pb(r.H),r.Pb(r.l))},t.\u0275dir=r.Kb({type:t,selectors:[["","routerLink","",5,"a",5,"area"]],hostBindings:function(t,e){1&t&&r.cc("click",function(){return e.onClick()})},inputs:{routerLink:"routerLink",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state",relativeTo:"relativeTo"},features:[r.Bb]}),t})(),aw=(()=>{class t{constructor(t,e,i){this.router=t,this.route=e,this.locationStrategy=i,this.commands=[],this.onChanges=new _e.a,this.subscription=t.events.subscribe(t=>{t instanceof Uv&&this.updateTargetUrlAndHref()})}set routerLink(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]}ngOnChanges(t){this.updateTargetUrlAndHref(),this.onChanges.next(this)}ngOnDestroy(){this.subscription.unsubscribe()}onClick(t,e,i,n,r){if(0!==t||e||i||n||r)return!0;if("string"==typeof this.target&&"_self"!=this.target)return!0;const s={skipLocationChange:lw(this.skipLocationChange),replaceUrl:lw(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,s),!1}updateTargetUrlAndHref(){this.href=this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree))}get urlTree(){return this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:lw(this.preserveFragment)})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(sw),r.Pb(N_),r.Pb(A))},t.\u0275dir=r.Kb({type:t,selectors:[["a","routerLink",""],["area","routerLink",""]],hostVars:2,hostBindings:function(t,e){1&t&&r.cc("click",function(t){return e.onClick(t.button,t.ctrlKey,t.shiftKey,t.altKey,t.metaKey)}),2&t&&(r.Yb("href",e.href,r.Dc),r.Eb("target",e.target))},inputs:{routerLink:"routerLink",target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state",relativeTo:"relativeTo"},features:[r.Bb]}),t})();function lw(t){return""===t||!!t}let cw=(()=>{class t{constructor(t,e,i,n,r,s){this.router=t,this.element=e,this.renderer=i,this.cdr=n,this.link=r,this.linkWithHref=s,this.classes=[],this.isActive=!1,this.routerLinkActiveOptions={exact:!1},this.routerEventsSubscription=t.events.subscribe(t=>{t instanceof Uv&&this.update()})}ngAfterContentInit(){Se(this.links.changes,this.linksWithHrefs.changes,Se(null)).pipe(Object(Dn.a)()).subscribe(t=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){var t;null===(t=this.linkInputChangesSubscription)||void 0===t||t.unsubscribe();const e=[...this.links.toArray(),...this.linksWithHrefs.toArray(),this.link,this.linkWithHref].filter(t=>!!t).map(t=>t.onChanges);this.linkInputChangesSubscription=Object(On.a)(e).pipe(Object(Dn.a)()).subscribe(t=>{this.isActive!==this.isLinkActive(this.router)(t)&&this.update()})}set routerLinkActive(t){const e=Array.isArray(t)?t:t.split(" ");this.classes=e.filter(t=>!!t)}ngOnChanges(t){this.update()}ngOnDestroy(){var t;this.routerEventsSubscription.unsubscribe(),null===(t=this.linkInputChangesSubscription)||void 0===t||t.unsubscribe()}update(){this.links&&this.linksWithHrefs&&this.router.navigated&&Promise.resolve().then(()=>{const t=this.hasActiveLinks();this.isActive!==t&&(this.isActive=t,this.cdr.markForCheck(),this.classes.forEach(e=>{t?this.renderer.addClass(this.element.nativeElement,e):this.renderer.removeClass(this.element.nativeElement,e)}))})}isLinkActive(t){return e=>t.isActive(e.urlTree,this.routerLinkActiveOptions.exact)}hasActiveLinks(){const t=this.isLinkActive(this.router);return this.link&&t(this.link)||this.linkWithHref&&t(this.linkWithHref)||this.links.some(t)||this.linksWithHrefs.some(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(sw),r.Pb(r.l),r.Pb(r.H),r.Pb(r.h),r.Pb(ow,8),r.Pb(aw,8))},t.\u0275dir=r.Kb({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(t,e,i){if(1&t&&(r.Ib(i,ow,1),r.Ib(i,aw,1)),2&t){let t;r.vc(t=r.dc())&&(e.links=t),r.vc(t=r.dc())&&(e.linksWithHrefs=t)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",routerLinkActive:"routerLinkActive"},exportAs:["routerLinkActive"],features:[r.Bb]}),t})(),hw=(()=>{class t{constructor(t,e,i,n,s){this.parentContexts=t,this.location=e,this.resolver=i,this.changeDetector=s,this.activated=null,this._activatedRoute=null,this.activateEvents=new r.o,this.deactivateEvents=new r.o,this.name=n||"primary",t.onChildOutletCreated(this.name,this)}ngOnDestroy(){this.parentContexts.onChildOutletDestroyed(this.name)}ngOnInit(){if(!this.activated){const t=this.parentContexts.getContext(this.name);t&&t.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.resolver||null))}}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();const t=this.activated;return this.activated=null,this._activatedRoute=null,t}attach(t,e){this.activated=t,this._activatedRoute=e,this.location.insert(t.hostView)}deactivate(){if(this.activated){const t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}}activateWith(t,e){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=t;const i=(e=e||this.resolver).resolveComponentFactory(t._futureSnapshot.routeConfig.component),n=this.parentContexts.getOrCreateContext(this.name).children,r=new uw(t,n,this.location.injector);this.activated=this.location.createComponent(i,this.location.length,r),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(tw),r.Pb(r.S),r.Pb(r.j),r.ac("name"),r.Pb(r.h))},t.\u0275dir=r.Kb({type:t,selectors:[["router-outlet"]],outputs:{activateEvents:"activate",deactivateEvents:"deactivate"},exportAs:["outlet"]}),t})();class uw{constructor(t,e,i){this.route=t,this.childContexts=e,this.parent=i}get(t,e){return t===N_?this.route:t===tw?this.childContexts:this.parent.get(t,e)}}class dw{}class pw{preload(t,e){return e().pipe(qd(()=>Se(null)))}}class fw{preload(t,e){return Se(null)}}let mw=(()=>{class t{constructor(t,e,i,n,r){this.router=t,this.injector=n,this.preloadingStrategy=r,this.loader=new Xy(e,i,e=>t.triggerEvent(new Gv(e)),e=>t.triggerEvent(new Wv(e)))}setUpPreloading(){this.subscription=this.router.events.pipe(He(t=>t instanceof Uv),np(()=>this.preload())).subscribe(()=>{})}preload(){const t=this.injector.get(r.z);return this.processRoutes(t,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(t,e){const i=[];for(const n of e)if(n.loadChildren&&!n.canLoad&&n._loadedConfig){const t=n._loadedConfig;i.push(this.processRoutes(t.module,t.routes))}else n.loadChildren&&!n.canLoad?i.push(this.preloadConfig(t,n)):n.children&&i.push(this.processRoutes(t,n.children));return Object(On.a)(i).pipe(Object(Dn.a)(),Object(Ge.a)(t=>{}))}preloadConfig(t,e){return this.preloadingStrategy.preload(e,()=>(e._loadedConfig?Se(e._loadedConfig):this.loader.load(t.injector,e)).pipe(Object(ip.a)(t=>(e._loadedConfig=t,this.processRoutes(t.module,t.routes)))))}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(sw),r.Zb(r.y),r.Zb(r.i),r.Zb(r.t),r.Zb(dw))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),gw=(()=>{class t{constructor(t,e,i={}){this.router=t,this.viewportScroller=e,this.options=i,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},i.scrollPositionRestoration=i.scrollPositionRestoration||"disabled",i.anchorScrolling=i.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.router.events.subscribe(t=>{t instanceof Lv?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=t.navigationTrigger,this.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof Uv&&(this.lastId=t.id,this.scheduleScrollEvent(t,this.router.parseUrl(t.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.router.events.subscribe(t=>{t instanceof Xv&&(t.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(t.position):t.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(t.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(t,e){this.router.triggerEvent(new Xv(t,"popstate"===this.lastSource?this.store[this.restoredId]:null,e))}ngOnDestroy(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(sw),r.Zb(It),r.Zb(void 0))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();const Aw=new r.s("ROUTER_CONFIGURATION"),bw=new r.s("ROUTER_FORROOT_GUARD"),vw=[w,{provide:A_,useClass:b_},{provide:sw,useFactory:function(t,e,i,n,r,s,a,l={},c,h){const u=new sw(null,t,e,i,n,r,s,s_(a));if(c&&(u.urlHandlingStrategy=c),h&&(u.routeReuseStrategy=h),function(t,e){t.errorHandler&&(e.errorHandler=t.errorHandler),t.malformedUriErrorHandler&&(e.malformedUriErrorHandler=t.malformedUriErrorHandler),t.onSameUrlNavigation&&(e.onSameUrlNavigation=t.onSameUrlNavigation),t.paramsInheritanceStrategy&&(e.paramsInheritanceStrategy=t.paramsInheritanceStrategy),t.relativeLinkResolution&&(e.relativeLinkResolution=t.relativeLinkResolution),t.urlUpdateStrategy&&(e.urlUpdateStrategy=t.urlUpdateStrategy)}(l,u),l.enableTracing){const t=o();u.events.subscribe(e=>{t.logGroup(`Router Event: ${e.constructor.name}`),t.log(e.toString()),t.log(e),t.logGroupEnd()})}return u},deps:[A_,tw,w,r.t,r.y,r.i,Qy,Aw,[class{},new r.C],[class{},new r.C]]},tw,{provide:N_,useFactory:function(t){return t.routerState.root},deps:[sw]},{provide:r.y,useClass:r.N},mw,fw,pw,{provide:Aw,useValue:{enableTracing:!1}}];function _w(){return new r.A("Router",sw)}let yw=(()=>{class t{constructor(t,e){}static forRoot(e,i){return{ngModule:t,providers:[vw,Sw(e),{provide:bw,useFactory:Cw,deps:[[sw,new r.C,new r.M]]},{provide:Aw,useValue:i||{}},{provide:A,useFactory:xw,deps:[l,[new r.q(v),new r.C],Aw]},{provide:gw,useFactory:ww,deps:[sw,It,Aw]},{provide:dw,useExisting:i&&i.preloadingStrategy?i.preloadingStrategy:fw},{provide:r.A,multi:!0,useFactory:_w},[kw,{provide:r.d,multi:!0,useFactory:Ew,deps:[kw]},{provide:Iw,useFactory:Dw,deps:[kw]},{provide:r.b,multi:!0,useExisting:Iw}]]}}static forChild(e){return{ngModule:t,providers:[Sw(e)]}}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(bw,8),r.Zb(sw,8))},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({}),t})();function ww(t,e,i){return i.scrollOffset&&e.setOffset(i.scrollOffset),new gw(t,e,i)}function xw(t,e,i={}){return i.useHash?new y(t,e):new _(t,e)}function Cw(t){return"guarded"}function Sw(t){return[{provide:r.a,multi:!0,useValue:t},{provide:Qy,multi:!0,useValue:t}]}let kw=(()=>{class t{constructor(t){this.injector=t,this.initNavigation=!1,this.resultOfPreactivationDone=new _e.a}appInitializer(){return this.injector.get(h,Promise.resolve(null)).then(()=>{let t=null;const e=new Promise(e=>t=e),i=this.injector.get(sw),n=this.injector.get(Aw);return"disabled"===n.initialNavigation?(i.setUpLocationChangeListener(),t(!0)):"enabled"===n.initialNavigation||"enabledBlocking"===n.initialNavigation?(i.hooks.afterPreactivation=()=>this.initNavigation?Se(null):(this.initNavigation=!0,t(!0),this.resultOfPreactivationDone),i.initialNavigation()):t(!0),e})}bootstrapListener(t){const e=this.injector.get(Aw),i=this.injector.get(mw),n=this.injector.get(gw),s=this.injector.get(sw),o=this.injector.get(r.g);t===o.components[0]&&("enabledNonBlocking"!==e.initialNavigation&&void 0!==e.initialNavigation||s.initialNavigation(),i.setUpPreloading(),n.init(),s.resetRootComponentType(o.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.t))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();function Ew(t){return t.appInitializer.bind(t)}function Dw(t){return t.bootstrapListener.bind(t)}const Iw=new r.s("Router Initializer"),Pw=["stepHolder"],Ow=["stepContainer"];function Mw(t,e){if(1&t&&r.Qb(0,"joyride-arrow",17),2&t){const t=r.gc();r.Fc("top",t.arrowTopPosition,"px")("left",t.arrowLeftPosition,"px"),r.nc("position",t.arrowPosition)}}function Tw(t,e){1&t&&r.Rb(0)}function Rw(t,e){if(1&t&&(r.Kc(0),r.hc(1,"async")),2&t){const t=r.gc();r.Mc(" ",r.ic(1,1,t.text)," ")}}function Vw(t,e){1&t&&r.Rb(0)}function Fw(t,e){if(1&t&&(r.Vb(0,"div",20),r.Kc(1),r.Ub()),2&t){const t=r.gc(2);r.Db(1),r.Lc(t.counter)}}function Lw(t,e){if(1&t&&(r.Vb(0,"div",18),r.Ic(1,Vw,1,0,"ng-container",9),r.Ic(2,Fw,2,1,"ng-template",null,19,r.Jc),r.Ub()),2&t){const t=r.wc(3),e=r.gc();r.Db(1),r.nc("ngTemplateOutlet",e.customCounter?e.customCounter:t)("ngTemplateOutletContext",e.counterData)}}function Uw(t,e){1&t&&r.Rb(0)}function Bw(t,e){if(1&t&&(r.Vb(0,"joyride-button",24),r.Kc(1),r.hc(2,"async"),r.Ub()),2&t){const t=r.gc(2);r.nc("color",t.themeColor),r.Db(1),r.Lc(r.ic(2,2,t.prevText))}}function Nw(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",21),r.cc("click",function(){return r.Ac(t),r.gc().prev()}),r.Ic(1,Uw,1,0,"ng-container",22),r.Ic(2,Bw,3,4,"ng-template",null,23,r.Jc),r.Ub()}if(2&t){const t=r.wc(3),e=r.gc();r.Db(1),r.nc("ngTemplateOutlet",e.customPrevButton?e.customPrevButton:t)}}function jw(t,e){1&t&&r.Rb(0)}function zw(t,e){if(1&t&&(r.Vb(0,"joyride-button",27),r.Kc(1),r.hc(2,"async"),r.Ub()),2&t){const t=r.gc(2);r.nc("color",t.themeColor),r.Db(1),r.Lc(r.ic(2,2,t.nextText))}}function Hw(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",25),r.cc("click",function(){return r.Ac(t),r.gc().next()}),r.Ic(1,jw,1,0,"ng-container",22),r.Ic(2,zw,3,4,"ng-template",null,26,r.Jc),r.Ub()}if(2&t){const t=r.wc(3),e=r.gc();r.Db(1),r.nc("ngTemplateOutlet",e.customNextButton?e.customNextButton:t)}}function Kw(t,e){1&t&&r.Rb(0)}function $w(t,e){if(1&t&&(r.Vb(0,"joyride-button",30),r.Kc(1),r.hc(2,"async"),r.Ub()),2&t){const t=r.gc(2);r.nc("color",t.themeColor),r.Db(1),r.Lc(r.ic(2,2,t.doneText))}}function Gw(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",28),r.cc("click",function(){return r.Ac(t),r.gc().close()}),r.Ic(1,Kw,1,0,"ng-container",22),r.Ic(2,$w,3,4,"ng-template",null,29,r.Jc),r.Ub()}if(2&t){const t=r.wc(3),e=r.gc();r.Db(1),r.nc("ngTemplateOutlet",e.customDoneButton?e.customDoneButton:t)}}const Ww=function(t,e,i){return{"background-color":t,color:e,"border-color":i}},Zw=["*"];class qw{constructor(){this.title=new $n,this.text=new $n}}const Yw={prev:Se("prev"),next:Se("next"),done:Se("done"),close:Se(null)};let Qw=(()=>{let t=class{constructor(){this.themeColor="#3b5560",this.stepDefaultPosition="bottom",this.logsEnabled=!1,this.showCounter=!0,this.showPrevButton=!0,this.stepsOrder=[]}setOptions(t){this.stepsOrder=t.steps,this.stepDefaultPosition=t.stepDefaultPosition?t.stepDefaultPosition:this.stepDefaultPosition,this.logsEnabled=void 0!==t.logsEnabled?t.logsEnabled:this.logsEnabled,this.showCounter=void 0!==t.showCounter?t.showCounter:this.showCounter,this.showPrevButton=void 0!==t.showPrevButton?t.showPrevButton:this.showPrevButton,this.themeColor=t.themeColor?t.themeColor:this.themeColor,this.firstStep=t.startWith,this.waitingTime=void 0!==t.waitingTime?t.waitingTime:1,this.setCustomText(void 0!==t.customTexts?t.customTexts:Yw)}getBackdropColor(){return this.hexToRgb(this.themeColor)}getThemeColor(){return this.themeColor}getStepDefaultPosition(){return this.stepDefaultPosition}getStepsOrder(){return this.stepsOrder}getFirstStep(){return this.firstStep}getWaitingTime(){return this.waitingTime}areLogsEnabled(){return this.logsEnabled}isCounterVisible(){return this.showCounter}isPrevButtonVisible(){return this.showPrevButton}getCustomTexts(){return this.customTexts}setCustomText(t){let e,i,n,r;e=t.prev?t.prev:Yw.prev,i=t.next?t.next:Yw.next,n=t.done?t.done:Yw.done,r=t.close?t.close:Yw.close,this.customTexts={prev:this.toObservable(e),next:this.toObservable(i),done:this.toObservable(n),close:this.toObservable(r)}}toObservable(t){return t instanceof Ze.a?t:Se(t)}hexToRgb(t){t=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(t,e,i,n)=>e+e+i+i+n+n);const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?`${parseInt(e[1],16)}, ${parseInt(e[2],16)}, ${parseInt(e[3],16)}`:null}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})();const Xw="ngx-joyride:::";let Jw=(()=>{let t=class{constructor(t){this.optionService=t}debug(t,e=""){this.optionService.areLogsEnabled()&&console.debug(Xw+t,e)}info(t,e=""){this.optionService.areLogsEnabled()&&console.info(Xw+t,e)}warn(t,e=""){this.optionService.areLogsEnabled()&&console.warn(Xw+t,e)}error(t,e=""){this.optionService.areLogsEnabled()&&console.error(Xw+t,e)}};return t.\u0275fac=function(e){return new(e||t)(r.Zb(Qw))},t.\u0275prov=r.Lb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})();class tx extends Error{constructor(t){super(t),Object.setPrototypeOf(this,tx.prototype)}}class ex extends Error{constructor(t){super(t),Object.setPrototypeOf(this,ex.prototype)}}class ix extends Error{constructor(t){super(t),Object.setPrototypeOf(this,ix.prototype)}}var nx=function(t){return t.NEXT="NEXT",t.PREV="PREV",t}({});let rx=(()=>{let t=class{constructor(t,e){this.stepOptions=t,this.logger=e,this.tempSteps=[],this.currentStepIndex=-2,this.stepHasBeenModified=new _e.a}getFirstStepIndex(){const t=this.stepOptions.getFirstStep();let e=this.stepOptions.getStepsOrder().indexOf(t);return e<0&&(e=0,void 0!==t&&this.logger.warn(`The step ${t} does not exist. Check in your step list if it's present.`)),e}init(){this.logger.info("Initializing the steps array."),this.steps=[],this.currentStepIndex=this.getFirstStepIndex()-1,this.stepOptions.getStepsOrder().forEach(t=>this.steps.push({id:t,step:null}))}addStep(t){if(this.tempSteps.filter(e=>e.name===t.name).length>0){let e=this.tempSteps.findIndex(e=>e.name===t.name);this.tempSteps[e]=t}else this.logger.info(`Adding step ${t.name} to the steps list.`),this.tempSteps.push(t)}get(t){if(t===nx.NEXT?this.currentStepIndex++:this.currentStepIndex--,this.currentStepIndex<0||this.currentStepIndex>=this.steps.length)throw new ix("The first or last step of the tour cannot be found!");const e=this.getStepName(this.steps[this.currentStepIndex].id),i=this.tempSteps.findIndex(t=>t.name===e);let n=this.tempSteps[i];return this.steps[this.currentStepIndex].step=n,null==n&&this.logger.warn(`Step ${this.steps[this.currentStepIndex].id} not found in the DOM. Check if it's hidden by *ngIf directive.`),n}getStepRoute(t){let e;return e=t===nx.NEXT?this.steps[this.currentStepIndex+1]?this.steps[this.currentStepIndex+1].id:null:this.steps[this.currentStepIndex-1]?this.steps[this.currentStepIndex-1].id:null,e&&e.includes("@")?e.split("@")[1]:""}updatePosition(t,e){let i=this.getStepIndex(t);this.steps[i].step?(this.steps[i].step.position=e,this.stepHasBeenModified.next(this.steps[i].step)):this.logger.warn(`Trying to modify the position of ${t} to ${e}. Step not found!Is this step located in a different route?`)}getStepNumber(t){return this.getStepIndex(t)+1}getStepsCount(){return this.stepOptions.getStepsOrder().length}getStepIndex(t){const e=this.steps.map(t=>t.id.includes("@")?t.id.split("@")[0]:t.id).findIndex(e=>t===e);if(-1===e)throw new tx(`The step with name: ${t} does not exist in the step list.`);return e}getStepName(t){return t&&t.includes("@")?t.split("@")[0]:t}};return t.\u0275fac=function(e){return new(e||t)(r.Zb(Qw),r.Zb(Jw))},t.\u0275prov=r.Lb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})(),sx=(()=>{let t=class{constructor(t){this.platformId=t,this.fakeDocument={body:{},documentElement:{}},this.fakeWindow={document:this.fakeDocument,navigator:{}}}getNativeWindow(){return Dt(this.platformId)?window:this.fakeWindow}getNativeDocument(){return Dt(this.platformId)?document:this.fakeDocument}};return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.D))},t.\u0275prov=r.Lb({token:t,factory:function(e){return t.\u0275fac(e)}}),t=Object(ue.b)([Object(ue.c)(0,Object(r.q)(r.D))],t),t})(),ox=(()=>{let t=class{setPrevButton(t){this._prevButton=t}getPrevButton(){return this._prevButton}setNextButton(t){this._nextButton=t}getNextButton(){return this._nextButton}setDoneButton(t){this._doneButton=t}getDoneButton(){return this._doneButton}setCounter(t){this._counter=t}getCounter(){return this._counter}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})(),ax=(()=>{let t=class{constructor(t,e,i,n,s,o){this.joyrideStepsContainer=t,this.viewContainerRef=e,this.domService=i,this.router=n,this.templateService=s,this.platformId=o,this.stepPosition="NO_POSITION",this.prev=new r.o,this.next=new r.o,this.done=new r.o,this.subscriptions=[],this.windowRef=this.domService.getNativeWindow(),this.step=new qw}ngAfterViewInit(){if(Dt(this.platformId)){if(this.prevTemplate&&this.templateService.setPrevButton(this.prevTemplate),this.nextTemplate&&this.templateService.setNextButton(this.nextTemplate),this.doneTemplate&&this.templateService.setDoneButton(this.doneTemplate),this.counterTemplate&&this.templateService.setCounter(this.counterTemplate),this.step.position=this.stepPosition,this.step.targetViewContainer=this.viewContainerRef,this.setAsyncFields(this.step),this.step.stepContent=this.stepContent,this.step.stepContentParams=this.stepContentParams,this.step.nextClicked=this.next,this.step.prevCliked=this.prev,this.step.tourDone=this.done,!this.name)throw new tx("All the steps should have the 'joyrideStep' property set with a custom name.");this.step.name=this.name,this.step.route="/"===this.router.url.substr(0,1)?this.router.url.substr(1):this.router.url,this.step.transformCssStyle=this.windowRef.getComputedStyle(this.viewContainerRef.element.nativeElement).transform,this.step.isElementOrAncestorFixed=this.isElementFixed(this.viewContainerRef.element)||this.isAncestorsFixed(this.viewContainerRef.element.nativeElement.parentElement),this.joyrideStepsContainer.addStep(this.step)}}ngOnChanges(t){(t.title||t.text)&&this.setAsyncFields(this.step)}isElementFixed(t){return"fixed"===this.windowRef.getComputedStyle(t.nativeElement).position}setAsyncFields(t){this.title instanceof Ze.a?this.subscriptions.push(this.title.subscribe(e=>{t.title.next(e)})):t.title.next(this.title),this.text instanceof Ze.a?this.subscriptions.push(this.text.subscribe(e=>{t.text.next(e)})):t.text.next(this.text)}isAncestorsFixed(t){if(!t||!t.parentElement)return!1;let e="fixed"===this.windowRef.getComputedStyle(t.parentElement).position;return"BODY"===t.nodeName?e:!!e||this.isAncestorsFixed(t.parentElement)}ngOnDestroy(){this.subscriptions.forEach(t=>{t.unsubscribe()})}};return t.\u0275fac=function(e){return new(e||t)(r.Pb(rx),r.Pb(r.S),r.Pb(sx),r.Pb(sw),r.Pb(ox),r.Pb(r.D))},t.\u0275dir=r.Kb({type:t,selectors:[["joyrideStep"],["","joyrideStep",""]],inputs:{stepPosition:"stepPosition",name:["joyrideStep","name"],nextStep:"nextStep",title:"title",text:"text",stepContent:"stepContent",stepContentParams:"stepContentParams",prevTemplate:"prevTemplate",nextTemplate:"nextTemplate",doneTemplate:"doneTemplate",counterTemplate:"counterTemplate"},outputs:{prev:"prev",next:"next",done:"done"},features:[r.Bb]}),t=Object(ue.b)([Object(ue.c)(5,Object(r.q)(r.D))],t),t})(),lx=(()=>{let t=class{constructor(t){this.DOMService=t,this.setDocumentHeight(),document.elementsFromPoint||(document.elementsFromPoint=this.elementsFromPoint.bind(this))}getElementFixedTop(t){return t.nativeElement.getBoundingClientRect().top}getElementFixedLeft(t){return t.nativeElement.getBoundingClientRect().left}getElementAbsoluteTop(t){const e=this.getScrollOffsets();return t.nativeElement.getBoundingClientRect().top+e.y}getElementAbsoluteLeft(t){const e=this.getScrollOffsets();return t.nativeElement.getBoundingClientRect().left+e.x}setDocumentHeight(){this.documentHeight=this.calculateDocumentHeight()}getDocumentHeight(){return this.documentHeight}isParentScrollable(t){return this.getFirstScrollableParent(t.nativeElement)!==this.DOMService.getNativeDocument().body}isElementBeyondOthers(t,e,i){const n=e?this.getElementFixedLeft(t):this.getElementAbsoluteLeft(t),r=e?this.getElementFixedTop(t):this.getElementAbsoluteTop(t),s=n+t.nativeElement.getBoundingClientRect().width-1,o=r+t.nativeElement.getBoundingClientRect().height-1,a=this.DOMService.getNativeDocument().elementsFromPoint(n,r),l=this.DOMService.getNativeDocument().elementsFromPoint(s,o);return 0===a.length&&0===l.length?1:this.getFirstElementWithoutKeyword(a,i)!==t.nativeElement||this.getFirstElementWithoutKeyword(l,i)!==t.nativeElement?2:3}scrollIntoView(t,e){const i=this.getFirstScrollableParent(t.nativeElement),n=e?this.getElementFixedTop(t):this.getElementAbsoluteTop(t);i!==this.DOMService.getNativeDocument().body?i.scrollTo?i.scrollTo(0,n-150):i.scrollTop=n-150:this.DOMService.getNativeWindow().scrollTo(0,n-150)}scrollToTheTop(t){const e=this.getFirstScrollableParent(t.nativeElement);e!==this.DOMService.getNativeDocument().body?e.scrollTo?e.scrollTo(0,0):e.scrollTop=0:this.DOMService.getNativeWindow().scrollTo(0,0)}scrollToTheBottom(t){const e=this.getFirstScrollableParent(t.nativeElement);e!==this.DOMService.getNativeDocument().body?e.scrollTo?e.scrollTo(0,this.DOMService.getNativeDocument().body.scrollHeight):e.scrollTop=e.scrollHeight-e.clientHeight:this.DOMService.getNativeWindow().scrollTo(0,this.DOMService.getNativeDocument().body.scrollHeight)}getFirstScrollableParent(t){const e=/(auto|scroll|overlay)/,i=(t,e)=>this.DOMService.getNativeWindow().getComputedStyle(t,null).getPropertyValue(e),n=t=>t&&t!==this.DOMService.getNativeDocument().body?(t=>e.test(i(t,"overflow")+i(t,"overflow-y")+i(t,"overflow-x")))(t)?t:n(t.parentNode):this.DOMService.getNativeDocument().body;return n(t)}calculateDocumentHeight(){const t=this.DOMService.getNativeDocument();return Math.max(t.body.scrollHeight,t.documentElement.scrollHeight,t.body.offsetHeight,t.documentElement.offsetHeight,t.body.clientHeight,t.documentElement.clientHeight)}getScrollOffsets(){const t=this.DOMService.getNativeWindow(),e=this.DOMService.getNativeDocument();return null!=t.pageXOffset?{x:t.pageXOffset,y:t.pageYOffset}:"CSS1Compat"==e.compatMode?{x:e.documentElement.scrollLeft,y:e.documentElement.scrollTop}:{x:e.body.scrollLeft,y:e.body.scrollTop}}elementsFromPoint(t,e){var i=[],n=void 0;do{const r=this.DOMService.getNativeDocument().elementFromPoint(t,e);r&&n!==r?(i.push(n=r),n.style.pointerEvents="none"):n=!1}while(n);return i.forEach(function(t){return t.style.pointerEvents="all"}),i}getFirstElementWithoutKeyword(t,e){for(;t[0]&&t[0].classList.toString().includes(e);)t.shift();return t[0]}};return t.\u0275fac=function(e){return new(e||t)(r.Zb(sx))},t.\u0275prov=r.Lb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})(),cx=(()=>{let t=class{constructor(t,e,i){this.documentService=t,this.optionsService=e,this.rendererFactory=i,this.lastXScroll=0,this.lastYScroll=0,this.setRenderer()}setRenderer(){this.renderer=this.rendererFactory.createRenderer(null,null)}draw(t){this.elementRef=t.targetViewContainer,this.targetAbsoluteTop=this.getTargetTotalTop(t),this.targetAbsoluteLeft=this.getTargetTotalLeft(t),this.currentBackdropContainer=this.renderer.createElement("div"),this.renderer.addClass(this.currentBackdropContainer,"backdrop-container"),this.renderer.setStyle(this.currentBackdropContainer,"position","fixed"),this.renderer.setStyle(this.currentBackdropContainer,"top","0px"),this.renderer.setStyle(this.currentBackdropContainer,"left","0px"),this.renderer.setStyle(this.currentBackdropContainer,"width","100%"),this.renderer.setStyle(this.currentBackdropContainer,"height","100%"),this.renderer.setStyle(this.currentBackdropContainer,"z-index","1000"),this.renderer.setAttribute(this.currentBackdropContainer,"id","backdrop-"+t.name),this.backdropContent=this.renderer.createElement("div"),this.renderer.addClass(this.backdropContent,"backdrop-content"),this.renderer.setStyle(this.backdropContent,"position","relative"),this.renderer.setStyle(this.backdropContent,"height","100%"),this.renderer.setStyle(this.backdropContent,"display","flex"),this.renderer.setStyle(this.backdropContent,"flex-direction","column"),this.renderer.appendChild(this.currentBackdropContainer,this.backdropContent),this.backdropTop=this.renderer.createElement("div"),this.renderer.addClass(this.backdropTop,"joyride-backdrop"),this.renderer.addClass(this.backdropTop,"backdrop-top"),this.renderer.setStyle(this.backdropTop,"width","100%"),this.renderer.setStyle(this.backdropTop,"height",this.targetAbsoluteTop-this.lastYScroll+"px"),this.renderer.setStyle(this.backdropTop,"flex-shrink","0"),this.renderer.setStyle(this.backdropTop,"background-color",`rgba(${this.optionsService.getBackdropColor()}, 0.7)`),this.renderer.appendChild(this.backdropContent,this.backdropTop),this.backdropMiddleContainer=this.renderer.createElement("div"),this.renderer.addClass(this.backdropMiddleContainer,"backdrop-middle-container"),this.renderer.setStyle(this.backdropMiddleContainer,"height",this.elementRef.element.nativeElement.offsetHeight+"px"),this.renderer.setStyle(this.backdropMiddleContainer,"width","100%"),this.renderer.setStyle(this.backdropMiddleContainer,"flex-shrink","0"),this.renderer.appendChild(this.backdropContent,this.backdropMiddleContainer),this.backdropMiddleContent=this.renderer.createElement("div"),this.renderer.addClass(this.backdropMiddleContent,"backdrop-middle-content"),this.renderer.setStyle(this.backdropMiddleContent,"display","flex"),this.renderer.setStyle(this.backdropMiddleContent,"width","100%"),this.renderer.setStyle(this.backdropMiddleContent,"height","100%"),this.renderer.appendChild(this.backdropMiddleContainer,this.backdropMiddleContent),this.leftBackdrop=this.renderer.createElement("div"),this.renderer.addClass(this.leftBackdrop,"joyride-backdrop"),this.renderer.addClass(this.leftBackdrop,"backdrop-left"),this.renderer.setStyle(this.leftBackdrop,"flex-shrink","0"),this.renderer.setStyle(this.leftBackdrop,"width",this.targetAbsoluteLeft-this.lastXScroll+"px"),this.renderer.setStyle(this.leftBackdrop,"background-color",`rgba(${this.optionsService.getBackdropColor()}, 0.7)`),this.renderer.appendChild(this.backdropMiddleContent,this.leftBackdrop),this.targetBackdrop=this.renderer.createElement("div"),this.renderer.addClass(this.targetBackdrop,"backdrop-target"),this.renderer.setStyle(this.targetBackdrop,"flex-shrink","0"),this.renderer.setStyle(this.targetBackdrop,"width",this.elementRef.element.nativeElement.offsetWidth+"px"),this.renderer.appendChild(this.backdropMiddleContent,this.targetBackdrop),this.rightBackdrop=this.renderer.createElement("div"),this.renderer.addClass(this.rightBackdrop,"joyride-backdrop"),this.renderer.addClass(this.rightBackdrop,"backdrop-right"),this.renderer.setStyle(this.rightBackdrop,"width","100%"),this.renderer.setStyle(this.rightBackdrop,"background-color",`rgba(${this.optionsService.getBackdropColor()}, 0.7)`),this.renderer.appendChild(this.backdropMiddleContent,this.rightBackdrop),this.backdropBottom=this.renderer.createElement("div"),this.renderer.addClass(this.backdropBottom,"joyride-backdrop"),this.renderer.addClass(this.backdropBottom,"backdrop-bottom"),this.renderer.setStyle(this.backdropBottom,"width","100%"),this.renderer.setStyle(this.backdropBottom,"height","100%"),this.renderer.setStyle(this.backdropBottom,"background-color",`rgba(${this.optionsService.getBackdropColor()}, 0.7)`),this.renderer.appendChild(this.backdropContent,this.backdropBottom),this.removeLastBackdrop(),this.drawCurrentBackdrop(),this.lastBackdropContainer=this.currentBackdropContainer}remove(){this.removeLastBackdrop()}redrawTarget(t){this.targetAbsoluteLeft=this.getTargetTotalLeft(t),this.targetAbsoluteTop=this.getTargetTotalTop(t),this.handleVerticalScroll(t),this.handleHorizontalScroll(t)}getTargetTotalTop(t){let e=t.targetViewContainer;return t.isElementOrAncestorFixed?this.documentService.getElementFixedTop(e.element):this.documentService.getElementAbsoluteTop(e.element)}getTargetTotalLeft(t){let e=t.targetViewContainer;return t.isElementOrAncestorFixed?this.documentService.getElementFixedLeft(e.element):this.documentService.getElementAbsoluteLeft(e.element)}redraw(t,e){this.lastYScroll!==e.scrollY&&(this.lastYScroll=e.scrollY,this.elementRef&&this.handleVerticalScroll(t)),this.lastXScroll!==e.scrollX&&(this.lastXScroll=e.scrollX,this.elementRef&&this.handleHorizontalScroll(t))}handleHorizontalScroll(t){let e=t.isElementOrAncestorFixed?this.targetAbsoluteLeft:this.targetAbsoluteLeft-this.lastXScroll;e>=0?(this.renderer.setStyle(this.leftBackdrop,"width",e+"px"),this.renderer.setStyle(this.targetBackdrop,"width",this.elementRef.element.nativeElement.offsetWidth+"px")):this.handleTargetPartialWidth(e)}handleTargetPartialWidth(t){this.renderer.setStyle(this.leftBackdrop,"width","0px");let e=this.elementRef.element.nativeElement.offsetWidth+t;this.renderer.setStyle(this.targetBackdrop,"width",e>=0?e+"px":"0px")}handleVerticalScroll(t){let e=t.isElementOrAncestorFixed?this.targetAbsoluteTop:this.targetAbsoluteTop-this.lastYScroll;e>=0?(this.renderer.setStyle(this.backdropTop,"height",e+"px"),this.renderer.setStyle(this.backdropMiddleContainer,"height",this.elementRef.element.nativeElement.offsetHeight+"px")):this.handleTargetPartialHeight(e)}handleTargetPartialHeight(t){this.renderer.setStyle(this.backdropTop,"height","0px");let e=this.elementRef.element.nativeElement.offsetHeight+t;this.renderer.setStyle(this.backdropMiddleContainer,"height",e>=0?e+"px":"0px")}removeLastBackdrop(){this.lastBackdropContainer&&(this.renderer.removeChild(document.body,this.lastBackdropContainer),this.lastBackdropContainer=void 0)}drawCurrentBackdrop(){this.renderer.appendChild(document.body,this.currentBackdropContainer)}};return t.\u0275fac=function(e){return new(e||t)(r.Zb(lx),r.Zb(Qw),r.Zb(r.I))},t.\u0275prov=r.Lb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})(),hx=(()=>{let t=class{constructor(t,e){this.rendererFactory=t,this.DOMService=e,this.scrollEvent=new _e.a,this.resizeEvent=new _e.a,this.renderer=t.createRenderer(null,null)}startListeningScrollEvents(){this.scrollUnlisten=this.renderer.listen("document","scroll",t=>{this.scrollEvent.next({scrollX:this.DOMService.getNativeWindow().pageXOffset,scrollY:this.DOMService.getNativeWindow().pageYOffset})})}startListeningResizeEvents(){this.resizeUnlisten=this.renderer.listen("window","resize",t=>{this.resizeEvent.next(t)})}stopListeningScrollEvents(){this.scrollUnlisten()}stopListeningResizeEvents(){this.resizeUnlisten()}};return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.I),r.Zb(sx))},t.\u0275prov=r.Lb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})(),ux=(()=>{let t=class{constructor(t,e,i,n,r,s,o,a){this.injector=t,this.stepsContainerService=e,this.eventListenerService=i,this.documentService=n,this.renderer=r,this.logger=s,this.optionsService=o,this.templateService=a,this.stepWidth=200,this.stepHeight=200,this.showArrow=!0,this.arrowSize=Ax,this.subscriptions=[]}ngOnInit(){this.joyrideStepService=this.injector.get(bx),this.documentHeight=this.documentService.getDocumentHeight(),this.subscriptions.push(this.subscribeToResizeEvents()),this.title=this.step.title.asObservable(),this.text=this.step.text.asObservable(),this.setCustomTemplates(),this.setCustomTexts(),this.counter=this.getCounter(),this.isCounterVisible=this.optionsService.isCounterVisible(),this.isPrevButtonVisible=this.optionsService.isPrevButtonVisible(),this.themeColor=this.optionsService.getThemeColor(),this.text&&this.text.subscribe(t=>this.checkRedraw(t)),this.title&&this.title.subscribe(t=>this.checkRedraw(t))}ngAfterViewInit(){if(this.isCustomized())this.renderer.setStyle(this.stepContainer.nativeElement,"max-width","90vw"),this.updateStepDimensions();else{this.renderer.setStyle(this.stepContainer.nativeElement,"max-width","400px");let t=this.getDimensionsByAspectRatio(this.stepContainer.nativeElement.clientWidth,this.stepContainer.nativeElement.clientHeight,1.212);t=this.adjustDimensions(t.width,t.height),this.stepWidth=t.width,this.stepHeight=t.height,this.renderer.setStyle(this.stepContainer.nativeElement,"width",this.stepWidth+"px"),this.renderer.setStyle(this.stepContainer.nativeElement,"height",this.stepHeight+"px")}this.drawStep()}checkRedraw(t){null!=t&&setTimeout(()=>{this.redrawStep()},2)}isCustomized(){return this.step.stepContent||this.templateService.getCounter()||this.templateService.getPrevButton()||this.templateService.getNextButton()||this.templateService.getDoneButton()}setCustomTexts(){const t=this.optionsService.getCustomTexts();this.prevText=t.prev,this.nextText=t.next,this.doneText=t.done}drawStep(){let t=this.step.isElementOrAncestorFixed?"fixed":"absolute";this.renderer.setStyle(this.stepHolder.nativeElement,"position",t),this.renderer.setStyle(this.stepHolder.nativeElement,"transform",this.step.transformCssStyle),this.targetWidth=this.step.targetViewContainer.element.nativeElement.getBoundingClientRect().width,this.targetHeight=this.step.targetViewContainer.element.nativeElement.getBoundingClientRect().height,this.targetAbsoluteLeft="fixed"===t?this.documentService.getElementFixedLeft(this.step.targetViewContainer.element):this.documentService.getElementAbsoluteLeft(this.step.targetViewContainer.element),this.targetAbsoluteTop="fixed"===t?this.documentService.getElementFixedTop(this.step.targetViewContainer.element):this.documentService.getElementAbsoluteTop(this.step.targetViewContainer.element),this.setStepStyle()}getCounter(){let t=this.stepsContainerService.getStepNumber(this.step.name),e=this.stepsContainerService.getStepsCount();return this.counterData={step:t,total:e},t+"/"+e}setCustomTemplates(){this.customContent=this.step.stepContent,this.ctx=this.step.stepContentParams,this.customPrevButton=this.templateService.getPrevButton(),this.customNextButton=this.templateService.getNextButton(),this.customDoneButton=this.templateService.getDoneButton(),this.customCounter=this.templateService.getCounter()}prev(){this.joyrideStepService.prev()}next(){this.joyrideStepService.next()}close(){this.joyrideStepService.close()}isFirstStep(){return 1===this.stepsContainerService.getStepNumber(this.step.name)}isLastStep(){return this.stepsContainerService.getStepNumber(this.step.name)===this.stepsContainerService.getStepsCount()}setStepStyle(){switch(this.step.position){case"top":this.setStyleTop();break;case"bottom":this.setStyleBottom();break;case"right":this.setStyleRight();break;case"left":this.setStyleLeft();break;case"center":this.setStyleCenter();break;default:this.setStyleBottom()}}setStyleTop(){this.stepsContainerService.updatePosition(this.step.name,"top"),this.topPosition=this.targetAbsoluteTop-gx-this.stepHeight,this.stepAbsoluteTop=this.targetAbsoluteTop-gx-this.stepHeight,this.arrowTopPosition=this.stepHeight,this.leftPosition=this.targetWidth/2-this.stepWidth/2+this.targetAbsoluteLeft,this.stepAbsoluteLeft=this.targetWidth/2-this.stepWidth/2+this.targetAbsoluteLeft,this.arrowLeftPosition=this.stepWidth/2-this.arrowSize,this.adjustLeftPosition(),this.adjustRightPosition(),this.arrowPosition="bottom",this.autofixTopPosition()}setStyleRight(){this.stepsContainerService.updatePosition(this.step.name,"right"),this.topPosition=this.targetAbsoluteTop+this.targetHeight/2-this.stepHeight/2,this.stepAbsoluteTop=this.targetAbsoluteTop+this.targetHeight/2-this.stepHeight/2,this.arrowTopPosition=this.stepHeight/2-this.arrowSize,this.leftPosition=this.targetAbsoluteLeft+this.targetWidth+gx,this.stepAbsoluteLeft=this.targetAbsoluteLeft+this.targetWidth+gx,this.arrowLeftPosition=-this.arrowSize,this.adjustTopPosition(),this.adjustBottomPosition(),this.arrowPosition="left",this.autofixRightPosition()}setStyleBottom(){this.stepsContainerService.updatePosition(this.step.name,"bottom"),this.topPosition=this.targetAbsoluteTop+this.targetHeight+gx,this.stepAbsoluteTop=this.targetAbsoluteTop+this.targetHeight+gx,this.arrowTopPosition=-this.arrowSize,this.arrowLeftPosition=this.stepWidth/2-this.arrowSize,this.leftPosition=this.targetWidth/2-this.stepWidth/2+this.targetAbsoluteLeft,this.stepAbsoluteLeft=this.targetWidth/2-this.stepWidth/2+this.targetAbsoluteLeft,this.adjustLeftPosition(),this.adjustRightPosition(),this.arrowPosition="top",this.autofixBottomPosition()}setStyleLeft(){this.stepsContainerService.updatePosition(this.step.name,"left"),this.topPosition=this.targetAbsoluteTop+this.targetHeight/2-this.stepHeight/2,this.stepAbsoluteTop=this.targetAbsoluteTop+this.targetHeight/2-this.stepHeight/2,this.arrowTopPosition=this.stepHeight/2-this.arrowSize,this.leftPosition=this.targetAbsoluteLeft-this.stepWidth-gx,this.stepAbsoluteLeft=this.targetAbsoluteLeft-this.stepWidth-gx,this.arrowLeftPosition=this.stepWidth,this.adjustTopPosition(),this.adjustBottomPosition(),this.arrowPosition="right",this.autofixLeftPosition()}setStyleCenter(){this.renderer.setStyle(this.stepHolder.nativeElement,"position","fixed"),this.renderer.setStyle(this.stepHolder.nativeElement,"top","50%"),this.renderer.setStyle(this.stepHolder.nativeElement,"left","50%"),this.updateStepDimensions(),this.renderer.setStyle(this.stepHolder.nativeElement,"transform",`translate(-${this.stepWidth/2}px, -${this.stepHeight/2}px)`),this.showArrow=!1}adjustLeftPosition(){this.leftPosition<0&&(this.arrowLeftPosition=this.arrowLeftPosition+this.leftPosition-2,this.leftPosition=2)}adjustRightPosition(){let t=document.body.clientWidth;if(this.stepAbsoluteLeft+this.stepWidth>t){let e=this.leftPosition-(this.stepAbsoluteLeft+this.stepWidth+5-t),i=e-this.leftPosition;this.leftPosition=e,this.arrowLeftPosition=this.arrowLeftPosition-i}}adjustTopPosition(){this.stepAbsoluteTop<0&&(this.arrowTopPosition=this.arrowTopPosition+this.topPosition-2,this.topPosition=2)}adjustBottomPosition(){if(this.stepAbsoluteTop+this.stepHeight>this.documentHeight){let t=this.topPosition-(this.stepAbsoluteTop+this.stepHeight+5-this.documentHeight),e=t-this.topPosition;this.topPosition=t,this.arrowTopPosition=this.arrowTopPosition-e}}autofixTopPosition(){this.positionAlreadyFixed?this.logger.warn("No step positions found for this step. The step will be centered."):this.targetAbsoluteTop-this.stepHeight-this.arrowSize<0&&(this.positionAlreadyFixed=!0,this.setStyleRight())}autofixRightPosition(){this.targetAbsoluteLeft+this.targetWidth+this.stepWidth+this.arrowSize>document.body.clientWidth&&this.setStyleBottom()}autofixBottomPosition(){this.targetAbsoluteTop+this.stepHeight+this.arrowSize+this.targetHeight>this.documentHeight&&this.setStyleLeft()}autofixLeftPosition(){this.targetAbsoluteLeft-this.stepWidth-this.arrowSize<0&&this.setStyleTop()}subscribeToResizeEvents(){return this.eventListenerService.resizeEvent.subscribe(()=>{this.redrawStep()})}redrawStep(){this.updateStepDimensions(),this.drawStep()}getDimensionsByAspectRatio(t,e,i){let n=(t+e)/(1+i);return{width:n*i,height:n}}adjustDimensions(t,e){let i=t,n=e;return t>400?(i=400,n=t*e/i):t<200&&(i=200,n=200/1.212),{width:i,height:n}}updateStepDimensions(){this.stepWidth=this.stepContainer.nativeElement.clientWidth,this.stepHeight=this.stepContainer.nativeElement.clientHeight}ngOnDestroy(){this.subscriptions.forEach(t=>{t.unsubscribe()})}};return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.t),r.Pb(rx),r.Pb(hx),r.Pb(lx),r.Pb(r.H),r.Pb(Jw),r.Pb(Qw),r.Pb(ox))},t.\u0275cmp=r.Jb({type:t,selectors:[["joyride-step"]],viewQuery:function(t,e){if(1&t&&(r.Pc(Pw,3),r.Pc(Ow,3)),2&t){let t;r.vc(t=r.dc())&&(e.stepHolder=t.first),r.vc(t=r.dc())&&(e.stepContainer=t.first)}},inputs:{step:"step"},decls:21,vars:17,consts:[[1,"joyride-step__holder",3,"id"],["stepHolder",""],["class","joyride-step__arrow",3,"position","top","left",4,"ngIf"],[1,"joyride-step__container"],["stepContainer",""],[1,"joyride-step__close",3,"click"],[1,"joyride-step__header"],[1,"joyride-step__title"],[1,"joyride-step__body"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["defaultContent",""],[1,"joyride-step__footer"],["class","joyride-step__counter-container",4,"ngIf"],[1,"joyride-step__buttons-container"],["class","joyride-step__prev-container joyride-step__button",3,"click",4,"ngIf"],["class","joyride-step__next-container joyride-step__button",3,"click",4,"ngIf","ngIfElse"],["doneButton",""],[1,"joyride-step__arrow",3,"position"],[1,"joyride-step__counter-container"],["defaultCounter",""],[1,"joyride-step__counter"],[1,"joyride-step__prev-container","joyride-step__button",3,"click"],[4,"ngTemplateOutlet"],["defaultPrevButton",""],[1,"joyride-step__prev-button",3,"color"],[1,"joyride-step__next-container","joyride-step__button",3,"click"],["defaulNextButton",""],[3,"color"],[1,"joyride-step__done-container","joyride-step__button",3,"click"],["defaultDoneButton",""],[1,"joyride-step__done-button",3,"color"]],template:function(t,e){if(1&t&&(r.Vb(0,"div",0,1),r.Ic(2,Mw,1,5,"joyride-arrow",2),r.Vb(3,"div",3,4),r.Vb(5,"joy-close-button",5),r.cc("click",function(){return e.close()}),r.Ub(),r.Vb(6,"div",6),r.Vb(7,"div",7),r.Kc(8),r.hc(9,"async"),r.Ub(),r.Ub(),r.Vb(10,"div",8),r.Ic(11,Tw,1,0,"ng-container",9),r.Ic(12,Rw,2,3,"ng-template",null,10,r.Jc),r.Ub(),r.Vb(14,"div",11),r.Ic(15,Lw,4,2,"div",12),r.Vb(16,"div",13),r.Ic(17,Nw,4,1,"div",14),r.Ic(18,Hw,4,1,"div",15),r.Ic(19,Gw,4,1,"ng-template",null,16,r.Jc),r.Ub(),r.Ub(),r.Ub(),r.Ub()),2&t){const t=r.wc(13),i=r.wc(20);r.Fc("top",e.topPosition,"px")("left",e.leftPosition,"px"),r.nc("id","joyride-step-"+e.step.name),r.Db(2),r.nc("ngIf",e.showArrow),r.Db(5),r.Fc("color",e.themeColor),r.Db(1),r.Lc(r.ic(9,15,e.title)),r.Db(3),r.nc("ngTemplateOutlet",e.customContent?e.customContent:t)("ngTemplateOutletContext",e.ctx),r.Db(4),r.nc("ngIf",e.isCounterVisible),r.Db(2),r.nc("ngIf",e.isPrevButtonVisible&&!e.isFirstStep()),r.Db(1),r.nc("ngIf",!e.isLastStep())("ngIfElse",i)}},directives:function(){return[ut,fx,vt,dx,px]},pipes:function(){return[St]},styles:[".joyride-step__holder{position:absolute;font-family:Arial,Helvetica,sans-serif;font-size:16px;z-index:1001}.joyride-step__arrow{position:absolute;left:40px;z-index:1002}.joyride-step__container{box-sizing:border-box;position:relative;color:#000;background-color:#fff;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-pack:justify;justify-content:space-between;padding:10px;box-shadow:0 0 30px 1px #000}.joyride-step__header{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;padding:8px}.joyride-step__title{font-weight:700;font-size:20px}.joyride-step__close{position:absolute;right:10px;top:10px;width:14px;height:14px;cursor:pointer}.joyride-step__body{text-align:left;padding:10px 8px}.joyride-step__footer{display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-pack:justify;justify-content:space-between;-webkit-box-align:center;align-items:center;padding-left:8px}.joyride-step__buttons-container{display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}.joyride-step__button:first-child{margin-right:2.5px}.joyride-step__button:last-child{margin-left:2.5px}.joyride-step__counter{font-weight:700;font-size:14px}.joyride-step__counter-container{margin-right:10px}"],encapsulation:2}),t})(),dx=(()=>{let t=class{constructor(){this.position="top"}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["joyride-arrow"]],inputs:{position:"position"},decls:1,vars:8,template:function(t,e){1&t&&r.Qb(0,"div"),2&t&&r.Hb("joyride-arrow__top","top"==e.position)("joyride-arrow__bottom","bottom"==e.position)("joyride-arrow__left","left"==e.position)("joyride-arrow__right","right"==e.position)},styles:[".joyride-arrow__top{border-left:11px solid transparent;border-right:11px solid transparent;border-bottom:11px solid #fff}.joyride-arrow__bottom{border-left:11px solid transparent;border-right:11px solid transparent;border-top:11px solid #fff}.joyride-arrow__right{border-left:11px solid #fff;border-bottom:11px solid transparent;border-top:11px solid transparent}.joyride-arrow__left{border-right:11px solid #fff;border-top:11px solid transparent;border-bottom:11px solid transparent}"],encapsulation:2}),t})(),px=(()=>{let t=class{constructor(){this.clicked=new r.o}onClick(){this.clicked.emit()}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["joyride-button"]],inputs:{color:"color"},outputs:{clicked:"clicked"},ngContentSelectors:Zw,decls:2,vars:5,consts:[[1,"joyride-button",3,"ngStyle","mouseleave","mouseover","click"]],template:function(t,e){1&t&&(r.mc(),r.Vb(0,"button",0),r.cc("mouseleave",function(){return e.hover=!1})("mouseover",function(){return e.hover=!0})("click",function(){return e.onClick()}),r.lc(1),r.Ub()),2&t&&r.nc("ngStyle",r.uc(1,Ww,e.hover?"#fff":e.color,e.hover?e.color:"#fff",e.hover?e.color:"transparent"))},directives:[bt],styles:[".joyride-button[_ngcontent-%COMP%]{text-transform:uppercase;border:2px solid transparent;outline:0;padding:6px 12px;font-size:12px;font-weight:700;color:#fff;background-color:#3b5560;cursor:pointer}.joyride-button[_ngcontent-%COMP%]:hover{color:#3b5560;border:2px solid #3b5560;background-color:#fff}"]}),t})(),fx=(()=>{let t=class{};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["joy-close-button"]],decls:3,vars:0,consts:[["viewBox","0 0 25 25","xmlns","http://www.w3.org/2000/svg"],["x1","1","y1","24","x2","24","y2","1","stroke","black","stroke-width","3"],["x1","1","y1","1","x2","24","y2","24","stroke","black","stroke-width","3"]],template:function(t,e){1&t&&(r.fc(),r.Vb(0,"svg",0),r.Qb(1,"line",1),r.Qb(2,"line",2),r.Ub())},encapsulation:2}),t})(),mx=(()=>{let t=class{constructor(t,e,i){this.componentFactoryResolver=t,this.appRef=e,this.injector=i,this.refMap={}}draw(t){const e=this.componentFactoryResolver.resolveComponentFactory(ux).create(this.injector);this.appRef.attachView(e.hostView),document.body.appendChild(e.hostView.rootNodes[0]);const i=e.instance;i.step=t,e.changeDetectorRef.detectChanges(),t.stepInstance=i,this.refMap[t.name]=e}remove(t){this.appRef.detachView(this.refMap[t.name].hostView),this.refMap[t.name].destroy()}};return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.j),r.Zb(r.g),r.Zb(r.t))},t.\u0275prov=r.Lb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})();const gx=15,Ax=10;let bx=(()=>{let t=class{constructor(t,e,i,n,r,s,o,a,l){this.backDropService=t,this.eventListener=e,this.stepsContainerService=i,this.documentService=n,this.DOMService=r,this.stepDrawerService=s,this.optionsService=o,this.router=a,this.logger=l,this.winTopPosition=0,this.winBottomPosition=0,this.stepsObserver=new $n,this.initViewportPositions(),this.subscribeToScrollEvents(),this.subscribeToResizeEvents()}initViewportPositions(){this.winTopPosition=0,this.winBottomPosition=this.DOMService.getNativeWindow().innerHeight-20}subscribeToScrollEvents(){this.eventListener.startListeningScrollEvents(),this.eventListener.scrollEvent.subscribe(t=>{this.winTopPosition=t.scrollY,this.winBottomPosition=this.winTopPosition+this.DOMService.getNativeWindow().innerHeight-20,this.currentStep&&this.backDropService.redraw(this.currentStep,t)})}subscribeToResizeEvents(){this.eventListener.resizeEvent.subscribe(()=>{this.currentStep&&this.backDropService.redrawTarget(this.currentStep)})}drawStep(t){t.position="NO_POSITION"===t.position?this.optionsService.getStepDefaultPosition():t.position,this.stepDrawerService.draw(t)}startTour(){return this.stepsObserver=new $n,this.stepsContainerService.init(),this.documentService.setDocumentHeight(),this.tryShowStep(nx.NEXT),this.eventListener.startListeningResizeEvents(),this.subscribeToStepsUpdates(),this.stepsObserver.asObservable()}close(){this.removeCurrentStep(),this.notifyTourIsFinished(),this.DOMService.getNativeWindow().scrollTo(0,0),this.eventListener.stopListeningResizeEvents(),this.backDropService.remove()}prev(){this.removeCurrentStep(),this.currentStep.prevCliked.emit(),this.tryShowStep(nx.PREV)}next(){this.removeCurrentStep(),this.currentStep.nextClicked.emit(),this.tryShowStep(nx.NEXT)}navigateToStepPage(t){let e=this.stepsContainerService.getStepRoute(t);e&&this.router.navigate([e])}subscribeToStepsUpdates(){this.stepsContainerService.stepHasBeenModified.subscribe(t=>{this.currentStep&&this.currentStep.name===t.name&&(this.currentStep=t)})}tryShowStep(t){this.navigateToStepPage(t);const e=this.optionsService.getWaitingTime();e>100&&this.backDropService.remove(),setTimeout(()=>{try{this.showStep(t)}catch(e){if(e instanceof ex)this.tryShowStep(t);else{if(!(e instanceof ix))throw new Error(e);this.logger.error("Forcing the tour closure: First or Last step not found in the DOM."),this.close()}}},e)}showStep(t){if(this.currentStep=this.stepsContainerService.get(t),null==this.currentStep)throw new ex("");this.scrollIfElementBeyondOtherElements(),this.backDropService.draw(this.currentStep),this.drawStep(this.currentStep),this.scrollIfStepAndTargetAreNotVisible(),this.notifyStepClicked(t)}notifyStepClicked(t){let e={number:this.stepsContainerService.getStepNumber(this.currentStep.name),name:this.currentStep.name,route:this.currentStep.route,actionType:t};this.stepsObserver.next(e)}notifyTourIsFinished(){this.currentStep&&this.currentStep.tourDone.emit(),this.stepsObserver.complete()}removeCurrentStep(){this.currentStep&&this.stepDrawerService.remove(this.currentStep)}scrollIfStepAndTargetAreNotVisible(){this.scrollWhenTargetOrStepAreHiddenBottom(),this.scrollWhenTargetOrStepAreHiddenTop()}scrollWhenTargetOrStepAreHiddenBottom(){let t=this.getMaxTargetAndStepBottomPosition();t>this.winBottomPosition&&this.DOMService.getNativeWindow().scrollBy(0,t-this.winBottomPosition)}scrollWhenTargetOrStepAreHiddenTop(){let t=this.getMaxTargetAndStepTopPosition();t<this.winTopPosition&&this.DOMService.getNativeWindow().scrollBy(0,t-this.winTopPosition)}getMaxTargetAndStepBottomPosition(){let t=this.documentService.getElementAbsoluteTop(this.currentStep.targetViewContainer.element);return"top"===this.currentStep.position?t+this.currentStep.stepInstance.targetHeight:"bottom"===this.currentStep.position?t+this.currentStep.stepInstance.targetHeight+this.currentStep.stepInstance.stepHeight+Ax+gx:"right"===this.currentStep.position||"left"===this.currentStep.position?Math.max(t+this.currentStep.stepInstance.targetHeight,t+this.currentStep.stepInstance.targetHeight/2+this.currentStep.stepInstance.stepHeight/2):void 0}getMaxTargetAndStepTopPosition(){let t=this.documentService.getElementAbsoluteTop(this.currentStep.targetViewContainer.element);return"top"===this.currentStep.position?t-(this.currentStep.stepInstance.stepHeight+Ax+gx):"bottom"===this.currentStep.position?t:"right"===this.currentStep.position||"left"===this.currentStep.position?Math.min(t,t+this.currentStep.stepInstance.targetHeight/2-this.currentStep.stepInstance.stepHeight/2):void 0}scrollIfElementBeyondOtherElements(){2===this.isElementBeyondOthers()&&this.documentService.scrollToTheTop(this.currentStep.targetViewContainer.element),2===this.isElementBeyondOthers()&&this.documentService.scrollToTheBottom(this.currentStep.targetViewContainer.element),1===this.isElementBeyondOthers()&&this.documentService.isParentScrollable(this.currentStep.targetViewContainer.element)&&this.documentService.scrollIntoView(this.currentStep.targetViewContainer.element,this.currentStep.isElementOrAncestorFixed),1===this.isElementBeyondOthers()&&this.documentService.isParentScrollable(this.currentStep.targetViewContainer.element)&&this.currentStep.targetViewContainer.element.nativeElement.scrollIntoView()}isElementBeyondOthers(){return this.documentService.isElementBeyondOthers(this.currentStep.targetViewContainer.element,this.currentStep.isElementOrAncestorFixed,"backdrop")}};return t.\u0275fac=function(e){return new(e||t)(r.Zb(cx),r.Zb(hx),r.Zb(rx),r.Zb(lx),r.Zb(sx),r.Zb(mx),r.Zb(Qw),r.Zb(sw),r.Zb(Jw))},t.\u0275prov=r.Lb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})();class vx{}let _x=(()=>{let t=class{constructor(t,e,i){this.platformId=t,this.stepService=e,this.optionsService=i,this.tourInProgress=!1}startTour(t){return Dt(this.platformId)?(this.tourInProgress||(this.tourInProgress=!0,t&&this.optionsService.setOptions(t),this.tour$=this.stepService.startTour().pipe(Xd(()=>this.tourInProgress=!1)),this.tour$.subscribe()),this.tour$):Se(new vx)}closeTour(){this.isTourInProgress()&&this.stepService.close()}isTourInProgress(){return this.tourInProgress}};return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.D),r.Zb(bx),r.Zb(Qw))},t.\u0275prov=r.Lb({token:t,factory:function(e){return t.\u0275fac(e)}}),t=Object(ue.b)([Object(ue.c)(0,Object(r.q)(r.D))],t),t})();var yx;const wx=yw.forChild([]);let xx=(()=>{let t=yx=class{static forRoot(){return{ngModule:yx,providers:[_x,bx,rx,cx,hx,lx,Qw,mx,sx,Jw,ox]}}static forChild(){return{ngModule:yx,providers:[]}}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Et,wx]]}),t})();class Cx{constructor(t,e,i){this.project=t,this.concurrent=e,this.scheduler=i}call(t,e){return e.subscribe(new Sx(t,this.project,this.concurrent,this.scheduler))}}class Sx extends bn.b{constructor(t,e,i,n){super(t),this.project=e,this.concurrent=i,this.scheduler=n,this.index=0,this.active=0,this.hasCompleted=!1,i<Number.POSITIVE_INFINITY&&(this.buffer=[])}static dispatch(t){const{subscriber:e,result:i,value:n,index:r}=t;e.subscribeToProjection(i,n,r)}_next(t){const e=this.destination;if(e.closed)return void this._complete();const i=this.index++;if(this.active<this.concurrent){e.next(t);try{const{project:e}=this,n=e(t,i);this.scheduler?this.destination.add(this.scheduler.schedule(Sx.dispatch,0,{subscriber:this,result:n,value:t,index:i})):this.subscribeToProjection(n,t,i)}catch($nt){e.error($nt)}}else this.buffer.push(t)}subscribeToProjection(t,e,i){this.active++,this.destination.add(Object(bn.c)(t,new bn.a(this)))}_complete(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()}notifyNext(t){this._next(t)}notifyComplete(){const t=this.buffer;this.active--,t&&t.length>0&&this._next(t.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()}}class kx{}let Ex=(()=>{class t extends kx{tick(t){return Se(0).pipe(function(t,e=Number.POSITIVE_INFINITY,i){return e=(e||0)<1?Number.POSITIVE_INFINITY:e,n=>n.lift(new Cx(t,e,i))}(()=>{const e=Date.now(),i=Math.round(Math.abs(e-t)/1e3),n=i<60?1e3:i<3600?6e4:i<86400?36e5:0;return n?wn(n):Ye()}),Gg(1))}}return t.\u0275fac=function(e){return Dx(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();const Dx=r.Xb(Ex);let Ix=(()=>{class t{constructor(){this.changes=new _e.a}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();class Px{}let Ox=(()=>{class t extends Px{format(t){const{suffix:e,value:i,unit:n}=function(t){const e=Date.now(),i=Math.round(Math.abs(e-t)/1e3),n=t<e?"ago":"from now",[r,s]=i<60?[Math.round(i),"second"]:i<3600?[Math.round(i/60),"minute"]:i<86400?[Math.round(i/3600),"hour"]:i<604800?[Math.round(i/86400),"day"]:i<2592e3?[Math.round(i/604800),"week"]:i<31536e3?[Math.round(i/2592e3),"month"]:[Math.round(i/31536e3),"year"];return{value:r,unit:s,suffix:n}}(t);return this.parse(i,n,e)}parse(t,e,i){return 1!==t&&(e+="s"),t+" "+e+" "+i}}return t.\u0275fac=function(e){return Mx(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();const Mx=r.Xb(Ox);let Tx=(()=>{class t{constructor(t,e,i,n){this.clock=n,this.live=!0,this.stateChanges=new _e.a,t&&(this.intlSubscription=t.changes.subscribe(()=>this.stateChanges.next())),this.stateChanges.subscribe(()=>{this.value=i.format(this.date),e.markForCheck()})}transform(t,...e){const i=function(t){const e=new Date(t);if(!Number.isNaN(e.valueOf()))return e;const i=String(t).match(/\d+/g);if(null===i||i.length<=2)return e;{const[t,e,...n]=i.map(t=>parseInt(t,10));return new Date(Date.UTC(t,e-1,...n))}}(t).valueOf();let n;if(n=null!=e[0]?null!=(r=e[0])&&"false"!=`${r}`:this.live,this.date===i&&this.live===n)return this.value;var r;if(this.date=i,this.live=n,!this.date)throw new SyntaxError(`Wrong parameter in TimeagoPipe. Expected a valid date, received: ${t}`);return this.clockSubscription&&(this.clockSubscription.unsubscribe(),this.clockSubscription=void 0),this.clockSubscription=this.clock.tick(this.date).pipe(He(()=>this.live,this)).subscribe(()=>this.stateChanges.next()),this.stateChanges.next(),this.value}ngOnDestroy(){this.intlSubscription&&(this.intlSubscription.unsubscribe(),this.intlSubscription=void 0),this.clockSubscription&&(this.clockSubscription.unsubscribe(),this.clockSubscription=void 0),this.stateChanges.complete()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Ix,8),r.bc(),r.Pb(Px),r.Pb(kx))},t.\u0275pipe=r.Ob({name:"timeago",type:t,pure:!1}),t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),Rx=(()=>{class t{static forRoot(e={}){return{ngModule:t,providers:[e.clock||{provide:kx,useClass:Ex},e.intl||[],e.formatter||{provide:Px,useClass:Ox}]}}static forChild(e={}){return{ngModule:t,providers:[e.clock||{provide:kx,useClass:Ex},e.intl||[],e.formatter||{provide:Px,useClass:Ox}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({}),t})();var Vx=function(t,e){return(Vx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function Fx(t,e){function i(){this.constructor=t}Vx(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var Lx,Ux=function(){return(Ux=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function Bx(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],n=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Nx(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,r,s=i.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=s.next()).done;)o.push(n.value)}catch(a){r={error:a}}finally{try{n&&!n.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o}function jx(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Nx(arguments[e]));return t}!function(t){t.Ok="ok",t.Exited="exited",t.Crashed="crashed",t.Abnormal="abnormal"}(Lx||(Lx={}));var zx=i("9/Zf"),Hx=i("kdvv"),Kx=Object(zx.e)(),$x="Sentry Logger ",Gx=function(){function t(){this._enabled=!1}return t.prototype.disable=function(){this._enabled=!1},t.prototype.enable=function(){this._enabled=!0},t.prototype.log=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._enabled&&Object(zx.c)(function(){Kx.console.log($x+"[Log]: "+t.join(" "))})},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._enabled&&Object(zx.c)(function(){Kx.console.warn($x+"[Warn]: "+t.join(" "))})},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._enabled&&Object(zx.c)(function(){Kx.console.error($x+"[Error]: "+t.join(" "))})},t}();Kx.__SENTRY__=Kx.__SENTRY__||{};var Wx,Zx=Kx.__SENTRY__.logger||(Kx.__SENTRY__.logger=new Gx),qx=i("+A1k"),Yx=i("9AQC");!function(t){t.PENDING="PENDING",t.RESOLVED="RESOLVED",t.REJECTED="REJECTED"}(Wx||(Wx={}));var Qx=function(){function t(t){var e=this;this._state=Wx.PENDING,this._handlers=[],this._resolve=function(t){e._setResult(Wx.RESOLVED,t)},this._reject=function(t){e._setResult(Wx.REJECTED,t)},this._setResult=function(t,i){e._state===Wx.PENDING&&(Object(Yx.m)(i)?i.then(e._resolve,e._reject):(e._state=t,e._value=i,e._executeHandlers()))},this._attachHandler=function(t){e._handlers=e._handlers.concat(t),e._executeHandlers()},this._executeHandlers=function(){if(e._state!==Wx.PENDING){var t=e._handlers.slice();e._handlers=[],t.forEach(function(t){t.done||(e._state===Wx.RESOLVED&&t.onfulfilled&&t.onfulfilled(e._value),e._state===Wx.REJECTED&&t.onrejected&&t.onrejected(e._value),t.done=!0)})}};try{t(this._resolve,this._reject)}catch($nt){this._reject($nt)}}return t.resolve=function(e){return new t(function(t){t(e)})},t.reject=function(e){return new t(function(t,i){i(e)})},t.all=function(e){return new t(function(i,n){if(Array.isArray(e))if(0!==e.length){var r=e.length,s=[];e.forEach(function(e,o){t.resolve(e).then(function(t){s[o]=t,0==(r-=1)&&i(s)}).then(null,n)})}else i([]);else n(new TypeError("Promise.all requires an array as input."))})},t.prototype.then=function(e,i){var n=this;return new t(function(t,r){n._attachHandler({done:!1,onfulfilled:function(i){if(e)try{return void t(e(i))}catch($nt){return void r($nt)}else t(i)},onrejected:function(e){if(i)try{return void t(i(e))}catch($nt){return void r($nt)}else r(e)}})})},t.prototype.catch=function(t){return this.then(function(t){return t},t)},t.prototype.finally=function(e){var i=this;return new t(function(t,n){var r,s;return i.then(function(t){s=!1,r=t,e&&e()},function(t){s=!0,r=t,e&&e()}).then(function(){s?n(r):t(r)})})},t.prototype.toString=function(){return"[object SyncPromise]"},t}(),Xx=function(){function t(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._user={},this._tags={},this._extra={},this._contexts={}}return t.clone=function(e){var i=new t;return e&&(i._breadcrumbs=jx(e._breadcrumbs),i._tags=Ux({},e._tags),i._extra=Ux({},e._extra),i._contexts=Ux({},e._contexts),i._user=e._user,i._level=e._level,i._span=e._span,i._session=e._session,i._transactionName=e._transactionName,i._fingerprint=e._fingerprint,i._eventProcessors=jx(e._eventProcessors)),i},t.prototype.addScopeListener=function(t){this._scopeListeners.push(t)},t.prototype.addEventProcessor=function(t){return this._eventProcessors.push(t),this},t.prototype.setUser=function(t){return this._user=t||{},this._session&&this._session.update({user:t}),this._notifyScopeListeners(),this},t.prototype.getUser=function(){return this._user},t.prototype.setTags=function(t){return this._tags=Ux(Ux({},this._tags),t),this._notifyScopeListeners(),this},t.prototype.setTag=function(t,e){var i;return this._tags=Ux(Ux({},this._tags),((i={})[t]=e,i)),this._notifyScopeListeners(),this},t.prototype.setExtras=function(t){return this._extra=Ux(Ux({},this._extra),t),this._notifyScopeListeners(),this},t.prototype.setExtra=function(t,e){var i;return this._extra=Ux(Ux({},this._extra),((i={})[t]=e,i)),this._notifyScopeListeners(),this},t.prototype.setFingerprint=function(t){return this._fingerprint=t,this._notifyScopeListeners(),this},t.prototype.setLevel=function(t){return this._level=t,this._notifyScopeListeners(),this},t.prototype.setTransactionName=function(t){return this._transactionName=t,this._notifyScopeListeners(),this},t.prototype.setTransaction=function(t){return this.setTransactionName(t)},t.prototype.setContext=function(t,e){var i;return null===e?delete this._contexts[t]:this._contexts=Ux(Ux({},this._contexts),((i={})[t]=e,i)),this._notifyScopeListeners(),this},t.prototype.setSpan=function(t){return this._span=t,this._notifyScopeListeners(),this},t.prototype.getSpan=function(){return this._span},t.prototype.getTransaction=function(){var t,e,i,n,r=this.getSpan();return(null===(t=r)||void 0===t?void 0:t.transaction)?null===(e=r)||void 0===e?void 0:e.transaction:(null===(n=null===(i=r)||void 0===i?void 0:i.spanRecorder)||void 0===n?void 0:n.spans[0])?r.spanRecorder.spans[0]:void 0},t.prototype.setSession=function(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this},t.prototype.getSession=function(){return this._session},t.prototype.update=function(e){if(!e)return this;if("function"==typeof e){var i=e(this);return i instanceof t?i:this}return e instanceof t?(this._tags=Ux(Ux({},this._tags),e._tags),this._extra=Ux(Ux({},this._extra),e._extra),this._contexts=Ux(Ux({},this._contexts),e._contexts),e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint)):Object(Yx.h)(e)&&(e=e,this._tags=Ux(Ux({},this._tags),e.tags),this._extra=Ux(Ux({},this._extra),e.extra),this._contexts=Ux(Ux({},this._contexts),e.contexts),e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint)),this},t.prototype.clear=function(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this},t.prototype.addBreadcrumb=function(t,e){var i=Ux({timestamp:Object(Hx.a)()},t);return this._breadcrumbs=void 0!==e&&e>=0?jx(this._breadcrumbs,[i]).slice(-e):jx(this._breadcrumbs,[i]),this._notifyScopeListeners(),this},t.prototype.clearBreadcrumbs=function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this},t.prototype.applyToEvent=function(t,e){var i;if(this._extra&&Object.keys(this._extra).length&&(t.extra=Ux(Ux({},this._extra),t.extra)),this._tags&&Object.keys(this._tags).length&&(t.tags=Ux(Ux({},this._tags),t.tags)),this._user&&Object.keys(this._user).length&&(t.user=Ux(Ux({},this._user),t.user)),this._contexts&&Object.keys(this._contexts).length&&(t.contexts=Ux(Ux({},this._contexts),t.contexts)),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span){t.contexts=Ux({trace:this._span.getTraceContext()},t.contexts);var n=null===(i=this._span.transaction)||void 0===i?void 0:i.name;n&&(t.tags=Ux({transaction:n},t.tags))}return this._applyFingerprint(t),t.breadcrumbs=jx(t.breadcrumbs||[],this._breadcrumbs),t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,this._notifyEventProcessors(jx(Jx(),this._eventProcessors),t,e)},t.prototype._notifyEventProcessors=function(t,e,i,n){var r=this;return void 0===n&&(n=0),new Qx(function(s,o){var a=t[n];if(null===e||"function"!=typeof a)s(e);else{var l=a(Ux({},e),i);Object(Yx.m)(l)?l.then(function(e){return r._notifyEventProcessors(t,e,i,n+1).then(s)}).then(null,o):r._notifyEventProcessors(t,l,i,n+1).then(s).then(null,o)}})},t.prototype._notifyScopeListeners=function(){var t=this;this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(function(e){e(t)}),this._notifyingListeners=!1)},t.prototype._applyFingerprint=function(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint},t}();function Jx(){var t=Object(zx.e)();return t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.globalEventProcessors=t.__SENTRY__.globalEventProcessors||[],t.__SENTRY__.globalEventProcessors}function tC(t){Jx().push(t)}function eC(t){try{for(var e=t,i=[],n=0,r=0,s=" > ".length,o=void 0;e&&n++<5&&!("html"===(o=iC(e))||n>1&&r+i.length*s+o.length>=80);)i.push(o),r+=o.length,e=e.parentNode;return i.reverse().join(" > ")}catch(a){return"<unknown>"}}function iC(t){var e,i,n,r,s,o=t,a=[];if(!o||!o.tagName)return"";if(a.push(o.tagName.toLowerCase()),o.id&&a.push("#"+o.id),(e=o.className)&&Object(Yx.k)(e))for(i=e.split(/\s+/),s=0;s<i.length;s++)a.push("."+i[s]);var l=["type","name","title","alt"];for(s=0;s<l.length;s++)(r=o.getAttribute(n=l[s]))&&a.push("["+n+'="'+r+'"]');return a.join("")}var nC=function(){function t(){this._hasWeakSet="function"==typeof WeakSet,this._inner=this._hasWeakSet?new WeakSet:[]}return t.prototype.memoize=function(t){if(this._hasWeakSet)return!!this._inner.has(t)||(this._inner.add(t),!1);for(var e=0;e<this._inner.length;e++)if(this._inner[e]===t)return!0;return this._inner.push(t),!1},t.prototype.unmemoize=function(t){if(this._hasWeakSet)this._inner.delete(t);else for(var e=0;e<this._inner.length;e++)if(this._inner[e]===t){this._inner.splice(e,1);break}},t}();function rC(t){try{return t&&"function"==typeof t&&t.name||"<anonymous>"}catch($nt){return"<anonymous>"}}var sC=i("+924");function oC(t,e,i){if(e in t){var n=t[e],r=i(n);if("function"==typeof r)try{r.prototype=r.prototype||{},Object.defineProperties(r,{__sentry_original__:{enumerable:!1,value:n}})}catch(s){}t[e]=r}}function aC(t){if(Object(Yx.d)(t)){var e=t,i={message:e.message,name:e.name,stack:e.stack};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(i[n]=e[n]);return i}if(Object(Yx.f)(t)){var r=t,s={};s.type=r.type;try{s.target=Object(Yx.c)(r.target)?eC(r.target):Object.prototype.toString.call(r.target)}catch(o){s.target="<unknown>"}try{s.currentTarget=Object(Yx.c)(r.currentTarget)?eC(r.currentTarget):Object.prototype.toString.call(r.currentTarget)}catch(o){s.currentTarget="<unknown>"}for(var n in"undefined"!=typeof CustomEvent&&Object(Yx.g)(t,CustomEvent)&&(s.detail=r.detail),r)Object.prototype.hasOwnProperty.call(r,n)&&(s[n]=r);return s}return t}function lC(t,e,i){void 0===e&&(e=3),void 0===i&&(i=102400);var n,r=uC(t,e);return n=JSON.stringify(r),~-encodeURI(n).split(/%..|./).length>i?lC(t,e-1,i):r}function cC(t,e){return"domain"===e&&t&&"object"==typeof t&&t._events?"[Domain]":"domainEmitter"===e?"[DomainEmitter]":"undefined"!=typeof global&&t===global?"[Global]":"undefined"!=typeof window&&t===window?"[Window]":"undefined"!=typeof document&&t===document?"[Document]":Object(Yx.l)(t)?"[SyntheticEvent]":"number"==typeof t&&t!=t?"[NaN]":void 0===t?"[undefined]":"function"==typeof t?"[Function: "+rC(t)+"]":"symbol"==typeof t?"["+String(t)+"]":"bigint"==typeof t?"[BigInt: "+String(t)+"]":t}function hC(t,e,i,n){if(void 0===i&&(i=1/0),void 0===n&&(n=new nC),0===i)return function(t){var e=Object.prototype.toString.call(t);if("string"==typeof t)return t;if("[object Object]"===e)return"[Object]";if("[object Array]"===e)return"[Array]";var i=cC(t);return Object(Yx.i)(i)?i:e}(e);if(null!=e&&"function"==typeof e.toJSON)return e.toJSON();var r=cC(e,t);if(Object(Yx.i)(r))return r;var s=aC(e),o=Array.isArray(e)?[]:{};if(n.memoize(e))return"[Circular ~]";for(var a in s)Object.prototype.hasOwnProperty.call(s,a)&&(o[a]=hC(a,s[a],i-1,n));return n.unmemoize(e),o}function uC(t,e){try{return JSON.parse(JSON.stringify(t,function(t,i){return hC(t,i,e)}))}catch(i){return"**non-serializable**"}}function dC(t,e){void 0===e&&(e=40);var i=Object.keys(aC(t));if(i.sort(),!i.length)return"[object has no keys]";if(i[0].length>=e)return Object(sC.d)(i[0],e);for(var n=i.length;n>0;n--){var r=i.slice(0,n).join(", ");if(!(r.length>e))return n===i.length?r:Object(sC.d)(r,e)}return""}function pC(t){var e,i;if(Object(Yx.h)(t)){var n=t,r={};try{for(var s=Bx(Object.keys(n)),o=s.next();!o.done;o=s.next()){var a=o.value;void 0!==n[a]&&(r[a]=pC(n[a]))}}catch(l){e={error:l}}finally{try{o&&!o.done&&(i=s.return)&&i.call(s)}finally{if(e)throw e.error}}return r}return Array.isArray(t)?t.map(pC):t}var fC=function(){function t(t){this.errors=0,this.sid=Object(zx.i)(),this.timestamp=Date.now(),this.started=Date.now(),this.duration=0,this.status=Lx.Ok,this.init=!0,t&&this.update(t)}return t.prototype.update=function(t){void 0===t&&(t={}),t.user&&(t.user.ip_address&&(this.ipAddress=t.user.ip_address),t.did||(this.did=t.user.id||t.user.email||t.user.username)),this.timestamp=t.timestamp||Date.now(),t.sid&&(this.sid=32===t.sid.length?t.sid:Object(zx.i)()),void 0!==t.init&&(this.init=t.init),t.did&&(this.did=""+t.did),"number"==typeof t.started&&(this.started=t.started),this.duration="number"==typeof t.duration?t.duration:this.timestamp-this.started,t.release&&(this.release=t.release),t.environment&&(this.environment=t.environment),t.ipAddress&&(this.ipAddress=t.ipAddress),t.userAgent&&(this.userAgent=t.userAgent),"number"==typeof t.errors&&(this.errors=t.errors),t.status&&(this.status=t.status)},t.prototype.close=function(t){t?this.update({status:t}):this.status===Lx.Ok?this.update({status:Lx.Exited}):this.update()},t.prototype.toJSON=function(){return pC({sid:""+this.sid,init:this.init,started:new Date(this.started).toISOString(),timestamp:new Date(this.timestamp).toISOString(),status:this.status,errors:this.errors,did:"number"==typeof this.did||"string"==typeof this.did?""+this.did:void 0,duration:this.duration,attrs:pC({release:this.release,environment:this.environment,ip_address:this.ipAddress,user_agent:this.userAgent})})},t}(),mC=function(){function t(t,e,i){void 0===e&&(e=new Xx),void 0===i&&(i=3),this._version=i,this._stack=[{}],this.getStackTop().scope=e,this.bindClient(t)}return t.prototype.isOlderThan=function(t){return this._version<t},t.prototype.bindClient=function(t){this.getStackTop().client=t,t&&t.setupIntegrations&&t.setupIntegrations()},t.prototype.pushScope=function(){var t=Xx.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:t}),t},t.prototype.popScope=function(){return!(this.getStack().length<=1||!this.getStack().pop())},t.prototype.withScope=function(t){var e=this.pushScope();try{t(e)}finally{this.popScope()}},t.prototype.getClient=function(){return this.getStackTop().client},t.prototype.getScope=function(){return this.getStackTop().scope},t.prototype.getStack=function(){return this._stack},t.prototype.getStackTop=function(){return this._stack[this._stack.length-1]},t.prototype.captureException=function(t,e){var i=this._lastEventId=Object(zx.i)(),n=e;if(!e){var r=void 0;try{throw new Error("Sentry syntheticException")}catch(t){r=t}n={originalException:t,syntheticException:r}}return this._invokeClient("captureException",t,Ux(Ux({},n),{event_id:i})),i},t.prototype.captureMessage=function(t,e,i){var n=this._lastEventId=Object(zx.i)(),r=i;if(!i){var s=void 0;try{throw new Error(t)}catch(o){s=o}r={originalException:t,syntheticException:s}}return this._invokeClient("captureMessage",t,e,Ux(Ux({},r),{event_id:n})),n},t.prototype.captureEvent=function(t,e){var i=this._lastEventId=Object(zx.i)();return this._invokeClient("captureEvent",t,Ux(Ux({},e),{event_id:i})),i},t.prototype.lastEventId=function(){return this._lastEventId},t.prototype.addBreadcrumb=function(t,e){var i=this.getStackTop(),n=i.scope,r=i.client;if(n&&r){var s=r.getOptions&&r.getOptions()||{},o=s.beforeBreadcrumb,a=void 0===o?null:o,l=s.maxBreadcrumbs,c=void 0===l?100:l;if(!(c<=0)){var h=Object(Hx.a)(),u=Ux({timestamp:h},t),d=a?Object(zx.c)(function(){return a(u,e)}):u;null!==d&&n.addBreadcrumb(d,Math.min(c,100))}}},t.prototype.setUser=function(t){var e=this.getScope();e&&e.setUser(t)},t.prototype.setTags=function(t){var e=this.getScope();e&&e.setTags(t)},t.prototype.setExtras=function(t){var e=this.getScope();e&&e.setExtras(t)},t.prototype.setTag=function(t,e){var i=this.getScope();i&&i.setTag(t,e)},t.prototype.setExtra=function(t,e){var i=this.getScope();i&&i.setExtra(t,e)},t.prototype.setContext=function(t,e){var i=this.getScope();i&&i.setContext(t,e)},t.prototype.configureScope=function(t){var e=this.getStackTop(),i=e.scope;i&&e.client&&t(i)},t.prototype.run=function(t){var e=AC(this);try{t(this)}finally{AC(e)}},t.prototype.getIntegration=function(t){var e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(i){return Zx.warn("Cannot retrieve integration "+t.id+" from the current Hub"),null}},t.prototype.startSpan=function(t){return this._callExtensionMethod("startSpan",t)},t.prototype.startTransaction=function(t,e){return this._callExtensionMethod("startTransaction",t,e)},t.prototype.traceHeaders=function(){return this._callExtensionMethod("traceHeaders")},t.prototype.captureSession=function(t){if(void 0===t&&(t=!1),t)return this.endSession();this._sendSessionUpdate()},t.prototype.endSession=function(){var t,e,i,n,r;null===(i=null===(e=null===(t=this.getStackTop())||void 0===t?void 0:t.scope)||void 0===e?void 0:e.getSession())||void 0===i||i.close(),this._sendSessionUpdate(),null===(r=null===(n=this.getStackTop())||void 0===n?void 0:n.scope)||void 0===r||r.setSession()},t.prototype.startSession=function(t){var e=this.getStackTop(),i=e.scope,n=e.client,r=n&&n.getOptions()||{},s=new fC(Ux(Ux({release:r.release,environment:r.environment},i&&{user:i.getUser()}),t));if(i){var o=i.getSession&&i.getSession();o&&o.status===Lx.Ok&&o.update({status:Lx.Exited}),this.endSession(),i.setSession(s)}return s},t.prototype._sendSessionUpdate=function(){var t=this.getStackTop(),e=t.scope,i=t.client;if(e){var n=e.getSession&&e.getSession();n&&i&&i.captureSession&&i.captureSession(n)}},t.prototype._invokeClient=function(t){for(var e,i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];var r=this.getStackTop(),s=r.scope,o=r.client;o&&o[t]&&(e=o)[t].apply(e,jx(i,[s]))},t.prototype._callExtensionMethod=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];var n=gC(),r=n.__SENTRY__;if(r&&r.extensions&&"function"==typeof r.extensions[t])return r.extensions[t].apply(this,e);Zx.warn("Extension method "+t+" couldn't be found, doing nothing.")},t}();function gC(){var t=Object(zx.e)();return t.__SENTRY__=t.__SENTRY__||{extensions:{},hub:void 0},t}function AC(t){var e=gC(),i=_C(e);return yC(e,t),i}function bC(){var t=gC();return vC(t)&&!_C(t).isOlderThan(3)||yC(t,new mC),Object(qx.b)()?function(t){var e,i,n;try{var r=null===(n=null===(i=null===(e=gC().__SENTRY__)||void 0===e?void 0:e.extensions)||void 0===i?void 0:i.domain)||void 0===n?void 0:n.active;if(!r)return _C(t);if(!vC(r)||_C(r).isOlderThan(3)){var s=_C(t).getStackTop();yC(r,new mC(s.client,Xx.clone(s.scope)))}return _C(r)}catch(o){return _C(t)}}(t):_C(t)}function vC(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function _C(t){return t&&t.__SENTRY__&&t.__SENTRY__.hub||(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=new mC),t.__SENTRY__.hub}function yC(t,e){return!!t&&(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=e,!0)}function wC(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];var n=bC();if(n&&n[t])return n[t].apply(n,jx(e));throw new Error("No hub defined or "+t+" was not found on the hub, please open a bug report.")}function xC(t,e){var i;try{throw new Error("Sentry syntheticException")}catch(t){i=t}return wC("captureException",t,{captureContext:e,originalException:t,syntheticException:i})}function CC(t){wC("addBreadcrumb",t)}function SC(t){wC("withScope",t)}var kC=function(t){return t.Maintenance="MaintenanceError",t.NotFound="NotFoundError",t.Unauthorized="UnauthorizedError",t.Unknown="UnknownError",t}({});Error,Error,Error,Error;class EC{constructor(t,e){this.x=t%18,this.y=e%18,this.x<0?this.x+=18:Object.is(this.x,-0)&&(this.x=0),this.y<0?this.y+=18:Object.is(this.y,-0)&&(this.y=0),this.id=`${this.x}/${this.y}`}}function DC([t,e,i,n]){const r=[];if(t>i)r.push([IC(t),PC(e),IC(180),PC(n)]),r.push([IC(-180),PC(e),IC(i),PC(n)]);else{const s=IC(t),o=IC(i),a=PC(e),l=PC(n);r.push([s,a,o,l])}const s=[];return r.forEach(([t,e,i,n])=>{for(let r=e;r<=n;r++)for(let e=t;e<=i;e++)s.push(new EC(e,r))}),s}function IC(t){return Math.floor((t+180)/20)}function PC(t){return Math.floor((t+90)/10)}var OC=function(){function t(){this.disposed=!1}return t.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},t.prototype.disposeInternal=function(){},t}(),MC=function(){function t(t){this.type=t,this.target=null}return t.prototype.preventDefault=function(){this.propagationStopped=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t}();function TC(t,e){return t>e?1:t<e?-1:0}function RC(t,e){return t.indexOf(e)>=0}function VC(t,e,i){var n=t.length;if(t[0]<=e)return 0;if(e<=t[n-1])return n-1;var r=void 0;if(i>0){for(r=1;r<n;++r)if(t[r]<e)return r-1}else if(i<0){for(r=1;r<n;++r)if(t[r]<=e)return r}else for(r=1;r<n;++r){if(t[r]==e)return r;if(t[r]<e)return t[r-1]-e<e-t[r]?r-1:r}return n-1}function FC(t,e,i){for(;e<i;){var n=t[e];t[e]=t[i],t[i]=n,++e,--i}}function LC(t,e){for(var i=Array.isArray(e)?e:[e],n=i.length,r=0;r<n;r++)t[t.length]=i[r]}function UC(t,e){var i=t.length;if(i!==e.length)return!1;for(var n=0;n<i;n++)if(t[n]!==e[n])return!1;return!0}function BC(){return!0}function NC(){return!1}function jC(){}var zC="function"==typeof Object.assign?Object.assign:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(t),n=1,r=arguments.length;n<r;++n){var s=arguments[n];if(null!=s)for(var o in s)s.hasOwnProperty(o)&&(i[o]=s[o])}return i};function HC(t){for(var e in t)delete t[e]}var KC="function"==typeof Object.values?Object.values:function(t){var e=[];for(var i in t)e.push(t[i]);return e};function $C(t){var e;for(e in t)return!1;return!e}var GC=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),WC=function(t){function e(e){var i=t.call(this)||this;return i.eventTarget_=e,i.pendingRemovals_=null,i.dispatching_=null,i.listeners_=null,i}return GC(e,t),e.prototype.addEventListener=function(t,e){if(t&&e){var i=this.listeners_||(this.listeners_={}),n=i[t]||(i[t]=[]);-1===n.indexOf(e)&&n.push(e)}},e.prototype.dispatchEvent=function(t){var e="string"==typeof t?new MC(t):t,i=e.type;e.target||(e.target=this.eventTarget_||this);var n,r=this.listeners_&&this.listeners_[i];if(r){var s=this.dispatching_||(this.dispatching_={}),o=this.pendingRemovals_||(this.pendingRemovals_={});i in s||(s[i]=0,o[i]=0),++s[i];for(var a=0,l=r.length;a<l;++a)if(!1===(n="handleEvent"in r[a]?r[a].handleEvent(e):r[a].call(this,e))||e.propagationStopped){n=!1;break}if(--s[i],0===s[i]){var c=o[i];for(delete o[i];c--;)this.removeEventListener(i,jC);delete s[i]}return n}},e.prototype.disposeInternal=function(){this.listeners_&&HC(this.listeners_)},e.prototype.getListeners=function(t){return this.listeners_&&this.listeners_[t]||void 0},e.prototype.hasListener=function(t){return!!this.listeners_&&(t?t in this.listeners_:Object.keys(this.listeners_).length>0)},e.prototype.removeEventListener=function(t,e){var i=this.listeners_&&this.listeners_[t];if(i){var n=i.indexOf(e);-1!==n&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[n]=jC,++this.pendingRemovals_[t]):(i.splice(n,1),0===i.length&&delete this.listeners_[t]))}},e}(OC);function ZC(){return function(){throw new Error("Unimplemented abstract method.")}()}var qC=0;function YC(t){return t.ol_uid||(t.ol_uid=String(++qC))}function QC(t){return Math.pow(t,3)}function XC(t){return 1-QC(1-t)}function JC(t){return 3*t*t-2*t*t*t}function tS(t){return t}var eS=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),iS=function(t){function e(e,i,n){var r=t.call(this)||this,s=n||{};return r.tileCoord=e,r.state=i,r.interimTile=null,r.hifi=!0,r.key="",r.transition_=void 0===s.transition?250:s.transition,r.transitionStarts_={},r}return eS(e,t),e.prototype.changed=function(){this.dispatchEvent("change")},e.prototype.release=function(){},e.prototype.getKey=function(){return this.key+"/"+this.tileCoord},e.prototype.getInterimTile=function(){if(!this.interimTile)return this;var t=this.interimTile;do{if(2==t.getState())return this.transition_=0,t;t=t.interimTile}while(t);return this},e.prototype.refreshInterimChain=function(){if(this.interimTile){var t=this.interimTile,e=this;do{if(2==t.getState()){t.interimTile=null;break}1==t.getState()?e=t:0==t.getState()?e.interimTile=t.interimTile:e=t,t=e.interimTile}while(t)}},e.prototype.getTileCoord=function(){return this.tileCoord},e.prototype.getState=function(){return this.state},e.prototype.setState=function(t){if(3!==this.state&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()},e.prototype.load=function(){ZC()},e.prototype.getAlpha=function(t,e){if(!this.transition_)return 1;var i=this.transitionStarts_[t];if(i){if(-1===i)return 1}else this.transitionStarts_[t]=i=e;var n=e-i+1e3/60;return n>=this.transition_?1:QC(n/this.transition_)},e.prototype.inTransition=function(t){return!!this.transition_&&-1!==this.transitionStarts_[t]},e.prototype.endTransition=function(t){this.transition_&&(this.transitionStarts_[t]=-1)},e}(WC),nS="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",rS=-1!==nS.indexOf("firefox"),sS=(-1!==nS.indexOf("safari")&&nS.indexOf("chrom"),-1!==nS.indexOf("webkit")&&-1==nS.indexOf("edge")),oS=-1!==nS.indexOf("macintosh"),aS="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,lS="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,cS="undefined"!=typeof Image&&Image.prototype.decode,hS=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch(i){}return t}();function uS(t,e,i){var n=i&&i.length?i.shift():lS?new OffscreenCanvas(t||300,e||300):document.createElement("canvas");return t&&(n.width=t),e&&(n.height=e),n.getContext("2d")}function dS(t){var e=t.offsetWidth,i=getComputedStyle(t);return e+(parseInt(i.marginLeft,10)+parseInt(i.marginRight,10))}function pS(t){var e=t.offsetHeight,i=getComputedStyle(t);return e+(parseInt(i.marginTop,10)+parseInt(i.marginBottom,10))}function fS(t,e){var i=e.parentNode;i&&i.replaceChild(t,e)}function mS(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}function gS(t){for(;t.lastChild;)t.removeChild(t.lastChild)}var AS=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),bS=function(t){function e(e,i,n,r){var s=t.call(this)||this;return s.extent=e,s.pixelRatio_=n,s.resolution=i,s.state=r,s}return AS(e,t),e.prototype.changed=function(){this.dispatchEvent("change")},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){return ZC()},e.prototype.getPixelRatio=function(){return this.pixelRatio_},e.prototype.getResolution=function(){return this.resolution},e.prototype.getState=function(){return this.state},e.prototype.load=function(){ZC()},e}(WC),vS=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),_S=function(t){function e(e){var i=this,n="Assertion failed. See https://openlayers.org/en/v"+"6.5.0".split("-")[0]+"/doc/errors/#"+e+" for details.";return(i=t.call(this,n)||this).code=e,i.name="AssertionError",i.message=n,i}return vS(e,t),e}(Error);function yS(t,e){if(!t)throw new _S(e)}function wS(t){for(var e=[1/0,1/0,-1/0,-1/0],i=0,n=t.length;i<n;++i)FS(e,t[i]);return e}function xS(t,e,i){return i?(i[0]=t[0]-e,i[1]=t[1]-e,i[2]=t[2]+e,i[3]=t[3]+e,i):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function CS(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function SS(t,e,i){var n,r;return(n=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0)*n+(r=i<t[1]?t[1]-i:t[3]<i?i-t[3]:0)*r}function kS(t,e){return DS(t,e[0],e[1])}function ES(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function DS(t,e,i){return t[0]<=e&&e<=t[2]&&t[1]<=i&&i<=t[3]}function IS(t,e){var i=e[0],n=e[1],r=0;return i<t[0]?r|=16:i>t[2]&&(r|=4),n<t[1]?r|=8:n>t[3]&&(r|=2),0===r&&(r=1),r}function PS(t,e,i,n,r){return r?(r[0]=t,r[1]=e,r[2]=i,r[3]=n,r):[t,e,i,n]}function OS(t){return PS(1/0,1/0,-1/0,-1/0,t)}function MS(t,e){var i=t[0],n=t[1];return PS(i,n,i,n,e)}function TS(t,e,i,n,r){return LS(OS(r),t,e,i,n)}function RS(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function VS(t,e){return e[0]<t[0]&&(t[0]=e[0]),e[2]>t[2]&&(t[2]=e[2]),e[1]<t[1]&&(t[1]=e[1]),e[3]>t[3]&&(t[3]=e[3]),t}function FS(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function LS(t,e,i,n,r){for(;i<n;i+=r)US(t,e[i],e[i+1]);return t}function US(t,e,i){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],i),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],i)}function BS(t,e){var i;return(i=e(jS(t)))||(i=e(zS(t)))||(i=e(qS(t)))?i:(i=e(ZS(t)))||!1}function NS(t){var e=0;return XS(t)||(e=YS(t)*GS(t)),e}function jS(t){return[t[0],t[1]]}function zS(t){return[t[2],t[1]]}function HS(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function KS(t,e){var i;return"bottom-left"===e?i=jS(t):"bottom-right"===e?i=zS(t):"top-left"===e?i=ZS(t):"top-right"===e?i=qS(t):yS(!1,13),i}function $S(t,e,i,n,r){var s=e*n[0]/2,o=e*n[1]/2,a=Math.cos(i),l=Math.sin(i),c=s*a,h=s*l,u=o*a,d=o*l,p=t[0],f=t[1],m=p-c+d,g=p-c-d,A=p+c-d,b=p+c+d,v=f-h-u,_=f-h+u,y=f+h+u,w=f+h-u;return PS(Math.min(m,g,A,b),Math.min(v,_,y,w),Math.max(m,g,A,b),Math.max(v,_,y,w),r)}function GS(t){return t[3]-t[1]}function WS(t,e,i){var n=i||[1/0,1/0,-1/0,-1/0];return QS(t,e)?(n[0]=t[0]>e[0]?t[0]:e[0],n[1]=t[1]>e[1]?t[1]:e[1],n[2]=t[2]<e[2]?t[2]:e[2],n[3]=t[3]<e[3]?t[3]:e[3]):OS(n),n}function ZS(t){return[t[0],t[3]]}function qS(t){return[t[2],t[3]]}function YS(t){return t[2]-t[0]}function QS(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function XS(t){return t[2]<t[0]||t[3]<t[1]}function JS(t,e){var i=(t[2]-t[0])/2*(e-1),n=(t[3]-t[1])/2*(e-1);t[0]-=i,t[2]+=i,t[1]-=n,t[3]+=n}function tk(t,e,i,n,r){if(n&&n!==t&&(i=i.bind(n)),r){var s=i;i=function(){t.removeEventListener(e,i),s.apply(this,arguments)}}var o={target:t,type:e,listener:i};return t.addEventListener(e,i),o}function ek(t,e,i,n){return tk(t,e,i,n,!0)}function ik(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),HC(t))}var nk=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function rk(t,e,i){var n=t;if(n.src&&cS){var r=n.decode(),s=!0;return r.then(function(){s&&e()}).catch(function(t){s&&("EncodingError"===t.name&&"Invalid image type."===t.message?e():i())}),function(){s=!1}}var o=[ek(n,"load",e),ek(n,"error",i)];return function(){o.forEach(ik)}}!function(t){function e(e,i,n,r,s,o){var a=t.call(this,e,i,n,0)||this;return a.src_=r,a.image_=new Image,null!==s&&(a.image_.crossOrigin=s),a.unlisten_=null,a.state=0,a.imageLoadFunction_=o,a}nk(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){this.state=3,this.unlistenImage_(),this.changed()},e.prototype.handleImageLoad_=function(){void 0===this.resolution&&(this.resolution=GS(this.extent)/this.image_.height),this.state=2,this.unlistenImage_(),this.changed()},e.prototype.load=function(){0!=this.state&&3!=this.state||(this.state=1,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=rk(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.setImage=function(t){this.image_=t},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}(bS);var sk=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ok=function(t){function e(e,i,n,r,s,o){var a=t.call(this,e,i,o)||this;return a.crossOrigin_=r,a.src_=n,a.key=n,a.image_=new Image,null!==r&&(a.image_.crossOrigin=r),a.unlisten_=null,a.tileLoadFunction_=s,a}return sk(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){var t;this.state=3,this.unlistenImage_(),this.image_=((t=uS(1,1)).fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas),this.changed()},e.prototype.handleImageLoad_=function(){var t=this.image_;this.state=t.naturalWidth&&t.naturalHeight?2:4,this.unlistenImage_(),this.changed()},e.prototype.load=function(){3==this.state&&(this.state=0,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),0==this.state&&(this.state=1,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=rk(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(iS),ak={DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},lk={};lk[ak.DEGREES]=2*Math.PI*6370997/360,lk[ak.FEET]=.3048,lk[ak.METERS]=1,lk[ak.USFEET]=1200/3937;var ck=ak,hk=function(){function t(t){this.code_=t.code,this.units_=t.units,this.extent_=void 0!==t.extent?t.extent:null,this.worldExtent_=void 0!==t.worldExtent?t.worldExtent:null,this.axisOrientation_=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.global_=void 0!==t.global&&t.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}return t.prototype.canWrapX=function(){return this.canWrapX_},t.prototype.getCode=function(){return this.code_},t.prototype.getExtent=function(){return this.extent_},t.prototype.getUnits=function(){return this.units_},t.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||lk[this.units_]},t.prototype.getWorldExtent=function(){return this.worldExtent_},t.prototype.getAxisOrientation=function(){return this.axisOrientation_},t.prototype.isGlobal=function(){return this.global_},t.prototype.setGlobal=function(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)},t.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},t.prototype.setDefaultTileGrid=function(t){this.defaultTileGrid_=t},t.prototype.setExtent=function(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)},t.prototype.setWorldExtent=function(t){this.worldExtent_=t},t.prototype.setGetPointResolution=function(t){this.getPointResolutionFunc_=t},t.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_},t}();function uk(t,e,i){return Math.min(Math.max(t,e),i)}var dk="cosh"in Math?Math.cosh:function(t){var e=Math.exp(t);return(e+1/e)/2},pk="log2"in Math?Math.log2:function(t){return Math.log(t)*Math.LOG2E};function fk(t,e,i,n,r,s){var o=r-i,a=s-n;if(0!==o||0!==a){var l=((t-i)*o+(e-n)*a)/(o*o+a*a);l>1?(i=r,n=s):l>0&&(i+=o*l,n+=a*l)}return mk(t,e,i,n)}function mk(t,e,i,n){var r=i-t,s=n-e;return r*r+s*s}function gk(t){return 180*t/Math.PI}function Ak(t){return t*Math.PI/180}function bk(t,e){var i=t%e;return i*e<0?i+e:i}function vk(t,e,i){return t+i*(e-t)}var _k,yk,wk,xk=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ck=6378137*Math.PI,Sk=[-Ck,-Ck,Ck,Ck],kk=[-180,-85,180,85],Ek=6378137*Math.log(Math.tan(Math.PI/2)),Dk=function(t){function e(e){return t.call(this,{code:e,units:ck.METERS,extent:Sk,global:!0,worldExtent:kk,getPointResolution:function(t,e){return t/dk(e[1]/6378137)}})||this}return xk(e,t),e}(hk),Ik=[new Dk("EPSG:3857"),new Dk("EPSG:102100"),new Dk("EPSG:102113"),new Dk("EPSG:900913"),new Dk("http://www.opengis.net/gml/srs/epsg.xml#3857")],Pk=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ok=[-180,-90,180,90],Mk=6378137*Math.PI/180,Tk=function(t){function e(e,i){return t.call(this,{code:e,units:ck.DEGREES,extent:Ok,axisOrientation:i,global:!0,metersPerUnit:Mk,worldExtent:Ok})||this}return Pk(e,t),e}(hk),Rk=[new Tk("CRS:84"),new Tk("EPSG:4326","neu"),new Tk("urn:ogc:def:crs:OGC:1.3:CRS84"),new Tk("urn:ogc:def:crs:OGC:2:84"),new Tk("http://www.opengis.net/gml/srs/epsg.xml#4326","neu")],Vk={},Fk={};function Lk(t,e,i){var n=t.getCode(),r=e.getCode();n in Fk||(Fk[n]={}),Fk[n][r]=i}function Uk(t,e,i){var n=i||6371008.8,r=Ak(t[1]),s=Ak(e[1]),o=(s-r)/2,a=Ak(e[0]-t[0])/2,l=Math.sin(o)*Math.sin(o)+Math.sin(a)*Math.sin(a)*Math.cos(r)*Math.cos(s);return 2*n*Math.atan2(Math.sqrt(l),Math.sqrt(1-l))}function Bk(t,e){for(var i=0,n=0,r=t.length;n<r-1;++n)i+=Uk(t[n],t[n+1],e);return i}function Nk(t,e){var i=e||{},n=i.radius||6371008.8,r=i.projection||"EPSG:3857",s=t.getType();"GeometryCollection"!==s&&(t=t.clone().transform(r,"EPSG:4326"));var o,a,l,c,h,u,d=0;switch(s){case"Point":case"MultiPoint":break;case"LineString":case"LinearRing":d=Bk(o=t.getCoordinates(),n);break;case"MultiLineString":case"Polygon":for(l=0,c=(o=t.getCoordinates()).length;l<c;++l)d+=Bk(o[l],n);break;case"MultiPolygon":for(l=0,c=(o=t.getCoordinates()).length;l<c;++l)for(h=0,u=(a=o[l]).length;h<u;++h)d+=Bk(a[h],n);break;case"GeometryCollection":var p=t.getGeometries();for(l=0,c=p.length;l<c;++l)d+=Nk(p[l],e);break;default:throw new Error("Unsupported geometry type: "+s)}return d}function jk(t,e,i,n){var r=n||6371008.8,s=Ak(t[1]),o=Ak(t[0]),a=e/r,l=Math.asin(Math.sin(s)*Math.cos(a)+Math.cos(s)*Math.sin(a)*Math.cos(i));return[gk(o+Math.atan2(Math.sin(i)*Math.sin(a)*Math.cos(s),Math.cos(a)-Math.sin(s)*Math.sin(l))),gk(l)]}function zk(t,e,i){var n=void 0!==i?t.toFixed(i):""+t,r=n.indexOf(".");return(r=-1===r?n.length:r)>e?n:new Array(1+e-r).join("0")+n}function Hk(t,e){var i,n,r=e[0],s=e[1],o=r[0],a=r[1],l=s[0],c=s[1],h=l-o,u=c-a,d=0===h&&0===u?0:(h*(t[0]-o)+u*(t[1]-a))/(h*h+u*u||0);return d<=0?(i=o,n=a):d>=1?(i=l,n=c):(i=o+d*h,n=a+d*u),[i,n]}function Kk(t,e,i){var n=bk(e+180,360)-180,r=Math.abs(3600*n),s=i||0,o=Math.pow(10,s),a=Math.floor(r/3600),l=Math.floor((r-3600*a)/60),c=r-3600*a-60*l;return(c=Math.ceil(c*o)/o)>=60&&(c=0,l+=1),l>=60&&(l=0,a+=1),a+"\xb0 "+zk(l,2)+"\u2032 "+zk(c,2,s)+"\u2033"+(0==n?"":" "+t.charAt(n<0?1:0))}function $k(t,e){for(var i=!0,n=t.length-1;n>=0;--n)if(t[n]!=e[n]){i=!1;break}return i}function Gk(t,e){var i=Math.cos(e),n=Math.sin(e),r=t[1]*i+t[0]*n;return t[0]=t[0]*i-t[1]*n,t[1]=r,t}function Wk(t,e){var i=t[0]-e[0],n=t[1]-e[1];return i*i+n*n}function Zk(t,e){return Math.sqrt(Wk(t,e))}function qk(t,e){return Wk(t,Hk(t,e))}function Yk(t,e){return t?Kk("NS",t[1],e)+" "+Kk("EW",t[0],e):""}function Qk(t,e){if(e.canWrapX()){var i=YS(e.getExtent()),n=function(t,e,i){var n=e.getExtent(),r=0;if(e.canWrapX()&&(t[0]<n[0]||t[0]>n[2])){var s=i||YS(n);r=Math.floor((t[0]-n[0])/s)}return r}(t,e,i);n&&(t[0]-=n*i)}return t}function Xk(t,e,i){var n;if(void 0!==e){for(var r=0,s=t.length;r<s;++r)e[r]=t[r];n=e}else n=t.slice();return n}function Jk(t,e,i){if(void 0!==e&&t!==e){for(var n=0,r=t.length;n<r;++n)e[n]=t[n];t=e}return t}function tE(t){!function(t,e){Vk[t]=e}(t.getCode(),t),Lk(t,t,Xk)}function eE(t){return"string"==typeof t?Vk[e=t]||Vk[e.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null:t||null;var e}function iE(t,e,i,n){var r,s=(t=eE(t)).getPointResolutionFunc();if(s)r=s(e,i),n&&n!==t.getUnits()&&(a=t.getMetersPerUnit())&&(r=r*a/lk[n]);else{var o=t.getUnits();if(o==ck.DEGREES&&!n||n==ck.DEGREES)r=e;else{var a,l=lE(t,eE("EPSG:4326"));if(l===Jk&&o!==ck.DEGREES)r=e*t.getMetersPerUnit();else{var c=[i[0]-e/2,i[1],i[0]+e/2,i[1],i[0],i[1]-e/2,i[0],i[1]+e/2];r=(Uk((c=l(c,c,2)).slice(0,2),c.slice(2,4))+Uk(c.slice(4,6),c.slice(6,8)))/2}void 0!==(a=n?lk[n]:t.getMetersPerUnit())&&(r/=a)}}return r}function nE(t){!function(t){t.forEach(tE)}(t),t.forEach(function(e){t.forEach(function(t){e!==t&&Lk(e,t,Xk)})})}function rE(t,e){return t?"string"==typeof t?eE(t):t:eE(e)}function sE(t,e){return hE(t,"EPSG:4326",void 0!==e?e:"EPSG:3857")}function oE(t,e){var i=hE(t,void 0!==e?e:"EPSG:3857","EPSG:4326"),n=i[0];return(n<-180||n>180)&&(i[0]=bk(n+180,360)-180),i}function aE(t,e){if(t===e)return!0;var i=t.getUnits()===e.getUnits();return(t.getCode()===e.getCode()||lE(t,e)===Xk)&&i}function lE(t,e){var i,n,r,s=(i=t.getCode(),n=e.getCode(),i in Fk&&n in Fk[i]&&(r=Fk[i][n]),r);return s||(s=Jk),s}function cE(t,e){return lE(eE(t),eE(e))}function hE(t,e,i){return cE(e,i)(t,void 0,t.length)}function uE(t,e,i,n){return function(t,e,i,n){var r=[];if(n>1)for(var s=t[2]-t[0],o=t[3]-t[1],a=0;a<n;++a)r.push(t[0]+s*a/n,t[1],t[2],t[1]+o*a/n,t[2]-s*a/n,t[3],t[0],t[3]-o*a/n);else r=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]];e(r,r,2);for(var l=[],c=[],h=(a=0,r.length);a<h;a+=2)l.push(r[a]),c.push(r[a+1]);return function(t,e,i){return PS(Math.min.apply(null,t),Math.min.apply(null,e),Math.max.apply(null,t),Math.max.apply(null,e),undefined)}(l,c)}(t,cE(e,i),0,n)}function dE(t,e){return t}function pE(t,e){return t}function fE(t,e){return t}function mE(t,e){return t}nE(Ik),nE(Rk),_k=Ik,yk=function(t,e,i){var n=t.length,r=i>1?i:2,s=e;void 0===s&&(s=r>2?t.slice():new Array(n));for(var o=0;o<n;o+=r){s[o]=Ck*t[o]/180;var a=6378137*Math.log(Math.tan(Math.PI*(+t[o+1]+90)/360));a>Ek?a=Ek:a<-Ek&&(a=-Ek),s[o+1]=a}return s},wk=function(t,e,i){var n=t.length,r=i>1?i:2,s=e;void 0===s&&(s=r>2?t.slice():new Array(n));for(var o=0;o<n;o+=r)s[o]=180*t[o]/Ck,s[o+1]=360*Math.atan(Math.exp(t[o+1]/6378137))/Math.PI-90;return s},Rk.forEach(function(t){_k.forEach(function(e){Lk(t,e,yk),Lk(e,t,wk)})});var gE,AE=function(){function t(t,e,i,n,r,s){this.sourceProj_=t,this.targetProj_=e;var o={},a=cE(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){var e=t[0]+"/"+t[1];return o[e]||(o[e]=a(t)),o[e]},this.maxSourceExtent_=n,this.errorThresholdSquared_=r*r,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!n&&!!this.sourceProj_.getExtent()&&YS(n)==YS(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?YS(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?YS(this.targetProj_.getExtent()):null;var l=ZS(i),c=qS(i),h=zS(i),u=jS(i),d=this.transformInv_(l),p=this.transformInv_(c),f=this.transformInv_(h),m=this.transformInv_(u),g=10+(s?Math.max(0,Math.ceil(pk(NS(i)/(s*s*256*256)))):0);if(this.addQuad_(l,c,h,u,d,p,f,m,g),this.wrapsXInSource_){var A=1/0;this.triangles_.forEach(function(t,e,i){A=Math.min(A,t.source[0][0],t.source[1][0],t.source[2][0])}),this.triangles_.forEach((function(t){if(Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-A>this.sourceWorldWidth_/2){var e=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];e[0][0]-A>this.sourceWorldWidth_/2&&(e[0][0]-=this.sourceWorldWidth_),e[1][0]-A>this.sourceWorldWidth_/2&&(e[1][0]-=this.sourceWorldWidth_),e[2][0]-A>this.sourceWorldWidth_/2&&(e[2][0]-=this.sourceWorldWidth_);var i=Math.min(e[0][0],e[1][0],e[2][0]);Math.max(e[0][0],e[1][0],e[2][0])-i<this.sourceWorldWidth_/2&&(t.source=e)}}).bind(this))}o={}}return t.prototype.addTriangle_=function(t,e,i,n,r,s){this.triangles_.push({source:[n,r,s],target:[t,e,i]})},t.prototype.addQuad_=function(t,e,i,n,r,s,o,a,l){var c=wS([r,s,o,a]),h=this.sourceWorldWidth_?YS(c)/this.sourceWorldWidth_:null,u=this.sourceWorldWidth_,d=this.sourceProj_.canWrapX()&&h>.5&&h<1,p=!1;if(l>0&&(this.targetProj_.isGlobal()&&this.targetWorldWidth_&&(p=YS(wS([t,e,i,n]))/this.targetWorldWidth_>.25||p),!d&&this.sourceProj_.isGlobal()&&h&&(p=h>.25||p)),!(!p&&this.maxSourceExtent_&&isFinite(c[0])&&isFinite(c[1])&&isFinite(c[2])&&isFinite(c[3]))||QS(c,this.maxSourceExtent_)){var f=0;if(!(p||isFinite(r[0])&&isFinite(r[1])&&isFinite(s[0])&&isFinite(s[1])&&isFinite(o[0])&&isFinite(o[1])&&isFinite(a[0])&&isFinite(a[1])))if(l>0)p=!0;else if(1!=(f=(isFinite(r[0])&&isFinite(r[1])?0:8)+(isFinite(s[0])&&isFinite(s[1])?0:4)+(isFinite(o[0])&&isFinite(o[1])?0:2)+(isFinite(a[0])&&isFinite(a[1])?0:1))&&2!=f&&4!=f&&8!=f)return;if(l>0){if(!p){var m,g=this.transformInv_([(t[0]+i[0])/2,(t[1]+i[1])/2]);m=d?(bk(r[0],u)+bk(o[0],u))/2-bk(g[0],u):(r[0]+o[0])/2-g[0];var A=(r[1]+o[1])/2-g[1];p=m*m+A*A>this.errorThresholdSquared_}if(p){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){var b=[(e[0]+i[0])/2,(e[1]+i[1])/2],v=this.transformInv_(b),_=[(n[0]+t[0])/2,(n[1]+t[1])/2],y=this.transformInv_(_);this.addQuad_(t,e,b,_,r,s,v,y,l-1),this.addQuad_(_,b,i,n,y,v,o,a,l-1)}else{var w=[(t[0]+e[0])/2,(t[1]+e[1])/2],x=this.transformInv_(w),C=[(i[0]+n[0])/2,(i[1]+n[1])/2],S=this.transformInv_(C);this.addQuad_(t,w,C,n,r,x,S,a,l-1),this.addQuad_(w,e,i,C,x,s,o,S,l-1)}return}}if(d){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&f)&&this.addTriangle_(t,i,n,r,o,a),0==(14&f)&&this.addTriangle_(t,i,e,r,o,s),f&&(0==(13&f)&&this.addTriangle_(e,n,t,s,a,r),0==(7&f)&&this.addTriangle_(e,n,i,s,a,o))}},t.prototype.calculateSourceExtent=function(){var t=[1/0,1/0,-1/0,-1/0];return this.triangles_.forEach(function(e,i,n){var r=e.source;FS(t,r[0]),FS(t,r[1]),FS(t,r[2])}),t},t.prototype.getTriangles=function(){return this.triangles_},t}(),bE={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1};function vE(t,e,i,n,r){t.beginPath(),t.moveTo(0,0),t.lineTo(e,i),t.lineTo(n,r),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,n)+1,Math.max(i,r)),t.restore()}function _E(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function yE(t,e,i,n){var r=hE(i,e,t),s=iE(e,n,i),o=e.getMetersPerUnit();void 0!==o&&(s*=o);var a=t.getMetersPerUnit();void 0!==a&&(s/=a);var l=t.getExtent();if(!l||kS(l,r)){var c=iE(t,s,r)/s;isFinite(c)&&c>0&&(s/=c)}return s}var wE=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),xE=function(t){function e(e,i,n,r,s,o,a,l,c,h,u,d){var p=t.call(this,s,0)||this;p.renderEdges_=void 0!==u&&u,p.contextOptions_=d,p.pixelRatio_=a,p.gutter_=l,p.canvas_=null,p.sourceTileGrid_=i,p.targetTileGrid_=r,p.wrappedTileCoord_=o||s,p.sourceTiles_=[],p.sourcesListenerKeys_=null,p.sourceZ_=0;var f=r.getTileCoordExtent(p.wrappedTileCoord_),m=p.targetTileGrid_.getExtent(),g=p.sourceTileGrid_.getExtent(),A=m?WS(f,m):f;if(0===NS(A))return p.state=4,p;var b=e.getExtent();b&&(g=g?WS(g,b):b);var v=r.getResolution(p.wrappedTileCoord_[0]),_=function(t,e,i,n){var r=HS(i),s=yE(t,e,r,n);return(!isFinite(s)||s<=0)&&BS(i,function(i){return s=yE(t,e,i,n),isFinite(s)&&s>0}),s}(e,n,A,v);if(!isFinite(_)||_<=0)return p.state=4,p;if(p.triangulation_=new AE(e,n,A,g,_*(void 0!==h?h:.5),v),0===p.triangulation_.getTriangles().length)return p.state=4,p;p.sourceZ_=i.getZForResolution(_);var y=p.triangulation_.calculateSourceExtent();if(g&&(e.canWrapX()?(y[1]=uk(y[1],g[1],g[3]),y[3]=uk(y[3],g[1],g[3])):y=WS(y,g)),NS(y)){for(var w=i.getTileRangeForExtentAndZ(y,p.sourceZ_),x=w.minX;x<=w.maxX;x++)for(var C=w.minY;C<=w.maxY;C++){var S=c(p.sourceZ_,x,C,a);S&&p.sourceTiles_.push(S)}0===p.sourceTiles_.length&&(p.state=4)}else p.state=4;return p}return wE(e,t),e.prototype.getImage=function(){return this.canvas_},e.prototype.reproject_=function(){var t=[];if(this.sourceTiles_.forEach((function(e,i,n){e&&2==e.getState()&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}).bind(this)),this.sourceTiles_.length=0,0===t.length)this.state=3;else{var e=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(e),n="number"==typeof i?i:i[0],r="number"==typeof i?i:i[1],s=this.targetTileGrid_.getResolution(e),o=this.sourceTileGrid_.getResolution(this.sourceZ_),a=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=function(t,e,i,n,r,s,o,a,l,c,h,u){var d=uS(Math.round(i*t),Math.round(i*e));if(zC(d,u),0===l.length)return d.canvas;function p(t){return Math.round(t*i)/i}d.scale(i,i),d.globalCompositeOperation="lighter";var f=[1/0,1/0,-1/0,-1/0];l.forEach(function(t,e,i){VS(f,t.extent)});var m=YS(f),g=GS(f),A=uS(Math.round(i*m/n),Math.round(i*g/n));zC(A,u);var b=i/n;l.forEach(function(t,e,i){var n=t.extent[0]-f[0],r=-(t.extent[3]-f[3]),s=YS(t.extent),o=GS(t.extent);t.image.width>0&&t.image.height>0&&A.drawImage(t.image,c,c,t.image.width-2*c,t.image.height-2*c,n*b,r*b,s*b,o*b)});var v=ZS(o);return a.getTriangles().forEach(function(t,e,r){var o=t.source,a=t.target,l=o[0][0],c=o[0][1],h=o[1][0],m=o[1][1],g=o[2][0],b=o[2][1],_=p((a[0][0]-v[0])/s),y=p(-(a[0][1]-v[1])/s),w=p((a[1][0]-v[0])/s),x=p(-(a[1][1]-v[1])/s),C=p((a[2][0]-v[0])/s),S=p(-(a[2][1]-v[1])/s),k=l,E=c;l=0,c=0;var D=function(t){for(var e=t.length,i=0;i<e;i++){for(var n=i,r=Math.abs(t[i][i]),s=i+1;s<e;s++){var o=Math.abs(t[s][i]);o>r&&(r=o,n=s)}if(0===r)return null;var a=t[n];t[n]=t[i],t[i]=a;for(var l=i+1;l<e;l++)for(var c=-t[l][i]/t[i][i],h=i;h<e+1;h++)i==h?t[l][h]=0:t[l][h]+=c*t[i][h]}for(var u=new Array(e),d=e-1;d>=0;d--){u[d]=t[d][e]/t[d][d];for(var p=d-1;p>=0;p--)t[p][e]-=t[p][d]*u[d]}return u}([[h-=k,m-=E,0,0,w-_],[g-=k,b-=E,0,0,C-_],[0,0,h,m,x-y],[0,0,g,b,S-y]]);if(D){if(d.save(),d.beginPath(),function(){if(void 0===gE){var t=document.createElement("canvas").getContext("2d");t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",vE(t,4,5,4,0),vE(t,4,5,0,5);var e=t.getImageData(0,0,3,3).data;gE=_E(e,0)||_E(e,4)||_E(e,8)}return gE}()||u===bE){d.moveTo(w,x);for(var I=_-w,P=y-x,O=0;O<4;O++)d.lineTo(w+p((O+1)*I/4),x+p(O*P/3)),3!=O&&d.lineTo(w+p((O+1)*I/4),x+p((O+1)*P/3));d.lineTo(C,S)}else d.moveTo(w,x),d.lineTo(_,y),d.lineTo(C,S);d.clip(),d.transform(D[0],D[2],D[1],D[3],_,y),d.translate(f[0]-k,f[3]-E),d.scale(n/i,-n/i),d.drawImage(A.canvas,0,0),d.restore()}}),h&&(d.save(),d.globalCompositeOperation="source-over",d.strokeStyle="black",d.lineWidth=1,a.getTriangles().forEach(function(t,e,i){var n=t.target,r=(n[0][0]-v[0])/s,o=-(n[0][1]-v[1])/s,a=(n[1][0]-v[0])/s,l=-(n[1][1]-v[1])/s,c=(n[2][0]-v[0])/s,h=-(n[2][1]-v[1])/s;d.beginPath(),d.moveTo(a,l),d.lineTo(r,o),d.lineTo(c,h),d.closePath(),d.stroke()}),d.restore()),d.canvas}(n,r,this.pixelRatio_,o,this.sourceTileGrid_.getExtent(),s,a,this.triangulation_,t,this.gutter_,this.renderEdges_,this.contextOptions_),this.state=2}this.changed()},e.prototype.load=function(){if(0==this.state){this.state=1,this.changed();var t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach((function(e,i,n){var r=e.getState();if(0==r||1==r){t++;var s=tk(e,"change",function(i){var n=e.getState();2!=n&&3!=n&&4!=n||(ik(s),0==--t&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(s)}}).bind(this)),this.sourceTiles_.forEach(function(t,e,i){0==t.getState()&&t.load()}),0===t&&setTimeout(this.reproject_.bind(this),0)}},e.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(ik),this.sourcesListenerKeys_=null},e}(iS),CE=function(){function t(t){this.highWaterMark=void 0!==t?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}return t.prototype.canExpireCache=function(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark},t.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},t.prototype.containsKey=function(t){return this.entries_.hasOwnProperty(t)},t.prototype.forEach=function(t){for(var e=this.oldest_;e;)t(e.value_,e.key_,this),e=e.newer},t.prototype.get=function(t,e){var i=this.entries_[t];return yS(void 0!==i,15),i===this.newest_||(i===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.newest_,this.newest_.newer=i,this.newest_=i),i.value_},t.prototype.remove=function(t){var e=this.entries_[t];return yS(void 0!==e,15),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_},t.prototype.getCount=function(){return this.count_},t.prototype.getKeys=function(){var t,e=new Array(this.count_),i=0;for(t=this.newest_;t;t=t.older)e[i++]=t.key_;return e},t.prototype.getValues=function(){var t,e=new Array(this.count_),i=0;for(t=this.newest_;t;t=t.older)e[i++]=t.value_;return e},t.prototype.peekLast=function(){return this.oldest_.value_},t.prototype.peekLastKey=function(){return this.oldest_.key_},t.prototype.peekFirstKey=function(){return this.newest_.key_},t.prototype.pop=function(){var t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_},t.prototype.replace=function(t,e){this.get(t),this.entries_[t].value_=e},t.prototype.set=function(t,e){yS(!(t in this.entries_),16);var i={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[t]=i,++this.count_},t.prototype.setSize=function(t){this.highWaterMark=t},t}();function SE(t,e,i,n){return void 0!==n?(n[0]=t,n[1]=e,n[2]=i,n):[t,e,i]}function kE(t,e,i){return t+"/"+e+"/"+i}function EE(t){return kE(t[0],t[1],t[2])}function DE(t){return(t[1]<<t[0])+t[2]}var IE=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),PE=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return IE(e,t),e.prototype.expireCache=function(t){for(;this.canExpireCache()&&!(this.peekLast().getKey()in t);)this.pop().release()},e.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=(e=this.peekFirstKey(),e.split("/").map(Number))[0];this.forEach((function(e){e.tileCoord[0]!==t&&(this.remove(EE(e.tileCoord)),e.release())}).bind(this))}var e},e}(CE),OE=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function ME(t){if(Array.isArray(t))for(var e=0,i=t.length;e<i;++e)ik(t[e]);else ik(t)}var TE=function(t){function e(){var e=t.call(this)||this;return e.revision_=0,e}return OE(e,t),e.prototype.changed=function(){++this.revision_,this.dispatchEvent("change")},e.prototype.getRevision=function(){return this.revision_},e.prototype.on=function(t,e){if(Array.isArray(t)){for(var i=t.length,n=new Array(i),r=0;r<i;++r)n[r]=tk(this,t[r],e);return n}return tk(this,t,e)},e.prototype.once=function(t,e){var i;if(Array.isArray(t)){var n=t.length;i=new Array(n);for(var r=0;r<n;++r)i[r]=ek(this,t[r],e)}else i=ek(this,t,e);return e.ol_key=i,i},e.prototype.un=function(t,e){var i=e.ol_key;if(i)ME(i);else if(Array.isArray(t))for(var n=0,r=t.length;n<r;++n)this.removeEventListener(t[n],e);else this.removeEventListener(t,e)},e}(WC),RE=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),VE=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r.key=i,r.oldValue=n,r}return RE(e,t),e}(MC),FE=function(t){function e(e){var i=t.call(this)||this;return YC(i),i.values_=null,void 0!==e&&i.setProperties(e),i}return RE(e,t),e.prototype.get=function(t){var e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e},e.prototype.getKeys=function(){return this.values_&&Object.keys(this.values_)||[]},e.prototype.getProperties=function(){return this.values_&&zC({},this.values_)||{}},e.prototype.hasProperties=function(){return!!this.values_},e.prototype.notify=function(t,e){var i;i=UE(t),this.dispatchEvent(new VE(i,t,e)),this.dispatchEvent(new VE(i="propertychange",t,e))},e.prototype.set=function(t,e,i){var n=this.values_||(this.values_={});if(i)n[t]=e;else{var r=n[t];n[t]=e,r!==e&&this.notify(t,r)}},e.prototype.setProperties=function(t,e){for(var i in t)this.set(i,t[i],e)},e.prototype.applyProperties=function(t){t.values_&&zC(this.values_||(this.values_={}),t.values_)},e.prototype.unset=function(t,e){if(this.values_&&t in this.values_){var i=this.values_[t];delete this.values_[t],$C(this.values_)&&(this.values_=null),e||this.notify(t,i)}},e}(TE),LE={};function UE(t){return LE.hasOwnProperty(t)?LE[t]:LE[t]="change:"+t}var BE=FE,NE=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function jE(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}var zE=function(t){function e(e){var i=t.call(this)||this;return i.projection_=eE(e.projection),i.attributions_=jE(e.attributions),i.attributionsCollapsible_=void 0===e.attributionsCollapsible||e.attributionsCollapsible,i.loading=!1,i.state_=void 0!==e.state?e.state:"ready",i.wrapX_=void 0!==e.wrapX&&e.wrapX,i}return NE(e,t),e.prototype.getAttributions=function(){return this.attributions_},e.prototype.getAttributionsCollapsible=function(){return this.attributionsCollapsible_},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolutions=function(){return ZC()},e.prototype.getState=function(){return this.state_},e.prototype.getWrapX=function(){return this.wrapX_},e.prototype.getContextOptions=function(){},e.prototype.refresh=function(){this.changed()},e.prototype.setAttributions=function(t){this.attributions_=jE(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(BE),HE=function(){function t(t,e,i,n){this.minX=t,this.maxX=e,this.minY=i,this.maxY=n}return t.prototype.contains=function(t){return this.containsXY(t[1],t[2])},t.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY},t.prototype.containsXY=function(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY},t.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY},t.prototype.extend=function(t){t.minX<this.minX&&(this.minX=t.minX),t.maxX>this.maxX&&(this.maxX=t.maxX),t.minY<this.minY&&(this.minY=t.minY),t.maxY>this.maxY&&(this.maxY=t.maxY)},t.prototype.getHeight=function(){return this.maxY-this.minY+1},t.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},t.prototype.getWidth=function(){return this.maxX-this.minX+1},t.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY},t}();function KE(t,e,i,n,r){return void 0!==r?(r.minX=t,r.maxX=e,r.minY=i,r.maxY=n,r):new HE(t,e,i,n)}var $E=HE;function GE(t,e,i){return void 0===i&&(i=[0,0]),i[0]=t[0]+2*e,i[1]=t[1]+2*e,i}function WE(t,e,i){return void 0===i&&(i=[0,0]),i[0]=t[0]*e+.5|0,i[1]=t[1]*e+.5|0,i}function ZE(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}var qE=[0,0,0],YE=function(){function t(t){var e;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,yS(function(t,e,i){var n=function(t,e){return e-t}||TC;return t.every(function(e,i){if(0===i)return!0;var r=n(t[i-1],e);return!(r>0||0===r)})}(this.resolutions_),17),!t.origins)for(var i=0,n=this.resolutions_.length-1;i<n;++i)if(e){if(this.resolutions_[i]/this.resolutions_[i+1]!==e){e=void 0;break}}else e=this.resolutions_[i]/this.resolutions_[i+1];this.zoomFactor_=e,this.maxZoom=this.resolutions_.length-1,this.origin_=void 0!==t.origin?t.origin:null,this.origins_=null,void 0!==t.origins&&(this.origins_=t.origins,yS(this.origins_.length==this.resolutions_.length,20));var r=t.extent;void 0===r||this.origin_||this.origins_||(this.origin_=ZS(r)),yS(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,void 0!==t.tileSizes&&(this.tileSizes_=t.tileSizes,yS(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=void 0!==t.tileSize?t.tileSize:this.tileSizes_?null:256,yS(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=void 0!==r?r:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],void 0!==t.sizes?this.fullTileRanges_=t.sizes.map(function(t,e){var i=new $E(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1));if(r){var n=this.getTileRangeForExtentAndZ(r,e);i.minX=Math.max(n.minX,i.minX),i.maxX=Math.min(n.maxX,i.maxX),i.minY=Math.max(n.minY,i.minY),i.maxY=Math.min(n.maxY,i.maxY)}return i},this):r&&this.calculateTileRanges_(r)}return t.prototype.forEachTileCoord=function(t,e,i){for(var n=this.getTileRangeForExtentAndZ(t,e),r=n.minX,s=n.maxX;r<=s;++r)for(var o=n.minY,a=n.maxY;o<=a;++o)i([e,r,o])},t.prototype.forEachTileCoordParentTileRange=function(t,e,i,n){var r,s,o=null,a=t[0]-1;for(2===this.zoomFactor_?(r=t[1],s=t[2]):o=this.getTileCoordExtent(t,n);a>=this.minZoom;){if(e(a,2===this.zoomFactor_?KE(r=Math.floor(r/2),r,s=Math.floor(s/2),s,i):this.getTileRangeForExtentAndZ(o,a,i)))return!0;--a}return!1},t.prototype.getExtent=function(){return this.extent_},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.getMinZoom=function(){return this.minZoom},t.prototype.getOrigin=function(t){return this.origin_?this.origin_:this.origins_[t]},t.prototype.getResolution=function(t){return this.resolutions_[t]},t.prototype.getResolutions=function(){return this.resolutions_},t.prototype.getTileCoordChildTileRange=function(t,e,i){if(t[0]<this.maxZoom){if(2===this.zoomFactor_){var n=2*t[1],r=2*t[2];return KE(n,n+1,r,r+1,e)}var s=this.getTileCoordExtent(t,i);return this.getTileRangeForExtentAndZ(s,t[0]+1,e)}return null},t.prototype.getTileRangeExtent=function(t,e,i){var n=this.getOrigin(t),r=this.getResolution(t),s=ZE(this.getTileSize(t),this.tmpSize_);return PS(n[0]+e.minX*s[0]*r,n[1]+e.minY*s[1]*r,n[0]+(e.maxX+1)*s[0]*r,n[1]+(e.maxY+1)*s[1]*r,i)},t.prototype.getTileRangeForExtentAndZ=function(t,e,i){var n=qE;this.getTileCoordForXYAndZ_(t[0],t[3],e,!1,n);var r=n[1],s=n[2];return this.getTileCoordForXYAndZ_(t[2],t[1],e,!0,n),KE(r,n[1],s,n[2],i)},t.prototype.getTileCoordCenter=function(t){var e=this.getOrigin(t[0]),i=this.getResolution(t[0]),n=ZE(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*n[0]*i,e[1]-(t[2]+.5)*n[1]*i]},t.prototype.getTileCoordExtent=function(t,e){var i=this.getOrigin(t[0]),n=this.getResolution(t[0]),r=ZE(this.getTileSize(t[0]),this.tmpSize_),s=i[0]+t[1]*r[0]*n,o=i[1]-(t[2]+1)*r[1]*n;return PS(s,o,s+r[0]*n,o+r[1]*n,e)},t.prototype.getTileCoordForCoordAndResolution=function(t,e,i){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,i)},t.prototype.getTileCoordForXYAndResolution_=function(t,e,i,n,r){var s=this.getZForResolution(i),o=i/this.getResolution(s),a=this.getOrigin(s),l=ZE(this.getTileSize(s),this.tmpSize_),c=n?.5:0,h=Math.floor((t-a[0])/i+(n?.5:0)),u=Math.floor((a[1]-e)/i+c),d=o*h/l[0],p=o*u/l[1];return n?(d=Math.ceil(d)-1,p=Math.ceil(p)-1):(d=Math.floor(d),p=Math.floor(p)),SE(s,d,p,r)},t.prototype.getTileCoordForXYAndZ_=function(t,e,i,n,r){var s=this.getOrigin(i),o=this.getResolution(i),a=ZE(this.getTileSize(i),this.tmpSize_),l=n?.5:0,c=Math.floor((t-s[0])/o+(n?.5:0)),h=Math.floor((s[1]-e)/o+l),u=c/a[0],d=h/a[1];return n?(u=Math.ceil(u)-1,d=Math.ceil(d)-1):(u=Math.floor(u),d=Math.floor(d)),SE(i,u,d,r)},t.prototype.getTileCoordForCoordAndZ=function(t,e,i){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,i)},t.prototype.getTileCoordResolution=function(t){return this.resolutions_[t[0]]},t.prototype.getTileSize=function(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]},t.prototype.getFullTileRange=function(t){return this.fullTileRanges_?this.fullTileRanges_[t]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,t):null},t.prototype.getZForResolution=function(t,e){return uk(VC(this.resolutions_,t,e||0),this.minZoom,this.maxZoom)},t.prototype.calculateTileRanges_=function(t){for(var e=this.resolutions_.length,i=new Array(e),n=this.minZoom;n<e;++n)i[n]=this.getTileRangeForExtentAndZ(t,n);this.fullTileRanges_=i},t}();function QE(t){var e=t.getDefaultTileGrid();return e||(e=function(t,e,i,n){return s=XE(r=JE(t),void 0,void 0),new YE({extent:r,origin:KS(r,"top-left"),resolutions:s,tileSize:void 0});var r,s}(t),t.setDefaultTileGrid(e)),e}function XE(t,e,i,n){for(var r=void 0!==e?e:42,s=GS(t),o=YS(t),a=ZE(void 0!==i?i:256),l=n>0?n:Math.max(o/a[0],s/a[1]),c=r+1,h=new Array(c),u=0;u<c;++u)h[u]=l/Math.pow(2,u);return h}function JE(t){var e=(t=eE(t)).getExtent();if(!e){var i=180*lk[ck.DEGREES]/t.getMetersPerUnit();e=PS(-i,-i,i,i)}return e}var tD=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),eD=function(t){function e(e){var i=t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:e.projection,state:e.state,wrapX:e.wrapX})||this;i.opaque_=void 0!==e.opaque&&e.opaque,i.tilePixelRatio_=void 0!==e.tilePixelRatio?e.tilePixelRatio:1,i.tileGrid=void 0!==e.tileGrid?e.tileGrid:null;var n=e.tileGrid;return n&&ZE(n.getTileSize(n.getMinZoom()),[256,256]),i.tileCache=new PE(e.cacheSize||0),i.tmpSize=[0,0],i.key_=e.key||"",i.tileOptions={transition:e.transition},i.zDirection=e.zDirection?e.zDirection:0,i}return tD(e,t),e.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},e.prototype.expireCache=function(t,e){var i=this.getTileCacheForProjection(t);i&&i.expireCache(e)},e.prototype.forEachLoadedTile=function(t,e,i,n){var r=this.getTileCacheForProjection(t);if(!r)return!1;for(var s,o,a,l=!0,c=i.minX;c<=i.maxX;++c)for(var h=i.minY;h<=i.maxY;++h)o=kE(e,c,h),a=!1,r.containsKey(o)&&(a=2===(s=r.get(o)).getState())&&(a=!1!==n(s)),a||(l=!1);return l},e.prototype.getGutterForProjection=function(t){return 0},e.prototype.getKey=function(){return this.key_},e.prototype.setKey=function(t){this.key_!==t&&(this.key_=t,this.changed())},e.prototype.getOpaque=function(t){return this.opaque_},e.prototype.getResolutions=function(){return this.tileGrid.getResolutions()},e.prototype.getTile=function(t,e,i,n,r){return ZC()},e.prototype.getTileGrid=function(){return this.tileGrid},e.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:QE(t)},e.prototype.getTileCacheForProjection=function(t){return yS(aE(this.getProjection(),t),68),this.tileCache},e.prototype.getTilePixelRatio=function(t){return this.tilePixelRatio_},e.prototype.getTilePixelSize=function(t,e,i){var n=this.getTileGridForProjection(i),r=this.getTilePixelRatio(e),s=ZE(n.getTileSize(t),this.tmpSize);return 1==r?s:WE(s,r,this.tmpSize)},e.prototype.getTileCoordForTileUrlFunction=function(t,e){var i=void 0!==e?e:this.getProjection(),n=this.getTileGridForProjection(i);return this.getWrapX()&&i.isGlobal()&&(t=function(t,e,i){var n=e[0],r=t.getTileCoordCenter(e),s=JE(i);if(kS(s,r))return e;var o=YS(s),a=Math.ceil((s[0]-r[0])/o);return r[0]+=o*a,t.getTileCoordForCoordAndZ(r,n)}(n,t,i)),function(t,e){var i=t[0],n=t[1],r=t[2];if(e.getMinZoom()>i||i>e.getMaxZoom())return!1;var s=e.getFullTileRange(i);return!s||s.containsXY(n,r)}(t,n)?t:null},e.prototype.clear=function(){this.tileCache.clear()},e.prototype.refresh=function(){this.clear(),t.prototype.refresh.call(this)},e.prototype.updateCacheSize=function(t,e){var i=this.getTileCacheForProjection(e);t>i.highWaterMark&&(i.highWaterMark=t)},e.prototype.useTile=function(t,e,i,n){},e}(zE),iD=function(t){function e(e,i){var n=t.call(this,e)||this;return n.tile=i,n}return tD(e,t),e}(MC),nD=eD;function rD(t,e){var i=/\{z\}/g,n=/\{x\}/g,r=/\{y\}/g,s=/\{-y\}/g;return function(o,a,l){return o?t.replace(i,o[0].toString()).replace(n,o[1].toString()).replace(r,o[2].toString()).replace(s,function(){var t=e.getFullTileRange(o[0]);return yS(t,55),(t.getHeight()-o[2]-1).toString()}):void 0}}var sD=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),oD=function(t){function e(i){var n=t.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,opaque:i.opaque,projection:i.projection,state:i.state,tileGrid:i.tileGrid,tilePixelRatio:i.tilePixelRatio,wrapX:i.wrapX,transition:i.transition,key:i.key,attributionsCollapsible:i.attributionsCollapsible,zDirection:i.zDirection})||this;return n.generateTileUrlFunction_=n.tileUrlFunction===e.prototype.tileUrlFunction,n.tileLoadFunction=i.tileLoadFunction,i.tileUrlFunction&&(n.tileUrlFunction=i.tileUrlFunction),n.urls=null,i.urls?n.setUrls(i.urls):i.url&&n.setUrl(i.url),n.tileLoadingKeys_={},n}return sD(e,t),e.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},e.prototype.getTileUrlFunction=function(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction},e.prototype.getUrls=function(){return this.urls},e.prototype.handleTileChange=function(t){var e,i=t.target,n=YC(i),r=i.getState();1==r?(this.tileLoadingKeys_[n]=!0,e="tileloadstart"):n in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[n],e=3==r?"tileloaderror":2==r?"tileloadend":void 0),null!=e&&this.dispatchEvent(new iD(e,i))},e.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},e.prototype.setTileUrlFunction=function(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==e?this.setKey(e):this.changed()},e.prototype.setUrl=function(t){var e=function(t){var e=[],i=/\{([a-z])-([a-z])\}/.exec(t);if(i){var n=i[1].charCodeAt(0),r=i[2].charCodeAt(0),s=void 0;for(s=n;s<=r;++s)e.push(t.replace(i[0],String.fromCharCode(s)));return e}if(i=/\{(\d+)-(\d+)\}/.exec(t)){for(var o=parseInt(i[2],10),a=parseInt(i[1],10);a<=o;a++)e.push(t.replace(i[0],a.toString()));return e}return e.push(t),e}(t);this.urls=e,this.setUrls(e)},e.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(function(t,e){for(var i=t.length,n=new Array(i),r=0;r<i;++r)n[r]=rD(t[r],e);return function(t){return 1===t.length?t[0]:function(e,i,n){if(e){var r=bk(DE(e),t.length);return t[r](e,i,n)}}}(n)}(t,this.tileGrid),e):this.setKey(e)},e.prototype.tileUrlFunction=function(t,e,i){},e.prototype.useTile=function(t,e,i){var n=kE(t,e,i);this.tileCache.containsKey(n)&&this.tileCache.get(n)},e}(nD),aD=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function lD(t,e){t.getImage().src=e}var cD=function(t){function e(e){var i=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:lD,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})||this;return i.crossOrigin=void 0!==e.crossOrigin?e.crossOrigin:null,i.tileClass=void 0!==e.tileClass?e.tileClass:ok,i.tileCacheForProjection={},i.tileGridForProjection={},i.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,i.contextOptions_=!1===e.imageSmoothing?bE:void 0,i.renderReprojectionEdges_=!1,i}return aD(e,t),e.prototype.canExpireCache=function(){if(this.tileCache.canExpireCache())return!0;for(var t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1},e.prototype.expireCache=function(t,e){var i=this.getTileCacheForProjection(t);for(var n in this.tileCache.expireCache(this.tileCache==i?e:{}),this.tileCacheForProjection){var r=this.tileCacheForProjection[n];r.expireCache(r==i?e:{})}},e.prototype.getContextOptions=function(){return this.contextOptions_},e.prototype.getGutterForProjection=function(t){return this.getProjection()&&t&&!aE(this.getProjection(),t)?0:this.getGutter()},e.prototype.getGutter=function(){return 0},e.prototype.getKey=function(){return t.prototype.getKey.call(this)+(this.contextOptions_?"\n"+JSON.stringify(this.contextOptions_):"")},e.prototype.getOpaque=function(e){return!(this.getProjection()&&e&&!aE(this.getProjection(),e))&&t.prototype.getOpaque.call(this,e)},e.prototype.getTileGridForProjection=function(t){var e=this.getProjection();if(!this.tileGrid||e&&!aE(e,t)){var i=YC(t);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=QE(t)),this.tileGridForProjection[i]}return this.tileGrid},e.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();if(!e||aE(e,t))return this.tileCache;var i=YC(t);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new PE(this.tileCache.highWaterMark)),this.tileCacheForProjection[i]},e.prototype.createTile_=function(t,e,i,n,r,s){var o=[t,e,i],a=this.getTileCoordForTileUrlFunction(o,r),l=a?this.tileUrlFunction(a,n,r):void 0,c=new this.tileClass(o,void 0!==l?0:4,void 0!==l?l:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return c.key=s,c.addEventListener("change",this.handleTileChange.bind(this)),c},e.prototype.getTile=function(t,e,i,n,r){var s=this.getProjection();if(s&&r&&!aE(s,r)){var o=this.getTileCacheForProjection(r),a=[t,e,i],l=void 0,c=EE(a);o.containsKey(c)&&(l=o.get(c));var h=this.getKey();if(l&&l.key==h)return l;var u=this.getTileGridForProjection(s),d=this.getTileGridForProjection(r),p=this.getTileCoordForTileUrlFunction(a,r),f=new xE(s,u,r,d,a,p,this.getTilePixelRatio(n),this.getGutter(),(function(t,e,i,n){return this.getTileInternal(t,e,i,n,s)}).bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.contextOptions_);return f.key=h,l?(f.interimTile=l,f.refreshInterimChain(),o.replace(c,f)):o.set(c,f),f}return this.getTileInternal(t,e,i,n,s||r)},e.prototype.getTileInternal=function(t,e,i,n,r){var s=null,o=kE(t,e,i),a=this.getKey();if(this.tileCache.containsKey(o)){if((s=this.tileCache.get(o)).key!=a){var l=s;(s=this.createTile_(t,e,i,n,r,a)).interimTile=0==l.getState()?l.interimTile:l,s.refreshInterimChain(),this.tileCache.replace(o,s)}}else s=this.createTile_(t,e,i,n,r,a),this.tileCache.set(o,s);return s},e.prototype.setRenderReprojectionEdges=function(t){if(this.renderReprojectionEdges_!=t){for(var e in this.renderReprojectionEdges_=t,this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}},e.prototype.setTileGridForProjection=function(t,e){var i=eE(t);if(i){var n=YC(i);n in this.tileGridForProjection||(this.tileGridForProjection[n]=e)}},e}(oD),hD=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),uD=function(t){function e(e){var i=e||{},n=void 0!==i.projection?i.projection:"EPSG:3857",r=void 0!==i.tileGrid?i.tileGrid:function(t){var e=t||{},i=e.extent||eE("EPSG:3857").getExtent(),n={extent:i,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:XE(i,e.maxZoom,e.tileSize,e.maxResolution)};return new YE(n)}({extent:JE(n),maxResolution:i.maxResolution,maxZoom:i.maxZoom,minZoom:i.minZoom,tileSize:i.tileSize});return t.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,imageSmoothing:i.imageSmoothing,opaque:i.opaque,projection:n,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileGrid:r,tileLoadFunction:i.tileLoadFunction,tilePixelRatio:i.tilePixelRatio,tileUrlFunction:i.tileUrlFunction,url:i.url,urls:i.urls,wrapX:void 0===i.wrapX||i.wrapX,transition:i.transition,attributionsCollapsible:i.attributionsCollapsible,zDirection:i.zDirection})||this}return hD(e,t),e}(cD),dD=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),pD=function(t){function e(e){var i=e||{};return t.call(this,{attributions:void 0!==i.attributions?i.attributions:['&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.'],attributionsCollapsible:!1,cacheSize:i.cacheSize,crossOrigin:void 0!==i.crossOrigin?i.crossOrigin:"anonymous",imageSmoothing:i.imageSmoothing,maxZoom:void 0!==i.maxZoom?i.maxZoom:19,opaque:void 0===i.opaque||i.opaque,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileLoadFunction:i.tileLoadFunction,transition:i.transition,url:void 0!==i.url?i.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png",wrapX:i.wrapX})||this}return dD(e,t),e}(uD),fD=i("AytR");const mD='\xa9 <a href="http://openstreetmap.org">OpenStreetMap</a> contributors.',gD=[{label:"OpenStreetMap",source:new pD({url:fD.a.osmURL,crossOrigin:"anonymous",attributions:mD})},{label:"Gray",source:new uD({url:fD.a.grayURL,crossOrigin:"anonymous",attributions:mD})},{label:"Dark",source:new uD({url:fD.a.darkURL,crossOrigin:"anonymous",attributions:mD})},{label:"Terrain",source:new uD({url:fD.a.terrainURL,crossOrigin:"anonymous",attributions:mD})},{label:"Orthophotos",source:new uD({url:fD.a.topoimageryURL,crossOrigin:"anonymous",attributions:'<span title="Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community">\xa9 Esri</span>'})},{label:"SHOM",source:new uD({url:fD.a.shomURL,crossOrigin:"anonymous",attributions:"\xa9 SHOM"})}];class AD{constructor(t={}){Object.assign(this,t)}}const bD=[{label:"15 minutes",value:900},{label:"30 minutes",value:1800},{label:"1 heure",value:3600},{label:"2 heures",value:7200},{label:"6 heures",value:21600},{label:"12 heures",value:43200},{label:"24 heures",value:86400},{label:"2 jours",value:172800},{label:"1 semaine",value:604800},{label:"1 mois",value:2592e3}].reverse(),vD=bD.reduce((t,e)=>(t[e.value]=e.label,t),{}),_D={left:"#2ecb6f",middle:"#fddb21",right:"#f31717"},yD=[{label:"15 minutes",value:900},{label:"30 minutes",value:1800},{label:"1 heure",value:3600},{label:"2 heures",value:7200},{label:"6 heures",value:21600},{label:"12 heures",value:43200},{label:"24 heures",value:86400},{label:"2 jours",value:0}].reverse(),wD=yD.reduce((t,e)=>(t[e.value]=e.label,t),{}),xD={left:"#efefef",middle:"#bebebe",right:"#5d5d5d"},CD=[{key:"portsOfCall",label:"Escales"},{key:"voyages",label:"Voyages"},{key:"voyageGroups",label:"Synth\xe8se des voyages"}],SD=CD[0].key,kD=[{key:"unavailable",name:"Unavailable",min:0,max:0},{key:"reserved",name:"Reserved",min:1,max:29},{key:"fishing",name:"Fishing",min:30,max:30},{key:"towing",name:"Towing",min:31,max:32},{key:"dredger",name:"Dredger",min:33,max:33},{key:"diving",name:"Dive Vessel",min:34,max:34},{key:"military",name:"Military Ops",min:35,max:35},{key:"sailing",name:"Sailing Vessel",min:36,max:36},{key:"leisure",name:"Pleasure Craft",min:37,max:37},{key:"highspeed",name:"High Speed Craft",min:40,max:49},{key:"port",name:"Pilot Vessel",min:50,max:55},{key:"sar",name:"Search and Rescue Vessel",min:51,max:51},{key:"tug",name:"Tug",min:52,max:52},{key:"port_tender",name:"Port Tender",min:53,max:53},{key:"anti-pollution",name:"Anti-pollution",min:54,max:54},{key:"law_enforcement",name:"Law Enforcement",min:55,max:55},{key:"medical",name:"Medical",min:58,max:58},{key:"noncombatant",name:"Noncombatant ship",min:59,max:59},{key:"passenger",name:"Passenger",min:60,max:69},{key:"cargo",name:"Cargo",min:70,max:79},{key:"tanker",name:"Tanker",min:80,max:89},{key:"other",name:"Other",min:90,max:99}],ED=kD.reduce((t,e)=>{for(let i=e.min;i<=e.max;i++)t[i]=e.name;return t},{}),DD=(kD.reduce((t,e)=>{for(let i=e.min;i<=e.max;i++)t[i]=e.key;return t},{}),kD.reduce((t,e)=>(t[e.key]=e,t),{})),ID=(new Date).getFullYear();function PD(t){return Object(ue.a)(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}function OD(t){const e=typeof t;if("string"===e||"number"===e||"boolean"===e||null==t)return t;if(t instanceof Array)return t.map(OD);if(t instanceof Date)return new Date(t.getTime());if("object"===e)return Object.keys(t).reduce((e,i)=>(e[i]=OD(t[i]),e),{});throw new Error(`unknown object type: ${e}`)}function MD(t){return t instanceof Array?t.map(MD):t?new t.constructor(t):t}function TD(t){return null==t?"":t.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function RD(t){return null!==t&&isFinite(t)}function VD(t){return Math.round(10*t)/10}function FD(t){return null!=t}function LD(t){return t<10?`0${t}`:t}function UD(t){return t?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"):""}function BD(t){return t?`"${null==t?void 0:t.replace(/"/g,'\\"')}"`:""}function ND(t){return btoa(unescape(encodeURIComponent(t)))}function jD(t){return decodeURIComponent(escape(atob(t)))}function zD(){return{shipTypes:[],shipFlags:[],shipIdentifier:"",fleets:[],shipDeparture:"",shipDestination:"",shipStatus:[],shipSpeed:{min:0,max:100},shipLength:{min:0,max:500},shipWidth:{min:0,max:100},shipDraught:{min:0,max:30},shipYearofbuild:{min:1874,max:ID},shipYearofbuildIncludeNulls:!0,shipCourse:{min:0,max:360},transparencyThreshold:3600,shipLastPositionTimestampThreshold:21600}}function HD(t){return OD({shipTypes:t.shipTypes,shipFlags:t.shipFlags,shipIdentifier:t.shipIdentifier,fleets:t.fleets,shipDeparture:t.shipDeparture,shipDestination:t.shipDestination,shipStatus:t.shipStatus,shipSpeed:t.shipSpeed,shipLength:t.shipLength,shipWidth:t.shipWidth,shipDraught:t.shipDraught,shipYearofbuild:t.shipYearofbuild,shipYearofbuildIncludeNulls:t.shipYearofbuildIncludeNulls,shipCourse:t.shipCourse,shipLastPositionTimestampThreshold:t.shipLastPositionTimestampThreshold,transparencyThreshold:t.transparencyThreshold})}function KD(t,e){return t.shipTypes===e.shipTypes&&t.shipFlags===e.shipFlags&&t.shipIdentifier===e.shipIdentifier&&t.fleets===e.fleets&&t.shipDeparture===e.shipDeparture&&t.shipDestination===e.shipDestination&&t.shipStatus===e.shipStatus&&t.shipSpeed===e.shipSpeed&&t.shipLength===e.shipLength&&t.shipWidth===e.shipWidth&&t.shipDraught===e.shipDraught&&t.shipYearofbuild===e.shipYearofbuild&&t.shipYearofbuildIncludeNulls===e.shipYearofbuildIncludeNulls&&t.shipCourse===e.shipCourse&&t.shipLastPositionTimestampThreshold===e.shipLastPositionTimestampThreshold&&t.transparencyThreshold===e.transparencyThreshold}class $D{constructor(t={}){this.shipIdentifier="",this.shipDeparture="",this.shipDestination="",this.colorMode="shipType",this.alertRules=[],this.eventTypes=[],this.minimumTimestampThreshold=604800,this.importantTimestampThreshold=3600,this.now=Math.floor(Date.now()/1e3),this.frozenTimestamp=0,this.absoluteTransparencyThresholdTimestamp=0,this.absoluteVisibilityThresholdTimestamp=0,this.absoluteMinimumTimestamp=0,this.absoluteImportantTimestamp=0,this.colorModeShipType=!0,this.colorModeAllShips=!1,this.colorModeResultsOnly=!1,this.isMissingColorFilterConfiguration=!1,this.shipTypesCache={},this.shipFlagsCache={},this.fleetsShipsCache=[],this.shipDestinations=[],this.selectedShips=new Set,this.restrictedShips=new Set,Object.assign(this,zD(),t),this.refresh()}refresh(){return this.now=this.frozenTimestamp||Math.floor(Date.now()/1e3),this.absoluteTransparencyThresholdTimestamp=this.now-(this.transparencyThreshold>0?this.transparencyThreshold:this.now),this.absoluteVisibilityThresholdTimestamp=this.now-(this.shipLastPositionTimestampThreshold>0?this.shipLastPositionTimestampThreshold:this.now),this.absoluteMinimumTimestamp=this.now-(this.minimumTimestampThreshold>0?this.minimumTimestampThreshold:this.now),this.absoluteImportantTimestamp=this.now-(this.importantTimestampThreshold>0?this.importantTimestampThreshold:this.now),this.colorModeShipType="shipType"===this.colorMode,this.colorModeAllShips="allShips"===this.colorMode,this.colorModeResultsOnly="resultsOnly"===this.colorMode,this.isMissingColorFilterConfiguration=!this.colorModeShipType&&0===this.alertRules.length&&0===this.eventTypes.length,this.shipTypesCache=this.shipTypes.reduce((t,e)=>{const i=DD[e];for(let n=i.min;n<=i.max;n++)t[n]=i.name;return t},{}),this.shipFlagsCache=this.shipFlags.reduce((t,e)=>(t[e]=!0,t),{}),this.shipDestinations=this.shipDestination.split(",").filter(t=>t.length>0).map(t=>t.trim()),this.shipDepartures=this.shipDeparture.split(",").filter(t=>t.length>0).map(t=>t.trim()),this}freezeTimestamp(t){this.frozenTimestamp=t}}const GD=[{key:"shipType",label:"Par type de navire"},{key:"allShips",label:"R\xe9sultats et autres navires"},{key:"resultsOnly",label:"R\xe9sultats seulement"}];class WD{constructor(t=null){this.rules=[],this.showReadAlerts=!0,this.showFalsePositiveAlerts=!1,Object.assign(this,t)}static New(t=null){return new WD(t)}}class ZD{constructor(t,e){this.lon=t,this.lat=e>90?90:e<-90?-90:e}}class qD{constructor(t,e){this.bottomLeft=t,this.topRight=e}static fromOLExtent(t){const[e,i,n,r]=uE(t,"EPSG:3857","EPSG:4326");return new qD(new ZD(e,i),new ZD(n,r))}static New(t,e,i,n){return new qD(new ZD(t,e),new ZD(i,n))}scale(t){const e=(this.topRight.lat-this.bottomLeft.lat)/2,i=(this.topRight.lon-this.bottomLeft.lon)/2,n=this.bottomLeft.lon+i,r=this.bottomLeft.lat+e;return new qD(new ZD(n-t*i,r-t*e),new ZD(n+t*i,r+t*e))}restrict(t){const e=this.topRight.lon>t.topRight.lon?t.topRight.lon:this.topRight.lon,i=this.topRight.lat>t.topRight.lat?t.topRight.lat:this.topRight.lat;return new qD(new ZD(this.bottomLeft.lon<t.bottomLeft.lon?t.bottomLeft.lon:this.bottomLeft.lon,this.bottomLeft.lat<t.bottomLeft.lat?t.bottomLeft.lat:this.bottomLeft.lat),new ZD(e,i))}getPolygon(){const t=YD(this.bottomLeft.lon),e=YD(this.topRight.lon);return XD(t,this.bottomLeft.lat,e,this.topRight.lat)}getBoundedPolygons(){const t=YD(this.bottomLeft.lon),e=YD(this.topRight.lon);return Math.abs(this.topRight.lon-this.bottomLeft.lon)>=359?[XD(-180,this.bottomLeft.lat,0,this.topRight.lat),XD(0,this.bottomLeft.lat,180,this.topRight.lat)]:t>e?[XD(t,this.bottomLeft.lat,180,this.topRight.lat),XD(-180,this.bottomLeft.lat,e,this.topRight.lat)].map(t=>QD(t)).flat():[this.getPolygon()].map(t=>QD(t)).flat()}toExtent(){return[...sE([this.bottomLeft.lon,this.bottomLeft.lat]),...sE([this.topRight.lon,this.topRight.lat])]}containsPosition(t,e){return this.bottomLeft.lat<=e&&e<=this.topRight.lat&&this.bottomLeft.lon<=t&&t<=this.topRight.lon}addPoint(t,e){t<this.bottomLeft.lon?this.bottomLeft.lon=t:t>this.topRight.lon&&(this.topRight.lon=t),e<this.bottomLeft.lat?this.bottomLeft.lat=e:e>this.topRight.lat&&(this.topRight.lat=e)}toString(){return`${this.bottomLeft.lon},${this.bottomLeft.lat}:${this.topRight.lon},${this.topRight.lat}`}toStringImage(){return`${Math.round(this.bottomLeft.lon)}, ${Math.round(this.bottomLeft.lat)} |_ \u203e| ${Math.round(this.topRight.lon)}, ${Math.round(this.topRight.lat)}`}toURLPath(){return`${this.bottomLeft.lat}/${this.topRight.lat}/${this.bottomLeft.lon}/${this.topRight.lon}`}toLatLonExtent(){return[this.bottomLeft.lon,this.bottomLeft.lat,this.topRight.lon,this.topRight.lat]}}function YD(t){return t<-180||t>180?bk(t+180,360)-180:t}function QD(t){const e=t[0][0],i=t[1][0],n=t[0][1],r=t[2][1];if(Math.abs(i-e)>180){const t=e+(i-e)/2;return[XD(e,n,t,r),XD(t,n,i,r)]}return[t]}function XD(t,e,i,n){return[[t,e],[i,e],[i,n],[t,n],[t,e]]}class JD{constructor(t={}){this.value=0,this.isCustom=!1,this.isRelative=!1,Object.assign(this,t)}refresh(){const t=MD(this);return this.isCustom||(t.end=Math.floor(Date.now()/1e3),t.start=t.end-t.value),t}shift(t){return this.setCustom(this.start+t,this.end+t)}extend(t){return t>0?this.setCustom(this.start,this.end+t):this.setCustom(this.start+t,this.end)}setCustom(t,e){const i=MD(this);return i.key="custom",i.isCustom=!0,i.start=t,i.end=e,i.value=e-t,i}setRelative(t){const e=MD(this);return e.isRelative=!0,e.start=t-this.value,e.end=t,e}}const tI=[new JD({key:"custom",label:"personnalis\xe9",isCustom:!0,value:0}),new JD({key:"last_hour",label:"la derni\xe8re heure",value:3600}),new JD({key:"last_3_hours",label:"les 3 derni\xe8res heures",value:10800}),new JD({key:"last_6_hours",label:"les 6 derni\xe8res heures",value:21600}),new JD({key:"last_12_hours",label:"les 12 derni\xe8res heures",value:43200}),new JD({key:"last_day",label:"le dernier jour",value:86400}),new JD({key:"last_2_days",label:"les 2 derniers jours",value:172800}),new JD({key:"last_week",label:"la derni\xe8re semaine",value:604800}),new JD({key:"last_month",label:"le dernier mois",value:2592e3}),new JD({key:"last_3_months",label:"les 3 derniers mois",value:7776e3})],eI=tI.find(t=>"last_day"===t.key),iI=tI.reduce((t,e)=>(t[e.key]=e,t),{});function nI(t,e){if(t.length<1)return t;FD(e)&&Math.abs(t[0][0]-e[0])>180&&(t[0][0]+=e[0]>0?360:-360);for(let i=1;i<t.length;i++)Math.abs(t[i][0]-t[i-1][0])>180&&(t[i][0]+=t[i-1][0]>0?360:-360);return t}function rI(t){return function(t){let e=t.split("N "),i="N ";if(1===e.length&&(e=t.split("S "),i="S ",1===e.length))throw new Error(`Invalid DMS format: ${t}`);return e[0].length<9&&(e[0]=`0${e[0]}`),e[1].length<11&&(e[1]=`${"0".repeat(11-e[1].length)}${e[1]}`),`${e[0]}${i}${e[1]}`}(Yk(t).replace(/ /g,"").replace(/N/g,"N ").replace(/S/g,"S "))}function sI(t){return[t[1],t[0]]}function oI(t,e){return Math.abs(t[0]-e[0])<1e-12&&Math.abs(t[1]-e[1])<1e-12}function aI([t,e],[i,n]){let r=Math.atan2(n-e,i-t);return r<0&&(r+=2*Math.PI),r}const lI=[{id:"shipType",execute(t){var e,i;(null===(i=null===(e=t.mapConfig)||void 0===e?void 0:e.shipFilter)||void 0===i?void 0:i.colorMode)&&(t.mapConfig.shipFilter.colorMode="shipType")}},{id:"defaultTimeRangeToLastDay",execute(t){t.defaultTimeRange=eI.key}},{id:"3_restrictedAreas",execute(t){var e;(null===(e=t.mapConfig)||void 0===e?void 0:e.restrictedArea)&&(t.mapConfig.restrictedAreas=DC(qD.New.apply(null,t.mapConfig.restrictedArea).toLatLonExtent()).map(t=>t.id),delete t.mapConfig.restrictedArea)}},{id:"4",execute(t){var e;if(null===(e=t.geolocationConfig)||void 0===e?void 0:e.fixedLocation){const{lon:e,lat:i}=t.geolocationConfig.fixedLocation;t.geolocationConfig.fixedLocation=rI([e,i])}}},{id:"5",execute(t){var e;(null===(e=t.mapConfig)||void 0===e?void 0:e.shipRefreshInterval)<3e4&&(t.mapConfig.shipRefreshInterval=3e4)}}];let cI=(()=>{class t{constructor(){this.devMode=!1,this.showReadAlerts=!0,this.showFalsePositiveAlerts=!1,this.eventsFilter={},this.defaultTimeRange=eI.key,this.migrations=[],this.lastView=null,this.alertsFilter=new WD,this.adminManageUsersPageSize=10,this.adminManageUsersSort={},this.load(),this.devMode&&(window.config=this)}set(t,e){this[t]=e,this.save()}load(){try{Object.assign(this,JSON.parse(localStorage.getItem("anais-config")))}catch($nt){console.error("could not load config from localstorage",$nt),localStorage.removeItem("anais-config")}this.runMigrations()}save(){localStorage.setItem("anais-config",JSON.stringify(this))}runMigrations(){let t=!1;lI.forEach(e=>{if(!this.migrations.includes(e.id))try{e.execute(this),this.migrations.push(e.id),t=!0}catch($nt){console.error(`error with migration \`${e.id}\``,$nt)}}),t&&this.save()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),hI=(()=>{class t{constructor(t){this.configService=t,this.shipFilter$=new Av.a(new $D),this.hasActiveShipFilters$=new Av.a(!1),this.shipRefreshInterval$=new Av.a(3e4),this.hidePositionsInLowZooms$=new Av.a(!1),this.highHexagonsResolution$=new Av.a(!1),this.detailedShipTraces$=new Av.a(!1),this.debugH3Trace$=new Av.a(!1),this.restrictedAreas$=new Av.a(null),this.restrictedAreaLonLat$=new Av.a(null),this.showMarineTrafficPhotos$=new Av.a(!0),this.showMarineTrafficDeparture$=new Av.a(!1),this.limitMinimumZoom$=new Av.a(!0),this.zoomOnLocationEvents$=new Av.a(!0),this.longitudeCenter$=new Av.a(0),this.enableRiskAssessmentButton$=new Av.a(!1),this.preloadMapTiles$=new Av.a(!1),this.manualMapFetch$=new Av.a(!1),this.tooltipsOpacity$=new Av.a(1),this.useUTCDates$=new Av.a(!1),this.baseLayer$=new Av.a(gD[0]),this.showShipsLayer$=new Av.a(!0),this.showAircraftsLayer$=new Av.a(!1),this.showAnnotationsLayer$=new Av.a(!0),this.showHexagonsLayer$=new Av.a(!1),this.showMaritimeBoundariesLayer$=new Av.a(!1),this.show36NqLimitsLayer$=new Av.a(!1),this.showEEZLayer$=new Av.a(!1),this.showSARLayer$=new Av.a(!1),this.showMRCCLayer$=new Av.a(!1),this.showTrailsLayer$=new Av.a(!0),this.showPortsLayer$=new Av.a(!1),this.showOpenSeaMapLayer$=new Av.a(!1),this.showSubcablesLayer$=new Av.a(!1),this.enableMultiSelectionMode$=new Av.a(!1),this.showPermanentTooltips$=new Av.a(!1),this.showMiniPermanentTooltips$=new Av.a(!1),this.showOtherShips$=new Av.a(!0),this.showFleetShipsOnly$=new Av.a(!0),this.portsOfCallDisplayMode$=new Av.a(SD),this.expandLloydsPanel$=new Av.a(!1),this.movesSearchIncludeIncompletePassages$=new Av.a(!1),this.enableHistoryModeExtrapolation$=new Av.a(!1),this.loadMapConfig(),this.shipFilter$.pipe(Gg(1)).subscribe(()=>{this.saveMapConfig()}),this.shipFilter$.subscribe(t=>{this.hasActiveShipFilters$.next(t.shipTypes.length>0||t.shipFlags.length>0||t.shipDestinations.length>0||t.shipDepartures.length>0||t.shipStatus.length>0||0!==t.shipSpeed.min||100!==t.shipSpeed.max||0!==t.shipLength.min||500!==t.shipLength.max||0!==t.shipWidth.min||100!==t.shipWidth.max||0!==t.shipDraught.min||30!==t.shipDraught.max||1874!==t.shipYearofbuild.min||t.shipYearofbuild.max!==ID||0!==t.shipCourse.min||360!==t.shipCourse.max||t.fleets.length>0||t.shipIdentifier.length>0)})}loadMapConfig(){const t=this.config=this.configService.mapConfig;t&&(FD(t.shipFilter)&&this.shipFilter$.next(new $D(t.shipFilter)),FD(t.shipRefreshInterval)&&this.shipRefreshInterval$.next(t.shipRefreshInterval),FD(t.hidePositionsInLowZooms)&&this.hidePositionsInLowZooms$.next(t.hidePositionsInLowZooms),FD(t.detailedShipTraces)&&this.detailedShipTraces$.next(t.detailedShipTraces),FD(t.highHexagonsResolution)&&this.highHexagonsResolution$.next(t.highHexagonsResolution),FD(t.debugH3Trace)&&this.debugH3Trace$.next(t.debugH3Trace),FD(t.restrictedAreaLonLat)&&this.restrictedAreaLonLat$.next(t.restrictedAreaLonLat),FD(t.restrictedAreas)&&this.restrictedAreas$.next(t.restrictedAreas),FD(t.showMarineTrafficPhotos)&&this.showMarineTrafficPhotos$.next(t.showMarineTrafficPhotos),FD(t.showMarineTrafficDeparture)&&this.showMarineTrafficDeparture$.next(t.showMarineTrafficDeparture),FD(t.limitMinimumZoom)&&this.limitMinimumZoom$.next(t.limitMinimumZoom),FD(t.zoomOnLocationEvents)&&this.zoomOnLocationEvents$.next(t.zoomOnLocationEvents),FD(t.longitudeCenter)&&this.longitudeCenter$.next(t.longitudeCenter),FD(t.enableRiskAssessmentButton)&&this.enableRiskAssessmentButton$.next(t.enableRiskAssessmentButton),FD(t.preloadMapTiles)&&this.preloadMapTiles$.next(t.preloadMapTiles),FD(t.manualMapFetch)&&this.manualMapFetch$.next(t.manualMapFetch),FD(t.tooltipsOpacity)&&this.tooltipsOpacity$.next(t.tooltipsOpacity),FD(t.useUTCDates)&&this.useUTCDates$.next(t.useUTCDates),FD(t.baseLayer)&&this.baseLayer$.next(gD.find(e=>e.label===t.baseLayer)||this.baseLayer$.value),FD(t.showShipsLayer)&&this.showShipsLayer$.next(t.showShipsLayer),FD(t.showAircraftsLayer)&&this.showAircraftsLayer$.next(t.showAircraftsLayer),FD(t.showAnnotationsLayer)&&this.showAnnotationsLayer$.next(t.showAnnotationsLayer),FD(t.showHexagonsLayer)&&this.showHexagonsLayer$.next(t.showHexagonsLayer),FD(t.showMaritimeBoundariesLayer)&&this.showMaritimeBoundariesLayer$.next(t.showMaritimeBoundariesLayer),FD(t.show36NqLimitsLayer)&&this.show36NqLimitsLayer$.next(t.show36NqLimitsLayer),FD(t.showEEZLayer)&&this.showEEZLayer$.next(t.showEEZLayer),FD(t.showSARLayer)&&this.showSARLayer$.next(t.showSARLayer),FD(t.showMRCCLayer)&&this.showMRCCLayer$.next(t.showMRCCLayer),FD(t.showTrailsLayer)&&this.showTrailsLayer$.next(t.showTrailsLayer),FD(t.showPortsLayer)&&this.showPortsLayer$.next(t.showPortsLayer),FD(t.showOpenSeaMapLayer)&&this.showOpenSeaMapLayer$.next(t.showOpenSeaMapLayer),FD(t.showSubcablesLayer)&&this.showSubcablesLayer$.next(t.showSubcablesLayer),FD(t.enableMultiSelectionMode)&&this.enableMultiSelectionMode$.next(t.enableMultiSelectionMode),FD(t.showPermanentTooltips)&&this.showPermanentTooltips$.next(t.showPermanentTooltips),FD(t.showMiniPermanentTooltips)&&this.showMiniPermanentTooltips$.next(t.showMiniPermanentTooltips),FD(t.showOtherShips)&&this.showOtherShips$.next(t.showOtherShips),FD(t.showFleetShipsOnly)&&this.showFleetShipsOnly$.next(t.showFleetShipsOnly),FD(t.portsOfCallDisplayMode)&&this.portsOfCallDisplayMode$.next(t.portsOfCallDisplayMode),FD(t.expandLloydsPanel)&&this.expandLloydsPanel$.next(t.expandLloydsPanel),FD(t.movesSearchIncludeIncompletePassages)&&this.movesSearchIncludeIncompletePassages$.next(t.movesSearchIncludeIncompletePassages),FD(t.enableHistoryModeExtrapolation)&&this.enableHistoryModeExtrapolation$.next(t.enableHistoryModeExtrapolation))}saveMapConfig(){const t=this.config=new AD({shipFilter:this.shipFilter$.value,shipRefreshInterval:this.shipRefreshInterval$.value,hidePositionsInLowZooms:this.hidePositionsInLowZooms$.value,detailedShipTraces:this.detailedShipTraces$.value,highHexagonsResolution:this.highHexagonsResolution$.value,debugH3Trace:this.debugH3Trace$.value,restrictedAreaLonLat:this.restrictedAreaLonLat$.value,restrictedAreas:this.restrictedAreas$.value,showMarineTrafficPhotos:this.showMarineTrafficPhotos$.value,showMarineTrafficDeparture:this.showMarineTrafficDeparture$.value,limitMinimumZoom:this.limitMinimumZoom$.value,zoomOnLocationEvents:this.zoomOnLocationEvents$.value,longitudeCenter:this.longitudeCenter$.value,enableRiskAssessmentButton:this.enableRiskAssessmentButton$.value,preloadMapTiles:this.preloadMapTiles$.value,manualMapFetch:this.manualMapFetch$.value,tooltipsOpacity:this.tooltipsOpacity$.value,useUTCDates:this.useUTCDates$.value,baseLayer:this.baseLayer$.value.label,showShipsLayer:this.showShipsLayer$.value,showAircraftsLayer:this.showAircraftsLayer$.value,showAnnotationsLayer:this.showAnnotationsLayer$.value,showHexagonsLayer:this.showHexagonsLayer$.value,showMaritimeBoundariesLayer:this.showMaritimeBoundariesLayer$.value,show36NqLimitsLayer:this.show36NqLimitsLayer$.value,showEEZLayer:this.showEEZLayer$.value,showSARLayer:this.showSARLayer$.value,showMRCCLayer:this.showMRCCLayer$.value,showTrailsLayer:this.showTrailsLayer$.value,showPortsLayer:this.showPortsLayer$.value,showOpenSeaMapLayer:this.showOpenSeaMapLayer$.value,showSubcablesLayer:this.showSubcablesLayer$.value,enableMultiSelectionMode:this.enableMultiSelectionMode$.value,showPermanentTooltips:this.showPermanentTooltips$.value,showMiniPermanentTooltips:this.showMiniPermanentTooltips$.value,showOtherShips:this.showOtherShips$.value,showFleetShipsOnly:this.showFleetShipsOnly$.value,portsOfCallDisplayMode:this.portsOfCallDisplayMode$.value,expandLloydsPanel:this.expandLloydsPanel$.value,movesSearchIncludeIncompletePassages:this.movesSearchIncludeIncompletePassages$.value,enableHistoryModeExtrapolation:this.enableHistoryModeExtrapolation$.value});this.configService.set("mapConfig",t)}resetShipFilter(){const t=new $D;this.shipFilter$.next(t)}refreshAndNotifyShipFilter(){this.shipFilter$.value.refresh(),this.shipFilter$.next(this.shipFilter$.value)}updateBatch(t){Object.assign(this.shipFilter$.value,t),this.refreshAndNotifyShipFilter()}updateAlertRulesFilter(t){this.shipFilter$.value.alertRules=t,this.refreshAndNotifyShipFilter(),this.configService.set("alertRulesFilter",t)}updateColorMode(t){this.shipFilter$.value.colorMode=t,this.refreshAndNotifyShipFilter()}updateShipTypesFilter(t){this.shipFilter$.value.shipTypes=t,this.refreshAndNotifyShipFilter()}updateShipFlagsFilter(t){this.shipFilter$.value.shipFlags=t,this.refreshAndNotifyShipFilter()}updateShipIdsFilter(t){this.shipFilter$.value.restrictedShips=new Set(t),this.refreshAndNotifyShipFilter()}updateSelectedShipsFilter(t){this.shipFilter$.value.selectedShips=new Set(t),this.refreshAndNotifyShipFilter()}freezeTimestamp(t){this.shipFilter$.value.frozenTimestamp=t,this.refreshAndNotifyShipFilter()}updateShipDestinationFilter(t){this.shipFilter$.value.shipDestination=t.toUpperCase(),this.refreshAndNotifyShipFilter()}updateShipDepartureFilter(t){this.shipFilter$.value.shipDeparture=t.toUpperCase(),this.refreshAndNotifyShipFilter()}updateShipIdentifierFilter(t){this.shipFilter$.value.shipIdentifier=t.toUpperCase(),this.refreshAndNotifyShipFilter()}updateShipStatusFilter(t){this.shipFilter$.value.shipStatus=t,this.refreshAndNotifyShipFilter()}updateShipSpeedFilter(t){this.shipFilter$.value.shipSpeed=t,this.refreshAndNotifyShipFilter()}updateShipLengthFilter(t){this.shipFilter$.value.shipLength=t,this.refreshAndNotifyShipFilter()}updateShipWidthFilter(t){this.shipFilter$.value.shipWidth=t,this.refreshAndNotifyShipFilter()}updateShipDraughtFilter(t){this.shipFilter$.value.shipDraught=t,this.refreshAndNotifyShipFilter()}updateShipYearofbuildFilter(t){this.shipFilter$.value.shipYearofbuild=t,this.refreshAndNotifyShipFilter()}updateShipYearofbuildIncludeNullsFilter(t){this.shipFilter$.value.shipYearofbuildIncludeNulls=t,this.refreshAndNotifyShipFilter()}updateShipCourseFilter(t){this.shipFilter$.value.shipCourse=t,this.refreshAndNotifyShipFilter()}updateFleetsFilter(t){this.shipFilter$.value.fleets=t,this.refreshAndNotifyShipFilter()}updateEventTypesFilter(t){this.shipFilter$.value.eventTypes=t,this.refreshAndNotifyShipFilter()}updateTimestampThresholds(t,e){this.shipFilter$.value.minimumTimestampThreshold=t,this.shipFilter$.value.importantTimestampThreshold=e,this.refreshAndNotifyShipFilter()}updateShipRefreshInterval(t){this.shipRefreshInterval$.next(t),this.saveMapConfig()}updateHidePositionsInLowZooms(t){this.hidePositionsInLowZooms$.next(t),this.saveMapConfig()}toggleDetailedShipTraces(){this.detailedShipTraces$.next(!this.detailedShipTraces$.value),this.saveMapConfig()}updateHighHexagonsResolution(t){this.highHexagonsResolution$.next(t),this.saveMapConfig()}updateDebugH3Trace(t){this.debugH3Trace$.next(t),this.saveMapConfig()}updateRestrictedAreas(t){this.restrictedAreaLonLat$.next(t),this.restrictedAreas$.next(t?DC(t).map(t=>t.id):null),this.saveMapConfig()}updateShowMarineTrafficPhotos(t){this.showMarineTrafficPhotos$.next(t),this.saveMapConfig()}updateShowMarineTrafficDeparture(t){this.showMarineTrafficDeparture$.next(t),this.saveMapConfig()}updateLimitMinimumZoom(t){this.limitMinimumZoom$.next(t),this.saveMapConfig()}updateZoomOnLocationEvents(t){this.zoomOnLocationEvents$.next(t),this.saveMapConfig()}updateLongitudeCenter(t){this.longitudeCenter$.next(t),this.saveMapConfig()}updateEnableRiskAssessmentButton(t){this.enableRiskAssessmentButton$.next(t),this.saveMapConfig()}updatePreloadMapTiles(t){this.preloadMapTiles$.next(t),this.saveMapConfig()}updateManualMapFetch(t){this.manualMapFetch$.next(t),this.saveMapConfig()}updateTooltipsOpacity(t){this.tooltipsOpacity$.next(t),this.saveMapConfig()}updateUseUTCDates(t){this.useUTCDates$.next(t),this.saveMapConfig()}toggleShipsColorMode(){this.updateColorMode("shipType"===this.shipFilter$.value.colorMode?"allShips":"shipType")}updateVisibilityThresholds(t,e){this.shipFilter$.value.shipLastPositionTimestampThreshold=t,this.shipFilter$.value.transparencyThreshold=e,this.refreshAndNotifyShipFilter()}updateBaseLayer(t){this.baseLayer$.next(t),this.saveMapConfig()}toggleShipsLayer(){this.showShipsLayer$.next(!this.showShipsLayer$.value),this.saveMapConfig()}toggleAircraftsLayer(){this.showAircraftsLayer$.next(!this.showAircraftsLayer$.value),this.saveMapConfig()}toggleAnnotationsLayer(){this.showAnnotationsLayer$.next(!this.showAnnotationsLayer$.value),this.saveMapConfig()}toggleHexagonsLayer(){this.showHexagonsLayer$.next(!this.showHexagonsLayer$.value),this.saveMapConfig()}toggleMultiSelectionMode(){this.enableMultiSelectionMode$.next(!this.enableMultiSelectionMode$.value),this.saveMapConfig()}toggleOpenSeaMapLayer(){this.showOpenSeaMapLayer$.next(!this.showOpenSeaMapLayer$.value),this.saveMapConfig()}toggleSubcablesLayer(){this.showSubcablesLayer$.next(!this.showSubcablesLayer$.value),this.saveMapConfig()}toggleShipTooltips(){this.showPermanentTooltips$.value?this.showMiniPermanentTooltips$.value?this.showMiniPermanentTooltips$.next(!1):(this.showPermanentTooltips$.next(!1),this.showMiniPermanentTooltips$.next(!0)):this.showPermanentTooltips$.next(!0),this.saveMapConfig()}toggleTrailsLayer(){this.showTrailsLayer$.next(!this.showTrailsLayer$.value),this.saveMapConfig()}toggleMaritimeBoundariesLayer(){this.showMaritimeBoundariesLayer$.next(!this.showMaritimeBoundariesLayer$.value),this.saveMapConfig()}toggle36NqLimitsLayer(){this.show36NqLimitsLayer$.next(!this.show36NqLimitsLayer$.value),this.saveMapConfig()}toggleEEZLayer(){this.showEEZLayer$.next(!this.showEEZLayer$.value),this.saveMapConfig()}toggleSARLayer(){this.showSARLayer$.next(!this.showSARLayer$.value),this.saveMapConfig()}toggleMRCCLayer(){this.showMRCCLayer$.next(!this.showMRCCLayer$.value),this.saveMapConfig()}toggleOtherShips(){this.showOtherShips$.next(!this.showOtherShips$.value),this.saveMapConfig()}togglePortsLayer(){this.showPortsLayer$.next(!this.showPortsLayer$.value),this.saveMapConfig()}toggleFleetShipsOnly(){this.showFleetShipsOnly$.next(!this.showFleetShipsOnly$.value),this.saveMapConfig()}updatePortsOfCallDisplayMode(t){this.portsOfCallDisplayMode$.next(t),this.saveMapConfig()}toggleExpandLloydsPanel(){this.expandLloydsPanel$.next(!this.expandLloydsPanel$.value),this.saveMapConfig()}toggleMovesSearchIncludeIncompletePassages(){this.movesSearchIncludeIncompletePassages$.next(!this.movesSearchIncludeIncompletePassages$.value),this.saveMapConfig()}toggleEnableHistoryModeExtrapolation(){this.enableHistoryModeExtrapolation$.next(!this.enableHistoryModeExtrapolation$.value),this.saveMapConfig()}clear(){this.showShipsLayer$.next(!0),this.showAircraftsLayer$.next(!1),this.showHexagonsLayer$.next(!1),this.enableMultiSelectionMode$.next(!1),this.showPermanentTooltips$.next(!1),this.showMiniPermanentTooltips$.next(!0),this.showTrailsLayer$.next(!0),this.showOtherShips$.next(!0),this.showFleetShipsOnly$.next(!0),this.showMaritimeBoundariesLayer$.next(!1),this.showSARLayer$.next(!1),this.showMRCCLayer$.next(!1),this.showPortsLayer$.next(!1),this.portsOfCallDisplayMode$.next(SD),this.showOpenSeaMapLayer$.next(!1),this.showSubcablesLayer$.next(!1),this.expandLloydsPanel$.next(!1)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(cI))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();class uI{constructor(t){Object.assign(this,t)}}class dI{constructor(t){Object.assign(this,t)}}let pI=(()=>{class t{constructor(t,e){this.configService=t,this.mapConfigService=e,this.view$=new Av.a(null),this.pointerMove$=new _e.a,this.locateEvents$=new _e.a,this.fitEvents$=new _e.a,this.zoomEvents$=new _e.a,this.pingLocation$=new _e.a,this.hasBooted=!1}init(){this.locateEvents$.pipe(Rv()).subscribe(()=>{this.hasBooted=!0})}destroy(){this.hasBooted=!1}centerOn(t,e){if(!RD(t[0])||!RD(t[1]))throw new Error(`centerOn: can't center on malformed location: ${t.toString()}`);this.locateEvents$.next(new dI({center:t,zoom:e}))}centerOnLonLat(t,e){this.centerOn(sE(t),e)}locate(t){this.centerOnLonLat(t,10)}resetToDefaultView(){const t=this.configService.lastView;t?this.centerOn(t.center,t.zoom):this.centerOnLonLat([8.3825684,40.4385859],7)}fitOn(t,e=1e3){this.fitEvents$.next(new uI({polygon:t,duration:e}))}zoomByDelta(t){this.zoomEvents$.next(t)}updateViewState(t){this.view$.next(t)}emitPointerMoveEvent(t){this.pointerMove$.next(t)}locateFit(t){if(this.pingLocation(t),this.mapConfigService.zoomOnLocationEvents$.value)this.locate(t);else{const[e,i]=sE(t),n=this.view$.value;let[r,s,o,a]=n.extent;if(r<e&&e<o&&s<i&&i<a);else{e<r&&(r=e),e>o&&(o=e),i<s&&(s=i),i>a&&(a=i);const l=$S(n.center,n.maxResolution,0,n.viewportSize.map(t=>t-200)),c=l[3]-l[1];o-r<l[2]-l[0]&&a-s<c?this.fitOn([r,s,o,a]):this.centerOnLonLat(t)}}}pingLocation(t){this.pingLocation$.next(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(cI),r.Zb(hI))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function fI(t,e=Ue){var i;const n=(i=t)instanceof Date&&!isNaN(+i)?+t-e.now():Math.abs(t);return t=>t.lift(new mI(n,e))}class mI{constructor(t,e){this.delay=t,this.scheduler=e}call(t,e){return e.subscribe(new gI(t,this.delay,this.scheduler))}}class gI extends Ee.a{constructor(t,e,i){super(t),this.delay=e,this.scheduler=i,this.queue=[],this.active=!1,this.errored=!1}static dispatch(t){const e=t.source,i=e.queue,n=t.scheduler,r=t.destination;for(;i.length>0&&i[0].time-n.now()<=0;)i.shift().notification.observe(r);if(i.length>0){const e=Math.max(0,i[0].time-n.now());this.schedule(t,e)}else this.unsubscribe(),e.active=!1}_schedule(t){this.active=!0,this.destination.add(t.schedule(gI.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))}scheduleNotification(t){if(!0===this.errored)return;const e=this.scheduler,i=new AI(e.now()+this.delay,t);this.queue.push(i),!1===this.active&&this._schedule(e)}_next(t){this.scheduleNotification(Nn.createNext(t))}_error(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()}_complete(){this.scheduleNotification(Nn.createComplete()),this.unsubscribe()}}class AI{constructor(t,e){this.time=t,this.notification=e}}let bI=(()=>{class t{constructor(t){this.mapConfigService=t,this.timestamp$=new Av.a(0),this.timestamp$.pipe(Gg(1),fI(0)).subscribe(t=>{this.mapConfigService.freezeTimestamp(t)})}setTimestampToNow(){this.setTimestamp(this.getCurrentTimestamp())}setTimestamp(t){t=Math.min(t,this.getCurrentTimestamp()),this.timestamp$.next(t)}incrementTimestamp(t){this.setTimestamp(this.timestamp$.value+t)}resetTimestamp(){this.setTimestamp(0)}getCurrentTimestamp(){return Math.ceil(Date.now()/1e3)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(hI))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),vI=(()=>{class t{constructor(t,e,i,n){this.router=t,this.configService=e,this.historyService=i,this.mapService=n,this.previousUrl=void 0,this.currentUrl=void 0,this.route$=new Av.a(""),this.viewURL$=new Av.a(""),this.router.events.subscribe(t=>{t instanceof Uv&&(this.currentUrl&&(this.previousUrl=this.currentUrl),this.currentUrl=t.urlAfterRedirects,this.route$.next(this.currentUrl))}),Hg([this.mapService.view$.pipe(Gg(1)),this.historyService.timestamp$]).pipe(Be(500)).subscribe(([t,e])=>{let i=t.toURL();e&&(i+=`,${new Date(1e3*e).toISOString()}`),this.viewURL$.next(i),this.configService.set("lastView",t.toLocateEvent())})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(sw),r.Zb(cI),r.Zb(bI),r.Zb(pI))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();var _I=i("C3FG");let yI=(()=>{class t{constructor(t,e,i,n,r){this.errorHandler=t,this.mapConfigService=e,this.mapService=i,this.routeService=n,this.workerService=r,this.initialized=!1,this.user$=new Av.a(null),this.user$.subscribe(t=>{!function(t){wC("setUser",t)}(t?{id:t.id,email:t.email}:null)}),this.errorHandler.unauthorizedError$.subscribe(()=>{var t;this.clearAuthentication();let e=this.routeService.currentUrl;("/"===e||e.startsWith("/@"))&&(e=null===(t=this.mapService.view$.value)||void 0===t?void 0:t.toURL()),location.href="/login?expired="+(e?"&redirect="+e:"")})}init(){return Object(ue.a)(this,void 0,void 0,function*(){try{this.user$.next(yield this.workerService.authentication.getUserInfos())}catch(t){if(t.name!==kC.Unauthorized&&t.name!==kC.Maintenance)throw t}this.initialized=!0})}isAuthenticated(){return null!==this.user$.value}isAdmin(){return this.isAuthenticated()&&"admin"===this.user$.value.profile}getUserId(){return this.isAuthenticated()&&this.user$.value.id}login(t){return Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.authentication.login(t),this.mapConfigService.resetShipFilter(),this.user$.next(yield this.workerService.authentication.getUserInfos())})}logout(){return Object(ue.a)(this,void 0,void 0,function*(){try{yield this.workerService.authentication.logout()}finally{this.clearAuthentication()}})}clearAuthentication(){this.user$.next(null)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.n),r.Zb(hI),r.Zb(pI),r.Zb(vI),r.Zb(_I.a))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),wI=(()=>{class t{constructor(t){this.data=t}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(jl))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-confirm-dialog"]],decls:11,vars:4,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["mat-dialog-actions",""],[1,"u-flex"],["mat-button","","color","warn","title","Oui",3,"mat-dialog-close"],["mat-button","","title","Non",3,"mat-dialog-close"]],template:function(t,e){1&t&&(r.Vb(0,"h1",0),r.Kc(1),r.Ub(),r.Vb(2,"div",1),r.Vb(3,"p"),r.Kc(4),r.Ub(),r.Ub(),r.Vb(5,"div",2),r.Qb(6,"div",3),r.Vb(7,"button",4),r.Kc(8,"Oui"),r.Ub(),r.Vb(9,"button",5),r.Kc(10,"Non"),r.Ub(),r.Ub()),2&t&&(r.Db(1),r.Lc(e.data.title),r.Db(3),r.Lc(e.data.message),r.Db(3),r.nc("mat-dialog-close",!0),r.Db(2),r.nc("mat-dialog-close",!1))},directives:[ql,Yl,Ql,Dl,Zl],encapsulation:2,changeDetection:0}),t})();function xI(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",1),r.Vb(1,"button",2),r.cc("click",function(){return r.Ac(t),r.gc().action()}),r.Kc(2),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.Db(2),r.Lc(t.data.action)}}function CI(t,e){}const SI=new r.s("MatSnackBarData");class kI{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}const EI=Math.pow(2,31)-1;class DI{constructor(t,e){this._overlayRef=e,this._afterDismissed=new _e.a,this._afterOpened=new _e.a,this._onAction=new _e.a,this._dismissedByAction=!1,this.containerInstance=t,this.onAction().subscribe(()=>this.dismiss()),t._onExit.subscribe(()=>this._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete())}closeWithAction(){this.dismissWithAction()}_dismissAfter(t){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(t,EI))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}}let II=(()=>{class t{constructor(t,e){this.snackBarRef=t,this.data=e}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(DI),r.Pb(SI))},t.\u0275cmp=r.Jb({type:t,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-simple-snackbar"],decls:3,vars:2,consts:[["class","mat-simple-snackbar-action",4,"ngIf"],[1,"mat-simple-snackbar-action"],["mat-button","",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"span"),r.Kc(1),r.Ub(),r.Ic(2,xI,3,1,"div",0)),2&t&&(r.Db(1),r.Lc(e.data.message),r.Db(1),r.nc("ngIf",e.hasAction))},directives:[ut,Dl],styles:[".mat-simple-snackbar{display:flex;justify-content:space-between;align-items:center;line-height:20px;opacity:1}.mat-simple-snackbar-action{flex-shrink:0;margin:-8px -8px -8px 8px}.mat-simple-snackbar-action button{max-height:36px;min-width:0}[dir=rtl] .mat-simple-snackbar-action{margin-left:-8px;margin-right:8px}\n"],encapsulation:2,changeDetection:0}),t})();const PI={snackBarState:$r("state",[qr("void, hidden",Zr({transform:"scale(0.8)",opacity:0})),qr("visible",Zr({transform:"scale(1)",opacity:1})),Qr("* => visible",Gr("150ms cubic-bezier(0, 0, 0.2, 1)")),Qr("* => void, * => hidden",Gr("75ms cubic-bezier(0.4, 0.0, 1, 1)",Zr({opacity:0})))])};let OI=(()=>{class t extends ge{constructor(t,e,i,n,r){super(),this._ngZone=t,this._elementRef=e,this._changeDetectorRef=i,this._platform=n,this.snackBarConfig=r,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new _e.a,this._onExit=new _e.a,this._onEnter=new _e.a,this._animationState="void",this.attachDomPortal=t=>(this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachDomPortal(t)),this._live="assertive"!==r.politeness||r.announcementMessage?"off"===r.politeness?"off":"polite":"assertive",this._platform.FIREFOX&&("polite"===this._live&&(this._role="status"),"assertive"===this._live&&(this._role="alert"))}attachComponentPortal(t){return this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachComponentPortal(t)}attachTemplatePortal(t){return this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachTemplatePortal(t)}onAnimationEnd(t){const{fromState:e,toState:i}=t;if(("void"===i&&"void"!==e||"hidden"===i)&&this._completeExit(),"visible"===i){const t=this._onEnter;this._ngZone.run(()=>{t.next(),t.complete()})}}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce())}exit(){return this._animationState="hidden",this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId),this._onExit}ngOnDestroy(){this._destroyed=!0,this._completeExit()}_completeExit(){this._ngZone.onMicrotaskEmpty.pipe(Qe(1)).subscribe(()=>{this._onExit.next(),this._onExit.complete()})}_applySnackBarClasses(){const t=this._elementRef.nativeElement,e=this.snackBarConfig.panelClass;e&&(Array.isArray(e)?e.forEach(e=>t.classList.add(e)):t.classList.add(e)),"center"===this.snackBarConfig.horizontalPosition&&t.classList.add("mat-snack-bar-center"),"top"===this.snackBarConfig.verticalPosition&&t.classList.add("mat-snack-bar-top")}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{const t=this._elementRef.nativeElement.querySelector("[aria-hidden]"),e=this._elementRef.nativeElement.querySelector("[aria-live]");if(t&&e){let i=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&t.contains(document.activeElement)&&(i=document.activeElement),t.removeAttribute("aria-hidden"),e.appendChild(t),null==i||i.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.B),r.Pb(r.l),r.Pb(r.h),r.Pb(ci),r.Pb(kI))},t.\u0275cmp=r.Jb({type:t,selectors:[["snack-bar-container"]],viewQuery:function(t,e){if(1&t&&r.Pc(be,3),2&t){let t;r.vc(t=r.dc())&&(e._portalOutlet=t.first)}},hostAttrs:[1,"mat-snack-bar-container"],hostVars:1,hostBindings:function(t,e){1&t&&r.Gc("@state.done",function(t){return e.onAnimationEnd(t)}),2&t&&r.Hc("@state",e._animationState)},features:[r.Ab],decls:3,vars:2,consts:[["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Ic(1,CI,0,0,"ng-template",1),r.Ub(),r.Qb(2,"div")),2&t&&(r.Db(2),r.Eb("aria-live",e._live)("role",e._role))},directives:[be],styles:[".mat-snack-bar-container{border-radius:4px;box-sizing:border-box;display:block;margin:24px;max-width:33vw;min-width:344px;padding:14px 16px;min-height:48px;transform-origin:center}.cdk-high-contrast-active .mat-snack-bar-container{border:solid 1px}.mat-snack-bar-handset{width:100%}.mat-snack-bar-handset .mat-snack-bar-container{margin:8px;max-width:100%;min-width:0;width:100%}\n"],encapsulation:2,data:{animation:[PI.snackBarState]}}),t})(),MI=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[zr,ve,Et,Pl,Sa],Sa]}),t})();const TI=new r.s("mat-snack-bar-default-options",{providedIn:"root",factory:function(){return new kI}});let RI=(()=>{class t{constructor(t,e,i,n,r,s){this._overlay=t,this._live=e,this._injector=i,this._breakpointObserver=n,this._parentSnackBar=r,this._defaultConfig=s,this._snackBarRefAtThisLevel=null,this.simpleSnackBarComponent=II,this.snackBarContainerComponent=OI,this.handsetCssClass="mat-snack-bar-handset"}get _openedSnackBarRef(){const t=this._parentSnackBar;return t?t._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(t){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=t:this._snackBarRefAtThisLevel=t}openFromComponent(t,e){return this._attach(t,e)}openFromTemplate(t,e){return this._attach(t,e)}open(t,e="",i){const n=Object.assign(Object.assign({},this._defaultConfig),i);return n.data={message:t,action:e},n.announcementMessage===t&&(n.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,n)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(t,e){const i=r.t.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:kI,useValue:e}]}),n=new pe(this.snackBarContainerComponent,e.viewContainerRef,i),s=t.attach(n);return s.instance.snackBarConfig=e,s.instance}_attach(t,e){const i=Object.assign(Object.assign(Object.assign({},new kI),this._defaultConfig),e),n=this._createOverlay(i),s=this._attachSnackBarContainer(n,i),o=new DI(s,n);if(t instanceof r.O){const e=new fe(t,null,{$implicit:i.data,snackBarRef:o});o.instance=s.attachTemplatePortal(e)}else{const e=this._createInjector(i,o),n=new pe(t,void 0,e),r=s.attachComponentPortal(n);o.instance=r.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(Sn(n.detachments())).subscribe(t=>{const e=n.overlayElement.classList;t.matches?e.add(this.handsetCssClass):e.remove(this.handsetCssClass)}),i.announcementMessage&&s._onAnnounce.subscribe(()=>{this._live.announce(i.announcementMessage,i.politeness)}),this._animateSnackBar(o,i),this._openedSnackBarRef=o,this._openedSnackBarRef}_animateSnackBar(t,e){t.afterDismissed().subscribe(()=>{this._openedSnackBarRef==t&&(this._openedSnackBarRef=null),e.announcementMessage&&this._live.clear()}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{t.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):t.containerInstance.enter(),e.duration&&e.duration>0&&t.afterOpened().subscribe(()=>t._dismissAfter(e.duration))}_createOverlay(t){const e=new br;e.direction=t.direction;let i=this._overlay.position().global();const n="rtl"===t.direction,r="left"===t.horizontalPosition||"start"===t.horizontalPosition&&!n||"end"===t.horizontalPosition&&n,s=!r&&"center"!==t.horizontalPosition;return r?i.left("0"):s?i.right("0"):i.centerHorizontally(),"top"===t.verticalPosition?i.top("0"):i.bottom("0"),e.positionStrategy=i,this._overlay.create(e)}_createInjector(t,e){return r.t.create({parent:t&&t.viewContainerRef&&t.viewContainerRef.injector||this._injector,providers:[{provide:DI,useValue:e},{provide:SI,useValue:t.data}]})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Fr),r.Zb(Hi),r.Zb(r.t),r.Zb(Jg),r.Zb(t,12),r.Zb(TI))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(Fr),Object(r.Zb)(Hi),Object(r.Zb)(r.p),Object(r.Zb)(Jg),Object(r.Zb)(t,12),Object(r.Zb)(TI))},token:t,providedIn:MI}),t})(),VI=(()=>{class t{constructor(t,e,i){this.ngZone=t,this.dialog=e,this.snackBar=i,this.drawingMode$=new Av.a(!1),this.errors$=new _e.a,this.errors$.pipe(wm(1e3,Le,{leading:!0,trailing:!0})).subscribe(t=>{this.ngZone.run(()=>{this.snackBar.open(t,"Fermer",{panelClass:"error-snack-bar",duration:4e3})})})}success(t){this.snackBar.open(t,"Fermer")}error(t){this.errors$.next(t)}confirm(t){this.dialog.open(wI,{data:{title:t.title,message:t.message}}).afterClosed().subscribe(t.action)}confirmAsync(t){return Object(ue.a)(this,void 0,void 0,function*(){return new Promise(e=>{this.dialog.open(wI,{data:{title:t.title,message:t.message}}).afterClosed().subscribe(t=>{e(t)})})})}setDrawingMode(t){this.drawingMode$.next(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.B),r.Zb(Gl),r.Zb(RI))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),FI=(()=>{class t{constructor(t,e,i){this.authenticationService=t,this.router=e,this.uiService=i}canActivateChild(t,e){return Object(ue.a)(this,void 0,void 0,function*(){return!!this.authenticationService.isAdmin()||(this.uiService.error("Vous n'avez pas les permissions requises."),yield this.router.navigateByUrl("/"),!1)})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(yI),r.Zb(sw),r.Zb(VI))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const LI=[{label:"15 minutes",value:900},{label:"30 minutes",value:1800},{label:"1 heure",value:3600},{label:"2 heures",value:7200},{label:"6 heures",value:21600},{label:"12 heures",value:43200},{label:"24 heures",value:86400},{label:"2 jours",value:172800},{label:"1 semaine",value:604800},{label:"2 semaines",value:1209600},{label:"1 mois",value:2592e3},{label:"3 mois",value:7776e3}],UI=LI.reduce((t,e)=>(t[e.value]=e.label,t),{});var BI=function(t){return t.RealTime="realTime",t.PastAndRealTime="pastAndRealTime",t.Past="past",t}({});function NI(t){t.speed||(t.speed={enable:!1,min:0,max:100}),t.erraticRoute||(t.erraticRoute={enable:!1}),t.transhipment||(t.transhipment={enable:!1}),t.aisInterruption||(t.aisInterruption={enable:!1}),t.passageInZone||(t.passageInZone={enable:!1,sequential:!1,timeWindow:LI.find(t=>"1 mois"===t.label).value,passages:[]}),t.spoofing||(t.spoofing={enable:!1}),t.identifier||(t.identifier={enable:!1,identifiers:[]}),t.fleet||(t.fleet={enable:!1,fleets:[]}),t.flag||(t.flag={enable:!1,flags:[]}),t.type||(t.type={enable:!1,types:[]}),t.time||(t.time={type:BI.RealTime,since:null,to:null}),t.zone||(t.zone={enable:!0,zones:[]})}const jI=[{name:"Afghanistan",iso2:"af",iso3:"afg"},{name:"Afrique du Sud",iso2:"za",iso3:"zaf"},{name:"\xceles \xc5land",iso2:"ax",iso3:"ala"},{name:"Albanie",iso2:"al",iso3:"alb"},{name:"Alg\xe9rie",iso2:"dz",iso3:"dza"},{name:"Allemagne",iso2:"de",iso3:"deu"},{name:"Andorre",iso2:"ad",iso3:"and"},{name:"Angola",iso2:"ao",iso3:"ago"},{name:"Anguilla",iso2:"ai",iso3:"aia"},{name:"Antarctique",iso2:"aq",iso3:"ata"},{name:"Antigua-et-Barbuda",iso2:"ag",iso3:"atg"},{name:"Arabie saoudite",iso2:"sa",iso3:"sau"},{name:"Argentine",iso2:"ar",iso3:"arg"},{name:"Arm\xe9nie",iso2:"am",iso3:"arm"},{name:"Aruba",iso2:"aw",iso3:"abw"},{name:"Australie",iso2:"au",iso3:"aus"},{name:"Autriche",iso2:"at",iso3:"aut"},{name:"Azerba\xefdjan",iso2:"az",iso3:"aze"},{name:"Bahamas",iso2:"bs",iso3:"bhs"},{name:"Bahre\xefn",iso2:"bh",iso3:"bhr"},{name:"Bangladesh",iso2:"bd",iso3:"bgd"},{name:"Barbade",iso2:"bb",iso3:"brb"},{name:"Bi\xe9lorussie",iso2:"by",iso3:"blr"},{name:"Belgique",iso2:"be",iso3:"bel"},{name:"Belize",iso2:"bz",iso3:"blz"},{name:"B\xe9nin",iso2:"bj",iso3:"ben"},{name:"Bermudes",iso2:"bm",iso3:"bmu"},{name:"Bhoutan",iso2:"bt",iso3:"btn"},{name:"Bolivie",iso2:"bo",iso3:"bol"},{name:"Pays-Bas carib\xe9ens",iso2:"bq",iso3:"bes"},{name:"Bosnie-Herz\xe9govine",iso2:"ba",iso3:"bih"},{name:"Botswana",iso2:"bw",iso3:"bwa"},{name:"\xcele Bouvet",iso2:"bv",iso3:"bvt"},{name:"Br\xe9sil",iso2:"br",iso3:"bra"},{name:"Brunei",iso2:"bn",iso3:"brn"},{name:"Bulgarie",iso2:"bg",iso3:"bgr"},{name:"Burkina Faso",iso2:"bf",iso3:"bfa"},{name:"Burundi",iso2:"bi",iso3:"bdi"},{name:"\xceles Ca\xefmans",iso2:"ky",iso3:"cym"},{name:"Cambodge",iso2:"kh",iso3:"khm"},{name:"Cameroun",iso2:"cm",iso3:"cmr"},{name:"Canada",iso2:"ca",iso3:"can"},{name:"Cap-Vert",iso2:"cv",iso3:"cpv"},{name:"R\xe9publique centrafricaine",iso2:"cf",iso3:"caf"},{name:"Chili",iso2:"cl",iso3:"chl"},{name:"Chine",iso2:"cn",iso3:"chn"},{name:"\xcele Christmas",iso2:"cx",iso3:"cxr"},{name:"Chypre (pays)",iso2:"cy",iso3:"cyp"},{name:"\xceles Cocos",iso2:"cc",iso3:"cck"},{name:"Colombie",iso2:"co",iso3:"col"},{name:"Comores (pays)",iso2:"km",iso3:"com"},{name:"R\xe9publique du Congo",iso2:"cg",iso3:"cog"},{name:"R\xe9publique d\xe9mocratique du Congo",iso2:"cd",iso3:"cod"},{name:"\xceles Cook",iso2:"ck",iso3:"cok"},{name:"Cor\xe9e du Sud",iso2:"kr",iso3:"kor"},{name:"Cor\xe9e du Nord",iso2:"kp",iso3:"prk"},{name:"Costa Rica",iso2:"cr",iso3:"cri"},{name:"C\xf4te d'Ivoire",iso2:"ci",iso3:"civ"},{name:"Croatie",iso2:"hr",iso3:"hrv"},{name:"Cuba",iso2:"cu",iso3:"cub"},{name:"Cura\xe7ao",iso2:"cw",iso3:"cuw"},{name:"Danemark",iso2:"dk",iso3:"dnk"},{name:"Djibouti",iso2:"dj",iso3:"dji"},{name:"R\xe9publique dominicaine",iso2:"do",iso3:"dom"},{name:"Dominique",iso2:"dm",iso3:"dma"},{name:"\xc9gypte",iso2:"eg",iso3:"egy"},{name:"Salvador",iso2:"sv",iso3:"slv"},{name:"\xc9mirats arabes unis",iso2:"ae",iso3:"are"},{name:"\xc9quateur (pays)",iso2:"ec",iso3:"ecu"},{name:"\xc9rythr\xe9e",iso2:"er",iso3:"eri"},{name:"Espagne",iso2:"es",iso3:"esp"},{name:"Estonie",iso2:"ee",iso3:"est"},{name:"\xc9tats-Unis",iso2:"us",iso3:"usa"},{name:"\xc9thiopie",iso2:"et",iso3:"eth"},{name:"Malouines",iso2:"fk",iso3:"flk"},{name:"\xceles F\xe9ro\xe9",iso2:"fo",iso3:"fro"},{name:"Fidji",iso2:"fj",iso3:"fji"},{name:"Finlande",iso2:"fi",iso3:"fin"},{name:"France",iso2:"fr",iso3:"fra"},{name:"Gabon",iso2:"ga",iso3:"gab"},{name:"Gambie",iso2:"gm",iso3:"gmb"},{name:"G\xe9orgie (pays)",iso2:"ge",iso3:"geo"},{name:"G\xe9orgie du Sud-et-les \xeeles Sandwich du Sud",iso2:"gs",iso3:"sgs"},{name:"Ghana",iso2:"gh",iso3:"gha"},{name:"Gibraltar",iso2:"gi",iso3:"gib"},{name:"Gr\xe8ce",iso2:"gr",iso3:"grc"},{name:"Grenade (pays)",iso2:"gd",iso3:"grd"},{name:"Groenland",iso2:"gl",iso3:"grl"},{name:"Guadeloupe",iso2:"gp",iso3:"glp"},{name:"Guam",iso2:"gu",iso3:"gum"},{name:"Guatemala",iso2:"gt",iso3:"gtm"},{name:"Guernesey",iso2:"gg",iso3:"ggy"},{name:"Guin\xe9e",iso2:"gn",iso3:"gin"},{name:"Guin\xe9e-Bissau",iso2:"gw",iso3:"gnb"},{name:"Guin\xe9e \xe9quatoriale",iso2:"gq",iso3:"gnq"},{name:"Guyana",iso2:"gy",iso3:"guy"},{name:"Guyane",iso2:"gf",iso3:"guf"},{name:"Ha\xefti",iso2:"ht",iso3:"hti"},{name:"\xceles Heard-et-MacDonald",iso2:"hm",iso3:"hmd"},{name:"Honduras",iso2:"hn",iso3:"hnd"},{name:"Hong Kong",iso2:"hk",iso3:"hkg"},{name:"Hongrie",iso2:"hu",iso3:"hun"},{name:"\xcele de Man",iso2:"im",iso3:"imn"},{name:"\xceles mineures \xe9loign\xe9es des \xc9tats-Unis",iso2:"um",iso3:"umi"},{name:"\xceles Vierges britanniques",iso2:"vg",iso3:"vgb"},{name:"\xceles Vierges des \xc9tats-Unis",iso2:"vi",iso3:"vir"},{name:"Inde",iso2:"in",iso3:"ind"},{name:"Indon\xe9sie",iso2:"id",iso3:"idn"},{name:"Iran",iso2:"ir",iso3:"irn"},{name:"Irak",iso2:"iq",iso3:"irq"},{name:"Irlande (pays)",iso2:"ie",iso3:"irl"},{name:"Islande",iso2:"is",iso3:"isl"},{name:"Isra\xebl",iso2:"il",iso3:"isr"},{name:"Italie",iso2:"it",iso3:"ita"},{name:"Jama\xefque",iso2:"jm",iso3:"jam"},{name:"Japon",iso2:"jp",iso3:"jpn"},{name:"Jersey",iso2:"je",iso3:"jey"},{name:"Jordanie",iso2:"jo",iso3:"jor"},{name:"Kazakhstan",iso2:"kz",iso3:"kaz"},{name:"Kenya",iso2:"ke",iso3:"ken"},{name:"Kirghizistan",iso2:"kg",iso3:"kgz"},{name:"Kiribati",iso2:"ki",iso3:"kir"},{name:"Kowe\xeft",iso2:"kw",iso3:"kwt"},{name:"Laos",iso2:"la",iso3:"lao"},{name:"Lesotho",iso2:"ls",iso3:"lso"},{name:"Lettonie",iso2:"lv",iso3:"lva"},{name:"Liban",iso2:"lb",iso3:"lbn"},{name:"Liberia",iso2:"lr",iso3:"lbr"},{name:"Libye",iso2:"ly",iso3:"lby"},{name:"Liechtenstein",iso2:"li",iso3:"lie"},{name:"Lituanie",iso2:"lt",iso3:"ltu"},{name:"Luxembourg (pays)",iso2:"lu",iso3:"lux"},{name:"Macao",iso2:"mo",iso3:"mac"},{name:"Mac\xe9doine du Nord",iso2:"mk",iso3:"mkd"},{name:"Madagascar",iso2:"mg",iso3:"mdg"},{name:"Malaisie",iso2:"my",iso3:"mys"},{name:"Malawi",iso2:"mw",iso3:"mwi"},{name:"Maldives",iso2:"mv",iso3:"mdv"},{name:"Mali",iso2:"ml",iso3:"mli"},{name:"Malte",iso2:"mt",iso3:"mlt"},{name:"\xceles Mariannes du Nord",iso2:"mp",iso3:"mnp"},{name:"Maroc",iso2:"ma",iso3:"mar"},{name:"\xceles Marshall (pays)",iso2:"mh",iso3:"mhl"},{name:"Martinique",iso2:"mq",iso3:"mtq"},{name:"Maurice (pays)",iso2:"mu",iso3:"mus"},{name:"Mauritanie",iso2:"mr",iso3:"mrt"},{name:"Mayotte",iso2:"yt",iso3:"myt"},{name:"Mexique",iso2:"mx",iso3:"mex"},{name:"\xc9tats f\xe9d\xe9r\xe9s de Micron\xe9sie (pays)",iso2:"fm",iso3:"fsm"},{name:"Moldavie",iso2:"md",iso3:"mda"},{name:"Monaco",iso2:"mc",iso3:"mco"},{name:"Mongolie",iso2:"mn",iso3:"mng"},{name:"Mont\xe9n\xe9gro",iso2:"me",iso3:"mne"},{name:"Montserrat",iso2:"ms",iso3:"msr"},{name:"Mozambique",iso2:"mz",iso3:"moz"},{name:"Birmanie",iso2:"mm",iso3:"mmr"},{name:"Namibie",iso2:"na",iso3:"nam"},{name:"Nauru",iso2:"nr",iso3:"nru"},{name:"N\xe9pal",iso2:"np",iso3:"npl"},{name:"Nicaragua",iso2:"ni",iso3:"nic"},{name:"Niger",iso2:"ne",iso3:"ner"},{name:"Nigeria",iso2:"ng",iso3:"nga"},{name:"Niue",iso2:"nu",iso3:"niu"},{name:"\xcele Norfolk",iso2:"nf",iso3:"nfk"},{name:"Norv\xe8ge",iso2:"no",iso3:"nor"},{name:"Nouvelle-Cal\xe9donie",iso2:"nc",iso3:"ncl"},{name:"Nouvelle-Z\xe9lande",iso2:"nz",iso3:"nzl"},{name:"Territoire britannique de l'oc\xe9an Indien",iso2:"io",iso3:"iot"},{name:"Oman",iso2:"om",iso3:"omn"},{name:"Ouganda",iso2:"ug",iso3:"uga"},{name:"Ouzb\xe9kistan",iso2:"uz",iso3:"uzb"},{name:"Pakistan",iso2:"pk",iso3:"pak"},{name:"Palaos",iso2:"pw",iso3:"plw"},{name:"Palestine",iso2:"ps",iso3:"pse"},{name:"Panama",iso2:"pa",iso3:"pan"},{name:"Papouasie-Nouvelle-Guin\xe9e",iso2:"pg",iso3:"png"},{name:"Paraguay",iso2:"py",iso3:"pry"},{name:"Pays-Bas",iso2:"nl",iso3:"nld"},{name:"P\xe9rou",iso2:"pe",iso3:"per"},{name:"Philippines",iso2:"ph",iso3:"phl"},{name:"\xceles Pitcairn",iso2:"pn",iso3:"pcn"},{name:"Pologne",iso2:"pl",iso3:"pol"},{name:"Polyn\xe9sie fran\xe7aise",iso2:"pf",iso3:"pyf"},{name:"Porto Rico",iso2:"pr",iso3:"pri"},{name:"Portugal",iso2:"pt",iso3:"prt"},{name:"Qatar",iso2:"qa",iso3:"qat"},{name:"La R\xe9union",iso2:"re",iso3:"reu"},{name:"Roumanie",iso2:"ro",iso3:"rou"},{name:"Royaume-Uni",iso2:"gb",iso3:"gbr"},{name:"Russie",iso2:"ru",iso3:"rus"},{name:"Rwanda",iso2:"rw",iso3:"rwa"},{name:"R\xe9publique arabe sahraouie d\xe9mocratique",iso2:"eh",iso3:"esh"},{name:"Saint-Barth\xe9lemy",iso2:"bl",iso3:"blm"},{name:"Saint-Christophe-et-Ni\xe9v\xe8s",iso2:"kn",iso3:"kna"},{name:"Saint-Marin",iso2:"sm",iso3:"smr"},{name:"Saint-Martin",iso2:"mf",iso3:"maf"},{name:"Saint-Martin",iso2:"sx",iso3:"sxm"},{name:"Saint-Pierre-et-Miquelon",iso2:"pm",iso3:"spm"},{name:"Saint-Si\xe8ge (\xc9tat de la Cit\xe9 du Vatican)",iso2:"va",iso3:"vat"},{name:"Saint-Vincent-et-les-Grenadines",iso2:"vc",iso3:"vct"},{name:"Sainte-H\xe9l\xe8ne, Ascension et Tristan da Cunha",iso2:"sh",iso3:"shn"},{name:"Sainte-Lucie",iso2:"lc",iso3:"lca"},{name:"Salomon",iso2:"sb",iso3:"slb"},{name:"Samoa",iso2:"ws",iso3:"wsm"},{name:"Samoa am\xe9ricaines",iso2:"as",iso3:"asm"},{name:"Sao Tom\xe9-et-Principe",iso2:"st",iso3:"stp"},{name:"S\xe9n\xe9gal",iso2:"sn",iso3:"sen"},{name:"Serbie",iso2:"rs",iso3:"srb"},{name:"Seychelles",iso2:"sc",iso3:"syc"},{name:"Sierra Leone",iso2:"sl",iso3:"sle"},{name:"Singapour",iso2:"sg",iso3:"sgp"},{name:"Slovaquie",iso2:"sk",iso3:"svk"},{name:"Slov\xe9nie",iso2:"si",iso3:"svn"},{name:"Somalie",iso2:"so",iso3:"som"},{name:"Soudan",iso2:"sd",iso3:"sdn"},{name:"Soudan du Sud",iso2:"ss",iso3:"ssd"},{name:"Sri Lanka",iso2:"lk",iso3:"lka"},{name:"Su\xe8de",iso2:"se",iso3:"swe"},{name:"Suisse",iso2:"ch",iso3:"che"},{name:"Suriname",iso2:"sr",iso3:"sur"},{name:"Svalbard et ile Jan Mayen",iso2:"sj",iso3:"sjm"},{name:"Eswatini",iso2:"sz",iso3:"swz"},{name:"Syrie",iso2:"sy",iso3:"syr"},{name:"Tadjikistan",iso2:"tj",iso3:"tjk"},{name:"Ta\xefwan / (R\xe9publique de Chine (Ta\xefwan))",iso2:"tw",iso3:"twn"},{name:"Tanzanie",iso2:"tz",iso3:"tza"},{name:"Tchad",iso2:"td",iso3:"tcd"},{name:"Tch\xe9quie",iso2:"cz",iso3:"cze"},{name:"Terres australes et antarctiques fran\xe7aises",iso2:"tf",iso3:"atf"},{name:"Tha\xeflande",iso2:"th",iso3:"tha"},{name:"Timor oriental",iso2:"tl",iso3:"tls"},{name:"Togo",iso2:"tg",iso3:"tgo"},{name:"Tokelau",iso2:"tk",iso3:"tkl"},{name:"Tonga",iso2:"to",iso3:"ton"},{name:"Trinit\xe9-et-Tobago",iso2:"tt",iso3:"tto"},{name:"Tunisie",iso2:"tn",iso3:"tun"},{name:"Turkm\xe9nistan",iso2:"tm",iso3:"tkm"},{name:"\xceles Turques-et-Ca\xefques",iso2:"tc",iso3:"tca"},{name:"Turquie",iso2:"tr",iso3:"tur"},{name:"Tuvalu",iso2:"tv",iso3:"tuv"},{name:"Ukraine",iso2:"ua",iso3:"ukr"},{name:"Uruguay",iso2:"uy",iso3:"ury"},{name:"Vanuatu",iso2:"vu",iso3:"vut"},{name:"Venezuela",iso2:"ve",iso3:"ven"},{name:"Vi\xeat Nam",iso2:"vn",iso3:"vnm"},{name:"Wallis-et-Futuna",iso2:"wf",iso3:"wlf"},{name:"Y\xe9men",iso2:"ye",iso3:"yem"},{name:"Zambie",iso2:"zm",iso3:"zmb"},{name:"Zimbabwe",iso2:"zw",iso3:"zwe"}].map(t=>(t.flag=t.iso2,t.searchValue=TD(t.name),t)).sort((t,e)=>Intl.Collator().compare(t.name,e.name)),zI=Object.values(jI).reduce((t,e)=>(t[e.flag]=e.name,t),{});function HI(t,e){var i;const n=t;return t.criteria.zone&&(n.criteria.zone.zones=t.criteria.zone.zones.map(t=>e[t])),t.criteria.passageInZone&&(n.criteria.passageInZone.passages=t.criteria.passageInZone.passages.map(t=>({zone:e[t.zone]}))),n.criteria.zone?n.criteria.zone.enable=!0:n.criteria.zone={enable:!0,zones:[]},n.validZone=(null===(i=n.criteria.zone)||void 0===i?void 0:i.zones.length)>0,NI(n.criteria),n}function KI(t){const e=OD(t);return t.criteria.zone&&(e.criteria.zone.zones=t.criteria.zone.zones.map(t=>t.id)),t.criteria.passageInZone&&(e.criteria.passageInZone.passages=t.criteria.passageInZone.passages.map(t=>({zone:t.zone.id}))),e}var $I=function(t){var e,i=void 0!==(t=t||{})?t:{},n={};for(e in i)i.hasOwnProperty(e)&&(n[e]=i[e]);var r,s=[],o="";document.currentScript&&(o=document.currentScript.src),o=0!==o.indexOf("blob:")?o.substr(0,o.lastIndexOf("/")+1):"",r=function(t,e,i){var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=function(){if(200==n.status||0==n.status&&n.response)e(n.response);else{var r=Z(t);r?e(r.buffer):i()}},n.onerror=i,n.send(null)};var a=i.print||console.log.bind(console),l=i.printErr||console.warn.bind(console);for(e in n)n.hasOwnProperty(e)&&(i[e]=n[e]);n=null,i.arguments&&(s=i.arguments);var c=0,h=function(){return c},u=!1;function d(t){var e=i["_"+t];return e||at("Assertion failed: Cannot call unknown function "+t+", make sure it is exported"),e}function p(t,e,i,n,r){var s={string:function(t){var e=0;if(null!=t&&0!==t){var i=1+(t.length<<2);!function(t,e,i){!function(t,e,i,n){if(!(n>0))return 0;for(var r=i+n-1,s=0;s<t.length;++s){var o=t.charCodeAt(s);if(o>=55296&&o<=57343&&(o=65536+((1023&o)<<10)|1023&t.charCodeAt(++s)),o<=127){if(i>=r)break;e[i++]=o}else if(o<=2047){if(i+1>=r)break;e[i++]=192|o>>6,e[i++]=128|63&o}else if(o<=65535){if(i+2>=r)break;e[i++]=224|o>>12,e[i++]=128|o>>6&63,e[i++]=128|63&o}else{if(i+3>=r)break;e[i++]=240|o>>18,e[i++]=128|o>>12&63,e[i++]=128|o>>6&63,e[i++]=128|63&o}}e[i]=0}(t,g,e,i)}(t,e=J(i),i)}return e},array:function(t){var e=J(t.length);return function(t,e){m.set(t,e)}(t,e),e}},o=d(t),a=[],l=0;if(n)for(var c=0;c<n.length;c++){var h=s[i[c]];h?(0===l&&(l=et()),a[c]=h(n[c])):a[c]=n[c]}var u=o.apply(null,a);return u=function(t){return"string"===e?w(t):"boolean"===e?Boolean(t):t}(u),0!==l&&tt(l),u}var f,m,g,A,b,v,_,y="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function w(t,e){return t?function(t,e,i){for(var n=e+i,r=e;t[r]&&!(r>=n);)++r;if(r-e>16&&t.subarray&&y)return y.decode(t.subarray(e,r));for(var s="";e<r;){var o=t[e++];if(128&o){var a=63&t[e++];if(192!=(224&o)){var l=63&t[e++];if((o=224==(240&o)?(15&o)<<12|a<<6|l:(7&o)<<18|a<<12|l<<6|63&t[e++])<65536)s+=String.fromCharCode(o);else{var c=o-65536;s+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else s+=String.fromCharCode((31&o)<<6|a)}else s+=String.fromCharCode(o)}return s}(g,t,e):""}function x(t,e){return t%e>0&&(t+=e-t%e),t}function C(t){f=t,i.HEAP8=m=new Int8Array(t),i.HEAP16=A=new Int16Array(t),i.HEAP32=b=new Int32Array(t),i.HEAPU8=g=new Uint8Array(t),i.HEAPU16=new Uint16Array(t),i.HEAPU32=new Uint32Array(t),i.HEAPF32=v=new Float32Array(t),i.HEAPF64=_=new Float64Array(t)}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");var S=i.TOTAL_MEMORY||33554432;function k(t){for(;t.length>0;){var e=t.shift();if("function"!=typeof e){var n=e.func;"number"==typeof n?void 0===e.arg?i.dynCall_v(n):i.dynCall_vi(n,e.arg):n(void 0===e.arg?null:e.arg)}else e()}}S=(f=i.buffer?i.buffer:new ArrayBuffer(S)).byteLength,C(f),b[6004]=5266928;var E=[],D=[],I=[],P=[],O=Math.abs,M=Math.ceil,T=Math.floor,R=Math.min,V=0,F=null,L=null;i.preloadedImages={},i.preloadedAudios={};var U,B,N=null,j="data:application/octet-stream;base64,";function z(t){return String.prototype.startsWith?t.startsWith(j):0===t.indexOf(j)}function H(t){return t.replace(/\b__Z[\w\d_]+/g,function(t){return t==t?t:t+" ["+t+"]"})}function K(){var t=new Error;if(!t.stack){try{throw new Error(0)}catch($nt){t=$nt}if(!t.stack)return"(no stack trace available)"}return t.stack.toString()}function $(){return m.length}function G(t){try{var e=new ArrayBuffer(t);if(e.byteLength!=t)return;return new Int8Array(e).set(m),X(e),C(e),1}catch($nt){}}N="data:application/octet-stream;base64,AAAAAAAAAAACAAAAAwAAAAEAAAAFAAAABAAAAAYAAAAAAAAAAAAAAAAAAAABAAAAAgAAAAMAAAAEAAAABQAAAAYAAAABAAAABAAAAAMAAAAGAAAABQAAAAIAAAAAAAAAAgAAAAMAAAABAAAABAAAAAYAAAAAAAAABQAAAAMAAAAGAAAABAAAAAUAAAAAAAAAAQAAAAIAAAAEAAAABQAAAAYAAAAAAAAAAgAAAAMAAAABAAAABQAAAAIAAAAAAAAAAQAAAAMAAAAGAAAABAAAAAYAAAAAAAAABQAAAAIAAAABAAAABAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAgAAAAMAAAAAAAAAAAAAAAIAAAAAAAAAAQAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAABgAAAAAAAAAFAAAAAAAAAAAAAAAEAAAABQAAAAAAAAAAAAAAAAAAAAIAAAAAAAAABgAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAAAAAACAAAAAwAAAAQAAAAFAAAABgAAAAAAAAABAAAAAwAAAAQAAAAFAAAABgAAAAAAAAABAAAAAgAAAAQAAAAFAAAABgAAAAAAAAABAAAAAgAAAAMAAAAFAAAABgAAAAAAAAABAAAAAgAAAAMAAAAEAAAABgAAAAAAAAABAAAAAgAAAAMAAAAEAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAADAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAACAAAAAgAAAAAAAAAAAAAABgAAAAAAAAADAAAAAgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAUAAAAEAAAAAAAAAAEAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAEAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAUAAAACAAAABAAAAAMAAAAIAAAAAQAAAAcAAAAGAAAACQAAAAAAAAADAAAAAgAAAAIAAAAGAAAACgAAAAsAAAAAAAAAAQAAAAUAAAADAAAADQAAAAEAAAAHAAAABAAAAAwAAAAAAAAABAAAAH8AAAAPAAAACAAAAAMAAAAAAAAADAAAAAUAAAACAAAAEgAAAAoAAAAIAAAAAAAAABAAAAAGAAAADgAAAAsAAAARAAAAAQAAAAkAAAACAAAABwAAABUAAAAJAAAAEwAAAAMAAAANAAAAAQAAAAgAAAAFAAAAFgAAABAAAAAEAAAAAAAAAA8AAAAJAAAAEwAAAA4AAAAUAAAAAQAAAAcAAAAGAAAACgAAAAsAAAAYAAAAFwAAAAUAAAACAAAAEgAAAAsAAAARAAAAFwAAABkAAAACAAAABgAAAAoAAAAMAAAAHAAAAA0AAAAaAAAABAAAAA8AAAADAAAADQAAABoAAAAVAAAAHQAAAAMAAAAMAAAABwAAAA4AAAB/AAAAEQAAABsAAAAJAAAAFAAAAAYAAAAPAAAAFgAAABwAAAAfAAAABAAAAAgAAAAMAAAAEAAAABIAAAAhAAAAHgAAAAgAAAAFAAAAFgAAABEAAAALAAAADgAAAAYAAAAjAAAAGQAAABsAAAASAAAAGAAAAB4AAAAgAAAABQAAAAoAAAAQAAAAEwAAACIAAAAUAAAAJAAAAAcAAAAVAAAACQAAABQAAAAOAAAAEwAAAAkAAAAoAAAAGwAAACQAAAAVAAAAJgAAABMAAAAiAAAADQAAAB0AAAAHAAAAFgAAABAAAAApAAAAIQAAAA8AAAAIAAAAHwAAABcAAAAYAAAACwAAAAoAAAAnAAAAJQAAABkAAAAYAAAAfwAAACAAAAAlAAAACgAAABcAAAASAAAAGQAAABcAAAARAAAACwAAAC0AAAAnAAAAIwAAABoAAAAqAAAAHQAAACsAAAAMAAAAHAAAAA0AAAAbAAAAKAAAACMAAAAuAAAADgAAABQAAAARAAAAHAAAAB8AAAAqAAAALAAAAAwAAAAPAAAAGgAAAB0AAAArAAAAJgAAAC8AAAANAAAAGgAAABUAAAAeAAAAIAAAADAAAAAyAAAAEAAAABIAAAAhAAAAHwAAACkAAAAsAAAANQAAAA8AAAAWAAAAHAAAACAAAAAeAAAAGAAAABIAAAA0AAAAMgAAACUAAAAhAAAAHgAAADEAAAAwAAAAFgAAABAAAAApAAAAIgAAABMAAAAmAAAAFQAAADYAAAAkAAAAMwAAACMAAAAuAAAALQAAADgAAAARAAAAGwAAABkAAAAkAAAAFAAAACIAAAATAAAANwAAACgAAAA2AAAAJQAAACcAAAA0AAAAOQAAABgAAAAXAAAAIAAAACYAAAB/AAAAIgAAADMAAAAdAAAALwAAABUAAAAnAAAAJQAAABkAAAAXAAAAOwAAADkAAAAtAAAAKAAAABsAAAAkAAAAFAAAADwAAAAuAAAANwAAACkAAAAxAAAANQAAAD0AAAAWAAAAIQAAAB8AAAAqAAAAOgAAACsAAAA+AAAAHAAAACwAAAAaAAAAKwAAAD4AAAAvAAAAQAAAABoAAAAqAAAAHQAAACwAAAA1AAAAOgAAAEEAAAAcAAAAHwAAACoAAAAtAAAAJwAAACMAAAAZAAAAPwAAADsAAAA4AAAALgAAADwAAAA4AAAARAAAABsAAAAoAAAAIwAAAC8AAAAmAAAAKwAAAB0AAABFAAAAMwAAAEAAAAAwAAAAMQAAAB4AAAAhAAAAQwAAAEIAAAAyAAAAMQAAAH8AAAA9AAAAQgAAACEAAAAwAAAAKQAAADIAAAAwAAAAIAAAAB4AAABGAAAAQwAAADQAAAAzAAAARQAAADYAAABHAAAAJgAAAC8AAAAiAAAANAAAADkAAABGAAAASgAAACAAAAAlAAAAMgAAADUAAAA9AAAAQQAAAEsAAAAfAAAAKQAAACwAAAA2AAAARwAAADcAAABJAAAAIgAAADMAAAAkAAAANwAAACgAAAA2AAAAJAAAAEgAAAA8AAAASQAAADgAAABEAAAAPwAAAE0AAAAjAAAALgAAAC0AAAA5AAAAOwAAAEoAAABOAAAAJQAAACcAAAA0AAAAOgAAAH8AAAA+AAAATAAAACwAAABBAAAAKgAAADsAAAA/AAAATgAAAE8AAAAnAAAALQAAADkAAAA8AAAASAAAAEQAAABQAAAAKAAAADcAAAAuAAAAPQAAADUAAAAxAAAAKQAAAFEAAABLAAAAQgAAAD4AAAArAAAAOgAAACoAAABSAAAAQAAAAEwAAAA/AAAAfwAAADgAAAAtAAAATwAAADsAAABNAAAAQAAAAC8AAAA+AAAAKwAAAFQAAABFAAAAUgAAAEEAAAA6AAAANQAAACwAAABWAAAATAAAAEsAAABCAAAAQwAAAFEAAABVAAAAMQAAADAAAAA9AAAAQwAAAEIAAAAyAAAAMAAAAFcAAABVAAAARgAAAEQAAAA4AAAAPAAAAC4AAABaAAAATQAAAFAAAABFAAAAMwAAAEAAAAAvAAAAWQAAAEcAAABUAAAARgAAAEMAAAA0AAAAMgAAAFMAAABXAAAASgAAAEcAAABZAAAASQAAAFsAAAAzAAAARQAAADYAAABIAAAAfwAAAEkAAAA3AAAAUAAAADwAAABYAAAASQAAAFsAAABIAAAAWAAAADYAAABHAAAANwAAAEoAAABOAAAAUwAAAFwAAAA0AAAAOQAAAEYAAABLAAAAQQAAAD0AAAA1AAAAXgAAAFYAAABRAAAATAAAAFYAAABSAAAAYAAAADoAAABBAAAAPgAAAE0AAAA/AAAARAAAADgAAABdAAAATwAAAFoAAABOAAAASgAAADsAAAA5AAAAXwAAAFwAAABPAAAATwAAAE4AAAA/AAAAOwAAAF0AAABfAAAATQAAAFAAAABEAAAASAAAADwAAABjAAAAWgAAAFgAAABRAAAAVQAAAF4AAABlAAAAPQAAAEIAAABLAAAAUgAAAGAAAABUAAAAYgAAAD4AAABMAAAAQAAAAFMAAAB/AAAASgAAAEYAAABkAAAAVwAAAFwAAABUAAAARQAAAFIAAABAAAAAYQAAAFkAAABiAAAAVQAAAFcAAABlAAAAZgAAAEIAAABDAAAAUQAAAFYAAABMAAAASwAAAEEAAABoAAAAYAAAAF4AAABXAAAAUwAAAGYAAABkAAAAQwAAAEYAAABVAAAAWAAAAEgAAABbAAAASQAAAGMAAABQAAAAaQAAAFkAAABhAAAAWwAAAGcAAABFAAAAVAAAAEcAAABaAAAATQAAAFAAAABEAAAAagAAAF0AAABjAAAAWwAAAEkAAABZAAAARwAAAGkAAABYAAAAZwAAAFwAAABTAAAATgAAAEoAAABsAAAAZAAAAF8AAABdAAAATwAAAFoAAABNAAAAbQAAAF8AAABqAAAAXgAAAFYAAABRAAAASwAAAGsAAABoAAAAZQAAAF8AAABcAAAATwAAAE4AAABtAAAAbAAAAF0AAABgAAAAaAAAAGIAAABuAAAATAAAAFYAAABSAAAAYQAAAH8AAABiAAAAVAAAAGcAAABZAAAAbwAAAGIAAABuAAAAYQAAAG8AAABSAAAAYAAAAFQAAABjAAAAUAAAAGkAAABYAAAAagAAAFoAAABxAAAAZAAAAGYAAABTAAAAVwAAAGwAAAByAAAAXAAAAGUAAABmAAAAawAAAHAAAABRAAAAVQAAAF4AAABmAAAAZQAAAFcAAABVAAAAcgAAAHAAAABkAAAAZwAAAFsAAABhAAAAWQAAAHQAAABpAAAAbwAAAGgAAABrAAAAbgAAAHMAAABWAAAAXgAAAGAAAABpAAAAWAAAAGcAAABbAAAAcQAAAGMAAAB0AAAAagAAAF0AAABjAAAAWgAAAHUAAABtAAAAcQAAAGsAAAB/AAAAZQAAAF4AAABzAAAAaAAAAHAAAABsAAAAZAAAAF8AAABcAAAAdgAAAHIAAABtAAAAbQAAAGwAAABdAAAAXwAAAHUAAAB2AAAAagAAAG4AAABiAAAAaAAAAGAAAAB3AAAAbwAAAHMAAABvAAAAYQAAAG4AAABiAAAAdAAAAGcAAAB3AAAAcAAAAGsAAABmAAAAZQAAAHgAAABzAAAAcgAAAHEAAABjAAAAdAAAAGkAAAB1AAAAagAAAHkAAAByAAAAcAAAAGQAAABmAAAAdgAAAHgAAABsAAAAcwAAAG4AAABrAAAAaAAAAHgAAAB3AAAAcAAAAHQAAABnAAAAdwAAAG8AAABxAAAAaQAAAHkAAAB1AAAAfwAAAG0AAAB2AAAAcQAAAHkAAABqAAAAdgAAAHgAAABsAAAAcgAAAHUAAAB5AAAAbQAAAHcAAABvAAAAcwAAAG4AAAB5AAAAdAAAAHgAAAB4AAAAcwAAAHIAAABwAAAAeQAAAHcAAAB2AAAAeQAAAHQAAAB4AAAAdwAAAHUAAABxAAAAdgAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAEAAAAFAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAIAAAAFAAAAAQAAAAAAAAD/////AQAAAAAAAAADAAAABAAAAAIAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAUAAAABAAAAAAAAAAAAAAABAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAAFAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAQAAAAFAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAADAAAAAAAAAAAAAAABAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAABAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAADAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAADAAAABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAAAAAAAAAAABAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAMAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAADAAAAAQAAAAAAAAABAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAMAAAABAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAMAAAABAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAADAAAABQAAAAEAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAEAAAABQAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAgAAAAUAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAMAAAABAAAAAAAAAAEAAAAAAAAABQAAAAAAAAAAAAAABQAAAAUAAAAAAAAAAAAAAP////8BAAAAAAAAAAMAAAAEAAAAAgAAAAAAAAAAAAAAAQAAAAAAAAAAAAAABQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAABQAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAQAAAP//////////AQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAMAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAIAAAAAAAAAAAAAAAEAAAACAAAABgAAAAQAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAABwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAoAAAACAAAAAAAAAAAAAAABAAAAAQAAAAUAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAIAAAAAAAAAAAAAAAEAAAADAAAABwAAAAYAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAHAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAABAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAOAAAAAgAAAAAAAAAAAAAAAQAAAAAAAAAJAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAwAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAgAAAAAAAAAAAAAAAQAAAAQAAAAIAAAACgAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAsAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAJAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAACAAAAAAAAAAAAAAABAAAACwAAAA8AAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA4AAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAgAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAFAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAACAAAAAAAAAAAAAAABAAAADAAAABAAAAAMAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAPAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAEAAAAKAAAAEwAAAAgAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAJAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAgAAAAAAAAAAAAAAAQAAAA0AAAARAAAADQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAABEAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAATAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAABMAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQAAAAIAAAAAAAAAAAAAAAEAAAAOAAAAEgAAAA8AAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAPAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAABIAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAATAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABMAAAACAAAAAAAAAAAAAAABAAAA//////////8TAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABMAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAASAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABIAAAAAAAAAGAAAAAAAAAAhAAAAAAAAAB4AAAAAAAAAIAAAAAMAAAAxAAAAAQAAADAAAAADAAAAMgAAAAMAAAAIAAAAAAAAAAUAAAAFAAAACgAAAAUAAAAWAAAAAAAAABAAAAAAAAAAEgAAAAAAAAApAAAAAQAAACEAAAAAAAAAHgAAAAAAAAAEAAAAAAAAAAAAAAAFAAAAAgAAAAUAAAAPAAAAAQAAAAgAAAAAAAAABQAAAAUAAAAfAAAAAQAAABYAAAAAAAAAEAAAAAAAAAACAAAAAAAAAAYAAAAAAAAADgAAAAAAAAAKAAAAAAAAAAsAAAAAAAAAEQAAAAMAAAAYAAAAAQAAABcAAAADAAAAGQAAAAMAAAAAAAAAAAAAAAEAAAAFAAAACQAAAAUAAAAFAAAAAAAAAAIAAAAAAAAABgAAAAAAAAASAAAAAQAAAAoAAAAAAAAACwAAAAAAAAAEAAAAAQAAAAMAAAAFAAAABwAAAAUAAAAIAAAAAQAAAAAAAAAAAAAAAQAAAAUAAAAQAAAAAQAAAAUAAAAAAAAAAgAAAAAAAAAHAAAAAAAAABUAAAAAAAAAJgAAAAAAAAAJAAAAAAAAABMAAAAAAAAAIgAAAAMAAAAOAAAAAQAAABQAAAADAAAAJAAAAAMAAAADAAAAAAAAAA0AAAAFAAAAHQAAAAUAAAABAAAAAAAAAAcAAAAAAAAAFQAAAAAAAAAGAAAAAQAAAAkAAAAAAAAAEwAAAAAAAAAEAAAAAgAAAAwAAAAFAAAAGgAAAAUAAAAAAAAAAQAAAAMAAAAAAAAADQAAAAUAAAACAAAAAQAAAAEAAAAAAAAABwAAAAAAAAAaAAAAAAAAACoAAAAAAAAAOgAAAAAAAAAdAAAAAAAAACsAAAAAAAAAPgAAAAMAAAAmAAAAAQAAAC8AAAADAAAAQAAAAAMAAAAMAAAAAAAAABwAAAAFAAAALAAAAAUAAAANAAAAAAAAABoAAAAAAAAAKgAAAAAAAAAVAAAAAQAAAB0AAAAAAAAAKwAAAAAAAAAEAAAAAwAAAA8AAAAFAAAAHwAAAAUAAAADAAAAAQAAAAwAAAAAAAAAHAAAAAUAAAAHAAAAAQAAAA0AAAAAAAAAGgAAAAAAAAAfAAAAAAAAACkAAAAAAAAAMQAAAAAAAAAsAAAAAAAAADUAAAAAAAAAPQAAAAMAAAA6AAAAAQAAAEEAAAADAAAASwAAAAMAAAAPAAAAAAAAABYAAAAFAAAAIQAAAAUAAAAcAAAAAAAAAB8AAAAAAAAAKQAAAAAAAAAqAAAAAQAAACwAAAAAAAAANQAAAAAAAAAEAAAABAAAAAgAAAAFAAAAEAAAAAUAAAAMAAAAAQAAAA8AAAAAAAAAFgAAAAUAAAAaAAAAAQAAABwAAAAAAAAAHwAAAAAAAAAyAAAAAAAAADAAAAAAAAAAMQAAAAMAAAAgAAAAAAAAAB4AAAADAAAAIQAAAAMAAAAYAAAAAwAAABIAAAADAAAAEAAAAAMAAABGAAAAAAAAAEMAAAAAAAAAQgAAAAMAAAA0AAAAAwAAADIAAAAAAAAAMAAAAAAAAAAlAAAAAwAAACAAAAAAAAAAHgAAAAMAAABTAAAAAAAAAFcAAAADAAAAVQAAAAMAAABKAAAAAwAAAEYAAAAAAAAAQwAAAAAAAAA5AAAAAQAAADQAAAADAAAAMgAAAAAAAAAZAAAAAAAAABcAAAAAAAAAGAAAAAMAAAARAAAAAAAAAAsAAAADAAAACgAAAAMAAAAOAAAAAwAAAAYAAAADAAAAAgAAAAMAAAAtAAAAAAAAACcAAAAAAAAAJQAAAAMAAAAjAAAAAwAAABkAAAAAAAAAFwAAAAAAAAAbAAAAAwAAABEAAAAAAAAACwAAAAMAAAA/AAAAAAAAADsAAAADAAAAOQAAAAMAAAA4AAAAAwAAAC0AAAAAAAAAJwAAAAAAAAAuAAAAAwAAACMAAAADAAAAGQAAAAAAAAAkAAAAAAAAABQAAAAAAAAADgAAAAMAAAAiAAAAAAAAABMAAAADAAAACQAAAAMAAAAmAAAAAwAAABUAAAADAAAABwAAAAMAAAA3AAAAAAAAACgAAAAAAAAAGwAAAAMAAAA2AAAAAwAAACQAAAAAAAAAFAAAAAAAAAAzAAAAAwAAACIAAAAAAAAAEwAAAAMAAABIAAAAAAAAADwAAAADAAAALgAAAAMAAABJAAAAAwAAADcAAAAAAAAAKAAAAAAAAABHAAAAAwAAADYAAAADAAAAJAAAAAAAAABAAAAAAAAAAC8AAAAAAAAAJgAAAAMAAAA+AAAAAAAAACsAAAADAAAAHQAAAAMAAAA6AAAAAwAAACoAAAADAAAAGgAAAAMAAABUAAAAAAAAAEUAAAAAAAAAMwAAAAMAAABSAAAAAwAAAEAAAAAAAAAALwAAAAAAAABMAAAAAwAAAD4AAAAAAAAAKwAAAAMAAABhAAAAAAAAAFkAAAADAAAARwAAAAMAAABiAAAAAwAAAFQAAAAAAAAARQAAAAAAAABgAAAAAwAAAFIAAAADAAAAQAAAAAAAAABLAAAAAAAAAEEAAAAAAAAAOgAAAAMAAAA9AAAAAAAAADUAAAADAAAALAAAAAMAAAAxAAAAAwAAACkAAAADAAAAHwAAAAMAAABeAAAAAAAAAFYAAAAAAAAATAAAAAMAAABRAAAAAwAAAEsAAAAAAAAAQQAAAAAAAABCAAAAAwAAAD0AAAAAAAAANQAAAAMAAABrAAAAAAAAAGgAAAADAAAAYAAAAAMAAABlAAAAAwAAAF4AAAAAAAAAVgAAAAAAAABVAAAAAwAAAFEAAAADAAAASwAAAAAAAAA5AAAAAAAAADsAAAAAAAAAPwAAAAMAAABKAAAAAAAAAE4AAAADAAAATwAAAAMAAABTAAAAAwAAAFwAAAADAAAAXwAAAAMAAAAlAAAAAAAAACcAAAADAAAALQAAAAMAAAA0AAAAAAAAADkAAAAAAAAAOwAAAAAAAABGAAAAAwAAAEoAAAAAAAAATgAAAAMAAAAYAAAAAAAAABcAAAADAAAAGQAAAAMAAAAgAAAAAwAAACUAAAAAAAAAJwAAAAMAAAAyAAAAAwAAADQAAAAAAAAAOQAAAAAAAAAuAAAAAAAAADwAAAAAAAAASAAAAAMAAAA4AAAAAAAAAEQAAAADAAAAUAAAAAMAAAA/AAAAAwAAAE0AAAADAAAAWgAAAAMAAAAbAAAAAAAAACgAAAADAAAANwAAAAMAAAAjAAAAAAAAAC4AAAAAAAAAPAAAAAAAAAAtAAAAAwAAADgAAAAAAAAARAAAAAMAAAAOAAAAAAAAABQAAAADAAAAJAAAAAMAAAARAAAAAwAAABsAAAAAAAAAKAAAAAMAAAAZAAAAAwAAACMAAAAAAAAALgAAAAAAAABHAAAAAAAAAFkAAAAAAAAAYQAAAAMAAABJAAAAAAAAAFsAAAADAAAAZwAAAAMAAABIAAAAAwAAAFgAAAADAAAAaQAAAAMAAAAzAAAAAAAAAEUAAAADAAAAVAAAAAMAAAA2AAAAAAAAAEcAAAAAAAAAWQAAAAAAAAA3AAAAAwAAAEkAAAAAAAAAWwAAAAMAAAAmAAAAAAAAAC8AAAADAAAAQAAAAAMAAAAiAAAAAwAAADMAAAAAAAAARQAAAAMAAAAkAAAAAwAAADYAAAAAAAAARwAAAAAAAABgAAAAAAAAAGgAAAAAAAAAawAAAAMAAABiAAAAAAAAAG4AAAADAAAAcwAAAAMAAABhAAAAAwAAAG8AAAADAAAAdwAAAAMAAABMAAAAAAAAAFYAAAADAAAAXgAAAAMAAABSAAAAAAAAAGAAAAAAAAAAaAAAAAAAAABUAAAAAwAAAGIAAAAAAAAAbgAAAAMAAAA6AAAAAAAAAEEAAAADAAAASwAAAAMAAAA+AAAAAwAAAEwAAAAAAAAAVgAAAAMAAABAAAAAAwAAAFIAAAAAAAAAYAAAAAAAAABVAAAAAAAAAFcAAAAAAAAAUwAAAAMAAABlAAAAAAAAAGYAAAADAAAAZAAAAAMAAABrAAAAAwAAAHAAAAADAAAAcgAAAAMAAABCAAAAAAAAAEMAAAADAAAARgAAAAMAAABRAAAAAAAAAFUAAAAAAAAAVwAAAAAAAABeAAAAAwAAAGUAAAAAAAAAZgAAAAMAAAAxAAAAAAAAADAAAAADAAAAMgAAAAMAAAA9AAAAAwAAAEIAAAAAAAAAQwAAAAMAAABLAAAAAwAAAFEAAAAAAAAAVQAAAAAAAABfAAAAAAAAAFwAAAAAAAAAUwAAAAAAAABPAAAAAAAAAE4AAAAAAAAASgAAAAMAAAA/AAAAAQAAADsAAAADAAAAOQAAAAMAAABtAAAAAAAAAGwAAAAAAAAAZAAAAAUAAABdAAAAAQAAAF8AAAAAAAAAXAAAAAAAAABNAAAAAQAAAE8AAAAAAAAATgAAAAAAAAB1AAAABAAAAHYAAAAFAAAAcgAAAAUAAABqAAAAAQAAAG0AAAAAAAAAbAAAAAAAAABaAAAAAQAAAF0AAAABAAAAXwAAAAAAAABaAAAAAAAAAE0AAAAAAAAAPwAAAAAAAABQAAAAAAAAAEQAAAAAAAAAOAAAAAMAAABIAAAAAQAAADwAAAADAAAALgAAAAMAAABqAAAAAAAAAF0AAAAAAAAATwAAAAUAAABjAAAAAQAAAFoAAAAAAAAATQAAAAAAAABYAAAAAQAAAFAAAAAAAAAARAAAAAAAAAB1AAAAAwAAAG0AAAAFAAAAXwAAAAUAAABxAAAAAQAAAGoAAAAAAAAAXQAAAAAAAABpAAAAAQAAAGMAAAABAAAAWgAAAAAAAABpAAAAAAAAAFgAAAAAAAAASAAAAAAAAABnAAAAAAAAAFsAAAAAAAAASQAAAAMAAABhAAAAAQAAAFkAAAADAAAARwAAAAMAAABxAAAAAAAAAGMAAAAAAAAAUAAAAAUAAAB0AAAAAQAAAGkAAAAAAAAAWAAAAAAAAABvAAAAAQAAAGcAAAAAAAAAWwAAAAAAAAB1AAAAAgAAAGoAAAAFAAAAWgAAAAUAAAB5AAAAAQAAAHEAAAAAAAAAYwAAAAAAAAB3AAAAAQAAAHQAAAABAAAAaQAAAAAAAAB3AAAAAAAAAG8AAAAAAAAAYQAAAAAAAABzAAAAAAAAAG4AAAAAAAAAYgAAAAMAAABrAAAAAQAAAGgAAAADAAAAYAAAAAMAAAB5AAAAAAAAAHQAAAAAAAAAZwAAAAUAAAB4AAAAAQAAAHcAAAAAAAAAbwAAAAAAAABwAAAAAQAAAHMAAAAAAAAAbgAAAAAAAAB1AAAAAQAAAHEAAAAFAAAAaQAAAAUAAAB2AAAAAQAAAHkAAAAAAAAAdAAAAAAAAAByAAAAAQAAAHgAAAABAAAAdwAAAAAAAAByAAAAAAAAAHAAAAAAAAAAawAAAAAAAABkAAAAAAAAAGYAAAAAAAAAZQAAAAMAAABTAAAAAQAAAFcAAAADAAAAVQAAAAMAAAB2AAAAAAAAAHgAAAAAAAAAcwAAAAUAAABsAAAAAQAAAHIAAAAAAAAAcAAAAAAAAABcAAAAAQAAAGQAAAAAAAAAZgAAAAAAAAB1AAAAAAAAAHkAAAAFAAAAdwAAAAUAAABtAAAAAQAAAHYAAAAAAAAAeAAAAAAAAABfAAAAAQAAAGwAAAABAAAAcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAEAAAABAAAAAAAAAAAAAAABAAAAAAAAAAEAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAB+ogX28rbpPxqumpJv+fM/165tC4ns9D+XaEnTqUsEQFrOtNlC4PA/3U+0XG6P9b9TdUUBxTTjP4PUp8ex1ty/B1rD/EN43z+lcDi6LLrZP/a45NWEHMY/oJ5ijLDZ+j/xw3rjxWPjP2B8A46ioQdAotff3wla2z+FMSpA1jj+v6b5Y1mtPbS/cIu8K0F457/2esiyJpDNv98k5Ts2NeA/pvljWa09tD88ClUJ60MDQPZ6yLImkM0/4ONKxa0UBcD2uOTVhBzGv5G7JRxGave/8cN648Vj47+HCwtkjAXIv6LX398JWtu/qyheaCAL9D9TdUUBxTTjv4gyTxslhwVAB1rD/EN4378EH/28teoFwH6iBfbytum/F6ztFYdK/r/Xrm0Liez0vwcS6wNGWeO/Ws602ULg8L9TCtRLiLT8P8pi5RexJsw/BlIKPVwR5T95Wyu0/QjnP5PjoT7YYcu/mBhKZ6zrwj8wRYS7NebuP3qW6geh+Ls/SLrixebL3r+pcyymN9XrPwmkNHp7xec/GWNMZVAA17+82s+x2BLiPwn2ytbJ9ek/LgEH1sMS1j8yp/2LhTfeP+SnWwtQBbu/d38gkp5X7z8ytsuHaADGPzUYObdf1+m/7IauECWhwz+cjSACjzniP76Z+wUhN9K/1+GEKzup67+/GYr/04baPw6idWOvsuc/ZedTWsRa5b/EJQOuRzi0v/OncYhHPes/h49PixY53j+i8wWfC03Nvw2idWOvsue/ZedTWsRa5T/EJQOuRzi0P/KncYhHPeu/iY9PixY53r+i8wWfC03NP9anWwtQBbs/d38gkp5X778ytsuHaADGvzUYObdf1+k/74auECWhw7+cjSACjzniv8CZ+wUhN9I/1uGEKzup6z+/GYr/04bavwmkNHp7xee/F2NMZVAA1z+82s+x2BLivwr2ytbJ9em/KwEH1sMS1r8yp/2LhTfev81i5RexJsy/BlIKPVwR5b95Wyu0/Qjnv5DjoT7YYcs/nBhKZ6zrwr8wRYS7Nebuv3OW6geh+Lu/SLrixebL3j+pcyymN9Xrv8rHIFfWehZAMBwUdlo0DECTUc17EOb2PxpVB1SWChdAzjbhb9pTDUDQhmdvECX5P9FlMKCC9+g/IIAzjELgE0DajDngMv8GQFhWDmDPjNs/y1guLh96EkAxPi8k7DIEQJCc4URlhRhA3eLKKLwkEECqpNAyTBD/P6xpjXcDiwVAFtl//cQm4z+Ibt3XKiYTQM7mCLUb3QdAoM1t8yVv7D8aLZv2Nk8UQEAJPV5nQwxAtSsfTCoE9z9TPjXLXIIWQBVanC5W9AtAYM3d7Adm9j++5mQz1FoWQBUThyaVBghAwH5muQsV7T89Q1qv82MUQJoWGOfNuBdAzrkClkmwDkDQjKq77t37Py+g0dtitsE/ZwAMTwVPEUBojepluNwBQGYbtuW+t9w/HNWIJs6MEkDTNuQUSlgEQKxktPP5TcQ/ixbLB8JjEUCwuWjXMQYCQAS/R09FkRdAowpiZjhhDkB7LmlczD/7P01iQmhhsAVAnrtTwDy84z/Z6jfQ2TgTQChOCXMnWwpAhrW3daoz8z/HYJvVPI4VQLT3ik5FcA5Angi7LOZd+z+NNVzDy5gXQBXdvVTFUA1AYNMgOeYe+T8+qHXGCwkXQKQTOKwa5AJA8gFVoEMW0T+FwzJyttIRQAEAAAD/////BwAAAP////8xAAAA/////1cBAAD/////YQkAAP////+nQQAA/////5HLAQD/////95AMAP/////B9lcAAAAAAAAAAAAAAAAAAgAAAP////8OAAAA/////2IAAAD/////rgIAAP/////CEgAA/////06DAAD/////IpcDAP/////uIRkA/////4LtrwAAAAAAAAAAAAAAAAAAAAAAAgAAAP//////////AQAAAAMAAAD//////////////////////////////////////////////////////////////////////////wEAAAAAAAAAAgAAAP///////////////wMAAAD//////////////////////////////////////////////////////////////////////////wEAAAAAAAAAAgAAAP///////////////wMAAAD//////////////////////////////////////////////////////////////////////////wEAAAAAAAAAAgAAAP///////////////wMAAAD//////////////////////////////////////////////////////////wIAAAD//////////wEAAAAAAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA/////////////////////wEAAAD///////////////8CAAAA////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD///////////////////////////////8CAAAA////////////////AQAAAP////////////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAAAQAAAP//////////AgAAAP//////////////////////////////////////////////////////////AwAAAP///////////////wIAAAAAAAAAAQAAAP//////////////////////////////////////////////////////////////////////////AwAAAP///////////////wIAAAAAAAAAAQAAAP//////////////////////////////////////////////////////////////////////////AwAAAP///////////////wIAAAAAAAAAAQAAAP//////////////////////////////////////////////////////////////////////////AwAAAAEAAAD//////////wIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAgAAAAAAAAACAAAAAQAAAAEAAAACAAAAAgAAAAAAAAAFAAAABQAAAAAAAAACAAAAAgAAAAMAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAIAAAABAAAAAgAAAAIAAAACAAAAAAAAAAUAAAAGAAAAAAAAAAIAAAACAAAAAwAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAAAAAAAAgAAAAEAAAADAAAAAgAAAAIAAAAAAAAABQAAAAcAAAAAAAAAAgAAAAIAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAgAAAAAAAAACAAAAAQAAAAQAAAACAAAAAgAAAAAAAAAFAAAACAAAAAAAAAACAAAAAgAAAAMAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAACAAAAAAAAAAIAAAABAAAAAAAAAAIAAAACAAAAAAAAAAUAAAAJAAAAAAAAAAIAAAACAAAAAwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAIAAAACAAAAAAAAAAMAAAAOAAAAAgAAAAAAAAACAAAAAwAAAAAAAAAAAAAAAgAAAAIAAAADAAAABgAAAAAAAAAAAAAAAAAAAAAAAAALAAAAAgAAAAIAAAAAAAAAAwAAAAoAAAACAAAAAAAAAAIAAAADAAAAAQAAAAAAAAACAAAAAgAAAAMAAAAHAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAACAAAAAgAAAAAAAAADAAAACwAAAAIAAAAAAAAAAgAAAAMAAAACAAAAAAAAAAIAAAACAAAAAwAAAAgAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAIAAAACAAAAAAAAAAMAAAAMAAAAAgAAAAAAAAACAAAAAwAAAAMAAAAAAAAAAgAAAAIAAAADAAAACQAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAgAAAAIAAAAAAAAAAwAAAA0AAAACAAAAAAAAAAIAAAADAAAABAAAAAAAAAACAAAAAgAAAAMAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAACAAAAAgAAAAAAAAADAAAABgAAAAIAAAAAAAAAAgAAAAMAAAAPAAAAAAAAAAIAAAACAAAAAwAAAAsAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAIAAAACAAAAAAAAAAMAAAAHAAAAAgAAAAAAAAACAAAAAwAAABAAAAAAAAAAAgAAAAIAAAADAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAgAAAAIAAAAAAAAAAwAAAAgAAAACAAAAAAAAAAIAAAADAAAAEQAAAAAAAAACAAAAAgAAAAMAAAANAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAACAAAAAgAAAAAAAAADAAAACQAAAAIAAAAAAAAAAgAAAAMAAAASAAAAAAAAAAIAAAACAAAAAwAAAA4AAAAAAAAAAAAAAAAAAAAAAAAACQAAAAIAAAACAAAAAAAAAAMAAAAFAAAAAgAAAAAAAAACAAAAAwAAABMAAAAAAAAAAgAAAAIAAAADAAAADwAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAgAAAAAAAAACAAAAAQAAABMAAAACAAAAAgAAAAAAAAAFAAAACgAAAAAAAAACAAAAAgAAAAMAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABEAAAACAAAAAAAAAAIAAAABAAAADwAAAAIAAAACAAAAAAAAAAUAAAALAAAAAAAAAAIAAAACAAAAAwAAABEAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAIAAAAAAAAAAgAAAAEAAAAQAAAAAgAAAAIAAAAAAAAABQAAAAwAAAAAAAAAAgAAAAIAAAADAAAAEgAAAAAAAAAAAAAAAAAAAAAAAAATAAAAAgAAAAAAAAACAAAAAQAAABEAAAACAAAAAgAAAAAAAAAFAAAADQAAAAAAAAACAAAAAgAAAAMAAAATAAAAAAAAAAAAAAAAAAAAAAAAAA8AAAACAAAAAAAAAAIAAAABAAAAEgAAAAIAAAACAAAAAAAAAAUAAAAOAAAAAAAAAAIAAAACAAAAAwAAAAIAAAABAAAAAAAAAAEAAAACAAAAAAAAAAAAAAACAAAAAQAAAAAAAAABAAAAAgAAAAEAAAAAAAAAAgAAAAAAAAAFAAAABAAAAAAAAAABAAAABQAAAAAAAAAAAAAABQAAAAQAAAAAAAAAAQAAAAUAAAAEAAAAAAAAAAUAAAAAAAAAAgAAAAEAAAAAAAAAAQAAAAIAAAAAAAAAAAAAAAIAAAABAAAAAAAAAAEAAAACAAAAAQAAAAAAAAACAAAAAgAAAAAAAAABAAAAAAAAAAAAAAAFAAAABAAAAAAAAAABAAAABQAAAAAAAAAAAAAABQAAAAQAAAAAAAAAAQAAAAUAAAAEAAAAAAAAAAUAAAAFAAAAAAAAAAEAAAAAAAAAAAAAAMuhRbbsNlBBYqHW9OmHIkF9XBuqnS31QAK37uYhNMhAOSo3UUupm0DC+6pc6JxvQHV9eseEEEJAzURsCyqlFEB8BQ4NMJjnPyy3tBoS97o/xawXQznRjj89J2K2CZxhP6vX43RIIDQ/S8isgygEBz+LvFHQkmzaPjFFFO7wMq4+AADMLkTtjkIAAOgkJqxhQgAAU7B0MjRCAADwpBcVB0IAAACYP2HaQQAAAIn/Ja5BzczM4Eg6gUHNzMxMU7BTQTMzMzNfgCZBAAAAAEi3+UAAAAAAwGPNQDMzMzMzy6BAmpmZmZkxc0AzMzMzM/NFQDMzMzMzMxlAzczMzMzM7D+ygXSx2U6RQKimJOvQKnpA23hmONTHY0A/AGcxyudNQNb3K647mzZA+S56rrwWIUAm4kUQ+9UJQKre9hGzh/M/BLvoy9WG3T+LmqMf8VHGP2m3nYNV37A/gbFHcyeCmT+cBPWBckiDP61tZACjKW0/q2RbYVUYVj8uDypVyLNAP6jGS5cA5zBBwcqhBdCNGUEGEhQ/JVEDQT6WPnRbNO1AB/AWSJgT1kDfUWNCNLDAQNk+5C33OqlAchWL34QSk0DKvtDIrNV8QNF0G3kFzGVASSeWhBl6UED+/0mNGuk4QGjA/dm/1CJALPLPMql6DEDSHoDrwpP1P2jouzWST+A/egAAAAAAAABKAwAAAAAAAPoWAAAAAAAAyqAAAAAAAAB6ZQQAAAAAAErGHgAAAAAA+mvXAAAAAADK8+MFAAAAAHqqOykAAAAASqmhIAEAAAD6oGvkBwAAAMpm8T43AAAAes+ZuIIBAABKrDQMkwoAAPq1cFUFSgAAyvkUViUGAgAAAAAAAwAAAAYAAAACAAAABQAAAAEAAAAEAAAAAAAAAAAAAAAFAAAAAwAAAAEAAAAGAAAABAAAAAIAAAAAAAAAAAAAAP////8AAAAAAAAAAAAAAAAAAAAAAAAAAP////////////////////////////////////8AAAAA/////wAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAP////8AAAAAAAAAAAEAAAABAAAAAAAAAAAAAAD/////AAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAA/////wUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAP////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////AAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////////////////////////////wAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAUAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////////////////////////////8AAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAQAAAAEAAAAAAAAAAQAAAAAAAAAFAAAAAQAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAEAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAAAAAAABAAEAAAEBAAAAAAABAAAAAQAAAAEAAQAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAACAAAAAQAAAAMAAAAOAAAABgAAAAsAAAACAAAABwAAAAEAAAAYAAAABQAAAAoAAAABAAAABgAAAAAAAAAmAAAABwAAAAwAAAADAAAACAAAAAIAAAAxAAAACQAAAA4AAAAAAAAABQAAAAQAAAA6AAAACAAAAA0AAAAEAAAACQAAAAMAAAA/AAAACwAAAAYAAAAPAAAACgAAABAAAABIAAAADAAAAAcAAAAQAAAACwAAABEAAABTAAAACgAAAAUAAAATAAAADgAAAA8AAABhAAAADQAAAAgAAAARAAAADAAAABIAAABrAAAADgAAAAkAAAASAAAADQAAABMAAAB1AAAADwAAABMAAAARAAAAEgAAABAAAAAHAAAABwAAAAEAAAACAAAABAAAAAMAAAAAAAAAAAAAAAcAAAADAAAAAQAAAAIAAAAFAAAABAAAAAAAAAAAAAAAYWxnb3MuYwBfcG9seWZpbGxJbnRlcm5hbABhZGphY2VudEZhY2VEaXJbdG1wRmlqay5mYWNlXVtmaWprLmZhY2VdID09IEtJAGZhY2VpamsuYwBfZmFjZUlqa1BlbnRUb0dlb0JvdW5kYXJ5AGFkamFjZW50RmFjZURpcltjZW50ZXJJSksuZmFjZV1bZmFjZTJdID09IEtJAF9mYWNlSWprVG9HZW9Cb3VuZGFyeQBwb2x5Z29uLT5uZXh0ID09IE5VTEwAbGlua2VkR2VvLmMAYWRkTmV3TGlua2VkUG9seWdvbgBuZXh0ICE9IE5VTEwAbG9vcCAhPSBOVUxMAGFkZE5ld0xpbmtlZExvb3AAcG9seWdvbi0+Zmlyc3QgPT0gTlVMTABhZGRMaW5rZWRMb29wAGNvb3JkICE9IE5VTEwAYWRkTGlua2VkQ29vcmQAbG9vcC0+Zmlyc3QgPT0gTlVMTABpbm5lckxvb3BzICE9IE5VTEwAbm9ybWFsaXplTXVsdGlQb2x5Z29uAGJib3hlcyAhPSBOVUxMAGNhbmRpZGF0ZXMgIT0gTlVMTABmaW5kUG9seWdvbkZvckhvbGUAY2FuZGlkYXRlQkJveGVzICE9IE5VTEwAcmV2RGlyICE9IElOVkFMSURfRElHSVQAbG9jYWxpai5jAGgzVG9Mb2NhbElqawBiYXNlQ2VsbCAhPSBvcmlnaW5CYXNlQ2VsbAAhKG9yaWdpbk9uUGVudCAmJiBpbmRleE9uUGVudCkAcGVudGFnb25Sb3RhdGlvbnMgPj0gMABkaXJlY3Rpb25Sb3RhdGlvbnMgPj0gMABiYXNlQ2VsbCA9PSBvcmlnaW5CYXNlQ2VsbABiYXNlQ2VsbCAhPSBJTlZBTElEX0JBU0VfQ0VMTABsb2NhbElqa1RvSDMAIV9pc0Jhc2VDZWxsUGVudGFnb24oYmFzZUNlbGwpAGJhc2VDZWxsUm90YXRpb25zID49IDAAd2l0aGluUGVudGFnb25Sb3RhdGlvbnMgPj0gMABncmFwaC0+YnVja2V0cyAhPSBOVUxMAHZlcnRleEdyYXBoLmMAaW5pdFZlcnRleEdyYXBoAG5vZGUgIT0gTlVMTABhZGRWZXJ0ZXhOb2Rl";var W="function"==typeof atob?atob:function(t){var e,i,n,r,s,o,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l="",c=0;t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{n=a.indexOf(t.charAt(c++)),e=(15&(r=a.indexOf(t.charAt(c++))))<<4|(s=a.indexOf(t.charAt(c++)))>>2,i=(3&s)<<6|(o=a.indexOf(t.charAt(c++))),l+=String.fromCharCode(n<<2|r>>4),64!==s&&(l+=String.fromCharCode(e)),64!==o&&(l+=String.fromCharCode(i))}while(c<t.length);return l};function Z(t){if(z(t))return function(t){try{for(var e=W(t),i=new Uint8Array(e.length),n=0;n<e.length;++n)i[n]=e.charCodeAt(n);return i}catch(r){throw new Error("Converting base64 string to bytes failed.")}}(t.slice(j.length))}var q,Y,Q=function(t,e,i){var n=new t.Int8Array(i),r=new t.Int32Array(i),s=(new t.Uint8Array(i),new t.Float32Array(i),new t.Float64Array(i)),o=0|e.p,a=t.Math.floor,l=t.Math.abs,c=t.Math.sqrt,h=t.Math.pow,u=t.Math.cos,d=t.Math.sin,p=t.Math.tan,f=t.Math.acos,m=t.Math.asin,g=t.Math.atan,A=t.Math.atan2,b=t.Math.ceil,v=t.Math.imul,_=t.Math.min,y=t.Math.clz32,w=e.b,x=e.c,C=e.d,S=e.e,k=e.f,E=e.g,D=e.h,I=e.i,P=24048;function O(t,e,i,n){var r,s;0|M(t|=0,e|=0,i|=0,n|=0,0)&&(De(0|n,0,(s=1+(0|v(3*i|0,i+1|0))|0)<<3|0),(r=0|ve(s,4))&&(T(t,e,i,n,r,s,0),be(r)))}function M(t,e,i,n,s){e|=0,i|=0,s|=0;var o,a,l=0,c=0,h=0,u=0,d=0,p=0,f=0;if(o=P,P=P+16|0,a=o,r[(l=n|=0)>>2]=t|=0,r[l+4>>2]=e,(l=0!=(0|s))&&(r[s>>2]=0),0|Rt(t,e))return P=o,1;r[a>>2]=0;t:do{if((0|i)>=1)if(l)for(d=0,p=1,f=1,c=0,l=t;;){if(!(c|d)){if(0==(0|(l=0|R(l,e,4,a)))&0==(0|(e=0|x()))){l=2;break t}if(0|Rt(l,e)){l=1;break t}}if(0==(0|(l=0|R(l,e,0|r[16+(d<<2)>>2],a)))&0==(0|(e=0|x()))){l=2;break t}if(r[(t=n+(f<<3)|0)>>2]=l,r[t+4>>2]=e,r[s+(f<<2)>>2]=p,t=(0|(c=c+1|0))==(0|p),u=6==(0|(h=d+1|0)),0|Rt(l,e)){l=1;break t}if((0|(p=p+(u&t&1)|0))>(0|i)){l=0;break}d=t?u?0:h:d,f=f+1|0,c=t?0:c}else for(d=0,p=1,f=1,c=0,l=t;;){if(!(c|d)){if(0==(0|(l=0|R(l,e,4,a)))&0==(0|(e=0|x()))){l=2;break t}if(0|Rt(l,e)){l=1;break t}}if(0==(0|(l=0|R(l,e,0|r[16+(d<<2)>>2],a)))&0==(0|(e=0|x()))){l=2;break t}if(r[(t=n+(f<<3)|0)>>2]=l,r[t+4>>2]=e,t=(0|(c=c+1|0))==(0|p),u=6==(0|(h=d+1|0)),0|Rt(l,e)){l=1;break t}if((0|(p=p+(u&t&1)|0))>(0|i)){l=0;break}d=t?u?0:h:d,f=f+1|0,c=t?0:c}else l=0}while(0);return P=o,0|l}function T(t,e,i,n,s,o,a){i|=0,n|=0,s|=0,o|=0,a|=0;var l,c,h=0,u=0,d=0,p=0,f=0;if(c=P,P=P+16|0,l=c,0==(0|(t|=0))&0==(0|(e|=0)))P=c;else{if(h=0|we(0|t,0|e,0|o,((0|o)<0)<<31>>31|0),x(),!(0==(0|(f=0|r[(p=u=n+(h<<3)|0)>>2]))&0==(0|(p=0|r[p+4>>2]))|(d=(0|f)==(0|t)&(0|p)==(0|e))))do{d=(0|(p=0|r[(f=u=n+((h=(h+1|0)%(0|o)|0)<<3)|0)>>2]))==(0|t)&(0|(f=0|r[f+4>>2]))==(0|e)}while(!(0==(0|p)&0==(0|f)|d));h=s+(h<<2)|0,d&&(0|r[h>>2])<=(0|a)||(r[(f=u)>>2]=t,r[f+4>>2]=e,r[h>>2]=a,(0|a)>=(0|i)||(f=a+1|0,r[l>>2]=0,T(p=0|R(t,e,2,l),0|x(),i,n,s,o,f),r[l>>2]=0,T(p=0|R(t,e,3,l),0|x(),i,n,s,o,f),r[l>>2]=0,T(p=0|R(t,e,1,l),0|x(),i,n,s,o,f),r[l>>2]=0,T(p=0|R(t,e,5,l),0|x(),i,n,s,o,f),r[l>>2]=0,T(p=0|R(t,e,4,l),0|x(),i,n,s,o,f),r[l>>2]=0,T(p=0|R(t,e,6,l),0|x(),i,n,s,o,f))),P=c}}function R(t,e,i,n){t|=0,e|=0,i|=0;var s,o,a=0,l=0,c=0,h=0,u=0,d=0,p=0;if((0|r[(n|=0)>>2])>0){a=0;do{i=0|lt(i),a=a+1|0}while((0|a)<(0|r[n>>2]))}s=0|xe(0|t,0|e,45),x(),o=127&s,l=0|Vt(t,e),a=0|xe(0|t,0|e,52),x(),a&=15;t:do{if(a)for(;;){if(d=0|xe(0|t,0|e,0|(u=3*(15-a|0)|0)),x(),d&=7,p=0==(0|Nt(a)),a=a+-1|0,h=0|Ce(7,0,0|u),e&=~(0|x()),t=(u=0|Ce(0|r[(p?464:48)+(28*d|0)+(i<<2)>>2],0,0|u))|t&~h,e|=0|x(),!(i=0|r[(p?672:256)+(28*d|0)+(i<<2)>>2])){i=0;break t}if(!a){c=6;break}}else c=6}while(0);6==(0|c)&&(t|=d=0|Ce(0|(p=0|r[880+(28*o|0)+(i<<2)>>2]),0,45),e=0|x()|-1040385&e,i=0|r[4304+(28*o|0)+(i<<2)>>2],127==(127&p|0)&&(p=0|Ce(0|r[880+(28*o|0)+20>>2],0,45),e=0|x()|-1040385&e,i=0|r[4304+(28*o|0)+20>>2],t=0|Lt(p|t,e),e=0|x(),r[n>>2]=1+(0|r[n>>2]))),c=0|xe(0|t,0|e,45),x(),c&=127;t:do{if(0|F(c)){e:do{if(1==(0|Vt(t,e))){if((0|o)!=(0|c)){if(0|N(c,0|r[7728+(28*o|0)>>2])){t=0|Bt(t,e),l=1,e=0|x();break}t=0|Lt(t,e),l=1,e=0|x();break}switch(0|l){case 5:t=0|Bt(t,e),e=0|x(),r[n>>2]=5+(0|r[n>>2]),l=0;break e;case 3:t=0|Lt(t,e),e=0|x(),r[n>>2]=1+(0|r[n>>2]),l=0;break e;default:return p=0,w(0|(d=0)),0|p}}else l=0}while(0);if((0|i)>0){a=0;do{t=0|Ft(t,e),e=0|x(),a=a+1|0}while((0|a)!=(0|i))}if((0|o)!=(0|c)){if(!(0|L(c))){if(0!=(0|l)|5!=(0|Vt(t,e)))break;r[n>>2]=1+(0|r[n>>2]);break}switch(127&s){case 8:case 118:break t}3!=(0|Vt(t,e))&&(r[n>>2]=1+(0|r[n>>2]))}}else if((0|i)>0){a=0;do{t=0|Lt(t,e),e=0|x(),a=a+1|0}while((0|a)!=(0|i))}}while(0);return r[n>>2]=((0|r[n>>2])+i|0)%6|0,p=t,w(0|(d=e)),0|p}function V(t,e,i,n,o,a){i|=0,n|=0,o|=0,a|=0;var l,c,h,u,d,p,f,m,g,A=0,b=0,v=0,_=0,y=0,w=0,C=0,S=0,k=0,E=0,D=0,I=0,O=0,M=0;if(g=P,P=P+48|0,(0|(A=0|r[(t|=0)>>2]))<=0)return P=g,0;l=t+4|0,c=8+(p=g+32|0)|0,h=8+(f=g+16|0)|0,u=(m=g)+8|0,d=((0|(e|=0))<0)<<31>>31,D=0;t:for(;;){r[p>>2]=r[(k=(b=0|r[l>>2])+(D<<4)|0)>>2],r[p+4>>2]=r[k+4>>2],r[p+8>>2]=r[k+8>>2],r[p+12>>2]=r[k+12>>2],(0|D)==(A+-1|0)?(r[f>>2]=r[b>>2],r[f+4>>2]=r[b+4>>2],r[f+8>>2]=r[b+8>>2],r[f+12>>2]=r[b+12>>2]):(r[f>>2]=r[(k=b+(D+1<<4)|0)>>2],r[f+4>>2]=r[k+4>>2],r[f+8>>2]=r[k+8>>2],r[f+12>>2]=r[k+12>>2]),k=0|G(p,f,i);e:do{if((0|k)>0){E=+(0|k),S=0;i:for(;;){s[m>>3]=+s[p>>3]*(M=+(k-S|0))/E+ +s[f>>3]*(O=+(0|S))/E,s[u>>3]=+s[c>>3]*M/E+ +s[h>>3]*O/E,b=0|we(0|(w=0|jt(m,i)),0|(C=0|x()),0|e,0|d),x(),_=0|r[(v=A=a+(b<<3)|0)>>2],v=0|r[v+4>>2];n:do{if(0==(0|_)&0==(0|v))I=14;else for(y=0;;){if((0|y)>(0|e)){A=1;break n}if((0|_)==(0|w)&(0|v)==(0|C)){A=7;break n}if(0==(0|(_=0|r[(v=A=a+((b=(b+1|0)%(0|e)|0)<<3)|0)>>2]))&0==(0|(v=0|r[v+4>>2]))){I=14;break}y=y+1|0}}while(0);switch(14==(0|I)&&(I=0,0==(0|w)&0==(0|C)?A=7:(r[A>>2]=w,r[A+4>>2]=C,r[(y=o+((A=0|r[n>>2])<<3)|0)>>2]=w,r[y+4>>2]=C,r[n>>2]=A+1,A=0)),7&A){case 7:case 0:break;default:break i}if((0|k)<=(0|(S=S+1|0))){I=8;break e}}if(0|A){A=-1,I=20;break t}}else I=8}while(0);if(8==(0|I)&&(I=0),(0|(D=D+1|0))>=(0|(A=0|r[t>>2]))){A=0,I=20;break}}return 20==(0|I)?(P=g,0|A):0}function F(t){return 0|r[7728+(28*(t|=0)|0)+16>>2]}function L(t){return 4==(0|(t|=0))|117==(0|t)|0}function U(t){return 0|r[11152+(216*(0|r[(t|=0)>>2])|0)+(72*(0|r[t+4>>2])|0)+(24*(0|r[t+8>>2])|0)+(r[t+12>>2]<<3)>>2]}function B(t){return 0|r[11152+(216*(0|r[(t|=0)>>2])|0)+(72*(0|r[t+4>>2])|0)+(24*(0|r[t+8>>2])|0)+(r[t+12>>2]<<3)+4>>2]}function N(t,e){return(0|r[7728+(28*(t|=0)|0)+20>>2])==(0|(e|=0))?0|(e=1):0|(e=(0|r[7728+(28*t|0)+24>>2])==(0|e))}function j(t,e){return 0|r[880+(28*(t|=0)|0)+((e|=0)<<2)>>2]}function z(t,e){return(0|r[880+(28*(t|=0)|0)>>2])==(0|(e|=0))?0|(e=0):(0|r[880+(28*t|0)+4>>2])==(0|e)?0|(e=1):(0|r[880+(28*t|0)+8>>2])==(0|e)?0|(e=2):(0|r[880+(28*t|0)+12>>2])==(0|e)?0|(e=3):(0|r[880+(28*t|0)+16>>2])==(0|e)?0|(e=4):(0|r[880+(28*t|0)+20>>2])==(0|e)?0|(e=5):0|((0|r[880+(28*t|0)+24>>2])==(0|e)?6:7)}function H(t){return+s[16+(t|=0)>>3]<+s[t+24>>3]|0}function K(t,e){var i,n,r=0;return(r=+s[(e|=0)>>3])>=+s[8+(t|=0)>>3]&&r<=+s[t>>3]?(e=(n=+s[e+8>>3])>=(r=+s[t+24>>3]),t=n<=(i=+s[t+16>>3])&1,i<r?e&&(t=1):e||(t=0),0|(e=0!=(0|t))):0|(e=0)}function $(t,e){t|=0,e|=0;var i,n,o,a,c,h,u=0,d=0;a=P,P=P+288|0,i=a+264|0,n=a+96|0,d=(u=o=a)+96|0;do{r[u>>2]=0,u=u+4|0}while((0|u)<(0|d));return Gt(e,o),Kt(d=0|r[(u=o)>>2],u=0|r[u+4>>2],i),$t(d,u,n),c=+Dt(i,n+8|0),s[i>>3]=+s[t>>3],s[(u=i+8|0)>>3]=+s[t+16>>3],s[n>>3]=+s[t+8>>3],s[(d=n+8|0)>>3]=+s[t+24>>3],h=+Dt(i,n),d=~~+b(+h*h/+Se(+ +l(+(+s[u>>3]-+s[d>>3])/(+s[i>>3]-+s[n>>3])),3)/(c*(2.59807621135*c)*.8)),P=a,0|(0==(0|d)?1:d)}function G(t,e,i){t|=0,e|=0,i|=0;var n,s,o,a,l,c=0,h=0;a=P,P=P+288|0,n=a+264|0,s=a+96|0,h=(c=o=a)+96|0;do{r[c>>2]=0,c=c+4|0}while((0|c)<(0|h));return Gt(i,o),Kt(c=0|r[(h=o)>>2],h=0|r[h+4>>2],n),$t(c,h,s),l=+Dt(n,s+8|0),h=~~+b(+ +Dt(t,e)/(2*l)),P=a,0|(0==(0|h)?1:h)}function W(t,e,i,n){i|=0,n|=0,r[(t|=0)>>2]=e|=0,r[t+4>>2]=i,r[t+8>>2]=n}function Z(t,e){t|=0;var i,n,o,a,c=0,h=0,u=0,d=0,p=0,f=0,m=0;r[(a=8+(e|=0)|0)>>2]=0,d=+l(+(n=+s[t>>3])),d+=.5*(p=+l(+(o=+s[t+8>>3]))/.8660254037844386),d-=+(0|(c=~~d)),p-=+(0|(t=~~p));do{if(d<.5){if(d<.3333333333333333){if(r[e>>2]=c,p<.5*(d+1)){r[e+4>>2]=t;break}r[e+4>>2]=t=t+1|0;break}if(r[e+4>>2]=t=(1&!(p<(m=1-d)))+t|0,m<=p&p<2*d){r[e>>2]=c=c+1|0;break}r[e>>2]=c;break}if(!(d<.6666666666666666)){if(r[e>>2]=c=c+1|0,p<.5*d){r[e+4>>2]=t;break}r[e+4>>2]=t=t+1|0;break}if(p<1-d){if(r[e+4>>2]=t,2*d-1<p){r[e>>2]=c;break}}else r[e+4>>2]=t=t+1|0;r[e>>2]=c=c+1|0}while(0);do{if(n<0){if(1&t){c=~~(+(0|c)-(2*(+((f=0|_e(0|c,((0|c)<0)<<31>>31|0,0|(f=(t+1|0)/2|0),((0|f)<0)<<31>>31|0))>>>0)+4294967296*+(0|x()))+1)),r[e>>2]=c;break}c=~~(+(0|c)-2*(+((f=0|_e(0|c,((0|c)<0)<<31>>31|0,0|(f=(0|t)/2|0),((0|f)<0)<<31>>31|0))>>>0)+4294967296*+(0|x()))),r[e>>2]=c;break}}while(0);f=e+4|0,o<0&&(r[e>>2]=c=c-((1|t<<1)/2|0)|0,r[f>>2]=t=0-t|0),h=t-c|0,(0|c)<0?(u=0-c|0,r[f>>2]=h,r[a>>2]=u,r[e>>2]=0,t=h,c=0):u=0,(0|t)<0&&(r[e>>2]=c=c-t|0,r[a>>2]=u=u-t|0,r[f>>2]=0,t=0),i=c-u|0,h=t-u|0,(0|u)<0&&(r[e>>2]=i,r[f>>2]=h,r[a>>2]=0,t=h,c=i,u=0),(0|(h=(0|u)<(0|(h=(0|t)<(0|c)?t:c))?u:h))<=0||(r[e>>2]=c-h,r[f>>2]=t-h,r[a>>2]=u-h)}function q(t){var e,i=0,n=0,s=0,o=0,a=0;n=0|r[(e=4+(t|=0)|0)>>2],(0|(i=0|r[t>>2]))<0&&(r[e>>2]=n=n-i|0,r[(a=t+8|0)>>2]=(0|r[a>>2])-i,r[t>>2]=0,i=0),(0|n)<0?(r[t>>2]=i=i-n|0,r[(a=t+8|0)>>2]=o=(0|r[a>>2])-n|0,r[e>>2]=0,n=0):(a=o=t+8|0,o=0|r[o>>2]),(0|o)<0&&(r[t>>2]=i=i-o|0,r[e>>2]=n=n-o|0,r[a>>2]=0,o=0),(0|(s=(0|o)<(0|(s=(0|n)<(0|i)?n:i))?o:s))<=0||(r[t>>2]=i-s,r[e>>2]=n-s,r[a>>2]=o-s)}function Y(t,e){var i,n;s[(e|=0)>>3]=+((0|r[(t|=0)>>2])-(n=0|r[t+8>>2])|0)-.5*(i=+((0|r[t+4>>2])-n|0)),s[e+8>>3]=.8660254037844386*i}function Q(t,e,i){r[(i|=0)>>2]=(0|r[(e|=0)>>2])+(0|r[(t|=0)>>2]),r[i+4>>2]=(0|r[e+4>>2])+(0|r[t+4>>2]),r[i+8>>2]=(0|r[e+8>>2])+(0|r[t+8>>2])}function X(t,e,i){r[(i|=0)>>2]=(0|r[(t|=0)>>2])-(0|r[(e|=0)>>2]),r[i+4>>2]=(0|r[t+4>>2])-(0|r[e+4>>2]),r[i+8>>2]=(0|r[t+8>>2])-(0|r[e+8>>2])}function J(t,e){var i,n=0;n=0|v(0|r[(t|=0)>>2],e|=0),r[t>>2]=n,i=0|v(0|r[(n=t+4|0)>>2],e),r[n>>2]=i,e=0|v(0|r[(t=t+8|0)>>2],e),r[t>>2]=e}function tt(t){var e,i,n,s=0,o=0,a=0,l=0;t=(t=(o=(0|(l=(0|r[8+(t|=0)>>2])-((n=(0|(i=0|r[t>>2]))<0)?i:0)+((e=(0|(a=(0|r[t+4>>2])-(n?i:0)|0))<0)?0-a|0:0)|0))<0)?0:l)-((a=(0|(o=(0|t)<(0|(o=(0|(s=(e?0:a)-(o?l:0)|0))<(0|(l=(n?0:i)-(e?a:0)-(o?l:0)|0))?s:l))?t:o))>0)?o:0)|0,s=s-(a?o:0)|0;t:do{switch(l-(a?o:0)|0){case 0:switch(0|s){case 0:return 0|(0==(0|t)?0:1==(0|t)?1:7);case 1:return 0|(0==(0|t)?2:1==(0|t)?3:7);default:break t}case 1:switch(0|s){case 0:return 0|(0==(0|t)?4:1==(0|t)?5:7);case 1:if(t)break t;return 6;default:break t}}}while(0);return 7}function et(t){var e,i,n=0,s=0,o=0,a=0,l=0;o=0|ge(+((3*(n=(0|r[(t|=0)>>2])-(s=0|r[(e=t+8|0)>>2])|0)|0)-(s=(0|r[(i=t+4|0)>>2])-s|0)|0)/7),r[t>>2]=o,n=0|ge(+((s<<1)+n|0)/7),r[i>>2]=n,r[e>>2]=0,s=n-o|0,(0|o)<0?(l=0-o|0,r[i>>2]=s,r[e>>2]=l,r[t>>2]=0,n=s,o=0,s=l):s=0,(0|n)<0&&(r[t>>2]=o=o-n|0,r[e>>2]=s=s-n|0,r[i>>2]=0,n=0),l=o-s|0,a=n-s|0,(0|s)<0?(r[t>>2]=l,r[i>>2]=a,r[e>>2]=0,n=a,a=l,s=0):a=o,(0|(o=(0|s)<(0|(o=(0|n)<(0|a)?n:a))?s:o))<=0||(r[t>>2]=a-o,r[i>>2]=n-o,r[e>>2]=s-o)}function it(t){var e,i,n=0,s=0,o=0,a=0,l=0;o=0|ge(+(((n=(0|r[(t|=0)>>2])-(s=0|r[(e=t+8|0)>>2])|0)<<1)+(s=(0|r[(i=t+4|0)>>2])-s|0)|0)/7),r[t>>2]=o,n=0|ge(+((3*s|0)-n|0)/7),r[i>>2]=n,r[e>>2]=0,s=n-o|0,(0|o)<0?(l=0-o|0,r[i>>2]=s,r[e>>2]=l,r[t>>2]=0,n=s,o=0,s=l):s=0,(0|n)<0&&(r[t>>2]=o=o-n|0,r[e>>2]=s=s-n|0,r[i>>2]=0,n=0),l=o-s|0,a=n-s|0,(0|s)<0?(r[t>>2]=l,r[i>>2]=a,r[e>>2]=0,n=a,a=l,s=0):a=o,(0|(o=(0|s)<(0|(o=(0|n)<(0|a)?n:a))?s:o))<=0||(r[t>>2]=a-o,r[i>>2]=n-o,r[e>>2]=s-o)}function nt(t){var e,i,n,s=0,o=0,a=0,l=0;a=0|r[(n=8+(t|=0)|0)>>2],r[t>>2]=l=(o=0|r[(i=t+4|0)>>2])+(3*(s=0|r[t>>2])|0)|0,r[i>>2]=o=a+(3*o|0)|0,r[n>>2]=s=(3*a|0)+s|0,a=o-l|0,(0|l)<0?(s=s-l|0,r[i>>2]=a,r[n>>2]=s,r[t>>2]=0,o=a,a=0):a=l,(0|o)<0&&(r[t>>2]=a=a-o|0,r[n>>2]=s=s-o|0,r[i>>2]=0,o=0),e=a-s|0,l=o-s|0,(0|s)<0?(r[t>>2]=e,r[i>>2]=l,r[n>>2]=0,a=e,s=0):l=o,(0|(o=(0|s)<(0|(o=(0|l)<(0|a)?l:a))?s:o))<=0||(r[t>>2]=a-o,r[i>>2]=l-o,r[n>>2]=s-o)}function rt(t){var e,i,n,s=0,o=0,a=0,l=0;a=(3*(s=0|r[(i=4+(t|=0)|0)>>2])|0)+(l=0|r[t>>2])|0,r[t>>2]=l=(o=0|r[(n=t+8|0)>>2])+(3*l|0)|0,r[i>>2]=a,r[n>>2]=s=(3*o|0)+s|0,o=a-l|0,(0|l)<0?(s=s-l|0,r[i>>2]=o,r[n>>2]=s,r[t>>2]=0,l=0):o=a,(0|o)<0&&(r[t>>2]=l=l-o|0,r[n>>2]=s=s-o|0,r[i>>2]=0,o=0),e=l-s|0,a=o-s|0,(0|s)<0?(r[t>>2]=e,r[i>>2]=a,r[n>>2]=0,l=e,s=0):a=o,(0|(o=(0|s)<(0|(o=(0|a)<(0|l)?a:l))?s:o))<=0||(r[t>>2]=l-o,r[i>>2]=a-o,r[n>>2]=s-o)}function st(t,e){t|=0;var i,n,s,o=0,a=0,l=0;((e|=0)-1|0)>>>0>=6||(r[t>>2]=l=(0|r[15472+(12*e|0)>>2])+(0|r[t>>2])|0,r[(s=t+4|0)>>2]=a=(0|r[15472+(12*e|0)+4>>2])+(0|r[s>>2])|0,r[(n=t+8|0)>>2]=e=(0|r[15472+(12*e|0)+8>>2])+(0|r[n>>2])|0,o=a-l|0,(0|l)<0?(e=e-l|0,r[s>>2]=o,r[n>>2]=e,r[t>>2]=0,a=0):(o=a,a=l),(0|o)<0&&(r[t>>2]=a=a-o|0,r[n>>2]=e=e-o|0,r[s>>2]=0,o=0),i=a-e|0,l=o-e|0,(0|e)<0?(r[t>>2]=i,r[s>>2]=l,r[n>>2]=0,a=i,e=0):l=o,(0|(o=(0|e)<(0|(o=(0|l)<(0|a)?l:a))?e:o))<=0||(r[t>>2]=a-o,r[s>>2]=l-o,r[n>>2]=e-o))}function ot(t){var e,i,n,s=0,o=0,a=0,l=0;a=(s=0|r[(i=4+(t|=0)|0)>>2])+(l=0|r[t>>2])|0,r[t>>2]=l=(o=0|r[(n=t+8|0)>>2])+l|0,r[i>>2]=a,r[n>>2]=s=o+s|0,o=a-l|0,(0|l)<0?(s=s-l|0,r[i>>2]=o,r[n>>2]=s,r[t>>2]=0,a=0):(o=a,a=l),(0|o)<0&&(r[t>>2]=a=a-o|0,r[n>>2]=s=s-o|0,r[i>>2]=0,o=0),e=a-s|0,l=o-s|0,(0|s)<0?(r[t>>2]=e,r[i>>2]=l,r[n>>2]=0,a=e,s=0):l=o,(0|(o=(0|s)<(0|(o=(0|l)<(0|a)?l:a))?s:o))<=0||(r[t>>2]=a-o,r[i>>2]=l-o,r[n>>2]=s-o)}function at(t){var e,i,n,s=0,o=0,a=0,l=0;o=0|r[(n=8+(t|=0)|0)>>2],r[t>>2]=l=(a=0|r[(i=t+4|0)>>2])+(s=0|r[t>>2])|0,r[i>>2]=a=o+a|0,r[n>>2]=s=o+s|0,o=a-l|0,(0|l)<0?(s=s-l|0,r[i>>2]=o,r[n>>2]=s,r[t>>2]=0,a=0):(o=a,a=l),(0|o)<0&&(r[t>>2]=a=a-o|0,r[n>>2]=s=s-o|0,r[i>>2]=0,o=0),e=a-s|0,l=o-s|0,(0|s)<0?(r[t>>2]=e,r[i>>2]=l,r[n>>2]=0,a=e,s=0):l=o,(0|(o=(0|s)<(0|(o=(0|l)<(0|a)?l:a))?s:o))<=0||(r[t>>2]=a-o,r[i>>2]=l-o,r[n>>2]=s-o)}function lt(t){switch(0|(t|=0)){case 1:t=5;break;case 5:t=4;break;case 4:t=6;break;case 6:t=2;break;case 2:t=3;break;case 3:t=1}return 0|t}function ct(t){switch(0|(t|=0)){case 1:t=3;break;case 3:t=2;break;case 2:t=6;break;case 6:t=4;break;case 4:t=5;break;case 5:t=1}return 0|t}function ht(t){var e,i,n,s=0,o=0,a=0,l=0;a=0|r[(n=8+(t|=0)|0)>>2],r[t>>2]=l=(o=0|r[(i=t+4|0)>>2])+((s=0|r[t>>2])<<1)|0,r[i>>2]=o=a+(o<<1)|0,r[n>>2]=s=(a<<1)+s|0,a=o-l|0,(0|l)<0?(s=s-l|0,r[i>>2]=a,r[n>>2]=s,r[t>>2]=0,o=a,a=0):a=l,(0|o)<0&&(r[t>>2]=a=a-o|0,r[n>>2]=s=s-o|0,r[i>>2]=0,o=0),e=a-s|0,l=o-s|0,(0|s)<0?(r[t>>2]=e,r[i>>2]=l,r[n>>2]=0,a=e,s=0):l=o,(0|(o=(0|s)<(0|(o=(0|l)<(0|a)?l:a))?s:o))<=0||(r[t>>2]=a-o,r[i>>2]=l-o,r[n>>2]=s-o)}function ut(t){var e,i,n,s=0,o=0,a=0,l=0;a=((s=0|r[(i=4+(t|=0)|0)>>2])<<1)+(l=0|r[t>>2])|0,r[t>>2]=l=(o=0|r[(n=t+8|0)>>2])+(l<<1)|0,r[i>>2]=a,r[n>>2]=s=(o<<1)+s|0,o=a-l|0,(0|l)<0?(s=s-l|0,r[i>>2]=o,r[n>>2]=s,r[t>>2]=0,l=0):o=a,(0|o)<0&&(r[t>>2]=l=l-o|0,r[n>>2]=s=s-o|0,r[i>>2]=0,o=0),e=l-s|0,a=o-s|0,(0|s)<0?(r[t>>2]=e,r[i>>2]=a,r[n>>2]=0,l=e,s=0):a=o,(0|(o=(0|s)<(0|(o=(0|a)<(0|l)?a:l))?s:o))<=0||(r[t>>2]=l-o,r[i>>2]=a-o,r[n>>2]=s-o)}function dt(t,e){var i,n,s,o=0,a=0,l=0;return e=(e=(t=(0|(l=((s=(0|(n=(0|r[(t|=0)>>2])-(0|r[(e|=0)>>2])|0))<0)?0-n|0:0)+(0|r[t+8>>2])-(0|r[e+8>>2])+((i=(0|(a=(0|r[t+4>>2])-(0|r[e+4>>2])-(s?n:0)|0))<0)?0-a|0:0)|0))<0)?0:l)-((a=(0|(t=(0|e)<(0|(t=(0|(o=(i?0:a)-(t?l:0)|0))<(0|(l=(s?0:n)-(i?a:0)-(t?l:0)|0))?o:l))?e:t))>0)?t:0)|0,o=o-(a?t:0)|0,0|((0|(t=(0|(t=l-(a?t:0)|0))>-1?t:0-t|0))>(0|(e=(0|(o=(0|o)>-1?o:0-o|0))>(0|(e=(0|e)>-1?e:0-e|0))?o:e))?t:e)}function pt(t,e){var i;r[(e|=0)>>2]=(0|r[(t|=0)>>2])-(i=0|r[t+8>>2]),r[e+4>>2]=(0|r[t+4>>2])-i}function ft(t,e){var i,n,s,o=0,a=0,l=0;r[(e|=0)>>2]=a=0|r[(t|=0)>>2],r[(n=e+4|0)>>2]=t=0|r[t+4>>2],r[(s=e+8|0)>>2]=0,o=t-a|0,(0|a)<0?(t=0-a|0,r[n>>2]=o,r[s>>2]=t,r[e>>2]=0,a=0):(o=t,t=0),(0|o)<0&&(r[e>>2]=a=a-o|0,r[s>>2]=t=t-o|0,r[n>>2]=0,o=0),i=a-t|0,l=o-t|0,(0|t)<0?(r[e>>2]=i,r[n>>2]=l,r[s>>2]=0,o=l,l=i,t=0):l=a,(0|(a=(0|t)<(0|(a=(0|o)<(0|l)?o:l))?t:a))<=0||(r[e>>2]=l-a,r[n>>2]=o-a,r[s>>2]=t-a)}function mt(t){var e,i,n,s;r[(t|=0)>>2]=i=(s=0|r[(e=t+8|0)>>2])-(0|r[t>>2])|0,r[(n=t+4|0)>>2]=t=(0|r[n>>2])-s|0,r[e>>2]=0-(t+i)}function gt(t){var e,i,n=0,s=0,o=0,a=0,l=0;r[(t|=0)>>2]=n=0-(s=0|r[t>>2])|0,r[(e=t+8|0)>>2]=0,a=(o=0|r[(i=t+4|0)>>2])+s|0,(0|s)>0?(r[i>>2]=a,r[e>>2]=s,r[t>>2]=0,n=0,o=a):s=0,(0|o)<0?(r[t>>2]=l=n-o|0,r[e>>2]=s=s-o|0,r[i>>2]=0,a=l-s|0,n=0-s|0,(0|s)<0?(r[t>>2]=a,r[i>>2]=n,r[e>>2]=0,o=n,s=0):(o=0,a=l)):a=n,(0|(n=(0|s)<(0|(n=(0|o)<(0|a)?o:a))?s:n))<=0||(r[t>>2]=a-n,r[i>>2]=o-n,r[e>>2]=s-n)}function At(t,e,i,n){e|=0,i|=0,n|=0;var o,a=0,l=0,c=0,h=0;if(o=P,P=P+32|0,function(t,e){e|=0;var i,n,r=0;i=+u(+(r=+s[(t|=0)>>3])),r=+d(+r),s[e+16>>3]=r,n=i*+u(+(r=+s[t+8>>3])),s[e>>3]=n,r=i*+d(+r),s[e+8>>3]=r}(t|=0,l=o),r[i>>2]=0,a=+le(15888,l),(c=+le(15912,l))<a&&(r[i>>2]=1,a=c),(c=+le(15936,l))<a&&(r[i>>2]=2,a=c),(c=+le(15960,l))<a&&(r[i>>2]=3,a=c),(c=+le(15984,l))<a&&(r[i>>2]=4,a=c),(c=+le(16008,l))<a&&(r[i>>2]=5,a=c),(c=+le(16032,l))<a&&(r[i>>2]=6,a=c),(c=+le(16056,l))<a&&(r[i>>2]=7,a=c),(c=+le(16080,l))<a&&(r[i>>2]=8,a=c),(c=+le(16104,l))<a&&(r[i>>2]=9,a=c),(c=+le(16128,l))<a&&(r[i>>2]=10,a=c),(c=+le(16152,l))<a&&(r[i>>2]=11,a=c),(c=+le(16176,l))<a&&(r[i>>2]=12,a=c),(c=+le(16200,l))<a&&(r[i>>2]=13,a=c),(c=+le(16224,l))<a&&(r[i>>2]=14,a=c),(c=+le(16248,l))<a&&(r[i>>2]=15,a=c),(c=+le(16272,l))<a&&(r[i>>2]=16,a=c),(c=+le(16296,l))<a&&(r[i>>2]=17,a=c),(c=+le(16320,l))<a&&(r[i>>2]=18,a=c),(c=+le(16344,l))<a&&(r[i>>2]=19,a=c),(c=+f(+(1-.5*a)))<1e-16)return r[n>>2]=0,r[n+4>>2]=0,r[n+8>>2]=0,r[n+12>>2]=0,void(P=o);if(a=+kt((a=+s[16368+(24*(i=0|r[i>>2])|0)>>3])-+kt(+function(t,e){var i,n,r,o,a;return t|=0,a=(n=+u(+(o=+s[(e|=0)>>3])))*+d(+(r=+s[e+8>>3]-+s[t+8>>3])),i=+s[t>>3],+ +A(+a,+(+d(+o)*+u(+i)-+u(+r)*(n*+d(+i))))}(15568+(i<<4)|0,t))),h=0|Nt(e)?+kt(a+-.3334731722518321):a,a=+p(+c)/.381966011250105,(0|e)>0){l=0;do{a*=2.6457513110645907,l=l+1|0}while((0|l)!=(0|e))}c=+u(+h)*a,s[n>>3]=c,h=+d(+h)*a,s[n+8>>3]=h,P=o}function bt(t,e,i,n,o){e|=0,i|=0,n|=0,o|=0;var a=0,h=0;if((a=+function(t){var e,i;return+ +c(+((i=+s[(t|=0)>>3])*i+(e=+s[t+8>>3])*e))}(t|=0))<1e-16)return r[o>>2]=r[(e=15568+(e<<4)|0)>>2],r[o+4>>2]=r[e+4>>2],r[o+8>>2]=r[e+8>>2],void(r[o+12>>2]=r[e+12>>2]);if(h=+A(+ +s[t+8>>3],+ +s[t>>3]),(0|i)>0){t=0;do{a/=2.6457513110645907,t=t+1|0}while((0|t)!=(0|i))}n?(a/=3,i=0==(0|Nt(i)),a=+g(.381966011250105*(i?a:a/2.6457513110645907))):(a=+g(.381966011250105*a),0|Nt(i)&&(h=+kt(h+.3334731722518321))),function(t,e,i,n){t|=0,e=+e,n|=0;var o=0,a=0,c=0,h=0;if((i=+i)<1e-16)return r[n>>2]=r[t>>2],r[n+4>>2]=r[t+4>>2],r[n+8>>2]=r[t+8>>2],void(r[n+12>>2]=r[t+12>>2]);a=e<0?e+6.283185307179586:e,a=e>=6.283185307179586?a+-6.283185307179586:a;do{if(!(a<1e-16)){if(o=+l(+(a+-3.141592653589793))<1e-16,e=+s[t>>3],o){s[n>>3]=e-=i,o=n;break}if(c=+u(+i),i=+d(+i),e=c*+d(+e)+ +u(+a)*(i*+u(+e)),e=+m(+((e=e>1?1:e)<-1?-1:e)),s[n>>3]=e,+l(+(e+-1.5707963267948966))<1e-16)return s[n>>3]=1.5707963267948966,void(s[n+8>>3]=0);if(+l(+(e+1.5707963267948966))<1e-16)return s[n>>3]=-1.5707963267948966,void(s[n+8>>3]=0);if(h=+u(+e),a=i*+d(+a)/h,i=+s[t>>3],e=(c-+d(+e)*+d(+i))/+u(+i)/h,(e=+s[t+8>>3]+ +A(+((c=a>1?1:a)<-1?-1:c),+((e=e>1?1:e)<-1?-1:e)))>3.141592653589793)do{e+=-6.283185307179586}while(e>3.141592653589793);if(e<-3.141592653589793)do{e+=6.283185307179586}while(e<-3.141592653589793);return void(s[n+8>>3]=e)}s[n>>3]=e=+s[t>>3]+i,o=n}while(0);if(+l(+(e+-1.5707963267948966))<1e-16)return s[o>>3]=1.5707963267948966,void(s[n+8>>3]=0);if(+l(+(e+1.5707963267948966))<1e-16)return s[o>>3]=-1.5707963267948966,void(s[n+8>>3]=0);if((e=+s[t+8>>3])>3.141592653589793)do{e+=-6.283185307179586}while(e>3.141592653589793);if(e<-3.141592653589793)do{e+=6.283185307179586}while(e<-3.141592653589793);s[n+8>>3]=e}(15568+(e<<4)|0,+kt(+s[16368+(24*e|0)>>3]-h),a,o)}function vt(t,e,i){var n,s;e|=0,i|=0,n=P,P=P+16|0,Y(4+(t|=0)|0,s=n),bt(s,0|r[t>>2],e,0,i),P=n}function _t(t,e,i,n,o){t|=0,i|=0,n|=0,o|=0;var a,l,c,h,u,d,p,f,m,g,A,b,v,_,y,w,x,S,k,E,D,I,O=0,M=0,T=0,R=0,V=0,F=0;if(I=P,P=P+272|0,R=I+240|0,k=I,E=I+224|0,D=I+208|0,A=I+176|0,b=I+160|0,v=I+192|0,_=I+144|0,y=I+128|0,w=I+112|0,x=I+96|0,S=I+80|0,r[(O=I+256|0)>>2]=e|=0,r[R>>2]=r[t>>2],r[R+4>>2]=r[t+4>>2],r[R+8>>2]=r[t+8>>2],r[R+12>>2]=r[t+12>>2],yt(R,O,k),r[o>>2]=0,(0|(R=n+i+(5==(0|n)&1)|0))<=(0|i))P=I;else{l=E+4|0,c=A+4|0,h=i+5|0,u=16848+((a=0|r[O>>2])<<2)|0,d=16928+(a<<2)|0,p=y+8|0,f=w+8|0,m=x+8|0,g=D+4|0,T=i;t:for(;;){r[D>>2]=r[(M=k+(((0|T)%5|0)<<4)|0)>>2],r[D+4>>2]=r[M+4>>2],r[D+8>>2]=r[M+8>>2],r[D+12>>2]=r[M+12>>2];do{}while(2==(0|wt(D,a,0,1)));if((0|T)>(0|i)&0!=(0|Nt(e))){if(r[A>>2]=r[D>>2],r[A+4>>2]=r[D+4>>2],r[A+8>>2]=r[D+8>>2],r[A+12>>2]=r[D+12>>2],Y(l,b),r[A>>2]=r[18608+(80*(n=0|r[A>>2])|0)+(20*(O=0|r[17008+(80*n|0)+(r[E>>2]<<2)>>2])|0)>>2],(0|(M=0|r[18608+(80*n|0)+(20*O|0)+16>>2]))>0){t=0;do{ot(c),t=t+1|0}while((0|t)<(0|M))}switch(r[v>>2]=r[(M=18608+(80*n|0)+(20*O|0)+4|0)>>2],r[v+4>>2]=r[M+4>>2],r[v+8>>2]=r[M+8>>2],J(v,3*(0|r[u>>2])|0),Q(c,v,c),q(c),Y(c,_),s[y>>3]=3*(V=+(0|r[d>>2])),s[p>>3]=0,s[w>>3]=F=-1.5*V,s[f>>3]=2.598076211353316*V,s[x>>3]=F,s[m>>3]=-2.598076211353316*V,0|r[17008+(80*(0|r[A>>2])|0)+(r[D>>2]<<2)>>2]){case 1:t=w,n=y;break;case 3:t=x,n=w;break;case 2:t=y,n=x;break;default:t=12;break t}oe(b,_,n,t,S),bt(S,0|r[A>>2],a,1,o+8+(r[o>>2]<<4)|0),r[o>>2]=1+(0|r[o>>2])}if((0|T)<(0|h)&&(Y(g,A),bt(A,0|r[D>>2],a,1,o+8+(r[o>>2]<<4)|0),r[o>>2]=1+(0|r[o>>2])),r[E>>2]=r[D>>2],r[E+4>>2]=r[D+4>>2],r[E+8>>2]=r[D+8>>2],r[E+12>>2]=r[D+12>>2],(0|(T=T+1|0))>=(0|R)){t=3;break}}3!=(0|t)?12==(0|t)&&C(22474,22521,581,22531):P=I}}function yt(t,e,i){t|=0,e|=0,i|=0;var n,s=0,o=0,a=0,l=0,c=0;n=P,P=P+128|0,o=n,l=20208,c=60+(a=s=n+64|0)|0;do{r[a>>2]=r[l>>2],a=a+4|0,l=l+4|0}while((0|a)<(0|c));l=20272,c=(a=o)+60|0;do{r[a>>2]=r[l>>2],a=a+4|0,l=l+4|0}while((0|a)<(0|c));s=(c=0==(0|Nt(0|r[e>>2])))?s:o,ht(o=t+4|0),ut(o),0|Nt(0|r[e>>2])&&(rt(o),r[e>>2]=1+(0|r[e>>2])),r[i>>2]=r[t>>2],Q(o,s,e=i+4|0),q(e),r[i+16>>2]=r[t>>2],Q(o,s+12|0,e=i+20|0),q(e),r[i+32>>2]=r[t>>2],Q(o,s+24|0,e=i+36|0),q(e),r[i+48>>2]=r[t>>2],Q(o,s+36|0,e=i+52|0),q(e),r[i+64>>2]=r[t>>2],Q(o,s+48|0,i=i+68|0),q(i),P=n}function wt(t,e,i,n){i|=0;var s,o,a,l,c,h,u,d=0,p=0,f=0,m=0;if(h=P,P=P+32|0,c=h+12|0,o=h,m=0|r[16928+((e|=0)<<2)>>2],m=(l=0!=(0|(n|=0)))?3*m|0:m,d=0|r[(u=4+(t|=0)|0)>>2],s=0|r[(a=t+8|0)>>2],l){if((0|(d=s+d+(n=0|r[(p=t+12|0)>>2])|0))==(0|m))return P=h,1;f=p}else d=s+d+(n=0|r[(f=t+12|0)>>2])|0;if((0|d)<=(0|m))return P=h,0;do{if((0|n)>0){if(n=0|r[t>>2],(0|s)>0){p=18608+(80*n|0)+60|0,n=t;break}n=18608+(80*n|0)+40|0,i?(W(c,m,0,0),X(u,c,o),at(o),Q(o,c,u),p=n,n=t):(p=n,n=t)}else p=18608+(80*(0|r[t>>2])|0)+20|0,n=t}while(0);if(r[n>>2]=r[p>>2],(0|r[(d=p+16|0)>>2])>0){n=0;do{ot(u),n=n+1|0}while((0|n)<(0|r[d>>2]))}return r[c>>2]=r[(t=p+4|0)>>2],r[c+4>>2]=r[t+4>>2],r[c+8>>2]=r[t+8>>2],e=0|r[16848+(e<<2)>>2],J(c,l?3*e|0:e),Q(u,c,u),q(u),P=h,0|(l&&((0|r[a>>2])+(0|r[u>>2])+(0|r[f>>2])|0)==(0|m)?1:2)}function xt(t,e){t|=0,e|=0;var i=0;do{i=0|wt(t,e,0,1)}while(2==(0|i));return 0|i}function Ct(t,e,i,n,o){t|=0,i|=0,n|=0,o|=0;var a,l,c,h,u,d,p,f,m,g,A,b,v,_,y,w,x,S,k=0,E=0,D=0,I=0,O=0;if(S=P,P=P+240|0,_=S+208|0,y=S,w=S+192|0,x=S+176|0,m=S+160|0,g=S+144|0,A=S+128|0,b=S+112|0,v=S+96|0,r[(k=S+224|0)>>2]=e|=0,r[_>>2]=r[t>>2],r[_+4>>2]=r[t+4>>2],r[_+8>>2]=r[t+8>>2],r[_+12>>2]=r[t+12>>2],St(_,k,y),r[o>>2]=0,(0|(f=n+i+(6==(0|n)&1)|0))<=(0|i))P=S;else{l=i+6|0,c=16928+((a=0|r[k>>2])<<2)|0,h=g+8|0,u=A+8|0,d=b+8|0,p=w+4|0,E=0,D=i,n=-1;t:for(;;){if(r[w>>2]=r[(t=y+((k=(0|D)%6|0)<<4)|0)>>2],r[w+4>>2]=r[t+4>>2],r[w+8>>2]=r[t+8>>2],r[w+12>>2]=r[t+12>>2],t=E,E=0|wt(w,a,0,1),(0|D)>(0|i)&0!=(0|Nt(e))&&1!=(0|t)&&(0|r[w>>2])!=(0|n)){switch(Y(y+(((k+5|0)%6|0)<<4)+4|0,x),Y(y+(k<<4)+4|0,m),s[g>>3]=3*(I=+(0|r[c>>2])),s[h>>3]=0,s[A>>3]=O=-1.5*I,s[u>>3]=2.598076211353316*I,s[b>>3]=O,s[d>>3]=-2.598076211353316*I,0|r[17008+(80*(k=0|r[_>>2])|0)+(((0|n)==(0|k)?0|r[w>>2]:n)<<2)>>2]){case 1:t=A,n=g;break;case 3:t=b,n=A;break;case 2:t=g,n=b;break;default:t=8;break t}oe(x,m,n,t,v),0|ae(x,v)||0|ae(m,v)||(bt(v,0|r[_>>2],a,1,o+8+(r[o>>2]<<4)|0),r[o>>2]=1+(0|r[o>>2]))}if((0|D)<(0|l)&&(Y(p,x),bt(x,0|r[w>>2],a,1,o+8+(r[o>>2]<<4)|0),r[o>>2]=1+(0|r[o>>2])),(0|(D=D+1|0))>=(0|f)){t=3;break}n=0|r[w>>2]}3!=(0|t)?8==(0|t)&&C(22557,22521,746,22602):P=S}}function St(t,e,i){t|=0,e|=0,i|=0;var n,s=0,o=0,a=0,l=0,c=0;n=P,P=P+160|0,o=n,l=20336,c=72+(a=s=n+80|0)|0;do{r[a>>2]=r[l>>2],a=a+4|0,l=l+4|0}while((0|a)<(0|c));l=20416,c=(a=o)+72|0;do{r[a>>2]=r[l>>2],a=a+4|0,l=l+4|0}while((0|a)<(0|c));s=(c=0==(0|Nt(0|r[e>>2])))?s:o,ht(o=t+4|0),ut(o),0|Nt(0|r[e>>2])&&(rt(o),r[e>>2]=1+(0|r[e>>2])),r[i>>2]=r[t>>2],Q(o,s,e=i+4|0),q(e),r[i+16>>2]=r[t>>2],Q(o,s+12|0,e=i+20|0),q(e),r[i+32>>2]=r[t>>2],Q(o,s+24|0,e=i+36|0),q(e),r[i+48>>2]=r[t>>2],Q(o,s+36|0,e=i+52|0),q(e),r[i+64>>2]=r[t>>2],Q(o,s+48|0,e=i+68|0),q(e),r[i+80>>2]=r[t>>2],Q(o,s+60|0,i=i+84|0),q(i),P=n}function kt(t){var e;return e=(t=+t)<0?t+6.283185307179586:t,+(t>=6.283185307179586?e+-6.283185307179586:e)}function Et(t,e){return+l(+(+s[(t|=0)>>3]-+s[(e|=0)>>3]))<17453292519943298e-27?0|(e=+l(+(+s[t+8>>3]-+s[e+8>>3]))<17453292519943298e-27):0|(e=0)}function Dt(t,e){var i,n,r,o=0;return o=(r=+d(.5*((n=+s[(e|=0)>>3])-(i=+s[(t|=0)>>3]))))*r+(o=+d(.5*(+s[e+8>>3]-+s[t+8>>3])))*(+u(+n)*+u(+i)*o),2*+A(+ +c(+o),+ +c(+(1-o)))*6371.007180918475}function It(t,e,i){i|=0;var n,r,o,a,l=0,h=0,f=0,m=0,b=0,v=0;return b=+d(.5*((v=+s[(e|=0)>>3])-(o=+s[(t|=0)>>3]))),m=+d(.5*((f=+s[e+8>>3])-(r=+s[t+8>>3]))),n=+u(+o),a=+u(+v),m=2*+A(+ +c(+(m=b*b+m*(a*n*m))),+ +c(+(1-m))),v=+d(.5*((b=+s[i>>3])-v)),f=+d(.5*((l=+s[i+8>>3])-f)),h=+u(+b),f=2*+A(+ +c(+(f=v*v+f*(a*h*f))),+ +c(+(1-f))),b=+d(.5*(o-b)),l=+d(.5*(r-l)),l=2*+A(+ +c(+(l=b*b+l*(n*h*l))),+ +c(+(1-l))),4*+g(+ +c(+ +p(.5*(h=.5*(m+f+l)))*+p(.5*(h-m))*+p(.5*(h-f))*+p(.5*(h-l))))}function Pt(t,e){return e=0|xe(0|(t|=0),0|(e|=0),45),x(),127&e|0}function Ot(t,e){var i=0,n=0,r=0,s=0,o=0,a=0;if(!(!0&134217728==(-16777216&(e|=0)|0)))return 0;if(o=0|xe(0|(t|=0),0|e,45),x(),(o&=127)>>>0>121)return 0;i=0|xe(0|t,0|e,52),x(),i&=15;do{if(0|i){for(r=1,n=0;;){if(s=0|xe(0|t,0|e,3*(15-r|0)|0),x(),0!=(0|(s&=7))&(1^n)){if(1==(0|s)&0!=(0|F(o))){a=0,n=13;break}n=1}if(7==(0|s)){a=0,n=13;break}if(!(r>>>0<i>>>0)){n=9;break}r=r+1|0}if(9==(0|n)){if(15!=(0|i))break;return 1}if(13==(0|n))return 0|a}}while(0);for(;;){if(a=0|xe(0|t,0|e,3*(14-i|0)|0),x(),!(7==(7&a|0)&!0)){a=0,n=13;break}if(!(i>>>0<14)){a=1,n=13;break}i=i+1|0}return 13==(0|n)?0|a:0}function Mt(t,e,i){i|=0;var n=0,r=0;if(n=0|xe(0|(t|=0),0|(e|=0),52),x(),(0|(n&=15))>=(0|i)){if((0|n)!=(0|i))if(i>>>0<=15){if(t|=r=0|Ce(0|i,0,52),e=0|x()|-15728641&e,(0|n)>(0|i))do{r=0|Ce(7,0,3*(14-i|0)|0),i=i+1|0,t|=r,e=0|x()|e}while((0|i)<(0|n))}else e=0,t=0}else e=0,t=0;return w(0|e),0|t}function Tt(t,e,i,n){i|=0,n|=0;var s,o=0,a=0,l=0,c=0,h=0,u=0;if(l=0|xe(0|(t|=0),0|(e|=0),52),x(),(0|i)<16&(0|(l&=15))<=(0|i)){if((0|l)==(0|i))return r[(i=n)>>2]=t,void(r[i+4>>2]=e);if(s=(0|(h=0|ee(7,i-l|0)))/7|0,c=0|xe(0|t,0|e,45),x(),0|F(127&c)){t:do{if(l)for(a=1;;){if(o=0|xe(0|t,0|e,3*(15-a|0)|0),x(),0|(o&=7))break t;if(!(a>>>0<l>>>0)){o=0;break}a=a+1|0}else o=0}while(0);a=0==(0|o)}else a=0;if(u=0|Ce(l+1|0,0,52),o=0|x()|-15728641&e,Tt(e=(u|t)&~(e=0|Ce(7,0,0|(c=3*(14-l|0)|0))),l=o&~(0|x()),i,n),o=n+(s<<3)|0,!a)return Tt((u=0|Ce(1,0,0|c))|e,0|x()|l,i,o),u=o+(s<<3)|0,Tt((h=0|Ce(2,0,0|c))|e,0|x()|l,i,u),u=u+(s<<3)|0,Tt((h=0|Ce(3,0,0|c))|e,0|x()|l,i,u),u=u+(s<<3)|0,Tt((h=0|Ce(4,0,0|c))|e,0|x()|l,i,u),u=u+(s<<3)|0,Tt((h=0|Ce(5,0,0|c))|e,0|x()|l,i,u),void Tt((h=0|Ce(6,0,0|c))|e,0|x()|l,i,u+(s<<3)|0);a=o+(s<<3)|0,(0|h)>6&&(De(0|o,0,8+(u=(a>>>0>(h=o+8|0)>>>0?a:h)+-1+(0-o)|0)&-8|0),o=h+(u>>>3<<3)|0),Tt((u=0|Ce(2,0,0|c))|e,0|x()|l,i,o),u=o+(s<<3)|0,Tt((h=0|Ce(3,0,0|c))|e,0|x()|l,i,u),u=u+(s<<3)|0,Tt((h=0|Ce(4,0,0|c))|e,0|x()|l,i,u),u=u+(s<<3)|0,Tt((h=0|Ce(5,0,0|c))|e,0|x()|l,i,u),Tt((h=0|Ce(6,0,0|c))|e,0|x()|l,i,u+(s<<3)|0)}}function Rt(t,e){var i=0,n=0,r=0;if(r=0|xe(0|(t|=0),0|(e|=0),45),x(),!(0|F(127&r)))return 0;r=0|xe(0|t,0|e,52),x(),r&=15;t:do{if(r)for(n=1;;){if(i=0|xe(0|t,0|e,3*(15-n|0)|0),x(),0|(i&=7))break t;if(!(n>>>0<r>>>0)){i=0;break}n=n+1|0}else i=0}while(0);return 0|0==(0|i)&1}function Vt(t,e){var i=0,n=0,r=0;if(r=0|xe(0|(t|=0),0|(e|=0),52),x(),!(r&=15))return 0;for(n=1;;){if(i=0|xe(0|t,0|e,3*(15-n|0)|0),x(),0|(i&=7)){n=5;break}if(!(n>>>0<r>>>0)){i=0,n=5;break}n=n+1|0}return 5==(0|n)?0|i:0}function Ft(t,e){var i=0,n=0,r=0,s=0,o=0,a=0,l=0;if(l=0|xe(0|(t|=0),0|(e|=0),52),x(),!(l&=15))return l=t,w(0|(a=e)),0|l;for(a=1,i=0;;){n=0|Ce(7,0,0|(s=3*(15-a|0)|0)),r=0|x(),o=0|xe(0|t,0|e,0|s),x(),t=(s=0|Ce(0|lt(7&o),0,0|s))|t&~n,e=(o=0|x())|e&~r;t:do{if(!i)if(0==(s&n|0)&0==(o&r|0))i=0;else if(n=0|xe(0|t,0|e,52),x(),n&=15){i=1;e:for(;;){switch(o=0|xe(0|t,0|e,3*(15-i|0)|0),x(),7&o){case 1:break e;case 0:break;default:i=1;break t}if(!(i>>>0<n>>>0)){i=1;break t}i=i+1|0}for(i=1;;){if(r=0|xe(0|t,0|e,0|(o=3*(15-i|0)|0)),x(),s=0|Ce(7,0,0|o),e&=~(0|x()),t=t&~s|(o=0|Ce(0|lt(7&r),0,0|o)),e=0|e|x(),!(i>>>0<n>>>0)){i=1;break}i=i+1|0}}else i=1}while(0);if(!(a>>>0<l>>>0))break;a=a+1|0}return w(0|e),0|t}function Lt(t,e){var i=0,n=0,r=0,s=0,o=0;if(n=0|xe(0|(t|=0),0|(e|=0),52),x(),!(n&=15))return n=t,w(0|(i=e)),0|n;for(i=1;o=0|xe(0|t,0|e,0|(s=3*(15-i|0)|0)),x(),r=0|Ce(7,0,0|s),e&=~(0|x()),t=(s=0|Ce(0|lt(7&o),0,0|s))|t&~r,e=0|x()|e,i>>>0<n>>>0;)i=i+1|0;return w(0|e),0|t}function Ut(t,e){var i=0,n=0,r=0,s=0,o=0,a=0,l=0;if(l=0|xe(0|(t|=0),0|(e|=0),52),x(),!(l&=15))return l=t,w(0|(a=e)),0|l;for(a=1,i=0;;){n=0|Ce(7,0,0|(s=3*(15-a|0)|0)),r=0|x(),o=0|xe(0|t,0|e,0|s),x(),t=(s=0|Ce(0|ct(7&o),0,0|s))|t&~n,e=(o=0|x())|e&~r;t:do{if(!i)if(0==(s&n|0)&0==(o&r|0))i=0;else if(n=0|xe(0|t,0|e,52),x(),n&=15){i=1;e:for(;;){switch(o=0|xe(0|t,0|e,3*(15-i|0)|0),x(),7&o){case 1:break e;case 0:break;default:i=1;break t}if(!(i>>>0<n>>>0)){i=1;break t}i=i+1|0}for(i=1;;){if(s=0|Ce(7,0,0|(r=3*(15-i|0)|0)),o=e&~(0|x()),e=0|xe(0|t,0|e,0|r),x(),t=t&~s|(e=0|Ce(0|ct(7&e),0,0|r)),e=0|o|x(),!(i>>>0<n>>>0)){i=1;break}i=i+1|0}}else i=1}while(0);if(!(a>>>0<l>>>0))break;a=a+1|0}return w(0|e),0|t}function Bt(t,e){var i=0,n=0,r=0,s=0,o=0;if(n=0|xe(0|(t|=0),0|(e|=0),52),x(),!(n&=15))return n=t,w(0|(i=e)),0|n;for(i=1;s=0|Ce(7,0,0|(o=3*(15-i|0)|0)),r=e&~(0|x()),e=0|xe(0|t,0|e,0|o),x(),t=(e=0|Ce(0|ct(7&e),0,0|o))|t&~s,e=0|x()|r,i>>>0<n>>>0;)i=i+1|0;return w(0|e),0|t}function Nt(t){return 0|(0|(t|=0))%2}function jt(t,e){var i,n;return t|=0,n=P,P=P+16|0,i=n,(e|=0)>>>0<=15&&2146435072!=(2146435072&r[t+4>>2]|0)&&2146435072!=(2146435072&r[t+8+4>>2]|0)?(function(t,e,i){var n,r;n=P,P=P+16|0,At(t|=0,e|=0,i|=0,r=n),Z(r,i+4|0),P=n}(t,e,i),e=0|function(t,e){t|=0;var i,n=0,s=0,o=0,a=0,l=0,c=0,h=0,u=0;if(i=P,P=P+64|0,c=i+40|0,s=i+24|0,o=i+12|0,a=i,Ce(0|(e|=0),0,52),n=134225919|x(),!e)return(0|r[t+4>>2])>2||(0|r[t+8>>2])>2||(0|r[t+12>>2])>2?(c=0,w(0|(l=0)),P=i,0|c):(Ce(0|U(t),0,45),l=0|x()|n,c=-1,w(0|l),P=i,0|c);if(r[c>>2]=r[t>>2],r[c+4>>2]=r[t+4>>2],r[c+8>>2]=r[t+8>>2],r[c+12>>2]=r[t+12>>2],l=c+4|0,(0|e)>0)for(t=-1;r[s>>2]=r[l>>2],r[s+4>>2]=r[l+4>>2],r[s+8>>2]=r[l+8>>2],1&e?(et(l),r[o>>2]=r[l>>2],r[o+4>>2]=r[l+4>>2],r[o+8>>2]=r[l+8>>2],nt(o)):(it(l),r[o>>2]=r[l>>2],r[o+4>>2]=r[l+4>>2],r[o+8>>2]=r[l+8>>2],rt(o)),X(s,o,a),q(a),h=0|Ce(7,0,0|(u=3*(15-e|0)|0)),n&=~(0|x()),t=(u=0|Ce(0|tt(a),0,0|u))|t&~h,n=0|x()|n,(0|e)>1;)e=e+-1|0;else t=-1;t:do{if((0|r[l>>2])<=2&&(0|r[c+8>>2])<=2&&(0|r[c+12>>2])<=2){if(e=0|Ce(0|(s=0|U(c)),0,45),e|=t,t=0|x()|-1040385&n,a=0|B(c),!(0|F(s))){if((0|a)<=0)break;for(o=0;;){if(s=0|xe(0|e,0|t,52),x(),s&=15)for(n=1;c=0|xe(0|e,0|t,0|(u=3*(15-n|0)|0)),x(),h=0|Ce(7,0,0|u),t&=~(0|x()),e=e&~h|(u=0|Ce(0|lt(7&c),0,0|u)),t=0|t|x(),n>>>0<s>>>0;)n=n+1|0;if((0|(o=o+1|0))==(0|a))break t}}o=0|xe(0|e,0|t,52),x(),o&=15;e:do{if(o){n=1;i:for(;;){switch(u=0|xe(0|e,0|t,3*(15-n|0)|0),x(),7&u){case 1:break i;case 0:break;default:break e}if(!(n>>>0<o>>>0))break e;n=n+1|0}if(0|N(s,0|r[c>>2]))for(n=1;h=0|Ce(7,0,0|(c=3*(15-n|0)|0)),u=t&~(0|x()),t=0|xe(0|e,0|t,0|c),x(),e=e&~h|(t=0|Ce(0|ct(7&t),0,0|c)),t=0|u|x(),n>>>0<o>>>0;)n=n+1|0;else for(n=1;c=0|xe(0|e,0|t,0|(u=3*(15-n|0)|0)),x(),h=0|Ce(7,0,0|u),t&=~(0|x()),e=e&~h|(u=0|Ce(0|lt(7&c),0,0|u)),t=0|t|x(),n>>>0<o>>>0;)n=n+1|0}}while(0);if((0|a)>0){n=0;do{e=0|Ft(e,t),t=0|x(),n=n+1|0}while((0|n)!=(0|a))}}else e=0,t=0}while(0);return u=e,w(0|(h=t)),P=i,0|u}(i,e),t=0|x()):(t=0,e=0),w(0|t),P=n,0|e}function zt(t,e,i){var n,s=0,o=0,a=0;if(n=4+(i|=0)|0,o=0|xe(0|(t|=0),0|(e|=0),52),x(),o&=15,a=0|xe(0|t,0|e,45),x(),s=0==(0|o),0|F(127&a)){if(s)return 1;s=1}else{if(s)return 0;s=0==(0|r[n>>2])&&0==(0|r[i+8>>2])?0!=(0|r[i+12>>2])&1:1}for(i=1;1&i?nt(n):rt(n),a=0|xe(0|t,0|e,3*(15-i|0)|0),x(),st(n,7&a),i>>>0<o>>>0;)i=i+1|0;return 0|s}function Ht(t,e,i){i|=0;var n,s,o=0,a=0,l=0,c=0,h=0,u=0;s=P,P=P+16|0,n=s,u=0|xe(0|(t|=0),0|(e|=0),45),x(),u&=127;t:do{if(0!=(0|F(u))&&(l=0|xe(0|t,0|e,52),x(),0!=(0|(l&=15)))){o=1;e:for(;;){switch(h=0|xe(0|t,0|e,3*(15-o|0)|0),x(),7&h){case 5:break e;case 0:break;default:o=e;break t}if(!(o>>>0<l>>>0)){o=e;break t}o=o+1|0}for(a=1,o=e;c=0|Ce(7,0,0|(e=3*(15-a|0)|0)),h=o&~(0|x()),o=0|xe(0|t,0|o,0|e),x(),t=t&~c|(o=0|Ce(0|ct(7&o),0,0|e)),o=0|h|x(),a>>>0<l>>>0;)a=a+1|0}else o=e}while(0);if(r[i>>2]=r[(h=7728+(28*u|0)|0)>>2],r[i+4>>2]=r[h+4>>2],r[i+8>>2]=r[h+8>>2],r[i+12>>2]=r[h+12>>2],0|zt(t,o,i)){if(r[n>>2]=r[(c=i+4|0)>>2],r[n+4>>2]=r[c+4>>2],r[n+8>>2]=r[c+8>>2],l=0|xe(0|t,0|o,52),x(),h=15&l,1&l?(rt(c),l=h+1|0):l=h,0|F(u)){t:do{if(h)for(e=1;;){if(a=0|xe(0|t,0|o,3*(15-e|0)|0),x(),0|(a&=7)){o=a;break t}if(!(e>>>0<h>>>0)){o=0;break}e=e+1|0}else o=0}while(0);o=4==(0|o)&1}else o=0;if(0|wt(i,l,o,0)){if(0|F(u))do{}while(0!=(0|wt(i,l,0,0)));(0|l)!=(0|h)&&it(c)}else(0|l)!=(0|h)&&(r[c>>2]=r[n>>2],r[c+4>>2]=r[n+4>>2],r[c+8>>2]=r[n+8>>2]);P=s}else P=s}function Kt(t,e,i){var n,r;i|=0,n=P,P=P+16|0,Ht(t|=0,e|=0,r=n),e=0|xe(0|t,0|e,52),x(),vt(r,15&e,i),P=n}function $t(t,e,i){i|=0;var n,r,s=0,o=0;r=P,P=P+16|0,Ht(t|=0,e|=0,n=r),s=0|xe(0|t,0|e,45),x(),s=0==(0|F(127&s)),o=0|xe(0|t,0|e,52),x(),o&=15;t:do{if(!s){if(0|o)for(s=1;;){if(!(0==((0|Ce(7,0,3*(15-s|0)|0))&t|0)&0==((0|x())&e|0)))break t;if(!(s>>>0<o>>>0))break;s=s+1|0}return _t(n,o,0,5,i),void(P=r)}}while(0);Ct(n,o,0,6,i),P=r}function Gt(t,e){e|=0;var i,n=0,s=0,o=0,a=0,l=0,c=0;if(Ce(0|(t|=0),0,52),i=134225919|x(),(0|t)<1){s=0,n=0;do{0|F(s)&&(Ce(0|s,0,45),l=0|i|x(),r[(t=e+(n<<3)|0)>>2]=-1,r[t+4>>2]=l,n=n+1|0),s=s+1|0}while(122!=(0|s))}else{l=0,n=0;do{if(0|F(l)){for(Ce(0|l,0,45),s=1,o=-1,a=0|i|x();o&=~(c=0|Ce(7,0,3*(15-s|0)|0)),a&=~(0|x()),(0|s)!=(0|t);)s=s+1|0;r[(c=e+(n<<3)|0)>>2]=o,r[c+4>>2]=a,n=n+1|0}l=l+1|0}while(122!=(0|l))}}function Wt(t,e,i,n){var s,o,a=0,l=0,c=0,h=0;if(s=P,P=P+64|0,o=s,(0|(t|=0))==(0|(i|=0))&(0|(e|=0))==(0|(n|=0))|!1|134217728!=(2013265920&e|0)|!1|134217728!=(2013265920&n|0))return P=s,0;if(a=0|xe(0|t,0|e,52),x(),a&=15,l=0|xe(0|i,0|n,52),x(),(0|a)!=(15&l|0))return P=s,0;if(l=a+-1|0,a>>>0>1&&(h=0|Mt(t,e,l),c=0|x(),(0|h)==(0|(l=0|Mt(i,n,l)))&(0|c)==(0|x()))){if(a=0|xe(0|t,0|e,0|(l=3*(15^a)|0)),x(),a&=7,l=0|xe(0|i,0|n,0|l),x(),0==(0|a)|0==(0|(l&=7)))return P=s,1;if((0|r[21136+(a<<2)>>2])==(0|l))return P=s,1;if((0|r[21168+(a<<2)>>2])==(0|l))return P=s,1}l=(a=o)+56|0;do{r[a>>2]=0,a=a+4|0}while((0|a)<(0|l));return O(t,e,1,o),a=(0|r[(h=o)>>2])==(0|i)&&(0|r[h+4>>2])==(0|n)||(0|r[(h=o+8|0)>>2])==(0|i)&&(0|r[h+4>>2])==(0|n)||(0|r[(h=o+16|0)>>2])==(0|i)&&(0|r[h+4>>2])==(0|n)||(0|r[(h=o+24|0)>>2])==(0|i)&&(0|r[h+4>>2])==(0|n)||(0|r[(h=o+32|0)>>2])==(0|i)&&(0|r[h+4>>2])==(0|n)||(0|r[(h=o+40|0)>>2])==(0|i)&&(0|r[h+4>>2])==(0|n)?1:1&((0|r[(a=o+48|0)>>2])==(0|i)?(0|r[a+4>>2])==(0|n):0),P=s,0|a}function Zt(t,e,i){i|=0;var n,s,o,a,l=0;if(o=P,P=P+16|0,s=o,l=0|xe(0|(t|=0),0|(e|=0),56),x(),-1==(0|(e=0|function(t,e,i){i|=0;var n,s=0;return s=0|Rt(t|=0,e|=0),(i+-1|0)>>>0>5||1==(0|i)&(n=0!=(0|s))?-1:(s=0|function(t,e){var i,n,s,o,a=0,l=0,c=0,h=0;if(s=P,P=P+32|0,n=s,Ht(t|=0,e|=0,i=s+16|0),c=0|Pt(t,e),o=0|Vt(t,e),function(t,e){r[(e|=0)>>2]=r[(t=7728+(28*(t|=0)|0)|0)>>2],r[e+4>>2]=r[t+4>>2],r[e+8>>2]=r[t+8>>2],r[e+12>>2]=r[t+12>>2]}(c,n),e=0|function(t,e){t|=0;var i=0,n=0;if((e|=0)>>>0>20)return-1;do{if((0|r[11152+(216*e|0)>>2])!=(0|t))if((0|r[11152+(216*e|0)+8>>2])!=(0|t))if((0|r[11152+(216*e|0)+16>>2])!=(0|t))if((0|r[11152+(216*e|0)+24>>2])!=(0|t))if((0|r[11152+(216*e|0)+32>>2])!=(0|t))if((0|r[11152+(216*e|0)+40>>2])!=(0|t))if((0|r[11152+(216*e|0)+48>>2])!=(0|t))if((0|r[11152+(216*e|0)+56>>2])!=(0|t))if((0|r[11152+(216*e|0)+64>>2])!=(0|t))if((0|r[11152+(216*e|0)+72>>2])!=(0|t))if((0|r[11152+(216*e|0)+80>>2])!=(0|t))if((0|r[11152+(216*e|0)+88>>2])!=(0|t))if((0|r[11152+(216*e|0)+96>>2])!=(0|t))if((0|r[11152+(216*e|0)+104>>2])!=(0|t))if((0|r[11152+(216*e|0)+112>>2])!=(0|t))if((0|r[11152+(216*e|0)+120>>2])!=(0|t))if((0|r[11152+(216*e|0)+128>>2])!=(0|t)){if((0|r[11152+(216*e|0)+136>>2])!=(0|t)){if((0|r[11152+(216*e|0)+144>>2])==(0|t)){t=0,i=2,n=0;break}if((0|r[11152+(216*e|0)+152>>2])==(0|t)){t=0,i=2,n=1;break}if((0|r[11152+(216*e|0)+160>>2])==(0|t)){t=0,i=2,n=2;break}if((0|r[11152+(216*e|0)+168>>2])==(0|t)){t=1,i=2,n=0;break}if((0|r[11152+(216*e|0)+176>>2])==(0|t)){t=1,i=2,n=1;break}if((0|r[11152+(216*e|0)+184>>2])==(0|t)){t=1,i=2,n=2;break}if((0|r[11152+(216*e|0)+192>>2])==(0|t)){t=2,i=2,n=0;break}if((0|r[11152+(216*e|0)+200>>2])==(0|t)){t=2,i=2,n=1;break}if((0|r[11152+(216*e|0)+208>>2])==(0|t)){t=2,i=2,n=2;break}return-1}t=2,i=1,n=2}else t=2,i=1,n=1;else t=2,i=1,n=0;else t=1,i=1,n=2;else t=1,i=1,n=1;else t=1,i=1,n=0;else t=0,i=1,n=2;else t=0,i=1,n=1;else t=0,i=1,n=0;else t=2,i=0,n=2;else t=2,i=0,n=1;else t=2,i=0,n=0;else t=1,i=0,n=2;else t=1,i=0,n=1;else t=1,i=0,n=0;else t=0,i=0,n=2;else t=0,i=0,n=1;else t=0,i=0,n=0}while(0);return 0|r[11152+(216*e|0)+(72*i|0)+(24*t|0)+(n<<3)+4>>2]}(c,0|r[i>>2]),!(0|F(c)))return P=s,0|e;switch(0|c){case 4:t=0,a=14;break;case 14:t=1,a=14;break;case 24:t=2,a=14;break;case 38:t=3,a=14;break;case 49:t=4,a=14;break;case 58:t=5,a=14;break;case 63:t=6,a=14;break;case 72:t=7,a=14;break;case 83:t=8,a=14;break;case 97:t=9,a=14;break;case 107:t=10,a=14;break;case 117:t=11,a=14;break;default:h=0,l=0}return 14==(0|a)&&(h=0|r[22096+(24*t|0)+8>>2],l=0|r[22096+(24*t|0)+16>>2]),(0|(t=0|r[i>>2]))!=(0|r[n>>2])&&(c=0|L(c))|(0|(t=0|r[i>>2]))==(0|l)&&(e=(e+1|0)%6|0),3==(0|o)&(0|t)==(0|l)?(P=s,0|(e+5|0)%6):5==(0|o)&(0|t)==(0|h)?(P=s,0|(e+1|0)%6):(P=s,0|e)}(t,e),n?0|(i=(5-s+(0|r[22384+(i<<2)>>2])|0)%5|0):0|(i=(6-s+(0|r[22416+(i<<2)>>2])|0)%6|0))}(n=(a=!0&268435456==(2013265920&e|0))?t:0,t=a?-2130706433&e|134217728:0,7&l))))return r[i>>2]=0,void(P=o);Ht(n,t,s),l=0|xe(0|n,0|t,52),x(),l&=15,0|Rt(n,t)?_t(s,l,e,2,i):Ct(s,l,e,2,i),P=o}function qt(t){t|=0;var e,i,n=0;return(e=0|ve(1,12))||C(22691,22646,49,22704),0|(n=0|r[(i=t+4|0)>>2])?(r[(n=n+8|0)>>2]=e,r[i>>2]=e,0|e):(0|r[t>>2]&&C(22721,22646,61,22744),r[(n=t)>>2]=e,r[i>>2]=e,0|e)}function Yt(t,e){var i,n;return t|=0,e|=0,(n=0|Ae(24))||C(22758,22646,78,22772),r[n>>2]=r[e>>2],r[n+4>>2]=r[e+4>>2],r[n+8>>2]=r[e+8>>2],r[n+12>>2]=r[e+12>>2],r[n+16>>2]=0,0|(i=0|r[(e=t+4|0)>>2])?(r[i+16>>2]=n,r[e>>2]=n,0|n):(0|r[t>>2]&&C(22787,22646,82,22772),r[t>>2]=n,r[e>>2]=n,0|n)}function Qt(t){var e,i,n=0,o=0,a=0,c=0,h=0,u=0,d=0,p=0,f=0,m=0,g=0,A=0,b=0,v=0,_=0,y=0,w=0,x=0,S=0,k=0,E=0,D=0,I=0,P=0,O=0,M=0,T=0,R=0,V=0,F=0;if(0|r[(c=8+(t|=0)|0)>>2])return 1;if(!(a=0|r[t>>2]))return 0;n=a,o=0;do{o=o+1|0,n=0|r[n+8>>2]}while(0!=(0|n));if(o>>>0<2)return 0;(i=0|Ae(o<<2))||C(22807,22646,317,22826),(e=0|Ae(o<<5))||C(22848,22646,321,22826),r[t>>2]=0,r[(D=t+4|0)>>2]=0,r[c>>2]=0,o=0,R=0,E=0,g=0;t:for(;;){if(m=0|r[a>>2]){h=0,u=m;do{if(n=u,+l(+((p=+s[u+8>>3])-(d=+s[(c=(f=0==(0|(u=0|r[u+16>>2])))?m:u)+8>>3])))>3.141592653589793){F=14;break}h+=(d-p)*(+s[n>>3]+ +s[c>>3])}while(!f);if(14==(0|F)){F=0,h=0,n=m;do{h+=(+s[n>>3]+ +s[(M=0==(0|(M=0|r[(T=n+16|0)>>2]))?m:M)>>3])*(((S=+s[M+8>>3])<0?S+6.283185307179586:S)-((k=+s[n+8>>3])<0?k+6.283185307179586:k)),n=0|r[(0==(0|n)?a:T)>>2]}while(0!=(0|n))}h>0?(r[i+(R<<2)>>2]=a,R=R+1|0,c=E,n=g):F=19}else F=19;if(19==(0|F)){F=0;do{if(!o){if(g){c=D,u=g+8|0,n=a,o=t;break}if(0|r[t>>2]){F=27;break t}c=D,u=t,n=a,o=t;break}if(0|r[(n=o+8|0)>>2]){F=21;break t}if(!(o=0|ve(1,12))){F=23;break t}r[n>>2]=o,c=o+4|0,u=o,n=g}while(0);if(r[u>>2]=a,r[c>>2]=a,u=e+(E<<5)|0,f=0|r[a>>2]){for(s[(m=e+(E<<5)+8|0)>>3]=17976931348623157e292,s[(g=e+(E<<5)+24|0)>>3]=17976931348623157e292,s[u>>3]=-17976931348623157e292,s[(A=e+(E<<5)+16|0)>>3]=-17976931348623157e292,w=17976931348623157e292,x=-17976931348623157e292,c=0,b=f,p=17976931348623157e292,_=17976931348623157e292,y=-17976931348623157e292,d=-17976931348623157e292;h=+s[b>>3],k=+s[b+8>>3],S=+s[((v=0==(0|(b=0|r[b+16>>2])))?f:b)+8>>3],h<p&&(s[m>>3]=h,p=h),k<_&&(s[g>>3]=k,_=k),h>y?s[u>>3]=h:h=y,k>d&&(s[A>>3]=k,d=k),w=k>0&k<w?k:w,x=k<0&k>x?k:x,c|=+l(+(k-S))>3.141592653589793,!v;)y=h;c&&(s[A>>3]=x,s[g>>3]=w)}else r[u>>2]=0,r[u+4>>2]=0,r[u+8>>2]=0,r[u+12>>2]=0,r[u+16>>2]=0,r[u+20>>2]=0,r[u+24>>2]=0,r[u+28>>2]=0;c=E+1|0}if(a=0|r[(T=a+8|0)>>2],r[T>>2]=0,!a){F=45;break}E=c,g=n}if(21==(0|F))C(22624,22646,35,22658);else if(23==(0|F))C(22678,22646,37,22658);else if(27==(0|F))C(22721,22646,61,22744);else if(45==(0|F)){t:do{if((0|R)>0){for(T=0==(0|c),O=c<<2,M=0==(0|t),P=0,n=0;;){if(I=0|r[i+(P<<2)>>2],T)F=73;else{if(!(E=0|Ae(O))){F=50;break}if(!(D=0|Ae(O))){F=52;break}e:do{if(M)o=0;else{for(c=0,o=0,u=t;0|Xt(0|r[u>>2],a=e+(c<<5)|0,0|r[I>>2])?(r[E+(o<<2)>>2]=u,r[D+(o<<2)>>2]=a,v=o+1|0):v=o,u=0|r[u+8>>2];)c=c+1|0,o=v;if((0|v)>0)if(a=0|r[E>>2],1==(0|v))o=a;else for(A=0,b=-1,o=a,g=a;;){for(f=0|r[g>>2],a=0,u=0;m=(0|(c=0|r[r[E+(u<<2)>>2]>>2]))==(0|f)?a:a+(1&(0|Xt(c,0|r[D+(u<<2)>>2],0|r[f>>2])))|0,(0|(u=u+1|0))!=(0|v);)a=m;if(o=(c=(0|m)>(0|b))?g:o,(0|(a=A+1|0))==(0|v))break e;A=a,b=c?m:b,g=0|r[E+(a<<2)>>2]}else o=0}}while(0);if(be(E),be(D),o){if(a=0|r[(c=o+4|0)>>2])o=a+8|0;else if(0|r[o>>2]){F=70;break}r[o>>2]=I,r[c>>2]=I}else F=73}if(73==(0|F)){if(F=0,0|(n=0|r[I>>2]))do{D=n,n=0|r[n+16>>2],be(D)}while(0!=(0|n));be(I),n=2}if((0|(P=P+1|0))>=(0|R)){V=n;break t}}50==(0|F)?C(22863,22646,249,22882):52==(0|F)?C(22901,22646,252,22882):70==(0|F)&&C(22721,22646,61,22744)}else V=0}while(0);return be(i),be(e),0|V}return 0}function Xt(t,e,i){t|=0;var n,o=0,a=0,l=0,c=0,h=0,u=0,d=0;if(!(0|K(e|=0,i|=0)))return 0;if(e=0|H(e),n=+s[i>>3],o=e&(o=+s[i+8>>3])<0?o+6.283185307179586:o,!(t=0|r[t>>2]))return 0;if(e){e=0,i=t;t:for(;;){for(;c=+s[i>>3],u=+s[i+8>>3],a=+s[(d=0==(0|(d=0|r[(i=i+16|0)>>2]))?t:d)+8>>3],c>(l=+s[d>>3])?(h=c,c=u):(h=l,l=c,c=a,a=u),n<l|n>h;)if(!(i=0|r[i>>2])){i=22;break t}if(o=(c=c<0?c+6.283185307179586:c)==o|(u=a<0?a+6.283185307179586:a)==o?o+-2220446049250313e-31:o,((u+=(n-l)/(h-l)*(c-u))<0?u+6.283185307179586:u)>o&&(e^=1),!(i=0|r[i>>2])){i=22;break}}if(22==(0|i))return 0|e}else{e=0,i=t;t:for(;;){for(;c=+s[i>>3],u=+s[i+8>>3],a=+s[(d=0==(0|(d=0|r[(i=i+16|0)>>2]))?t:d)+8>>3],c>(l=+s[d>>3])?(h=c,c=u):(h=l,l=c,c=a,a=u),n<l|n>h;)if(!(i=0|r[i>>2])){i=22;break t}if(a+(n-l)/(h-l)*(c-a)>(o=c==o|a==o?o+-2220446049250313e-31:o)&&(e^=1),!(i=0|r[i>>2])){i=22;break}}if(22==(0|i))return 0|e}return 0}function Jt(t,e,i,s,o){i|=0,s|=0,o|=0;var a,l,c,h,u,d=0,p=0,f=0,m=0,g=0,A=0,b=0,v=0,_=0;if(h=P,P=P+32|0,u=h+16|0,c=h,d=0|xe(0|(t|=0),0|(e|=0),52),x(),d&=15,b=0|xe(0|i,0|s,52),x(),(0|d)!=(15&b|0))return P=h,1;if(g=0|xe(0|t,0|e,45),x(),g&=127,A=0|xe(0|i,0|s,45),x(),b=(0|g)!=(0|(A&=127))){if(7==(0|(f=0|z(g,A))))return P=h,2;7==(0|(m=0|z(A,g)))?C(22925,22949,151,22959):(v=f,p=m)}else v=0,p=0;a=0|F(g),l=0|F(A),r[u>>2]=0,r[u+4>>2]=0,r[u+8>>2]=0,r[u+12>>2]=0;do{if(v){if(f=(0|(A=0|r[4304+(28*g|0)+(v<<2)>>2]))>0,l)if(f){g=0,m=i,f=s;do{m=0|Ut(m,f),f=0|x(),1==(0|(p=0|ct(p)))&&(p=0|ct(1)),g=g+1|0}while((0|g)!=(0|A));A=p,g=m,m=f}else A=p,g=i,m=s;else if(f){g=0,m=i,f=s;do{m=0|Bt(m,f),f=0|x(),p=0|ct(p),g=g+1|0}while((0|g)!=(0|A));A=p,g=m,m=f}else A=p,g=i,m=s;if(zt(g,m,u),b||C(22972,22949,181,22959),(f=0!=(0|a))&(p=0!=(0|l))&&C(22999,22949,182,22959),f){if(p=0|Vt(t,e),0|n[22032+(7*p|0)+v>>0]){d=3;break}g=m=0|r[21200+(28*p|0)+(v<<2)>>2],_=26}else if(p){if(p=0|Vt(g,m),0|n[22032+(7*p|0)+A>>0]){d=4;break}g=0,m=0|r[21200+(28*A|0)+(p<<2)>>2],_=26}else p=0;if(26==(0|_))if((0|m)<=-1&&C(23030,22949,212,22959),(0|g)<=-1&&C(23053,22949,213,22959),(0|m)>0){f=u+4|0,p=0;do{at(f),p=p+1|0}while((0|p)!=(0|m));p=g}else p=g;if(r[c>>2]=0,r[c+4>>2]=0,r[c+8>>2]=0,st(c,v),0|d)for(;0|Nt(d)?nt(c):rt(c),(0|d)>1;)d=d+-1|0;if((0|p)>0){d=0;do{at(c),d=d+1|0}while((0|d)!=(0|p))}Q(_=u+4|0,c,_),q(_),_=50}else if(zt(i,s,u),0!=(0|a)&0!=(0|l))if((0|A)!=(0|g)&&C(23077,22949,243,22959),p=0|Vt(t,e),d=0|Vt(i,s),0|n[22032+(7*p|0)+d>>0])d=5;else if((0|(p=0|r[21200+(28*p|0)+(d<<2)>>2]))>0){f=u+4|0,d=0;do{at(f),d=d+1|0}while((0|d)!=(0|p));_=50}else _=50;else _=50}while(0);return 50==(0|_)&&(r[o>>2]=r[(d=u+4|0)>>2],r[o+4>>2]=r[d+4>>2],r[o+8>>2]=r[d+8>>2],d=0),P=h,0|d}function te(t,e,i,n){i|=0,n|=0;var s,o,a=0,l=0,c=0,h=0,u=0,d=0,p=0,f=0,m=0,g=0,A=0,b=0,v=0;if(o=P,P=P+48|0,c=o+36|0,h=o+24|0,u=o+12|0,d=o,l=0|xe(0|(t|=0),0|(e|=0),52),x(),l&=15,f=0|xe(0|t,0|e,45),x(),s=0|F(f&=127),Ce(0|l,0,52),A=134225919|x(),r[(g=n)>>2]=-1,r[g+4>>2]=A,!l)return(0|r[i>>2])>1||(0|r[i+4>>2])>1||(0|r[i+8>>2])>1||127==(0|(a=0|j(f,0|tt(i))))?(P=o,0|(A=1)):(m=0|Ce(0|a,0,45),g=0|x(),g|=-1040385&r[(f=n)+4>>2],r[(A=n)>>2]=r[f>>2]|m,r[A+4>>2]=g,P=o,0|(A=0));for(r[c>>2]=r[i>>2],r[c+4>>2]=r[i+4>>2],r[c+8>>2]=r[i+8>>2];r[h>>2]=r[c>>2],r[h+4>>2]=r[c+4>>2],r[h+8>>2]=r[c+8>>2],0|Nt(l)?(et(c),r[u>>2]=r[c>>2],r[u+4>>2]=r[c+4>>2],r[u+8>>2]=r[c+8>>2],nt(u)):(it(c),r[u>>2]=r[c>>2],r[u+4>>2]=r[c+4>>2],r[u+8>>2]=r[c+8>>2],rt(u)),X(h,u,d),q(d),b=0|r[(g=n)>>2],g=0|r[g+4>>2],i=0|Ce(7,0,0|(v=3*(15-l|0)|0)),g&=~(0|x()),v=0|Ce(0|tt(d),0,0|v),g=0|x()|g,r[(A=n)>>2]=v|b&~i,r[A+4>>2]=g,(0|l)>1;)l=l+-1|0;t:do{if((0|r[c>>2])<=1&&(0|r[c+4>>2])<=1&&(0|r[c+8>>2])<=1){d=127==(0|(h=0|j(f,l=0|tt(c))))?0:0|F(h);e:do{if(l){if(s){if(c=21408+(28*(0|Vt(t,e))|0)+(l<<2)|0,(0|(c=0|r[c>>2]))>0){i=0;do{l=0|lt(l),i=i+1|0}while((0|i)!=(0|c))}if(1==(0|l)){a=3;break t}127==(0|(i=0|j(f,l)))&&C(23104,22949,376,23134),0|F(i)?C(23147,22949,377,23134):(m=c,p=l,a=i)}else m=0,p=l,a=h;if((0|(u=0|r[4304+(28*f|0)+(p<<2)>>2]))<=-1&&C(23178,22949,384,23134),!d){if((0|m)<=-1&&C(23030,22949,417,23134),0|m){l=0,i=0|r[(c=n)>>2],c=0|r[c+4>>2];do{i=0|Lt(i,c),c=0|x(),r[(v=n)>>2]=i,r[v+4>>2]=c,l=l+1|0}while((0|l)<(0|m))}if((0|u)<=0){l=54;break}for(l=0,i=0|r[(c=n)>>2],c=0|r[c+4>>2];;)if(i=0|Lt(i,c),c=0|x(),r[(v=n)>>2]=i,r[v+4>>2]=c,(0|(l=l+1|0))==(0|u)){l=54;break e}}if(7==(0|(h=0|z(a,f)))&&C(22925,22949,393,23134),i=0|r[(l=n)>>2],l=0|r[l+4>>2],(0|u)>0){c=0;do{i=0|Lt(i,l),l=0|x(),r[(v=n)>>2]=i,r[v+4>>2]=l,c=c+1|0}while((0|c)!=(0|u))}if(i=0|Vt(i,l),v=0|L(a),(0|(i=0|r[(v?21824:21616)+(28*h|0)+(i<<2)>>2]))<=-1&&C(23030,22949,412,23134),i){l=0,c=0|r[(h=n)>>2],h=0|r[h+4>>2];do{c=0|Ft(c,h),h=0|x(),r[(v=n)>>2]=c,r[v+4>>2]=h,l=l+1|0}while((0|l)<(0|i));l=54}else l=54}else if(0!=(0|s)&0!=(0|d))if(l=21408+(28*(v=0|Vt(t,e))|0)+((0|Vt(0|r[(l=n)>>2],0|r[l+4>>2]))<<2)|0,(0|(l=0|r[l>>2]))<=-1&&C(23201,22949,433,23134),l){a=0,i=0|r[(c=n)>>2],c=0|r[c+4>>2];do{i=0|Lt(i,c),c=0|x(),r[(v=n)>>2]=i,r[v+4>>2]=c,a=a+1|0}while((0|a)<(0|l));a=h,l=54}else a=h,l=55;else a=h,l=54}while(0);if(54==(0|l)&&d&&(l=55),55==(0|l)&&1==(0|Vt(0|r[(v=n)>>2],0|r[v+4>>2]))){a=4;break}A=0|r[(v=n)>>2],v=-1040385&r[v+4>>2],b=0|Ce(0|a,0,45),v=0|v|x(),r[(a=n)>>2]=A|b,r[a+4>>2]=v,a=0}else a=2}while(0);return P=o,0|a}function ee(t,e){var i=0;if(!(e|=0))return 1;i=t|=0,t=1;do{t=0|v(0==(1&e|0)?1:i,t),e>>=1,i=0|v(i,i)}while(0!=(0|e));return 0|t}function ie(t,e,i){t|=0;var n,o,a,l=0,c=0,h=0,u=0,d=0,p=0,f=0;if(!(0|K(e|=0,i|=0)))return 0;if(e=0|H(e),o=+s[i>>3],l=e&(l=+s[i+8>>3])<0?l+6.283185307179586:l,(0|(a=0|r[t>>2]))<=0)return 0;if(n=0|r[t+4>>2],e){e=0,i=-1,t=0;t:for(;;){for(f=t;p=+s[n+(f<<4)+8>>3],c=+s[n+((t=(i+2|0)%(0|a)|0)<<4)+8>>3],(u=+s[n+(f<<4)>>3])>(h=+s[n+(t<<4)>>3])?(d=u,u=p):(d=h,h=u,u=c,c=p),o<h|o>d;){if(!((0|(i=f+1|0))<(0|a))){i=22;break t}t=f,f=i,i=t}if(l=(u=u<0?u+6.283185307179586:u)==l|(p=c<0?c+6.283185307179586:c)==l?l+-2220446049250313e-31:l,((p+=(o-h)/(d-h)*(u-p))<0?p+6.283185307179586:p)>l&&(e^=1),(0|(t=f+1|0))>=(0|a)){i=22;break}i=f}if(22==(0|i))return 0|e}else{e=0,i=-1,t=0;t:for(;;){for(f=t;p=+s[n+(f<<4)+8>>3],c=+s[n+((t=(i+2|0)%(0|a)|0)<<4)+8>>3],(u=+s[n+(f<<4)>>3])>(h=+s[n+(t<<4)>>3])?(d=u,u=p):(d=h,h=u,u=c,c=p),o<h|o>d;){if(!((0|(i=f+1|0))<(0|a))){i=22;break t}t=f,f=i,i=t}if(c+(o-h)/(d-h)*(u-c)>(l=u==l|c==l?l+-2220446049250313e-31:l)&&(e^=1),(0|(t=f+1|0))>=(0|a)){i=22;break}i=f}if(22==(0|i))return 0|e}return 0}function ne(t,e){e|=0;var i,n,o,a,c,h=0,u=0,d=0,p=0,f=0,m=0,g=0,A=0,b=0,v=0,_=0,y=0;if(!(n=0|r[(t|=0)>>2]))return r[e>>2]=0,r[e+4>>2]=0,r[e+8>>2]=0,r[e+12>>2]=0,r[e+16>>2]=0,r[e+20>>2]=0,r[e+24>>2]=0,void(r[e+28>>2]=0);if(s[(o=e+8|0)>>3]=17976931348623157e292,s[(a=e+24|0)>>3]=17976931348623157e292,s[e>>3]=-17976931348623157e292,s[(c=e+16|0)>>3]=-17976931348623157e292,!((0|n)<=0)){for(i=0|r[t+4>>2],A=17976931348623157e292,b=-17976931348623157e292,v=0,t=-1,p=17976931348623157e292,f=17976931348623157e292,g=-17976931348623157e292,u=-17976931348623157e292,_=0;m=+s[i+(_<<4)+8>>3],d=+s[i+(((0|(t=t+2|0))==(0|n)?0:t)<<4)+8>>3],(h=+s[i+(_<<4)>>3])<p&&(s[o>>3]=h,p=h),m<f&&(s[a>>3]=m,f=m),h>g?s[e>>3]=h:h=g,m>u&&(s[c>>3]=m,u=m),A=m>0&m<A?m:A,b=m<0&m>b?m:b,v|=+l(+(m-d))>3.141592653589793,(0|(t=_+1|0))!=(0|n);)y=_,g=h,_=t,t=y;v&&(s[c>>3]=b,s[a>>3]=A)}}function re(t,e){e|=0;var i,n=0,o=0,a=0,c=0,h=0,u=0,d=0,p=0,f=0,m=0,g=0,A=0,b=0,v=0,_=0,y=0,w=0,x=0,C=0,S=0,k=0;if(b=0|r[(t|=0)>>2]){if(s[(v=e+8|0)>>3]=17976931348623157e292,s[(_=e+24|0)>>3]=17976931348623157e292,s[e>>3]=-17976931348623157e292,s[(y=e+16|0)>>3]=-17976931348623157e292,(0|b)>0){for(a=0|r[t+4>>2],g=17976931348623157e292,A=-17976931348623157e292,o=0,n=-1,d=17976931348623157e292,p=17976931348623157e292,m=-17976931348623157e292,h=-17976931348623157e292,w=0;f=+s[a+(w<<4)+8>>3],u=+s[a+(((0|(S=n+2|0))==(0|b)?0:S)<<4)+8>>3],(c=+s[a+(w<<4)>>3])<d&&(s[v>>3]=c,d=c),f<p&&(s[_>>3]=f,p=f),c>m?s[e>>3]=c:c=m,f>h&&(s[y>>3]=f,h=f),g=f>0&f<g?f:g,A=f<0&f>A?f:A,o|=+l(+(f-u))>3.141592653589793,(0|(n=w+1|0))!=(0|b);)S=w,m=c,w=n,n=S;o&&(s[y>>3]=A,s[_>>3]=g)}}else r[e>>2]=0,r[e+4>>2]=0,r[e+8>>2]=0,r[e+12>>2]=0,r[e+16>>2]=0,r[e+20>>2]=0,r[e+24>>2]=0,r[e+28>>2]=0;if(!((0|(n=0|r[(S=t+8|0)>>2]))<=0)){i=t+12|0,C=0;do{if(o=C,_=e+((C=C+1|0)<<5)|0,y=0|r[(a=0|r[i>>2])+(o<<3)>>2]){if(s[(w=e+(C<<5)+8|0)>>3]=17976931348623157e292,s[(t=e+(C<<5)+24|0)>>3]=17976931348623157e292,s[_>>3]=-17976931348623157e292,s[(x=e+(C<<5)+16|0)>>3]=-17976931348623157e292,(0|y)>0){for(b=0|r[a+(o<<3)+4>>2],g=17976931348623157e292,A=-17976931348623157e292,a=0,o=-1,v=0,d=17976931348623157e292,p=17976931348623157e292,f=-17976931348623157e292,h=-17976931348623157e292;m=+s[b+(v<<4)+8>>3],u=+s[b+(((0|(o=o+2|0))==(0|y)?0:o)<<4)+8>>3],(c=+s[b+(v<<4)>>3])<d&&(s[w>>3]=c,d=c),m<p&&(s[t>>3]=m,p=m),c>f?s[_>>3]=c:c=f,m>h&&(s[x>>3]=m,h=m),g=m>0&m<g?m:g,A=m<0&m>A?m:A,a|=+l(+(m-u))>3.141592653589793,(0|(o=v+1|0))!=(0|y);)k=v,v=o,f=c,o=k;a&&(s[x>>3]=A,s[t>>3]=g)}}else r[_>>2]=0,r[_+4>>2]=0,r[_+8>>2]=0,r[_+12>>2]=0,r[_+16>>2]=0,r[_+20>>2]=0,r[_+24>>2]=0,r[_+28>>2]=0,n=0|r[S>>2]}while((0|C)<(0|n))}}function se(t,e,i){var n,s=0;if(!(0|ie(t|=0,e|=0,i|=0)))return 0;if((0|r[(n=t+8|0)>>2])<=0)return 1;for(s=t+12|0,t=0;;){if(0|ie((0|r[s>>2])+(t<<3)|0,e+((t=t+1|0)<<5)|0,i)){t=0,s=6;break}if((0|t)>=(0|r[n>>2])){t=1,s=6;break}}return 6==(0|s)?0|t:0}function oe(t,e,i,n,r){var o,a,l,c,h,u,d,p=0;s[(r|=0)>>3]=(c=+s[(t|=0)>>3])+(l=+s[(e|=0)>>3]-c)*(p=((p=+s[(n|=0)>>3]-(u=+s[(i|=0)>>3]))*((a=+s[t+8>>3])-(d=+s[i+8>>3]))-(c-u)*(h=+s[n+8>>3]-d))/(l*h-(o=+s[e+8>>3]-a)*p)),s[r+8>>3]=a+o*p}function ae(t,e){return+s[(t|=0)>>3]!=+s[(e|=0)>>3]?0|(e=0):0|(e=+s[t+8>>3]==+s[e+8>>3])}function le(t,e){var i,n,r;return+((r=+s[(t|=0)>>3]-+s[(e|=0)>>3])*r+(n=+s[t+8>>3]-+s[e+8>>3])*n+(i=+s[t+16>>3]-+s[e+16>>3])*i)}function ce(t,e,i){t|=0,i|=0;var n=0;(0|(e|=0))>0?(n=0|ve(e,4),r[t>>2]=n,n||C(23230,23253,40,23267)):r[t>>2]=0,r[t+4>>2]=e,r[t+8>>2]=0,r[t+12>>2]=i}function he(t){var e,i,n,o=0,a=0,c=0,u=0;e=4+(t|=0)|0,i=t+12|0,n=t+8|0;t:for(;;){for(a=0|r[e>>2],o=0;;){if((0|o)>=(0|a))break t;if(u=0|r[(c=0|r[t>>2])+(o<<2)>>2])break;o=o+1|0}o=c+(~~(+l(+ +h(10,+ +(15-(0|r[i>>2])|0))*(+s[u>>3]+ +s[u+8>>3]))%+(0|a))>>>0<<2)|0,a=0|r[o>>2];e:do{if(0|a){if(c=u+32|0,(0|a)==(0|u))r[o>>2]=r[c>>2];else{if(!(o=0|r[(a=a+32|0)>>2]))break;for(;(0|o)!=(0|u);)if(!(o=0|r[(a=o+32|0)>>2]))break e;r[a>>2]=r[c>>2]}be(u),r[n>>2]=(0|r[n>>2])-1}}while(0)}be(0|r[t>>2])}function ue(t){var e,i=0,n=0;for(e=0|r[4+(t|=0)>>2],n=0;;){if((0|n)>=(0|e)){i=0,n=4;break}if(i=0|r[(0|r[t>>2])+(n<<2)>>2]){n=4;break}n=n+1|0}return 4==(0|n)?0|i:0}function de(t,e){e|=0;var i=0,n=0,o=0,a=0;if(i=~~(+l(+ +h(10,+ +(15-(0|r[12+(t|=0)>>2])|0))*(+s[e>>3]+ +s[e+8>>3]))%+(0|r[t+4>>2]))>>>0,!(n=0|r[(i=(0|r[t>>2])+(i<<2)|0)>>2]))return 1;a=e+32|0;do{if((0|n)!=(0|e)){if(!(i=0|r[n+32>>2]))return 1;for(o=i;;){if((0|o)==(0|e)){o=8;break}if(!(i=0|r[o+32>>2])){i=1,o=10;break}n=o,o=i}if(8==(0|o)){r[n+32>>2]=r[a>>2];break}if(10==(0|o))return 0|i}else r[i>>2]=r[a>>2]}while(0);return be(e),r[(a=t+8|0)>>2]=(0|r[a>>2])-1,0}function pe(t,e,i){t|=0,e|=0,i|=0;var n,o=0,a=0,c=0;(n=0|Ae(40))||C(23283,23253,98,23296),r[n>>2]=r[e>>2],r[n+4>>2]=r[e+4>>2],r[n+8>>2]=r[e+8>>2],r[n+12>>2]=r[e+12>>2],r[(a=n+16|0)>>2]=r[i>>2],r[a+4>>2]=r[i+4>>2],r[a+8>>2]=r[i+8>>2],r[a+12>>2]=r[i+12>>2],r[n+32>>2]=0,a=~~(+l(+ +h(10,+ +(15-(0|r[t+12>>2])|0))*(+s[e>>3]+ +s[e+8>>3]))%+(0|r[t+4>>2]))>>>0,o=0|r[(a=(0|r[t>>2])+(a<<2)|0)>>2];do{if(o){for(;!(0|Et(o,e)&&0|Et(o+16|0,i));)if(!(0|r[(o=0==(0|(a=0|r[o+32>>2]))?o:a)+32>>2])){c=10;break}if(10==(0|c)){r[o+32>>2]=n;break}return be(n),0|o}r[a>>2]=n}while(0);return r[(c=t+8|0)>>2]=1+(0|r[c>>2]),0|n}function fe(t,e,i){e|=0,i|=0;var n=0,o=0;if(o=~~(+l(+ +h(10,+ +(15-(0|r[12+(t|=0)>>2])|0))*(+s[e>>3]+ +s[e+8>>3]))%+(0|r[t+4>>2]))>>>0,!(o=0|r[(0|r[t>>2])+(o<<2)>>2]))return 0;if(!i){for(t=o;;){if(0|Et(t,e)){n=10;break}if(!(t=0|r[t+32>>2])){t=0,n=10;break}}if(10==(0|n))return 0|t}for(t=o;;){if(0|Et(t,e)&&0|Et(t+16|0,i)){n=10;break}if(!(t=0|r[t+32>>2])){t=0,n=10;break}}return 10==(0|n)?0|t:0}function me(t,e){e|=0;var i;if(i=~~(+l(+ +h(10,+ +(15-(0|r[12+(t|=0)>>2])|0))*(+s[e>>3]+ +s[e+8>>3]))%+(0|r[t+4>>2]))>>>0,!(t=0|r[(0|r[t>>2])+(i<<2)>>2]))return 0;for(;;){if(0|Et(t,e)){e=5;break}if(!(t=0|r[t+32>>2])){t=0,e=5;break}}return 5==(0|e)?0|t:0}function ge(t){return 0|~~+function(t){return+ +Ie(+(t=+t))}(t=+t)}function Ae(t){t|=0;var e,i=0,n=0,s=0,o=0,a=0,l=0,c=0,h=0,u=0,d=0,p=0,f=0,m=0,g=0,A=0,b=0,v=0,_=0,y=0,w=0;e=P,P=P+16|0,f=e;do{if(t>>>0<245){if(3&(n=(p=0|r[5829])>>>(t=(u=t>>>0<11?16:t+11&-8)>>>3))|0)return(0|(a=0|r[(o=8+(s=0|r[(n=8+(t=23356+((i=(1&n^1)+t|0)<<1<<2)|0)|0)>>2])|0)>>2]))==(0|t)?r[5829]=p&~(1<<i):(r[a+12>>2]=t,r[n>>2]=a),r[s+4>>2]=3|(w=i<<3),r[(w=s+w+4|0)>>2]=1|r[w>>2],P=e,0|o;if(u>>>0>(d=0|r[5831])>>>0){if(0|n)return i=((i=n<<t&((i=2<<t)|0-i))&0-i)-1|0,(0|(n=0|r[(c=8+(a=0|r[(t=8+(i=23356+((s=((n=(i>>>=c=i>>>12&16)>>>5&8)|c|(a=(i>>>=n)>>>2&4)|(t=(i>>>=a)>>>1&2)|(s=(i>>>=t)>>>1&1))+(i>>>s)|0)<<1<<2)|0)|0)>>2])|0)>>2]))==(0|i)?r[5829]=t=p&~(1<<s):(r[n+12>>2]=i,r[t>>2]=n,t=p),l=(w=s<<3)-u|0,r[a+4>>2]=3|u,r[4+(o=a+u|0)>>2]=1|l,r[a+w>>2]=l,0|d&&(s=0|r[5834],n=23356+((i=d>>>3)<<1<<2)|0,t&(i=1<<i)?i=0|r[(t=n+8|0)>>2]:(r[5829]=t|i,i=n,t=n+8|0),r[t>>2]=s,r[i+12>>2]=s,r[s+8>>2]=i,r[s+12>>2]=n),r[5831]=l,r[5834]=o,P=e,0|c;if(a=0|r[5830]){for(n=(a&0-a)-1|0,n=h=0|r[23620+(((s=(n>>>=o=n>>>12&16)>>>5&8)|o|(l=(n>>>=s)>>>2&4)|(c=(n>>>=l)>>>1&2)|(h=(n>>>=c)>>>1&1))+(n>>>h)<<2)>>2],c=h,h=(-8&r[h+4>>2])-u|0;(t=0|r[n+16>>2])||(t=0|r[n+20>>2]);)n=t,c=(o=(l=(-8&r[t+4>>2])-u|0)>>>0<h>>>0)?t:c,h=o?l:h;if((l=c+u|0)>>>0>c>>>0){o=0|r[c+24>>2],i=0|r[c+12>>2];do{if((0|i)==(0|c)){if(!(i=0|r[(t=c+20|0)>>2])&&!(i=0|r[(t=c+16|0)>>2])){n=0;break}for(;;)if(n=0|r[(s=i+20|0)>>2])i=n,t=s;else{if(!(n=0|r[(s=i+16|0)>>2]))break;i=n,t=s}r[t>>2]=0,n=i}else r[12+(n=0|r[c+8>>2])>>2]=i,r[i+8>>2]=n,n=i}while(0);do{if(0|o){if((0|c)==(0|r[(t=23620+((i=0|r[c+28>>2])<<2)|0)>>2])){if(r[t>>2]=n,!n){r[5830]=a&~(1<<i);break}}else if(r[((0|r[(w=o+16|0)>>2])==(0|c)?w:o+20|0)>>2]=n,!n)break;r[n+24>>2]=o,0|(i=0|r[c+16>>2])&&(r[n+16>>2]=i,r[i+24>>2]=n),0|(i=0|r[c+20>>2])&&(r[n+20>>2]=i,r[i+24>>2]=n)}}while(0);return h>>>0<16?(r[c+4>>2]=3|(w=h+u|0),r[(w=c+w+4|0)>>2]=1|r[w>>2]):(r[c+4>>2]=3|u,r[l+4>>2]=1|h,r[l+h>>2]=h,0|d&&(s=0|r[5834],n=23356+((i=d>>>3)<<1<<2)|0,(i=1<<i)&p?i=0|r[(t=n+8|0)>>2]:(r[5829]=i|p,i=n,t=n+8|0),r[t>>2]=s,r[i+12>>2]=s,r[s+8>>2]=i,r[s+12>>2]=n),r[5831]=h,r[5834]=l),P=e,0|c+8}p=u}else p=u}else p=u}else if(t>>>0<=4294967231)if(u=-8&(t=t+11|0),s=0|r[5830]){o=0-u|0,h=(t>>>=8)?u>>>0>16777215?31:u>>>(7+(h=14-((c=(520192+(A=t<<(p=(t+1048320|0)>>>16&8))|0)>>>16&4)|p|(h=(245760+(A<<=c)|0)>>>16&2))+(A<<h>>>15)|0)|0)&1|h<<1:0,n=0|r[23620+(h<<2)>>2];t:do{if(n)for(t=0,c=u<<(31==(0|h)?0:25-(h>>>1)|0),a=0;;){if((l=(-8&r[n+4>>2])-u|0)>>>0<o>>>0){if(!l){t=n,o=0,A=65;break t}t=n,o=l}if(a=0==(0|(A=0|r[n+20>>2]))|(0|A)==(0|(n=0|r[n+16+(c>>>31<<2)>>2]))?a:A,!n){n=a,A=61;break}c<<=1}else n=0,t=0,A=61}while(0);if(61==(0|A)){if(0==(0|n)&0==(0|t)){if(!(t=((t=2<<h)|0-t)&s)){p=u;break}p=(t&0-t)-1|0,t=0,n=0|r[23620+(((a=(p>>>=l=p>>>12&16)>>>5&8)|l|(c=(p>>>=a)>>>2&4)|(h=(p>>>=c)>>>1&2)|(n=(p>>>=h)>>>1&1))+(p>>>n)<<2)>>2]}n?A=65:(c=t,l=o)}if(65==(0|A))for(a=n;;){if(o=(n=(p=(-8&r[a+4>>2])-u|0)>>>0<o>>>0)?p:o,t=n?a:t,(n=0|r[a+16>>2])||(n=0|r[a+20>>2]),!n){c=t,l=o;break}a=n}if(0!=(0|c)&&l>>>0<((0|r[5831])-u|0)>>>0&&(d=c+u|0)>>>0>c>>>0){a=0|r[c+24>>2],i=0|r[c+12>>2];do{if((0|i)==(0|c)){if(!(i=0|r[(t=c+20|0)>>2])&&!(i=0|r[(t=c+16|0)>>2])){i=0;break}for(;;)if(n=0|r[(o=i+20|0)>>2])i=n,t=o;else{if(!(n=0|r[(o=i+16|0)>>2]))break;i=n,t=o}r[t>>2]=0}else r[12+(w=0|r[c+8>>2])>>2]=i,r[i+8>>2]=w}while(0);do{if(a){if((0|c)==(0|r[(n=23620+((t=0|r[c+28>>2])<<2)|0)>>2])){if(r[n>>2]=i,!i){r[5830]=s&=~(1<<t);break}}else if(r[((0|r[(w=a+16|0)>>2])==(0|c)?w:a+20|0)>>2]=i,!i)break;r[i+24>>2]=a,0|(t=0|r[c+16>>2])&&(r[i+16>>2]=t,r[t+24>>2]=i),(t=0|r[c+20>>2])&&(r[i+20>>2]=t,r[t+24>>2]=i)}}while(0);t:do{if(l>>>0<16)r[c+4>>2]=3|(w=l+u|0),r[(w=c+w+4|0)>>2]=1|r[w>>2];else{if(r[c+4>>2]=3|u,r[d+4>>2]=1|l,r[d+l>>2]=l,i=l>>>3,l>>>0<256){n=23356+(i<<1<<2)|0,(t=0|r[5829])&(i=1<<i)?i=0|r[(t=n+8|0)>>2]:(r[5829]=t|i,i=n,t=n+8|0),r[t>>2]=d,r[i+12>>2]=d,r[d+8>>2]=i,r[d+12>>2]=n;break}if(i=23620+((n=(i=l>>>8)?l>>>0>16777215?31:l>>>(7+(n=14-((_=(520192+(w=i<<(y=(i+1048320|0)>>>16&8))|0)>>>16&4)|y|(n=(245760+(w<<=_)|0)>>>16&2))+(w<<n>>>15)|0)|0)&1|n<<1:0)<<2)|0,r[d+28>>2]=n,r[4+(t=d+16|0)>>2]=0,r[t>>2]=0,!(s&(t=1<<n))){r[5830]=s|t,r[i>>2]=d,r[d+24>>2]=i,r[d+12>>2]=d,r[d+8>>2]=d;break}i=0|r[i>>2];e:do{if((-8&r[i+4>>2]|0)!=(0|l)){for(s=l<<(31==(0|n)?0:25-(n>>>1)|0);t=0|r[(n=i+16+(s>>>31<<2)|0)>>2];){if((-8&r[t+4>>2]|0)==(0|l)){i=t;break e}s<<=1,i=t}r[n>>2]=d,r[d+24>>2]=i,r[d+12>>2]=d,r[d+8>>2]=d;break t}}while(0);r[12+(w=0|r[(y=i+8|0)>>2])>>2]=d,r[y>>2]=d,r[d+8>>2]=w,r[d+12>>2]=i,r[d+24>>2]=0}}while(0);return P=e,0|c+8}p=u}else p=u;else p=-1}while(0);if((n=0|r[5831])>>>0>=p>>>0)return t=0|r[5834],(i=n-p|0)>>>0>15?(r[5834]=w=t+p|0,r[5831]=i,r[w+4>>2]=1|i,r[t+n>>2]=i,r[t+4>>2]=3|p):(r[5831]=0,r[5834]=0,r[t+4>>2]=3|n,r[(w=t+n+4|0)>>2]=1|r[w>>2]),P=e,0|t+8;if((l=0|r[5832])>>>0>p>>>0)return r[5832]=_=l-p|0,r[5835]=y=(w=0|r[5835])+p|0,r[y+4>>2]=1|_,r[w+4>>2]=3|p,P=e,0|w+8;if(0|r[5947]?t=0|r[5949]:(r[5949]=4096,r[5948]=4096,r[5950]=-1,r[5951]=-1,r[5952]=0,r[5940]=0,r[5947]=-16&f^1431655768,t=4096),c=p+48|0,(u=(a=t+(h=p+47|0)|0)&(o=0-t|0))>>>0<=p>>>0)return P=e,0;if(0|(t=0|r[5939])&&(f=(d=0|r[5937])+u|0)>>>0<=d>>>0|f>>>0>t>>>0)return P=e,0;t:do{if(4&r[5940])i=0,A=143;else{n=0|r[5835];e:do{if(n){for(s=23764;!((f=0|r[s>>2])>>>0<=n>>>0&&(f+(0|r[s+4>>2])|0)>>>0>n>>>0);){if(!(t=0|r[s+8>>2])){A=128;break e}s=t}if((i=a-l&o)>>>0<2147483647)if((0|(t=0|Pe(0|i)))==((0|r[s>>2])+(0|r[s+4>>2])|0)){if(-1!=(0|t)){l=i,a=t,A=145;break t}}else s=t,A=136;else i=0}else A=128}while(0);do{if(128==(0|A))if(-1!=(0|(n=0|Pe(0)))&&(g=(i=(0==((g=(m=0|r[5948])-1|0)&(i=n)|0)?0:(g+i&0-m)-i|0)+u|0)+(m=0|r[5937])|0,i>>>0>p>>>0&i>>>0<2147483647)){if(0|(f=0|r[5939])&&g>>>0<=m>>>0|g>>>0>f>>>0){i=0;break}if((0|(t=0|Pe(0|i)))==(0|n)){l=i,a=n,A=145;break t}s=t,A=136}else i=0}while(0);do{if(136==(0|A)){if(n=0-i|0,!(c>>>0>i>>>0&i>>>0<2147483647&-1!=(0|s))){if(-1==(0|s)){i=0;break}l=i,a=s,A=145;break t}if((t=h-i+(t=0|r[5949])&0-t)>>>0>=2147483647){l=i,a=s,A=145;break t}if(-1==(0|Pe(0|t))){Pe(0|n),i=0;break}l=t+i|0,a=s,A=145;break t}}while(0);r[5940]=4|r[5940],A=143}}while(0);if(143==(0|A)&&u>>>0<2147483647&&!(-1==(0|(_=0|Pe(0|u)))|1^(v=(b=(g=0|Pe(0))-_|0)>>>0>(p+40|0)>>>0)|_>>>0<g>>>0&-1!=(0|_)&-1!=(0|g)^1)&&(l=v?b:i,a=_,A=145),145==(0|A)){r[5937]=i=(0|r[5937])+l|0,i>>>0>(0|r[5938])>>>0&&(r[5938]=i),h=0|r[5835];t:do{if(h){for(i=23764;;){if((0|a)==((t=0|r[i>>2])+(n=0|r[i+4>>2])|0)){A=154;break}if(!(s=0|r[i+8>>2]))break;i=s}if(154==(0|A)&&(y=i+4|0,0==(8&r[i+12>>2]|0))&&a>>>0>h>>>0&t>>>0<=h>>>0){r[y>>2]=n+l,y=h+(_=0==(7&(_=h+8|0)|0)?0:0-_&7)|0,_=(w=(0|r[5832])+l|0)-_|0,r[5835]=y,r[5832]=_,r[y+4>>2]=1|_,r[h+w+4>>2]=40,r[5836]=r[5951];break}for(a>>>0<(0|r[5833])>>>0&&(r[5833]=a),n=a+l|0,i=23764;;){if((0|r[i>>2])==(0|n)){A=162;break}if(!(t=0|r[i+8>>2]))break;i=t}if(162==(0|A)&&0==(8&r[i+12>>2]|0)){r[i>>2]=a,r[(d=i+4|0)>>2]=(0|r[d>>2])+l,u=(d=a+(0==(7&(d=a+8|0)|0)?0:0-d&7)|0)+p|0,c=(i=n+(0==(7&(i=n+8|0)|0)?0:0-i&7)|0)-d-p|0,r[d+4>>2]=3|p;e:do{if((0|h)==(0|i))r[5832]=w=(0|r[5832])+c|0,r[5835]=u,r[u+4>>2]=1|w;else{if((0|r[5834])==(0|i)){r[5831]=w=(0|r[5831])+c|0,r[5834]=u,r[u+4>>2]=1|w,r[u+w>>2]=w;break}if(1==(3&(t=0|r[i+4>>2])|0)){l=-8&t,s=t>>>3;i:do{if(t>>>0<256){if((0|(n=0|r[i+12>>2]))==(0|(t=0|r[i+8>>2]))){r[5829]=r[5829]&~(1<<s);break}r[t+12>>2]=n,r[n+8>>2]=t;break}a=0|r[i+24>>2],t=0|r[i+12>>2];do{if((0|t)==(0|i)){if(t=0|r[(s=4+(n=i+16|0)|0)>>2])n=s;else if(!(t=0|r[n>>2])){t=0;break}for(;;)if(s=0|r[(o=t+20|0)>>2])t=s,n=o;else{if(!(s=0|r[(o=t+16|0)>>2]))break;t=s,n=o}r[n>>2]=0}else r[12+(w=0|r[i+8>>2])>>2]=t,r[t+8>>2]=w}while(0);if(!a)break;s=23620+((n=0|r[i+28>>2])<<2)|0;do{if((0|r[s>>2])==(0|i)){if(r[s>>2]=t,0|t)break;r[5830]=r[5830]&~(1<<n);break i}if(r[((0|r[(w=a+16|0)>>2])==(0|i)?w:a+20|0)>>2]=t,!t)break i}while(0);if(r[t+24>>2]=a,0|(s=0|r[(n=i+16|0)>>2])&&(r[t+16>>2]=s,r[s+24>>2]=t),!(n=0|r[n+4>>2]))break;r[t+20>>2]=n,r[n+24>>2]=t}while(0);i=i+l|0,o=l+c|0}else o=c;if(r[(i=i+4|0)>>2]=-2&r[i>>2],r[u+4>>2]=1|o,r[u+o>>2]=o,i=o>>>3,o>>>0<256){n=23356+(i<<1<<2)|0,(t=0|r[5829])&(i=1<<i)?i=0|r[(t=n+8|0)>>2]:(r[5829]=t|i,i=n,t=n+8|0),r[t>>2]=u,r[i+12>>2]=u,r[u+8>>2]=i,r[u+12>>2]=n;break}i=o>>>8;do{if(i){if(o>>>0>16777215){s=31;break}s=o>>>(7+(s=14-((_=(520192+(w=i<<(y=(i+1048320|0)>>>16&8))|0)>>>16&4)|y|(s=(245760+(w<<=_)|0)>>>16&2))+(w<<s>>>15)|0)|0)&1|s<<1}else s=0}while(0);if(i=23620+(s<<2)|0,r[u+28>>2]=s,r[4+(t=u+16|0)>>2]=0,r[t>>2]=0,!((t=0|r[5830])&(n=1<<s))){r[5830]=t|n,r[i>>2]=u,r[u+24>>2]=i,r[u+12>>2]=u,r[u+8>>2]=u;break}i=0|r[i>>2];i:do{if((-8&r[i+4>>2]|0)!=(0|o)){for(s=o<<(31==(0|s)?0:25-(s>>>1)|0);t=0|r[(n=i+16+(s>>>31<<2)|0)>>2];){if((-8&r[t+4>>2]|0)==(0|o)){i=t;break i}s<<=1,i=t}r[n>>2]=u,r[u+24>>2]=i,r[u+12>>2]=u,r[u+8>>2]=u;break e}}while(0);r[12+(w=0|r[(y=i+8|0)>>2])>>2]=u,r[y>>2]=u,r[u+8>>2]=w,r[u+12>>2]=i,r[u+24>>2]=0}}while(0);return P=e,0|d+8}for(i=23764;!((t=0|r[i>>2])>>>0<=h>>>0&&(w=t+(0|r[i+4>>2])|0)>>>0>h>>>0);)i=0|r[i+8>>2];i=(t=(t=(o=w+-47|0)+(0==(7&(t=o+8|0)|0)?0:0-t&7)|0)>>>0<(o=h+16|0)>>>0?h:t)+8|0,y=a+(_=0==(7&(_=a+8|0)|0)?0:0-_&7)|0,_=(n=l+-40|0)-_|0,r[5835]=y,r[5832]=_,r[y+4>>2]=1|_,r[a+n+4>>2]=40,r[5836]=r[5951],r[(n=t+4|0)>>2]=27,r[i>>2]=r[5941],r[i+4>>2]=r[5942],r[i+8>>2]=r[5943],r[i+12>>2]=r[5944],r[5941]=a,r[5942]=l,r[5944]=0,r[5943]=i,i=t+24|0;do{y=i,r[(i=i+4|0)>>2]=7}while((y+8|0)>>>0<w>>>0);if((0|t)!=(0|h)){if(a=t-h|0,r[n>>2]=-2&r[n>>2],r[h+4>>2]=1|a,r[t>>2]=a,i=a>>>3,a>>>0<256){n=23356+(i<<1<<2)|0,(t=0|r[5829])&(i=1<<i)?i=0|r[(t=n+8|0)>>2]:(r[5829]=t|i,i=n,t=n+8|0),r[t>>2]=h,r[i+12>>2]=h,r[h+8>>2]=i,r[h+12>>2]=n;break}if(n=23620+((s=(i=a>>>8)?a>>>0>16777215?31:a>>>(7+(s=14-((_=(520192+(w=i<<(y=(i+1048320|0)>>>16&8))|0)>>>16&4)|y|(s=(245760+(w<<=_)|0)>>>16&2))+(w<<s>>>15)|0)|0)&1|s<<1:0)<<2)|0,r[h+28>>2]=s,r[h+20>>2]=0,r[o>>2]=0,!((i=0|r[5830])&(t=1<<s))){r[5830]=i|t,r[n>>2]=h,r[h+24>>2]=n,r[h+12>>2]=h,r[h+8>>2]=h;break}i=0|r[n>>2];e:do{if((-8&r[i+4>>2]|0)!=(0|a)){for(s=a<<(31==(0|s)?0:25-(s>>>1)|0);t=0|r[(n=i+16+(s>>>31<<2)|0)>>2];){if((-8&r[t+4>>2]|0)==(0|a)){i=t;break e}s<<=1,i=t}r[n>>2]=h,r[h+24>>2]=i,r[h+12>>2]=h,r[h+8>>2]=h;break t}}while(0);r[12+(w=0|r[(y=i+8|0)>>2])>>2]=h,r[y>>2]=h,r[h+8>>2]=w,r[h+12>>2]=i,r[h+24>>2]=0}}else 0==(0|(w=0|r[5833]))|a>>>0<w>>>0&&(r[5833]=a),r[5941]=a,r[5942]=l,r[5944]=0,r[5838]=r[5947],r[5837]=-1,r[5842]=23356,r[5841]=23356,r[5844]=23364,r[5843]=23364,r[5846]=23372,r[5845]=23372,r[5848]=23380,r[5847]=23380,r[5850]=23388,r[5849]=23388,r[5852]=23396,r[5851]=23396,r[5854]=23404,r[5853]=23404,r[5856]=23412,r[5855]=23412,r[5858]=23420,r[5857]=23420,r[5860]=23428,r[5859]=23428,r[5862]=23436,r[5861]=23436,r[5864]=23444,r[5863]=23444,r[5866]=23452,r[5865]=23452,r[5868]=23460,r[5867]=23460,r[5870]=23468,r[5869]=23468,r[5872]=23476,r[5871]=23476,r[5874]=23484,r[5873]=23484,r[5876]=23492,r[5875]=23492,r[5878]=23500,r[5877]=23500,r[5880]=23508,r[5879]=23508,r[5882]=23516,r[5881]=23516,r[5884]=23524,r[5883]=23524,r[5886]=23532,r[5885]=23532,r[5888]=23540,r[5887]=23540,r[5890]=23548,r[5889]=23548,r[5892]=23556,r[5891]=23556,r[5894]=23564,r[5893]=23564,r[5896]=23572,r[5895]=23572,r[5898]=23580,r[5897]=23580,r[5900]=23588,r[5899]=23588,r[5902]=23596,r[5901]=23596,r[5904]=23604,r[5903]=23604,y=a+(_=0==(7&(_=a+8|0)|0)?0:0-_&7)|0,_=(w=l+-40|0)-_|0,r[5835]=y,r[5832]=_,r[y+4>>2]=1|_,r[a+w+4>>2]=40,r[5836]=r[5951]}while(0);if((i=0|r[5832])>>>0>p>>>0)return r[5832]=_=i-p|0,r[5835]=y=(w=0|r[5835])+p|0,r[y+4>>2]=1|_,r[w+4>>2]=3|p,P=e,0|w+8}return r[(w=23312)>>2]=12,P=e,0}function be(t){var e=0,i=0,n=0,s=0,o=0,a=0,l=0,c=0;if(t|=0){s=0|r[5833],c=(i=t+-8|0)+(e=-8&(t=0|r[t+-4>>2]))|0;do{if(1&t)l=i,a=i;else{if(!(3&t))return;if(o=(n=0|r[i>>2])+e|0,(a=i+(0-n)|0)>>>0<s>>>0)return;if((0|r[5834])==(0|a)){if(3!=(3&(e=0|r[(t=c+4|0)>>2])|0)){l=a,e=o;break}return r[5831]=o,r[t>>2]=-2&e,r[a+4>>2]=1|o,void(r[a+o>>2]=o)}if(i=n>>>3,n>>>0<256){if((0|(e=0|r[a+12>>2]))==(0|(t=0|r[a+8>>2]))){r[5829]=r[5829]&~(1<<i),l=a,e=o;break}r[t+12>>2]=e,r[e+8>>2]=t,l=a,e=o;break}s=0|r[a+24>>2],t=0|r[a+12>>2];do{if((0|t)==(0|a)){if(t=0|r[(i=4+(e=a+16|0)|0)>>2])e=i;else if(!(t=0|r[e>>2])){t=0;break}for(;;)if(i=0|r[(n=t+20|0)>>2])t=i,e=n;else{if(!(i=0|r[(n=t+16|0)>>2]))break;t=i,e=n}r[e>>2]=0}else r[12+(l=0|r[a+8>>2])>>2]=t,r[t+8>>2]=l}while(0);if(s){if((0|r[(i=23620+((e=0|r[a+28>>2])<<2)|0)>>2])==(0|a)){if(r[i>>2]=t,!t){r[5830]=r[5830]&~(1<<e),l=a,e=o;break}}else if(r[((0|r[(l=s+16|0)>>2])==(0|a)?l:s+20|0)>>2]=t,!t){l=a,e=o;break}r[t+24>>2]=s,0|(i=0|r[(e=a+16|0)>>2])&&(r[t+16>>2]=i,r[i+24>>2]=t),(e=0|r[e+4>>2])?(r[t+20>>2]=e,r[e+24>>2]=t,l=a,e=o):(l=a,e=o)}else l=a,e=o}}while(0);if(!(a>>>0>=c>>>0)&&1&(n=0|r[(t=c+4|0)>>2])){if(2&n)r[t>>2]=-2&n,r[l+4>>2]=1|e,r[a+e>>2]=e,s=e;else{if((0|r[5835])==(0|c)){if(r[5832]=c=(0|r[5832])+e|0,r[5835]=l,r[l+4>>2]=1|c,(0|l)!=(0|r[5834]))return;return r[5834]=0,void(r[5831]=0)}if((0|r[5834])==(0|c))return r[5831]=c=(0|r[5831])+e|0,r[5834]=a,r[l+4>>2]=1|c,void(r[a+c>>2]=c);s=(-8&n)+e|0,i=n>>>3;do{if(n>>>0<256){if((0|(t=0|r[c+12>>2]))==(0|(e=0|r[c+8>>2]))){r[5829]=r[5829]&~(1<<i);break}r[e+12>>2]=t,r[t+8>>2]=e;break}o=0|r[c+24>>2],t=0|r[c+12>>2];do{if((0|t)==(0|c)){if(t=0|r[(i=4+(e=c+16|0)|0)>>2])e=i;else if(!(t=0|r[e>>2])){i=0;break}for(;;)if(i=0|r[(n=t+20|0)>>2])t=i,e=n;else{if(!(i=0|r[(n=t+16|0)>>2]))break;t=i,e=n}r[e>>2]=0,i=t}else r[12+(i=0|r[c+8>>2])>>2]=t,r[t+8>>2]=i,i=t}while(0);if(0|o){if((0|r[(e=23620+((t=0|r[c+28>>2])<<2)|0)>>2])==(0|c)){if(r[e>>2]=i,!i){r[5830]=r[5830]&~(1<<t);break}}else if(r[((0|r[(n=o+16|0)>>2])==(0|c)?n:o+20|0)>>2]=i,!i)break;r[i+24>>2]=o,0|(e=0|r[(t=c+16|0)>>2])&&(r[i+16>>2]=e,r[e+24>>2]=i),0|(t=0|r[t+4>>2])&&(r[i+20>>2]=t,r[t+24>>2]=i)}}while(0);if(r[l+4>>2]=1|s,r[a+s>>2]=s,(0|l)==(0|r[5834]))return void(r[5831]=s)}if(t=s>>>3,s>>>0<256)return i=23356+(t<<1<<2)|0,(e=0|r[5829])&(t=1<<t)?t=0|r[(e=i+8|0)>>2]:(r[5829]=e|t,t=i,e=i+8|0),r[e>>2]=l,r[t+12>>2]=l,r[l+8>>2]=t,void(r[l+12>>2]=i);t=23620+((n=(t=s>>>8)?s>>>0>16777215?31:s>>>(7+(n=14-((o=(520192+(c=t<<(a=(t+1048320|0)>>>16&8))|0)>>>16&4)|a|(n=(245760+(c<<=o)|0)>>>16&2))+(c<<n>>>15)|0)|0)&1|n<<1:0)<<2)|0,r[l+28>>2]=n,r[l+20>>2]=0,r[l+16>>2]=0,e=0|r[5830],i=1<<n;t:do{if(e&i){t=0|r[t>>2];e:do{if((-8&r[t+4>>2]|0)!=(0|s)){for(n=s<<(31==(0|n)?0:25-(n>>>1)|0);e=0|r[(i=t+16+(n>>>31<<2)|0)>>2];){if((-8&r[e+4>>2]|0)==(0|s)){t=e;break e}n<<=1,t=e}r[i>>2]=l,r[l+24>>2]=t,r[l+12>>2]=l,r[l+8>>2]=l;break t}}while(0);r[12+(c=0|r[(a=t+8|0)>>2])>>2]=l,r[a>>2]=l,r[l+8>>2]=c,r[l+12>>2]=t,r[l+24>>2]=0}else r[5830]=e|i,r[t>>2]=l,r[l+24>>2]=t,r[l+12>>2]=l,r[l+8>>2]=l}while(0);if(r[5837]=c=(0|r[5837])-1|0,!(0|c)){for(t=23772;t=0|r[t>>2];)t=t+8|0;r[5837]=-1}}}}function ve(t,e){e|=0;var i=0;return(t|=0)?(i=0|v(e,t),(e|t)>>>0>65535&&(i=(0|(i>>>0)/(t>>>0))==(0|e)?i:-1)):i=0,(t=0|Ae(i))&&3&r[t+-4>>2]?(De(0|t,0,0|i),0|t):0|t}function _e(t,e,i,n){return 0|(w(0|(n=(e|=0)-(n|=0)-((i|=0)>>>0>(t|=0)>>>0|0)>>>0)),t-i>>>0|0)}function ye(t){return 0|((t|=0)?31-(0|y(t^t-1))|0:32)}function we(t,e,i,n){var s,o;return o=P,P=P+16|0,function(t,e,i,n,s){s|=0;var o=0,a=0,l=0,c=0,h=0,u=0,d=0,p=0,f=0,m=0;if(u=t|=0,a=i|=0,l=p=n|=0,!(h=c=e|=0))return o=0!=(0|s),l?o?(r[s>>2]=0|t,r[s+4>>2]=0&e,s=0,0|(w(0|(p=0)),s)):(s=0,0|(w(0|(p=0)),s)):(o&&(r[s>>2]=(u>>>0)%(a>>>0),r[s+4>>2]=0),s=(u>>>0)/(a>>>0)>>>0,0|(w(0|(p=0)),s));o=0==(0|l);do{if(a){if(!o){if((o=(0|y(0|l))-(0|y(0|h))|0)>>>0<=31){a=d=o+1|0,t=u>>>(d>>>0)&(e=o-31>>31)|h<<(l=31-o|0),e&=h>>>(d>>>0),o=0,l=u<<l;break}return s?(r[s>>2]=0|t,r[s+4>>2]=c|0&e,s=0,0|(w(0|(p=0)),s)):(s=0,0|(w(0|(p=0)),s))}if((o=a-1|0)&a|0){a=l=33+(0|y(0|a))-(0|y(0|h))|0,t=(d=32-l|0)-1>>31&h>>>((f=l-32|0)>>>0)|(h<<d|u>>>(l>>>0))&(e=f>>31),e&=h>>>(l>>>0),o=u<<(m=64-l|0)&(c=d>>31),l=(h<<m|u>>>(f>>>0))&c|u<<d&l-33>>31;break}return 0|s&&(r[s>>2]=o&u,r[s+4>>2]=0),1==(0|a)?(m=0|t,0|(w(0|(f=c|0&e)),m)):(f=h>>>((m=0|ye(0|a))>>>0)|0,m=h<<32-m|u>>>(m>>>0)|0,0|(w(0|f),m))}if(o)return 0|s&&(r[s>>2]=(h>>>0)%(a>>>0),r[s+4>>2]=0),m=(h>>>0)/(a>>>0)>>>0,0|(w(0|(f=0)),m);if(!u)return 0|s&&(r[s>>2]=0,r[s+4>>2]=(h>>>0)%(l>>>0)),m=(h>>>0)/(l>>>0)>>>0,0|(w(0|(f=0)),m);if(!((o=l-1|0)&l))return 0|s&&(r[s>>2]=0|t,r[s+4>>2]=o&h|0&e),f=0,m=h>>>((0|ye(0|l))>>>0),0|(w(0|f),m);if((o=(0|y(0|l))-(0|y(0|h))|0)>>>0<=30){a=e=o+1|0,t=h<<(l=31-o|0)|u>>>(e>>>0),e=h>>>(e>>>0),o=0,l=u<<l;break}return s?(r[s>>2]=0|t,r[s+4>>2]=c|0&e,m=0,0|(w(0|(f=0)),m)):(m=0,0|(w(0|(f=0)),m))}while(0);if(a){h=0|function(t,e,i,n){return 0|(w((e|=0)+(n|=0)+((i=(t|=0)+(i|=0)>>>0)>>>0<t>>>0|0)>>>0|0),0|i)}(0|(d=0|i),0|(u=p|0&n),-1,-1),i=0|x(),c=l,l=0;do{n=c,c=o>>>31|c<<1,o=l|o<<1,_e(0|h,0|i,0|(n=t<<1|n>>>31|0),0|(p=t>>>31|e<<1|0)),l=1&(f=(m=0|x())>>31|((0|m)<0?-1:0)<<1),t=0|_e(0|n,0|p,f&d|0,(((0|m)<0?-1:0)>>31|((0|m)<0?-1:0)<<1)&u|0),e=0|x(),a=a-1|0}while(0!=(0|a));h=c,c=0}else h=l,c=0,l=0;a=0,0|s&&(r[s>>2]=t,r[s+4>>2]=e),m=-2&(o<<1|0)|l,w(0|(f=(0|o)>>>31|(h|a)<<1|0&(a<<1|o>>>31)|c))}(t|=0,e|=0,i|=0,n|=0,s=0|o),P=o,0|(w(0|r[s+4>>2]),0|r[s>>2])}function xe(t,e,i){return t|=0,e|=0,(0|(i|=0))<32?(w(e>>>i|0),t>>>i|(e&(1<<i)-1)<<32-i):(w(0),e>>>i-32|0)}function Ce(t,e,i){return t|=0,(0|(i|=0))<32?(w((e|=0)<<i|(t&(1<<i)-1<<32-i)>>>32-i|0),t<<i):(w(t<<i-32|0),0)}function Se(t,e){return e=+e,(t=+t)!=t?+e:e!=e?+t:+_(+t,+e)}function ke(t){return(t=+t)>=0?+a(t+.5):+b(t-.5)}function Ee(t,e,i){t|=0,e|=0;var s,o,a=0;if((0|(i|=0))>=8192)return E(0|t,0|e,0|i),0|t;if(o=0|t,s=t+i|0,(3&t)==(3&e)){for(;3&t;){if(!i)return 0|o;n[t>>0]=0|n[e>>0],t=t+1|0,e=e+1|0,i=i-1|0}for(a=(i=-4&s|0)-64|0;(0|t)<=(0|a);)r[t>>2]=r[e>>2],r[t+4>>2]=r[e+4>>2],r[t+8>>2]=r[e+8>>2],r[t+12>>2]=r[e+12>>2],r[t+16>>2]=r[e+16>>2],r[t+20>>2]=r[e+20>>2],r[t+24>>2]=r[e+24>>2],r[t+28>>2]=r[e+28>>2],r[t+32>>2]=r[e+32>>2],r[t+36>>2]=r[e+36>>2],r[t+40>>2]=r[e+40>>2],r[t+44>>2]=r[e+44>>2],r[t+48>>2]=r[e+48>>2],r[t+52>>2]=r[e+52>>2],r[t+56>>2]=r[e+56>>2],r[t+60>>2]=r[e+60>>2],t=t+64|0,e=e+64|0;for(;(0|t)<(0|i);)r[t>>2]=r[e>>2],t=t+4|0,e=e+4|0}else for(i=s-4|0;(0|t)<(0|i);)n[t>>0]=0|n[e>>0],n[t+1>>0]=0|n[e+1>>0],n[t+2>>0]=0|n[e+2>>0],n[t+3>>0]=0|n[e+3>>0],t=t+4|0,e=e+4|0;for(;(0|t)<(0|s);)n[t>>0]=0|n[e>>0],t=t+1|0,e=e+1|0;return 0|o}function De(t,e,i){e|=0;var s,o=0,a=0,l=0;if(s=(t|=0)+(i|=0)|0,e&=255,(0|i)>=67){for(;3&t;)n[t>>0]=e,t=t+1|0;for(l=e|e<<8|e<<16|e<<24,a=(o=-4&s|0)-64|0;(0|t)<=(0|a);)r[t>>2]=l,r[t+4>>2]=l,r[t+8>>2]=l,r[t+12>>2]=l,r[t+16>>2]=l,r[t+20>>2]=l,r[t+24>>2]=l,r[t+28>>2]=l,r[t+32>>2]=l,r[t+36>>2]=l,r[t+40>>2]=l,r[t+44>>2]=l,r[t+48>>2]=l,r[t+52>>2]=l,r[t+56>>2]=l,r[t+60>>2]=l,t=t+64|0;for(;(0|t)<(0|o);)r[t>>2]=l,t=t+4|0}for(;(0|t)<(0|s);)n[t>>0]=e,t=t+1|0;return s-i|0}function Ie(t){return(t=+t)>=0?+a(t+.5):+b(t-.5)}function Pe(t){var e,i,n;return t|=0,n=0|k(),(0|t)>0&(0|(e=(i=0|r[o>>2])+t|0))<(0|i)|(0|e)<0?(I(0|e),S(12),-1):(0|e)>(0|n)&&!(0|D(0|e))?(S(12),-1):(r[o>>2]=e,0|i)}return{___uremdi3:we,_bitshift64Lshr:xe,_bitshift64Shl:Ce,_calloc:ve,_cellAreaKm2:function(t,e){var i,n,s,o=0;if(s=P,P=P+192|0,n=s,Kt(t|=0,e|=0,i=s+168|0),$t(t,e,n),(0|(e=0|r[n>>2]))>0){if(o=+It(n+8|0,n+8+((1!=(0|e)&1)<<4)|0,i)+0,1!=(0|e)){t=1;do{o+=+It(n+8+(t<<4)|0,n+8+(((0|(t=t+1|0))%(0|e)|0)<<4)|0,i)}while((0|t)<(0|e))}}else o=0;return P=s,6371.007180918475*o*6371.007180918475},_cellAreaM2:function(t,e){var i,n,s,o=0;if(s=P,P=P+192|0,n=s,Kt(t|=0,e|=0,i=s+168|0),$t(t,e,n),(0|(e=0|r[n>>2]))>0){if(o=+It(n+8|0,n+8+((1!=(0|e)&1)<<4)|0,i)+0,1!=(0|e)){t=1;do{o+=+It(n+8+(t<<4)|0,n+8+(((0|(t=t+1|0))%(0|e)|0)<<4)|0,i)}while((0|t)<(0|e))}}else o=0;return P=s,6371.007180918475*o*6371.007180918475*1e3*1e3},_cellAreaRads2:function(t,e){var i,n,s,o=0;if(s=P,P=P+192|0,n=s,Kt(t|=0,e|=0,i=s+168|0),$t(t,e,n),(0|(e=0|r[n>>2]))<=0)return P=s,+(o=0);if(o=+It(n+8|0,n+8+((1!=(0|e)&1)<<4)|0,i)+0,1==(0|e))return P=s,+o;t=1;do{o+=+It(n+8+(t<<4)|0,n+8+(((0|(t=t+1|0))%(0|e)|0)<<4)|0,i)}while((0|t)<(0|e));return P=s,+o},_compact:function(t,e,i){e|=0;var n,s=0,o=0,a=0,l=0,c=0,h=0,u=0,d=0,p=0,f=0,m=0,g=0,A=0,b=0,v=0,_=0,y=0,w=0,C=0,S=0,k=0;if(!(i|=0))return 0;if(s=0|r[(o=t|=0)>>2],!0&0==(15728640&(o=0|r[o+4>>2])|0)){if((0|i)<=0)return 0;if(r[(S=e)>>2]=s,r[S+4>>2]=o,1==(0|i))return 0;s=1;do{C=0|r[4+(w=t+(s<<3)|0)>>2],r[(S=e+(s<<3)|0)>>2]=r[w>>2],r[S+4>>2]=C,s=s+1|0}while((0|s)!=(0|i));return 0}if(!(C=0|Ae(w=i<<3)))return-3;if(Ee(0|C,0|t,0|w),!(n=0|ve(i,8)))return be(C),-3;s=i;t:for(;;){_=0|xe(0|(d=0|r[(l=C)>>2]),0|(l=0|r[l+4>>2]),52),x(),y=(_&=15)-1|0,v=(0|s)>0;e:do{if(v){if(b=((0|s)<0)<<31>>31,g=0|Ce(0|y,0,52),A=0|x(),y>>>0>15)for(o=0,t=d,i=l;;){if(!(0==(0|t)&0==(0|i))){if(a=0|xe(0|t,0|i,52),x(),c=(0|(a&=15))<(0|y),a=(0|a)==(0|y),i=0|we(0|(u=c?0:a?t:0),0|(t=c?0:a?i:0),0|s,0|b),x(),0==(0|(h=0|r[(c=a=n+(i<<3)|0)>>2]))&0==(0|(c=0|r[c+4>>2])))i=u;else for(g=0,m=i,f=c,i=u;;){if((0|g)>(0|s)){S=41;break t}if((0|h)==(0|i)&(-117440513&f|0)==(0|t)){u=0|xe(0|h,0|f,56),x(),p=1+(u&=7)|0,A=0|xe(0|h,0|f,45),x();i:do{if(0|F(127&A)){if(h=0|xe(0|h,0|f,52),x(),!(h&=15)){c=6;break}for(c=1;;){if(!(0==((A=0|Ce(7,0,3*(15-c|0)|0))&i|0)&0==((0|x())&t|0))){c=7;break i}if(!(c>>>0<h>>>0)){c=6;break}c=c+1|0}}else c=7}while(0);if((u+2|0)>>>0>c>>>0){S=51;break t}A=0|Ce(0|p,0,56),t=0|x()|-117440513&t,r[(c=a)>>2]=0,r[c+4>>2]=0,c=m,i|=A}else c=(m+1|0)%(0|s)|0;if(0==(0|(h=0|r[(f=a=n+(c<<3)|0)>>2]))&0==(0|(f=0|r[f+4>>2])))break;g=g+1|0,m=c}r[(A=a)>>2]=i,r[A+4>>2]=t}if((0|(o=o+1|0))>=(0|s))break e;t=0|r[(i=C+(o<<3)|0)>>2],i=0|r[i+4>>2]}for(o=0,t=d,i=l;;){if(!(0==(0|t)&0==(0|i))){if(c=0|xe(0|t,0|i,52),x(),(0|(c&=15))>=(0|y)){if((0|c)!=(0|y)&&(t|=g,i=-15728641&i|A,c>>>0>=_>>>0)){a=y;do{m=0|Ce(7,0,3*(14-a|0)|0),a=a+1|0,t|=m,i=0|x()|i}while(a>>>0<c>>>0)}}else t=0,i=0;if(c=0|we(0|t,0|i,0|s,0|b),x(),!(0==(0|(u=0|r[(h=a=n+(c<<3)|0)>>2]))&0==(0|(h=0|r[h+4>>2]))))for(m=0;;){if((0|m)>(0|s)){S=41;break t}if((0|u)==(0|t)&(-117440513&h|0)==(0|i)){p=0|xe(0|u,0|h,56),x(),f=1+(p&=7)|0,k=0|xe(0|u,0|h,45),x();i:do{if(0|F(127&k)){if(u=0|xe(0|u,0|h,52),x(),!(u&=15)){h=6;break}for(h=1;;){if(!(0==((k=0|Ce(7,0,3*(15-h|0)|0))&t|0)&0==((0|x())&i|0))){h=7;break i}if(!(h>>>0<u>>>0)){h=6;break}h=h+1|0}}else h=7}while(0);if((p+2|0)>>>0>h>>>0){S=51;break t}k=0|Ce(0|f,0,56),i=0|x()|-117440513&i,r[(f=a)>>2]=0,r[f+4>>2]=0,t|=k}else c=(c+1|0)%(0|s)|0;if(0==(0|(u=0|r[(h=a=n+(c<<3)|0)>>2]))&0==(0|(h=0|r[h+4>>2])))break;m=m+1|0}r[(k=a)>>2]=t,r[k+4>>2]=i}if((0|(o=o+1|0))>=(0|s))break e;t=0|r[(i=C+(o<<3)|0)>>2],i=0|r[i+4>>2]}}}while(0);if((s+5|0)>>>0<11){S=99;break}if(!(A=0|ve((0|s)/6|0,8))){S=58;break}e:do{if(v){m=0,f=0;do{if(!(0==(0|(o=0|r[(t=c=n+(m<<3)|0)>>2]))&0==(0|(t=0|r[t+4>>2])))){h=0|xe(0|o,0|t,56),x(),i=1+(h&=7)|0,u=-117440513&t,k=0|xe(0|o,0|t,45),x();i:do{if(0|F(127&k)){if(p=0|xe(0|o,0|t,52),x(),0|(p&=15))for(a=1;;){if(!(0==(o&(k=0|Ce(7,0,3*(15-a|0)|0))|0)&0==(u&(0|x())|0)))break i;if(!(a>>>0

>>0))break;a=a+1|0}o|=t=0|Ce(0|i,0,56),t=0|x()|u,r[(i=c)>>2]=o,r[i+4>>2]=t,i=h+2|0}}while(0);7==(0|i)&&(r[(k=A+(f<<3)|0)>>2]=o,r[k+4>>2]=-117440513&t,f=f+1|0)}m=m+1|0}while((0|m)!=(0|s));if(v){if(g=((0|s)<0)<<31>>31,p=0|Ce(0|y,0,52),m=0|x(),y>>>0>15)for(t=0,o=0;;){do{if(!(0==(0|d)&0==(0|l))){for(h=0|xe(0|d,0|l,52),x(),a=(0|(h&=15))<(0|y),h=(0|h)==(0|y),a=0|we(0|(c=a?0:h?d:0),0|(h=a?0:h?l:0),0|s,0|g),x(),i=0;;){if((0|i)>(0|s)){S=98;break t}if((-117440513&(u=0|r[4+(k=n+(a<<3)|0)>>2])|0)==(0|h)&&(0|r[k>>2])==(0|c)){S=70;break}if((0|r[(k=n+((a=(a+1|0)%(0|s)|0)<<3)|0)>>2])==(0|c)&&(0|r[k+4>>2])==(0|h))break;i=i+1|0}if(70==(0|S)&&(S=0,!0&100663296==(117440512&u|0)))break;r[(k=e+(o<<3)|0)>>2]=d,r[k+4>>2]=l,o=o+1|0}}while(0);if((0|(t=t+1|0))>=(0|s)){s=f;break e}d=0|r[(l=C+(t<<3)|0)>>2],l=0|r[l+4>>2]}for(t=0,o=0;;){do{if(!(0==(0|d)&0==(0|l))){if(h=0|xe(0|d,0|l,52),x(),(0|(h&=15))>=(0|y))if((0|h)!=(0|y))if(i=d|p,a=-15728641&l|m,h>>>0<_>>>0)h=a;else{c=y;do{k=0|Ce(7,0,3*(14-c|0)|0),c=c+1|0,i|=k,a=0|x()|a}while(c>>>0<h>>>0);h=a}else i=d,h=l;else i=0,h=0;for(c=0|we(0|i,0|h,0|s,0|g),x(),a=0;;){if((0|a)>(0|s)){S=98;break t}if((-117440513&(u=0|r[4+(k=n+(c<<3)|0)>>2])|0)==(0|h)&&(0|r[k>>2])==(0|i)){S=93;break}if((0|r[(k=n+((c=(c+1|0)%(0|s)|0)<<3)|0)>>2])==(0|i)&&(0|r[k+4>>2])==(0|h))break;a=a+1|0}if(93==(0|S)&&(S=0,!0&100663296==(117440512&u|0)))break;r[(k=e+(o<<3)|0)>>2]=d,r[k+4>>2]=l,o=o+1|0}}while(0);if((0|(t=t+1|0))>=(0|s)){s=f;break e}d=0|r[(l=C+(t<<3)|0)>>2],l=0|r[l+4>>2]}}else o=0,s=f}else o=0,s=0}while(0);if(De(0|n,0,0|w),Ee(0|C,0|A,s<<3|0),be(A),!s)break;e=e+(o<<3)|0}return 41==(0|S)?(be(C),be(n),0|(k=-1)):51==(0|S)?(be(C),be(n),0|(k=-2)):58==(0|S)?(be(C),be(n),0|(k=-3)):98==(0|S)?(be(A),be(C),be(n),0|(k=-1)):(99==(0|S)&&Ee(0|e,0|C,s<<3|0),be(C),be(n),0|(k=0))},_destroyLinkedPolygon:function(t){var e=0,i=0,n=0,s=0;if(t|=0)for(n=1;;){if(0|(e=0|r[t>>2]))do{if(0|(i=0|r[e>>2]))do{s=i,i=0|r[i+16>>2],be(s)}while(0!=(0|i));s=e,e=0|r[e+8>>2],be(s)}while(0!=(0|e));if(e=t,t=0|r[t+8>>2],n||be(e),!t)break;n=0}},_edgeLengthKm:function(t){return+ +s[20752+((t|=0)<<3)>>3]},_edgeLengthM:function(t){return+ +s[20880+((t|=0)<<3)>>3]},_emscripten_replace_memory:function(t){return n=new Int8Array(t),new Uint8Array(t),r=new Int32Array(t),new Float32Array(t),s=new Float64Array(t),i=t,!0},_exactEdgeLengthKm:function(t,e){var i,n,o=0,a=0,l=0,h=0,p=0,f=0;if(n=P,P=P+176|0,Zt(t|=0,e|=0,i=n),(0|(t=0|r[i>>2]))<=1)return P=n,+(l=0);e=t+-1|0,t=0,o=0,a=+s[i+8>>3],l=+s[i+16>>3];do{p=a,h=l,h=(f=+d(.5*((a=+s[i+8+((t=t+1|0)<<4)>>3])-p)))*f+(h=+d(.5*((l=+s[i+8+(t<<4)+8>>3])-h)))*(+u(+p)*+u(+a)*h),o+=2*+A(+ +c(+h),+ +c(+(1-h)))}while((0|t)!=(0|e));return P=n,+(f=6371.007180918475*o)},_exactEdgeLengthM:function(t,e){var i,n,o=0,a=0,l=0,h=0,p=0,f=0;if(n=P,P=P+176|0,Zt(t|=0,e|=0,i=n),(0|(t=0|r[i>>2]))<=1)return P=n,+(l=0);e=t+-1|0,t=0,o=0,a=+s[i+8>>3],l=+s[i+16>>3];do{p=a,h=l,h=(f=+d(.5*((a=+s[i+8+((t=t+1|0)<<4)>>3])-p)))*f+(h=+d(.5*((l=+s[i+8+(t<<4)+8>>3])-h)))*(+u(+p)*+u(+a)*h),o+=2*+A(+ +c(+h),+ +c(+(1-h)))}while((0|t)!=(0|e));return P=n,+(f=6371.007180918475*o*1e3)},_exactEdgeLengthRads:function(t,e){var i,n,o=0,a=0,l=0,h=0,p=0,f=0;if(n=P,P=P+176|0,Zt(t|=0,e|=0,i=n),(0|(t=0|r[i>>2]))<=1)return P=n,+(l=0);e=t+-1|0,t=0,o=0,a=+s[i+8>>3],l=+s[i+16>>3];do{p=a,h=l,h=(f=+d(.5*((a=+s[i+8+((t=t+1|0)<<4)>>3])-p)))*f+(h=+d(.5*((l=+s[i+8+(t<<4)+8>>3])-h)))*(+u(+a)*+u(+p)*h),o+=2*+A(+ +c(+h),+ +c(+(1-h)))}while((0|t)<(0|e));return P=n,+o},_experimentalH3ToLocalIj:function(t,e,i,n,r){var s,o;return r|=0,o=P,P=P+16|0,(t=0|Jt(t|=0,e|=0,i|=0,n|=0,s=o))||(pt(s,r),t=0),P=o,0|t},_experimentalLocalIjToH3:function(t,e,i,n){var r,s;return t|=0,e|=0,n|=0,r=P,P=P+16|0,ft(i|=0,s=r),n=0|te(t,e,s,n),P=r,0|n},_free:be,_geoToH3:jt,_getDestinationH3IndexFromUnidirectionalEdge:function(t,e){t|=0;var i,n,s=0;return i=P,P=P+16|0,s=i,!0&268435456==(2013265920&(e|=0)|0)?(n=0|xe(0|t,0|e,56),x(),r[s>>2]=0,s=0|R(t,-2130706433&e|134217728,7&n,s),e=0|x(),w(0|e),P=i,0|s):(s=0,w(0|(e=0)),P=i,0|s)},_getH3IndexesFromUnidirectionalEdge:function(t,e,i){t|=0;var n,s,o,a,l=0;o=P,P=P+16|0,n=o,s=-2130706433&(e|=0)|134217728,r[(l=i|=0)>>2]=(a=!0&268435456==(2013265920&e|0))?t:0,r[l+4>>2]=a?s:0,a?(e=0|xe(0|t,0|e,56),x(),r[n>>2]=0,t=0|R(t,s,7&e,n),e=0|x()):(t=0,e=0),r[(l=i+8|0)>>2]=t,r[l+4>>2]=e,P=o},_getH3UnidirectionalEdge:function(t,e,i,n){var s,o,a=0,l=0,c=0,h=0,u=0;if(o=P,P=P+16|0,s=o,!(0|Wt(t|=0,e|=0,i|=0,n|=0)))return h=0,w(0|(c=0)),P=o,0|h;for(c=-2130706433&e,a=(a=0==(0|Rt(t,e)))?1:2;r[s>>2]=0,l=a+1|0,!((0|(u=0|R(t,e,a,s)))==(0|i)&(0|x())==(0|n));){if(!(l>>>0<7)){a=0,t=0,h=6;break}a=l}return 6==(0|h)?(w(0|a),P=o,0|t):(u=0|Ce(0|a,0,56),h=0|c|x()|268435456,u|=t,w(0|h),P=o,0|u)},_getH3UnidirectionalEdgeBoundary:Zt,_getH3UnidirectionalEdgesFromHexagon:function(t,e,i){i|=0;var n,s=0;n=0==(0|Rt(t|=0,e|=0)),e&=-2130706433,r[(s=i)>>2]=n?t:0,r[s+4>>2]=n?285212672|e:0,r[(s=i+8|0)>>2]=t,r[s+4>>2]=301989888|e,r[(s=i+16|0)>>2]=t,r[s+4>>2]=318767104|e,r[(s=i+24|0)>>2]=t,r[s+4>>2]=335544320|e,r[(s=i+32|0)>>2]=t,r[s+4>>2]=352321536|e,r[(i=i+40|0)>>2]=t,r[i+4>>2]=369098752|e},_getOriginH3IndexFromUnidirectionalEdge:function(t,e){var i;return t|=0,w(0|((i=!0&268435456==(2013265920&(e|=0)|0))?-2130706433&e|134217728:0)),0|(i?t:0)},_getPentagonIndexes:Gt,_getRes0Indexes:function(t){t|=0;var e=0,i=0,n=0;e=0;do{Ce(0|e,0,45),n=134225919|x(),r[(i=t+(e<<3)|0)>>2]=-1,r[i+4>>2]=n,e=e+1|0}while(122!=(0|e))},_h3Distance:function(t,e,i,n){var r,s,o;return i|=0,n|=0,o=P,P=P+32|0,s=o,t=0==(0|Jt(t|=0,e|=0,t,e,r=o+12|0))&&0==(0|Jt(t,e,i,n,s))?0|dt(r,s):-1,P=o,0|t},_h3GetBaseCell:Pt,_h3GetFaces:function t(e,i,n){n|=0;var s,o=0,a=0,l=0,c=0,h=0,u=0,d=0,p=0;s=P,P=P+128|0,d=s+112|0,l=s+96|0,p=s,a=0|xe(0|(e|=0),0|(i|=0),52),x(),r[d>>2]=h=15&a,c=0|xe(0|e,0|i,45),x(),c&=127;t:do{if(0|F(c)){if(0|h)for(o=1;;){if(!(0==((u=0|Ce(7,0,3*(15-o|0)|0))&e|0)&0==((0|x())&i|0))){a=0;break t}if(!(o>>>0<h>>>0))break;o=o+1|0}if(!(1&a))return u=0|Ce(h+1|0,0,52),p=0|x()|-15728641&i,t((u|e)&~(d=0|Ce(7,0,3*(14-h|0)|0)),p&~(0|x()),n),void(P=s);a=1}else a=0}while(0);Ht(e,i,l),a?(yt(l,d,p),u=5):(St(l,d,p),u=6);t:do{if(0|F(c))if(h)for(o=1;;){if(!(0==((c=0|Ce(7,0,3*(15-o|0)|0))&e|0)&0==((0|x())&i|0))){o=8;break t}if(!(o>>>0<h>>>0)){o=20;break}o=o+1|0}else o=20;else o=8}while(0);if(De(0|n,-1,0|o),a){a=0;do{for(xt(l=p+(a<<4)|0,0|r[d>>2]),l=0|r[l>>2],o=0;!(-1==(0|(h=0|r[(c=n+(o<<2)|0)>>2]))|(0|h)==(0|l));)o=o+1|0;r[c>>2]=l,a=a+1|0}while((0|a)!=(0|u))}else{a=0;do{for(wt(l=p+(a<<4)|0,0|r[d>>2],0,1),l=0|r[l>>2],o=0;!(-1==(0|(h=0|r[(c=n+(o<<2)|0)>>2]))|(0|h)==(0|l));)o=o+1|0;r[c>>2]=l,a=a+1|0}while((0|a)!=(0|u))}P=s},_h3IndexesAreNeighbors:Wt,_h3IsPentagon:Rt,_h3IsResClassIII:function(t,e){return e=0|xe(0|(t|=0),0|(e|=0),52),x(),1&e|0},_h3IsValid:Ot,_h3Line:function(t,e,i,n,s){i|=0,n|=0,s|=0;var o,a,c=0,h=0,u=0,d=0,p=0,f=0,m=0,g=0,A=0,b=0,v=0,_=0,y=0,w=0,x=0,C=0;if(o=P,P=P+48|0,h=o+12|0,a=o,0==(0|Jt(t|=0,e|=0,t,e,c=o+24|0))&&0==(0|Jt(t,e,i,n,h))){if((0|(x=0|dt(c,h)))<0)return P=o,0|x;for(r[c>>2]=0,r[c+4>>2]=0,r[c+8>>2]=0,r[h>>2]=0,r[h+4>>2]=0,r[h+8>>2]=0,Jt(t,e,t,e,c),Jt(t,e,i,n,h),mt(c),mt(h),x?(w=c,i=f=0|r[c>>2],n=m=0|r[(_=c+4|0)>>2],c=g=0|r[(y=c+8|0)>>2],b=+((0|r[h>>2])-f|0)/(A=+(0|x)),v=+((0|r[h+4>>2])-m|0)/A,A=+((0|r[h+8>>2])-g|0)/A):(_=n=c+4|0,y=g=c+8|0,w=c,i=0|r[c>>2],n=0|r[n>>2],c=0|r[g>>2],b=0,v=0,A=0),r[a>>2]=i,r[(g=a+4|0)>>2]=n,r[(m=a+8|0)>>2]=c,f=0;;){C=b*(d=+(0|f))+ +(0|i),u=v*d+ +(0|r[_>>2]),d=A*d+ +(0|r[y>>2]),n=~~+ke(+C),h=~~+ke(+u),i=~~+ke(+d),C=+l(+(+(0|n)-C)),u=+l(+(+(0|h)-u)),d=+l(+(+(0|i)-d));do{if(!(C>u&C>d)){if(p=0-n|0,u>d){c=p-i|0;break}c=h,i=p-h|0;break}n=0-(h+i)|0,c=h}while(0);if(r[a>>2]=n,r[g>>2]=c,r[m>>2]=i,gt(a),te(t,e,a,s+(f<<3)|0),(0|f)==(0|x))break;f=f+1|0,i=0|r[w>>2]}return P=o,0}return P=o,-1},_h3LineSize:function(t,e,i,n){var r,s,o;return i|=0,n|=0,o=P,P=P+32|0,s=o,t=0==(0|Jt(t|=0,e|=0,t,e,r=o+12|0))&&0==(0|Jt(t,e,i,n,s))?0|dt(r,s):-1,P=o,(t>>>31^1)+t|0},_h3SetToLinkedGeo:function(t,e,i){i|=0;var n,s,o,a=0;if(o=P,P=P+32|0,n=o,function(t,e,i){t|=0,i|=0;var n,s,o=0,a=0,l=0,c=0,h=0;if(s=P,P=P+176|0,n=s,(0|(e|=0))<1)return ce(i,0,0),void(P=s);c=0|xe(0|r[(c=t)>>2],0|r[c+4>>2],52),x(),ce(i,(0|e)>6?e:6,15&c),c=0;do{if($t(0|r[(o=t+(c<<3)|0)>>2],0|r[o+4>>2],n),(0|(o=0|r[n>>2]))>0){h=0;do{l=n+8+(h<<4)|0,(a=0|fe(i,o=n+8+(((0|(h=h+1|0))%(0|o)|0)<<4)|0,l))?de(i,a):pe(i,l,o),o=0|r[n>>2]}while((0|h)<(0|o))}c=c+1|0}while((0|c)!=(0|e));P=s}(t|=0,e|=0,s=o+16|0),r[i>>2]=0,r[i+4>>2]=0,r[i+8>>2]=0,!(t=0|ue(s)))return Qt(i),he(s),void(P=o);do{e=0|qt(i);do{Yt(e,t),r[n>>2]=r[(a=t+16|0)>>2],r[n+4>>2]=r[a+4>>2],r[n+8>>2]=r[a+8>>2],r[n+12>>2]=r[a+12>>2],de(s,t),t=0|me(s,n)}while(0!=(0|t));t=0|ue(s)}while(0!=(0|t));Qt(i),he(s),P=o},_h3ToCenterChild:function(t,e,i){i|=0;var n=0,r=0;if(n=0|xe(0|(t|=0),0|(e|=0),52),x(),(0|i)<16&(0|(n&=15))<=(0|i)){if((0|n)!=(0|i)&&(t|=r=0|Ce(0|i,0,52),e=0|x()|-15728641&e,(0|n)<(0|i)))do{r=0|Ce(7,0,3*(14-n|0)|0),n=n+1|0,t&=~r,e&=~(0|x())}while((0|n)<(0|i))}else e=0,t=0;return w(0|e),0|t},_h3ToChildren:Tt,_h3ToGeo:Kt,_h3ToGeoBoundary:$t,_h3ToParent:Mt,_h3UnidirectionalEdgeIsValid:function(t,e){var i=0;if(!(!0&268435456==(2013265920&(e|=0)|0)))return 0;switch(i=0|xe(0|(t|=0),0|e,56),x(),7&i){case 0:case 7:return 0}return!0&16777216==(117440512&e|0)&0!=(0|Rt(t,i=-2130706433&e|134217728))?0|(i=0):0|(i=0|Ot(t,i))},_hexAreaKm2:function(t){return+ +s[20496+((t|=0)<<3)>>3]},_hexAreaM2:function(t){return+ +s[20624+((t|=0)<<3)>>3]},_hexRing:function(t,e,i,n){t|=0,e|=0,n|=0;var s,o=0,a=0,l=0,c=0,h=0,u=0,d=0;if(s=P,P=P+16|0,d=s,!(i|=0))return r[(d=n)>>2]=t,r[d+4>>2]=e,P=s,0;r[d>>2]=0;t:do{if(0|Rt(t,e))t=1;else{if(a=(0|i)>0){o=0,u=t;do{if(0==(0|(u=0|R(u,e,4,d)))&0==(0|(e=0|x()))){t=2;break t}if(o=o+1|0,0|Rt(u,e)){t=1;break t}}while((0|o)<(0|i));if(r[(h=n)>>2]=u,r[h+4>>2]=e,h=i+-1|0,a){a=0,l=1,o=u,t=e;do{if(0==(0|(o=0|R(o,t,2,d)))&0==(0|(t=0|x()))){t=2;break t}if(r[(c=n+(l<<3)|0)>>2]=o,r[c+4>>2]=t,l=l+1|0,0|Rt(o,t)){t=1;break t}a=a+1|0}while((0|a)<(0|i));c=0,a=l;do{if(0==(0|(o=0|R(o,t,3,d)))&0==(0|(t=0|x()))){t=2;break t}if(r[(l=n+(a<<3)|0)>>2]=o,r[l+4>>2]=t,a=a+1|0,0|Rt(o,t)){t=1;break t}c=c+1|0}while((0|c)<(0|i));l=0;do{if(0==(0|(o=0|R(o,t,1,d)))&0==(0|(t=0|x()))){t=2;break t}if(r[(c=n+(a<<3)|0)>>2]=o,r[c+4>>2]=t,a=a+1|0,0|Rt(o,t)){t=1;break t}l=l+1|0}while((0|l)<(0|i));l=0;do{if(0==(0|(o=0|R(o,t,5,d)))&0==(0|(t=0|x()))){t=2;break t}if(r[(c=n+(a<<3)|0)>>2]=o,r[c+4>>2]=t,a=a+1|0,0|Rt(o,t)){t=1;break t}l=l+1|0}while((0|l)<(0|i));l=0;do{if(0==(0|(o=0|R(o,t,4,d)))&0==(0|(t=0|x()))){t=2;break t}if(r[(c=n+(a<<3)|0)>>2]=o,r[c+4>>2]=t,a=a+1|0,0|Rt(o,t)){t=1;break t}l=l+1|0}while((0|l)<(0|i));for(l=0;;){if(0==(0|(o=0|R(o,t,6,d)))&0==(0|(t=0|x()))){t=2;break t}if((0|l)!=(0|h)){if(r[(c=n+(a<<3)|0)>>2]=o,r[c+4>>2]=t,0|Rt(o,t)){t=1;break t}a=a+1|0}if((0|(l=l+1|0))>=(0|i)){l=u,a=e;break}}}else l=u,o=u,a=e,t=e}else r[(l=n)>>2]=t,r[l+4>>2]=e,l=t,o=t,a=e,t=e;t=1&((0|l)!=(0|o)|(0|a)!=(0|t))}}while(0);return P=s,0|t},_i64Subtract:_e,_kRing:O,_kRingDistances:function(t,e,i,n,r){var s;if(0|M(t|=0,e|=0,i|=0,n|=0,r|=0)){if(De(0|n,0,(s=1+(0|v(3*i|0,i+1|0))|0)<<3|0),0|r)return De(0|r,0,s<<2|0),void T(t,e,i,n,r,s,0);(r=0|ve(s,4))&&(T(t,e,i,n,r,s,0),be(r))}},_llvm_minnum_f64:Se,_llvm_round_f64:ke,_malloc:Ae,_maxFaceCount:function(t,e){var i=0,n=0;if(n=0|xe(0|(t|=0),0|(e|=0),45),x(),!(0|F(127&n)))return 2;if(n=0|xe(0|t,0|e,52),x(),!(n&=15))return 5;for(i=1;;){if(!(0==((0|Ce(7,0,3*(15-i|0)|0))&t|0)&0==((0|x())&e|0))){i=2,t=6;break}if(!(i>>>0<n>>>0)){i=5,t=6;break}i=i+1|0}return 6==(0|t)?0|i:0},_maxH3ToChildrenSize:function(t,e,i){return i|=0,t=0|xe(0|(t|=0),0|(e|=0),52),x(),(0|i)<16&(0|(t&=15))<=(0|i)?0|(i=0|ee(7,i-t|0)):0|(i=0)},_maxKringSize:function(t){return 1+(0|v(3*(t|=0)|0,t+1|0))|0},_maxPolyfillSize:function(t,e){e|=0;var i,n=0,s=0,o=0,a=0,l=0;if(i=P,P=P+48|0,o=i+8|0,a=0|r[4+(l=t|=0)>>2],r[(n=s=i)>>2]=r[l>>2],r[n+4>>2]=a,ne(s,o),o=0|$(o,e),e=0|r[s>>2],(0|(s=0|r[t+8>>2]))<=0)return P=i,0|(l=(a=(0|o)<(0|(l=e)))?l:o)+12;n=0|r[t+12>>2],t=0;do{e=(0|r[n+(t<<3)>>2])+e|0,t=t+1|0}while((0|t)<(0|s));return P=i,0|(l=(l=(0|o)<(0|e))?e:o)+12},_maxUncompactSize:function(t,e,i){t|=0;var n=0,s=0,o=0,a=0;if((0|(e|=0))<=0)return 0;if((0|(i|=0))>=16){for(n=0;;){if(!(0==(0|r[(a=t+(n<<3)|0)>>2])&0==(0|r[a+4>>2]))){n=-1,s=13;break}if((0|(n=n+1|0))>=(0|e)){n=0,s=13;break}}if(13==(0|s))return 0|n}n=0,a=0;t:for(;;){o=0|r[(s=t+(a<<3)|0)>>2],s=0|r[s+4>>2];do{if(!(0==(0|o)&0==(0|s))){if(s=0|xe(0|o,0|s,52),x(),(0|(s&=15))>(0|i)){n=-1,s=13;break t}if((0|s)==(0|i)){n=n+1|0;break}n=(0|ee(7,i-s|0))+n|0;break}}while(0);if((0|(a=a+1|0))>=(0|e)){s=13;break}}return 13==(0|s)?0|n:0},_memcpy:Ee,_memset:De,_numHexagons:function(t){var e;return t=0|r[(e=21008+((t|=0)<<3)|0)>>2],w(0|r[e+4>>2]),0|t},_pentagonIndexCount:function(){return 12},_pointDistKm:Dt,_pointDistM:function(t,e){var i,n,r,o=0;return o=(r=+d(.5*((n=+s[(e|=0)>>3])-(i=+s[(t|=0)>>3]))))*r+(o=+d(.5*(+s[e+8>>3]-+s[t+8>>3])))*(+u(+n)*+u(+i)*o),2*+A(+ +c(+o),+ +c(+(1-o)))*6371.007180918475*1e3},_pointDistRads:function(t,e){var i,n,r,o=0;return o=(r=+d(.5*((n=+s[(e|=0)>>3])-(i=+s[(t|=0)>>3]))))*r+(o=+d(.5*(+s[e+8>>3]-+s[t+8>>3])))*(+u(+n)*+u(+i)*o),2*+A(+ +c(+o),+ +c(+(1-o)))},_polyfill:function(t,e,i){var n,s=0,o=0,a=0,l=0,c=0;if(n=P,P=P+48|0,s=n+8|0,o=n,0|function(t,e,i){e|=0,i|=0;var n,s,o,a,l,c,h=0,u=0,d=0,p=0,f=0,m=0,g=0,A=0,b=0,v=0,_=0,y=0,w=0,S=0,k=0,E=0,D=0,I=0,O=0,R=0,F=0,L=0,U=0,B=0;if(l=P,P=P+112|0,s=l+80|0,m=l+72|0,o=l,a=l+56|0,(c=0|Ae(32+(r[(g=8+(t|=0)|0)>>2]<<5)|0))||C(22848,22448,800,22456),re(t,c),h=0|r[(d=t)+4>>2],r[(f=m)>>2]=r[d>>2],r[f+4>>2]=h,ne(m,s),f=0|$(s,e),h=0|r[m>>2],(0|(d=0|r[g>>2]))>0){p=0|r[t+12>>2],u=0;do{h=(0|r[p+(u<<3)>>2])+h|0,u=u+1|0}while((0|u)!=(0|d))}if(u=0|ve(n=(f=(0|f)<(0|h)?h:f)+12|0,8),A=0|ve(n,8),r[s>>2]=0,B=0|r[(U=t)+4>>2],r[(h=m)>>2]=r[U>>2],r[h+4>>2]=B,0|(h=0|V(m,n,e,s,u,A)))return be(u),be(A),be(c),P=l,0|h;t:do{if((0|r[g>>2])>0){for(d=t+12|0,h=0;p=0|V((0|r[d>>2])+(h<<3)|0,n,e,s,u,A),h=h+1|0,!(0|p);)if((0|h)>=(0|r[g>>2]))break t;return be(u),be(A),be(c),P=l,0|p}}while(0);(0|f)>-12&&De(0|A,0,((0|n)>1?n:1)<<3|0);t:do{if((0|r[s>>2])>0){B=((0|n)<0)<<31>>31,I=u,O=A,R=u,F=u,L=A,U=u,h=u,S=u,k=A,E=A,D=A,u=A;e:for(;;){for(w=0|r[s>>2],_=0,y=0,d=0;;){f=(p=o)+56|0;do{r[p>>2]=0,p=p+4|0}while((0|p)<(0|f));if(0|M(m=0|r[(e=I+(_<<3)|0)>>2],e=0|r[e+4>>2],1,o,0)){f=(p=o)+56|0;do{r[p>>2]=0,p=p+4|0}while((0|p)<(0|f));0|(p=0|ve(7,4))&&(T(m,e,1,o,p,7,0),be(p))}v=0;do{A=0|r[(b=o+(v<<3)|0)>>2],b=0|r[b+4>>2];i:do{if(!(0==(0|A)&0==(0|b))){if(m=0|we(0|A,0|b,0|n,0|B),x(),!(0==(0|(e=0|r[(f=p=i+(m<<3)|0)>>2]))&0==(0|(f=0|r[f+4>>2]))))for(g=0;;){if((0|g)>(0|n))break e;if((0|e)==(0|A)&(0|f)==(0|b))break i;if(0==(0|(e=0|r[(f=p=i+((m=(m+1|0)%(0|n)|0)<<3)|0)>>2]))&0==(0|(f=0|r[f+4>>2])))break;g=g+1|0}0==(0|A)&0==(0|b)||(Kt(A,b,a),0|se(t,c,a)&&(r[(g=p)>>2]=A,r[g+4>>2]=b,r[(g=O+(d<<3)|0)>>2]=A,r[g+4>>2]=b,d=d+1|0))}}while(0);v=v+1|0}while(v>>>0<7);if((0|(y=y+1|0))>=(0|w))break;_=_+1|0}if((0|w)>0&&De(0|R,0,w<<3|0),r[s>>2]=d,!((0|d)>0))break t;A=u,b=D,v=U,_=E,y=k,w=O,u=S,D=h,E=F,k=R,S=A,h=b,U=L,L=v,F=_,R=y,O=I,I=w}return be(F),be(L),be(c),P=l,-1}h=A}while(0);return be(c),be(u),be(h),P=l,0}(t|=0,e|=0,i|=0)){if(a=0|r[(c=t)+4>>2],r[(l=o)>>2]=r[c>>2],r[l+4>>2]=a,ne(o,s),l=0|$(s,e),e=0|r[o>>2],(0|(a=0|r[t+8>>2]))>0){o=0|r[t+12>>2],s=0;do{e=(0|r[o+(s<<3)>>2])+e|0,s=s+1|0}while((0|s)!=(0|a))}(0|(e=(0|l)<(0|e)?e:l))<=-12||De(0|i,0,8+(((0|(c=e+11|0))>0?c:0)<<3)|0),P=n}else P=n},_res0IndexCount:function(){return 122},_round:Ie,_sbrk:Pe,_sizeOfCoordIJ:function(){return 8},_sizeOfGeoBoundary:function(){return 168},_sizeOfGeoCoord:function(){return 16},_sizeOfGeoPolygon:function(){return 16},_sizeOfGeofence:function(){return 8},_sizeOfH3Index:function(){return 8},_sizeOfLinkedGeoPolygon:function(){return 12},_uncompact:function(t,e,i,n,s){t|=0,i|=0,n|=0;var o=0,a=0,l=0,c=0,h=0,u=0;if((0|(e|=0))<=0)return 0;if((0|(s|=0))>=16){for(o=0;;){if(!(0==(0|r[(u=t+(o<<3)|0)>>2])&0==(0|r[u+4>>2]))){o=14;break}if((0|(o=o+1|0))>=(0|e)){a=0,o=16;break}}if(14==(0|o))return 0|((0|n)>0?-2:-1);if(16==(0|o))return 0|a}o=0,u=0;t:for(;;){a=0|r[(l=h=t+(u<<3)|0)>>2],l=0|r[l+4>>2];do{if(!(0==(0|a)&0==(0|l))){if((0|o)>=(0|n)){a=-1,o=16;break t}if(c=0|xe(0|a,0|l,52),x(),(0|(c&=15))>(0|s)){a=-2,o=16;break t}if((0|c)==(0|s)){r[(h=i+(o<<3)|0)>>2]=a,r[h+4>>2]=l,o=o+1|0;break}if((0|(a=(0|ee(7,s-c|0))+o|0))>(0|n)){a=-1,o=16;break t}Tt(0|r[h>>2],0|r[h+4>>2],s,i+(o<<3)|0),o=a}}while(0);if((0|(u=u+1|0))>=(0|e)){a=0,o=16;break}}return 16==(0|o)?0|a:0},establishStackSpace:function(t,e){P=t|=0},stackAlloc:function(t){var e;return e=P,P=15+(P=P+(t|=0)|0)&-16,0|e},stackRestore:function(t){P=t|=0},stackSave:function(){return 0|P}}}({Math,Int8Array,Int32Array,Uint8Array,Float32Array,Float64Array},{a:at,b:function(t){c=t},c:h,d:function(t,e,i,n){at("Assertion failed: "+w(t)+", at: "+[e?w(e):"unknown filename",i,n?w(n):"unknown function"])},e:function(t){return i.___errno_location&&(b[i.___errno_location()>>2]=t),t},f:$,g:function(t,e,i){g.set(g.subarray(e,e+i),t)},h:function(t){var e=$();if(t>2130706432)return!1;for(var i=Math.max(e,16777216);i<t;)i=i<=536870912?x(2*i,16777216):Math.min(x((3*i+2147483648)/4,16777216),2130706432);return!!G(i)},i:function(t){at("OOM")},j:function(t){return t},k:H,l:G,m:K,n:function(){var t=K();return i.extraStackTrace&&(t+="\n"+i.extraStackTrace()),H(t)},o:24032,p:24016},f),X=(i.___uremdi3=Q.___uremdi3,i._bitshift64Lshr=Q._bitshift64Lshr,i._bitshift64Shl=Q._bitshift64Shl,i._calloc=Q._calloc,i._cellAreaKm2=Q._cellAreaKm2,i._cellAreaM2=Q._cellAreaM2,i._cellAreaRads2=Q._cellAreaRads2,i._compact=Q._compact,i._destroyLinkedPolygon=Q._destroyLinkedPolygon,i._edgeLengthKm=Q._edgeLengthKm,i._edgeLengthM=Q._edgeLengthM,i._emscripten_replace_memory=Q._emscripten_replace_memory),J=(i._exactEdgeLengthKm=Q._exactEdgeLengthKm,i._exactEdgeLengthM=Q._exactEdgeLengthM,i._exactEdgeLengthRads=Q._exactEdgeLengthRads,i._experimentalH3ToLocalIj=Q._experimentalH3ToLocalIj,i._experimentalLocalIjToH3=Q._experimentalLocalIjToH3,i._free=Q._free,i._geoToH3=Q._geoToH3,i._getDestinationH3IndexFromUnidirectionalEdge=Q._getDestinationH3IndexFromUnidirectionalEdge,i._getH3IndexesFromUnidirectionalEdge=Q._getH3IndexesFromUnidirectionalEdge,i._getH3UnidirectionalEdge=Q._getH3UnidirectionalEdge,i._getH3UnidirectionalEdgeBoundary=Q._getH3UnidirectionalEdgeBoundary,i._getH3UnidirectionalEdgesFromHexagon=Q._getH3UnidirectionalEdgesFromHexagon,i._getOriginH3IndexFromUnidirectionalEdge=Q._getOriginH3IndexFromUnidirectionalEdge,i._getPentagonIndexes=Q._getPentagonIndexes,i._getRes0Indexes=Q._getRes0Indexes,i._h3Distance=Q._h3Distance,i._h3GetBaseCell=Q._h3GetBaseCell,i._h3GetFaces=Q._h3GetFaces,i._h3IndexesAreNeighbors=Q._h3IndexesAreNeighbors,i._h3IsPentagon=Q._h3IsPentagon,i._h3IsResClassIII=Q._h3IsResClassIII,i._h3IsValid=Q._h3IsValid,i._h3Line=Q._h3Line,i._h3LineSize=Q._h3LineSize,i._h3SetToLinkedGeo=Q._h3SetToLinkedGeo,i._h3ToCenterChild=Q._h3ToCenterChild,i._h3ToChildren=Q._h3ToChildren,i._h3ToGeo=Q._h3ToGeo,i._h3ToGeoBoundary=Q._h3ToGeoBoundary,i._h3ToParent=Q._h3ToParent,i._h3UnidirectionalEdgeIsValid=Q._h3UnidirectionalEdgeIsValid,i._hexAreaKm2=Q._hexAreaKm2,i._hexAreaM2=Q._hexAreaM2,i._hexRing=Q._hexRing,i._i64Subtract=Q._i64Subtract,i._kRing=Q._kRing,i._kRingDistances=Q._kRingDistances,i._llvm_minnum_f64=Q._llvm_minnum_f64,i._llvm_round_f64=Q._llvm_round_f64,i._malloc=Q._malloc,i._maxFaceCount=Q._maxFaceCount,i._maxH3ToChildrenSize=Q._maxH3ToChildrenSize,i._maxKringSize=Q._maxKringSize,i._maxPolyfillSize=Q._maxPolyfillSize,i._maxUncompactSize=Q._maxUncompactSize,i._memcpy=Q._memcpy,i._memset=Q._memset,i._numHexagons=Q._numHexagons,i._pentagonIndexCount=Q._pentagonIndexCount,i._pointDistKm=Q._pointDistKm,i._pointDistM=Q._pointDistM,i._pointDistRads=Q._pointDistRads,i._polyfill=Q._polyfill,i._res0IndexCount=Q._res0IndexCount,i._round=Q._round,i._sbrk=Q._sbrk,i._sizeOfCoordIJ=Q._sizeOfCoordIJ,i._sizeOfGeoBoundary=Q._sizeOfGeoBoundary,i._sizeOfGeoCoord=Q._sizeOfGeoCoord,i._sizeOfGeoPolygon=Q._sizeOfGeoPolygon,i._sizeOfGeofence=Q._sizeOfGeofence,i._sizeOfH3Index=Q._sizeOfH3Index,i._sizeOfLinkedGeoPolygon=Q._sizeOfLinkedGeoPolygon,i._uncompact=Q._uncompact,i.establishStackSpace=Q.establishStackSpace,i.stackAlloc=Q.stackAlloc),tt=i.stackRestore=Q.stackRestore,et=i.stackSave=Q.stackSave;if(i.asm=Q,i.cwrap=function(t,e,i,n){var r=(i=i||[]).every(function(t){return"number"===t});return"string"!==e&&r&&!n?d(t):function(){return p(t,e,i,arguments)}},i.setValue=function(t,e,i,n){switch("*"===(i=i||"i8").charAt(i.length-1)&&(i="i32"),i){case"i1":case"i8":m[t>>0]=e;break;case"i16":A[t>>1]=e;break;case"i32":b[t>>2]=e;break;case"i64":B=[e>>>0,(U=e,+O(U)>=1?U>0?(0|R(+T(U/4294967296),4294967295))>>>0:~~+M((U-+(~~U>>>0))/4294967296)>>>0:0)],b[t>>2]=B[0],b[t+4>>2]=B[1];break;case"float":v[t>>2]=e;break;case"double":_[t>>3]=e;break;default:at("invalid type for setValue: "+i)}},i.getValue=function(t,e,i){switch("*"===(e=e||"i8").charAt(e.length-1)&&(e="i32"),e){case"i1":case"i8":return m[t>>0];case"i16":return A[t>>1];case"i32":case"i64":return b[t>>2];case"float":return v[t>>2];case"double":return _[t>>3];default:at("invalid type for getValue: "+e)}return null},i.getTempRet0=h,N){z(N)||(q=N,N=i.locateFile?i.locateFile(q,o):o+q),V++,i.monitorRunDependencies&&i.monitorRunDependencies(V);var it=function(t){t.byteLength&&(t=new Uint8Array(t)),g.set(t,8),i.memoryInitializerRequest&&delete i.memoryInitializerRequest.response,function(t){if(V--,i.monitorRunDependencies&&i.monitorRunDependencies(V),0==V&&(null!==F&&(clearInterval(F),F=null),L)){var e=L;L=null,e()}}()},nt=function(){r(N,it,function(){throw"could not load memory initializer "+N})},rt=Z(N);if(rt)it(rt.buffer);else if(i.memoryInitializerRequest){var st=function(){var t=i.memoryInitializerRequest,e=t.response;if(200!==t.status&&0!==t.status){var n=Z(i.memoryInitializerRequestURL);if(!n)return console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+t.status+", retrying "+N),void nt();e=n.buffer}it(e)};i.memoryInitializerRequest.response?setTimeout(st,0):i.memoryInitializerRequest.addEventListener("load",st)}else nt()}function ot(t){function e(){Y||(Y=!0,u||(k(D),k(I),i.onRuntimeInitialized&&i.onRuntimeInitialized(),function(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)t=i.postRun.shift(),P.unshift(t);var t;k(P)}()))}t=t||s,V>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)t=i.preRun.shift(),E.unshift(t);var t;k(E)}(),V>0||(i.setStatus?(i.setStatus("Running..."),setTimeout(function(){setTimeout(function(){i.setStatus("")},1),e()},1)):e()))}function at(t){throw i.onAbort&&i.onAbort(t),a(t+=""),l(t),u=!0,"abort("+t+"). Build with -s ASSERTIONS=1 for more info."}if(L=function t(){Y||ot(),Y||(L=t)},i.run=ot,i.abort=at,i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return ot(),t}("object"==typeof $I?$I:{}),GI="number",WI={};[["sizeOfH3Index",GI],["sizeOfGeoCoord",GI],["sizeOfGeoBoundary",GI],["sizeOfGeoPolygon",GI],["sizeOfGeofence",GI],["sizeOfLinkedGeoPolygon",GI],["sizeOfCoordIJ",GI],["h3IsValid","number",["number","number"]],["geoToH3","number",[GI,GI,"number"]],["h3ToGeo",null,["number","number",GI]],["h3ToGeoBoundary",null,["number","number",GI]],["maxKringSize",GI,[GI]],["kRing",null,["number","number",GI,GI]],["kRingDistances",null,["number","number",GI,GI,GI]],["hexRing",null,["number","number",GI,GI]],["maxPolyfillSize",GI,[GI,"number"]],["polyfill",null,[GI,"number",GI]],["h3SetToLinkedGeo",null,[GI,GI,GI]],["destroyLinkedPolygon",null,[GI]],["compact",GI,[GI,GI,GI]],["uncompact",GI,[GI,GI,GI,GI,"number"]],["maxUncompactSize",GI,[GI,GI,"number"]],["h3IsPentagon","number",["number","number"]],["h3IsResClassIII","number",["number","number"]],["h3GetBaseCell",GI,["number","number"]],["maxFaceCount",GI,["number","number"]],["h3GetFaces",null,["number","number",GI]],["h3ToParent","number",["number","number","number"]],["h3ToChildren",null,["number","number","number",GI]],["h3ToCenterChild","number",["number","number","number"]],["maxH3ToChildrenSize",GI,["number","number","number"]],["h3IndexesAreNeighbors","number",["number","number","number","number"]],["getH3UnidirectionalEdge","number",["number","number","number","number"]],["getOriginH3IndexFromUnidirectionalEdge","number",["number","number"]],["getDestinationH3IndexFromUnidirectionalEdge","number",["number","number"]],["h3UnidirectionalEdgeIsValid","number",["number","number"]],["getH3IndexesFromUnidirectionalEdge",null,["number","number",GI]],["getH3UnidirectionalEdgesFromHexagon",null,["number","number",GI]],["getH3UnidirectionalEdgeBoundary",null,["number","number",GI]],["h3Distance",GI,["number","number","number","number"]],["h3Line",GI,["number","number","number","number",GI]],["h3LineSize",GI,["number","number","number","number"]],["experimentalH3ToLocalIj",GI,["number","number","number","number",GI]],["experimentalLocalIjToH3",GI,["number","number",GI,GI]],["hexAreaM2",GI,["number"]],["hexAreaKm2",GI,["number"]],["edgeLengthM",GI,["number"]],["edgeLengthKm",GI,["number"]],["pointDistM",GI,[GI,GI]],["pointDistKm",GI,[GI,GI]],["pointDistRads",GI,[GI,GI]],["cellAreaM2",GI,["number","number"]],["cellAreaKm2",GI,["number","number"]],["cellAreaRads2",GI,["number","number"]],["exactEdgeLengthM",GI,["number","number"]],["exactEdgeLengthKm",GI,["number","number"]],["exactEdgeLengthRads",GI,["number","number"]],["numHexagons",GI,["number"]],["getRes0Indexes",null,[GI]],["res0IndexCount",GI],["getPentagonIndexes",null,[GI,GI]],["pentagonIndexCount",GI]].forEach(function(t){WI[t[0]]=$I.cwrap.apply($I,t)});var ZI=WI.sizeOfH3Index(),qI=WI.sizeOfGeoCoord(),YI=WI.sizeOfGeoBoundary(),QI=WI.sizeOfGeoPolygon(),XI=WI.sizeOfGeofence();WI.sizeOfLinkedGeoPolygon(),WI.sizeOfCoordIJ();var JI=/[^0-9a-fA-F]/;function tP(t){if(Array.isArray(t)&&2===t.length&&Number.isInteger(t[0])&&Number.isInteger(t[1]))return t;if("string"!=typeof t||JI.test(t))return[0,0];var e=parseInt(t.substring(0,t.length-8),16);return[parseInt(t.substring(t.length-8),16),e]}function eP(t){if(t>=0)return t.toString(16);var e=nP(8,(t&=2147483647).toString(16));return(parseInt(e[0],16)+8).toString(16)+e.substring(1)}function iP(t,e){return eP(e)+nP(8,eP(t))}function nP(t,e){for(var i=t-e.length,n="",r=0;r<i;r++)n+="0";return n+e}function rP(t,e,i){for(var n=t.length,r=$I._calloc(n,qI),s=i?1:0,o=i?0:1,a=0;a<2*n;a+=2)$I.HEAPF64.set([t[a/2][s],t[a/2][o]].map(yP),r/8+a);return $I.HEAPU32.set([n,r],e/4),e}function sP(t){var e=function(t){return[t,$I.getTempRet0()]}(t),i=e[1];return i?iP(e[0],i):null}function oP(t,e){void 0===e&&(e=0);var i=$I.getValue(t+4*e*2,"i32"),n=$I.getValue(t+4*(2*e+1),"i32");return n?iP(i,n):null}function aP(t,e){for(var i=[],n=0;n<e;n++){var r=oP(t,n);null!==r&&i.push(r)}return i}function lP(t){return 180*$I.getValue(t,"double")/Math.PI}function cP(t){return[lP(t),lP(t+8)]}function hP(t){return[lP(t+8),lP(t)]}function uP(t,e,i){for(var n=$I.getValue(t,"i32"),r=t+8,s=[],o=e?hP:cP,a=0;a<2*n;a+=2)s.push(o(r+8*a));return i&&s.push(s[0]),s}function dP(t){var e=$I._malloc(qI),i=tP(t);WI.h3ToGeo(i[0],i[1],e);var n=cP(e);return $I._free(e),n}function pP(t,e){var i=$I._malloc(YI),n=tP(t);WI.h3ToGeoBoundary(n[0],n[1],i);var r=uP(i,e,e);return $I._free(i),r}function fP(t,e){var i=tP(t);return sP(WI.h3ToParent(i[0],i[1],e))}function mP(t,e,i){if(function(t){if("number"!=typeof t||t<0||t>15||Math.floor(t)!==t)throw new Error("Invalid resolution: "+t)}(e),i=Boolean(i),0===t.length||0===t[0].length)return[];"number"==typeof t[0][0]&&(t=[t]);var n=function(t,e){var i,n=t.length-1,r=$I._calloc(QI),s=0+XI,o=s+4;if(rP(t[0],r+0,e),n>0){i=$I._calloc(n,XI);for(var a=0;a<n;a++)rP(t[a+1],i+XI*a,e)}return $I.setValue(r+s,n,"i32"),$I.setValue(r+o,i,"i32"),r}(t,i),r=WI.maxPolyfillSize(n,e),s=$I._calloc(r,ZI);WI.polyfill(n,e,s);var o=aP(s,r);return $I._free(s),function(t){var e=0+XI,i=e+4;$I._free($I.getValue(t+0+4,"i8*"));var n=$I.getValue(t+e,"i32");if(n>0){for(var r=$I.getValue(t+i,"i32"),s=0;s<n;s++)$I._free($I.getValue(r+XI*s+4,"i8*"));$I._free(r)}$I._free(t)}(n),o}function gP(t){var e=tP(t);return sP(WI.getOriginH3IndexFromUnidirectionalEdge(e[0],e[1]))}function AP(t){var e=tP(t);return sP(WI.getDestinationH3IndexFromUnidirectionalEdge(e[0],e[1]))}function bP(t){var e=tP(t);return Boolean(WI.h3UnidirectionalEdgeIsValid(e[0],e[1]))}function vP(t){var e=tP(t),i=e[0],n=e[1],r=$I._calloc(2,ZI);WI.getH3IndexesFromUnidirectionalEdge(i,n,r);var s=aP(r,2);return $I._free(r),s}function _P(t,e){var i=$I._malloc(YI),n=tP(t);WI.getH3UnidirectionalEdgeBoundary(n[0],n[1],i);var r=uP(i,e);return $I._free(i),r}function yP(t){return t*Math.PI/180}function wP(t){let e=null;const i=t.map(t=>{const i=nI(pP(t,!0),e);return e=i[i.length-1],i}).map(t=>t.reduce((t,e)=>(e[0]<t.minLongitude&&(t.minLongitude=e[0]),e[0]>t.maxLongitude&&(t.maxLongitude=e[0]),e[1]<t.minLatitude&&(t.minLatitude=e[1]),e[1]>t.maxLatitude&&(t.maxLatitude=e[1]),t),{minLongitude:Number.MAX_SAFE_INTEGER,maxLongitude:Number.MIN_SAFE_INTEGER,minLatitude:Number.MAX_SAFE_INTEGER,maxLatitude:Number.MIN_SAFE_INTEGER})).reduce((t,e)=>(e.minLongitude<t.minLongitude&&(t.minLongitude=e.minLongitude),e.maxLongitude>t.maxLongitude&&(t.maxLongitude=e.maxLongitude),e.minLatitude<t.minLatitude&&(t.minLatitude=e.minLatitude),e.maxLatitude>t.maxLatitude&&(t.maxLatitude=e.maxLatitude),t),{minLongitude:Number.MAX_SAFE_INTEGER,maxLongitude:Number.MIN_SAFE_INTEGER,minLatitude:Number.MAX_SAFE_INTEGER,maxLatitude:Number.MIN_SAFE_INTEGER});return[...sE([i.minLongitude,i.minLatitude]),...sE([i.maxLongitude,i.maxLatitude])]}function xP(t){const e=+`0x${t.substr(1)}`;return[Math.round(e/65536)/256,Math.round(e/256%256)/256,Math.round(e%256)/256]}function CP(t){const e=+`0x${t.substr(1)}`;return[Math.round(e/65536),Math.round(e/256%256),Math.round(e%256)]}function SP(t,e){const i=+`0x${t.substr(1)}`,n=Math.min(Math.max(Math.round(i/65536)-e,0),255).toString(16),r=Math.min(Math.max(Math.round(i/256%256)-e,0),255).toString(16),s=Math.min(Math.max(Math.round(i%256)-e,0),255).toString(16);return`#${[1===n.length?`0${n}`:n,1===r.length?`0${r}`:r,1===s.length?`0${s}`:s].join("")}`}let kP=(()=>{class t{constructor(t){this.workerService=t,this.zones$=new Av.a([]),this.zonesById={},this.selectedZone$=new Av.a(null)}refreshZones(){return Object(ue.a)(this,void 0,void 0,function*(){const t=yield this.workerService.zones.list();return this.zonesById=t.reduce((t,e)=>(t[e.id]=e,t),{}),this.zones$.next(t),t})}clear(){this.zones$.next([])}createZone(t){return Object(ue.a)(this,void 0,void 0,function*(){const e=yield this.workerService.zones.create(t);return yield this.refreshZones(),e})}updateZone(t){return Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.zones.update(t),yield this.refreshZones()})}deleteZone(t){return Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.zones.delete(t),yield this.refreshZones()})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(_I.a))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const EP=["#ffffff",[255,255,255]];let DP=(()=>{class t{constructor(t,e,i,n){this.mapConfigService=t,this.mapService=e,this.workerService=i,this.zonesService=n,this.alertRules$=new Av.a([]),this.selectedAlertRuleId$=new Av.a(null),this.selectedAlertRule$=new Av.a(null),this.alertRulesNamesByZoneId={},this.alertRuleColorsById={},this.alertRules$.subscribe(t=>{this.alertRulesNamesByZoneId=t.reduce((t,e)=>{var i,n;const r=null===(i=e.criteria.zone)||void 0===i?void 0:i.zones;(null==r?void 0:r.length)&&r.forEach(i=>{let n=t[i.id];n||(n=t[i.id]=[]),n.push(e.name)});const s=null===(n=e.criteria.passageInZone)||void 0===n?void 0:n.passages;return(null==s?void 0:s.length)&&s.forEach(i=>{let n=t[i.zone.id];n||(n=t[i.zone.id]=[]),n.push(e.name)}),t},{}),this.alertRuleColorsById=t.reduce((t,e)=>(t[e.id]=[e.color,CP(e.color)],t),{})})}refreshAlertRules(){return Object(ue.a)(this,void 0,void 0,function*(){const t=(yield this.workerService.alertRules.list()).map(t=>HI(t,this.zonesService.zonesById));return this.alertRules$.next(t),t})}clear(){this.alertRules$.next([])}selectAlertRule(t){return Object(ue.a)(this,void 0,void 0,function*(){this.selectedAlertRuleId$.next(t);const e=HI(yield this.workerService.alertRules.get(t),this.zonesService.zonesById);if(!this.selectedAlertRule$.value||e.id!==this.selectedAlertRule$.value.id){const t=function(t){return[].concat(t.criteria.passageInZone.enable?t.criteria.passageInZone.passages.flatMap(t=>t.zone.h3indexes):[]).concat(t.criteria.zone.enable?t.criteria.zone.zones.flatMap(t=>t.h3indexes):[])}(e);this.mapService.hasBooted?t.length>0&&this.mapService.fitOn(wP(t)):(this.mapService.resetToDefaultView(),t.length>0&&setTimeout(()=>{this.mapService.fitOn(wP(t),0)},50))}return this.selectedAlertRule$.next(e),e})}deselectAlertRule(){this.selectedAlertRuleId$.next(null),this.selectedAlertRule$.next(null)}updateAlertRulesFilter(t){this.mapConfigService.updateAlertRulesFilter(t)}createAlertRule(t){return Object(ue.a)(this,void 0,void 0,function*(){const e=yield this.workerService.alertRules.create(KI(t));return yield this.refreshAlertRules(),e})}updateAlertRule(t){return Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.alertRules.update(KI(t)),yield this.refreshAlertRules()})}deleteAlertRule(t){return Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.alertRules.delete(t),yield this.refreshAlertRules()})}getAlertRuleColor(t){return this.alertRuleColorsById[t]||EP}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(hI),r.Zb(pI),r.Zb(_I.a),r.Zb(kP))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),IP=(()=>{class t{constructor(){this.alerts$=new Av.a([])}updateAlerts(t){this.alerts$.next(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const PP=[{key:"LineString",name:"Ligne"},{key:"Point",name:"Point"},{key:"Polygon",name:"Zone"}];var OP=function(t){return t.Aircraft="aircraft",t.AircraftPosition="aircraft-position",t.Alert="alert",t.Annotation="annotation",t.Event="event",t.Ship="ship",t.ShipPosition="ship-position",t.H3Element="h3element",t}({});let MP=(()=>{class t{constructor(t){this.workerService=t,this.annotations$=new Av.a([]),this.editedAnnotation$=new Av.a(null),this.editedAnnotationGeomType$=new Av.a("Point"),this.editedAnnotation$.pipe(Gg(1),He(t=>t&&!!t.geom),Object(Ge.a)(t=>t.geom.type),mn()).subscribe(t=>{this.editedAnnotationGeomType$.next(t)})}refreshAnnotations(){return Object(ue.a)(this,void 0,void 0,function*(){const t=yield this.workerService.annotations.list();return this.annotations$.next(t),t})}clear(){this.annotations$.next([])}createNewAnnotation(t){const e={kind:OP.Annotation,name:"",description:"",color:"#c3267d",geom:t};t&&(e.lon=t.coordinates[0],e.lat=t.coordinates[1]),this.editedAnnotation$.next(e)}updateEditedAnnotationGeom(t){const e=this.editedAnnotation$.value;e.geom=t,this.editedAnnotation$.next(e)}editAnnotation(t){this.editedAnnotation$.next(OD(t))}refreshEditedAnnotation(){this.editedAnnotation$.next(this.editedAnnotation$.value)}cancelEditing(){this.editedAnnotation$.next(null),this.annotations$.next(this.annotations$.value)}saveEditedAnnotation(){return Object(ue.a)(this,void 0,void 0,function*(){const t=this.editedAnnotation$.value;t.id?yield this.workerService.annotations.update(t):yield this.workerService.annotations.create(t),yield this.refreshAnnotations(),this.editedAnnotation$.next(null)})}deleteAnnotation(t){return Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.annotations.delete(t),yield this.refreshAnnotations()})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(_I.a))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),TP=(()=>{class t{constructor(){this.drawingZoneMode$=new Av.a(!1),this.drawingZoneHexagonsCache={},this.hexagons$=new Av.a([]),this.selectHexagon$=new _e.a,this.selectHexagon$.subscribe(t=>{this.drawingZoneHexagonsCache[t]?(CC({category:"app",message:"drawing: unselect-hexagon"}),delete this.drawingZoneHexagonsCache[t]):(CC({category:"app",message:"drawing: select-hexagon"}),this.drawingZoneHexagonsCache[t]=!0),this.updateZones(Object.keys(this.drawingZoneHexagonsCache))})}updateZones(t){0===t.length&&0===this.hexagons$.value.length||this.hexagons$.next(t)}clearZones(){this.updateZones([])}editZone(t){return this.drawingZoneMode$.next(!0),this.drawingZoneHexagonsCache={},t.forEach(t=>{this.drawingZoneHexagonsCache[t]=!0}),this.hexagons$.next(t),this.hexagons$}stopEditingZone(){this.drawingZoneMode$.next(!1),this.clearZones()}selectHexagon(t){this.selectHexagon$.next(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const RP=[{label:"Perte signal AIS",color:SP("#ff272d",20)},{label:"Changement d'informations",color:SP("#e1cf15",20)},{label:"Spoofing",color:SP("#ff29ff",20)},{label:"Position tr\xe8s \xe9loign\xe9e",color:SP("#0623c9",20)},{label:"Position d\xe9cal\xe9e",color:SP("#a07149",20)},{label:"Entr\xe9e/Sortie de zone",color:SP("#78f48b",20)},{label:"Route erratique",color:SP("#f78851",20)},{label:"Transbordement",color:SP("#5910d0",20)}],VP=[{key:1,label:"Perte signal AIS",color:"#ff272d"},{key:101,label:"Modification infos navire",color:"#e1cf15"},{key:102,label:"IMO invalide",color:"#ff29ff"},{key:103,label:"Callsign invalide",color:"#ff29ff"},{key:110,label:"Spoofing",color:"#ff29ff"},{key:201,label:"Modification infos voyage",color:"#e1cf15"},{key:301,label:"Position tr\xe8s \xe9loign\xe9e",color:"#0623c9"},{key:302,label:"Modification statut",color:"#e1cf15"},{key:307,label:"Position d\xe9cal\xe9e",color:"#a07149"},{key:401,label:"Entr\xe9e zone",color:"#78f48b"},{key:402,label:"Sortie zone",color:"#78f48b"},{key:403,label:"Route erratique",color:"#f78851"},{key:404,label:"Transbordement",color:"#5910d0"}];VP.forEach(t=>{t.textColor=SP(t.color,20)});const FP=VP.reduce((t,e)=>(t[e.key]=e.label,t),{}),LP=VP.reduce((t,e)=>(t[e.key]=e,t),{});var UP=function(t){return t[t.AISCommLoss=1]="AISCommLoss",t[t.ShipIdChanged=101]="ShipIdChanged",t[t.InvalidImo=102]="InvalidImo",t[t.InvalidCallsign=103]="InvalidCallsign",t[t.Spoofing=110]="Spoofing",t[t.VoyageChanged=201]="VoyageChanged",t[t.VoyageDestination=202]="VoyageDestination",t[t.VoyageETA=203]="VoyageETA",t[t.PositionDubious=301]="PositionDubious",t[t.StatusChanged=302]="StatusChanged",t[t.VectorCheck=307]="VectorCheck",t[t.MoveZoneEntry=401]="MoveZoneEntry",t[t.MoveZoneExit=402]="MoveZoneExit",t[t.MoveErratic=403]="MoveErratic",t[t.MoveMeetingAtSea=404]="MoveMeetingAtSea",t}({});class BP{constructor(t,e,i,n){this.bufferTimeSpan=t,this.bufferCreationInterval=e,this.maxBufferSize=i,this.scheduler=n}call(t,e){return e.subscribe(new jP(t,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))}}class NP{constructor(){this.buffer=[]}}class jP extends Ee.a{constructor(t,e,i,n,r){super(t),this.bufferTimeSpan=e,this.bufferCreationInterval=i,this.maxBufferSize=n,this.scheduler=r,this.contexts=[];const s=this.openContext();if(this.timespanOnly=null==i||i<0,this.timespanOnly)this.add(s.closeAction=r.schedule(zP,e,{subscriber:this,context:s,bufferTimeSpan:e}));else{const t={bufferTimeSpan:e,bufferCreationInterval:i,subscriber:this,scheduler:r};this.add(s.closeAction=r.schedule(KP,e,{subscriber:this,context:s})),this.add(r.schedule(HP,i,t))}}_next(t){const e=this.contexts,i=e.length;let n;for(let r=0;r<i;r++){const i=e[r],s=i.buffer;s.push(t),s.length==this.maxBufferSize&&(n=i)}n&&this.onBufferFull(n)}_error(t){this.contexts.length=0,super._error(t)}_complete(){const{contexts:t,destination:e}=this;for(;t.length>0;){const i=t.shift();e.next(i.buffer)}super._complete()}_unsubscribe(){this.contexts=null}onBufferFull(t){this.closeContext(t);const e=t.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){t=this.openContext();const e=this.bufferTimeSpan;this.add(t.closeAction=this.scheduler.schedule(zP,e,{subscriber:this,context:t,bufferTimeSpan:e}))}}openContext(){const t=new NP;return this.contexts.push(t),t}closeContext(t){this.destination.next(t.buffer);const e=this.contexts;(e?e.indexOf(t):-1)>=0&&e.splice(e.indexOf(t),1)}}function zP(t){const e=t.subscriber,i=t.context;i&&e.closeContext(i),e.closed||(t.context=e.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function HP(t){const{bufferCreationInterval:e,bufferTimeSpan:i,subscriber:n,scheduler:r}=t,s=n.openContext();n.closed||(n.add(s.closeAction=r.schedule(KP,i,{subscriber:n,context:s})),this.schedule(t,e))}function KP(t){const{subscriber:e,context:i}=t;e.closeContext(i)}let $P=(()=>{class t{constructor(){this.events$=new Av.a([])}clear(){this.events$.next([])}updateEvents(t){this.events$.next(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),GP=(()=>{class t{constructor(){this.trails$=new Av.a([])}clear(){this.trails$.next([])}updateTrails(t){this.trails$.next(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),WP=(()=>{class t{constructor(){this.active$=new Av.a(!1)}toggleMeasureMode(){this.active$.next(!this.active$.value)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function ZP(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function qP(t){ZP(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"==typeof t&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}function YP(t){ZP(1,arguments);var e=qP(t);return!isNaN(e)}var QP={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function XP(t){return function(e){var i=e||{},n=i.width?String(i.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}var JP={date:XP({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:XP({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:XP({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},tO={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function eO(t){return function(e,i){var n,r=i||{};if("formatting"===(r.context?String(r.context):"standalone")&&t.formattingValues){var s=t.defaultFormattingWidth||t.defaultWidth,o=r.width?String(r.width):s;n=t.formattingValues[o]||t.formattingValues[s]}else{var a=t.defaultWidth,l=r.width?String(r.width):t.defaultWidth;n=t.values[l]||t.values[a]}return n[t.argumentCallback?t.argumentCallback(e):e]}}function iO(t){return function(e,i){var n=String(e),r=i||{},s=r.width,o=n.match(s&&t.matchPatterns[s]||t.matchPatterns[t.defaultMatchWidth]);if(!o)return null;var a,l=o[0],c=s&&t.parsePatterns[s]||t.parsePatterns[t.defaultParseWidth];return a="[object Array]"===Object.prototype.toString.call(c)?function(t,e){for(var i=0;i<t.length;i++)if(t[i].test(l))return i}(c):function(t,e){for(var i in t)if(t.hasOwnProperty(i)&&t[i].test(l))return i}(c),a=t.valueCallback?t.valueCallback(a):a,{value:a=r.valueCallback?r.valueCallback(a):a,rest:n.slice(l.length)}}}var nO,rO={code:"en-US",formatDistance:function(t,e,i){var n;return i=i||{},n="string"==typeof QP[t]?QP[t]:1===e?QP[t].one:QP[t].other.replace("{{count}}",e),i.addSuffix?i.comparison>0?"in "+n:n+" ago":n},formatLong:JP,formatRelative:function(t,e,i,n){return tO[t]},localize:{ordinalNumber:function(t,e){var i=Number(t),n=i%100;if(n>20||n<10)switch(n%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},era:eO({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:eO({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return Number(t)-1}}),month:eO({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:eO({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:eO({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(nO={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t,e){var i=String(t),n=e||{},r=i.match(nO.matchPattern);if(!r)return null;var s=r[0],o=i.match(nO.parsePattern);if(!o)return null;var a=nO.valueCallback?nO.valueCallback(o[0]):o[0];return{value:a=n.valueCallback?n.valueCallback(a):a,rest:i.slice(s.length)}}),era:iO({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:iO({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:iO({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:iO({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:iO({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function sO(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function oO(t,e){ZP(2,arguments);var i=qP(t).getTime(),n=sO(e);return new Date(i+n)}function aO(t,e){ZP(2,arguments);var i=sO(e);return oO(t,-i)}function lO(t,e){for(var i=t<0?"-":"",n=Math.abs(t).toString();n.length<e;)n="0"+n;return i+n}function cO(t){ZP(1,arguments);var e=1,i=qP(t),n=i.getUTCDay(),r=(n<e?7:0)+n-e;return i.setUTCDate(i.getUTCDate()-r),i.setUTCHours(0,0,0,0),i}function hO(t){ZP(1,arguments);var e=qP(t),i=e.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(i+1,0,4),n.setUTCHours(0,0,0,0);var r=cO(n),s=new Date(0);s.setUTCFullYear(i,0,4),s.setUTCHours(0,0,0,0);var o=cO(s);return e.getTime()>=r.getTime()?i+1:e.getTime()>=o.getTime()?i:i-1}function uO(t){ZP(1,arguments);var e=hO(t),i=new Date(0);i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0);var n=cO(i);return n}function dO(t){ZP(1,arguments);var e=qP(t),i=cO(e).getTime()-uO(e).getTime();return Math.round(i/6048e5)+1}function pO(t,e){ZP(1,arguments);var i=e||{},n=i.locale,r=n&&n.options&&n.options.weekStartsOn,s=null==r?0:sO(r),o=null==i.weekStartsOn?s:sO(i.weekStartsOn);if(!(o>=0&&o<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var a=qP(t),l=a.getUTCDay(),c=(l<o?7:0)+l-o;return a.setUTCDate(a.getUTCDate()-c),a.setUTCHours(0,0,0,0),a}function fO(t,e){ZP(1,arguments);var i=qP(t,e),n=i.getUTCFullYear(),r=e||{},s=r.locale,o=s&&s.options&&s.options.firstWeekContainsDate,a=null==o?1:sO(o),l=null==r.firstWeekContainsDate?a:sO(r.firstWeekContainsDate);if(!(l>=1&&l<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=new Date(0);c.setUTCFullYear(n+1,0,l),c.setUTCHours(0,0,0,0);var h=pO(c,e),u=new Date(0);u.setUTCFullYear(n,0,l),u.setUTCHours(0,0,0,0);var d=pO(u,e);return i.getTime()>=h.getTime()?n+1:i.getTime()>=d.getTime()?n:n-1}function mO(t,e){ZP(1,arguments);var i=e||{},n=i.locale,r=n&&n.options&&n.options.firstWeekContainsDate,s=null==r?1:sO(r),o=null==i.firstWeekContainsDate?s:sO(i.firstWeekContainsDate),a=fO(t,e),l=new Date(0);l.setUTCFullYear(a,0,o),l.setUTCHours(0,0,0,0);var c=pO(l,e);return c}function gO(t,e){ZP(1,arguments);var i=qP(t),n=pO(i,e).getTime()-mO(i,e).getTime();return Math.round(n/6048e5)+1}function AO(t,e){var i=t>0?"-":"+",n=Math.abs(t),r=Math.floor(n/60),s=n%60;if(0===s)return i+String(r);var o=e||"";return i+String(r)+o+lO(s,2)}function bO(t,e){return t%60==0?(t>0?"-":"+")+lO(Math.abs(t)/60,2):vO(t,e)}function vO(t,e){var i=e||"",n=t>0?"-":"+",r=Math.abs(t);return n+lO(Math.floor(r/60),2)+i+lO(r%60,2)}var _O={G:function(t,e,i){var n=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(n,{width:"abbreviated"});case"GGGGG":return i.era(n,{width:"narrow"});case"GGGG":default:return i.era(n,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var n=t.getUTCFullYear();return i.ordinalNumber(n>0?n:1-n,{unit:"year"})}return function(t,e){var i=t.getUTCFullYear(),n=i>0?i:1-i;return lO("yy"===e?n%100:n,e.length)}(t,e)},Y:function(t,e,i,n){var r=fO(t,n),s=r>0?r:1-r;return"YY"===e?lO(s%100,2):"Yo"===e?i.ordinalNumber(s,{unit:"year"}):lO(s,e.length)},R:function(t,e){return lO(hO(t),e.length)},u:function(t,e){return lO(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var n=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return lO(n,2);case"Qo":return i.ordinalNumber(n,{unit:"quarter"});case"QQQ":return i.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(n,{width:"wide",context:"formatting"})}},q:function(t,e,i){var n=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return lO(n,2);case"qo":return i.ordinalNumber(n,{unit:"quarter"});case"qqq":return i.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(n,{width:"wide",context:"standalone"})}},M:function(t,e,i){var n=t.getUTCMonth();switch(e){case"M":case"MM":return function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):lO(i+1,2)}(t,e);case"Mo":return i.ordinalNumber(n+1,{unit:"month"});case"MMM":return i.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(n,{width:"wide",context:"formatting"})}},L:function(t,e,i){var n=t.getUTCMonth();switch(e){case"L":return String(n+1);case"LL":return lO(n+1,2);case"Lo":return i.ordinalNumber(n+1,{unit:"month"});case"LLL":return i.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(n,{width:"wide",context:"standalone"})}},w:function(t,e,i,n){var r=gO(t,n);return"wo"===e?i.ordinalNumber(r,{unit:"week"}):lO(r,e.length)},I:function(t,e,i){var n=dO(t);return"Io"===e?i.ordinalNumber(n,{unit:"week"}):lO(n,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):function(t,e){return lO(t.getUTCDate(),e.length)}(t,e)},D:function(t,e,i){var n=function(t){ZP(1,arguments);var e=qP(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var n=e.getTime();return Math.floor((i-n)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(n,{unit:"dayOfYear"}):lO(n,e.length)},E:function(t,e,i){var n=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(n,{width:"short",context:"formatting"});case"EEEE":default:return i.day(n,{width:"wide",context:"formatting"})}},e:function(t,e,i,n){var r=t.getUTCDay(),s=(r-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return lO(s,2);case"eo":return i.ordinalNumber(s,{unit:"day"});case"eee":return i.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(r,{width:"short",context:"formatting"});case"eeee":default:return i.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,i,n){var r=t.getUTCDay(),s=(r-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return lO(s,e.length);case"co":return i.ordinalNumber(s,{unit:"day"});case"ccc":return i.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(r,{width:"narrow",context:"standalone"});case"cccccc":return i.day(r,{width:"short",context:"standalone"});case"cccc":default:return i.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,i){var n=t.getUTCDay(),r=0===n?7:n;switch(e){case"i":return String(r);case"ii":return lO(r,e.length);case"io":return i.ordinalNumber(r,{unit:"day"});case"iii":return i.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(n,{width:"short",context:"formatting"});case"iiii":default:return i.day(n,{width:"wide",context:"formatting"})}},a:function(t,e,i){var n=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(t,e,i){var n,r=t.getUTCHours();switch(n=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(t,e,i){var n,r=t.getUTCHours();switch(n=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var n=t.getUTCHours()%12;return 0===n&&(n=12),i.ordinalNumber(n,{unit:"hour"})}return function(t,e){return lO(t.getUTCHours()%12||12,e.length)}(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):function(t,e){return lO(t.getUTCHours(),e.length)}(t,e)},K:function(t,e,i){var n=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(n,{unit:"hour"}):lO(n,e.length)},k:function(t,e,i){var n=t.getUTCHours();return 0===n&&(n=24),"ko"===e?i.ordinalNumber(n,{unit:"hour"}):lO(n,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):function(t,e){return lO(t.getUTCMinutes(),e.length)}(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):function(t,e){return lO(t.getUTCSeconds(),e.length)}(t,e)},S:function(t,e){return function(t,e){var i=e.length,n=t.getUTCMilliseconds();return lO(Math.floor(n*Math.pow(10,i-3)),e.length)}(t,e)},X:function(t,e,i,n){var r=(n._originalDate||t).getTimezoneOffset();if(0===r)return"Z";switch(e){case"X":return bO(r);case"XXXX":case"XX":return vO(r);case"XXXXX":case"XXX":default:return vO(r,":")}},x:function(t,e,i,n){var r=(n._originalDate||t).getTimezoneOffset();switch(e){case"x":return bO(r);case"xxxx":case"xx":return vO(r);case"xxxxx":case"xxx":default:return vO(r,":")}},O:function(t,e,i,n){var r=(n._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+AO(r,":");case"OOOO":default:return"GMT"+vO(r,":")}},z:function(t,e,i,n){var r=(n._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+AO(r,":");case"zzzz":default:return"GMT"+vO(r,":")}},t:function(t,e,i,n){return lO(Math.floor((n._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,n){return lO((n._originalDate||t).getTime(),e.length)}};function yO(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}}function wO(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}}var xO={p:wO,P:function(t,e){var i,n=t.match(/(P+)(p+)?/),r=n[1],s=n[2];if(!s)return yO(t,e);switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",yO(r,e)).replace("{{time}}",wO(s,e))}};function CO(t){return t.getTime()%6e4}function SO(t){var e=new Date(t.getTime()),i=Math.ceil(e.getTimezoneOffset());return e.setSeconds(0,0),6e4*i+(i>0?(6e4+CO(e))%6e4:CO(e))}var kO=["D","DD"],EO=["YY","YYYY"];function DO(t){return-1!==kO.indexOf(t)}function IO(t){return-1!==EO.indexOf(t)}function PO(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://git.io/fxCyr"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://git.io/fxCyr"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://git.io/fxCyr"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://git.io/fxCyr"))}var OO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,MO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,TO=/^'([^]*?)'?$/,RO=/''/g,VO=/[a-zA-Z]/;function FO(t,e,i){ZP(2,arguments);var n=String(e),r=i||{},s=r.locale||rO,o=s.options&&s.options.firstWeekContainsDate,a=null==o?1:sO(o),l=null==r.firstWeekContainsDate?a:sO(r.firstWeekContainsDate);if(!(l>=1&&l<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=s.options&&s.options.weekStartsOn,h=null==c?0:sO(c),u=null==r.weekStartsOn?h:sO(r.weekStartsOn);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!s.localize)throw new RangeError("locale must contain localize property");if(!s.formatLong)throw new RangeError("locale must contain formatLong property");var d=qP(t);if(!YP(d))throw new RangeError("Invalid time value");var p=SO(d),f=aO(d,p),m={firstWeekContainsDate:l,weekStartsOn:u,locale:s,_originalDate:d},g=n.match(MO).map(function(t){var e=t[0];return"p"===e||"P"===e?(0,xO[e])(t,s.formatLong,m):t}).join("").match(OO).map(function(i){if("''"===i)return"'";var n=i[0];if("'"===n)return LO(i);var o=_O[n];if(o)return!r.useAdditionalWeekYearTokens&&IO(i)&&PO(i,e,t),!r.useAdditionalDayOfYearTokens&&DO(i)&&PO(i,e,t),o(f,i,s.localize,m);if(n.match(VO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");return i}).join("");return g}function LO(t){return t.match(TO)[1].replace(RO,"'")}function UO(t){if(t<0)return`/!\\ Dur\xe9e n\xe9gative ${UO(-t)}`;if(t<60)return"moins d'une minute";const e=Math.floor(t/86400),i=Math.floor(t%86400/3600),n=Math.floor(t%3600/60),r=[];return e>=1&&r.push(`${e} jour${e>1?"s":""}`),i>=1&&r.push(`${i} heure${i>1?"s":""}`),r.length<2&&0!==n&&r.push(`${n} minute${n>1?"s":""}`),`${r.join(", ")}`}function BO(t){if(t<0)return`/!\\ Dur\xe9e n\xe9gative ${BO(-t)}`;if(t<60)return"< 1m";const e=Math.floor(t/86400),i=Math.floor(t%86400/3600),n=Math.floor(t%3600/60),r=[];return e>=1&&r.push(`${e}j`),i>=1&&r.push(`${i}h`),r.length<2&&0!==n&&r.push(`${n}m`),`${r.join(" ")}`}function NO(t){return Math.floor(t.getTime()/1e3)}function jO(t){return FO(t,"dd/MM/yyyy")}function zO(t){return FO(t,"yyyy-MM-dd")}function HO(t){return new Date(t).toISOString().substr(0,19)}let KO=(()=>{class t{constructor(){this.active$=new Av.a(!1),this.selectedPIM$=new Av.a(null),this.nextStartDate$=new Av.a(NO(new Date)),this.nextSpeed$=new Av.a(10)}togglePIMMode(){this.active$.next(!this.active$.value)}selectPIM(t){this.selectedPIM$.next(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const $O=jI.reduce((t,e)=>(t[e.flag]=e,t),{}),GO={flag:"undefined",iso2:"undefined",iso3:"undefined",name:"Inconnu",searchValue:""};function WO(t){return null!==(e=$O[t])&&void 0!==e?e:GO;var e}const ZO=Object.entries({201:["AL","ALB","","Albania"],202:["AD","AND","","Andorra"],203:["AT","AUT","","Austria"],204:["PT","PRT","PT-20","Azores"],205:["BE","BEL","","Belgium"],206:["BY","BLR","","Belarus"],207:["BG","BGR","","Bulgaria"],208:["VA","VAT","","Vatican City State"],209:["CY","CYP","","Cyprus"],210:["CY","CYP","","Cyprus"],211:["DE","DEU","","Germany"],212:["CY","CYP","","Cyprus"],213:["GE","GEO","","Georgia"],214:["MD","MDA","","Moldova"],215:["MT","MLT","","Malta"],216:["AM","ARM","","Armenia"],218:["DE","DEU","","Germany"],219:["DK","DNK","","Denmark"],220:["DK","DNK","","Denmark"],224:["ES","ESP","","Spain"],225:["ES","ESP","","Spain"],226:["FR","FRA","","France"],227:["FR","FRA","","France"],228:["FR","FRA","","France"],229:["MT","MLT","","Malta"],230:["FI","FIN","","Finland"],231:["FO","FRO","","Faroe Islands"],232:["GB","GBR","","United Kingdom"],233:["GB","GBR","","United Kingdom"],234:["GB","GBR","","United Kingdom"],235:["GB","GBR","","United Kingdom"],236:["GI","GIB","","Gibraltar"],237:["GR","GRC","","Greece"],238:["HR","HRV","","Croatia"],239:["GR","GRC","","Greece"],240:["GR","GRC","","Greece"],241:["GR","GRC","","Greece"],242:["MA","MAR","","Morocco"],243:["HU","HUN","","Hungary"],244:["NL","NLD","","Netherlands"],245:["NL","NLD","","Netherlands"],246:["NL","NLD","","Netherlands"],247:["IT","ITA","","Italy"],248:["MT","MLT","","Malta"],249:["MT","MLT","","Malta"],250:["IE","IRL","","Ireland"],251:["IS","ISL","","Iceland"],252:["LI","LIE","","Liechtenstein"],253:["LU","LUX","","Luxembourg"],254:["MC","MCO","","Monaco"],255:["PT","PRT","PT-30","Madeira"],256:["MT","MLT","","Malta"],257:["NO","NOR","","Norway"],258:["NO","NOR","","Norway"],259:["NO","NOR","","Norway"],261:["PL","POL","","Poland"],262:["ME","MNE","","Montenegro"],263:["PT","PRT","","Portugal"],264:["RO","ROU","","Romania"],265:["SE","SWE","","Sweden"],266:["SE","SWE","","Sweden"],267:["SK","SVK","","Slovak Republic"],268:["SM","SMR","","San Marino"],269:["CH","CHE","","Switzerland"],270:["CZ","CZE","","Czech Republic"],271:["TR","TUR","","Turkey"],272:["UA","UKR","","Ukraine"],273:["RU","RUS","","Russia"],274:["MK","MKD","","Macedonia"],275:["LV","LVA","","Latvia"],276:["EE","EST","","Estonia"],277:["LT","LTU","","Lithuania"],278:["SI","SVN","","Slovenia"],279:["RS","SRB","","Serbia"],301:["AI","AIA","","Anguilla"],303:["US","USA","US-AK","Alaska"],304:["AG","ATG","","Antigua and Barbuda"],305:["AG","ATG","","Antigua and Barbuda"],306:["CW","CUW","","Antilles"],307:["AW","ABW","","Aruba"],308:["BS","BHS","","Bahamas"],309:["BS","BHS","","Bahamas"],310:["BM","BMU","","Bermuda"],311:["BS","BMU","","Bahamas"],312:["BZ","BLZ","","Belize"],314:["BB","BRB","","Barbados"],316:["CA","CAN","","Canada"],319:["KY","CYM","","Cayman Islands"],321:["CR","CRI","","Costa Rica"],323:["CU","CUB","","Cuba"],325:["DM","DMA","","Dominica"],327:["DO","DOM","","Dominican Republic"],329:["GP","GLP","","Guadeloupe"],330:["GD","GRD","","Grenada"],331:["GL","GRL","","Greenland"],332:["GT","GTM","","Guatemala"],335:["HN","HND","","Honduras"],336:["HT","HTI","","Haiti"],338:["US","USA","","United States of America"],339:["JM","JAM","","Jamaica"],341:["KN","KNA","","Saint Kitts and Nevis"],343:["LC","LCA","","Saint Lucia"],345:["MX","MEX","","Mexico"],347:["MQ","MTQ","","Martinique"],348:["MS","MSR","","Montserrat"],350:["NI","NIC","","Nicaragua"],351:["PA","PAN","","Panama"],352:["PA","PAN","","Panama"],353:["PA","PAN","","Panama"],354:["PA","PAN","","Panama"],355:["PA","PAN","","Panama"],356:["PA","PAN","","Panama"],357:["PA","PAN","","Panama"],358:["PR","PRI","","Puerto Rico"],359:["SV","SLV","","El Salvador"],361:["PM","SPM","","Saint Pierre and Miquelon"],362:["TT","TTO","","Trinidad and Tobago"],364:["TC","TCA","","Turks and Caicos Islands"],366:["US","USA","","United States of America"],367:["US","USA","","United States of America"],368:["US","USA","","United States of America"],369:["US","USA","","United States of America"],370:["PA","PAN","","Panama"],371:["PA","PAN","","Panama"],372:["PA","PAN","","Panama"],373:["PA","PAN","","Panama"],374:["PA","PAN","","Panama"],375:["VC","VCT","","Saint Vincent and the Grenadines"],376:["VC","VCT","","Saint Vincent and the Grenadines"],377:["VC","VCT","","Saint Vincent and the Grenadines"],378:["VG","VGB","","British Virgin Islands"],379:["VI","VIR","","United States Virgin Islands"],401:["AF","AFG","","Afghanistan"],403:["SA","SAU","","Saudi Arabia"],405:["BD","BGD","","Bangladesh"],408:["BH","BHR","","Bahrain"],410:["BT","BTN","","Bhutan"],412:["CN","CHN","","China"],413:["CN","CHN","","China"],414:["CN","CHN","","China"],416:["TW","TWN","","Taiwan"],417:["LK","LKA","","Sri Lanka"],419:["IN","IND","","India"],422:["IR","IRN","","Iran"],423:["AZ","AZE","","Azerbaijan"],425:["IQ","IRQ","","Iraq"],428:["IL","ISR","","Israel"],431:["JP","JPN","","Japan"],432:["JP","JPN","","Japan"],434:["TM","TKM","","Turkmenistan"],436:["KZ","KAZ","","Kazakhstan"],437:["UZ","UZB","","Uzbekistan"],438:["JO","JOR","","Jordan"],440:["KR","KOR","","Korea"],441:["KR","KOR","","Korea"],443:["PS","PSE","","State of Palestine"],445:["KP","PRK","","Democratic People's Republic of Korea"],447:["KW","KWT","","Kuwait"],450:["LB","LBN","","Lebanon"],451:["KG","KGZ","","Kyrgyz Republic"],453:["MO","MAC","","Macao"],455:["MV","MDV","","Maldives"],457:["MN","MNG","","Mongolia"],459:["NP","NPL","","Nepal"],461:["OM","OMN","","Oman"],463:["PK","PAK","","Pakistan"],466:["QA","QAT","","Qatar (State of)"],468:["SY","SYR","","Syrian Arab Republic"],470:["AE","ARE","","United Arab Emirates"],472:["TJ","TJK","","Tajikistan"],473:["YE","YEM","","Yemen"],475:["YE","YEM","","Yemen"],477:["HK","HKG","","Hong Kong"],478:["BA","BIH","","Bosnia and Herzegovina"],501:["FR","FRA","AQ","Adelie Land"],503:["AU","AUS","","Australia"],506:["MM","MMR","","Myanmar"],508:["BN","BRN","","Brunei Darussalam"],510:["FM","FSM","","Micronesia"],511:["PW","PLW","","Palau"],512:["NZ","NZL","","New Zealand"],514:["KH","KHM","","Cambodia"],515:["KH","KHM","","Cambodia"],516:["CX","CXR","","Christmas Island"],518:["CK","COK","","Cook Islands"],520:["FJ","FJI","","Fiji"],523:["CC","CCK","","Cocos (Keeling) Islands"],525:["ID","IDN","","Indonesia"],529:["KI","KIR","","Kiribati"],531:["LA","LAO","","Lao People's Democratic Republic"],533:["MY","MYS","","Malaysia"],536:["MP","MNP","","Northern Mariana Islands"],538:["MH","MHL","","Marshall Islands"],540:["NC","NCL","","New Caledonia"],542:["NU","NIU","","Niue"],544:["NR","NRU","","Nauru"],546:["PF","PYF","","French Polynesia"],548:["PH","PHL","","Philippines"],553:["PG","PNG","","Papua New Guinea"],555:["PN","PCN","","Pitcairn Island"],557:["SB","SLB","","Solomon Islands"],559:["AS","ASM","","American Samoa"],561:["WS","WSM","","Samoa"],563:["SG","SGP","","Singapore"],564:["SG","SGP","","Singapore"],565:["SG","SGP","","Singapore"],566:["SG","SGP","","Singapore"],567:["TH","THA","","Thailand"],570:["TO","TON","","Tonga"],572:["TV","TUV","","Tuvalu"],574:["VN","VNM","","Viet Nam"],576:["VU","VUT","","Vanuatu"],577:["VU","VUT","","Vanuatu"],578:["WF","WLF","","Wallis and Futuna Islands"],601:["ZA","ZAF","","South Africa"],603:["AO","AGO","","Angola"],605:["DZ","DZA","","Algeria"],607:["FR","FRA","TF","Saint Paul and Amsterdam Islands"],608:["GB","GBR","AC","Ascension Island"],609:["BI","BDI","","Burundi"],610:["BJ","BEN","","Benin"],611:["BW","BWA","","Botswana"],612:["CF","CAF","","Central African Republic"],613:["CM","CMR","","Cameroon"],615:["CG","COG","","Congo"],616:["KM","COM","","Comoros"],617:["CV","CPV","","Cabo Verde"],618:["FR","FRA","TF","Crozet Archipelago"],619:["CI","CIV","","Ivory Coast"],620:["KM","COM","","Comoros"],621:["DJ","DJI","","Djibouti"],622:["EG","EGY","","Egypt"],624:["ET","ETH","","Ethiopia"],625:["ER","ERI","","Eritrea"],626:["GA","GAB","","Gabonese Republic"],627:["GH","GHA","","Ghana"],629:["GM","GMB","","Gambia"],630:["GW","GNB","","Guinea-Bissau"],631:["GQ","GNQ","","Equatorial Guinea"],632:["GN","GIN","","Guinea"],633:["BF","BFA","","Burkina Faso"],634:["KE","KEN","","Kenya"],635:["FR","FRA","TF","Kerguelen Islands"],636:["LR","LBR","","Liberia"],637:["LR","LBR","","Liberia"],638:["SS","SSD","","South Sudan"],642:["LY","LBY","","Libya"],644:["LS","LSO","","Lesotho"],645:["MU","MUS","","Mauritius"],647:["MG","MDG","","Madagascar"],649:["ML","MLI","","Mali"],650:["MZ","MOZ","","Mozambique"],654:["MR","MRT","","Mauritania"],655:["MW","MWI","","Malawi"],656:["NE","NER","","Niger"],657:["NG","NGA","","Nigeria"],659:["NA","NAM","","Namibia"],660:["RE","REU","","Reunion"],661:["RW","RWA","","Rwanda"],662:["SD","SDN","","Sudan"],663:["SN","SEN","","Senegal"],664:["SC","SYC","","Seychelles"],665:["SH","SHN","","Saint Helena"],666:["SO","SOM","","Somali Democratic Republic"],667:["SL","SLE","","Sierra Leone"],668:["ST","STP","","Sao Tome and Principe"],669:["SZ","SWZ","","Swaziland"],670:["TD","TCD","","Chad"],671:["TG","TGO","","Togolese Republic"],672:["TN","TUN","","Tunisian Republic"],674:["TZ","TZA","","Tanzania"],675:["UG","UGA","","Uganda"],676:["CD","COD","","Democratic Republic of the Congo"],677:["TZ","TZA","","Tanzania"],678:["ZM","ZMB","","Zambia"],679:["ZW","ZWE","","Zimbabwe"],701:["AR","ARG","","Argentine Republic"],710:["BR","BRA","","Brazil"],720:["BO","BOL","","Bolivia"],725:["CL","CHL","","Chile"],730:["CO","COL","","Colombia"],735:["EC","ECU","","Ecuador"],740:["FK","FLK","","Falkland Islands"],745:["GF","GUF","","Guiana"],750:["GY","GUY","","Guyana"],755:["PY","PRY","","Paraguay"],760:["PE","PER","","Peru"],765:["SR","SUR","","Suriname"],770:["UY","URY","","Uruguay"],775:["VE","VEN","","Venezuela"]}).reduce((t,[e,[i]])=>(t[e]=i.toLowerCase(),t),{});Object.values(jI).reduce((t,e)=>(t[e.iso3.toLocaleLowerCase()]=e.iso2,t),{});const qO=[{key:"cargo",label:"Marchandises",aisTypes:["cargo"],color:"#78f48b"},{key:"tanker",label:"Mati\xe8res dangereuses",aisTypes:["tanker"],color:"#ff272d"},{key:"passenger",label:"Passagers",aisTypes:["passenger"],color:"#0623c9"},{key:"submarine",label:"Travaux sous-marins",aisTypes:["towing","dredger","diving","tug"],color:"#9a460f"},{key:"fishing",label:"P\xeache",aisTypes:["fishing"],color:"#f78851"},{key:"leisure",label:"Plaisance",aisTypes:["sailing","leisure"],color:"#ff29ff"},{key:"military",label:"Militaire",aisTypes:["military"],color:"#5910d0"},{key:"other",label:"Autre",aisTypes:["other"],color:"#e1cf15"},{key:"default",label:"Non sp\xe9cifi\xe9",aisTypes:["unspecified"],color:"#cccccc"}];function YO(t,e){var i,n,r;let s=!1;if(t.colorResultTimestamp=0,!e.colorModeShipType)if(e.isMissingColorFilterConfiguration||e.frozenTimestamp)s=!0;else{let i=0;if(e.alertRules.length>0){const n=t.lastAlerts.find(t=>e.alertRules.includes(t.rule_id));n&&(i=n.timestamp)}let n=0;if(e.eventTypes.length>0){const i=t.lastEvents.find(t=>e.eventTypes.includes(t.type));i&&(n=i.timestamp)}t.colorResultTimestamp=Math.max(i,n),s=t.colorResultTimestamp>=e.absoluteMinimumTimestamp}t.stationary=t.stationary||t.sog&&parseFloat(t.sog)<1,t.visible=t.selected||(!e.restrictedShips.size||e.restrictedShips.has(t.mmsi))&&t.timestamp>=e.absoluteVisibilityThresholdTimestamp&&(!e.shipTypes.length||!!e.shipTypesCache[t.cargo])&&(!e.shipFlags.length||!!e.shipFlagsCache[t.country.flag])&&(!e.shipDestinations.length||t.destination&&e.shipDestinations.some(e=>t.destination.includes(e)))&&(!e.shipDepartures.length||t.departure&&e.shipDepartures.some(e=>t.departure.includes(e)))&&(!e.shipStatus.length||e.shipStatus.includes(t.status))&&(!e.shipSpeed||e.shipSpeed.min<=t.numberSog&&t.numberSog<=e.shipSpeed.max)&&(!e.shipLength||e.shipLength.min<=t.length&&t.length<=e.shipLength.max)&&(!e.shipWidth||e.shipWidth.min<=t.width&&t.width<=e.shipWidth.max)&&(!e.shipDraught||e.shipDraught.min<=t.numberDraught&&t.numberDraught<=e.shipDraught.max)&&(!e.shipYearofbuild||e.shipYearofbuild.min<=t.yearofbuild&&t.yearofbuild<=e.shipYearofbuild.max||e.shipYearofbuildIncludeNulls&&0===t.yearofbuild)&&(!e.shipCourse||(e.shipCourse.min<e.shipCourse.max?e.shipCourse.min<=t.numberCog&&t.numberCog<=e.shipCourse.max:e.shipCourse.min<=t.numberCog||t.numberCog<=e.shipCourse.max))&&(!e.fleets.length||e.fleetsShipsCache.includes(t.mmsi))&&(!e.shipIdentifier.length||(null===(i=t.name)||void 0===i?void 0:i.includes(e.shipIdentifier))||(null===(n=t.mmsi)||void 0===n?void 0:n.includes(e.shipIdentifier))||(null===(r=t.imo)||void 0===r?void 0:r.includes(e.shipIdentifier)))&&(e.colorModeShipType||e.colorModeAllShips||e.colorModeResultsOnly&&s)&&(0===e.selectedShips.size||e.frozenTimestamp>0||!e.selectedShips.has(t.mmsi)),t.transparent=t.timestamp<=e.absoluteTransparencyThresholdTimestamp}function QO(t){return[t.mmsi,t.imo,t.callsign,BD(t.name),t.country.flag,t.cargo,t.shipType.key,t.length,t.width,t.draught,BD(t.destination),BD(t.departure),t.eta]}function XO(t,e,i){if(i)for(;t.positionIndex>0&&t.positions[t.positionIndex].timestamp>e;)t.positionIndex--;else for(;t.positionIndex<t.positions.length-1&&t.positions[t.positionIndex+1].timestamp<e;)t.positionIndex++;const n=t.positions[t.positionIndex],r=e<=t.positions[0].timestamp||t.positionIndex===t.positions.length-1;t.visible=!r,t.position=r?[n.lon,n.lat]:function(t,e,i){const n=(i-t.timestamp)/(e.timestamp-t.timestamp);return[t.lon+(e.lon-t.lon)*n,t.lat+(e.lat-t.lat)*n]}(n,t.positions[t.positionIndex+1],e),t.course=n.course,t.speed=n.speed}qO.forEach(t=>{t.rgbColor=xP(t.color),t.textColor=SP(t.color,20)}),qO.reduce((t,e)=>(t[e.key]=e,t),{}),qO.flatMap(t=>t.aisTypes.map(e=>[e,t])).reduce((t,[e,i])=>(t[e]=i,t),{});const JO=[1,2,5,10,20,30];let tM=(()=>{class t{constructor(t){this.workerService=t,this.active$=new Av.a(!1),this.startTimestamp$=new Av.a(0),this.duration$=new Av.a(0),this.shipsByMMSI$=new Av.a(null),this.animationTimestamp$=new Av.a(0),this.paused$=new Av.a(!0),this.reverseMode$=new Av.a(!1),this.animationSpeed$=new Av.a(10),this.lastFrameMs=0,this.viewExtent=null,this.animate=t=>{const e=this.animationTimestamp$.value+(this.reverseMode$.value?-1:1)*this.animationSpeed$.value*(t-this.lastFrameMs)*.006;this.lastFrameMs=t;const i=this.reverseMode$.value;Object.values(this.shipsByMMSI$.value).forEach(t=>{XO(t,e,i)}),this.animationTimestamp$.next(e),this.reverseMode$.value?e-this.minTimestamp<900&&(this.minTimestamp=this.minTimestamp-this.duration$.value,this.loadChunk(this.minTimestamp,this.duration$.value)):this.maxTimestamp-e<900&&(this.loadChunk(this.maxTimestamp,this.duration$.value),this.maxTimestamp=this.maxTimestamp+this.duration$.value),this.animationFrameTimeout=requestAnimationFrame(this.animate)},this.paused$.subscribe(t=>{t?cancelAnimationFrame(this.animationFrameTimeout):requestAnimationFrame(t=>{this.lastFrameMs=t,this.animationFrameTimeout=requestAnimationFrame(this.animate)})})}enterPlaybackMode(){this.active$.next(!0)}exitPlaybackMode(){cancelAnimationFrame(this.animationFrameTimeout),this.shipsByMMSI$.next(null),this.active$.next(!1)}loadPlayback(t,e){return Object(ue.a)(this,void 0,void 0,function*(){this.startTimestamp$.next(t),this.duration$.next(e),this.minTimestamp=t-e,this.maxTimestamp=t+e,this.paused$.next(!0),this.reverseMode$.next(!1),this.shipsByMMSI$.next({}),yield Promise.all([this.loadChunk(t-e,e),this.loadChunk(t,e)]),Object.values(this.shipsByMMSI$.value).forEach(e=>{XO(e,t,!1)}),this.animationTimestamp$.next(t)})}reinitiate(){this.animationTimestamp$.next(this.startTimestamp$.value)}loadChunk(t,e){return Object(ue.a)(this,void 0,void 0,function*(){const i=yield this.workerService.ships.getShipsPlaybackAtBboxAndTimestamp(this.viewExtent,t,e),n=this.shipsByMMSI$.value;console.time("assemble chunk");const r=this.reverseMode$.value;i.forEach(t=>{if(n[t.mmsi]){const i=n[t.mmsi];i.positions=i.positions.concat(t.positions).sort((t,e)=>t.timestamp-e.timestamp),i.positionIndex=r?i.positions.length-1:0;const s=i.positions,o=s.length-1;for(let t=0;t<o;t++)if(s[t].chunkEnd){const i=[s[t].lon,s[t].lat],n=[s[t+1].lon,s[t+1].lat];s[t].course=(2*Math.PI+Math.PI/2-aI(i,n))%(2*Math.PI),s[t].speed=Math.round(10*(e=s[t+1].timestamp-s[t].timestamp,1.944*Uk(i,n)/e))/10}}else n[t.mmsi]=t;var e});const s=this.animationTimestamp$.value,o=this.reverseMode$.value;Object.values(n).forEach(t=>{XO(t,s,o)}),console.timeEnd("assemble chunk"),this.shipsByMMSI$.next(n)})}togglePause(){this.paused$.next(!this.paused$.value)}toggleReverseMode(){this.reverseMode$.next(!this.reverseMode$.value)}updateSpeed(t){const e=JO.indexOf(this.animationSpeed$.value);"-"===t?e>0&&this.animationSpeed$.next(JO[e-1]):e<JO.length-1&&this.animationSpeed$.next(JO[e+1])}updateViewBox(t){this.viewExtent=t}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(_I.a))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const eM=["#1e88e5","#5e35b1","#64b5f6","#311b92","#d1c4e9","#9575cd","#1a237e","#1e88e5","#bbdefb","#3949ab","#7986cb"],iM=eM.map(t=>CP(t)),nM=["#900C3F","#FF5733","#3D3D6B","#FFC300","#511849","#FF8D1A","#2A7B9B","#C70039","#44be77","#c4b320","#00BAAD","#7a9b38"];var rM=new Array(6);function sM(t){return aM(t,1,0,0,1,0,0)}function oM(t,e){var i=t[0],n=t[1],r=t[2],s=t[3],o=t[4],a=t[5],l=e[0],c=e[1],h=e[2],u=e[3],d=e[4],p=e[5];return t[0]=i*l+r*c,t[1]=n*l+s*c,t[2]=i*h+r*u,t[3]=n*h+s*u,t[4]=i*d+r*p+o,t[5]=n*d+s*p+a,t}function aM(t,e,i,n,r,s,o){return t[0]=e,t[1]=i,t[2]=n,t[3]=r,t[4]=s,t[5]=o,t}function lM(t,e){var i=e[0],n=e[1];return e[0]=t[0]*i+t[2]*n+t[4],e[1]=t[1]*i+t[3]*n+t[5],e}function cM(t,e,i,n,r,s,o,a){var l=Math.sin(s),c=Math.cos(s);return t[0]=n*c,t[1]=r*l,t[2]=-n*l,t[3]=r*c,t[4]=o*n*c-a*n*l+e,t[5]=o*r*l+a*r*c+i,t}function hM(t,e){var i,n=(i=e)[0]*i[3]-i[1]*i[2];yS(0!==n,32);var r=e[0],s=e[1],o=e[2],a=e[3],l=e[4],c=e[5];return t[0]=a/n,t[1]=-s/n,t[2]=-o/n,t[3]=r/n,t[4]=(o*c-a*l)/n,t[5]=-(r*c-s*l)/n,t}function uM(t){return"matrix("+t.join(", ")+")"}function dM(t,e,i,n,r,s){for(var o=s||[],a=0,l=e;l<i;l+=n){var c=t[l],h=t[l+1];o[a++]=r[0]*c+r[2]*h+r[4],o[a++]=r[1]*c+r[3]*h+r[5]}return s&&o.length!=a&&(o.length=a),o}function pM(t,e,i,n,r,s,o){for(var a=o||[],l=Math.cos(r),c=Math.sin(r),h=s[0],u=s[1],d=0,p=e;p<i;p+=n){var f=t[p]-h,m=t[p+1]-u;a[d++]=h+f*l-m*c,a[d++]=u+f*c+m*l;for(var g=p+2;g<p+n;++g)a[d++]=t[g]}return o&&a.length!=d&&(a.length=d),a}function fM(t,e,i,n,r,s,o){for(var a=o||[],l=0,c=e;c<i;c+=n){a[l++]=t[c]+r,a[l++]=t[c+1]+s;for(var h=c+2;h<c+n;++h)a[l++]=t[h]}return o&&a.length!=l&&(a.length=l),a}var mM=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),gM=[1,0,0,1,0,0],AM=function(t){function e(){var e,i,n,r,s,o=t.call(this)||this;return o.extent_=[1/0,1/0,-1/0,-1/0],o.extentRevision_=-1,o.simplifiedGeometryMaxMinSquaredTolerance=0,o.simplifiedGeometryRevision=0,o.simplifyTransformedInternal=(e=function(t,e,i){if(!i)return this.getSimplifiedGeometry(e);var n=this.clone();return n.applyTransform(i),n.getSimplifiedGeometry(e)},s=!1,function(){var t=Array.prototype.slice.call(arguments);return s&&this===r&&UC(t,n)||(s=!0,r=this,n=t,i=e.apply(this,arguments)),i}),o}return mM(e,t),e.prototype.simplifyTransformed=function(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)},e.prototype.clone=function(){return ZC()},e.prototype.closestPointXY=function(t,e,i,n){return ZC()},e.prototype.containsXY=function(t,e){var i=this.getClosestPoint([t,e]);return i[0]===t&&i[1]===e},e.prototype.getClosestPoint=function(t,e){var i=e||[NaN,NaN];return this.closestPointXY(t[0],t[1],i,1/0),i},e.prototype.intersectsCoordinate=function(t){return this.containsXY(t[0],t[1])},e.prototype.computeExtent=function(t){return ZC()},e.prototype.getExtent=function(t){if(this.extentRevision_!=this.getRevision()){var e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&OS(e),this.extentRevision_=this.getRevision()}return function(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t}(this.extent_,t)},e.prototype.rotate=function(t,e){ZC()},e.prototype.scale=function(t,e,i){ZC()},e.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},e.prototype.getSimplifiedGeometry=function(t){return ZC()},e.prototype.getType=function(){return ZC()},e.prototype.applyTransform=function(t){ZC()},e.prototype.intersectsExtent=function(t){return ZC()},e.prototype.translate=function(t,e){ZC()},e.prototype.transform=function(t,e){var i=eE(t),n=i.getUnits()==ck.TILE_PIXELS?function(t,n,r){var s=i.getExtent(),o=i.getWorldExtent(),a=GS(o)/GS(s);return cM(gM,o[0],o[3],a,-a,0,0,0),dM(t,0,t.length,r,gM,n),cE(i,e)(t,n,r)}:cE(i,e);return this.applyTransform(n),this},e}(BE),bM=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function vM(t){var e;return"XY"==t?e=2:"XYZ"==t||"XYM"==t?e=3:"XYZM"==t&&(e=4),e}var _M=function(t){function e(){var e=t.call(this)||this;return e.layout="XY",e.stride=2,e.flatCoordinates=null,e}return bM(e,t),e.prototype.computeExtent=function(t){return TS(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinates=function(){return ZC()},e.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.getFlatCoordinates=function(){return this.flatCoordinates},e.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},e.prototype.getLayout=function(){return this.layout},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)},e.prototype.getSimplifiedGeometryInternal=function(t){return this},e.prototype.getStride=function(){return this.stride},e.prototype.setFlatCoordinates=function(t,e){this.stride=vM(t),this.layout=t,this.flatCoordinates=e},e.prototype.setCoordinates=function(t,e){ZC()},e.prototype.setLayout=function(t,e,i){var n;if(t)n=vM(t);else{for(var r=0;r<i;++r){if(0===e.length)return this.layout="XY",void(this.stride=2);e=e[0]}t=function(t){var e;return 2==t?e="XY":3==t?e="XYZ":4==t&&(e="XYZM"),e}(n=e.length)}this.layout=t,this.stride=n},e.prototype.applyTransform=function(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},e.prototype.rotate=function(t,e){var i=this.getFlatCoordinates();if(i){var n=this.getStride();pM(i,0,i.length,n,t,e,i),this.changed()}},e.prototype.scale=function(t,e,i){var n=e;void 0===n&&(n=t);var r=i;r||(r=HS(this.getExtent()));var s=this.getFlatCoordinates();if(s){var o=this.getStride();!function(t,e,i,n,r,s,o,a){for(var l=a||[],c=o[0],h=o[1],u=0,d=0;d<i;d+=n){var p=t[d+1]-h;l[u++]=c+r*(t[d]-c),l[u++]=h+s*p;for(var f=d+2;f<d+n;++f)l[u++]=t[f]}a&&l.length!=u&&(l.length=u)}(s,0,s.length,o,t,n,r,s),this.changed()}},e.prototype.translate=function(t,e){var i=this.getFlatCoordinates();if(i){var n=this.getStride();fM(i,0,i.length,n,t,e,i),this.changed()}},e}(AM);function yM(t,e,i,n,r,s,o){var a,l=t[e],c=t[e+1],h=t[i]-l,u=t[i+1]-c;if(0===h&&0===u)a=e;else{var d=((r-l)*h+(s-c)*u)/(h*h+u*u);if(d>1)a=i;else{if(d>0){for(var p=0;p<n;++p)o[p]=vk(t[e+p],t[i+p],d);return void(o.length=n)}a=e}}for(p=0;p<n;++p)o[p]=t[a+p];o.length=n}function wM(t,e,i,n,r){var s=t[e],o=t[e+1];for(e+=n;e<i;e+=n){var a=t[e],l=t[e+1],c=mk(s,o,a,l);c>r&&(r=c),s=a,o=l}return r}function xM(t,e,i,n,r){for(var s=0,o=i.length;s<o;++s){var a=i[s];r=wM(t,e,a,n,r),e=a}return r}function CM(t,e,i,n,r,s,o,a,l,c,h){if(e==i)return c;var u,d;if(0===r){if((d=mk(o,a,t[e],t[e+1]))<c){for(u=0;u<n;++u)l[u]=t[e+u];return l.length=n,d}return c}for(var p=h||[NaN,NaN],f=e+n;f<i;)if(yM(t,f-n,f,n,o,a,p),(d=mk(o,a,p[0],p[1]))<c){for(c=d,u=0;u<n;++u)l[u]=p[u];l.length=n,f+=n}else f+=n*Math.max((Math.sqrt(d)-Math.sqrt(c))/r|0,1);if(s&&(yM(t,i-n,e,n,o,a,p),(d=mk(o,a,p[0],p[1]))<c)){for(c=d,u=0;u<n;++u)l[u]=p[u];l.length=n}return c}function SM(t,e,i,n,r,s,o,a,l,c,h){for(var u=h||[NaN,NaN],d=0,p=i.length;d<p;++d){var f=i[d];c=CM(t,e,f,n,r,s,o,a,l,c,u),e=f}return c}function kM(t,e,i,n){for(var r=0,s=i.length;r<s;++r)t[e++]=i[r];return e}function EM(t,e,i,n){for(var r=0,s=i.length;r<s;++r)for(var o=i[r],a=0;a<n;++a)t[e++]=o[a];return e}function DM(t,e,i,n,r){for(var s=r||[],o=0,a=0,l=i.length;a<l;++a){var c=EM(t,e,i[a],n);s[o++]=c,e=c}return s.length=o,s}function IM(t,e,i,n,r,s,o){var a=(i-e)/n;if(a<3){for(;e<i;e+=n)s[o++]=t[e],s[o++]=t[e+1];return o}var l=new Array(a);l[0]=1,l[a-1]=1;for(var c=[e,i-n],h=0;c.length>0;){for(var u=c.pop(),d=c.pop(),p=0,f=t[d],m=t[d+1],g=t[u],A=t[u+1],b=d+n;b<u;b+=n){var v=fk(t[b],t[b+1],f,m,g,A);v>p&&(h=b,p=v)}p>r&&(l[(h-e)/n]=1,d+n<h&&c.push(d,h),h+n<u&&c.push(h,u))}for(b=0;b<a;++b)l[b]&&(s[o++]=t[e+b*n],s[o++]=t[e+b*n+1]);return o}function PM(t,e){return e*Math.round(t/e)}function OM(t,e,i,n,r,s,o){if(e==i)return o;var a,l,c=PM(t[e],r),h=PM(t[e+1],r);e+=n,s[o++]=c,s[o++]=h;do{if(a=PM(t[e],r),l=PM(t[e+1],r),(e+=n)==i)return s[o++]=a,s[o++]=l,o}while(a==c&&l==h);for(;e<i;){var u=PM(t[e],r),d=PM(t[e+1],r);if(e+=n,u!=a||d!=l){var p=a-c,f=l-h,m=u-c,g=d-h;p*g==f*m&&(p<0&&m<p||p==m||p>0&&m>p)&&(f<0&&g<f||f==g||f>0&&g>f)?(a=u,l=d):(s[o++]=a,s[o++]=l,c=a,h=l,a=u,l=d)}}return s[o++]=a,s[o++]=l,o}function MM(t,e,i,n,r,s,o,a){for(var l=0,c=i.length;l<c;++l){var h=i[l];o=OM(t,e,h,n,r,s,o),a.push(o),e=h}return o}function TM(t,e,i,n,r){for(var s=void 0!==r?r:[],o=0,a=e;a<i;a+=n)s[o++]=t.slice(a,a+n);return s.length=o,s}function RM(t,e,i,n,r){for(var s=void 0!==r?r:[],o=0,a=0,l=i.length;a<l;++a){var c=i[a];s[o++]=TM(t,e,c,n,s[o]),e=c}return s.length=o,s}function VM(t,e,i,n,r){for(var s=void 0!==r?r:[],o=0,a=0,l=i.length;a<l;++a){var c=i[a];s[o++]=RM(t,e,c,n,s[o]),e=c[c.length-1]}return s.length=o,s}function FM(t,e,i,n){for(var r=0,s=t[i-n],o=t[i-n+1];e<i;e+=n){var a=t[e],l=t[e+1];r+=o*a-s*l,s=a,o=l}return r/2}function LM(t,e,i,n){for(var r=0,s=0,o=i.length;s<o;++s){var a=i[s];r+=FM(t,e,a,n),e=a}return r}var UM=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),BM=function(t){function e(e,i){var n=t.call(this)||this;return n.maxDelta_=-1,n.maxDeltaRevision_=-1,void 0===i||Array.isArray(e[0])?n.setCoordinates(e,i):n.setFlatCoordinates(i,e),n}return UM(e,t),e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,i,n){return n<SS(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(wM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),CM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,i,n))},e.prototype.getArea=function(){return FM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinates=function(){return TM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[];return i.length=IM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i,0),new e(i,"XY")},e.prototype.getType=function(){return"LinearRing"},e.prototype.intersectsExtent=function(t){return!1},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=EM(this.flatCoordinates,0,t,this.stride),this.changed()},e}(_M),NM=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),jM=function(t){function e(e,i){var n=t.call(this)||this;return n.setCoordinates(e,i),n}return NM(e,t),e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,i,n){var r=this.flatCoordinates,s=mk(t,e,r[0],r[1]);if(s<n){for(var o=this.stride,a=0;a<o;++a)i[a]=r[a];return i.length=o,s}return n},e.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},e.prototype.computeExtent=function(t){return MS(this.flatCoordinates,t)},e.prototype.getType=function(){return"Point"},e.prototype.intersectsExtent=function(t){return DS(t,this.flatCoordinates[0],this.flatCoordinates[1])},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=kM(this.flatCoordinates,0,t),this.changed()},e}(_M);function zM(t,e,i,n,r){return!BS(r,function(r){return!HM(t,e,i,n,r[0],r[1])})}function HM(t,e,i,n,r,s){for(var o=0,a=t[i-n],l=t[i-n+1];e<i;e+=n){var c=t[e],h=t[e+1];l<=s?h>s&&(c-a)*(s-l)-(r-a)*(h-l)>0&&o++:h<=s&&(c-a)*(s-l)-(r-a)*(h-l)<0&&o--,a=c,l=h}return 0!==o}function KM(t,e,i,n,r,s){if(0===i.length)return!1;if(!HM(t,e,i[0],n,r,s))return!1;for(var o=1,a=i.length;o<a;++o)if(HM(t,i[o-1],i[o],n,r,s))return!1;return!0}function $M(t,e,i,n,r,s,o){for(var a,l,c,h,u,d,p,f=r[s+1],m=[],g=0,A=i.length;g<A;++g){var b=i[g];for(h=t[b-n],d=t[b-n+1],a=e;a<b;a+=n)u=t[a],p=t[a+1],(f<=d&&p<=f||d<=f&&f<=p)&&m.push(c=(f-d)/(p-d)*(u-h)+h),h=u,d=p}var v=NaN,_=-1/0;for(m.sort(TC),h=m[0],a=1,l=m.length;a<l;++a){u=m[a];var y=Math.abs(u-h);y>_&&KM(t,e,i,n,c=(h+u)/2,f)&&(v=c,_=y),h=u}return isNaN(v)&&(v=r[s]),o?(o.push(v,f,_),o):[v,f,_]}function GM(t,e,i,n,r){for(var s,o=[t[e],t[e+1]],a=[];e+n<i;e+=n){if(a[0]=t[e+n],a[1]=t[e+n+1],s=r(o,a))return s;o[0]=a[0],o[1]=a[1]}return!1}function WM(t,e,i,n,r){var s=LS([1/0,1/0,-1/0,-1/0],t,e,i,n);return!!QS(r,s)&&(!!ES(r,s)||s[0]>=r[0]&&s[2]<=r[2]||s[1]>=r[1]&&s[3]<=r[3]||GM(t,e,i,n,function(t,e){return function(t,e,i){var n=!1,r=IS(t,e),s=IS(t,i);if(1===r||1===s)n=!0;else{var o=t[0],a=t[1],l=t[2],c=t[3],h=i[0],u=i[1],d=(u-e[1])/(h-e[0]),p=void 0,f=void 0;2&s&&!(2&r)&&(n=(p=h-(u-c)/d)>=o&&p<=l),n||!(4&s)||4&r||(n=(f=u-(h-l)*d)>=a&&f<=c),n||!(8&s)||8&r||(n=(p=h-(u-a)/d)>=o&&p<=l),n||!(16&s)||16&r||(n=(f=u-(h-o)*d)>=a&&f<=c)}return n}(r,t,e)}))}function ZM(t,e,i,n,r){if(!function(t,e,i,n,r){return!!(WM(t,e,i,n,r)||HM(t,e,i,n,r[0],r[1])||HM(t,e,i,n,r[0],r[3])||HM(t,e,i,n,r[2],r[1])||HM(t,e,i,n,r[2],r[3]))}(t,e,i[0],n,r))return!1;if(1===i.length)return!0;for(var s=1,o=i.length;s<o;++s)if(zM(t,i[s-1],i[s],n,r)&&!WM(t,i[s-1],i[s],n,r))return!1;return!0}function qM(t,e,i,n){for(;e<i-n;){for(var r=0;r<n;++r){var s=t[e+r];t[e+r]=t[i-n+r],t[i-n+r]=s}e+=n,i-=n}}function YM(t,e,i,n){for(var r=0,s=t[i-n],o=t[i-n+1];e<i;e+=n){var a=t[e],l=t[e+1];r+=(a-s)*(l+o),s=a,o=l}return 0===r?void 0:r>0}function QM(t,e,i,n,r){for(var s=void 0!==r&&r,o=0,a=i.length;o<a;++o){var l=i[o],c=YM(t,e,l,n);if(0===o){if(s&&c||!s&&!c)return!1}else if(s&&!c||!s&&c)return!1;e=l}return!0}function XM(t,e,i,n,r){for(var s=void 0!==r&&r,o=0,a=i.length;o<a;++o){var l=i[o],c=YM(t,e,l,n);(0===o?s&&c||!s&&!c:s&&!c||!s&&c)&&qM(t,e,l,n),e=l}return e}function JM(t,e,i,n,r){for(var s=0,o=i.length;s<o;++s)e=XM(t,e,i[s],n,r);return e}var tT=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),eT=function(t){function e(e,i,n){var r=t.call(this)||this;return r.ends_=[],r.flatInteriorPointRevision_=-1,r.flatInteriorPoint_=null,r.maxDelta_=-1,r.maxDeltaRevision_=-1,r.orientedRevision_=-1,r.orientedFlatCoordinates_=null,void 0!==i&&n?(r.setFlatCoordinates(i,e),r.ends_=n):r.setCoordinates(e,i),r}return tT(e,t),e.prototype.appendLinearRing=function(t){this.flatCoordinates?LC(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,i,n){return n<SS(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(xM(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),SM(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,n))},e.prototype.containsXY=function(t,e){return KM(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)},e.prototype.getArea=function(){return LM(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},e.prototype.getCoordinates=function(t){var e;return void 0!==t?XM(e=this.getOrientedFlatCoordinates().slice(),0,this.ends_,this.stride,t):e=this.flatCoordinates,RM(e,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var t=HS(this.getExtent());this.flatInteriorPoint_=$M(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},e.prototype.getInteriorPoint=function(){return new jM(this.getFlatInteriorPoint(),"XYM")},e.prototype.getLinearRingCount=function(){return this.ends_.length},e.prototype.getLinearRing=function(t){return t<0||this.ends_.length<=t?null:new BM(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLinearRings=function(){for(var t=this.layout,e=this.flatCoordinates,i=this.ends_,n=[],r=0,s=0,o=i.length;s<o;++s){var a=i[s],l=new BM(e.slice(r,a),t);n.push(l),r=a}return n},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;QM(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=XM(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[],n=[];return i.length=MM(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),i,0,n),new e(i,"XY",n)},e.prototype.getType=function(){return"Polygon"},e.prototype.intersectsExtent=function(t){return ZM(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=DM(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()},e}(_M),iT=eT;function nT(t){var e=t[0],i=t[1],n=t[2],r=t[3],s=[e,i,e,r,n,r,n,i,e,i];return new eT(s,"XY",[s.length])}const rT=[[8.384360674740835,87.82361750161175],[145.5581976913369,87.3646953231962],[-325.5581976913369,87.82361750161175],[-215.5581976913369,87.82361750161175],[-161.8917180108592,84.22628942426208],[-125.29445893479551,82.48154130920918],[-90.38109747487815,82.85349004122665],[-51.70487751530814,84.93555635380527],[8.384360674740835,87.82361750161175]],sT=[[-214.4418023086631,87.3646953231962],[-163.45686807900947,76.14556732608256],[-131.70883908792965,69.37134141076518],[-100.821870205822,67.53592431503803],[-66.90449925088507,72.20470505499345],[-34.75841798028466,81.27137179020501],[-214.4418023086631,87.3646953231962]];function oT(t){let e=pP(t,!0);return e="81033ffffffffff"===t?rT:"8003fffffffffff"===t?sT:aT(e),new iT([e.map(t=>sE(t))])}function aT(t){const e=t[0][0],i=t[0][1];return t.map(([t,n])=>(Math.abs(t-e)>180&&(e>0?t+=360:t-=360),Math.abs(n-i)>90&&(i>0?n+=180:n-=180),[t,n]))}function lT(t){const e=aT(_P(t,!0)),i=AP(t),[n]=nI([dP(i).reverse()],e[0]);3===e.length&&e.splice(1,1);let r=e[0],s=e[1];return r=cT(r[0],r[1],n[0],n[1],.15),s=cT(s[0],s[1],n[0],n[1],.15),e.push(s),e.push(r),e}function cT(t,e,i,n,r){return[t+(i-t)*r,e+(n-e)*r]}function hT(t){if(t.length<2)return!1;for(let e=0;e<t.length;e++)for(let i=e+1;i<t.length;i++){const n=t[i];if(t[e].some(t=>n.some(e=>oI(t,e))))return[e,i]}return!1}const uT=nM.concat(nM,nM,nM,nM),dT=Array(uT.length).fill(!0);function pT(t){const e=uT.findIndex(e=>e===t);dT[e]=!0}class fT{constructor(t,e){this.edges=t,this.color=null!=e?e:function(){const t=dT.findIndex(t=>t);return dT[t]=!1,uT[t]}()}contains(t){return this.edges.includes(t)}remove(t){const e=this.edges.indexOf(t);if(-1!==e)return this.edges.splice(e,1);throw new Error("group cannot remove missing index"+t)}shouldSplit(){const t=[new fT([this.edges[0]],this.color)];if(this.edges.slice(1).forEach(e=>{t.some(t=>t.addIfLinked(e))||t.push(new fT([e]))}),t.length>=2){let e=!1;for(;!e;){const i=hT(t.map(t=>t.edges.map(t=>_P(t,!0)).flat()));i&&(t[i[0]].merge(t[i[1]]),pT(t.splice(i[1],1)[0].color)),e=!i}}return t.length>1&&t}addIfLinked(t){const e=_P(t,!0),i=this.edges.map(t=>_P(t,!0)).flat().some(t=>e.some(e=>oI(e,t)));return i&&this.edges.push(t),i}merge(t){this.edges.push(...t.edges)}}let mT=(()=>{class t{constructor(t){this.workerService=t,this.selectedEdgeGroups$=new Av.a([]),this.searchQuery$=new Av.a(null),this.searchResult$=new Av.a(null)}toggleEdge(t){const e=this.selectedEdgeGroups$.value,i=e.findIndex(e=>e.contains(t));let n=null;if(-1!==i){const r=e[i];if(r.remove(t),0===r.edges.length)n=e.splice(i,1)[0];else if(r.edges.length>=2){const t=r.shouldSplit();t&&e.splice(i,1,...t)}}else if(e.some(e=>e.addIfLinked(t))){const t=hT(e.map(t=>t.edges.map(t=>_P(t,!0)).flat()));t&&(e[t[0]].merge(e[t[1]]),n=e.splice(t[1],1)[0])}else e.push(new fT([t]));n&&pT(n.color),this.selectedEdgeGroups$.next(e)}resetEdgeGroups(){this.selectedEdgeGroups$.next([])}search(t){return Object(ue.a)(this,void 0,void 0,function*(){this.searchResult$.next(null),this.searchResult$.next({query:OD(t),results:yield this.workerService.ships.searchForShipsPassages(this.selectedEdgeGroups$.value,NO(t.interval.start),NO(t.interval.end)+86400)})})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(_I.a))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),gT=(()=>{class t{constructor(t,e,i,n,r,s,o,a,l,c,h){this.alertsService=t,this.alertRulesService=e,this.annotationService=i,this.drawingService=n,this.historyService=r,this.mapConfigService=s,this.measureService=o,this.pimService=a,this.playbackService=l,this.routeService=c,this.movesService=h;const u=this.routeService.route$.pipe(Object(Ge.a)(t=>"/zones"===t),mn()),d=this.routeService.route$.pipe(Object(Ge.a)(t=>"/moves"===t),mn()),p=this.routeService.route$.pipe(Object(Ge.a)(t=>"/ports"===t),mn()),f=this.routeService.route$.pipe(Object(Ge.a)(t=>t.startsWith("/alerts/rules/")),mn()),m=this.routeService.route$.pipe(Object(Ge.a)(t=>"/annotations"===t),mn());this.mustHideShips$=Hg([u,f,this.playbackService.active$]).pipe(Object(Ge.a)(([t,e,i])=>t||e||i),mn()),this.minimumZoom$=Hg([this.historyService.timestamp$.pipe(Object(Ge.a)(t=>!!t)),this.mapConfigService.limitMinimumZoom$,this.alertRulesService.selectedAlertRuleId$,u,d]).pipe(Object(Ge.a)(([t,e,i,n,r])=>t?7:i||n?2.5:r?5:e?6:2.5),mn()),this.featuresSelectable$=Hg([d,this.annotationService.editedAnnotation$.pipe(Object(Ge.a)(t=>!!t)),this.drawingService.drawingZoneMode$,this.measureService.active$,this.pimService.active$]).pipe(Object(Ge.a)(([t,e,i,n,r])=>!(t||e||i||n||r)),mn()),this.showShipsLayer$=Hg([this.mapConfigService.showShipsLayer$,this.mustHideShips$.pipe(Be(500))]).pipe(Object(Ge.a)(([t,e])=>t&&!e),mn()),this.showAircraftsLayer$=Hg([this.mapConfigService.showAircraftsLayer$,this.mustHideShips$.pipe(Be(500))]).pipe(Object(Ge.a)(([t,e])=>t&&!e),mn()),this.showAnnotationsLayer$=Hg([this.mapConfigService.showAnnotationsLayer$,m,this.annotationService.editedAnnotation$.pipe(Object(Ge.a)(t=>!!t))]).pipe(Object(Ge.a)(([t,e,i])=>t||e||i),mn()),this.showPortsLayer$=Hg([this.mapConfigService.showPortsLayer$,p]).pipe(Object(Ge.a)(([t,e])=>t||e),mn()),this.selectableHexagons$=this.drawingService.drawingZoneMode$.pipe(mn()),this.showHexagonsLayer$=Hg([this.selectableHexagons$,this.mapConfigService.showHexagonsLayer$,d]).pipe(Object(Ge.a)(([t,e,i])=>t||e&&!i),mn()),this.showEdgesLayer$=d.pipe(mn()),this.showTrailsLayer$=Hg([this.mapConfigService.showTrailsLayer$,this.mustHideShips$]).pipe(Object(Ge.a)(([t,e])=>t&&!e),mn()),this.showSelectionMarkers$=this.mustHideShips$.pipe(Object(Ge.a)(t=>!t),mn()),this.showEntitiesSelections$=Hg([this.mapConfigService.enableMultiSelectionMode$,this.mustHideShips$]).pipe(Object(Ge.a)(([t,e])=>t&&!e),mn()),this.showAlertsLayer$=Hg([this.alertsService.alerts$,this.mustHideShips$]).pipe(Object(Ge.a)(([t,e])=>t.length>0||!e),mn()),this.showEventsLayer$=this.showAlertsLayer$}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(IP),r.Zb(DP),r.Zb(MP),r.Zb(TP),r.Zb(bI),r.Zb(hI),r.Zb(WP),r.Zb(KO),r.Zb(tM),r.Zb(vI),r.Zb(mT))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function AT(t=0,e=Ue){return(!yn(t)||t<0)&&(t=0),e&&"function"==typeof e.schedule||(e=Ue),new Ze.a(i=>(i.add(e.schedule(bT,t,{subscriber:i,counter:0,period:t})),i))}function bT(t){const{subscriber:e,counter:i,period:n}=t;e.next(i),this.schedule({subscriber:e,counter:i+1,period:n},n)}let vT=(()=>{class t{constructor(){this.userAFK$=new Av.a(!1),document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState?(clearTimeout(this.afkTimeout),this.userAFK$.next(!1)):this.afkTimeout=setTimeout(()=>{this.userAFK$.next(!0)},9e5)})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),_T=(()=>{class t{constructor(t,e,i){this.mapConfigService=t,this.historyService=e,this.visibilityService=i,this.refresh$=new _e.a,this.pause$=new Av.a(!1),this.tap=()=>{this.refreshTimer&&this.refreshTimer.unsubscribe(),this.refreshTimer=AT(this.mapConfigService.shipRefreshInterval$.value).pipe(He(()=>!this.pause$.value),He(()=>!this.visibilityService.userAFK$.value),He(()=>0===this.historyService.timestamp$.value)).subscribe(()=>{this.refresh$.next()})},this.mapConfigService.shipRefreshInterval$.subscribe(()=>{this.tap()}),this.pause$.subscribe(t=>{t||(this.tap(),this.refresh$.next())})}destroy(){this.setPause(!1),this.refreshTimer.unsubscribe()}togglePause(){this.pause$.next(!this.pause$.value)}setPause(t){this.pause$.next(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(hI),r.Zb(bI),r.Zb(vT))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),yT=(()=>{class t{constructor(t,e){this.configService=t,this.refreshTimerService=e,this.timeRange$=new Av.a(null),this.reset(),this.refreshTimerService.refresh$.subscribe(()=>{this.refresh()})}reset(){this.timeRange$.next(iI[this.configService.defaultTimeRange].refresh())}refresh(){this.timeRange$.value.isCustom||this.timeRange$.next(this.timeRange$.value.refresh())}updateTimeRange(t){this.timeRange$.next(t.refresh())}setCustom(t,e){this.timeRange$.next(this.timeRange$.value.setCustom(t,e))}setRelative(t){this.timeRange$.next(this.timeRange$.value.setRelative(t))}goBackward(){this.timeRange$.next(this.timeRange$.value.shift(-this.timeRange$.value.value/2))}goForward(){this.timeRange$.next(this.timeRange$.value.shift(this.timeRange$.value.value/2))}extendBackward(){this.timeRange$.next(this.timeRange$.value.extend(-this.timeRange$.value.value/2))}extendForward(){this.timeRange$.next(this.timeRange$.value.extend(this.timeRange$.value.value/2))}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(cI),r.Zb(_T))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),wT=(()=>{class t{constructor(t,e,i,n,r){this.historyService=t,this.mapConfigService=e,this.timeRangeService=i,this.workerService=n,this.zonesService=r,this.shipsInView$=new Av.a([]),this.shipsCount$=new Av.a(0)}fetchShip(t){return Object(ue.a)(this,void 0,void 0,function*(){const e=yield this.workerService.ships.getShip(t);let i=this.timeRangeService.timeRange$.value;if(!i.isCustom){const t=this.historyService.timestamp$.value;i=i.setRelative(t>0?t:e.timestamp)}return Object.assign(e,yield this.workerService.ships.getShipDetails(t,i,this.mapConfigService.detailedShipTraces$.value,this.mapConfigService.debugH3Trace$.value,!!fD.a.portCallsEnable)),e.trail.forEach(t=>{t.ship=e}),e.h3Trace.elements.forEach(t=>{t.ship=e}),e.events=e.events.filter(t=>t.type!==UP.MoveZoneEntry&&t.type!==UP.MoveZoneExit||!!this.zonesService.zonesById[t.data.zone]),e})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(bI),r.Zb(hI),r.Zb(yT),r.Zb(_I.a),r.Zb(kP))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),xT=(()=>{class t{constructor(t,e,i,n,r,s,o,a,l,c,h){this.ngZone=t,this.router=e,this.errorHandler=i,this.alertRulesService=n,this.eventsLayerService=r,this.h3TracesLayerService=s,this.mapConfigService=o,this.mapStateService=a,this.shipsService=l,this.timeRangeService=c,this.workerService=h,this.entities$=new Av.a([]),this.openEntity$=new Av.a(null),this.alerts$=new Av.a([]),this.trails$=new Av.a([]),this.mustHideShips=!1,this.mapStateService.mustHideShips$.subscribe(t=>{this.mustHideShips=t}),this.entities$.pipe(Object(Ge.a)(t=>t.filter(t=>!!t.entity))).subscribe(t=>{const e=[],i=[],n=[],r=[];t.forEach(t=>{var s,o,a;t.type===OP.Aircraft?e.push(t.entity.trace):t.type===OP.Ship&&(n.push(...null!==(s=t.entity.alerts)&&void 0!==s?s:[]),r.push(...null!==(o=t.entity.events)&&void 0!==o?o:[]),e.push(t.entity.trail),i.push(null!==(a=t.entity.h3Trace)&&void 0!==a?a:[]))}),n.forEach(t=>{const[e,i]=this.alertRulesService.getAlertRuleColor(t.rule_id);t.color=e,t.rgbVecColor=i}),this.alerts$.next(n),this.eventsLayerService.updateEvents(r),this.trails$.next(e),this.h3TracesLayerService.updateTrails(i)}),Object(or.a)(this.mapConfigService.detailedShipTraces$.pipe(Gg(1)),this.timeRangeService.timeRange$.pipe(Gg(1))).pipe(He(()=>!this.mustHideShips)).subscribe(()=>Object(ue.a)(this,void 0,void 0,function*(){yield Promise.all(this.entities$.value.map(t=>Object(ue.a)(this,void 0,void 0,function*(){yield this.fetchEntity(t.type,t.id)})))})),this.mapConfigService.enableMultiSelectionMode$.subscribe(t=>{t||(this.openEntity$.value?this.entities$.next([this.openEntity$.value]):this.entities$.value.length>1&&this.entities$.next([this.entities$.value[0]]))}),Hg([this.entities$.pipe(Object(Ge.a)(t=>t.filter(t=>t.type===OP.Ship&&!!t.entity).map(t=>t.entity.mmsi)),mn()),this.mapConfigService.showOtherShips$]).subscribe(([t,e])=>{this.mapConfigService.updateShipIdsFilter(e?[]:t)})}clear(){this.entities$.next([])}selectShip(t){this.toggleSelection(OP.Ship,t)}selectAircraft(t){this.toggleSelection(OP.Aircraft,t)}openEntity(t,e){const i=this.entities$.value.find(i=>i.type===t&&i.id===e);i?this.openEntity$.next(i):(this.toggleSelection(t,e),this.openEntity$.next(this.entities$.value[this.entities$.value.length-1]))}closeOpenEntity(){this.openEntity$.next(null),this.mapConfigService.enableMultiSelectionMode$.value||this.entities$.next([])}toggleSelection(t,e){var i;let n=this.entities$.value;const r=n.findIndex(t=>t.id===e);if(-1===r){CC({category:"app",message:`select-entity: ${t}`});const i={type:t,id:e,entity:null};this.mapConfigService.enableMultiSelectionMode$.value||(n=[],this.ngZone.run(()=>{this.router.navigateByUrl(`${t}s/${e}`)})),n.push(i),this.fetchEntity(t,e)}else CC({category:"app",message:`unselect-entity: ${t}`}),n[r].id===(null===(i=this.openEntity$.value)||void 0===i?void 0:i.id)&&this.router.navigateByUrl("/"),n.splice(r,1);this.entities$.next(n)}addToSelection(t,e){-1===this.entities$.value.findIndex(t=>t.id===e)&&this.toggleSelection(t,e)}fetchEntity(t,e){return Object(ue.a)(this,void 0,void 0,function*(){let i=null,n=null;try{t===OP.Ship?i=yield this.shipsService.fetchShip(e):t===OP.Aircraft&&(i=yield this.workerService.aircrafts.getAircraftDetails(e))}catch($nt){$nt.name===kC.Unauthorized&&this.errorHandler.handleError($nt),n=$nt.message.includes(`GetTrip ERROR : ${e} dont find`)?`L'a\xe9ronef ${e} est inconnu. Il a d\xfb atterrir ou son signal n'est plus capt\xe9 depuis plus de 5 minutes.`:"not found"===$nt.message?`Le navire ${e} est inconnu.`:$nt.message}this.updateEntity(t,e,i,n)})}updateEntity(t,e,i,n){const r=this.entities$.value.findIndex(i=>i.type===t&&i.id===e);if(-1===r)return;const s=Object.assign(Object.assign({},this.entities$.value[r]),{entity:i,error:n});this.entities$.value[r]=s,this.entities$.next(this.entities$.value);const o=this.openEntity$.value;o&&o.type===t&&o.id===e&&this.openEntity$.next(s)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.B),r.Zb(sw),r.Zb(r.n),r.Zb(DP),r.Zb($P),r.Zb(GP),r.Zb(hI),r.Zb(gT),r.Zb(wT),r.Zb(yT),r.Zb(_I.a))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();class CT{constructor(t){this.closingNotifier=t}call(t,e){return e.subscribe(new ST(t,this.closingNotifier))}}class ST extends bn.b{constructor(t,e){super(t),this.buffer=[],this.add(Object(bn.c)(e,new bn.a(this)))}_next(t){this.buffer.push(t)}notifyNext(){const t=this.buffer;this.buffer=[],this.destination.next(t)}}let kT=(()=>{class t{constructor(){var t;this.hoveredAircraft$=new Av.a(null),this.hoveredAlert$=new Av.a(null),this.hoveredAnnotation$=new Av.a(null),this.hoveredEvent$=new Av.a(null),this.hoveredShip$=new Av.a(null),this.hoveredAircraftPosition$=new Av.a(null),this.hoveredShipPosition$=new Av.a(null),this.hoveredH3Element$=new Av.a(null),this.pinnedEntitiesTooltips$=new Av.a([]),this.pinEvents$=new _e.a,this.displayedEntity$=Hg([this.hoveredAircraft$.pipe(mn()),this.hoveredAlert$.pipe(mn()),this.hoveredEvent$.pipe(mn()),this.hoveredShip$.pipe(mn()),this.hoveredAircraftPosition$.pipe(mn()),this.hoveredShipPosition$.pipe(mn()),this.hoveredAnnotation$.pipe(mn((t,e)=>null===e&&t===e)),this.hoveredH3Element$.pipe(mn())]).pipe(Object(Ge.a)(([t,e,i,n,r,s,o,a])=>{var l,c,h,u,d,p,f;return null!==(f=null!==(p=null!==(d=null!==(u=null!==(h=null!==(c=null!==(l=null!=e?e:i)&&void 0!==l?l:t)&&void 0!==c?c:n)&&void 0!==h?h:r)&&void 0!==u?u:s)&&void 0!==d?d:o)&&void 0!==p?p:a)&&void 0!==f?f:null}),Pe(t=>{t&&(t.hdms=Yk([t.lon,t.lat]))})),this.pinEvents$.pipe((t=this.pinEvents$.pipe(Be(50)),function(e){return e.lift(new CT(t))}),Object(Ge.a)(t=>{var e,i,n,r,s,o;return null!==(o=null!==(s=null!==(r=null!==(n=null!==(i=null!==(e=t.find(t=>t.kind===OP.Alert))&&void 0!==e?e:t.find(t=>t.kind===OP.Event))&&void 0!==i?i:t.find(t=>t.kind===OP.Ship))&&void 0!==n?n:t.find(t=>t.kind===OP.AircraftPosition))&&void 0!==r?r:t.find(t=>t.kind===OP.ShipPosition))&&void 0!==s?s:t.find(t=>t.kind===OP.Annotation))&&void 0!==o?o:t.find(t=>t.kind===OP.H3Element)}),He(t=>!!t)).subscribe(t=>{t.kind===OP.Annotation?t=OD(t):t.hdms=Yk([t.lon,t.lat]),this.pinnedEntitiesTooltips$.value.push({lon:t.lon,lat:t.lat,positioning:"bottom-left",entity:t}),this.pinnedEntitiesTooltips$.next(this.pinnedEntitiesTooltips$.value)})}hoverEntity(t,e){switch(t){case OP.Aircraft:e&&(e.kind=OP.Aircraft),this.hoveredAircraft$.next(e);break;case OP.Alert:e&&(e.kind=OP.Alert),this.hoveredAlert$.next(e);break;case OP.Annotation:e&&(e.kind=OP.Annotation),this.hoveredAnnotation$.next(e);break;case OP.Event:e&&(e.kind=OP.Event),this.hoveredEvent$.next(e);break;case OP.Ship:this.hoveredShip$.next(e);break;case OP.AircraftPosition:e&&(e.kind=OP.AircraftPosition),this.hoveredAircraftPosition$.next(e);break;case OP.ShipPosition:e&&(e.kind=OP.ShipPosition),this.hoveredShipPosition$.next(e);break;case OP.H3Element:e&&(e.kind=OP.H3Element),this.hoveredH3Element$.next(e);break;default:throw new Error("Entit\xe9 inconnue")}}clearPinnedEntities(){this.pinnedEntitiesTooltips$.next([])}pinEntity(t){this.pinEvents$.next(t)}unpinTooltip(t){this.pinnedEntitiesTooltips$.next(this.pinnedEntitiesTooltips$.value.filter(e=>e!==t))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),ET=(()=>{class t{constructor(t,e,i){this.ngZone=t,this.selectionService=e,this.tooltipsService=i,this.selectAlertFeature$=new _e.a,this.selectEventFeature$=new _e.a,this.selectEventItem$=new _e.a,this.mapClickEvents$=new _e.a,this.ngZone.runOutsideAngular(()=>{this.mapClickEvents$.pipe(function(t){let e=arguments.length,i=Ue;Object(we.a)(arguments[arguments.length-1])&&(i=arguments[arguments.length-1],e--);let n=null;e>=2&&(n=arguments[1]);let r=Number.POSITIVE_INFINITY;return e>=3&&(r=arguments[2]),function(e){return e.lift(new BP(t,n,r,i))}}(16),Object(Ge.a)(t=>{var e,i,n,r,s,o,a;return null!==(a=null!==(o=null!==(s=null!==(r=null!==(n=null!==(i=null!==(e=t.find(t=>t.kind===OP.Alert))&&void 0!==e?e:t.find(t=>t.kind===OP.Event))&&void 0!==i?i:t.find(t=>t.kind===OP.Aircraft))&&void 0!==n?n:t.find(t=>t.kind===OP.Ship))&&void 0!==r?r:t.find(t=>t.kind===OP.AircraftPosition))&&void 0!==s?s:t.find(t=>t.kind===OP.ShipPosition))&&void 0!==o?o:t.find(t=>t.kind===OP.Annotation))&&void 0!==a?a:t.find(t=>t.kind===OP.H3Element)}),He(t=>!!t)).subscribe(t=>{switch(CC({category:"app",message:`map-click: ${t.kind}`}),t.kind){case OP.Aircraft:this.selectionService.selectAircraft(t.icao);break;case OP.AircraftPosition:this.tooltipsService.pinEntity(t);break;case OP.Alert:this.selectAlertFeature$.next(t),this.tooltipsService.pinEntity(t);break;case OP.Annotation:this.tooltipsService.pinEntity(t);break;case OP.Event:this.selectEventFeature$.next(t),this.tooltipsService.pinEntity(t);break;case OP.Ship:this.selectionService.selectShip(t.mmsi);break;case OP.ShipPosition:case OP.H3Element:this.tooltipsService.pinEntity(t);break;default:throw new Error("Entit\xe9 inconnue")}})})}clickOnEntity(t,e){switch(t){case OP.Aircraft:e.kind=OP.Aircraft,this.mapClickEvents$.next(e);break;case OP.AircraftPosition:e.kind=OP.AircraftPosition,this.mapClickEvents$.next(e);break;case OP.Alert:e.kind=OP.Alert,this.mapClickEvents$.next(e);break;case OP.Annotation:e.kind=OP.Annotation,this.mapClickEvents$.next(e);break;case OP.Event:e.kind=OP.Event,this.mapClickEvents$.next(e);break;case OP.Ship:this.mapClickEvents$.next(e);break;case OP.ShipPosition:e.kind=OP.ShipPosition,this.mapClickEvents$.next(e);break;case OP.H3Element:e.kind=OP.H3Element,this.mapClickEvents$.next(e);break;default:throw new Error("Entit\xe9 inconnue")}}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.B),r.Zb(xT),r.Zb(kT))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),DT=(()=>{class t{constructor(){this.zones$=new Av.a([])}clear(){this.zones$.next([])}updateZones(t){this.zones$.next(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),IT=(()=>{class t{constructor(t,e,i,n,r,s){this.interactionsService=t,this.mapService=e,this.tooltipsService=i,this.workerService=n,this.zonesLayerService=r,this.zonesService=s,this.transhipmentTrail$=new Av.a(null),this.interactionsService.selectEventItem$.subscribe(t=>{this.mapService.pingLocation([t.lon,t.lat]),this.mapService.centerOnLonLat([t.lon,t.lat])}),this.interactionsService.selectEventFeature$.subscribe(t=>{this.tooltipsService.pinEntity(t)}),Object(or.a)(this.interactionsService.selectEventFeature$,this.interactionsService.selectEventItem$).subscribe(t=>{if(!t)return;let e=!1,i=!1;switch(t.type){case UP.PositionDubious:{this.mapService.pingLocation([t.data.lon,t.data.lat]);const i=qD.New(t.lon,t.lat,t.lon,t.lat);i.addPoint(t.data.lon,t.data.lat),this.mapService.fitOn(i.toExtent()),e=!0;break}case UP.MoveZoneEntry:case UP.MoveZoneExit:{const i=this.zonesService.zonesById[t.data.zone];this.zonesLayerService.updateZones([i]),this.mapService.fitOn(wP(i.h3indexes)),e=!0;break}case UP.MoveMeetingAtSea:this.viewTranshipment(t.data.mmsi,t.timestamp),i=!0}i||this.hideTranshipment(),e||this.zonesLayerService.clear()})}viewTranshipment(t,e){return Object(ue.a)(this,void 0,void 0,function*(){const i=yield this.workerService.ships.getShipTrail(t,e-86400,e+86400);this.transhipmentTrail$.next(i)})}hideTranshipment(){this.transhipmentTrail$.value&&this.transhipmentTrail$.next(null)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(ET),r.Zb(pI),r.Zb(kT),r.Zb(_I.a),r.Zb(DT),r.Zb(kP))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),PT=(()=>{class t{constructor(t,e){this.configService=t,this.mapConfigService=e,this.configurations$=new Av.a([]),this.activeConfigurationName$=new Av.a(""),this.activeConfiguration$=new Av.a(null),this.dirtyActiveConfiguration$=new Av.a(!1),this.loadConfig(),Hg([this.configurations$,this.activeConfigurationName$]).pipe(Gg(1),Be(300)).subscribe(()=>{this.saveConfig()}),Hg([this.configurations$,this.activeConfigurationName$]).subscribe(([t,e])=>{this.activeConfiguration$.next(e?t.find(t=>t.name===e):null)}),this.activeConfiguration$.pipe(Gg(1),mn()).subscribe(t=>{this.mapConfigService.updateBatch(t?t.filters:zD())}),this.activeConfiguration$.subscribe(t=>{var e;this.dirtyActiveConfiguration$.next(!1),null===(e=this.dirtyWatch)||void 0===e||e.unsubscribe(),t&&(this.dirtyWatch=this.mapConfigService.shipFilter$.pipe(Object(Ge.a)(t=>HD(t)),mn(KD),Gg(1)).subscribe(()=>{this.dirtyActiveConfiguration$.next(!0)}))})}loadConfig(){const t=this.configService.filterConfigurations;t&&(FD(t.configurations)&&(t.configurations.forEach(t=>{t.filters=Object.assign({},zD(),t.filters)}),this.configurations$.next(t.configurations)),FD(t.activeConfigurationName)&&this.activeConfigurationName$.next(t.activeConfigurationName))}saveConfig(){this.configService.set("filterConfigurations",{configurations:this.configurations$.value,activeConfigurationName:this.activeConfigurationName$.value})}selectConfiguration(t){this.activeConfigurationName$.next(t)}importConfiguration(t){t.filters=Object.assign({},zD(),t.filters),this.configurations$.next([...this.configurations$.value,t].sort((t,e)=>t.name<=e.name?-1:1))}createConfiguration(t){this.configurations$.next([...this.configurations$.value,{name:t,filters:HD(this.mapConfigService.shipFilter$.value)}].sort((t,e)=>t.name<=e.name?-1:1))}renameConfiguration(t,e){const i=this.configurations$.value.findIndex(e=>e.name===t),n=this.configurations$.value.findIndex(t=>t.name===e);if(-1===i)throw new Error("Configuration non trouv\xe9e");if(-1!==n&&n!==i)throw new Error("La configuration existe d\xe9j\xe0");const[r]=this.configurations$.value.splice(i,1);r.name=e,this.configurations$.next([...this.configurations$.value,r].sort((t,e)=>t.name<=e.name?-1:1)),this.selectConfiguration(e)}updateConfiguration(t){const e=this.configurations$.value.findIndex(e=>e.name===t.name);if(-1===e)throw new Error("Configuration non trouv\xe9e");this.configurations$.value.splice(e,1),this.configurations$.next([...this.configurations$.value,t].sort((t,e)=>t.name<=e.name?-1:1))}deleteConfiguration(t){this.configurations$.next(this.configurations$.value.filter(e=>e.name!==t)),this.activeConfigurationName$.next(null)}clear(){this.configurations$.next([]),this.activeConfigurationName$.next(null)}clearMapFilters(){this.mapConfigService.resetShipFilter()}updateActiveConfigurationFilters(){if(!this.activeConfigurationName$.value)throw new Error("Aucune configuration active");this.updateConfiguration({name:this.activeConfigurationName$.value,filters:HD(this.mapConfigService.shipFilter$.value)})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(cI),r.Zb(hI))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),OT=(()=>{class t{constructor(t,e,i,n){this.alertRulesService=t,this.mapConfigService=e,this.timeRangeService=i,this.workerService=n,this.fleets$=new Av.a([]),this.fleetsById={},this.selectedFleet$=new Av.a(null),this.selectingFleet=!1,this.fleetAlerts$=new Av.a([]),this.fleetTrails$=new Av.a([]),this.fleets$.subscribe(()=>{this.updateFleetsShipsCache(this.mapConfigService.shipFilter$.value.fleets)}),this.mapConfigService.detailedShipTraces$.subscribe(()=>Object(ue.a)(this,void 0,void 0,function*(){this.selectedFleet$.value&&(yield this.selectFleet(this.selectedFleet$.value.id))})),Hg([this.selectedFleet$,this.mapConfigService.showFleetShipsOnly$]).pipe(Gg(1)).subscribe(([t,e])=>{this.mapConfigService.updateShipIdsFilter(e&&t?t.ships.map(t=>t.mmsi):[])})}refreshFleets(){return Object(ue.a)(this,void 0,void 0,function*(){const t=yield this.workerService.fleets.list();return this.fleetsById=t.reduce((t,e)=>(t[e.id]=e,t),{}),this.fleets$.next(t),t})}clear(){this.fleets$.next([])}selectFleet(t){return Object(ue.a)(this,void 0,void 0,function*(){this.selectingFleet=!0;const e=this.timeRangeService.timeRange$.value,[i,n,r]=yield Promise.all([this.workerService.fleets.get(t),this.workerService.fleets.getFleetTrails(t,e.start,e.end,this.mapConfigService.detailedShipTraces$.value),this.workerService.fleets.getFleetAlerts(t,e.start,e.end)]);this.selectedFleet$.next(i);const s=i.ships.reduce((t,e)=>(t[e.mmsi]=e,t),{}),o=Object.entries(n).map(([t,e])=>e.map(e=>(e.ship=s[t],e)));return r.forEach(t=>{const[e,i]=this.alertRulesService.getAlertRuleColor(t.rule_id);t.color=e,t.rgbVecColor=i}),this.fleetAlerts$.next(r),this.fleetTrails$.next(o),this.selectingFleet=!1,{fleet:i,trailsByMMSI:n,alerts:r}})}deselectFleet(){this.selectedFleet$.next(null),this.fleetAlerts$.next([]),this.fleetTrails$.next([])}createFleet(t){return Object(ue.a)(this,void 0,void 0,function*(){const e=yield this.workerService.fleets.create(t);return yield this.refreshFleets(),e})}updateFleet(t){return Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.fleets.update(t),yield this.refreshFleets()})}deleteFleet(t){return Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.fleets.delete(t),yield this.refreshFleets()})}updateFleetsFilter(t){this.updateFleetsShipsCache(t),this.mapConfigService.updateFleetsFilter(t)}updateFleetsShipsCache(t){this.mapConfigService.shipFilter$.value.fleetsShipsCache=this.fleets$.value.filter(e=>t.includes(e.id)).flatMap(t=>t.ships.map(t=>t.mmsi))}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(DP),r.Zb(hI),r.Zb(yT),r.Zb(_I.a))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),MT=(()=>{class t{constructor(){this.initialized$=new Av.a(!1)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),TT=(()=>{class t{constructor(t,e,i){this.appInitService=t,this.mapStateService=e,this.workerService=i,this.ports$=new Av.a([]),this.appInitService.initialized$.pipe(He(t=>t)).subscribe(()=>{this.mapStateService.showPortsLayer$.pipe(He(t=>t),Rv()).subscribe(()=>Object(ue.a)(this,void 0,void 0,function*(){this.ports$.next(yield this.workerService.ports.listPorts())}))})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(MT),r.Zb(gT),r.Zb(_I.a))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),RT=(()=>{class t{constructor(t,e,i,n,r,s,o,a,l,c,h,u,d,p,f,m){this.alertRulesService=t,this.alertsService=e,this.annotationsService=i,this.drawingService=n,this.eventsService=r,this.filterConfigurationsService=s,this.fleetsService=o,this.historyService=a,this.interactionsService=l,this.mapService=c,this.mapConfigService=h,this.portsService=u,this.timeRangeService=d,this.uiService=p,this.workerService=f,this.zonesService=m,this.initialized=!1}init(){return Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.view.reset(),yield Promise.all([this.fleetsService.refreshFleets(),this.zonesService.refreshZones(),this.annotationsService.refreshAnnotations()]),yield this.alertRulesService.refreshAlertRules(),this.initialized=!0})}destroy(){this.alertRulesService.clear(),this.fleetsService.clear(),this.zonesService.clear(),this.filterConfigurationsService.clear(),this.mapConfigService.clear(),this.drawingService.clearZones(),this.zonesService.clear(),this.annotationsService.clear(),this.initialized=!1}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(DP),r.Zb(IP),r.Zb(MP),r.Zb(TP),r.Zb(IT),r.Zb(PT),r.Zb(OT),r.Zb(bI),r.Zb(ET),r.Zb(pI),r.Zb(hI),r.Zb(TT),r.Zb(yT),r.Zb(VI),r.Zb(_I.a),r.Zb(kP))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),VT=(()=>{class t{constructor(t,e,i,n){this.authenticationService=t,this.initializationService=e,this.uiService=i,this.router=n}canActivateChild(t,e){return Object(ue.a)(this,void 0,void 0,function*(){return this.authenticationService.isAuthenticated()?(this.initializationService.initialized||(yield this.initializationService.init()),!0):(this.uiService.error("Vous devez \xeatre authentifi\xe9"),yield this.router.navigateByUrl(`/login?redirect=${e.url}`),!1)})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(yI),r.Zb(RT),r.Zb(VI),r.Zb(sw))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),FT=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-about-dialog"]],decls:122,vars:0,consts:[["mat-dialog-title","",1,"d-flex"],[1,"u-flex"],["mat-button","","title","Fermer le panneau",3,"mat-dialog-close"],["href","https://beta.gouv.fr/startups/anais.html"],["href","https://beta.gouv.fr/apropos/"],[1,"about-dialog__faq-title"],[1,"about-dialog__faq"],["href","https://beta.gouv.fr/startups/sepia.html"],["href","/3rdpartylicenses.txt"],["href","https://www.marineregions.org/"],["href","https://doi.org/10.14284/386"]],template:function(t,e){1&t&&(r.Vb(0,"h1",0),r.Kc(1," \xc0 propos d'ANAIS "),r.Qb(2,"div",1),r.Vb(3,"button",2),r.Vb(4,"mat-icon"),r.Kc(5,"close"),r.Ub(),r.Ub(),r.Ub(),r.Vb(6,"div"),r.Vb(7,"h3"),r.Kc(8,"ANAIS comme Analyse des Incoh\xe9rences de Situation maritime"),r.Ub(),r.Vb(9,"p"),r.Kc(10," C'est un projet men\xe9 en \xab start-up d'\xc9tat \xbb, cr\xe9\xe9 par la Marine et pour la Marine, avec le soutien de l'Agence de l'Innovation de D\xe9fense et de la fabrique num\xe9rique. "),r.Ub(),r.Vb(11,"p"),r.Kc(12," La vocation premi\xe8re d'ANAIS est d'apporter un service op\xe9rationnel sans limite de licence, au plus proche du besoin op\xe9rationnel. "),r.Ub(),r.Vb(13,"p"),r.Kc(14," L'objectif est d'avoir la main sur les d\xe9veloppements. Il n'y a pas de logique commerciale ni contractuelle, ni de licence. "),r.Ub(),r.Vb(15,"p"),r.Kc(16," Nous allons faire \xe9voluer ANAIS au plus pr\xe8s des besoins des utilisateurs et rajouter au fur et \xe0 mesure des id\xe9es, des donn\xe9es et des algorithmes. "),r.Ub(),r.Vb(17,"p"),r.Kc(18," ANAIS est \xe0 utiliser en compl\xe9ment des outils commerciaux. "),r.Ub(),r.Vb(19,"div"),r.Kc(20," Pour plus d'informations, vous pouvez consulter la "),r.Vb(21,"a",3),r.Kc(22,"fiche produit sur beta.gouv"),r.Ub(),r.Kc(23," ou bien obtenir plus d'informations sur la "),r.Vb(24,"a",4),r.Kc(25,"m\xe9thode de d\xe9veloppement beta.gouv"),r.Ub(),r.Kc(26,". "),r.Ub(),r.Vb(27,"h3",5),r.Kc(28,"Questions r\xe9currentes"),r.Ub(),r.Vb(29,"div",6),r.Vb(30,"div"),r.Vb(31,"h4"),r.Kc(32,"Quels sont les navigateurs compatibles ?"),r.Ub(),r.Kc(33," Nous visons \xe0 rendre ANAIS compatible avec Chrome >= 56 et Firefox >= 52 (version utilis\xe9e sur intradef). Il est recommand\xe9 d'utiliser des versions "),r.Vb(34,"strong"),r.Kc(35,"r\xe9centes"),r.Ub(),r.Kc(36," de navigateurs afin de profiter des derni\xe8res optimisations de performance. "),r.Qb(37,"br"),r.Vb(38,"strong"),r.Kc(39,"Internet Explorer et Edge ne sont pas test\xe9s et ne sont probablement pas compatibles."),r.Ub(),r.Ub(),r.Vb(40,"div"),r.Vb(41,"h4"),r.Kc(42,"Compatibilit\xe9 ISPT ?"),r.Ub(),r.Kc(43," ANAIS fonctionne sur le r\xe9seau intradef avec les PC ISPT \xe0 condition d'autoriser le d\xe9blocage des serveurs utilis\xe9s par ANAIS : "),r.Vb(44,"em"),r.Kc(45,"anais.beta.gouv.fr"),r.Ub(),r.Kc(46," et tous les serveurs en "),r.Vb(47,"em"),r.Kc(48,"*.anais.beta.gouv.fr"),r.Ub(),r.Kc(49,". "),r.Ub(),r.Vb(50,"div"),r.Vb(51,"h4"),r.Kc(52,"Quelles sont les donn\xe9es utilis\xe9es ? D'o\xf9 viennent-elles ?"),r.Ub(),r.Kc(53," Les donn\xe9es AIS proviennent de 2 fournisseurs : l'agence europ\xe9enne de s\xe9curit\xe9 maritime (EMSA) avec le flux IMDATE (EMSA's Integrated Maritime Data Environment (IMDatE)) et CLS (couverture mondiale). "),r.Qb(54,"br"),r.Kc(55," Les donn\xe9es ADS-B des a\xe9ronefs de notre partenaire "),r.Vb(56,"a",7),r.Kc(57,"SEPIA"),r.Ub(),r.Kc(58," : ADSBHub, ELia-AF-Gao-1, ELia-AF-Gossi-1, ELia-AF-Niamey-2, FlightRadar24, Ghost, Glidernet, RTB. "),r.Ub(),r.Vb(59,"div"),r.Vb(60,"h4"),r.Kc(61,"\xc0 quoi servent les r\xe8gles d'alertes ?"),r.Ub(),r.Kc(62," Les r\xe8gles d'alertes permettent de configurer des crit\xe8res et des filtres afin de lever des alertes sur des comportements bien pr\xe9cis. Par exemple, un transbordement dans une zone. Le but des alertes est de notifier l'utilisateur automatiquement quand un comportement suspect est d\xe9tect\xe9. "),r.Ub(),r.Vb(63,"div"),r.Vb(64,"h4"),r.Kc(65,"Il semble y avoir des faux-positifs sur les \xe9v\xe9nements !"),r.Ub(),r.Kc(66," La d\xe9tection automatique des transbordements et routes erratiques est complexe. Nous essayons d'optimiser les algorithmes afin de g\xe9rer au mieux les cas particuliers. Nous pr\xe9voyons notamment d'exclure les zones de port car les \xe9v\xe9nements dans les ports sont non pertinents. "),r.Ub(),r.Vb(67,"div"),r.Vb(68,"h4"),r.Kc(69,"Les performances sont mauvaises ! Je passe mon temps \xe0 attendre..."),r.Ub(),r.Kc(70," Nous faisons notre maximum afin d'am\xe9liorer les performances du syst\xe8me. N'h\xe9sitez-pas \xe0 nous contacter pour qu'on puisse trouver un moyen d'adapter ANAIS \xe0 votre usage. "),r.Ub(),r.Vb(71,"div"),r.Vb(72,"h4"),r.Kc(73,"Confidentialit\xe9"),r.Ub(),r.Kc(74," La connexion au serveur utilise le protocole HTTPS (TLS 1.2) et un certificat Let's Encrypt. Les serveurs et la bases de donn\xe9es sont h\xe9berg\xe9s chez OVH. "),r.Ub(),r.Vb(75,"div"),r.Vb(76,"h4"),r.Kc(77,"J'ai des id\xe9es d'am\xe9liorations !"),r.Ub(),r.Kc(78," L'\xe9quipe derri\xe8re ANAIS est ouverte \xe0 toute remarque et proposition d'am\xe9lioration. Elle se r\xe9serve n\xe9anmoins le droit de prioriser et d'adapter les fonctionnalit\xe9s afin de r\xe9pondre \xe0 la majorit\xe9 des utilisateurs. Vous pouvez utiliser le chat pour dialoguer directement avec l'\xe9quipe. "),r.Ub(),r.Vb(79,"div"),r.Vb(80,"h4"),r.Kc(81,"Je suis dans un navire / avion et j'ai un d\xe9bit internet trop petit pour ANAIS"),r.Ub(),r.Kc(82," Nous avons travaill\xe9 et travaillons toujours pour optimiser au maximum l'utilisation du d\xe9bit. Ainsi, nous avons ajout\xe9 des param\xe8tres afin de limiter l'utilisation de la bande passante en environnement contraint. Ces param\xe8tres sont accessibles via le menu "),r.Vb(83,"em"),r.Kc(84,"Param\xe8tres"),r.Ub(),r.Kc(85,". "),r.Vb(86,"ul"),r.Vb(87,"li"),r.Kc(88,"Activer la "),r.Vb(89,"em"),r.Kc(90,"Restriction de carte"),r.Ub(),r.Kc(91," afin de ne charger qu'une zone pr\xe9d\xe9finie de la surface du globe"),r.Ub(),r.Vb(92,"li"),r.Kc(93,"Augmenter l'"),r.Vb(94,"em"),r.Kc(95,"intervalle de rafraichissement des derni\xe8res positions des navires"),r.Ub(),r.Ub(),r.Vb(96,"li"),r.Kc(97,"Augmenter la "),r.Vb(98,"em"),r.Kc(99,"p\xe9riode de temps par d\xe9faut"),r.Ub(),r.Kc(100," pour les traces que l'on r\xe9cup\xe8re quand on consulte une fiche navire"),r.Ub(),r.Vb(101,"li"),r.Kc(102,"Activer la "),r.Vb(103,"em"),r.Kc(104,"limite de zoom minimum"),r.Ub(),r.Kc(105," afin de ne pas charger trop de navires d'un coup"),r.Ub(),r.Ub(),r.Ub(),r.Ub(),r.Vb(106,"h3",5),r.Kc(107,"Outils Open Source"),r.Ub(),r.Vb(108,"p"),r.Kc(109," Ce projet se base enti\xe8rement sur des outils open source dont les licences sont visibles \xe0 cet "),r.Vb(110,"a",8),r.Kc(111,"endroit"),r.Ub(),r.Kc(112,". "),r.Ub(),r.Vb(113,"p"),r.Kc(114," Autres cr\xe9dits :"),r.Qb(115,"br"),r.Kc(116," - Flanders Marine Institute (2019). Maritime Boundaries Geodatabase: Maritime Boundaries and Exclusive Economic Zones (200NM), version 11. Available online at "),r.Vb(117,"a",9),r.Kc(118,"https://www.marineregions.org/"),r.Ub(),r.Kc(119,". "),r.Vb(120,"a",10),r.Kc(121,"https://doi.org/10.14284/386"),r.Ub(),r.Ub(),r.Ub())},directives:[ql,Dl,Zl,Yp],styles:[".about-dialog__faq-title[_ngcontent-%COMP%]{margin-top:32px}.about-dialog__faq[_ngcontent-%COMP%]{display:grid;grid-gap:1em;grid-template-columns:1fr 1fr}"]}),t})(),LT=(()=>{class t{constructor(){this.subscriptions=[],this.eventListeners=[]}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe()),this.eventListeners.forEach(ME)}ensureMandatoryInputParams(...t){t.forEach(t=>{if(void 0===this[t])throw new Error(`Missing input property '${t}'`)})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t}),t})(),UT=(()=>{class t extends LT{constructor(t,e,i,n,r){super(),this.titleService=t,this.router=e,this.dialog=i,this.mapService=n,this.routeService=r}ngOnInit(){this.titleService.setTitle("\xc0 propos - ANAIS"),this.mapService.hasBooted||this.mapService.resetToDefaultView(),this.dialogRef||this.createDialog()}createDialog(){this.dialogRef=this.dialog.open(FT,{height:"90vh",width:"90vw",maxWidth:"90vw",closeOnNavigation:!0}),this.dialogRef.afterClosed().subscribe((t=!0)=>Object(ue.a)(this,void 0,void 0,function*(){if(t){const t=this.routeService.previousUrl||"";yield this.router.navigateByUrl(t)}}))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(he),r.Pb(sw),r.Pb(Gl),r.Pb(pI),r.Pb(vI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-about-loader"]],features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2}),t})();const BT=["*",[["mat-toolbar-row"]]],NT=["*","mat-toolbar-row"];class jT{constructor(t){this._elementRef=t}}const zT=Ea(jT);let HT=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),t})(),KT=(()=>{class t extends zT{constructor(t,e,i){super(t),this._platform=e,this._document=i}ngAfterViewInit(){this._platform.isBrowser&&(this._checkToolbarMixedModes(),this._toolbarRows.changes.subscribe(()=>this._checkToolbarMixedModes()))}_checkToolbarMixedModes(){}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(ci),r.Pb(a))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-toolbar"]],contentQueries:function(t,e,i){if(1&t&&r.Ib(i,HT,1),2&t){let t;r.vc(t=r.dc())&&(e._toolbarRows=t)}},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(t,e){2&t&&r.Hb("mat-toolbar-multiple-rows",e._toolbarRows.length>0)("mat-toolbar-single-row",0===e._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[r.Ab],ngContentSelectors:NT,decls:2,vars:0,template:function(t,e){1&t&&(r.mc(BT),r.lc(0),r.lc(1,1))},styles:[".cdk-high-contrast-active .mat-toolbar{outline:solid 1px}.mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%}\n"],encapsulation:2,changeDetection:0}),t})(),$T=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Sa],Sa]}),t})(),GT=(()=>{class t{constructor(){this._vertical=!1,this._inset=!1}get vertical(){return this._vertical}set vertical(t){this._vertical=ti(t)}get inset(){return this._inset}set inset(t){this._inset=ti(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(t,e){2&t&&(r.Eb("aria-orientation",e.vertical?"vertical":"horizontal"),r.Hb("mat-divider-vertical",e.vertical)("mat-divider-horizontal",!e.vertical)("mat-divider-inset",e.inset))},inputs:{vertical:"vertical",inset:"inset"},decls:0,vars:0,template:function(t,e){},styles:[".mat-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mat-divider.mat-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px}\n"],encapsulation:2,changeDetection:0}),t})(),WT=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Sa],Sa]}),t})(),ZT=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-admin-page"]],decls:23,vars:2,consts:[[1,"page"],["color","primary"],[1,"mat-h1","ma-0","pr-3"],["mat-button","","routerLink","/"],[3,"vertical"],["mat-button","","routerLink","/admin/users"],[1,"mr-2"],["mat-button","","routerLink","/admin/maintenance"],[1,"page__content"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"mat-toolbar",1),r.Vb(2,"div",2),r.Kc(3,"Administration ANAIS"),r.Ub(),r.Vb(4,"button",3),r.Vb(5,"mat-icon"),r.Kc(6,"chevron_left"),r.Ub(),r.Vb(7,"span"),r.Kc(8,"Retour \xe0 l'interface"),r.Ub(),r.Ub(),r.Qb(9,"mat-divider",4),r.Vb(10,"button",5),r.Vb(11,"mat-icon",6),r.Kc(12,"supervisor_account"),r.Ub(),r.Vb(13,"span"),r.Kc(14,"Utilisateurs"),r.Ub(),r.Ub(),r.Qb(15,"mat-divider",4),r.Vb(16,"button",7),r.Vb(17,"mat-icon",6),r.Kc(18,"build"),r.Ub(),r.Vb(19,"span"),r.Kc(20,"Maintenance"),r.Ub(),r.Ub(),r.Ub(),r.Vb(21,"div",8),r.Qb(22,"router-outlet"),r.Ub(),r.Ub()),2&t&&(r.Db(9),r.nc("vertical",!0),r.Db(6),r.nc("vertical",!0))},directives:[KT,Dl,ow,Yp,GT,hw],styles:[".page[_ngcontent-%COMP%]{height:100%;max-height:100vh;overflow:auto}.page__content[_ngcontent-%COMP%]{max-width:960px;padding:16px;margin:0 auto}"]}),t})();var qT=function(t){return t.Planned="info",t.InProgress="in_progress",t}({});const YT=["input"],QT=function(){return{enterDuration:150}},XT=["*"],JT=new r.s("mat-radio-default-options",{providedIn:"root",factory:function(){return{color:"accent"}}});let tR=0;const eR={provide:rc,useExisting:Object(r.W)(()=>sR),multi:!0};class iR{constructor(t,e){this.source=t,this.value=e}}const nR=new r.s("MatRadioGroup");let rR=(()=>{class t{constructor(t){this._changeDetector=t,this._value=null,this._name="mat-radio-group-"+tR++,this._selected=null,this._isInitialized=!1,this._labelPosition="after",this._disabled=!1,this._required=!1,this._controlValueAccessorChangeFn=()=>{},this.onTouched=()=>{},this.change=new r.o}get name(){return this._name}set name(t){this._name=t,this._updateRadioButtonNames()}get labelPosition(){return this._labelPosition}set labelPosition(t){this._labelPosition="before"===t?"before":"after",this._markRadiosForCheck()}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())}_checkSelectedRadioButton(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)}get selected(){return this._selected}set selected(t){this._selected=t,this.value=t?t.value:null,this._checkSelectedRadioButton()}get disabled(){return this._disabled}set disabled(t){this._disabled=ti(t),this._markRadiosForCheck()}get required(){return this._required}set required(t){this._required=ti(t),this._markRadiosForCheck()}ngAfterContentInit(){this._isInitialized=!0}_touch(){this.onTouched&&this.onTouched()}_updateRadioButtonNames(){this._radios&&this._radios.forEach(t=>{t.name=this.name,t._markForCheck()})}_updateSelectedRadioFromValue(){this._radios&&(null===this._selected||this._selected.value!==this._value)&&(this._selected=null,this._radios.forEach(t=>{t.checked=this.value===t.value,t.checked&&(this._selected=t)}))}_emitChangeEvent(){this._isInitialized&&this.change.emit(new iR(this._selected,this._value))}_markRadiosForCheck(){this._radios&&this._radios.forEach(t=>t._markForCheck())}writeValue(t){this.value=t,this._changeDetector.markForCheck()}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t,this._changeDetector.markForCheck()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h))},t.\u0275dir=r.Kb({type:t,inputs:{name:"name",labelPosition:"labelPosition",value:"value",selected:"selected",disabled:"disabled",required:"required",color:"color"},outputs:{change:"change"}}),t})(),sR=(()=>{class t extends rR{}return t.\u0275fac=function(e){return oR(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["mat-radio-group"]],contentQueries:function(t,e,i){if(1&t&&r.Ib(i,hR,1),2&t){let t;r.vc(t=r.dc())&&(e._radios=t)}},hostAttrs:["role","radiogroup",1,"mat-radio-group"],exportAs:["matRadioGroup"],features:[r.Cb([eR,{provide:nR,useExisting:t}]),r.Ab]}),t})();const oR=r.Xb(sR);class aR{constructor(t){this._elementRef=t}}const lR=Da(Ia(aR));let cR=(()=>{class t extends lR{constructor(t,e,i,n,s,o,a,l){super(e),this._changeDetector=i,this._focusMonitor=n,this._radioDispatcher=s,this._animationMode=o,this._providerOverride=a,this._uniqueId="mat-radio-"+ ++tR,this.id=this._uniqueId,this.change=new r.o,this._checked=!1,this._value=null,this._removeUniqueSelectionListener=()=>{},this.radioGroup=t,l&&(this.tabIndex=ei(l,0)),this._removeUniqueSelectionListener=s.listen((t,e)=>{t!==this.id&&e===this.name&&(this.checked=!1)})}get checked(){return this._checked}set checked(t){const e=ti(t);this._checked!==e&&(this._checked=e,e&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!e&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),e&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,null!==this.radioGroup&&(this.checked||(this.checked=this.radioGroup.value===t),this.checked&&(this.radioGroup.selected=this)))}get labelPosition(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"}set labelPosition(t){this._labelPosition=t}get disabled(){return this._disabled||null!==this.radioGroup&&this.radioGroup.disabled}set disabled(t){this._setDisabled(ti(t))}get required(){return this._required||this.radioGroup&&this.radioGroup.required}set required(t){this._required=ti(t)}get color(){return this._color||this.radioGroup&&this.radioGroup.color||this._providerOverride&&this._providerOverride.color||"accent"}set color(t){this._color=t}get inputId(){return`${this.id||this._uniqueId}-input`}focus(t,e){e?this._focusMonitor.focusVia(this._inputElement,e,t):this._inputElement.nativeElement.focus(t)}_markForCheck(){this._changeDetector.markForCheck()}ngOnInit(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.checked&&(this.radioGroup.selected=this),this.name=this.radioGroup.name)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{!t&&this.radioGroup&&this.radioGroup._touch()})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}_emitChangeEvent(){this.change.emit(new iR(this,this._value))}_isRippleDisabled(){return this.disableRipple||this.disabled}_onInputClick(t){t.stopPropagation()}_onInputChange(t){t.stopPropagation();const e=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),e&&this.radioGroup._emitChangeEvent())}_setDisabled(t){this._disabled!==t&&(this._disabled=t,this._changeDetector.markForCheck())}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(rR),r.Pb(r.l),r.Pb(r.h),r.Pb(qi),r.Pb(Jn),r.Pb(String),r.Pb(void 0),r.Pb(String))},t.\u0275dir=r.Kb({type:t,viewQuery:function(t,e){if(1&t&&r.Pc(YT,1),2&t){let t;r.vc(t=r.dc())&&(e._inputElement=t.first)}},inputs:{id:"id",checked:"checked",value:"value",labelPosition:"labelPosition",disabled:"disabled",required:"required",color:"color",name:"name",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"]},outputs:{change:"change"},features:[r.Ab]}),t})(),hR=(()=>{class t extends cR{constructor(t,e,i,n,r,s,o,a){super(t,e,i,n,r,s,o,a)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(nR,8),r.Pb(r.l),r.Pb(r.h),r.Pb(qi),r.Pb(Jn),r.Pb(pa,8),r.Pb(JT,8),r.ac("tabindex"))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-radio-button"]],hostAttrs:[1,"mat-radio-button"],hostVars:17,hostBindings:function(t,e){1&t&&r.cc("focus",function(){return e._inputElement.nativeElement.focus()}),2&t&&(r.Eb("tabindex",null)("id",e.id)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),r.Hb("mat-radio-checked",e.checked)("mat-radio-disabled",e.disabled)("_mat-animation-noopable","NoopAnimations"===e._animationMode)("mat-primary","primary"===e.color)("mat-accent","accent"===e.color)("mat-warn","warn"===e.color))},inputs:{disableRipple:"disableRipple",tabIndex:"tabIndex"},exportAs:["matRadioButton"],features:[r.Ab],ngContentSelectors:XT,decls:13,vars:19,consts:[[1,"mat-radio-label"],["label",""],[1,"mat-radio-container"],[1,"mat-radio-outer-circle"],[1,"mat-radio-inner-circle"],["type","radio",1,"mat-radio-input","cdk-visually-hidden",3,"id","checked","disabled","tabIndex","required","change","click"],["input",""],["mat-ripple","",1,"mat-radio-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered","matRippleRadius","matRippleAnimation"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[1,"mat-radio-label-content"],[2,"display","none"]],template:function(t,e){if(1&t&&(r.mc(),r.Vb(0,"label",0,1),r.Vb(2,"span",2),r.Qb(3,"span",3),r.Qb(4,"span",4),r.Vb(5,"input",5,6),r.cc("change",function(t){return e._onInputChange(t)})("click",function(t){return e._onInputClick(t)}),r.Ub(),r.Vb(7,"span",7),r.Qb(8,"span",8),r.Ub(),r.Ub(),r.Vb(9,"span",9),r.Vb(10,"span",10),r.Kc(11,"\xa0"),r.Ub(),r.lc(12),r.Ub(),r.Ub()),2&t){const t=r.wc(1);r.Eb("for",e.inputId),r.Db(5),r.nc("id",e.inputId)("checked",e.checked)("disabled",e.disabled)("tabIndex",e.tabIndex)("required",e.required),r.Eb("name",e.name)("value",e.value)("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby)("aria-describedby",e.ariaDescribedby),r.Db(2),r.nc("matRippleTrigger",t)("matRippleDisabled",e._isRippleDisabled())("matRippleCentered",!0)("matRippleRadius",20)("matRippleAnimation",r.rc(18,QT)),r.Db(2),r.Hb("mat-radio-label-before","before"==e.labelPosition)}},directives:[il],styles:[".mat-radio-button{display:inline-block;-webkit-tap-highlight-color:transparent;outline:0}.mat-radio-label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap;vertical-align:middle;width:100%}.mat-radio-container{box-sizing:border-box;display:inline-block;position:relative;width:20px;height:20px;flex-shrink:0}.mat-radio-outer-circle{box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;transition:border-color ease 280ms;width:20px;border-width:2px;border-style:solid;border-radius:50%}._mat-animation-noopable .mat-radio-outer-circle{transition:none}.mat-radio-inner-circle{border-radius:50%;box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;transition:transform ease 280ms,background-color ease 280ms;width:20px;transform:scale(0.001)}._mat-animation-noopable .mat-radio-inner-circle{transition:none}.mat-radio-checked .mat-radio-inner-circle{transform:scale(0.5)}.cdk-high-contrast-active .mat-radio-checked .mat-radio-inner-circle{border:solid 10px}.mat-radio-label-content{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto;display:inline-block;order:0;line-height:inherit;padding-left:8px;padding-right:0}[dir=rtl] .mat-radio-label-content{padding-right:8px;padding-left:0}.mat-radio-label-content.mat-radio-label-before{order:-1;padding-left:0;padding-right:8px}[dir=rtl] .mat-radio-label-content.mat-radio-label-before{padding-right:0;padding-left:8px}.mat-radio-disabled,.mat-radio-disabled .mat-radio-label{cursor:default}.mat-radio-button .mat-radio-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-radio-button .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple){opacity:.16}.mat-radio-persistent-ripple{width:100%;height:100%;transform:none}.mat-radio-container:hover .mat-radio-persistent-ripple{opacity:.04}.mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-persistent-ripple,.mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-persistent-ripple{opacity:.12}.mat-radio-persistent-ripple,.mat-radio-disabled .mat-radio-container:hover .mat-radio-persistent-ripple{opacity:0}@media(hover: none){.mat-radio-container:hover .mat-radio-persistent-ripple{display:none}}.mat-radio-input{bottom:0;left:50%}.cdk-high-contrast-active .mat-radio-disabled{opacity:.5}\n"],encapsulation:2,changeDetection:0}),t})(),uR=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[nl,Sa],Sa]}),t})(),dR=(()=>{class t{constructor(t){this.viewContainerRef=t}ngOnInit(){const t=this.viewContainerRef.element.nativeElement;t.addEventListener("click",()=>Object(ue.a)(this,void 0,void 0,function*(){const e=Date.now();t.disabled=!0,t.style.width=`${t.offsetWidth}px`,t.style.height=`${t.offsetHeight}px`;const i=t.children[0].innerHTML;t.children[0].innerHTML='\n<mat-spinner role="progressbar" mode="indeterminate" class="async-button">\n <svg class="async-button__svg" preserveAspectRatio="xMidYMid meet" focusable="false" viewBox="0 0 16.4 16.4">\n <circle class="async-button__circle" cx="50%" cy="50%" r="7">\n </circle>\n </svg>\n</mat-spinner>';try{yield this.action()}finally{const n=Date.now()-e;n<300&&(yield PD(300-n)),t.children[0].innerHTML=i,t.style.width="",t.style.height="",t.disabled=!1}}))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.S))},t.\u0275dir=r.Kb({type:t,selectors:[["","app-async-action",""]],inputs:{action:["app-async-action","action"]}}),t})();const pR=["class","page"];function fR(t,e){if(1&t&&(r.Vb(0,"div"),r.Kc(1),r.Vb(2,"button",11),r.Kc(3,"Terminer"),r.Ub(),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Nc(" Maintenance active ",t.maintenance.message," - ",t.maintenance.type," "),r.Db(1),r.nc("app-async-action",t.removeMaintenance)}}function mR(t,e){1&t&&(r.Vb(0,"div"),r.Kc(1," Aucune maintenance active\n"),r.Ub())}function gR(t,e){1&t&&(r.Vb(0,"mat-error"),r.Kc(1,"Le message est obligatoire"),r.Ub())}let AR=(()=>{class t{constructor(t,e,i){this.formBuilder=t,this.workerService=e,this.authenticationService=i,this.AppMaintenanceType=qT,this.setMaintenance=()=>Object(ue.a)(this,void 0,void 0,function*(){this.maintenanceForm.valid&&(yield this.workerService.application.enableMaintenanceMode({message:this.maintenanceForm.controls.message.value,type:this.maintenanceForm.controls.type.value}),yield this.workerService.application.refreshHealthState())}),this.removeMaintenance=()=>Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.application.disableMaintenanceMode(),yield this.workerService.application.refreshHealthState()})}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.maintenanceForm=this.formBuilder.group({message:["",[pc.required]],type:[qT.Planned,[pc.required]]}),this.workerService.applicationHealth$.subscribe(t=>{this.maintenance=null==t?void 0:t.maintenance})})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Lh),r.Pb(_I.a),r.Pb(yI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-maintenance",8,"page"]],attrs:pR,decls:22,vars:8,consts:[[1,"mat-h1"],[4,"ngIf"],[1,"mat-h2","mt-3"],[3,"formGroup"],[1,"d-block"],["matInput","","placeholder","...","formControlName","message","required",""],[1,"d-flex"],[1,"mr-2"],["formControlName","type"],["color","primary",3,"value"],["mat-raised-button","","color","primary",1,"mt-2",3,"app-async-action","disabled"],["mat-raised-button","","color","primary",3,"app-async-action"]],template:function(t,e){1&t&&(r.Vb(0,"h1",0),r.Kc(1,"Maintenance"),r.Ub(),r.Ic(2,fR,4,3,"div",1),r.Ic(3,mR,2,0,"div",1),r.Vb(4,"h2",2),r.Kc(5,"D\xe9finir un message de maintenance"),r.Ub(),r.Vb(6,"form",3),r.Vb(7,"mat-form-field",4),r.Vb(8,"mat-label"),r.Kc(9,"Message"),r.Ub(),r.Qb(10,"input",5),r.Ic(11,gR,2,0,"mat-error",1),r.Ub(),r.Vb(12,"div",6),r.Vb(13,"label",7),r.Kc(14,"Type :"),r.Ub(),r.Vb(15,"mat-radio-group",8),r.Vb(16,"mat-radio-button",9),r.Kc(17,"Planifi\xe9e (message informatif seulement)"),r.Ub(),r.Vb(18,"mat-radio-button",9),r.Kc(19,"En cours (d\xe9connecte l'API de la base de donn\xe9es)"),r.Ub(),r.Ub(),r.Ub(),r.Vb(20,"button",10),r.Kc(21,"D\xe9finir"),r.Ub(),r.Ub()),2&t&&(r.Db(2),r.nc("ngIf",e.maintenance),r.Db(1),r.nc("ngIf",!e.maintenance),r.Db(3),r.nc("formGroup",e.maintenanceForm),r.Db(5),r.nc("ngIf",e.maintenanceForm.get("message").hasError("required")),r.Db(5),r.nc("value",e.AppMaintenanceType.Planned),r.Db(2),r.nc("value",e.AppMaintenanceType.InProgress),r.Db(2),r.nc("app-async-action",e.setMaintenance)("disabled",!e.maintenanceForm.valid))},directives:[ut,dh,Fc,_h,_u,cu,Ou,ac,Vc,Eh,Ih,sR,hR,Dl,dR,nu],styles:[".mat-radio-button[_ngcontent-%COMP%]{display:block;margin-bottom:.5em}"]}),t})();const bR=["mat-sort-header",""];function vR(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",3),r.cc("@arrowPosition.start",function(){return r.Ac(t),r.gc()._disableViewStateAnimation=!0})("@arrowPosition.done",function(){return r.Ac(t),r.gc()._disableViewStateAnimation=!1}),r.Qb(1,"div",4),r.Vb(2,"div",5),r.Qb(3,"div",6),r.Qb(4,"div",7),r.Qb(5,"div",8),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.nc("@arrowOpacity",t._getArrowViewState())("@arrowPosition",t._getArrowViewState())("@allowChildren",t._getArrowDirectionState()),r.Db(2),r.nc("@indicator",t._getArrowDirectionState()),r.Db(1),r.nc("@leftPointer",t._getArrowDirectionState()),r.Db(1),r.nc("@rightPointer",t._getArrowDirectionState())}}const _R=["*"],yR=new r.s("MAT_SORT_DEFAULT_OPTIONS");class wR{}const xR=Oa(ka(wR));let CR=(()=>{class t extends xR{constructor(t){super(),this._defaultOptions=t,this.sortables=new Map,this._stateChanges=new _e.a,this.start="asc",this._direction="",this.sortChange=new r.o}get direction(){return this._direction}set direction(t){this._direction=t}get disableClear(){return this._disableClear}set disableClear(t){this._disableClear=ti(t)}register(t){this.sortables.set(t.id,t)}deregister(t){this.sortables.delete(t.id)}sort(t){this.active!=t.id?(this.active=t.id,this.direction=t.start?t.start:this.start):this.direction=this.getNextSortDirection(t),this.sortChange.emit({active:this.active,direction:this.direction})}getNextSortDirection(t){var e,i,n;if(!t)return"";const r=null!==(i=null!==(e=null==t?void 0:t.disableClear)&&void 0!==e?e:this.disableClear)&&void 0!==i?i:!!(null===(n=this._defaultOptions)||void 0===n?void 0:n.disableClear);let s=function(t,e){let i=["asc","desc"];return"desc"==t&&i.reverse(),e||i.push(""),i}(t.start||this.start,r),o=s.indexOf(this.direction)+1;return o>=s.length&&(o=0),s[o]}ngOnInit(){this._markInitialized()}ngOnChanges(){this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(yR,8))},t.\u0275dir=r.Kb({type:t,selectors:[["","matSort",""]],hostAttrs:[1,"mat-sort"],inputs:{disabled:["matSortDisabled","disabled"],start:["matSortStart","start"],direction:["matSortDirection","direction"],disableClear:["matSortDisableClear","disableClear"],active:["matSortActive","active"]},outputs:{sortChange:"matSortChange"},exportAs:["matSort"],features:[r.Ab,r.Bb]}),t})();const SR=wa.ENTERING+" "+ya.STANDARD_CURVE,kR={indicator:$r("indicator",[qr("active-asc, asc",Zr({transform:"translateY(0px)"})),qr("active-desc, desc",Zr({transform:"translateY(10px)"})),Qr("active-asc <=> active-desc",Gr(SR))]),leftPointer:$r("leftPointer",[qr("active-asc, asc",Zr({transform:"rotate(-45deg)"})),qr("active-desc, desc",Zr({transform:"rotate(45deg)"})),Qr("active-asc <=> active-desc",Gr(SR))]),rightPointer:$r("rightPointer",[qr("active-asc, asc",Zr({transform:"rotate(45deg)"})),qr("active-desc, desc",Zr({transform:"rotate(-45deg)"})),Qr("active-asc <=> active-desc",Gr(SR))]),arrowOpacity:$r("arrowOpacity",[qr("desc-to-active, asc-to-active, active",Zr({opacity:1})),qr("desc-to-hint, asc-to-hint, hint",Zr({opacity:.54})),qr("hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc, void",Zr({opacity:0})),Qr("* => asc, * => desc, * => active, * => hint, * => void",Gr("0ms")),Qr("* <=> *",Gr(SR))]),arrowPosition:$r("arrowPosition",[Qr("* => desc-to-hint, * => desc-to-active",Gr(SR,Yr([Zr({transform:"translateY(-25%)"}),Zr({transform:"translateY(0)"})]))),Qr("* => hint-to-desc, * => active-to-desc",Gr(SR,Yr([Zr({transform:"translateY(0)"}),Zr({transform:"translateY(25%)"})]))),Qr("* => asc-to-hint, * => asc-to-active",Gr(SR,Yr([Zr({transform:"translateY(25%)"}),Zr({transform:"translateY(0)"})]))),Qr("* => hint-to-asc, * => active-to-asc",Gr(SR,Yr([Zr({transform:"translateY(0)"}),Zr({transform:"translateY(-25%)"})]))),qr("desc-to-hint, asc-to-hint, hint, desc-to-active, asc-to-active, active",Zr({transform:"translateY(0)"})),qr("hint-to-desc, active-to-desc, desc",Zr({transform:"translateY(-25%)"})),qr("hint-to-asc, active-to-asc, asc",Zr({transform:"translateY(25%)"}))]),allowChildren:$r("allowChildren",[Qr("* <=> *",[Jr("@*",Xr(),{optional:!0})])])};let ER=(()=>{class t{constructor(){this.changes=new _e.a,this.sortButtonLabel=t=>`Change sorting for ${t}`}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(r.Lb)({factory:function(){return new t},token:t,providedIn:"root"}),t})();const DR={provide:ER,deps:[[new r.C,new r.M,ER]],useFactory:function(t){return t||new ER}};class IR{}const PR=ka(IR);let OR=(()=>{class t extends PR{constructor(t,e,i,n,r,s){super(),this._intl=t,this._changeDetectorRef=e,this._sort=i,this._columnDef=n,this._focusMonitor=r,this._elementRef=s,this._showIndicatorHint=!1,this._arrowDirection="",this._disableViewStateAnimation=!1,this.arrowPosition="after",this._handleStateChanges()}get disableClear(){return this._disableClear}set disableClear(t){this._disableClear=ti(t)}ngOnInit(){!this.id&&this._columnDef&&(this.id=this._columnDef.name),this._updateArrowDirection(),this._setAnimationTransitionState({toState:this._isSorted()?"active":this._arrowDirection}),this._sort.register(this)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{const e=!!t;e!==this._showIndicatorHint&&(this._setIndicatorHintVisible(e),this._changeDetectorRef.markForCheck())})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._sort.deregister(this),this._rerenderSubscription.unsubscribe()}_setIndicatorHintVisible(t){this._isDisabled()&&t||(this._showIndicatorHint=t,this._isSorted()||(this._updateArrowDirection(),this._setAnimationTransitionState(this._showIndicatorHint?{fromState:this._arrowDirection,toState:"hint"}:{fromState:"hint",toState:this._arrowDirection})))}_setAnimationTransitionState(t){this._viewState=t,this._disableViewStateAnimation&&(this._viewState={toState:t.toState})}_toggleOnInteraction(){this._sort.sort(this),"hint"!==this._viewState.toState&&"active"!==this._viewState.toState||(this._disableViewStateAnimation=!0)}_handleClick(){this._isDisabled()||this._sort.sort(this)}_handleKeydown(t){this._isDisabled()||32!==t.keyCode&&13!==t.keyCode||(t.preventDefault(),this._toggleOnInteraction())}_isSorted(){return this._sort.active==this.id&&("asc"===this._sort.direction||"desc"===this._sort.direction)}_getArrowDirectionState(){return`${this._isSorted()?"active-":""}${this._arrowDirection}`}_getArrowViewState(){const t=this._viewState.fromState;return(t?`${t}-to-`:"")+this._viewState.toState}_updateArrowDirection(){this._arrowDirection=this._isSorted()?this._sort.direction:this.start||this._sort.start}_isDisabled(){return this._sort.disabled||this.disabled}_getAriaSortAttribute(){return this._isSorted()?"asc"==this._sort.direction?"ascending":"descending":"none"}_renderArrow(){return!this._isDisabled()||this._isSorted()}_handleStateChanges(){this._rerenderSubscription=Object(or.a)(this._sort.sortChange,this._sort._stateChanges,this._intl.changes).subscribe(()=>{this._isSorted()&&(this._updateArrowDirection(),"hint"!==this._viewState.toState&&"active"!==this._viewState.toState||(this._disableViewStateAnimation=!0),this._setAnimationTransitionState({fromState:this._arrowDirection,toState:"active"}),this._showIndicatorHint=!1),!this._isSorted()&&this._viewState&&"active"===this._viewState.toState&&(this._disableViewStateAnimation=!1,this._setAnimationTransitionState({fromState:"active",toState:this._arrowDirection})),this._changeDetectorRef.markForCheck()})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(ER),r.Pb(r.h),r.Pb(CR,8),r.Pb("MAT_SORT_HEADER_COLUMN_DEF",8),r.Pb(qi),r.Pb(r.l))},t.\u0275cmp=r.Jb({type:t,selectors:[["","mat-sort-header",""]],hostAttrs:[1,"mat-sort-header"],hostVars:3,hostBindings:function(t,e){1&t&&r.cc("click",function(){return e._handleClick()})("keydown",function(t){return e._handleKeydown(t)})("mouseenter",function(){return e._setIndicatorHintVisible(!0)})("mouseleave",function(){return e._setIndicatorHintVisible(!1)}),2&t&&(r.Eb("aria-sort",e._getAriaSortAttribute()),r.Hb("mat-sort-header-disabled",e._isDisabled()))},inputs:{disabled:"disabled",arrowPosition:"arrowPosition",disableClear:"disableClear",id:["mat-sort-header","id"],start:"start"},exportAs:["matSortHeader"],features:[r.Ab],attrs:bR,ngContentSelectors:_R,decls:4,vars:6,consts:[["role","button",1,"mat-sort-header-container","mat-focus-indicator"],[1,"mat-sort-header-content"],["class","mat-sort-header-arrow",4,"ngIf"],[1,"mat-sort-header-arrow"],[1,"mat-sort-header-stem"],[1,"mat-sort-header-indicator"],[1,"mat-sort-header-pointer-left"],[1,"mat-sort-header-pointer-right"],[1,"mat-sort-header-pointer-middle"]],template:function(t,e){1&t&&(r.mc(),r.Vb(0,"div",0),r.Vb(1,"div",1),r.lc(2),r.Ub(),r.Ic(3,vR,6,6,"div",2),r.Ub()),2&t&&(r.Hb("mat-sort-header-sorted",e._isSorted())("mat-sort-header-position-before","before"==e.arrowPosition),r.Eb("tabindex",e._isDisabled()?null:0),r.Db(3),r.nc("ngIf",e._renderArrow()))},directives:[ut],styles:[".mat-sort-header-container{display:flex;cursor:pointer;align-items:center;letter-spacing:normal;outline:0}[mat-sort-header].cdk-keyboard-focused .mat-sort-header-container,[mat-sort-header].cdk-program-focused .mat-sort-header-container{border-bottom:solid 1px currentColor}.mat-sort-header-disabled .mat-sort-header-container{cursor:default}.mat-sort-header-content{text-align:center;display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}.mat-sort-header-arrow{height:12px;width:12px;min-width:12px;position:relative;display:flex;opacity:0}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}.mat-sort-header-stem{background:currentColor;height:10px;width:2px;margin:auto;display:flex;align-items:center}.cdk-high-contrast-active .mat-sort-header-stem{width:0;border-left:solid 2px}.mat-sort-header-indicator{width:100%;height:2px;display:flex;align-items:center;position:absolute;top:0;left:0}.mat-sort-header-pointer-middle{margin:auto;height:2px;width:2px;background:currentColor;transform:rotate(45deg)}.cdk-high-contrast-active .mat-sort-header-pointer-middle{width:0;height:0;border-top:solid 2px;border-left:solid 2px}.mat-sort-header-pointer-left,.mat-sort-header-pointer-right{background:currentColor;width:6px;height:2px;position:absolute;top:0}.cdk-high-contrast-active .mat-sort-header-pointer-left,.cdk-high-contrast-active .mat-sort-header-pointer-right{width:0;height:0;border-left:solid 6px;border-top:solid 2px}.mat-sort-header-pointer-left{transform-origin:right;left:0}.mat-sort-header-pointer-right{transform-origin:left;right:0}\n"],encapsulation:2,data:{animation:[kR.indicator,kR.leftPointer,kR.rightPointer,kR.arrowOpacity,kR.arrowPosition,kR.allowChildren]},changeDetection:0}),t})(),MR=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[DR],imports:[[Et,Sa]]}),t})();const TR=[[["caption"]],[["colgroup"],["col"]]],RR=["caption","colgroup, col"];function VR(t){return class extends t{constructor(...t){super(...t),this._sticky=!1,this._hasStickyChanged=!1}get sticky(){return this._sticky}set sticky(t){const e=this._sticky;this._sticky=ti(t),this._hasStickyChanged=e!==this._sticky}hasStickyChanged(){const t=this._hasStickyChanged;return this._hasStickyChanged=!1,t}resetStickyChanged(){this._hasStickyChanged=!1}}}const FR=new r.s("CDK_TABLE");let LR=(()=>{class t{constructor(t){this.template=t}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.O))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdkCellDef",""]]}),t})(),UR=(()=>{class t{constructor(t){this.template=t}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.O))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdkHeaderCellDef",""]]}),t})(),BR=(()=>{class t{constructor(t){this.template=t}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.O))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdkFooterCellDef",""]]}),t})();class NR{}const jR=VR(NR);let zR=(()=>{class t extends jR{constructor(t){super(),this._table=t,this._stickyEnd=!1}get name(){return this._name}set name(t){this._setNameInput(t)}get stickyEnd(){return this._stickyEnd}set stickyEnd(t){const e=this._stickyEnd;this._stickyEnd=ti(t),this._hasStickyChanged=e!==this._stickyEnd}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`]}_setNameInput(t){t&&(this._name=t,this.cssClassFriendlyName=t.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName())}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(FR,8))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdkColumnDef",""]],contentQueries:function(t,e,i){if(1&t&&(r.Ib(i,LR,1),r.Ib(i,UR,1),r.Ib(i,BR,1)),2&t){let t;r.vc(t=r.dc())&&(e.cell=t.first),r.vc(t=r.dc())&&(e.headerCell=t.first),r.vc(t=r.dc())&&(e.footerCell=t.first)}},inputs:{sticky:"sticky",name:["cdkColumnDef","name"],stickyEnd:"stickyEnd"},features:[r.Cb([{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:t}]),r.Ab]}),t})();class HR{constructor(t,e){const i=e.nativeElement.classList;for(const n of t._columnCssClassName)i.add(n)}}let KR=(()=>{class t extends HR{constructor(t,e){super(t,e)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(zR),r.Pb(r.l))},t.\u0275dir=r.Kb({type:t,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[r.Ab]}),t})(),$R=(()=>{class t extends HR{constructor(t,e){super(t,e)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(zR),r.Pb(r.l))},t.\u0275dir=r.Kb({type:t,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:["role","gridcell",1,"cdk-cell"],features:[r.Ab]}),t})();class GR{constructor(){this.tasks=[],this.endTasks=[]}}const WR=new r.s("_COALESCED_STYLE_SCHEDULER");let ZR=(()=>{class t{constructor(t){this._ngZone=t,this._currentSchedule=null,this._destroyed=new _e.a}schedule(t){this._createScheduleIfNeeded(),this._currentSchedule.tasks.push(t)}scheduleEnd(t){this._createScheduleIfNeeded(),this._currentSchedule.endTasks.push(t)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_createScheduleIfNeeded(){this._currentSchedule||(this._currentSchedule=new GR,this._getScheduleObservable().pipe(Sn(this._destroyed)).subscribe(()=>{for(;this._currentSchedule.tasks.length||this._currentSchedule.endTasks.length;){const t=this._currentSchedule;this._currentSchedule=new GR;for(const e of t.tasks)e();for(const e of t.endTasks)e()}this._currentSchedule=null}))}_getScheduleObservable(){return this._ngZone.isStable?Object(On.a)(Promise.resolve(void 0)):this._ngZone.onStable.pipe(Qe(1))}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.B))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),qR=(()=>{class t{constructor(t,e){this.template=t,this._differs=e}ngOnChanges(t){if(!this._columnsDiffer){const e=t.columns&&t.columns.currentValue||[];this._columnsDiffer=this._differs.find(e).create(),this._columnsDiffer.diff(e)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(t){return this instanceof XR?t.headerCell.template:this instanceof eV?t.footerCell.template:t.cell.template}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.O),r.Pb(r.u))},t.\u0275dir=r.Kb({type:t,features:[r.Bb]}),t})();class YR extends qR{}const QR=VR(YR);let XR=(()=>{class t extends QR{constructor(t,e,i){super(t,e),this._table=i}ngOnChanges(t){super.ngOnChanges(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.O),r.Pb(r.u),r.Pb(FR,8))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:["cdkHeaderRowDef","columns"],sticky:["cdkHeaderRowDefSticky","sticky"]},features:[r.Ab,r.Bb]}),t})();class JR extends qR{}const tV=VR(JR);let eV=(()=>{class t extends tV{constructor(t,e,i){super(t,e),this._table=i}ngOnChanges(t){super.ngOnChanges(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.O),r.Pb(r.u),r.Pb(FR,8))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:["cdkFooterRowDef","columns"],sticky:["cdkFooterRowDefSticky","sticky"]},features:[r.Ab,r.Bb]}),t})(),iV=(()=>{class t extends qR{constructor(t,e,i){super(t,e),this._table=i}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.O),r.Pb(r.u),r.Pb(FR,8))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdkRowDef",""]],inputs:{columns:["cdkRowDefColumns","columns"],when:["cdkRowDefWhen","when"]},features:[r.Ab]}),t})(),nV=(()=>{class t{constructor(e){this._viewContainer=e,t.mostRecentCellOutlet=this}ngOnDestroy(){t.mostRecentCellOutlet===this&&(t.mostRecentCellOutlet=null)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.S))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdkCellOutlet",""]]}),t.mostRecentCellOutlet=null,t})(),rV=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,e){1&t&&r.Rb(0,0)},directives:[nV],encapsulation:2}),t})(),sV=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,e){1&t&&r.Rb(0,0)},directives:[nV],encapsulation:2}),t})(),oV=(()=>{class t{constructor(t){this.templateRef=t}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.O))},t.\u0275dir=r.Kb({type:t,selectors:[["ng-template","cdkNoDataRow",""]]}),t})();const aV=["top","bottom","left","right"];class lV{constructor(t,e,i,n,r=!0,s=!0,o){this._isNativeHtmlTable=t,this._stickCellCss=e,this.direction=i,this._coalescedStyleScheduler=n,this._isBrowser=r,this._needsPositionStickyOnElement=s,this._positionListener=o,this._cachedCellWidths=[],this._borderCellCss={top:`${e}-border-elem-top`,bottom:`${e}-border-elem-bottom`,left:`${e}-border-elem-left`,right:`${e}-border-elem-right`}}clearStickyPositioning(t,e){const i=[];for(const n of t)if(n.nodeType===n.ELEMENT_NODE){i.push(n);for(let t=0;t<n.children.length;t++)i.push(n.children[t])}this._scheduleStyleChanges(()=>{for(const t of i)this._removeStickyStyle(t,e)})}updateStickyColumns(t,e,i,n=!0){if(!t.length||!this._isBrowser||!e.some(t=>t)&&!i.some(t=>t))return void(this._positionListener&&(this._positionListener.stickyColumnsUpdated({sizes:[]}),this._positionListener.stickyEndColumnsUpdated({sizes:[]})));const r=t[0],s=r.children.length,o=this._getCellWidths(r,n),a=this._getStickyStartColumnPositions(o,e),l=this._getStickyEndColumnPositions(o,i),c=e.lastIndexOf(!0),h=i.indexOf(!0);this._scheduleStyleChanges(()=>{const n="rtl"===this.direction,r=n?"right":"left",u=n?"left":"right";for(const o of t)for(let t=0;t<s;t++){const n=o.children[t];e[t]&&this._addStickyStyle(n,r,a[t],t===c),i[t]&&this._addStickyStyle(n,u,l[t],t===h)}this._positionListener&&(this._positionListener.stickyColumnsUpdated({sizes:-1===c?[]:o.slice(0,c+1).map((t,i)=>e[i]?t:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:-1===h?[]:o.slice(h).map((t,e)=>i[e+h]?t:null).reverse()}))})}stickRows(t,e,i){if(!this._isBrowser)return;const n="bottom"===i?t.slice().reverse():t,r="bottom"===i?e.slice().reverse():e,s=[],o=[],a=[];for(let c=0,h=0;c<n.length;c++){if(s[c]=h,!r[c])continue;const t=n[c];a[c]=this._isNativeHtmlTable?Array.from(t.children):[t];const e=t.getBoundingClientRect().height;h+=e,o[c]=e}const l=r.lastIndexOf(!0);this._scheduleStyleChanges(()=>{var t,e;for(let o=0;o<n.length;o++){if(!r[o])continue;const t=s[o],e=o===l;for(const n of a[o])this._addStickyStyle(n,i,t,e)}"top"===i?null===(t=this._positionListener)||void 0===t||t.stickyHeaderRowsUpdated({sizes:o,elements:a}):null===(e=this._positionListener)||void 0===e||e.stickyFooterRowsUpdated({sizes:o,elements:a})})}updateStickyFooterContainer(t,e){if(!this._isNativeHtmlTable)return;const i=t.querySelector("tfoot");this._scheduleStyleChanges(()=>{e.some(t=>!t)?this._removeStickyStyle(i,["bottom"]):this._addStickyStyle(i,"bottom",0,!1)})}_removeStickyStyle(t,e){for(const i of e)t.style[i]="",t.classList.remove(this._borderCellCss[i]);aV.some(i=>-1===e.indexOf(i)&&t.style[i])?t.style.zIndex=this._getCalculatedZIndex(t):(t.style.zIndex="",this._needsPositionStickyOnElement&&(t.style.position=""),t.classList.remove(this._stickCellCss))}_addStickyStyle(t,e,i,n){t.classList.add(this._stickCellCss),n&&t.classList.add(this._borderCellCss[e]),t.style[e]=`${i}px`,t.style.zIndex=this._getCalculatedZIndex(t),this._needsPositionStickyOnElement&&(t.style.cssText+="position: -webkit-sticky; position: sticky; ")}_getCalculatedZIndex(t){const e={top:100,bottom:10,left:1,right:1};let i=0;for(const n of aV)t.style[n]&&(i+=e[n]);return i?`${i}`:""}_getCellWidths(t,e=!0){if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;const i=[],n=t.children;for(let r=0;r<n.length;r++)i.push(n[r].getBoundingClientRect().width);return this._cachedCellWidths=i,i}_getStickyStartColumnPositions(t,e){const i=[];let n=0;for(let r=0;r<t.length;r++)e[r]&&(i[r]=n,n+=t[r]);return i}_getStickyEndColumnPositions(t,e){const i=[];let n=0;for(let r=t.length;r>0;r--)e[r]&&(i[r]=n,n+=t[r]);return i}_scheduleStyleChanges(t){this._coalescedStyleScheduler?this._coalescedStyleScheduler.schedule(t):t()}}const cV=new r.s("CDK_SPL");let hV=(()=>{class t{constructor(t,e){this.viewContainer=t,this.elementRef=e}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.S),r.Pb(r.l))},t.\u0275dir=r.Kb({type:t,selectors:[["","rowOutlet",""]]}),t})(),uV=(()=>{class t{constructor(t,e){this.viewContainer=t,this.elementRef=e}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.S),r.Pb(r.l))},t.\u0275dir=r.Kb({type:t,selectors:[["","headerRowOutlet",""]]}),t})(),dV=(()=>{class t{constructor(t,e){this.viewContainer=t,this.elementRef=e}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.S),r.Pb(r.l))},t.\u0275dir=r.Kb({type:t,selectors:[["","footerRowOutlet",""]]}),t})(),pV=(()=>{class t{constructor(t,e){this.viewContainer=t,this.elementRef=e}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.S),r.Pb(r.l))},t.\u0275dir=r.Kb({type:t,selectors:[["","noDataRowOutlet",""]]}),t})(),fV=(()=>{class t{constructor(t,e,i,n,r,s,o,a,l,c,h){this._differs=t,this._changeDetectorRef=e,this._elementRef=i,this._dir=r,this._platform=o,this._viewRepeater=a,this._coalescedStyleScheduler=l,this._stickyPositioningListener=c,this._viewportRuler=h,this._onDestroy=new _e.a,this._columnDefsByName=new Map,this._customColumnDefs=new Set,this._customRowDefs=new Set,this._customHeaderRowDefs=new Set,this._customFooterRowDefs=new Set,this._headerRowDefChanged=!0,this._footerRowDefChanged=!0,this._stickyColumnStylesNeedReset=!0,this._forceRecalculateCellWidths=!0,this._cachedRenderRowsMap=new Map,this.stickyCssClass="cdk-table-sticky",this.needsPositionStickyOnElement=!0,this._isShowingNoDataRow=!1,this._multiTemplateDataRows=!1,this._fixedLayout=!1,this.viewChange=new Av.a({start:0,end:Number.MAX_VALUE}),n||this._elementRef.nativeElement.setAttribute("role","grid"),this._document=s,this._isNativeHtmlTable="TABLE"===this._elementRef.nativeElement.nodeName}get trackBy(){return this._trackByFn}set trackBy(t){this._trackByFn=t}get dataSource(){return this._dataSource}set dataSource(t){this._dataSource!==t&&this._switchDataSource(t)}get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(t){this._multiTemplateDataRows=ti(t),this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())}get fixedLayout(){return this._fixedLayout}set fixedLayout(t){this._fixedLayout=ti(t),this._forceRecalculateCellWidths=!0,this._stickyColumnStylesNeedReset=!0}ngOnInit(){this._setupStickyStyler(),this._isNativeHtmlTable&&this._applyNativeTableSections(),this._dataDiffer=this._differs.find([]).create((t,e)=>this.trackBy?this.trackBy(e.dataIndex,e.data):e),this._viewportRuler&&this._viewportRuler.change().pipe(Sn(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=!0})}ngAfterContentChecked(){this._cacheRowDefs(),this._cacheColumnDefs();const t=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||t,this._forceRecalculateCellWidths=t,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates()}ngOnDestroy(){this._rowOutlet.viewContainer.clear(),this._noDataRowOutlet.viewContainer.clear(),this._headerRowOutlet.viewContainer.clear(),this._footerRowOutlet.viewContainer.clear(),this._cachedRenderRowsMap.clear(),this._onDestroy.next(),this._onDestroy.complete(),Yn(this.dataSource)&&this.dataSource.disconnect(this)}renderRows(){this._renderRows=this._getAllRenderRows();const t=this._dataDiffer.diff(this._renderRows);if(!t)return void this._updateNoDataRow();const e=this._rowOutlet.viewContainer;this._viewRepeater?this._viewRepeater.applyChanges(t,e,(t,e,i)=>this._getEmbeddedViewArgs(t.item,i),t=>t.item.data,t=>{1===t.operation&&t.context&&this._renderCellTemplateForItem(t.record.item.rowDef,t.context)}):t.forEachOperation((t,i,n)=>{if(null==t.previousIndex){const e=t.item;this._renderRow(this._rowOutlet,e.rowDef,n,{$implicit:e.data})}else if(null==n)e.remove(i);else{const t=e.get(i);e.move(t,n)}}),this._updateRowIndexContext(),t.forEachIdentityChange(t=>{e.get(t.currentIndex).context.$implicit=t.item.data}),this._updateNoDataRow(),this.updateStickyColumnStyles()}addColumnDef(t){this._customColumnDefs.add(t)}removeColumnDef(t){this._customColumnDefs.delete(t)}addRowDef(t){this._customRowDefs.add(t)}removeRowDef(t){this._customRowDefs.delete(t)}addHeaderRowDef(t){this._customHeaderRowDefs.add(t),this._headerRowDefChanged=!0}removeHeaderRowDef(t){this._customHeaderRowDefs.delete(t),this._headerRowDefChanged=!0}addFooterRowDef(t){this._customFooterRowDefs.add(t),this._footerRowDefChanged=!0}removeFooterRowDef(t){this._customFooterRowDefs.delete(t),this._footerRowDefChanged=!0}setNoDataRow(t){this._customNoDataRow=t}updateStickyHeaderRowStyles(){const t=this._getRenderedRows(this._headerRowOutlet),e=this._elementRef.nativeElement.querySelector("thead");e&&(e.style.display=t.length?"":"none");const i=this._headerRowDefs.map(t=>t.sticky);this._stickyStyler.clearStickyPositioning(t,["top"]),this._stickyStyler.stickRows(t,i,"top"),this._headerRowDefs.forEach(t=>t.resetStickyChanged())}updateStickyFooterRowStyles(){const t=this._getRenderedRows(this._footerRowOutlet),e=this._elementRef.nativeElement.querySelector("tfoot");e&&(e.style.display=t.length?"":"none");const i=this._footerRowDefs.map(t=>t.sticky);this._stickyStyler.clearStickyPositioning(t,["bottom"]),this._stickyStyler.stickRows(t,i,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,i),this._footerRowDefs.forEach(t=>t.resetStickyChanged())}updateStickyColumnStyles(){const t=this._getRenderedRows(this._headerRowOutlet),e=this._getRenderedRows(this._rowOutlet),i=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this._fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...t,...e,...i],["left","right"]),this._stickyColumnStylesNeedReset=!1),t.forEach((t,e)=>{this._addStickyColumnStyles([t],this._headerRowDefs[e])}),this._rowDefs.forEach(t=>{const i=[];for(let n=0;n<e.length;n++)this._renderRows[n].rowDef===t&&i.push(e[n]);this._addStickyColumnStyles(i,t)}),i.forEach((t,e)=>{this._addStickyColumnStyles([t],this._footerRowDefs[e])}),Array.from(this._columnDefsByName.values()).forEach(t=>t.resetStickyChanged())}_getAllRenderRows(){const t=[],e=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let i=0;i<this._data.length;i++){let n=this._data[i];const r=this._getRenderRowsForData(n,i,e.get(n));this._cachedRenderRowsMap.has(n)||this._cachedRenderRowsMap.set(n,new WeakMap);for(let e=0;e<r.length;e++){let i=r[e];const n=this._cachedRenderRowsMap.get(i.data);n.has(i.rowDef)?n.get(i.rowDef).push(i):n.set(i.rowDef,[i]),t.push(i)}}return t}_getRenderRowsForData(t,e,i){return this._getRowDefs(t,e).map(n=>{const r=i&&i.has(n)?i.get(n):[];if(r.length){const t=r.shift();return t.dataIndex=e,t}return{data:t,rowDef:n,dataIndex:e}})}_cacheColumnDefs(){this._columnDefsByName.clear(),mV(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(t=>{this._columnDefsByName.has(t.name),this._columnDefsByName.set(t.name,t)})}_cacheRowDefs(){this._headerRowDefs=mV(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=mV(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=mV(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);const t=this._rowDefs.filter(t=>!t.when);this._defaultRowDef=t[0]}_renderUpdatedColumns(){const t=(t,e)=>t||!!e.getColumnsDiff(),e=this._rowDefs.reduce(t,!1);e&&this._forceRenderDataRows();const i=this._headerRowDefs.reduce(t,!1);i&&this._forceRenderHeaderRows();const n=this._footerRowDefs.reduce(t,!1);return n&&this._forceRenderFooterRows(),e||i||n}_switchDataSource(t){this._data=[],Yn(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),t||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear()),this._dataSource=t}_observeRenderChanges(){if(!this.dataSource)return;let t;var e;Yn(this.dataSource)?t=this.dataSource.connect(this):(e=this.dataSource)&&(e instanceof Ze.a||"function"==typeof e.lift&&"function"==typeof e.subscribe)?t=this.dataSource:Array.isArray(this.dataSource)&&(t=Se(this.dataSource)),this._renderChangeSubscription=t.pipe(Sn(this._onDestroy)).subscribe(t=>{this._data=t||[],this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((t,e)=>this._renderRow(this._headerRowOutlet,t,e)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((t,e)=>this._renderRow(this._footerRowOutlet,t,e)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(t,e){const i=Array.from(e.columns||[]).map(t=>this._columnDefsByName.get(t)),n=i.map(t=>t.sticky),r=i.map(t=>t.stickyEnd);this._stickyStyler.updateStickyColumns(t,n,r,!this._fixedLayout||this._forceRecalculateCellWidths)}_getRenderedRows(t){const e=[];for(let i=0;i<t.viewContainer.length;i++){const n=t.viewContainer.get(i);e.push(n.rootNodes[0])}return e}_getRowDefs(t,e){if(1==this._rowDefs.length)return[this._rowDefs[0]];let i=[];if(this.multiTemplateDataRows)i=this._rowDefs.filter(i=>!i.when||i.when(e,t));else{let n=this._rowDefs.find(i=>i.when&&i.when(e,t))||this._defaultRowDef;n&&i.push(n)}return i}_getEmbeddedViewArgs(t,e){return{templateRef:t.rowDef.template,context:{$implicit:t.data},index:e}}_renderRow(t,e,i,n={}){const r=t.viewContainer.createEmbeddedView(e.template,n,i);return this._renderCellTemplateForItem(e,n),r}_renderCellTemplateForItem(t,e){for(let i of this._getCellTemplates(t))nV.mostRecentCellOutlet&&nV.mostRecentCellOutlet._viewContainer.createEmbeddedView(i,e);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){const t=this._rowOutlet.viewContainer;for(let e=0,i=t.length;e<i;e++){const n=t.get(e).context;n.count=i,n.first=0===e,n.last=e===i-1,n.even=e%2==0,n.odd=!n.even,this.multiTemplateDataRows?(n.dataIndex=this._renderRows[e].dataIndex,n.renderIndex=e):n.index=this._renderRows[e].dataIndex}}_getCellTemplates(t){return t&&t.columns?Array.from(t.columns,e=>{const i=this._columnDefsByName.get(e);return t.extractCellTemplate(i)}):[]}_applyNativeTableSections(){const t=this._document.createDocumentFragment(),e=[{tag:"thead",outlets:[this._headerRowOutlet]},{tag:"tbody",outlets:[this._rowOutlet,this._noDataRowOutlet]},{tag:"tfoot",outlets:[this._footerRowOutlet]}];for(const i of e){const e=this._document.createElement(i.tag);e.setAttribute("role","rowgroup");for(const t of i.outlets)e.appendChild(t.elementRef.nativeElement);t.appendChild(e)}this._elementRef.nativeElement.appendChild(t)}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){const t=(t,e)=>t||e.hasStickyChanged();this._headerRowDefs.reduce(t,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(t,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(t,!1)&&(this._stickyColumnStylesNeedReset=!0,this.updateStickyColumnStyles())}_setupStickyStyler(){this._stickyStyler=new lV(this._isNativeHtmlTable,this.stickyCssClass,this._dir?this._dir.value:"ltr",this._coalescedStyleScheduler,this._platform.isBrowser,this.needsPositionStickyOnElement,this._stickyPositioningListener),(this._dir?this._dir.change:Se()).pipe(Sn(this._onDestroy)).subscribe(t=>{this._stickyStyler.direction=t,this.updateStickyColumnStyles()})}_getOwnDefs(t){return t.filter(t=>!t._table||t._table===this)}_updateNoDataRow(){const t=this._customNoDataRow||this._noDataRow;if(t){const e=0===this._rowOutlet.viewContainer.length;if(e!==this._isShowingNoDataRow){const i=this._noDataRowOutlet.viewContainer;e?i.createEmbeddedView(t.templateRef):i.clear(),this._isShowingNoDataRow=e}}}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.u),r.Pb(r.h),r.Pb(r.l),r.ac("role"),r.Pb(Zn,8),r.Pb(a),r.Pb(ci),r.Pb(tr,8),r.Pb(WR,8),r.Pb(cV,12),r.Pb(nr,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(t,e,i){if(1&t&&(r.Ib(i,oV,1),r.Ib(i,zR,1),r.Ib(i,iV,1),r.Ib(i,XR,1),r.Ib(i,eV,1)),2&t){let t;r.vc(t=r.dc())&&(e._noDataRow=t.first),r.vc(t=r.dc())&&(e._contentColumnDefs=t),r.vc(t=r.dc())&&(e._contentRowDefs=t),r.vc(t=r.dc())&&(e._contentHeaderRowDefs=t),r.vc(t=r.dc())&&(e._contentFooterRowDefs=t)}},viewQuery:function(t,e){if(1&t&&(r.Pc(hV,3),r.Pc(uV,3),r.Pc(dV,3),r.Pc(pV,3)),2&t){let t;r.vc(t=r.dc())&&(e._rowOutlet=t.first),r.vc(t=r.dc())&&(e._headerRowOutlet=t.first),r.vc(t=r.dc())&&(e._footerRowOutlet=t.first),r.vc(t=r.dc())&&(e._noDataRowOutlet=t.first)}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(t,e){2&t&&r.Hb("cdk-table-fixed-layout",e.fixedLayout)},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:"multiTemplateDataRows",fixedLayout:"fixedLayout"},exportAs:["cdkTable"],features:[r.Cb([{provide:FR,useExisting:t},{provide:tr,useClass:Qn},{provide:WR,useClass:ZR},{provide:cV,useValue:null}])],ngContentSelectors:RR,decls:6,vars:0,consts:[["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,e){1&t&&(r.mc(TR),r.lc(0),r.lc(1,1),r.Rb(2,0),r.Rb(3,1),r.Rb(4,2),r.Rb(5,3))},directives:[uV,hV,pV,dV],styles:[".cdk-table-fixed-layout{table-layout:fixed}\n"],encapsulation:2}),t})();function mV(t,e){return t.concat(Array.from(e))}let gV=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[sr]]}),t})();const AV=[[["caption"]],[["colgroup"],["col"]]],bV=["caption","colgroup, col"];let vV=(()=>{class t extends fV{constructor(){super(...arguments),this.stickyCssClass="mat-table-sticky",this.needsPositionStickyOnElement=!1}}return t.\u0275fac=function(e){return _V(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-table"],hostVars:2,hostBindings:function(t,e){2&t&&r.Hb("mat-table-fixed-layout",e.fixedLayout)},exportAs:["matTable"],features:[r.Cb([{provide:tr,useClass:Qn},{provide:fV,useExisting:t},{provide:FR,useExisting:t},{provide:WR,useClass:ZR}]),r.Ab],ngContentSelectors:bV,decls:6,vars:0,consts:[["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,e){1&t&&(r.mc(AV),r.lc(0),r.lc(1,1),r.Rb(2,0),r.Rb(3,1),r.Rb(4,2),r.Rb(5,3))},directives:[uV,hV,pV,dV],styles:['mat-table{display:block}mat-header-row{min-height:56px}mat-row,mat-footer-row{min-height:48px}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-row::after,mat-header-row::after,mat-footer-row::after{display:inline-block;min-height:inherit;content:""}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}table.mat-table{border-spacing:0}tr.mat-header-row{height:56px}tr.mat-row,tr.mat-footer-row{height:48px}th.mat-header-cell{text-align:left}[dir=rtl] th.mat-header-cell{text-align:right}th.mat-header-cell,td.mat-cell,td.mat-footer-cell{padding:0;border-bottom-width:1px;border-bottom-style:solid}th.mat-header-cell:first-of-type,td.mat-cell:first-of-type,td.mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] th.mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] td.mat-cell:first-of-type:not(:only-of-type),[dir=rtl] td.mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}th.mat-header-cell:last-of-type,td.mat-cell:last-of-type,td.mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] th.mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] td.mat-cell:last-of-type:not(:only-of-type),[dir=rtl] td.mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}.mat-table-sticky{position:-webkit-sticky !important;position:sticky !important}.mat-table-fixed-layout{table-layout:fixed}\n'],encapsulation:2}),t})();const _V=r.Xb(vV);let yV=(()=>{class t extends LR{}return t.\u0275fac=function(e){return wV(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","matCellDef",""]],features:[r.Cb([{provide:LR,useExisting:t}]),r.Ab]}),t})();const wV=r.Xb(yV);let xV=(()=>{class t extends UR{}return t.\u0275fac=function(e){return CV(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","matHeaderCellDef",""]],features:[r.Cb([{provide:UR,useExisting:t}]),r.Ab]}),t})();const CV=r.Xb(xV);let SV=(()=>{class t extends zR{get name(){return this._name}set name(t){this._setNameInput(t)}_updateColumnCssClassName(){super._updateColumnCssClassName(),this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`)}}return t.\u0275fac=function(e){return kV(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","matColumnDef",""]],inputs:{sticky:"sticky",name:["matColumnDef","name"]},features:[r.Cb([{provide:zR,useExisting:t},{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:t}]),r.Ab]}),t})();const kV=r.Xb(SV);let EV=(()=>{class t extends KR{}return t.\u0275fac=function(e){return DV(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-header-cell"],features:[r.Ab]}),t})();const DV=r.Xb(EV);let IV=(()=>{class t extends $R{}return t.\u0275fac=function(e){return PV(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:["role","gridcell",1,"mat-cell"],features:[r.Ab]}),t})();const PV=r.Xb(IV);let OV=(()=>{class t extends XR{}return t.\u0275fac=function(e){return MV(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","matHeaderRowDef",""]],inputs:{columns:["matHeaderRowDef","columns"],sticky:["matHeaderRowDefSticky","sticky"]},features:[r.Cb([{provide:XR,useExisting:t}]),r.Ab]}),t})();const MV=r.Xb(OV);let TV=(()=>{class t extends iV{}return t.\u0275fac=function(e){return RV(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","matRowDef",""]],inputs:{columns:["matRowDefColumns","columns"],when:["matRowDefWhen","when"]},features:[r.Cb([{provide:iV,useExisting:t}]),r.Ab]}),t})();const RV=r.Xb(TV);let VV=(()=>{class t extends rV{}return t.\u0275fac=function(e){return FV(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-header-row"],exportAs:["matHeaderRow"],features:[r.Cb([{provide:rV,useExisting:t}]),r.Ab],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,e){1&t&&r.Rb(0,0)},directives:[nV],encapsulation:2}),t})();const FV=r.Xb(VV);let LV=(()=>{class t extends sV{}return t.\u0275fac=function(e){return UV(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-row"],exportAs:["matRow"],features:[r.Cb([{provide:sV,useExisting:t}]),r.Ab],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,e){1&t&&r.Rb(0,0)},directives:[nV],encapsulation:2}),t})();const UV=r.Xb(LV);let BV=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[gV,Sa],Sa]}),t})();class NV extends class extends class{}{constructor(t=[]){super(),this._renderData=new Av.a([]),this._filter=new Av.a(""),this._internalPageChanges=new _e.a,this._renderChangesSubscription=null,this.sortingDataAccessor=(t,e)=>{const i=t[e];if(ii(i)){const t=Number(i);return t<9007199254740991?t:i}return i},this.sortData=(t,e)=>{const i=e.active,n=e.direction;return i&&""!=n?t.sort((t,e)=>{let r=this.sortingDataAccessor(t,i),s=this.sortingDataAccessor(e,i);const o=typeof r,a=typeof s;o!==a&&("number"===o&&(r+=""),"number"===a&&(s+=""));let l=0;return null!=r&&null!=s?r>s?l=1:r<s&&(l=-1):null!=r?l=1:null!=s&&(l=-1),l*("asc"==n?1:-1)}):t},this.filterPredicate=(t,e)=>{const i=Object.keys(t).reduce((e,i)=>e+t[i]+"\u25ec","").toLowerCase(),n=e.trim().toLowerCase();return-1!=i.indexOf(n)},this._data=new Av.a(t),this._updateChangeSubscription()}get data(){return this._data.value}set data(t){this._data.next(t),this._renderChangesSubscription||this._filterData(t)}get filter(){return this._filter.value}set filter(t){this._filter.next(t),this._renderChangesSubscription||this._filterData(this.data)}get sort(){return this._sort}set sort(t){this._sort=t,this._updateChangeSubscription()}get paginator(){return this._paginator}set paginator(t){this._paginator=t,this._updateChangeSubscription()}_updateChangeSubscription(){var t;const e=this._sort?Object(or.a)(this._sort.sortChange,this._sort.initialized):Se(null),i=this._paginator?Object(or.a)(this._paginator.page,this._internalPageChanges,this._paginator.initialized):Se(null),n=Hg([this._data,this._filter]).pipe(Object(Ge.a)(([t])=>this._filterData(t))),r=Hg([n,e]).pipe(Object(Ge.a)(([t])=>this._orderData(t))),s=Hg([r,i]).pipe(Object(Ge.a)(([t])=>this._pageData(t)));null===(t=this._renderChangesSubscription)||void 0===t||t.unsubscribe(),this._renderChangesSubscription=s.subscribe(t=>this._renderData.next(t))}_filterData(t){return this.filteredData=null==this.filter||""===this.filter?t:t.filter(t=>this.filterPredicate(t,this.filter)),this.paginator&&this._updatePaginator(this.filteredData.length),this.filteredData}_orderData(t){return this.sort?this.sortData(t.slice(),this.sort):t}_pageData(t){if(!this.paginator)return t;const e=this.paginator.pageIndex*this.paginator.pageSize;return t.slice(e,e+this.paginator.pageSize)}_updatePaginator(t){Promise.resolve().then(()=>{const e=this.paginator;if(e&&(e.length=t,e.pageIndex>0)){const t=Math.ceil(e.length/e.pageSize)-1||0,i=Math.min(e.pageIndex,t);i!==e.pageIndex&&(e.pageIndex=i,this._internalPageChanges.next())}})}connect(){return this._renderChangesSubscription||this._updateChangeSubscription(),this._renderData}disconnect(){var t;null===(t=this._renderChangesSubscription)||void 0===t||t.unsubscribe(),this._renderChangesSubscription=null}}{}function jV(t,e){if(1&t&&(r.Vb(0,"div"),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.Db(1),r.Nc(" ",t.email," - ",t.status," ")}}let zV=(()=>{class t extends LT{constructor(t,e){super(),this.data=t,this.workerService=e,this.workFinished=!1}ngOnInit(){this.accountsStatuses=this.data.emails.map(t=>({email:t,status:"En attente"})),Promise.all(this.accountsStatuses.map(t=>Object(ue.a)(this,void 0,void 0,function*(){try{yield this.workerService.users.create({email:t.email,profile:this.data.profile}),t.status="OK"}catch(e){console.log("err",t.email,e),t.status=e.message.includes('duplicate key value violates unique constraint "user_email_key"')?"D\xe9j\xe0 pr\xe9sent":`KO : ${null==e?void 0:e.message}`}}))).finally(()=>{this.workFinished=!0})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(jl),r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-create-users-dialog"]],features:[r.Ab],decls:11,vars:3,consts:[[1,"d-flex"],[1,"dialog-title"],[1,"u-flex"],["mat-button","","title","Fermer la fen\xeatre",3,"disabled","mat-dialog-close"],[1,"dialog-content"],[4,"ngFor","ngForOf"],["mat-button","","title","Fermer la fen\xeatre",1,"d-block-center","mt-3",3,"disabled","mat-dialog-close"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"h1",1),r.Kc(2," Cr\xe9ation de comptes utilisateurs "),r.Ub(),r.Qb(3,"div",2),r.Vb(4,"button",3),r.Vb(5,"mat-icon"),r.Kc(6,"close"),r.Ub(),r.Ub(),r.Ub(),r.Vb(7,"div",4),r.Ic(8,jV,2,2,"div",5),r.Vb(9,"button",6),r.Kc(10," Fermer la fen\xeatre "),r.Ub(),r.Ub()),2&t&&(r.Db(4),r.nc("disabled",!e.workFinished),r.Db(4),r.nc("ngForOf",e.accountsStatuses),r.Db(1),r.nc("disabled",!e.workFinished))},directives:[Dl,Zl,Yp,ct],encapsulation:2}),t})();const HV=["input"],KV=function(){return{enterDuration:150}},$V=["*"],GV=new r.s("mat-checkbox-default-options",{providedIn:"root",factory:WV});function WV(){return{color:"accent",clickAction:"check-indeterminate"}}let ZV=0;const qV=WV(),YV={provide:rc,useExisting:Object(r.W)(()=>tF),multi:!0};class QV{}class XV{constructor(t){this._elementRef=t}}const JV=Ia(Ea(Da(ka(XV))));let tF=(()=>{class t extends JV{constructor(t,e,i,n,s,o,a){super(t),this._changeDetectorRef=e,this._focusMonitor=i,this._ngZone=n,this._animationMode=o,this._options=a,this.ariaLabel="",this.ariaLabelledby=null,this._uniqueId="mat-checkbox-"+ ++ZV,this.id=this._uniqueId,this.labelPosition="after",this.name=null,this.change=new r.o,this.indeterminateChange=new r.o,this._onTouched=()=>{},this._currentAnimationClass="",this._currentCheckState=0,this._controlValueAccessorChangeFn=()=>{},this._checked=!1,this._disabled=!1,this._indeterminate=!1,this._options=this._options||qV,this.color=this.defaultColor=this._options.color||qV.color,this.tabIndex=parseInt(s)||0}get inputId(){return`${this.id||this._uniqueId}-input`}get required(){return this._required}set required(t){this._required=ti(t)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{t||Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}),this._syncIndeterminate(this._indeterminate)}ngAfterViewChecked(){}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}get checked(){return this._checked}set checked(t){t!=this.checked&&(this._checked=t,this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(t){const e=ti(t);e!==this.disabled&&(this._disabled=e,this._changeDetectorRef.markForCheck())}get indeterminate(){return this._indeterminate}set indeterminate(t){const e=t!=this._indeterminate;this._indeterminate=ti(t),e&&(this._transitionCheckState(this._indeterminate?3:this.checked?1:2),this.indeterminateChange.emit(this._indeterminate)),this._syncIndeterminate(this._indeterminate)}_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(t){this.checked=!!t}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t}_getAriaChecked(){return this.checked?"true":this.indeterminate?"mixed":"false"}_transitionCheckState(t){let e=this._currentCheckState,i=this._elementRef.nativeElement;if(e!==t&&(this._currentAnimationClass.length>0&&i.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(e,t),this._currentCheckState=t,this._currentAnimationClass.length>0)){i.classList.add(this._currentAnimationClass);const t=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{i.classList.remove(t)},1e3)})}}_emitChangeEvent(){const t=new QV;t.source=this,t.checked=this.checked,this._controlValueAccessorChangeFn(this.checked),this.change.emit(t)}toggle(){this.checked=!this.checked}_onInputClick(t){var e;const i=null===(e=this._options)||void 0===e?void 0:e.clickAction;t.stopPropagation(),this.disabled||"noop"===i?this.disabled||"noop"!==i||(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate):(this.indeterminate&&"check"!==i&&Promise.resolve().then(()=>{this._indeterminate=!1,this.indeterminateChange.emit(this._indeterminate)}),this.toggle(),this._transitionCheckState(this._checked?1:2),this._emitChangeEvent())}focus(t,e){t?this._focusMonitor.focusVia(this._inputElement,t,e):this._inputElement.nativeElement.focus(e)}_onInteractionEvent(t){t.stopPropagation()}_getAnimationClassForCheckStateTransition(t,e){if("NoopAnimations"===this._animationMode)return"";let i="";switch(t){case 0:if(1===e)i="unchecked-checked";else{if(3!=e)return"";i="unchecked-indeterminate"}break;case 2:i=1===e?"unchecked-checked":"unchecked-indeterminate";break;case 1:i=2===e?"checked-unchecked":"checked-indeterminate";break;case 3:i=1===e?"indeterminate-checked":"indeterminate-unchecked"}return`mat-checkbox-anim-${i}`}_syncIndeterminate(t){const e=this._inputElement;e&&(e.nativeElement.indeterminate=t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.h),r.Pb(qi),r.Pb(r.B),r.ac("tabindex"),r.Pb(pa,8),r.Pb(GV,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-checkbox"]],viewQuery:function(t,e){if(1&t&&(r.Pc(HV,1),r.Pc(il,1)),2&t){let t;r.vc(t=r.dc())&&(e._inputElement=t.first),r.vc(t=r.dc())&&(e.ripple=t.first)}},hostAttrs:[1,"mat-checkbox"],hostVars:12,hostBindings:function(t,e){2&t&&(r.Yb("id",e.id),r.Eb("tabindex",null),r.Hb("mat-checkbox-indeterminate",e.indeterminate)("mat-checkbox-checked",e.checked)("mat-checkbox-disabled",e.disabled)("mat-checkbox-label-before","before"==e.labelPosition)("_mat-animation-noopable","NoopAnimations"===e._animationMode))},inputs:{disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],id:"id",labelPosition:"labelPosition",name:"name",required:"required",checked:"checked",disabled:"disabled",indeterminate:"indeterminate",ariaDescribedby:["aria-describedby","ariaDescribedby"],value:"value"},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],features:[r.Cb([YV]),r.Ab],ngContentSelectors:$V,decls:17,vars:20,consts:[[1,"mat-checkbox-layout"],["label",""],[1,"mat-checkbox-inner-container"],["type","checkbox",1,"mat-checkbox-input","cdk-visually-hidden",3,"id","required","checked","disabled","tabIndex","change","click"],["input",""],["matRipple","",1,"mat-checkbox-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleRadius","matRippleCentered","matRippleAnimation"],[1,"mat-ripple-element","mat-checkbox-persistent-ripple"],[1,"mat-checkbox-frame"],[1,"mat-checkbox-background"],["version","1.1","focusable","false","viewBox","0 0 24 24",0,"xml","space","preserve",1,"mat-checkbox-checkmark"],["fill","none","stroke","white","d","M4.1,12.7 9,17.6 20.3,6.3",1,"mat-checkbox-checkmark-path"],[1,"mat-checkbox-mixedmark"],[1,"mat-checkbox-label",3,"cdkObserveContent"],["checkboxLabel",""],[2,"display","none"]],template:function(t,e){if(1&t&&(r.mc(),r.Vb(0,"label",0,1),r.Vb(2,"span",2),r.Vb(3,"input",3,4),r.cc("change",function(t){return e._onInteractionEvent(t)})("click",function(t){return e._onInputClick(t)}),r.Ub(),r.Vb(5,"span",5),r.Qb(6,"span",6),r.Ub(),r.Qb(7,"span",7),r.Vb(8,"span",8),r.fc(),r.Vb(9,"svg",9),r.Qb(10,"path",10),r.Ub(),r.ec(),r.Qb(11,"span",11),r.Ub(),r.Ub(),r.Vb(12,"span",12,13),r.cc("cdkObserveContent",function(){return e._onLabelTextChange()}),r.Vb(14,"span",14),r.Kc(15,"\xa0"),r.Ub(),r.lc(16),r.Ub(),r.Ub()),2&t){const t=r.wc(1),i=r.wc(13);r.Eb("for",e.inputId),r.Db(2),r.Hb("mat-checkbox-inner-container-no-side-margin",!i.textContent||!i.textContent.trim()),r.Db(1),r.nc("id",e.inputId)("required",e.required)("checked",e.checked)("disabled",e.disabled)("tabIndex",e.tabIndex),r.Eb("value",e.value)("name",e.name)("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby)("aria-checked",e._getAriaChecked())("aria-describedby",e.ariaDescribedby),r.Db(2),r.nc("matRippleTrigger",t)("matRippleDisabled",e._isRippleDisabled())("matRippleRadius",20)("matRippleCentered",!0)("matRippleAnimation",r.rc(19,KV))}},directives:[il,xi],styles:["@keyframes mat-checkbox-fade-in-background{0%{opacity:0}50%{opacity:1}}@keyframes mat-checkbox-fade-out-background{0%,50%{opacity:1}100%{opacity:0}}@keyframes mat-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:22.910259}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1)}100%{stroke-dashoffset:0}}@keyframes mat-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mat-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);stroke-dashoffset:0}to{stroke-dashoffset:-22.910259}}@keyframes mat-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(45deg)}}@keyframes mat-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:0;transform:rotate(45deg)}to{opacity:1;transform:rotate(360deg)}}@keyframes mat-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:0;transform:rotate(-45deg)}to{opacity:1;transform:rotate(0deg)}}@keyframes mat-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(315deg)}}@keyframes mat-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;opacity:1;transform:scaleX(1)}32.8%,100%{opacity:0;transform:scaleX(0)}}.mat-checkbox-background,.mat-checkbox-frame{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:2px;box-sizing:border-box;pointer-events:none}.mat-checkbox{display:inline-block;transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);cursor:pointer;-webkit-tap-highlight-color:transparent}._mat-animation-noopable.mat-checkbox{transition:none;animation:none}.mat-checkbox .mat-ripple-element:not(.mat-checkbox-persistent-ripple){opacity:.16}.mat-checkbox-layout{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:inherit;align-items:baseline;vertical-align:middle;display:inline-flex;white-space:nowrap}.mat-checkbox-label{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.mat-checkbox-inner-container{display:inline-block;height:16px;line-height:0;margin:auto;margin-right:8px;order:0;position:relative;vertical-align:middle;white-space:nowrap;width:16px;flex-shrink:0}[dir=rtl] .mat-checkbox-inner-container{margin-left:8px;margin-right:auto}.mat-checkbox-inner-container-no-side-margin{margin-left:0;margin-right:0}.mat-checkbox-frame{background-color:transparent;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1);border-width:2px;border-style:solid}._mat-animation-noopable .mat-checkbox-frame{transition:none}.cdk-high-contrast-active .mat-checkbox.cdk-keyboard-focused .mat-checkbox-frame{border-style:dotted}.mat-checkbox-background{align-items:center;display:inline-flex;justify-content:center;transition:background-color 90ms cubic-bezier(0, 0, 0.2, 0.1),opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}._mat-animation-noopable .mat-checkbox-background{transition:none}.cdk-high-contrast-active .mat-checkbox .mat-checkbox-background{background:none}.mat-checkbox-persistent-ripple{display:block;width:100%;height:100%;transform:none}.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:.04}.mat-checkbox.cdk-keyboard-focused .mat-checkbox-persistent-ripple{opacity:.12}.mat-checkbox-persistent-ripple,.mat-checkbox.mat-checkbox-disabled .mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:0}@media(hover: none){.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{display:none}}.mat-checkbox-checkmark{top:0;left:0;right:0;bottom:0;position:absolute;width:100%}.mat-checkbox-checkmark-path{stroke-dashoffset:22.910259;stroke-dasharray:22.910259;stroke-width:2.1333333333px}.cdk-high-contrast-black-on-white .mat-checkbox-checkmark-path{stroke:#000 !important}.mat-checkbox-mixedmark{width:calc(100% - 6px);height:2px;opacity:0;transform:scaleX(0) rotate(0deg);border-radius:2px}.cdk-high-contrast-active .mat-checkbox-mixedmark{height:0;border-top:solid 2px;margin-top:2px}.mat-checkbox-label-before .mat-checkbox-inner-container{order:1;margin-left:8px;margin-right:auto}[dir=rtl] .mat-checkbox-label-before .mat-checkbox-inner-container{margin-left:auto;margin-right:8px}.mat-checkbox-checked .mat-checkbox-checkmark{opacity:1}.mat-checkbox-checked .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-checked .mat-checkbox-mixedmark{transform:scaleX(1) rotate(-45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark{opacity:0;transform:rotate(45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-indeterminate .mat-checkbox-mixedmark{opacity:1;transform:scaleX(1) rotate(0deg)}.mat-checkbox-unchecked .mat-checkbox-background{background-color:transparent}.mat-checkbox-disabled{cursor:default}.cdk-high-contrast-active .mat-checkbox-disabled{opacity:.5}.mat-checkbox-anim-unchecked-checked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-checked .mat-checkbox-checkmark-path{animation:180ms linear 0ms mat-checkbox-unchecked-checked-checkmark-path}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-unchecked-indeterminate-mixedmark}.mat-checkbox-anim-checked-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-checked-unchecked .mat-checkbox-checkmark-path{animation:90ms linear 0ms mat-checkbox-checked-unchecked-checkmark-path}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-checkmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-checkmark}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-mixedmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-checkmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-checkmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-mixedmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-mixedmark}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-mixedmark{animation:300ms linear 0ms mat-checkbox-indeterminate-unchecked-mixedmark}.mat-checkbox-input{bottom:0;left:50%}.mat-checkbox .mat-checkbox-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}\n"],encapsulation:2,changeDetection:0}),t})(),eF=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({}),t})(),iF=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[nl,Sa,Ci,eF],Sa,eF]}),t})();const nF=["*"];let rF=(()=>{class t{constructor(){this.title="",this.bgColor="#55575f",this.color="#ffffff"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-chip"]],inputs:{title:"title",bgColor:"bgColor",color:"color"},ngContentSelectors:nF,decls:2,vars:5,consts:[[1,"chip",3,"title"]],template:function(t,e){1&t&&(r.mc(),r.Vb(0,"div",0),r.lc(1),r.Ub()),2&t&&(r.Fc("color",e.color)("background-color",e.bgColor),r.nc("title",e.title))},styles:[".chip[_ngcontent-%COMP%] {\n display: inline-block;\n padding: 4px 5px;\n border-radius: 5px;\n font-size: 12px;\n}"],changeDetection:0}),t})();function sF(t,e){if(1&t&&(r.fc(),r.Qb(0,"circle",3)),2&t){const t=r.gc();r.Fc("animation-name","mat-progress-spinner-stroke-rotate-"+t._spinnerAnimationLabel)("stroke-dashoffset",t._getStrokeDashOffset(),"px")("stroke-dasharray",t._getStrokeCircumference(),"px")("stroke-width",t._getCircleStrokeWidth(),"%"),r.Eb("r",t._getCircleRadius())}}function oF(t,e){if(1&t&&(r.fc(),r.Qb(0,"circle",3)),2&t){const t=r.gc();r.Fc("stroke-dashoffset",t._getStrokeDashOffset(),"px")("stroke-dasharray",t._getStrokeCircumference(),"px")("stroke-width",t._getCircleStrokeWidth(),"%"),r.Eb("r",t._getCircleRadius())}}function aF(t,e){if(1&t&&(r.fc(),r.Qb(0,"circle",3)),2&t){const t=r.gc();r.Fc("animation-name","mat-progress-spinner-stroke-rotate-"+t._spinnerAnimationLabel)("stroke-dashoffset",t._getStrokeDashOffset(),"px")("stroke-dasharray",t._getStrokeCircumference(),"px")("stroke-width",t._getCircleStrokeWidth(),"%"),r.Eb("r",t._getCircleRadius())}}function lF(t,e){if(1&t&&(r.fc(),r.Qb(0,"circle",3)),2&t){const t=r.gc();r.Fc("stroke-dashoffset",t._getStrokeDashOffset(),"px")("stroke-dasharray",t._getStrokeCircumference(),"px")("stroke-width",t._getCircleStrokeWidth(),"%"),r.Eb("r",t._getCircleRadius())}}const cF=".mat-progress-spinner{display:block;position:relative;overflow:hidden}.mat-progress-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}.mat-progress-spinner circle{fill:transparent;transform-origin:center;transition:stroke-dashoffset 225ms linear}._mat-animation-noopable.mat-progress-spinner circle{transition:none;animation:none}.cdk-high-contrast-active .mat-progress-spinner circle{stroke:currentColor}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] svg{animation:mat-progress-spinner-linear-rotate 2000ms linear infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] svg{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition-property:stroke;animation-duration:4000ms;animation-timing-function:cubic-bezier(0.35, 0, 0.25, 1);animation-iteration-count:infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] svg{animation:mat-progress-spinner-stroke-rotate-fallback 10000ms cubic-bezier(0.87, 0.03, 0.33, 1) infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] svg{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition-property:stroke}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition:none;animation:none}@keyframes mat-progress-spinner-linear-rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes mat-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.606171575px;transform:rotate(0)}12.5%{stroke-dashoffset:56.5486677px;transform:rotate(0)}12.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(72.5deg)}25.0001%{stroke-dashoffset:268.606171575px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.5486677px;transform:rotate(270deg)}37.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(161.5deg)}50.0001%{stroke-dashoffset:268.606171575px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.5486677px;transform:rotate(180deg)}62.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(251.5deg)}75.0001%{stroke-dashoffset:268.606171575px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.5486677px;transform:rotate(90deg)}87.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(341.5deg)}}@keyframes mat-progress-spinner-stroke-rotate-fallback{0%{transform:rotate(0deg)}25%{transform:rotate(1170deg)}50%{transform:rotate(2340deg)}75%{transform:rotate(3510deg)}100%{transform:rotate(4680deg)}}\n";class hF{constructor(t){this._elementRef=t}}const uF=Ea(hF,"primary"),dF=new r.s("mat-progress-spinner-default-options",{providedIn:"root",factory:function(){return{diameter:100}}});let pF=(()=>{class t extends uF{constructor(e,i,n,r,s){super(e),this._elementRef=e,this._document=n,this._diameter=100,this._value=0,this._fallbackAnimation=!1,this.mode="determinate";const o=t._diameters;this._spinnerAnimationLabel=this._getSpinnerAnimationLabel(),o.has(n.head)||o.set(n.head,new Set([100])),this._fallbackAnimation=i.EDGE||i.TRIDENT,this._noopAnimations="NoopAnimations"===r&&!!s&&!s._forceAnimations,s&&(s.diameter&&(this.diameter=s.diameter),s.strokeWidth&&(this.strokeWidth=s.strokeWidth))}get diameter(){return this._diameter}set diameter(t){this._diameter=ei(t),this._spinnerAnimationLabel=this._getSpinnerAnimationLabel(),!this._fallbackAnimation&&this._styleRoot&&this._attachStyleNode()}get strokeWidth(){return this._strokeWidth||this.diameter/10}set strokeWidth(t){this._strokeWidth=ei(t)}get value(){return"determinate"===this.mode?this._value:0}set value(t){this._value=Math.max(0,Math.min(100,ei(t)))}ngOnInit(){const t=this._elementRef.nativeElement;this._styleRoot=_i(t)||this._document.head,this._attachStyleNode(),t.classList.add(`mat-progress-spinner-indeterminate${this._fallbackAnimation?"-fallback":""}-animation`)}_getCircleRadius(){return(this.diameter-10)/2}_getViewBox(){const t=2*this._getCircleRadius()+this.strokeWidth;return`0 0 ${t} ${t}`}_getStrokeCircumference(){return 2*Math.PI*this._getCircleRadius()}_getStrokeDashOffset(){return"determinate"===this.mode?this._getStrokeCircumference()*(100-this._value)/100:this._fallbackAnimation&&"indeterminate"===this.mode?.2*this._getStrokeCircumference():null}_getCircleStrokeWidth(){return this.strokeWidth/this.diameter*100}_attachStyleNode(){const e=this._styleRoot,i=this._diameter,n=t._diameters;let r=n.get(e);if(!r||!r.has(i)){const t=this._document.createElement("style");t.setAttribute("mat-spinner-animation",this._spinnerAnimationLabel),t.textContent=this._getAnimationText(),e.appendChild(t),r||(r=new Set,n.set(e,r)),r.add(i)}}_getAnimationText(){const t=this._getStrokeCircumference();return"\n @keyframes mat-progress-spinner-stroke-rotate-DIAMETER {\n 0% { stroke-dashoffset: START_VALUE; transform: rotate(0); }\n 12.5% { stroke-dashoffset: END_VALUE; transform: rotate(0); }\n 12.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n 25% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n\n 25.0001% { stroke-dashoffset: START_VALUE; transform: rotate(270deg); }\n 37.5% { stroke-dashoffset: END_VALUE; transform: rotate(270deg); }\n 37.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n 50% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n\n 50.0001% { stroke-dashoffset: START_VALUE; transform: rotate(180deg); }\n 62.5% { stroke-dashoffset: END_VALUE; transform: rotate(180deg); }\n 62.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n 75% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n\n 75.0001% { stroke-dashoffset: START_VALUE; transform: rotate(90deg); }\n 87.5% { stroke-dashoffset: END_VALUE; transform: rotate(90deg); }\n 87.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n 100% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n }\n".replace(/START_VALUE/g,""+.95*t).replace(/END_VALUE/g,""+.2*t).replace(/DIAMETER/g,`${this._spinnerAnimationLabel}`)}_getSpinnerAnimationLabel(){return this.diameter.toString().replace(".","_")}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(ci),r.Pb(a,8),r.Pb(pa,8),r.Pb(dF))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-progress-spinner"]],hostAttrs:["role","progressbar",1,"mat-progress-spinner"],hostVars:10,hostBindings:function(t,e){2&t&&(r.Eb("aria-valuemin","determinate"===e.mode?0:null)("aria-valuemax","determinate"===e.mode?100:null)("aria-valuenow","determinate"===e.mode?e.value:null)("mode",e.mode),r.Fc("width",e.diameter,"px")("height",e.diameter,"px"),r.Hb("_mat-animation-noopable",e._noopAnimations))},inputs:{color:"color",mode:"mode",diameter:"diameter",strokeWidth:"strokeWidth",value:"value"},exportAs:["matProgressSpinner"],features:[r.Ab],decls:3,vars:8,consts:[["preserveAspectRatio","xMidYMid meet","focusable","false",3,"ngSwitch"],["cx","50%","cy","50%",3,"animation-name","stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%",3,"stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%"]],template:function(t,e){1&t&&(r.fc(),r.Vb(0,"svg",0),r.Ic(1,sF,1,9,"circle",1),r.Ic(2,oF,1,7,"circle",2),r.Ub()),2&t&&(r.Fc("width",e.diameter,"px")("height",e.diameter,"px"),r.nc("ngSwitch","indeterminate"===e.mode),r.Eb("viewBox",e._getViewBox()),r.Db(1),r.nc("ngSwitchCase",!0),r.Db(1),r.nc("ngSwitchCase",!1))},directives:[mt,gt],styles:[cF],encapsulation:2,changeDetection:0}),t._diameters=new WeakMap,t})(),fF=(()=>{class t extends pF{constructor(t,e,i,n,r){super(t,e,i,n,r),this.mode="indeterminate"}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(ci),r.Pb(a,8),r.Pb(pa,8),r.Pb(dF))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-spinner"]],hostAttrs:["role","progressbar","mode","indeterminate",1,"mat-spinner","mat-progress-spinner"],hostVars:6,hostBindings:function(t,e){2&t&&(r.Fc("width",e.diameter,"px")("height",e.diameter,"px"),r.Hb("_mat-animation-noopable",e._noopAnimations))},inputs:{color:"color"},features:[r.Ab],decls:3,vars:8,consts:[["preserveAspectRatio","xMidYMid meet","focusable","false",3,"ngSwitch"],["cx","50%","cy","50%",3,"animation-name","stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%",3,"stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%"]],template:function(t,e){1&t&&(r.fc(),r.Vb(0,"svg",0),r.Ic(1,aF,1,9,"circle",1),r.Ic(2,lF,1,7,"circle",2),r.Ub()),2&t&&(r.Fc("width",e.diameter,"px")("height",e.diameter,"px"),r.nc("ngSwitch","indeterminate"===e.mode),r.Eb("viewBox",e._getViewBox()),r.Db(1),r.nc("ngSwitchCase",!0),r.Db(1),r.nc("ngSwitchCase",!1))},directives:[mt,gt],styles:[cF],encapsulation:2,changeDetection:0}),t})(),mF=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Sa,Et],Sa]}),t})();function gF(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",26),r.cc("click",function(){r.Ac(t);const e=r.gc(2);return e.filterValue="",e.filterUsers("")}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function AF(t,e){1&t&&(r.Vb(0,"th",27),r.Kc(1,"Email"),r.Ub())}function bF(t,e){1&t&&(r.Vb(0,"app-chip",31),r.Kc(1,"Admin"),r.Ub())}function vF(t,e){1&t&&(r.Vb(0,"app-chip",32),r.Kc(1,"C'est vous !"),r.Ub())}function _F(t,e){if(1&t&&(r.Vb(0,"td",28),r.Kc(1),r.Ic(2,bF,2,0,"app-chip",29),r.Ic(3,vF,2,0,"app-chip",30),r.Ub()),2&t){const t=e.$implicit,i=r.gc(2);r.Db(1),r.Mc(" ",t.email," "),r.Db(1),r.nc("ngIf","admin"===t.profile),r.Db(1),r.nc("ngIf",t.id===i.authenticationService.getUserId())}}function yF(t,e){1&t&&(r.Vb(0,"th",27),r.Kc(1,"Date de cr\xe9ation"),r.Ub())}function wF(t,e){if(1&t&&(r.Vb(0,"td",28),r.Kc(1),r.hc(2,"date"),r.Ub()),2&t){const t=e.$implicit;r.Db(1),r.Lc(r.jc(2,1,t.created_at,"yyyy-MM-dd HH:mm"))}}function xF(t,e){1&t&&(r.Vb(0,"th",27),r.Kc(1,"Derni\xe8re activit\xe9"),r.Ub())}function CF(t,e){if(1&t&&(r.Vb(0,"td",28),r.Kc(1),r.hc(2,"date"),r.Ub()),2&t){const t=e.$implicit;r.Db(1),r.Lc(r.jc(2,1,t.last_activity,"yyyy-MM-dd HH:mm"))}}function SF(t,e){1&t&&(r.Vb(0,"th",27),r.Kc(1,"Unit\xe9"),r.Ub())}function kF(t,e){if(1&t){const t=r.Wb();r.Vb(0,"td",28),r.Vb(1,"mat-form-field"),r.Vb(2,"input",33),r.cc("ngModelChange",function(t){return e.$implicit.note=t})("ngModelChange",function(i){r.Ac(t);const n=e.$implicit;return r.gc(2).onUserNoteUpdate(n,i)}),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=e.$implicit;r.Db(2),r.nc("ngModel",t.note)}}function EF(t,e){1&t&&r.Qb(0,"th",34)}function DF(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",37),r.cc("click",function(){r.Ac(t);const e=r.gc().$implicit;return r.gc(2).deleteUser(e.id)}),r.Vb(1,"mat-icon"),r.Kc(2,"delete"),r.Ub(),r.Ub()}}function IF(t,e){if(1&t&&(r.Vb(0,"td",28),r.Ic(1,DF,3,0,"button",35),r.Vb(2,"button",36),r.Vb(3,"mat-icon"),r.Kc(4,"mail"),r.Ub(),r.Ub(),r.Ub()),2&t){const t=e.$implicit,i=r.gc(2);r.Db(1),r.nc("ngIf",t.id!==i.authenticationService.getUserId()),r.Db(1),r.nc("app-async-action",i.sendWelcomeEmail.bind(i,t.id))}}function PF(t,e){1&t&&r.Qb(0,"tr",38)}function OF(t,e){1&t&&r.Qb(0,"tr",39)}const MF=function(){return[10,20,100]};function TF(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div"),r.Vb(1,"div",10),r.Vb(2,"mat-form-field"),r.Vb(3,"mat-label"),r.Kc(4,"Filtre"),r.Ub(),r.Vb(5,"input",11),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc().filterValue=e})("keyup",function(e){return r.Ac(t),r.gc().filterUsers(e.target.value)}),r.Ub(),r.Ic(6,gF,3,0,"button",12),r.Ub(),r.Vb(7,"button",13),r.Kc(8,"Rafraichir la liste"),r.Ub(),r.Ub(),r.Vb(9,"table",14),r.Tb(10,15),r.Ic(11,AF,2,0,"th",16),r.Ic(12,_F,4,3,"td",17),r.Sb(),r.Tb(13,18),r.Ic(14,yF,2,0,"th",16),r.Ic(15,wF,3,4,"td",17),r.Sb(),r.Tb(16,19),r.Ic(17,xF,2,0,"th",16),r.Ic(18,CF,3,4,"td",17),r.Sb(),r.Tb(19,20),r.Ic(20,SF,2,0,"th",16),r.Ic(21,kF,3,1,"td",17),r.Sb(),r.Tb(22,21),r.Ic(23,EF,1,0,"th",22),r.Ic(24,IF,5,2,"td",17),r.Sb(),r.Ic(25,PF,1,0,"tr",23),r.Ic(26,OF,1,0,"tr",24),r.Ub(),r.Qb(27,"mat-paginator",25),r.Ub()}if(2&t){const t=r.gc();r.Db(5),r.nc("ngModel",t.filterValue),r.Db(1),r.nc("ngIf",t.filterValue),r.Db(1),r.nc("app-async-action",t.refreshList),r.Db(2),r.nc("dataSource",t.usersDataSource),r.Db(16),r.nc("matHeaderRowDef",t.displayedColumns),r.Db(1),r.nc("matRowDefColumns",t.displayedColumns),r.Db(1),r.nc("pageSizeOptions",r.rc(7,MF))}}function RF(t,e){1&t&&r.Qb(0,"mat-spinner",40)}function VF(t,e){if(1&t&&(r.Vb(0,"mat-hint"),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Oc("",t.extractedEmailsCount," email",t.extractedEmailsCount>1?"s":""," reconnu",t.extractedEmailsCount>1?"s":"",".")}}function FF(t,e){1&t&&(r.Vb(0,"mat-error"),r.Kc(1,"Aucun email reconnu"),r.Ub())}const LF=/(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/g;function UF(t){const e=t.value.match(LF);return(null==e?void 0:e.length)>0?null:{missingEmails:!0}}let BF=(()=>{class t extends LT{constructor(t,e,i,n,r,s){super(),this.dialog=t,this.formBuilder=e,this.workerService=i,this.authenticationService=n,this.configService=r,this.uiService=s,this.displayedColumns=["email","created_at","last_activity","note","actions"],this.pendingNoteUpdates=new Map,this.extractedEmails=[],this.extractedEmailsCount=0,this.createUser=()=>Object(ue.a)(this,void 0,void 0,function*(){this.createUserForm.valid&&(1===this.extractedEmailsCount?(yield this.workerService.users.create({email:this.extractedEmails[0],profile:this.createUserForm.controls.admin.value?"admin":"user"}),this.uiService.success("L'utilisateur a bien \xe9t\xe9 cr\xe9\xe9. Il recevra un email avec un lien vers l'application et les instructions pour d\xe9finir son mot de passe.")):yield this.openCreateUsersDialog(this.extractedEmails,this.createUserForm.controls.admin.value?"admin":"user"),this.createUserForm.controls.emails.reset(""),this.createUserForm.controls.emails.status="VALID",this.usersDataSource.data=yield this.workerService.users.list())}),this.refreshList=()=>Object(ue.a)(this,void 0,void 0,function*(){this.usersDataSource.data=yield this.workerService.users.list()})}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.createUserForm=this.formBuilder.group({emails:["",[UF]],admin:[!1]}),this.usersDataSource=new NV(yield this.workerService.users.list()),this.usersDataSource.filterPredicate=this.filterPredicate,setTimeout(()=>{this.paginator.pageSize=this.configService.adminManageUsersPageSize,this.sort.sort(this.configService.adminManageUsersSort),this.usersDataSource.paginator=this.paginator,this.usersDataSource.sort=this.sort,this.subscriptions.push(this.paginator.page.subscribe(t=>{this.configService.set("adminManageUsersPageSize",t.pageSize)}),this.sort.sortChange.subscribe(t=>{this.configService.set("adminManageUsersSort",{id:t.active,start:t.direction})}))}),this.subscriptions.push(this.createUserForm.controls.emails.valueChanges.subscribe(t=>{var e;const i=t.match(LF);this.extractedEmails=null!=i?i:[],this.extractedEmailsCount=null!==(e=null==i?void 0:i.length)&&void 0!==e?e:0}))})}deleteUser(t){this.uiService.confirm({title:"Suppression",message:"Cela va supprimer l'utilisateur ainsi que toutes ses r\xe8gles, alertes et flottes associ\xe9es. Confirmez-vous la suppression de cet utilisateur ?",action:e=>Object(ue.a)(this,void 0,void 0,function*(){e&&(yield this.workerService.users.delete(t),this.usersDataSource.data=this.usersDataSource.data.filter(e=>e.id!==t))})})}sendWelcomeEmail(t){return Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.users.sendWelcomeEmail(t),this.uiService.success("Un email d'invitation a \xe9t\xe9 envoy\xe9 \xe0 l'utilisateur")})}filterUsers(t){this.usersDataSource.filter=TD(t.trim()),this.usersDataSource.paginator&&this.usersDataSource.paginator.firstPage()}filterPredicate(t,e){return TD(t.email).includes(e)||TD(t.note).includes(e)}onUserNoteUpdate(t,e){return Object(ue.a)(this,void 0,void 0,function*(){const i=this.pendingNoteUpdates.get(t.id);i&&clearTimeout(i),this.pendingNoteUpdates.set(t.id,window.setTimeout(()=>Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.users.updateNote(t.id,e),this.pendingNoteUpdates.delete(t.id)}),500))})}openCreateUsersDialog(t,e){return Object(ue.a)(this,void 0,void 0,function*(){return new Promise(i=>{this.createUsersDialogRef=this.dialog.open(zV,{data:{emails:t,profile:e},autoFocus:!0,closeOnNavigation:!1}),this.createUsersDialogRef.afterClosed().subscribe(()=>{i()})})})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Gl),r.Pb(Lh),r.Pb(_I.a),r.Pb(yI),r.Pb(cI),r.Pb(VI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-manage-users-page"]],viewQuery:function(t,e){if(1&t&&(r.Pc(CR,1),r.Pc(yA,1)),2&t){let t;r.vc(t=r.dc())&&(e.sort=t.first),r.vc(t=r.dc())&&(e.paginator=t.first)}},features:[r.Ab],decls:20,vars:8,consts:[[1,"mat-h1"],[4,"ngIf","ngIfElse"],["loading",""],[1,"mat-h2"],[1,"d-flex-center",3,"formGroup"],["appearance","outline",1,"u-flex","mt-3"],["matInput","","formControlName","emails","cdkTextareaAutosize","","cdkAutosizeMinRows","1","cdkAutosizeMaxRows","6","required",""],[4,"ngIf"],["color","primary","title","Un administrateur peut g\xe9rer les utilisateurs (pour l'instant...)","formControlName","admin",1,"mx-3"],["mat-raised-button","","color","primary",3,"app-async-action","disabled"],[1,"d-flex-center",2,"justify-content","space-between"],["matInput","","placeholder","utilisateur@exemple.com",3,"ngModel","ngModelChange","keyup"],["mat-button","","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],["mat-stroked-button","",3,"app-async-action"],["mat-table","","matSort","","matSortActive","email","matSortDirection","asc",1,"table",3,"dataSource"],["matColumnDef","email"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","created_at"],["matColumnDef","last_activity"],["matColumnDef","note"],["matColumnDef","actions"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-button","","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["bgColor","#1aaa55",4,"ngIf"],["class","ml-1","bgColor","#2d60eb",4,"ngIf"],["bgColor","#1aaa55"],["bgColor","#2d60eb",1,"ml-1"],["matInput","","type","text","title","Unit\xe9",3,"ngModel","ngModelChange"],["mat-header-cell",""],["mat-icon-button","","color","warn","title","Supprimer cet utilisateur",3,"click",4,"ngIf"],["mat-icon-button","","title","Envoyer un email d'invitation",3,"app-async-action"],["mat-icon-button","","color","warn","title","Supprimer cet utilisateur",3,"click"],["mat-header-row",""],["mat-row",""],["strokeWidth","4","diameter","80",1,"spinner"]],template:function(t,e){if(1&t&&(r.Vb(0,"h1",0),r.Kc(1,"Gestion des utilisateurs"),r.Ub(),r.Ic(2,TF,28,8,"div",1),r.Ic(3,RF,1,0,"ng-template",null,2,r.Jc),r.Vb(5,"h2",3),r.Kc(6,"Cr\xe9ation de comptes utilisateur"),r.Ub(),r.Vb(7,"p"),r.Kc(8," Les utilisateurs cr\xe9\xe9s recevront un email avec un lien pour d\xe9finir leur mot de passe. Vous pouvez copier du texte multi-lignes contenant des emails. Ces derniers seront extraits automatiquement.\n"),r.Ub(),r.Vb(9,"form",4),r.Vb(10,"mat-form-field",5),r.Vb(11,"mat-label"),r.Kc(12,"Email(s)"),r.Ub(),r.Qb(13,"textarea",6),r.Ic(14,VF,2,3,"mat-hint",7),r.Ic(15,FF,2,0,"mat-error",7),r.Ub(),r.Vb(16,"mat-checkbox",8),r.Kc(17,"Administrateur"),r.Ub(),r.Vb(18,"button",9),r.Kc(19),r.Ub(),r.Ub()),2&t){const t=r.wc(4);r.Db(2),r.nc("ngIf",e.usersDataSource)("ngIfElse",t),r.Db(7),r.nc("formGroup",e.createUserForm),r.Db(5),r.nc("ngIf",e.extractedEmailsCount>0),r.Db(1),r.nc("ngIf",e.createUserForm.get("emails").touched&&e.createUserForm.get("emails").hasError("missingEmails")),r.Db(3),r.nc("app-async-action",e.createUser)("disabled",!e.createUserForm.valid),r.Db(1),r.Mc("Cr\xe9er ",e.extractedEmailsCount>1?"les utilisateurs":"l'utilisateur","")}},directives:[ut,dh,Fc,_h,_u,cu,Ou,ac,Cu,Vc,Eh,Ih,tF,Dl,dR,uh,vV,CR,SV,xV,yV,OV,TV,yA,fu,Yp,EV,OR,IV,rF,VV,LV,fF,lu,nu],pipes:[kt],styles:[".table[_ngcontent-%COMP%]{width:100%}.table[_ngcontent-%COMP%] td.mat-cell{padding:0 4px!important;font-size:13px}.table[_ngcontent-%COMP%] td.mat-cell:first-of-type{padding-left:24px!important}.table[_ngcontent-%COMP%] td.mat-cell:last-of-type{padding-right:24px!important}"]}),t})();function NF(t,e){1&t&&(r.Vb(0,"mat-error"),r.Kc(1,"L'email est obligatoire"),r.Ub())}function jF(t,e){1&t&&(r.Vb(0,"mat-error"),r.Kc(1,"L'email doit \xeatre valide"),r.Ub())}function zF(t,e){1&t&&(r.Vb(0,"mat-error"),r.Kc(1,"Le mot de passe est obligatoire"),r.Ub())}const HF=function(){return["/reset-password"]};let KF=(()=>{class t{constructor(t,e,i,n){this.formBuilder=t,this.router=e,this.authenticationService=i,this.uiService=n,this.login=()=>Object(ue.a)(this,void 0,void 0,function*(){if(this.loginForm.valid)try{yield this.authenticationService.login(this.loginForm.value);const t=new URLSearchParams(window.location.search).get("redirect");yield this.router.navigateByUrl(null!=t?t:"/")}catch(t){this.uiService.error(t.message)}})}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){if(this.loginForm=this.formBuilder.group({email:["",[pc.required,pc.email]],password:["",[pc.required]]}),this.authenticationService.isAuthenticated()){const t=new URLSearchParams(window.location.search).get("redirect");yield this.router.navigateByUrl(null!=t?t:"/")}else null!==new URLSearchParams(window.location.search).get("expired")&&this.uiService.error("Votre session a expir\xe9. Veuillez vous authentifier \xe0 nouveau.")})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Lh),r.Pb(sw),r.Pb(yI),r.Pb(VI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-login-page"]],decls:23,vars:7,consts:[[1,"unauthenticated-page","mat-typography"],["novalidate","",1,"unauthenticated-page__form",3,"formGroup"],["src","./assets/images/logo_anais.png","alt","Logo ANAIS",1,"login-page__logo"],["matPrefix","",1,"login-page__prefix-icon"],["type","email","matInput","","placeholder","utilisateur@exemple.com","formControlName","email","required",""],[4,"ngIf"],["type","password","matInput","","color","white","placeholder","******","formControlName","password","required",""],["mat-stroked-button","","color","primary",1,"login-page__login-btn",3,"app-async-action"],["mat-button","",1,"mt-3","login-page__reset-password-button",3,"routerLink"],["src","./assets/images/logo_fabnum.png","alt","Logo Fabrique num\xe9rique",1,"login-page__fabnumlogo"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"form",1),r.Qb(2,"img",2),r.Vb(3,"mat-form-field"),r.Vb(4,"mat-label"),r.Kc(5,"Email"),r.Ub(),r.Vb(6,"mat-icon",3),r.Kc(7,"perm_identity"),r.Ub(),r.Qb(8,"input",4),r.Ic(9,NF,2,0,"mat-error",5),r.Ic(10,jF,2,0,"mat-error",5),r.Ub(),r.Vb(11,"mat-form-field"),r.Vb(12,"mat-label"),r.Kc(13,"Mot de passe"),r.Ub(),r.Vb(14,"mat-icon",3),r.Kc(15,"lock"),r.Ub(),r.Qb(16,"input",6),r.Ic(17,zF,2,0,"mat-error",5),r.Ub(),r.Vb(18,"button",7),r.Kc(19,"Se connecter"),r.Ub(),r.Vb(20,"button",8),r.Kc(21," J'ai perdu mon mot de passe "),r.Ub(),r.Ub(),r.Qb(22,"img",9),r.Ub()),2&t&&(r.Db(1),r.nc("formGroup",e.loginForm),r.Db(8),r.nc("ngIf",e.loginForm.get("email").hasError("required")),r.Db(1),r.nc("ngIf",e.loginForm.get("email").hasError("email")),r.Db(7),r.nc("ngIf",e.loginForm.get("password").hasError("required")),r.Db(1),r.nc("app-async-action",e.login),r.Db(2),r.nc("routerLink",r.rc(6,HF)))},directives:[dh,Fc,_h,_u,cu,Yp,du,Ou,ac,Vc,Eh,Ih,ut,Dl,dR,ow,nu],styles:[".login-page__login-btn[_ngcontent-%COMP%]{margin-top:2em;background-color:#fff!important}.login-page__login-btn[_ngcontent-%COMP%]:hover .mat-button-focus-overlay{opacity:.18}.login-page__logo[_ngcontent-%COMP%]{width:350px;max-height:83px;margin-bottom:3em}.login-page__fabnumlogo[_ngcontent-%COMP%]{margin-top:3em;width:200px;max-height:86px}.login-page__prefix-icon[_ngcontent-%COMP%]{margin-right:.5em}.login-page__reset-password-button[_ngcontent-%COMP%]{color:#fff;font-weight:300;line-height:2em;height:2em}","[_nghost-%COMP%]{flex:1}.unauthenticated-page[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:auto;background-image:url(/assets/images/login_background.jpg);background-size:cover;background-position:70% 50%}.unauthenticated-page__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:300px;color:#fff;background-color:rgba(0,55,146,.9490196078431372);padding:2.5em 2.5em 1em;border-radius:2em;box-shadow:0 16px 24px 2px rgba(0,55,146,.64),0 6px 30px 5px rgba(0,55,146,.62)}.unauthenticated-page__form[_ngcontent-%COMP%] .mat-form-field-label{color:#fff}"]}),t})(),$F=(()=>{class t extends LT{constructor(t,e){super(),this.router=t,this.workerService=e}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.subscriptions.push(this.workerService.applicationHealth$.pipe(Gg(1)).subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){var e;(null===(e=null==t?void 0:t.maintenance)||void 0===e?void 0:e.type)!==qT.InProgress&&(yield this.router.navigateByUrl("/"))}))),yield this.workerService.application.refreshHealthState()})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(sw),r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-maintenance-wall-page"]],features:[r.Ab],decls:4,vars:0,consts:[[1,"unauthenticated-page","mat-typography"],[1,"unauthenticated-page__form"],[1,"maintenance-page__title"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"h3",2),r.Kc(3,"Maintenance en cours"),r.Ub(),r.Ub(),r.Ub())},styles:[".maintenance-page__title[_ngcontent-%COMP%]{font-weight:700;font-size:2.5em}","[_nghost-%COMP%]{flex:1}.unauthenticated-page[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:auto;background-image:url(/assets/images/login_background.jpg);background-size:cover;background-position:70% 50%}.unauthenticated-page__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:300px;color:#fff;background-color:rgba(0,55,146,.9490196078431372);padding:2.5em 2.5em 1em;border-radius:2em;box-shadow:0 16px 24px 2px rgba(0,55,146,.64),0 6px 30px 5px rgba(0,55,146,.62)}.unauthenticated-page__form[_ngcontent-%COMP%] .mat-form-field-label{color:#fff}"]}),t})(),GF=(()=>{class t{ngOnChanges(t){(t.flag||t.mmsi)&&(this.country=WO(this.flag?this.flag:ZO[this.mmsi.substr(0,3)]))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-flag"]],inputs:{mmsi:"mmsi",flag:"flag"},features:[r.Bb],decls:1,vars:2,consts:[[3,"className","title"]],template:function(t,e){1&t&&r.Qb(0,"span",0),2&t&&r.nc("className","flag-icon flag-icon-"+e.country.flag)("title",e.country.name)},styles:["[_nghost-%COMP%]{display:inline-flex;font-size:1.5em}"],changeDetection:0}),t})();const WF=function(t){return{transform:t}};function ZF(t,e){if(1&t&&(r.Kc(0),r.Vb(1,"mat-icon",8),r.Kc(2,"arrow_right_alt"),r.Ub()),2&t){const t=r.gc(2);r.Mc(" ",t.aircraft.track,"\xb0 "),r.Db(1),r.nc("ngStyle",r.sc(2,WF,"rotate("+(t.aircraft.track-90)+"deg)"))}}function qF(t,e){1&t&&r.Kc(0," ? ")}function YF(t,e){if(1&t&&(r.Qb(0,"mat-divider"),r.Vb(1,"div",0),r.Vb(2,"div",1),r.Vb(3,"div",2),r.Kc(4,"Squawk"),r.Ub(),r.Vb(5,"strong"),r.Kc(6),r.Ub(),r.Ub(),r.Qb(7,"mat-divider",3),r.Vb(8,"div",1),r.Vb(9,"div",2),r.Kc(10,"Vitesse / Cap"),r.Ub(),r.Vb(11,"strong",5),r.Kc(12),r.Ic(13,ZF,3,4,"ng-template",6),r.Ic(14,qF,1,0,"ng-template",null,7,r.Jc),r.Ub(),r.Ub(),r.Qb(16,"mat-divider",3),r.Vb(17,"div",1),r.Vb(18,"div",2),r.Kc(19,"Destination"),r.Ub(),r.Vb(20,"strong"),r.Kc(21),r.Ub(),r.Ub(),r.Ub()),2&t){const t=r.wc(15),e=r.gc();r.Db(6),r.Mc(" ",e.aircraft.squawk||"?"," "),r.Db(1),r.nc("vertical",!0),r.Db(5),r.Mc(" ",e.aircraft.speed?e.aircraft.speed+" kt":"?"," / "),r.Db(1),r.nc("ngIf",e.aircraft.track)("ngIfElse",t),r.Db(3),r.nc("vertical",!0),r.Db(5),r.Nc(" ",e.aircraft.fromIcao||"?"," \u2192 ",e.aircraft.toIcao||"?"," ")}}function QF(t,e){if(1&t&&(r.Qb(0,"mat-divider"),r.Vb(1,"div",0),r.Vb(2,"div",1),r.Vb(3,"div",9),r.Kc(4,"VSI"),r.Ub(),r.Vb(5,"strong"),r.Kc(6),r.Ub(),r.Ub(),r.Qb(7,"mat-divider",3),r.Vb(8,"div",1),r.Vb(9,"div",2),r.Kc(10,"Propri\xe9taire"),r.Ub(),r.Vb(11,"strong"),r.Kc(12),r.Ub(),r.Ub(),r.Ub(),r.Qb(13,"mat-divider"),r.Vb(14,"div",0),r.Vb(15,"div",1),r.Vb(16,"div",2),r.Kc(17,"Providers"),r.Ub(),r.Vb(18,"strong"),r.Kc(19),r.Ub(),r.Ub(),r.Ub()),2&t){const t=r.gc();r.Db(6),r.Mc("",t.aircraft.vsi?t.aircraft.vsi:"?"," "),r.Db(1),r.nc("vertical",!0),r.Db(5),r.Mc("",t.aircraft.registeredOwners||"?"," "),r.Db(7),r.Lc((null==t.aircraft||null==t.aircraft.providers?null:t.aircraft.providers.length)>0?null==t.aircraft?null:t.aircraft.providers.join(", "):"?")}}let XF=(()=>{class t extends LT{constructor(){super(...arguments),this.positionInput=null,this.full=!1,this.extensive=!1,this.position=null}ngOnInit(){this.ensureMandatoryInputParams("aircraft")}ngOnChanges(t){t.positionInput&&(this.position=this.positionInput),t.aircraft&&!this.positionInput&&(this.position=this.aircraft)}}return t.\u0275fac=function(e){return JF(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-aircraft-infos"]],inputs:{aircraft:"aircraft",positionInput:["position","positionInput"],full:"full",extensive:"extensive"},features:[r.Ab,r.Bb],decls:33,vars:10,consts:[[1,"aircraft-infos__row"],[1,"aircraft-infos__info-cell"],[1,"aircraft-infos__info-label"],[3,"vertical"],[3,"ngIf"],[1,"d-flex-center"],[3,"ngIf","ngIfElse"],["unknown",""],[1,"aircraft-infos__course-icon",3,"ngStyle"],["title","Vertical Speed Indicator",1,"aircraft-infos__info-label"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"div",2),r.Kc(3,"ICAO"),r.Ub(),r.Vb(4,"strong"),r.Kc(5),r.Ub(),r.Ub(),r.Qb(6,"mat-divider",3),r.Vb(7,"div",1),r.Vb(8,"div",2),r.Kc(9,"Callsign"),r.Ub(),r.Vb(10,"strong"),r.Kc(11),r.Ub(),r.Ub(),r.Qb(12,"mat-divider",3),r.Vb(13,"div",1),r.Vb(14,"div",2),r.Kc(15,"Registration"),r.Ub(),r.Vb(16,"strong"),r.Kc(17),r.Ub(),r.Ub(),r.Ub(),r.Ic(18,YF,22,8,"ng-template",4),r.Qb(19,"mat-divider"),r.Vb(20,"div",0),r.Vb(21,"div",1),r.Vb(22,"div",2),r.Kc(23,"Altitude"),r.Ub(),r.Vb(24,"strong"),r.Kc(25),r.Ub(),r.Ub(),r.Qb(26,"mat-divider",3),r.Vb(27,"div",1),r.Vb(28,"div",2),r.Kc(29,"Position"),r.Ub(),r.Vb(30,"strong"),r.Kc(31),r.Ub(),r.Ub(),r.Ub(),r.Ic(32,QF,20,4,"ng-template",4)),2&t&&(r.Db(5),r.Lc(e.aircraft.icao),r.Db(1),r.nc("vertical",!0),r.Db(5),r.Lc(e.aircraft.callsign||"?"),r.Db(1),r.nc("vertical",!0),r.Db(5),r.Lc(e.aircraft.registration||"?"),r.Db(1),r.nc("ngIf",e.full||e.extensive),r.Db(7),r.Lc(e.position.altitude?e.position.altitude+" ft":"?"),r.Db(1),r.nc("vertical",!0),r.Db(5),r.Lc(e.position.hdms),r.Db(1),r.nc("ngIf",e.full))},directives:[GT,ut,Yp,bt],styles:['.aircraft-infos[_ngcontent-%COMP%]{background-color:#e7ecf0;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2);border-radius:2px}.aircraft-infos[_ngcontent-%COMP%]:after{content:" ";position:absolute;top:100%;left:50%;margin-left:-12px;border:12px solid transparent;border-top-color:#cdd1d4}.aircraft-infos__header[_ngcontent-%COMP%]{background-color:#cdd1d4;display:flex}.aircraft-infos__link[_ngcontent-%COMP%]{flex:1;padding:0;line-height:inherit;text-align:inherit;font-size:inherit;font-weight:inherit}.aircraft-infos__link[_ngcontent-%COMP%] .mat-button-wrapper{display:flex}.aircraft-infos__flag[_ngcontent-%COMP%]{margin:5px}.aircraft-infos__title[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:5px 0;flex:1}.aircraft-infos__name[_ngcontent-%COMP%]{font-size:1.2em}.aircraft-infos__type[_ngcontent-%COMP%]{font-size:.9em;color:#555}.aircraft-infos__row[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;font-size:.9em}.aircraft-infos__info-cell[_ngcontent-%COMP%]{padding:.4em;text-align:center}.aircraft-infos__info-label[_ngcontent-%COMP%]{color:grey;font-weight:500;padding-bottom:.2em}.aircraft-infos__course-icon[_ngcontent-%COMP%]{line-height:.7em;height:.7em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.aircraft-infos__footer[_ngcontent-%COMP%]{background-color:#cdd1d4;padding-left:.4em;display:flex;align-items:center;font-size:.85em;line-height:36px}.aircraft-infos__signal-label[_ngcontent-%COMP%]{font-weight:500;color:#595959}'],changeDetection:0}),t})();const JF=r.Xb(XF);function tL(t,e){1&t&&r.Qb(0,"div",3)}function eL(t,e){if(1&t&&(r.Vb(0,"a",20),r.Vb(1,"img",21),r.cc("load",function(t){return t.target.style.display="block"})("error",function(t){return t.target.remove()}),r.Ub(),r.Ub()),2&t){const t=r.gc(2);r.nc("href",t.aircraft.photoLink,r.Dc),r.Db(1),r.nc("src",t.aircraft.photoURL,r.Dc)}}function iL(t,e){if(1&t&&(r.Vb(0,"a",22),r.Qb(1,"img",23),r.Ub()),2&t){const t=r.gc(2);r.pc("href","https://www.flightradar24.com/",t.aircraft.callsign,"",r.Dc)}}function nL(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",4),r.Vb(1,"div",5),r.Qb(2,"app-flag",6),r.Vb(3,"div",7),r.Vb(4,"div",8),r.Kc(5),r.Ub(),r.Vb(6,"small",9),r.Kc(7),r.Ub(),r.Ub(),r.Ub(),r.Vb(8,"div",10),r.Kc(9,"R\xe9ception : "),r.Vb(10,"span",11),r.hc(11,"timeago"),r.Kc(12),r.hc(13,"date"),r.Ub(),r.Ub(),r.Ub(),r.Ic(14,eL,2,2,"a",12),r.hc(15,"async"),r.Vb(16,"div",5),r.Vb(17,"button",13),r.cc("click",function(){return r.Ac(t),r.gc().locateAircraft()})("dblclick",function(){return r.Ac(t),r.gc().locateAndZoomToAircraft()}),r.Vb(18,"mat-icon"),r.Kc(19,"center_focus_strong"),r.Ub(),r.Ub(),r.Vb(20,"a",14),r.Qb(21,"img",15),r.Ub(),r.Ic(22,iL,2,1,"a",16),r.Vb(23,"button",17),r.cc("click",function(){return r.Ac(t),r.gc().mapConfigService.toggleTrailsLayer()}),r.Vb(24,"mat-icon",18),r.Kc(25,"gesture"),r.Ub(),r.Ub(),r.Ub(),r.Qb(26,"mat-divider"),r.Qb(27,"app-aircraft-infos",19)}if(2&t){const t=r.gc();r.Db(2),r.nc("flag",t.aircraft.country.flag),r.Db(3),r.Lc(t.aircraft.callsign||"?"),r.Db(2),r.Lc(t.aircraft.type||"?"),r.Db(3),r.oc("title",r.ic(11,13,1e3*t.aircraft.timestamp)),r.Db(2),r.Lc(r.kc(13,15,1e3*t.aircraft.timestamp,"yyyy-MM-dd HH:mm:ss z",t.mapConfigService.useUTCDates$.value&&"z")),r.Db(2),r.nc("ngIf",r.ic(15,19,t.aircraft.photoURL&&t.mapConfigService.showMarineTrafficPhotos$)),r.Db(6),r.pc("href","https://globe.adsbexchange.com/?icao=",t.aircraft.icao,"",r.Dc),r.Db(2),r.nc("ngIf",t.aircraft.callsign),r.Db(1),r.Hb("button-active",t.mapConfigService.showTrailsLayer$.value),r.pc("title","",t.mapConfigService.showTrailsLayer$.value?"Masquer":"Afficher"," la trace de l'a\xe9ronef"),r.Db(4),r.nc("aircraft",t.aircraft)("full",!0)}}let rL=(()=>{class t extends LT{constructor(t,e,i,n,r,s,o,a,l,c,h){super(),this.activatedRoute=t,this.changeDetectorRef=e,this.titleService=i,this.router=n,this.dialog=r,this.configService=s,this.interactionsService=o,this.mapService=a,this.mapConfigService=l,this.selectionService=c,this.uiService=h,this.loading=!1,this.aircraft=null}ngOnInit(){this.subscriptions.push(this.selectionService.openEntity$.pipe(Gg(1),He(t=>t.type===OP.Aircraft&&t.id===this.icao)).subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){if(t.error)return this.loading=!1,this.uiService.error(`L'a\xe9ronef ${this.icao} est inconnu. Il a pu atterrir ou son signal n'est plus capt\xe9 depuis plus de 5 minutes.`),this.mapService.hasBooted?yield this.router.navigateByUrl(`/${this.mapService.view$.value.toURL()}`):yield this.router.navigateByUrl("/"),void this.changeDetectorRef.markForCheck();if(!t.entity)return;this.loading=!1;const e=t.entity;this.mapService.hasBooted||this.mapService.locate([e.lon,e.lat]),this.titleService.setTitle(`A\xe9ronef ${e.callsign||"?"} / ${e.icao} - ANAIS`),this.aircraft=e,this.changeDetectorRef.markForCheck()})),this.activatedRoute.paramMap.subscribe(t=>{this.loading=!0,this.icao=t.get("icao"),this.selectionService.openEntity(OP.Aircraft,this.icao),this.changeDetectorRef.markForCheck()}))}ngOnDestroy(){super.ngOnDestroy(),this.selectionService.closeOpenEntity()}locateAircraft(){this.mapService.centerOnLonLat([this.aircraft.lon,this.aircraft.lat])}locateAndZoomToAircraft(){this.mapService.locate([this.aircraft.lon,this.aircraft.lat])}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(N_),r.Pb(r.h),r.Pb(he),r.Pb(sw),r.Pb(Gl),r.Pb(cI),r.Pb(ET),r.Pb(pI),r.Pb(hI),r.Pb(xT),r.Pb(VI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-aircraft-details-panel"]],features:[r.Ab],decls:3,vars:2,consts:[[1,"panel","aircraft-details-panel"],["class","loader",4,"ngIf"],[3,"ngIf"],[1,"loader"],[1,"panel__header","d-flex-column"],[1,"d-flex"],[1,"ma-1",3,"flag"],[1,"ma-1","u-flex"],[1,"aircraft-details-panel__name"],[1,"aircraft-details-panel__type"],[1,"aircraft-details-panel__reception"],[3,"title"],["target","_blank","rel","noopener","referrerpolicy","no-referrer","title","Voir la photo",3,"href",4,"ngIf"],["mat-button","","title","Centrer la vue sur l'a\xe9ronef",1,"aircraft-details-panel__action",3,"click","dblclick"],["mat-button","","title","Ouvrir la page ADSB Exchange","target","_blank","rel","noopener","referrerpolicy","no-referrer",1,"aircraft-details-panel__action",3,"href"],["src","/assets/images/adsbexchange-icon.png","width","20","alt","ADSB Exchange"],["mat-button","","class","aircraft-details-panel__action","title","Ouvrir la page Flightradar24","target","_blank","rel","noopener","referrerpolicy","no-referrer",3,"href",4,"ngIf"],["mat-button","",1,"aircraft-details-panel__action",3,"title","click"],["color",""],[1,"aircraft-details-panel__infos",3,"aircraft","full"],["target","_blank","rel","noopener","referrerpolicy","no-referrer","title","Voir la photo",3,"href"],["referrerpolicy","no-referrer",1,"d-block",2,"display","none",3,"src","load","error"],["mat-button","","title","Ouvrir la page Flightradar24","target","_blank","rel","noopener","referrerpolicy","no-referrer",1,"aircraft-details-panel__action",3,"href"],["src","/assets/images/flightradar24-icon.png","width","20","alt","Flightradar24"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Ic(1,tL,1,0,"div",1),r.Ic(2,nL,28,21,"ng-template",2),r.Ub()),2&t&&(r.Db(1),r.nc("ngIf",e.loading),r.Db(1),r.nc("ngIf",!e.loading&&e.aircraft))},directives:[ut,GF,Dl,Yp,Il,GT,XF],pipes:[Tx,kt,St],styles:[".aircraft-details-panel[_ngcontent-%COMP%]{max-width:310px}.aircraft-details-panel__name[_ngcontent-%COMP%]{font-size:1.4em;font-weight:500}.aircraft-details-panel__type[_ngcontent-%COMP%]{font-size:.9em;color:#432e2e}.aircraft-details-panel__reception[_ngcontent-%COMP%]{font-size:14px;padding-left:.5em;padding-right:.5em;padding-bottom:.5em}.aircraft-details-panel__action[_ngcontent-%COMP%]{flex:1;min-width:inherit}.aircraft-details-panel__infos[_ngcontent-%COMP%]{font-size:.9em}.aircraft-details-panel__section[_ngcontent-%COMP%]{margin-top:.4em}.aircraft-details-panel__section--nopadding[_ngcontent-%COMP%] .mat-expansion-panel-body[_ngcontent-%COMP%]{padding:0}.aircraft-details-panel__section-row[_ngcontent-%COMP%]{display:flex}.aircraft-details-panel__subheader[_ngcontent-%COMP%]{background-color:#abb8cb}.aircraft-details-panel__subheader[_ngcontent-%COMP%]:focus, .aircraft-details-panel__subheader[_ngcontent-%COMP%]:hover{background-color:#bbc5d5!important}.aircraft-details-panel__label[_ngcontent-%COMP%]{font-weight:300}"],changeDetection:0}),t})(),sL=(()=>{class t{constructor(t,e,i){this.drawingService=t,this.zonesLayerService=e,this.zonesService=i,this.editedZone$=new Av.a(null),this.tooManyHexagons$=new Av.a(!1),this.editedZone$.subscribe(t=>{this.tooManyHexagons$.next(t&&t.h3indexes.length>130)})}clear(){this.editedZone$.next(null)}startEditing(t){this.editedZone$.next(t),this.zonesLayerService.clear(),this.drawingSubscription=this.drawingService.editZone(t.h3indexes).subscribe(t=>{this.updateZoneH3Indexes(t),this.zonesLayerService.updateZones([{name:"",h3indexes:this.editedZone$.value.h3indexes}])})}updateZoneName(t){this.editedZone$.value.name=t,this.editedZone$.next(this.editedZone$.value)}updateZoneH3Indexes(t){this.editedZone$.value.h3indexes=t,this.editedZone$.next(this.editedZone$.value)}saveEditedZone(){return Object(ue.a)(this,void 0,void 0,function*(){const t=this.editedZone$.value;if(!t.name||0===t.h3indexes.length)throw new Error("La zone est incompl\xe8te");if(t.h3indexes.length>130)throw new Error(`La zone contient trop d'hexagones : ${t.h3indexes.length} / 130 maximum`);return t.id?yield this.zonesService.updateZone(t):t.id=yield this.zonesService.createZone(t),this.cancelEditing(),t})}cancelEditing(){this.drawingSubscription&&this.drawingSubscription.unsubscribe(),this.editedZone$.next(null),this.drawingService.stopEditingZone()}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(TP),r.Zb(DT),r.Zb(kP))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),oL=(()=>{class t{validate(t){return(t=>{var e;const i=t.get("aisInterruption"),n=t.get("transhipment"),r=t.get("erraticRoute"),s=t.get("speed"),o=t.get("passageInZone"),a=t.get("spoofing"),l=t.get("zone");if(!(i&&n&&r&&s&&o&&a))return null;const c=[i,n,r,s,o,a];if(c.some(t=>!t.value))return null;const h={};return c.every(t=>!t.value.enable)&&(h.missingCriterion=!0),(null===(e=l.value)||void 0===e?void 0:e.zones.length)>0||(h.missingZone=!0),h})(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","appAlertRule",""]],features:[r.Cb([{provide:hc,useExisting:t,multi:!0}])]}),t})();const aL=["*"],lL=new r.s("MatChipRemove"),cL=new r.s("MatChipAvatar"),hL=new r.s("MatChipTrailingIcon");class uL{constructor(t){this._elementRef=t}}const dL=Ia(Ea(Da(uL),"primary"),-1);let pL=(()=>{class t extends dL{constructor(t,e,i,n,s,o,a,l){super(t),this._elementRef=t,this._ngZone=e,this._changeDetectorRef=s,this._hasFocus=!1,this.chipListSelectable=!0,this._chipListMultiple=!1,this._chipListDisabled=!1,this._selected=!1,this._selectable=!0,this._disabled=!1,this._removable=!0,this._onFocus=new _e.a,this._onBlur=new _e.a,this.selectionChange=new r.o,this.destroyed=new r.o,this.removed=new r.o,this._addHostClassName(),this._chipRippleTarget=o.createElement("div"),this._chipRippleTarget.classList.add("mat-chip-ripple"),this._elementRef.nativeElement.appendChild(this._chipRippleTarget),this._chipRipple=new tl(this,e,this._chipRippleTarget,i),this._chipRipple.setupTriggerEvents(t),this.rippleConfig=n||{},this._animationsDisabled="NoopAnimations"===a,this.tabIndex=null!=l&&parseInt(l)||-1}get rippleDisabled(){return this.disabled||this.disableRipple||this._animationsDisabled||!!this.rippleConfig.disabled}get selected(){return this._selected}set selected(t){const e=ti(t);e!==this._selected&&(this._selected=e,this._dispatchSelectionChange())}get value(){return void 0!==this._value?this._value:this._elementRef.nativeElement.textContent}set value(t){this._value=t}get selectable(){return this._selectable&&this.chipListSelectable}set selectable(t){this._selectable=ti(t)}get disabled(){return this._chipListDisabled||this._disabled}set disabled(t){this._disabled=ti(t)}get removable(){return this._removable}set removable(t){this._removable=ti(t)}get ariaSelected(){return this.selectable&&(this._chipListMultiple||this.selected)?this.selected.toString():null}_addHostClassName(){const t=this._elementRef.nativeElement;t.hasAttribute("mat-basic-chip")||"mat-basic-chip"===t.tagName.toLowerCase()?t.classList.add("mat-basic-chip"):t.classList.add("mat-standard-chip")}ngOnDestroy(){this.destroyed.emit({chip:this}),this._chipRipple._removeTriggerEvents()}select(){this._selected||(this._selected=!0,this._dispatchSelectionChange(),this._changeDetectorRef.markForCheck())}deselect(){this._selected&&(this._selected=!1,this._dispatchSelectionChange(),this._changeDetectorRef.markForCheck())}selectViaInteraction(){this._selected||(this._selected=!0,this._dispatchSelectionChange(!0),this._changeDetectorRef.markForCheck())}toggleSelected(t=!1){return this._selected=!this.selected,this._dispatchSelectionChange(t),this._changeDetectorRef.markForCheck(),this.selected}focus(){this._hasFocus||(this._elementRef.nativeElement.focus(),this._onFocus.next({chip:this})),this._hasFocus=!0}remove(){this.removable&&this.removed.emit({chip:this})}_handleClick(t){this.disabled?t.preventDefault():t.stopPropagation()}_handleKeydown(t){if(!this.disabled)switch(t.keyCode){case 46:case 8:this.remove(),t.preventDefault();break;case 32:this.selectable&&this.toggleSelected(!0),t.preventDefault()}}_blur(){this._ngZone.onStable.pipe(Qe(1)).subscribe(()=>{this._ngZone.run(()=>{this._hasFocus=!1,this._onBlur.next({chip:this})})})}_dispatchSelectionChange(t=!1){this.selectionChange.emit({source:this,isUserInput:t,selected:this._selected})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.B),r.Pb(ci),r.Pb(el,8),r.Pb(r.h),r.Pb(a),r.Pb(pa,8),r.ac("tabindex"))},t.\u0275dir=r.Kb({type:t,selectors:[["mat-basic-chip"],["","mat-basic-chip",""],["mat-chip"],["","mat-chip",""]],contentQueries:function(t,e,i){if(1&t&&(r.Ib(i,cL,1),r.Ib(i,hL,1),r.Ib(i,lL,1)),2&t){let t;r.vc(t=r.dc())&&(e.avatar=t.first),r.vc(t=r.dc())&&(e.trailingIcon=t.first),r.vc(t=r.dc())&&(e.removeIcon=t.first)}},hostAttrs:["role","option",1,"mat-chip","mat-focus-indicator"],hostVars:14,hostBindings:function(t,e){1&t&&r.cc("click",function(t){return e._handleClick(t)})("keydown",function(t){return e._handleKeydown(t)})("focus",function(){return e.focus()})("blur",function(){return e._blur()}),2&t&&(r.Eb("tabindex",e.disabled?null:e.tabIndex)("disabled",e.disabled||null)("aria-disabled",e.disabled.toString())("aria-selected",e.ariaSelected),r.Hb("mat-chip-selected",e.selected)("mat-chip-with-avatar",e.avatar)("mat-chip-with-trailing-icon",e.trailingIcon||e.removeIcon)("mat-chip-disabled",e.disabled)("_mat-animation-noopable",e._animationsDisabled))},inputs:{color:"color",disableRipple:"disableRipple",tabIndex:"tabIndex",selected:"selected",value:"value",selectable:"selectable",disabled:"disabled",removable:"removable"},outputs:{selectionChange:"selectionChange",destroyed:"destroyed",removed:"removed"},exportAs:["matChip"],features:[r.Ab]}),t})(),fL=(()=>{class t{constructor(t,e){this._parentChip=t,"BUTTON"===e.nativeElement.nodeName&&e.nativeElement.setAttribute("type","button")}_handleClick(t){const e=this._parentChip;e.removable&&!e.disabled&&e.remove(),t.stopPropagation()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(pL),r.Pb(r.l))},t.\u0275dir=r.Kb({type:t,selectors:[["","matChipRemove",""]],hostAttrs:[1,"mat-chip-remove","mat-chip-trailing-icon"],hostBindings:function(t,e){1&t&&r.cc("click",function(t){return e._handleClick(t)})},features:[r.Cb([{provide:lL,useExisting:t}])]}),t})();const mL=new r.s("mat-chips-default-options");class gL{constructor(t,e,i,n){this._defaultErrorStateMatcher=t,this._parentForm=e,this._parentFormGroup=i,this.ngControl=n}}const AL=Pa(gL);let bL=0;class vL{constructor(t,e){this.source=t,this.value=e}}let _L=(()=>{class t extends AL{constructor(t,e,i,n,s,o,a){super(o,n,s,a),this._elementRef=t,this._changeDetectorRef=e,this._dir=i,this.ngControl=a,this.controlType="mat-chip-list",this._lastDestroyedChipIndex=null,this._destroyed=new _e.a,this._uid="mat-chip-list-"+bL++,this._tabIndex=0,this._userTabIndex=null,this._onTouched=()=>{},this._onChange=()=>{},this._multiple=!1,this._compareWith=(t,e)=>t===e,this._required=!1,this._disabled=!1,this.ariaOrientation="horizontal",this._selectable=!0,this.change=new r.o,this.valueChange=new r.o,this.ngControl&&(this.ngControl.valueAccessor=this)}get selected(){return this.multiple?this._selectionModel.selected:this._selectionModel.selected[0]}get role(){return this.empty?null:"listbox"}get multiple(){return this._multiple}set multiple(t){this._multiple=ti(t),this._syncChipsState()}get compareWith(){return this._compareWith}set compareWith(t){this._compareWith=t,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(t){this.writeValue(t),this._value=t}get id(){return this._chipInput?this._chipInput.id:this._uid}get required(){return this._required}set required(t){this._required=ti(t),this.stateChanges.next()}get placeholder(){return this._chipInput?this._chipInput.placeholder:this._placeholder}set placeholder(t){this._placeholder=t,this.stateChanges.next()}get focused(){return this._chipInput&&this._chipInput.focused||this._hasFocusedChip()}get empty(){return(!this._chipInput||this._chipInput.empty)&&(!this.chips||0===this.chips.length)}get shouldLabelFloat(){return!this.empty||this.focused}get disabled(){return this.ngControl?!!this.ngControl.disabled:this._disabled}set disabled(t){this._disabled=ti(t),this._syncChipsState()}get selectable(){return this._selectable}set selectable(t){this._selectable=ti(t),this.chips&&this.chips.forEach(t=>t.chipListSelectable=this._selectable)}set tabIndex(t){this._userTabIndex=t,this._tabIndex=t}get chipSelectionChanges(){return Object(or.a)(...this.chips.map(t=>t.selectionChange))}get chipFocusChanges(){return Object(or.a)(...this.chips.map(t=>t._onFocus))}get chipBlurChanges(){return Object(or.a)(...this.chips.map(t=>t._onBlur))}get chipRemoveChanges(){return Object(or.a)(...this.chips.map(t=>t.destroyed))}ngAfterContentInit(){this._keyManager=new Ri(this.chips).withWrap().withVerticalOrientation().withHomeAndEnd().withHorizontalOrientation(this._dir?this._dir.value:"ltr"),this._dir&&this._dir.change.pipe(Sn(this._destroyed)).subscribe(t=>this._keyManager.withHorizontalOrientation(t)),this._keyManager.tabOut.pipe(Sn(this._destroyed)).subscribe(()=>{this._allowFocusEscape()}),this.chips.changes.pipe(Pn(null),Sn(this._destroyed)).subscribe(()=>{this.disabled&&Promise.resolve().then(()=>{this._syncChipsState()}),this._resetChips(),this._initializeSelection(),this._updateTabIndex(),this._updateFocusForDestroyedChips(),this.stateChanges.next()})}ngOnInit(){this._selectionModel=new Xn(this.multiple,void 0,!1),this.stateChanges.next()}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==this._disabled&&(this.disabled=!!this.ngControl.disabled))}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete(),this.stateChanges.complete(),this._dropSubscriptions()}registerInput(t){this._chipInput=t,this._elementRef.nativeElement.setAttribute("data-mat-chip-input",t.id)}setDescribedByIds(t){this._ariaDescribedby=t.join(" ")}writeValue(t){this.chips&&this._setSelectionByValue(t,!1)}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t,this.stateChanges.next()}onContainerClick(t){this._originatesFromChip(t)||this.focus()}focus(t){this.disabled||this._chipInput&&this._chipInput.focused||(this.chips.length>0?(this._keyManager.setFirstItemActive(),this.stateChanges.next()):(this._focusInput(t),this.stateChanges.next()))}_focusInput(t){this._chipInput&&this._chipInput.focus(t)}_keydown(t){const e=t.target;8===t.keyCode&&this._isInputEmpty(e)?(this._keyManager.setLastItemActive(),t.preventDefault()):e&&e.classList.contains("mat-chip")&&(this._keyManager.onKeydown(t),this.stateChanges.next())}_updateTabIndex(){this._tabIndex=this._userTabIndex||(0===this.chips.length?-1:0)}_updateFocusForDestroyedChips(){if(null!=this._lastDestroyedChipIndex)if(this.chips.length){const t=Math.min(this._lastDestroyedChipIndex,this.chips.length-1);this._keyManager.setActiveItem(t)}else this.focus();this._lastDestroyedChipIndex=null}_isValidIndex(t){return t>=0&&t<this.chips.length}_isInputEmpty(t){return!(!t||"input"!==t.nodeName.toLowerCase()||t.value)}_setSelectionByValue(t,e=!0){if(this._clearSelection(),this.chips.forEach(t=>t.deselect()),Array.isArray(t))t.forEach(t=>this._selectValue(t,e)),this._sortValues();else{const i=this._selectValue(t,e);i&&e&&this._keyManager.setActiveItem(i)}}_selectValue(t,e=!0){const i=this.chips.find(e=>null!=e.value&&this._compareWith(e.value,t));return i&&(e?i.selectViaInteraction():i.select(),this._selectionModel.select(i)),i}_initializeSelection(){Promise.resolve().then(()=>{(this.ngControl||this._value)&&(this._setSelectionByValue(this.ngControl?this.ngControl.value:this._value,!1),this.stateChanges.next())})}_clearSelection(t){this._selectionModel.clear(),this.chips.forEach(e=>{e!==t&&e.deselect()}),this.stateChanges.next()}_sortValues(){this._multiple&&(this._selectionModel.clear(),this.chips.forEach(t=>{t.selected&&this._selectionModel.select(t)}),this.stateChanges.next())}_propagateChanges(t){let e=null;e=Array.isArray(this.selected)?this.selected.map(t=>t.value):this.selected?this.selected.value:t,this._value=e,this.change.emit(new vL(this,e)),this.valueChange.emit(e),this._onChange(e),this._changeDetectorRef.markForCheck()}_blur(){this._hasFocusedChip()||this._keyManager.setActiveItem(-1),this.disabled||(this._chipInput?setTimeout(()=>{this.focused||this._markAsTouched()}):this._markAsTouched())}_markAsTouched(){this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next()}_allowFocusEscape(){-1!==this._tabIndex&&(this._tabIndex=-1,setTimeout(()=>{this._tabIndex=this._userTabIndex||0,this._changeDetectorRef.markForCheck()}))}_resetChips(){this._dropSubscriptions(),this._listenToChipsFocus(),this._listenToChipsSelection(),this._listenToChipsRemoved()}_dropSubscriptions(){this._chipFocusSubscription&&(this._chipFocusSubscription.unsubscribe(),this._chipFocusSubscription=null),this._chipBlurSubscription&&(this._chipBlurSubscription.unsubscribe(),this._chipBlurSubscription=null),this._chipSelectionSubscription&&(this._chipSelectionSubscription.unsubscribe(),this._chipSelectionSubscription=null),this._chipRemoveSubscription&&(this._chipRemoveSubscription.unsubscribe(),this._chipRemoveSubscription=null)}_listenToChipsSelection(){this._chipSelectionSubscription=this.chipSelectionChanges.subscribe(t=>{t.source.selected?this._selectionModel.select(t.source):this._selectionModel.deselect(t.source),this.multiple||this.chips.forEach(t=>{!this._selectionModel.isSelected(t)&&t.selected&&t.deselect()}),t.isUserInput&&this._propagateChanges()})}_listenToChipsFocus(){this._chipFocusSubscription=this.chipFocusChanges.subscribe(t=>{let e=this.chips.toArray().indexOf(t.chip);this._isValidIndex(e)&&this._keyManager.updateActiveItem(e),this.stateChanges.next()}),this._chipBlurSubscription=this.chipBlurChanges.subscribe(()=>{this._blur(),this.stateChanges.next()})}_listenToChipsRemoved(){this._chipRemoveSubscription=this.chipRemoveChanges.subscribe(t=>{const e=t.chip,i=this.chips.toArray().indexOf(t.chip);this._isValidIndex(i)&&e._hasFocus&&(this._lastDestroyedChipIndex=i)})}_originatesFromChip(t){let e=t.target;for(;e&&e!==this._elementRef.nativeElement;){if(e.classList.contains("mat-chip"))return!0;e=e.parentElement}return!1}_hasFocusedChip(){return this.chips&&this.chips.some(t=>t._hasFocus)}_syncChipsState(){this.chips&&this.chips.forEach(t=>{t._chipListDisabled=this._disabled,t._chipListMultiple=this.multiple})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.h),r.Pb(Zn,8),r.Pb(oh,8),r.Pb(_h,8),r.Pb($a),r.Pb(Tc,10))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-chip-list"]],contentQueries:function(t,e,i){if(1&t&&r.Ib(i,pL,1),2&t){let t;r.vc(t=r.dc())&&(e.chips=t)}},hostAttrs:[1,"mat-chip-list"],hostVars:15,hostBindings:function(t,e){1&t&&r.cc("focus",function(){return e.focus()})("blur",function(){return e._blur()})("keydown",function(t){return e._keydown(t)}),2&t&&(r.Yb("id",e._uid),r.Eb("tabindex",e.disabled?null:e._tabIndex)("aria-describedby",e._ariaDescribedby||null)("aria-required",e.role?e.required:null)("aria-disabled",e.disabled.toString())("aria-invalid",e.errorState)("aria-multiselectable",e.multiple)("role",e.role)("aria-orientation",e.ariaOrientation),r.Hb("mat-chip-list-disabled",e.disabled)("mat-chip-list-invalid",e.errorState)("mat-chip-list-required",e.required))},inputs:{ariaOrientation:["aria-orientation","ariaOrientation"],multiple:"multiple",compareWith:"compareWith",value:"value",required:"required",placeholder:"placeholder",disabled:"disabled",selectable:"selectable",tabIndex:"tabIndex",errorStateMatcher:"errorStateMatcher"},outputs:{change:"change",valueChange:"valueChange"},exportAs:["matChipList"],features:[r.Cb([{provide:su,useExisting:t}]),r.Ab],ngContentSelectors:aL,decls:2,vars:0,consts:[[1,"mat-chip-list-wrapper"]],template:function(t,e){1&t&&(r.mc(),r.Vb(0,"div",0),r.lc(1),r.Ub())},styles:['.mat-chip{position:relative;box-sizing:border-box;-webkit-tap-highlight-color:transparent;transform:translateZ(0);border:none;-webkit-appearance:none;-moz-appearance:none}.mat-standard-chip{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);display:inline-flex;padding:7px 12px;border-radius:16px;align-items:center;cursor:default;min-height:32px;height:1px}._mat-animation-noopable.mat-standard-chip{transition:none;animation:none}.mat-standard-chip .mat-chip-remove.mat-icon{width:18px;height:18px}.mat-standard-chip::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;opacity:0;content:"";pointer-events:none;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-standard-chip:hover::after{opacity:.12}.mat-standard-chip:focus{outline:none}.mat-standard-chip:focus::after{opacity:.16}.cdk-high-contrast-active .mat-standard-chip{outline:solid 1px}.cdk-high-contrast-active .mat-standard-chip:focus{outline:dotted 2px}.mat-standard-chip.mat-chip-disabled::after{opacity:0}.mat-standard-chip.mat-chip-disabled .mat-chip-remove,.mat-standard-chip.mat-chip-disabled .mat-chip-trailing-icon{cursor:default}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar,.mat-standard-chip.mat-chip-with-avatar{padding-top:0;padding-bottom:0}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-right:8px;padding-left:0}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-left:8px;padding-right:0}.mat-standard-chip.mat-chip-with-trailing-icon{padding-top:7px;padding-bottom:7px;padding-right:8px;padding-left:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon{padding-left:8px;padding-right:12px}.mat-standard-chip.mat-chip-with-avatar{padding-left:0;padding-right:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-avatar{padding-right:0;padding-left:12px}.mat-standard-chip .mat-chip-avatar{width:24px;height:24px;margin-right:8px;margin-left:4px}[dir=rtl] .mat-standard-chip .mat-chip-avatar{margin-left:8px;margin-right:4px}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{width:18px;height:18px;cursor:pointer}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-standard-chip .mat-chip-remove,[dir=rtl] .mat-standard-chip .mat-chip-trailing-icon{margin-right:8px;margin-left:0}.mat-chip-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit;overflow:hidden}.mat-chip-list-wrapper{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;margin:-4px}.mat-chip-list-wrapper input.mat-input-element,.mat-chip-list-wrapper .mat-standard-chip{margin:4px}.mat-chip-list-stacked .mat-chip-list-wrapper{flex-direction:column;align-items:flex-start}.mat-chip-list-stacked .mat-chip-list-wrapper .mat-standard-chip{width:100%}.mat-chip-avatar{border-radius:50%;justify-content:center;align-items:center;display:flex;overflow:hidden;object-fit:cover}input.mat-chip-input{width:150px;margin:4px;flex:1 0 150px}\n'],encapsulation:2,changeDetection:0}),t})();const yL={separatorKeyCodes:[13]};let wL=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[$a,{provide:mL,useValue:yL}],imports:[[Sa]]}),t})(),xL=(()=>{class t{constructor(){this.glitters=[];try{this.glitters=JSON.parse(localStorage.getItem("anais-seen-glitters"))||[]}catch($nt){}}viewItem(t){this.glitters.includes(t)||(this.glitters.push(t),localStorage.setItem("anais-seen-glitters",JSON.stringify(this.glitters)))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function CL(t,e){if(1&t&&r.Qb(0,"div",1),2&t){const t=e.$implicit;r.Fc("left",t.x)("top",t.y),r.nc("ngClass","glitter__star glitter__star--delay-"+t.delay)}}const SL=["*"],kL=[200,800,1400,2e3,2600],EL=new Date((new Date).setMonth((new Date).getMonth()-2));let DL=(()=>{class t{constructor(t,e,i){this.changeDetectorRef=t,this.elementRef=e,this.glitterService=i,this.stars=[],this.active=!1,this.clickListener=()=>{this.stopGlitter()}}ngOnInit(){this.changeDetectorRef.detach(),this.active=!this.glitterService.glitters.includes(this.gid)&&(!this.date||new Date(this.date)>EL),this.elementRef.nativeElement.addEventListener("click",this.clickListener,!0),this.changeDetectorRef.detectChanges()}ngOnDestroy(){this.elementRef.nativeElement.removeEventListener("click",this.clickListener,!0)}ngAfterViewInit(){if(!this.active)return;let t;if(this.width&&this.height)t={clientWidth:this.width,clientHeight:this.height};else{if(t=this.elementRef.nativeElement.children[0],!t)throw new Error(`Missing child element for glitter ${this.gid}`);for(;0===t.clientHeight||0===t.clientWidth;)if(t=t.children[0],!t)return}const e=.05*t.clientWidth;this.minX=e,this.maxX=t.clientWidth-16-e;const i=.05*t.clientHeight;this.minY=i,this.maxY=t.clientHeight-16-i,kL.forEach(t=>{setTimeout(()=>{this.createStar(t),this.changeDetectorRef.detectChanges()},t)})}createStar(t){this.stars.push({x:`${this.minX+Math.random()*(this.maxX-this.minX)}px`,y:`${this.minY+Math.random()*(this.maxY-this.minY)}px`,delay:t})}stopGlitter(){this.active&&(this.glitterService.viewItem(this.gid),this.stars=[],this.changeDetectorRef.detectChanges())}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(r.l),r.Pb(xL))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-glitter"]],inputs:{gid:"gid",date:"date",width:"width",height:"height"},ngContentSelectors:SL,decls:2,vars:1,consts:[[3,"ngClass","left","top",4,"ngFor","ngForOf"],[3,"ngClass"]],template:function(t,e){1&t&&(r.mc(),r.lc(0),r.Ic(1,CL,1,5,"div",0)),2&t&&(r.Db(1),r.nc("ngForOf",e.stars))},directives:[ct,at],styles:['[_nghost-%COMP%]{position:relative;display:block;line-height:0}.glitter__star[_ngcontent-%COMP%]{content:" ";position:absolute;background-image:url(glitter-star.76372dc0eb5e11c5d423.png);background-position:50%;height:16px;width:16px;-webkit-animation:glitter 3s linear infinite;animation:glitter 3s linear infinite;opacity:0;z-index:1;pointer-events:none;touch-action:none}.glitter__star--delay-200[_ngcontent-%COMP%]{-webkit-animation-delay:.2s;animation-delay:.2s}.glitter__star--delay-800[_ngcontent-%COMP%]{-webkit-animation-delay:.8s;animation-delay:.8s}.glitter__star--delay-1400[_ngcontent-%COMP%]{-webkit-animation-delay:1.4s;animation-delay:1.4s}.glitter__star--delay-2000[_ngcontent-%COMP%]{-webkit-animation-delay:2s;animation-delay:2s}.glitter__star--delay-2600[_ngcontent-%COMP%]{-webkit-animation-delay:2.6s;animation-delay:2.6s}@-webkit-keyframes glitter{0%{transform:scale(.3) rotate(0deg);opacity:0}25%{transform:scale(1) rotate(180deg);opacity:1}50%{transform:scale(.3) rotate(1turn);opacity:0}to{transform:scale(.3) rotate(0deg);opacity:0}}@keyframes glitter{0%{transform:scale(.3) rotate(0deg);opacity:0}25%{transform:scale(1) rotate(180deg);opacity:1}50%{transform:scale(.3) rotate(1turn);opacity:0}to{transform:scale(.3) rotate(0deg);opacity:0}}']}),t})();const IL=["thumbContainer"],PL=["toggleBar"],OL=["input"],ML=function(){return{enterDuration:150}},TL=["*"],RL=new r.s("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:!1})});let VL=0;const FL={provide:rc,useExisting:Object(r.W)(()=>NL),multi:!0};class LL{constructor(t,e){this.source=t,this.checked=e}}class UL{constructor(t){this._elementRef=t}}const BL=Ia(Ea(Da(ka(UL)),"accent"));let NL=(()=>{class t extends BL{constructor(t,e,i,n,s,o){super(t),this._focusMonitor=e,this._changeDetectorRef=i,this.defaults=s,this._animationMode=o,this._onChange=t=>{},this._onTouched=()=>{},this._uniqueId="mat-slide-toggle-"+ ++VL,this._required=!1,this._checked=!1,this.name=null,this.id=this._uniqueId,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.change=new r.o,this.toggleChange=new r.o,this.tabIndex=parseInt(n)||0}get required(){return this._required}set required(t){this._required=ti(t)}get checked(){return this._checked}set checked(t){this._checked=ti(t),this._changeDetectorRef.markForCheck()}get inputId(){return`${this.id||this._uniqueId}-input`}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{"keyboard"===t||"program"===t?this._inputElement.nativeElement.focus():t||Promise.resolve().then(()=>this._onTouched())})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}_onChangeEvent(t){t.stopPropagation(),this.toggleChange.emit(),this.defaults.disableToggleValue?this._inputElement.nativeElement.checked=this.checked:(this.checked=this._inputElement.nativeElement.checked,this._emitChangeEvent())}_onInputClick(t){t.stopPropagation()}writeValue(t){this.checked=!!t}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t,this._changeDetectorRef.markForCheck()}focus(t,e){e?this._focusMonitor.focusVia(this._inputElement,e,t):this._inputElement.nativeElement.focus(t)}toggle(){this.checked=!this.checked,this._onChange(this.checked)}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(new LL(this,this.checked))}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(qi),r.Pb(r.h),r.ac("tabindex"),r.Pb(RL),r.Pb(pa,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-slide-toggle"]],viewQuery:function(t,e){if(1&t&&(r.Pc(IL,1),r.Pc(PL,1),r.Pc(OL,1)),2&t){let t;r.vc(t=r.dc())&&(e._thumbEl=t.first),r.vc(t=r.dc())&&(e._thumbBarEl=t.first),r.vc(t=r.dc())&&(e._inputElement=t.first)}},hostAttrs:[1,"mat-slide-toggle"],hostVars:12,hostBindings:function(t,e){2&t&&(r.Yb("id",e.id),r.Eb("tabindex",e.disabled?null:-1)("aria-label",null)("aria-labelledby",null),r.Hb("mat-checked",e.checked)("mat-disabled",e.disabled)("mat-slide-toggle-label-before","before"==e.labelPosition)("_mat-animation-noopable","NoopAnimations"===e._animationMode))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex",name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],required:"required",checked:"checked"},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],features:[r.Cb([FL]),r.Ab],ngContentSelectors:TL,decls:16,vars:18,consts:[[1,"mat-slide-toggle-label"],["label",""],[1,"mat-slide-toggle-bar"],["toggleBar",""],["type","checkbox","role","switch",1,"mat-slide-toggle-input","cdk-visually-hidden",3,"id","required","tabIndex","checked","disabled","change","click"],["input",""],[1,"mat-slide-toggle-thumb-container"],["thumbContainer",""],[1,"mat-slide-toggle-thumb"],["mat-ripple","",1,"mat-slide-toggle-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered","matRippleRadius","matRippleAnimation"],[1,"mat-ripple-element","mat-slide-toggle-persistent-ripple"],[1,"mat-slide-toggle-content",3,"cdkObserveContent"],["labelContent",""],[2,"display","none"]],template:function(t,e){if(1&t&&(r.mc(),r.Vb(0,"label",0,1),r.Vb(2,"div",2,3),r.Vb(4,"input",4,5),r.cc("change",function(t){return e._onChangeEvent(t)})("click",function(t){return e._onInputClick(t)}),r.Ub(),r.Vb(6,"div",6,7),r.Qb(8,"div",8),r.Vb(9,"div",9),r.Qb(10,"div",10),r.Ub(),r.Ub(),r.Ub(),r.Vb(11,"span",11,12),r.cc("cdkObserveContent",function(){return e._onLabelTextChange()}),r.Vb(13,"span",13),r.Kc(14,"\xa0"),r.Ub(),r.lc(15),r.Ub(),r.Ub()),2&t){const t=r.wc(1),i=r.wc(12);r.Eb("for",e.inputId),r.Db(2),r.Hb("mat-slide-toggle-bar-no-side-margin",!i.textContent||!i.textContent.trim()),r.Db(2),r.nc("id",e.inputId)("required",e.required)("tabIndex",e.tabIndex)("checked",e.checked)("disabled",e.disabled),r.Eb("name",e.name)("aria-checked",e.checked.toString())("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby),r.Db(5),r.nc("matRippleTrigger",t)("matRippleDisabled",e.disableRipple||e.disabled)("matRippleCentered",!0)("matRippleRadius",20)("matRippleAnimation",r.rc(17,ML))}},directives:[il,xi],styles:[".mat-slide-toggle{display:inline-block;height:24px;max-width:100%;line-height:24px;white-space:nowrap;outline:none;-webkit-tap-highlight-color:transparent}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(16px, 0, 0)}[dir=rtl] .mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(-16px, 0, 0)}.mat-slide-toggle.mat-disabled{opacity:.38}.mat-slide-toggle.mat-disabled .mat-slide-toggle-label,.mat-slide-toggle.mat-disabled .mat-slide-toggle-thumb-container{cursor:default}.mat-slide-toggle-label{display:flex;flex:1;flex-direction:row;align-items:center;height:inherit;cursor:pointer}.mat-slide-toggle-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-slide-toggle-label-before .mat-slide-toggle-label{order:1}.mat-slide-toggle-label-before .mat-slide-toggle-bar{order:2}[dir=rtl] .mat-slide-toggle-label-before .mat-slide-toggle-bar,.mat-slide-toggle-bar{margin-right:8px;margin-left:0}[dir=rtl] .mat-slide-toggle-bar,.mat-slide-toggle-label-before .mat-slide-toggle-bar{margin-left:8px;margin-right:0}.mat-slide-toggle-bar-no-side-margin{margin-left:0;margin-right:0}.mat-slide-toggle-thumb-container{position:absolute;z-index:1;width:20px;height:20px;top:-3px;left:0;transform:translate3d(0, 0, 0);transition:all 80ms linear;transition-property:transform}._mat-animation-noopable .mat-slide-toggle-thumb-container{transition:none}[dir=rtl] .mat-slide-toggle-thumb-container{left:auto;right:0}.mat-slide-toggle-thumb{height:20px;width:20px;border-radius:50%}.mat-slide-toggle-bar{position:relative;width:36px;height:14px;flex-shrink:0;border-radius:8px}.mat-slide-toggle-input{bottom:0;left:10px}[dir=rtl] .mat-slide-toggle-input{left:auto;right:10px}.mat-slide-toggle-bar,.mat-slide-toggle-thumb{transition:all 80ms linear;transition-property:background-color;transition-delay:50ms}._mat-animation-noopable .mat-slide-toggle-bar,._mat-animation-noopable .mat-slide-toggle-thumb{transition:none}.mat-slide-toggle .mat-slide-toggle-ripple{position:absolute;top:calc(50% - 20px);left:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-slide-toggle .mat-slide-toggle-ripple .mat-ripple-element:not(.mat-slide-toggle-persistent-ripple){opacity:.12}.mat-slide-toggle-persistent-ripple{width:100%;height:100%;transform:none}.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:.04}.mat-slide-toggle:not(.mat-disabled).cdk-keyboard-focused .mat-slide-toggle-persistent-ripple{opacity:.12}.mat-slide-toggle-persistent-ripple,.mat-slide-toggle.mat-disabled .mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:0}@media(hover: none){.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{display:none}}.cdk-high-contrast-active .mat-slide-toggle-thumb,.cdk-high-contrast-active .mat-slide-toggle-bar{border:1px solid}.cdk-high-contrast-active .mat-slide-toggle.cdk-keyboard-focused .mat-slide-toggle-bar{outline:2px dotted;outline-offset:5px}\n"],encapsulation:2,changeDetection:0}),t})(),jL=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({}),t})(),zL=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[jL,nl,Sa,Ci],jL,Sa]}),t})();const HL=["mat-menu-item",""],KL=["*"];function $L(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",0),r.cc("keydown",function(e){return r.Ac(t),r.gc()._handleKeydown(e)})("click",function(){return r.Ac(t),r.gc().closed.emit("click")})("@transformMenu.start",function(e){return r.Ac(t),r.gc()._onAnimationStart(e)})("@transformMenu.done",function(e){return r.Ac(t),r.gc()._onAnimationDone(e)}),r.Vb(1,"div",1),r.lc(2),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.nc("id",t.panelId)("ngClass",t._classList)("@transformMenu",t._panelAnimationState),r.Eb("aria-label",t.ariaLabel||null)("aria-labelledby",t.ariaLabelledby||null)("aria-describedby",t.ariaDescribedby||null)}}const GL={transformMenu:$r("transformMenu",[qr("void",Zr({opacity:0,transform:"scale(0.8)"})),Qr("void => enter",Gr("120ms cubic-bezier(0, 0, 0.2, 1)",Zr({opacity:1,transform:"scale(1)"}))),Qr("* => void",Gr("100ms 25ms linear",Zr({opacity:0})))]),fadeInItems:$r("fadeInItems",[qr("showing",Zr({opacity:1})),Qr("void => *",[Zr({opacity:0}),Gr("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},WL=new r.s("MatMenuContent"),ZL=new r.s("MAT_MENU_PANEL");class qL{}const YL=Da(ka(qL));let QL=(()=>{class t extends YL{constructor(t,e,i,n){super(),this._elementRef=t,this._focusMonitor=i,this._parentMenu=n,this.role="menuitem",this._hovered=new _e.a,this._focused=new _e.a,this._highlighted=!1,this._triggersSubmenu=!1,n&&n.addItem&&n.addItem(this)}focus(t,e){this._focusMonitor&&t?this._focusMonitor.focusVia(this._getHostElement(),t,e):this._getHostElement().focus(e),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){var t,e;const i=this._elementRef.nativeElement.cloneNode(!0),n=i.querySelectorAll("mat-icon, .material-icons");for(let r=0;r<n.length;r++){const e=n[r];null===(t=e.parentNode)||void 0===t||t.removeChild(e)}return(null===(e=i.textContent)||void 0===e?void 0:e.trim())||""}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(a),r.Pb(qi),r.Pb(ZL,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["","mat-menu-item",""]],hostAttrs:[1,"mat-focus-indicator"],hostVars:10,hostBindings:function(t,e){1&t&&r.cc("click",function(t){return e._checkDisabled(t)})("mouseenter",function(){return e._handleMouseEnter()}),2&t&&(r.Eb("role",e.role)("tabindex",e._getTabIndex())("aria-disabled",e.disabled.toString())("disabled",e.disabled||null),r.Hb("mat-menu-item",!0)("mat-menu-item-highlighted",e._highlighted)("mat-menu-item-submenu-trigger",e._triggersSubmenu))},inputs:{disabled:"disabled",disableRipple:"disableRipple",role:"role"},exportAs:["matMenuItem"],features:[r.Ab],attrs:HL,ngContentSelectors:KL,decls:2,vars:2,consts:[["matRipple","",1,"mat-menu-ripple",3,"matRippleDisabled","matRippleTrigger"]],template:function(t,e){1&t&&(r.mc(),r.lc(0),r.Qb(1,"div",0)),2&t&&(r.Db(1),r.nc("matRippleDisabled",e.disableRipple||e.disabled)("matRippleTrigger",e._getHostElement()))},directives:[il],encapsulation:2,changeDetection:0}),t})();const XL=new r.s("mat-menu-default-options",{providedIn:"root",factory:function(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});let JL=0,tU=(()=>{class t{constructor(t,e,i){this._elementRef=t,this._ngZone=e,this._defaultOptions=i,this._xPosition=this._defaultOptions.xPosition,this._yPosition=this._defaultOptions.yPosition,this._directDescendantItems=new r.F,this._tabSubscription=ye.a.EMPTY,this._classList={},this._panelAnimationState="void",this._animationDone=new _e.a,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new r.o,this.close=this.closed,this.panelId="mat-menu-panel-"+JL++}get xPosition(){return this._xPosition}set xPosition(t){this._xPosition=t,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(t){this._yPosition=t,this.setPositionClasses()}get overlapTrigger(){return this._overlapTrigger}set overlapTrigger(t){this._overlapTrigger=ti(t)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(t){this._hasBackdrop=ti(t)}set panelClass(t){const e=this._previousPanelClass;e&&e.length&&e.split(" ").forEach(t=>{this._classList[t]=!1}),this._previousPanelClass=t,t&&t.length&&(t.split(" ").forEach(t=>{this._classList[t]=!0}),this._elementRef.nativeElement.className="")}get classList(){return this.panelClass}set classList(t){this.panelClass=t}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new Ri(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._tabSubscription=this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Pn(this._directDescendantItems),Mn(t=>Object(or.a)(...t.map(t=>t._focused)))).subscribe(t=>this._keyManager.updateActiveItem(t))}ngOnDestroy(){this._directDescendantItems.destroy(),this._tabSubscription.unsubscribe(),this.closed.complete()}_hovered(){return this._directDescendantItems.changes.pipe(Pn(this._directDescendantItems),Mn(t=>Object(or.a)(...t.map(t=>t._hovered))))}addItem(t){}removeItem(t){}_handleKeydown(t){const e=t.keyCode,i=this._keyManager;switch(e){case 27:ke(t)||(t.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&"ltr"===this.direction&&this.closed.emit("keydown");break;case 39:this.parentMenu&&"rtl"===this.direction&&this.closed.emit("keydown");break;default:38!==e&&40!==e||i.setFocusOrigin("keyboard"),i.onKeydown(t)}}focusFirstItem(t="program"){this.lazyContent?this._ngZone.onStable.pipe(Qe(1)).subscribe(()=>this._focusFirstItem(t)):this._focusFirstItem(t)}_focusFirstItem(t){const e=this._keyManager;if(e.setFocusOrigin(t).setFirstItemActive(),!e.activeItem&&this._directDescendantItems.length){let t=this._directDescendantItems.first._getHostElement().parentElement;for(;t;){if("menu"===t.getAttribute("role")){t.focus();break}t=t.parentElement}}}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(t){const e=`mat-elevation-z${Math.min(4+t,24)}`,i=Object.keys(this._classList).find(t=>t.startsWith("mat-elevation-z"));i&&i!==this._previousElevation||(this._previousElevation&&(this._classList[this._previousElevation]=!1),this._classList[e]=!0,this._previousElevation=e)}setPositionClasses(t=this.xPosition,e=this.yPosition){const i=this._classList;i["mat-menu-before"]="before"===t,i["mat-menu-after"]="after"===t,i["mat-menu-above"]="above"===e,i["mat-menu-below"]="below"===e}_startAnimation(){this._panelAnimationState="enter"}_resetAnimation(){this._panelAnimationState="void"}_onAnimationDone(t){this._animationDone.next(t),this._isAnimating=!1}_onAnimationStart(t){this._isAnimating=!0,"enter"===t.toState&&0===this._keyManager.activeItemIndex&&(t.element.scrollTop=0)}_updateDirectDescendants(){this._allItems.changes.pipe(Pn(this._allItems)).subscribe(t=>{this._directDescendantItems.reset(t.filter(t=>t._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.B),r.Pb(XL))},t.\u0275dir=r.Kb({type:t,contentQueries:function(t,e,i){if(1&t&&(r.Ib(i,WL,1),r.Ib(i,QL,1),r.Ib(i,QL,0)),2&t){let t;r.vc(t=r.dc())&&(e.lazyContent=t.first),r.vc(t=r.dc())&&(e._allItems=t),r.vc(t=r.dc())&&(e.items=t)}},viewQuery:function(t,e){if(1&t&&r.Pc(r.O,1),2&t){let t;r.vc(t=r.dc())&&(e.templateRef=t.first)}},inputs:{backdropClass:"backdropClass",xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:"overlapTrigger",hasBackdrop:"hasBackdrop",panelClass:["class","panelClass"],classList:"classList",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"]},outputs:{closed:"closed",close:"close"}}),t})(),eU=(()=>{class t extends tU{constructor(t,e,i){super(t,e,i)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.B),r.Pb(XL))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-menu"]],hostVars:3,hostBindings:function(t,e){2&t&&r.Eb("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},exportAs:["matMenu"],features:[r.Cb([{provide:ZL,useExisting:t}]),r.Ab],ngContentSelectors:KL,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-menu-panel",3,"id","ngClass","keydown","click"],[1,"mat-menu-content"]],template:function(t,e){1&t&&(r.mc(),r.Ic(0,$L,3,6,"ng-template"))},directives:[at],styles:['mat-menu{display:none}.mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:4px;outline:0;min-height:64px}.mat-menu-panel.ng-animating{pointer-events:none}.cdk-high-contrast-active .mat-menu-panel{outline:solid 1px}.mat-menu-content:not(:empty){padding-top:8px;padding-bottom:8px}.mat-menu-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative}.mat-menu-item::-moz-focus-inner{border:0}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px;vertical-align:middle}.mat-menu-item .mat-icon svg{vertical-align:top}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}.mat-menu-item[disabled]{pointer-events:none}.cdk-high-contrast-active .mat-menu-item{margin-top:1px}.cdk-high-contrast-active .mat-menu-item.cdk-program-focused,.cdk-high-contrast-active .mat-menu-item.cdk-keyboard-focused,.cdk-high-contrast-active .mat-menu-item-highlighted{outline:dotted 1px}.mat-menu-item-submenu-trigger{padding-right:32px}.mat-menu-item-submenu-trigger::after{width:0;height:0;border-style:solid;border-width:5px 0 5px 5px;border-color:transparent transparent transparent currentColor;content:"";display:inline-block;position:absolute;top:50%;right:16px;transform:translateY(-50%)}[dir=rtl] .mat-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}[dir=rtl] .mat-menu-item-submenu-trigger::after{right:auto;left:16px;transform:rotateY(180deg) translateY(-50%)}button.mat-menu-item{width:100%}.mat-menu-item .mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}\n'],encapsulation:2,data:{animation:[GL.transformMenu,GL.fadeInItems]},changeDetection:0}),t})();const iU=new r.s("mat-menu-scroll-strategy"),nU={provide:iU,deps:[Fr],useFactory:function(t){return()=>t.scrollStrategies.reposition()}},rU=Ai({passive:!0});let sU=(()=>{class t{constructor(t,e,i,n,s,o,a,l){this._overlay=t,this._element=e,this._viewContainerRef=i,this._menuItemInstance=o,this._dir=a,this._focusMonitor=l,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=ye.a.EMPTY,this._hoverSubscription=ye.a.EMPTY,this._menuCloseSubscription=ye.a.EMPTY,this._handleTouchStart=t=>{Gi(t)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new r.o,this.onMenuOpen=this.menuOpened,this.menuClosed=new r.o,this.onMenuClose=this.menuClosed,this._scrollStrategy=n,this._parentMaterialMenu=s instanceof tU?s:void 0,e.nativeElement.addEventListener("touchstart",this._handleTouchStart,rU),o&&(o._triggersSubmenu=this.triggersSubmenu())}get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(t){this.menu=t}get menu(){return this._menu}set menu(t){t!==this._menu&&(this._menu=t,this._menuCloseSubscription.unsubscribe(),t&&(this._menuCloseSubscription=t.close.subscribe(t=>{this._destroyMenu(t),"click"!==t&&"tab"!==t||!this._parentMaterialMenu||this._parentMaterialMenu.closed.emit(t)})))}ngAfterContentInit(){this._checkMenu(),this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,rU),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}triggersSubmenu(){return!(!this._menuItemInstance||!this._parentMaterialMenu)}toggleMenu(){return this._menuOpen?this.closeMenu():this.openMenu()}openMenu(){if(this._menuOpen)return;this._checkMenu();const t=this._createOverlay(),e=t.getConfig();this._setPosition(e.positionStrategy),e.hasBackdrop=null==this.menu.hasBackdrop?!this.triggersSubmenu():this.menu.hasBackdrop,t.attach(this._getPortal()),this.menu.lazyContent&&this.menu.lazyContent.attach(this.menuData),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this.closeMenu()),this._initMenu(),this.menu instanceof tU&&this.menu._startAnimation()}closeMenu(){this.menu.close.emit()}focus(t,e){this._focusMonitor&&t?this._focusMonitor.focusVia(this._element,t,e):this._element.nativeElement.focus(e)}_destroyMenu(t){if(!this._overlayRef||!this.menuOpen)return;const e=this.menu;this._closingActionsSubscription.unsubscribe(),this._overlayRef.detach(),!this.restoreFocus||"keydown"!==t&&this._openedBy&&this.triggersSubmenu()||this.focus(this._openedBy),this._openedBy=void 0,e instanceof tU?(e._resetAnimation(),e.lazyContent?e._animationDone.pipe(He(t=>"void"===t.toState),Qe(1),Sn(e.lazyContent._attached)).subscribe({next:()=>e.lazyContent.detach(),complete:()=>this._setIsMenuOpen(!1)}):this._setIsMenuOpen(!1)):(this._setIsMenuOpen(!1),e.lazyContent&&e.lazyContent.detach())}_initMenu(){this.menu.parentMenu=this.triggersSubmenu()?this._parentMaterialMenu:void 0,this.menu.direction=this.dir,this._setMenuElevation(),this.menu.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0)}_setMenuElevation(){if(this.menu.setElevation){let t=0,e=this.menu.parentMenu;for(;e;)t++,e=e.parentMenu;this.menu.setElevation(t)}}_setIsMenuOpen(t){this._menuOpen=t,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&(this._menuItemInstance._highlighted=t)}_checkMenu(){}_createOverlay(){if(!this._overlayRef){const t=this._getOverlayConfig();this._subscribeToPositions(t.positionStrategy),this._overlayRef=this._overlay.create(t),this._overlayRef.keydownEvents().subscribe()}return this._overlayRef}_getOverlayConfig(){return new br({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:this.menu.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:this.menu.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir})}_subscribeToPositions(t){this.menu.setPositionClasses&&t.positionChanges.subscribe(t=>{this.menu.setPositionClasses("start"===t.connectionPair.overlayX?"after":"before","top"===t.connectionPair.overlayY?"below":"above")})}_setPosition(t){let[e,i]="before"===this.menu.xPosition?["end","start"]:["start","end"],[n,r]="above"===this.menu.yPosition?["bottom","top"]:["top","bottom"],[s,o]=[n,r],[a,l]=[e,i],c=0;this.triggersSubmenu()?(l=e="before"===this.menu.xPosition?"start":"end",i=a="end"===e?"start":"end",c="bottom"===n?8:-8):this.menu.overlapTrigger||(s="top"===n?"bottom":"top",o="top"===r?"bottom":"top"),t.withPositions([{originX:e,originY:s,overlayX:a,overlayY:n,offsetY:c},{originX:i,originY:s,overlayX:l,overlayY:n,offsetY:c},{originX:e,originY:o,overlayX:a,overlayY:r,offsetY:-c},{originX:i,originY:o,overlayX:l,overlayY:r,offsetY:-c}])}_menuClosingActions(){const t=this._overlayRef.backdropClick(),e=this._overlayRef.detachments(),i=this._parentMaterialMenu?this._parentMaterialMenu.closed:Se(),n=this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(He(t=>t!==this._menuItemInstance),He(()=>this._menuOpen)):Se();return Object(or.a)(t,i,n,e)}_handleMousedown(t){$i(t)||(this._openedBy=0===t.button?"mouse":void 0,this.triggersSubmenu()&&t.preventDefault())}_handleKeydown(t){const e=t.keyCode;13!==e&&32!==e||(this._openedBy="keyboard"),this.triggersSubmenu()&&(39===e&&"ltr"===this.dir||37===e&&"rtl"===this.dir)&&(this._openedBy="keyboard",this.openMenu())}_handleClick(t){this.triggersSubmenu()?(t.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){this.triggersSubmenu()&&this._parentMaterialMenu&&(this._hoverSubscription=this._parentMaterialMenu._hovered().pipe(He(t=>t===this._menuItemInstance&&!t.disabled),fI(0,fn)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof tU&&this.menu._isAnimating?this.menu._animationDone.pipe(Qe(1),fI(0,fn),Sn(this._parentMaterialMenu._hovered())).subscribe(()=>this.openMenu()):this.openMenu()}))}_getPortal(){return this._portal&&this._portal.templateRef===this.menu.templateRef||(this._portal=new fe(this.menu.templateRef,this._viewContainerRef)),this._portal}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Fr),r.Pb(r.l),r.Pb(r.S),r.Pb(iU),r.Pb(ZL,8),r.Pb(QL,10),r.Pb(Zn,8),r.Pb(qi))},t.\u0275dir=r.Kb({type:t,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:["aria-haspopup","true",1,"mat-menu-trigger"],hostVars:2,hostBindings:function(t,e){1&t&&r.cc("mousedown",function(t){return e._handleMousedown(t)})("keydown",function(t){return e._handleKeydown(t)})("click",function(t){return e._handleClick(t)}),2&t&&r.Eb("aria-expanded",e.menuOpen||null)("aria-controls",e.menuOpen?e.menu.panelId:null)},inputs:{restoreFocus:["matMenuTriggerRestoreFocus","restoreFocus"],_deprecatedMatMenuTriggerFor:["mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:["matMenuTriggerFor","menu"],menuData:["matMenuTriggerData","menuData"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"]}),t})(),oU=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[nU],imports:[Sa]}),t})(),aU=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[nU],imports:[[Et,Sa,nl,zr,oU],rr,Sa,oU]}),t})(),lU=(()=>{class t extends LT{constructor(t){super(),this.editZoneService=t,this.saveEmitter=new r.o,this.cancelEmitter=new r.o,this.isZoneValid=!1,this.save=()=>Object(ue.a)(this,void 0,void 0,function*(){if(this.isZoneValid){const t=yield this.editZoneService.saveEditedZone();this.saveEmitter.next(t)}})}ngOnInit(){this.editZoneService.startEditing(this.initialZone?OD(this.initialZone):function(t={}){var e,i;return Object.assign(Object.assign({},t),{name:null!==(e=t.name)&&void 0!==e?e:"",h3indexes:null!==(i=t.h3indexes)&&void 0!==i?i:[]})}()),this.subscriptions.push(this.editZoneService.editedZone$.subscribe(t=>{this.zone=t,this.isZoneValid=function(t){return!!t&&t.name&&t.h3indexes.length>0&&t.h3indexes.length<=130}(t)}))}updateZoneName(t){this.editZoneService.updateZoneName(t)}cancel(){this.editZoneService.cancelEditing(),this.cancelEmitter.next()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(sL))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-zone-form"]],inputs:{initialZone:"initialZone"},outputs:{saveEmitter:"save",cancelEmitter:"cancel"},features:[r.Ab],decls:8,vars:3,consts:[[1,"u-flex","ml-2","auto-width"],["matInput","","placeholder","Nom de la zone",3,"ngModel","ngModelChange","keyup.enter"],["mat-button","","title","Enregistrer",3,"app-async-action","disabled"],["mat-button","","title","Annuler",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"mat-form-field",0),r.Vb(1,"input",1),r.cc("ngModelChange",function(t){return e.updateZoneName(t)})("keyup.enter",function(){return e.save()}),r.Ub(),r.Ub(),r.Vb(2,"button",2),r.Vb(3,"mat-icon"),r.Kc(4,"check"),r.Ub(),r.Ub(),r.Vb(5,"button",3),r.cc("click",function(){return e.cancel()}),r.Vb(6,"mat-icon"),r.Kc(7,"cancel"),r.Ub(),r.Ub()),2&t&&(r.Db(1),r.nc("ngModel",e.zone.name),r.Db(1),r.nc("app-async-action",e.save)("disabled",!e.isZoneValid))},directives:[_u,Ou,ac,Vc,uh,Dl,dR,Yp],styles:["[_nghost-%COMP%]{display:flex}"]}),t})();function cU(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-zone-form",2),r.cc("save",function(e){return r.Ac(t),r.gc().updateZone(e)})("cancel",function(){return r.Ac(t),r.gc().hideEditForm()}),r.Ub()}if(2&t){const t=r.gc();r.nc("initialZone",t.zone)}}function hU(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",3),r.cc("click",function(){return r.Ac(t),r.gc().locate()}),r.Kc(1),r.Ub(),r.Vb(2,"button",4),r.cc("click",function(){return r.Ac(t),r.gc().showEditForm()}),r.Vb(3,"mat-icon"),r.Kc(4,"edit"),r.Ub(),r.Ub(),r.Vb(5,"button",5),r.cc("click",function(){return r.Ac(t),r.gc().deleteZone()}),r.Vb(6,"mat-icon"),r.Kc(7,"delete"),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.Db(1),r.Mc(" ",t.zone.name," "),r.Db(1),r.nc("disabled",!t.editable),r.Db(3),r.nc("disabled",!t.editable||!!t.mustDeleteAssociatedAlertRulesErrorMessage)("title",t.mustDeleteAssociatedAlertRulesErrorMessage)}}let uU=(()=>{class t extends LT{constructor(t,e,i,n){super(),this.alertRulesService=t,this.mapService=e,this.uiService=i,this.zonesService=n,this.editable=!1,this.trueDeletion=!1,this.deleteEmitter=new r.o,this.editMode=!1,this.editedZoneSubscription=new ye.a}ngOnInit(){this.ensureMandatoryInputParams("zone");const t=this.alertRulesService.alertRulesNamesByZoneId[this.zone.id]||[];this.mustDeleteAssociatedAlertRulesErrorMessage=this.trueDeletion&&t.length>0?`Cette zone est utilis\xe9e par les r\xe8gles suivantes : ${t.join(", ")}. Veuillez supprimer la zone de ces r\xe8gles avant de pouvoir supprimer cette zone.`:""}locate(){this.mapService.fitOn(wP(this.zone.h3indexes))}showEditForm(){this.editMode=!0,this.locate()}hideEditForm(){this.editMode=!1}updateZone(t){Object.assign(this.zone,t),this.hideEditForm()}deleteZone(){this.trueDeletion?this.uiService.confirm({title:"Suppression",message:"Une fois supprim\xe9e, cette zone ne sera plus accessible et sera supprim\xe9e de toute les r\xe8gles qui l'utilisent. Confirmez-vous la suppression de cette zone ?",action:t=>Object(ue.a)(this,void 0,void 0,function*(){t&&(yield this.zonesService.deleteZone(this.zone.id),this.deleteEmitter.next(null))})}):this.deleteEmitter.next(null)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(DP),r.Pb(pI),r.Pb(VI),r.Pb(kP))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-zone-item"]],inputs:{zone:"zone",editable:"editable",trueDeletion:"trueDeletion"},outputs:{deleteEmitter:"delete"},features:[r.Ab],decls:3,vars:2,consts:[[3,"ngIf","ngIfElse"],["readonly",""],[1,"u-flex",3,"initialZone","save","cancel"],["mat-button","","title","Visualiser la zone",1,"u-flex",3,"click"],["mat-button","","title","\xc9diter la zone",3,"disabled","click"],["mat-button","","title","Supprimer la zone",3,"disabled","title","click"]],template:function(t,e){if(1&t&&(r.Ic(0,cU,1,1,"ng-template",0),r.Ic(1,hU,8,4,"ng-template",null,1,r.Jc)),2&t){const t=r.wc(2);r.nc("ngIf",e.editMode)("ngIfElse",t)}},directives:[ut,lU,Dl,Yp],styles:["[_nghost-%COMP%]{display:flex}"]}),t})();const dU=["*"],pU=[[["","mat-list-avatar",""],["","mat-list-icon",""],["","matListAvatar",""],["","matListIcon",""]],[["","mat-line",""],["","matLine",""]],"*"],fU=["[mat-list-avatar], [mat-list-icon], [matListAvatar], [matListIcon]","[mat-line], [matLine]","*"];class mU{}const gU=ka(Da(mU));class AU{}const bU=Da(AU),vU=new r.s("MatList"),_U=new r.s("MatNavList");let yU=(()=>{class t extends gU{constructor(t){super(),this._elementRef=t,this._stateChanges=new _e.a,"action-list"===this._getListType()&&t.nativeElement.classList.add("mat-action-list")}_getListType(){const t=this._elementRef.nativeElement.nodeName.toLowerCase();return"mat-list"===t?"list":"mat-action-list"===t?"action-list":null}ngOnChanges(){this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-list"],["mat-action-list"]],hostAttrs:[1,"mat-list","mat-list-base"],inputs:{disableRipple:"disableRipple",disabled:"disabled"},exportAs:["matList"],features:[r.Cb([{provide:vU,useExisting:t}]),r.Ab,r.Bb],ngContentSelectors:dU,decls:1,vars:0,template:function(t,e){1&t&&(r.mc(),r.lc(0))},styles:['.mat-subheader{display:flex;box-sizing:border-box;padding:16px;align-items:center}.mat-list-base .mat-subheader{margin:0}.mat-list-base{padding-top:8px;display:block;-webkit-tap-highlight-color:transparent}.mat-list-base .mat-subheader{height:48px;line-height:16px}.mat-list-base .mat-subheader:first-child{margin-top:-8px}.mat-list-base .mat-list-item,.mat-list-base .mat-list-option{display:block;height:48px;-webkit-tap-highlight-color:transparent;width:100%;padding:0}.mat-list-base .mat-list-item .mat-list-item-content,.mat-list-base .mat-list-option .mat-list-item-content{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:0 16px;position:relative;height:inherit}.mat-list-base .mat-list-item .mat-list-item-content-reverse,.mat-list-base .mat-list-option .mat-list-item-content-reverse{display:flex;align-items:center;padding:0 16px;flex-direction:row-reverse;justify-content:space-around}.mat-list-base .mat-list-item .mat-list-item-ripple,.mat-list-base .mat-list-option .mat-list-item-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-list-base .mat-list-item.mat-list-item-with-avatar,.mat-list-base .mat-list-option.mat-list-item-with-avatar{height:56px}.mat-list-base .mat-list-item.mat-2-line,.mat-list-base .mat-list-option.mat-2-line{height:72px}.mat-list-base .mat-list-item.mat-3-line,.mat-list-base .mat-list-option.mat-3-line{height:88px}.mat-list-base .mat-list-item.mat-multi-line,.mat-list-base .mat-list-option.mat-multi-line{height:auto}.mat-list-base .mat-list-item.mat-multi-line .mat-list-item-content,.mat-list-base .mat-list-option.mat-multi-line .mat-list-item-content{padding-top:16px;padding-bottom:16px}.mat-list-base .mat-list-item .mat-list-text,.mat-list-base .mat-list-option .mat-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden;padding:0}.mat-list-base .mat-list-item .mat-list-text>*,.mat-list-base .mat-list-option .mat-list-text>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-list-base .mat-list-item .mat-list-text:empty,.mat-list-base .mat-list-option .mat-list-text:empty{display:none}.mat-list-base .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list-base .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-list-base .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list-base .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:0;padding-left:16px}[dir=rtl] .mat-list-base .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:0}.mat-list-base .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-left:0;padding-right:16px}[dir=rtl] .mat-list-base .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-right:0;padding-left:16px}.mat-list-base .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-list-base .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:16px}.mat-list-base .mat-list-item .mat-list-avatar,.mat-list-base .mat-list-option .mat-list-avatar{flex-shrink:0;width:40px;height:40px;border-radius:50%;object-fit:cover}.mat-list-base .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-list-base .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:72px;width:calc(100% - 72px)}[dir=rtl] .mat-list-base .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-list-base .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:auto;margin-right:72px}.mat-list-base .mat-list-item .mat-list-icon,.mat-list-base .mat-list-option .mat-list-icon{flex-shrink:0;width:24px;height:24px;font-size:24px;box-sizing:content-box;border-radius:50%;padding:4px}.mat-list-base .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-list-base .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:64px;width:calc(100% - 64px)}[dir=rtl] .mat-list-base .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-list-base .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:auto;margin-right:64px}.mat-list-base .mat-list-item .mat-divider,.mat-list-base .mat-list-option .mat-divider{position:absolute;bottom:0;left:0;width:100%;margin:0}[dir=rtl] .mat-list-base .mat-list-item .mat-divider,[dir=rtl] .mat-list-base .mat-list-option .mat-divider{margin-left:auto;margin-right:0}.mat-list-base .mat-list-item .mat-divider.mat-divider-inset,.mat-list-base .mat-list-option .mat-divider.mat-divider-inset{position:absolute}.mat-list-base[dense]{padding-top:4px;display:block}.mat-list-base[dense] .mat-subheader{height:40px;line-height:8px}.mat-list-base[dense] .mat-subheader:first-child{margin-top:-4px}.mat-list-base[dense] .mat-list-item,.mat-list-base[dense] .mat-list-option{display:block;height:40px;-webkit-tap-highlight-color:transparent;width:100%;padding:0}.mat-list-base[dense] .mat-list-item .mat-list-item-content,.mat-list-base[dense] .mat-list-option .mat-list-item-content{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:0 16px;position:relative;height:inherit}.mat-list-base[dense] .mat-list-item .mat-list-item-content-reverse,.mat-list-base[dense] .mat-list-option .mat-list-item-content-reverse{display:flex;align-items:center;padding:0 16px;flex-direction:row-reverse;justify-content:space-around}.mat-list-base[dense] .mat-list-item .mat-list-item-ripple,.mat-list-base[dense] .mat-list-option .mat-list-item-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar{height:48px}.mat-list-base[dense] .mat-list-item.mat-2-line,.mat-list-base[dense] .mat-list-option.mat-2-line{height:60px}.mat-list-base[dense] .mat-list-item.mat-3-line,.mat-list-base[dense] .mat-list-option.mat-3-line{height:76px}.mat-list-base[dense] .mat-list-item.mat-multi-line,.mat-list-base[dense] .mat-list-option.mat-multi-line{height:auto}.mat-list-base[dense] .mat-list-item.mat-multi-line .mat-list-item-content,.mat-list-base[dense] .mat-list-option.mat-multi-line .mat-list-item-content{padding-top:16px;padding-bottom:16px}.mat-list-base[dense] .mat-list-item .mat-list-text,.mat-list-base[dense] .mat-list-option .mat-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden;padding:0}.mat-list-base[dense] .mat-list-item .mat-list-text>*,.mat-list-base[dense] .mat-list-option .mat-list-text>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-list-base[dense] .mat-list-item .mat-list-text:empty,.mat-list-base[dense] .mat-list-option .mat-list-text:empty{display:none}.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list-base[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:0;padding-left:16px}[dir=rtl] .mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:0}.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-left:0;padding-right:16px}[dir=rtl] .mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-right:0;padding-left:16px}.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:16px}.mat-list-base[dense] .mat-list-item .mat-list-avatar,.mat-list-base[dense] .mat-list-option .mat-list-avatar{flex-shrink:0;width:36px;height:36px;border-radius:50%;object-fit:cover}.mat-list-base[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-list-base[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:68px;width:calc(100% - 68px)}[dir=rtl] .mat-list-base[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-list-base[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:auto;margin-right:68px}.mat-list-base[dense] .mat-list-item .mat-list-icon,.mat-list-base[dense] .mat-list-option .mat-list-icon{flex-shrink:0;width:20px;height:20px;font-size:20px;box-sizing:content-box;border-radius:50%;padding:4px}.mat-list-base[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-list-base[dense] .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:60px;width:calc(100% - 60px)}[dir=rtl] .mat-list-base[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-list-base[dense] .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:auto;margin-right:60px}.mat-list-base[dense] .mat-list-item .mat-divider,.mat-list-base[dense] .mat-list-option .mat-divider{position:absolute;bottom:0;left:0;width:100%;margin:0}[dir=rtl] .mat-list-base[dense] .mat-list-item .mat-divider,[dir=rtl] .mat-list-base[dense] .mat-list-option .mat-divider{margin-left:auto;margin-right:0}.mat-list-base[dense] .mat-list-item .mat-divider.mat-divider-inset,.mat-list-base[dense] .mat-list-option .mat-divider.mat-divider-inset{position:absolute}.mat-nav-list a{text-decoration:none;color:inherit}.mat-nav-list .mat-list-item{cursor:pointer;outline:none}mat-action-list button{background:none;color:inherit;border:none;font:inherit;outline:inherit;-webkit-tap-highlight-color:transparent;text-align:left}[dir=rtl] mat-action-list button{text-align:right}mat-action-list button::-moz-focus-inner{border:0}mat-action-list .mat-list-item{cursor:pointer;outline:inherit}.mat-list-option:not(.mat-list-item-disabled){cursor:pointer;outline:none}.mat-list-item-disabled{pointer-events:none}.cdk-high-contrast-active .mat-list-item-disabled{opacity:.5}.cdk-high-contrast-active :host .mat-list-item-disabled{opacity:.5}.cdk-high-contrast-active .mat-selection-list:focus{outline-style:dotted}.cdk-high-contrast-active .mat-list-option:hover,.cdk-high-contrast-active .mat-list-option:focus,.cdk-high-contrast-active .mat-nav-list .mat-list-item:hover,.cdk-high-contrast-active .mat-nav-list .mat-list-item:focus,.cdk-high-contrast-active mat-action-list .mat-list-item:hover,.cdk-high-contrast-active mat-action-list .mat-list-item:focus{outline:dotted 1px}.cdk-high-contrast-active .mat-list-single-selected-option::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}.cdk-high-contrast-active [dir=rtl] .mat-list-single-selected-option::after{right:auto;left:16px}@media(hover: none){.mat-list-option:not(.mat-list-single-selected-option):not(.mat-list-item-disabled):hover,.mat-nav-list .mat-list-item:not(.mat-list-item-disabled):hover,.mat-action-list .mat-list-item:not(.mat-list-item-disabled):hover{background:none}}\n'],encapsulation:2,changeDetection:0}),t})(),wU=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","mat-list-avatar",""],["","matListAvatar",""]],hostAttrs:[1,"mat-list-avatar"]}),t})(),xU=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","mat-list-icon",""],["","matListIcon",""]],hostAttrs:[1,"mat-list-icon"]}),t})(),CU=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","mat-subheader",""],["","matSubheader",""]],hostAttrs:[1,"mat-subheader"]}),t})(),SU=(()=>{class t extends bU{constructor(t,e,i,n){super(),this._element=t,this._isInteractiveList=!1,this._destroyed=new _e.a,this._disabled=!1,this._isInteractiveList=!!(i||n&&"action-list"===n._getListType()),this._list=i||n;const r=this._getHostElement();"button"!==r.nodeName.toLowerCase()||r.hasAttribute("type")||r.setAttribute("type","button"),this._list&&this._list._stateChanges.pipe(Sn(this._destroyed)).subscribe(()=>{e.markForCheck()})}get disabled(){return this._disabled||!(!this._list||!this._list.disabled)}set disabled(t){this._disabled=ti(t)}ngAfterContentInit(){!function(t,e,i="mat"){t.changes.pipe(Pn(t)).subscribe(({length:t})=>{Wa(e,`${i}-2-line`,!1),Wa(e,`${i}-3-line`,!1),Wa(e,`${i}-multi-line`,!1),2===t||3===t?Wa(e,`${i}-${t}-line`,!0):t>3&&Wa(e,`${i}-multi-line`,!0)})}(this._lines,this._element)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_isRippleDisabled(){return!this._isInteractiveList||this.disableRipple||!(!this._list||!this._list.disableRipple)}_getHostElement(){return this._element.nativeElement}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.h),r.Pb(_U,8),r.Pb(vU,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-list-item"],["a","mat-list-item",""],["button","mat-list-item",""]],contentQueries:function(t,e,i){if(1&t&&(r.Ib(i,wU,1),r.Ib(i,xU,1),r.Ib(i,Ga,1)),2&t){let t;r.vc(t=r.dc())&&(e._avatar=t.first),r.vc(t=r.dc())&&(e._icon=t.first),r.vc(t=r.dc())&&(e._lines=t)}},hostAttrs:[1,"mat-list-item","mat-focus-indicator"],hostVars:6,hostBindings:function(t,e){2&t&&r.Hb("mat-list-item-disabled",e.disabled)("mat-list-item-avatar",e._avatar||e._icon)("mat-list-item-with-avatar",e._avatar||e._icon)},inputs:{disableRipple:"disableRipple",disabled:"disabled"},exportAs:["matListItem"],features:[r.Ab],ngContentSelectors:fU,decls:6,vars:2,consts:[[1,"mat-list-item-content"],["mat-ripple","",1,"mat-list-item-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-list-text"]],template:function(t,e){1&t&&(r.mc(pU),r.Vb(0,"div",0),r.Qb(1,"div",1),r.lc(2),r.Vb(3,"div",2),r.lc(4,1),r.Ub(),r.lc(5,2),r.Ub()),2&t&&(r.Db(1),r.nc("matRippleTrigger",e._getHostElement())("matRippleDisabled",e._isRippleDisabled()))},directives:[il],encapsulation:2,changeDetection:0}),t})(),kU=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Za,nl,Sa,sl,Et],Za,Sa,sl,WT]}),t})();function EU(t,e){1&t&&(r.Vb(0,"div",4),r.Kc(1," Ce filtre restreint les alertes \xe0 certaines zones. "),r.Ub())}function DU(t,e){1&t&&(r.Vb(0,"div",13),r.Kc(1," Au moins une zone est n\xe9cessaire pour d\xe9finir la r\xe8gle. "),r.Ub())}function IU(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-zone-item",14),r.cc("delete",function(){r.Ac(t);const i=e.$implicit;return r.gc(2).deleteZone(i)}),r.Ub()}if(2&t){const t=e.$implicit,i=r.gc(2);r.nc("zone",t)("editable",i.zonesEditable)}}function PU(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-zone-form",15),r.cc("save",function(e){return r.Ac(t),r.gc(2).addCreatedZone(e)})("cancel",function(){return r.Ac(t),r.gc(2).hideCreateZoneForm()}),r.Ub()}}function OU(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",16),r.Vb(1,"span"),r.Kc(2,"\xa0Ajouter une zone"),r.Ub(),r.Ub(),r.Vb(3,"button",17),r.cc("click",function(){return r.Ac(t),r.gc(2).displayCreateZoneForm()}),r.Kc(4," Cr\xe9er une zone "),r.Ub()}if(2&t){r.gc();const t=r.wc(6),e=r.gc();r.nc("matMenuTriggerFor",t)("disabled",!e.zonesEditable),r.Db(3),r.nc("disabled",!e.zonesEditable)}}function MU(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",18),r.cc("click",function(){r.Ac(t);const i=e.$implicit;return r.gc(2).addZone(i)}),r.Kc(1),r.Ub()}if(2&t){const t=e.$implicit;r.Db(1),r.Mc(" ",t.name," ")}}function TU(t,e){if(1&t&&(r.Ic(0,DU,2,0,"div",5),r.Ic(1,IU,1,2,"app-zone-item",6),r.Vb(2,"div",7),r.Ic(3,PU,1,0,"app-zone-form",8),r.Ic(4,OU,5,3,"ng-template",9),r.Ub(),r.Vb(5,"mat-menu",10,11),r.Ic(7,MU,2,1,"button",12),r.Ub()),2&t){const t=r.gc();r.nc("ngIf",0===t.criterion.zones.length),r.Db(1),r.nc("ngForOf",t.criterion.zones)("ngForTrackBy",t.trackById),r.Db(2),r.nc("ngIf",t.showCreateZoneForm),r.Db(1),r.nc("ngIf",!t.showCreateZoneForm),r.Db(3),r.nc("ngForOf",t.availableZones)}}function RU(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-list-item"),r.Vb(1,"button",21),r.cc("click",function(){r.Ac(t);const i=e.$implicit;return r.gc(2).viewZone(i)}),r.Kc(2),r.Ub(),r.Ub()}if(2&t){const t=e.$implicit;r.Db(2),r.Mc(" ",t.name," ")}}function VU(t,e){if(1&t&&(r.Vb(0,"mat-list",19),r.Ic(1,RU,3,1,"mat-list-item",20),r.Ub()),2&t){const t=r.gc();r.Db(1),r.nc("ngForOf",t.criterion.zones)("ngForTrackBy",t.trackById)}}let FU=(()=>{class t extends LT{constructor(t,e,i){super(),this.editZoneService=t,this.mapService=e,this.zonesService=i,this.updateZones=new r.o,this.availableZones=[],this.showCreateZoneForm=!1,this.zonesEditable=!0,this.usedZonesIds$=new Av.a([])}ngOnInit(){this.usedZonesIds$.next(this.criterion.zones.map(t=>t.id)),this.subscriptions.push(Hg([this.zonesService.zones$,this.usedZonesIds$]).subscribe(([t,e])=>{this.availableZones=t.filter(t=>!e.includes(t.id))})),this.subscriptions.push(this.usedZonesIds$.pipe(Gg(1)).subscribe(()=>{this.updateZones.next(null)})),this.subscriptions.push(this.editZoneService.editedZone$.pipe(mn(),fI(0)).subscribe(t=>{this.zonesEditable=!t}))}displayCreateZoneForm(){this.showCreateZoneForm=!0}hideCreateZoneForm(){this.showCreateZoneForm=!1}addCreatedZone(t){this.criterion.zones.push(t),this.hideCreateZoneForm(),this.onChange(this.criterion)}viewZone(t){this.mapService.fitOn(wP(t.h3indexes))}deleteZone(t){this.criterion.zones.splice(this.criterion.zones.findIndex(e=>e===t),1),this.usedZonesIds$.next(this.usedZonesIds$.value.filter(e=>e!==t.id)),this.onChange(this.criterion)}addZone(t){this.criterion.zones.push(t),this.usedZonesIds$.next(this.usedZonesIds$.value.concat(t.id)),this.onChange(this.criterion)}trackById(t,e){return e.id}writeValue(t){this.criterion=t}registerOnChange(t){this.onChange=t}registerOnTouched(t){}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(sL),r.Pb(pI),r.Pb(kP))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-zone-filter"]],inputs:{criterion:["ngModel","criterion"],editable:"editable"},outputs:{updateZones:"updateZones"},features:[r.Cb([{provide:rc,useExisting:t,multi:!0}]),r.Ab],decls:5,vars:4,consts:[[1,"alert-rule-criterion"],["class","alert-rule-criterion__description",4,"ngIf"],[3,"ngIf","ngIfElse"],["readonly",""],[1,"alert-rule-criterion__description"],["class","alert-rule-criterion__description error-message",4,"ngIf"],[3,"zone","editable","delete",4,"ngFor","ngForOf","ngForTrackBy"],[1,"criterion-content"],["class","u-flex",3,"save","cancel",4,"ngIf"],[3,"ngIf"],[1,"add-zones-menu"],["addZonesMenu","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],[1,"alert-rule-criterion__description","error-message"],[3,"zone","editable","delete"],[1,"u-flex",3,"save","cancel"],["mat-button","","title","Ajouter une zone existante",3,"matMenuTriggerFor","disabled"],["mat-button","","title","Cr\xe9er une nouvelle zone",3,"disabled","click"],["mat-menu-item","",3,"click"],["dense",""],[4,"ngFor","ngForOf","ngForTrackBy"],["mat-button","","title","Visualiser la zone",1,"u-flex",3,"click"]],template:function(t,e){if(1&t&&(r.Vb(0,"div",0),r.Ic(1,EU,2,0,"div",1),r.Ic(2,TU,8,6,"ng-template",2),r.Ic(3,VU,2,2,"ng-template",null,3,r.Jc),r.Ub()),2&t){const t=r.wc(4);r.Eb("data-test","criterion-zone"),r.Db(1),r.nc("ngIf",e.editable),r.Db(1),r.nc("ngIf",e.editable)("ngIfElse",t)}},directives:[ut,ct,eU,uU,lU,Dl,sU,QL,yU,SU],styles:[".alert-rule-criterion[_ngcontent-%COMP%]{padding:.5em}.alert-rule-criterion__description[_ngcontent-%COMP%]{margin-bottom:.5em;font-size:14px}.add-zones-menu[_ngcontent-%COMP%]{max-height:256px}"]}),t})();const LU={speed:{key:"speed",title:"Vitesse",description:"Ce crit\xe8re d\xe9clenche une alerte si la vitesse du navire est comprise dans un intervalle."},erraticRoute:{key:"erraticRoute",title:"Route erratique",description:"Ce crit\xe8re d\xe9clenche une alerte quand un navire change plusieurs fois de direction dans un intervalle de temps court."},transhipment:{key:"transhipment",title:"Transbordement",description:"Ce crit\xe8re d\xe9clenche une alerte quand deux navires ont des positions tr\xe8s proches et une vitesse r\xe9duite pendant un intervalle de temps prolong\xe9."},aisInterruption:{key:"aisInterruption",title:"Coupure AIS",description:"Ce crit\xe8re d\xe9clenche une alerte si un navire n'\xe9met plus de donn\xe9es AIS pendant un intervalle de temps."},passageInZone:{key:"passageInZone",title:"Passage dans des zones",description:"Ce crit\xe8re d\xe9clenche une alerte si un navire passe dans certaines zones. Si plusieurs zones sont choisies, un navire doit \xeatre pass\xe9 dans toutes les zones pour d\xe9clencher une alerte."},spoofing:{key:"spoofing",title:"Spoofing AIS",description:"Ce crit\xe8re d\xe9clenche une alerte si un navire change de nom ou de MMSI en conservant le m\xeame IMO."},identifier:{key:"identifier",title:"Identifiant",description:"Ce filtre restreint les alertes aux navires dont les identifiants (nom, MMSI, IMO) correspondent \xe0 ceux recherch\xe9s."},fleet:{key:"fleet",title:"Flotte",description:"Ce filtre restreint les alertes aux navires faisant partie des flottes s\xe9lectionn\xe9es."},flag:{key:"flag",title:"Pavillon",description:"Ce filtre restreint les alertes aux navires dont le pavillon correspond \xe0 ceux recherch\xe9s."},type:{key:"type",title:"Type de navire",description:"Ce filtre restreint les alertes aux navires dont le type du navire correspond \xe0 ceux recherch\xe9s."},time:{key:"time",title:"P\xe9riode d'analyse",soon:!0,description:"Ce filtre restreint l'analyse \xe0 une p\xe9riode de temps."},zone:{key:"zone",title:"Zone",description:"Ce filtre restreint les alertes \xe0 certaines zones."}};let UU=(()=>{class t{constructor(){this.editable=!1,this.criteriaLabels=LU}get enable(){var t;return null===(t=this.criterion)||void 0===t?void 0:t.enable}set enable(t){this.criterion.enable=t,this.onChange(this.criterion)}writeValue(t){this.criterion=t}registerOnChange(t){this.onChange=t}registerOnTouched(t){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,inputs:{criterion:["ngModel","criterion"],editable:"editable"}}),t})(),BU=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-chip-coming-soon"]],decls:2,vars:0,consts:[["title","Cette fonctionnalit\xe9 n'est pas encore impl\xe9ment\xe9e mais le sera tr\xe8s bient\xf4t !",1,"chip"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Kc(1,"Bient\xf4t"),r.Ub())},styles:[".chip[_ngcontent-%COMP%] {\n display: inline-block;\n padding: 3px 6px;\n border-radius: 8px;\n font-size: .7em;\n line-height: 1.5em;\n background-color: #55575f;\n color: #ffffff;\n}"],changeDetection:0}),t})();function NU(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-slide-toggle",6),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc().enableChange.next(e)}),r.Ub()}if(2&t){const t=r.gc();r.nc("name",t.type.key)("title",t.enable?"D\xe9sactiver":"Activer")("ngModel",t.enable)("disabled",!t.editable)}}function jU(t,e){1&t&&r.Qb(0,"app-chip-coming-soon")}function zU(t,e){if(1&t&&(r.Vb(0,"div",7),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Mc(" ",t.type.description," ")}}function HU(t,e){1&t&&r.lc(0,0,["*ngIf","enable || enable === undefined"])}const KU=["*"];let $U=(()=>{class t extends LT{constructor(){super(...arguments),this.enableChange=new r.o}}return t.\u0275fac=function(e){return GU(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-alert-rule-criterion"]],inputs:{type:"type",enable:"enable",editable:"editable"},outputs:{enableChange:"enableChange"},features:[r.Ab],ngContentSelectors:KU,decls:8,vars:8,consts:[[1,"alert-rule-criterion"],[1,"alert-rule-criterion__title"],["class","alert-rule-criterion__toggle","color","primary",3,"name","title","ngModel","disabled","ngModelChange",4,"ngIf"],[1,"u-flex"],[4,"ngIf"],["class","alert-rule-criterion__description",4,"ngIf"],["color","primary",1,"alert-rule-criterion__toggle",3,"name","title","ngModel","disabled","ngModelChange"],[1,"alert-rule-criterion__description"]],template:function(t,e){1&t&&(r.mc(),r.Vb(0,"div",0),r.Vb(1,"div",1),r.Kc(2),r.Ic(3,NU,1,4,"mat-slide-toggle",2),r.Qb(4,"div",3),r.Ic(5,jU,1,0,"app-chip-coming-soon",4),r.Ub(),r.Ic(6,zU,2,1,"div",5),r.Ic(7,HU,1,0,"ng-content",4),r.Ub()),2&t&&(r.Hb("alert-rule-criterion--active",e.enable),r.Eb("data-test","criterion-"+e.type.key),r.Db(2),r.Mc(" ",e.type.title," "),r.Db(1),r.nc("ngIf",void 0!==e.enable),r.Db(2),r.nc("ngIf",e.type.soon),r.Db(1),r.nc("ngIf",e.editable),r.Db(1),r.nc("ngIf",e.enable||void 0===e.enable))},directives:[ut,NL,Vc,uh,BU],styles:[".alert-rule-criterion[_ngcontent-%COMP%]{padding:.5em}.alert-rule-criterion--active[_ngcontent-%COMP%]{background-color:#e6e9f7}.alert-rule-criterion__title[_ngcontent-%COMP%]{display:flex;margin:0;padding:.5em;color:#1515a6;font-size:18px}.alert-rule-criterion__toggle[_ngcontent-%COMP%]{margin-left:.5em}.alert-rule-criterion__description[_ngcontent-%COMP%]{margin-bottom:.5em;font-size:14px}"],changeDetection:0}),t})();const GU=r.Xb($U);function WU(t,e){if(1&t){const t=r.Wb();r.Vb(0,"input",9),r.cc("dateChange",function(e){return r.Ac(t),r.gc(2).updateSince(e.value)}),r.Ub(),r.Qb(1,"mat-datepicker",null,10),r.Qb(3,"mat-datepicker-toggle",11)}if(2&t){const t=r.wc(2),e=r.gc(2);r.nc("matDatepicker",t)("min",e.minDate)("max",e.maxDate),r.Db(3),r.nc("for",t)}}function ZU(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-date-range-input",12),r.Vb(1,"input",13),r.cc("dateChange",function(e){return r.Ac(t),r.gc(2).updateSince(e.value)}),r.Ub(),r.Vb(2,"input",14),r.cc("dateChange",function(e){return r.Ac(t),r.gc(2).updateTo(e.value)}),r.Ub(),r.Ub(),r.Qb(3,"mat-date-range-picker",null,10),r.Qb(5,"mat-datepicker-toggle",15)}if(2&t){const t=r.wc(4),e=r.gc(2);r.nc("rangePicker",t)("min",e.minDate)("max",e.maxDate),r.Db(5),r.nc("for",t)}}function qU(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",3),r.Vb(1,"mat-radio-group",4),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc().criterion.type=e})("change",function(){return r.Ac(t),r.gc().resetDates()}),r.Vb(2,"mat-radio-button",5),r.Kc(3,"Temps r\xe9el"),r.Ub(),r.Vb(4,"mat-radio-button",6),r.Kc(5),r.Ub(),r.Vb(6,"mat-radio-button",7),r.Kc(7),r.Ub(),r.Ub(),r.Ic(8,WU,4,4,"ng-template",8),r.Ic(9,ZU,6,4,"ng-template",8),r.Ub()}if(2&t){const t=r.gc();r.Db(1),r.nc("ngModel",t.criterion.type),r.Db(4),r.Mc(" Temps r\xe9el depuis le ","pastAndRealTime"!==t.criterion.type||"pastAndRealTime"===t.criterion.type&&!t.criterion.since?"...":t.criterion.since," "),r.Db(2),r.Mc(" P\xe9riode pass\xe9e du ","past"!==t.criterion.type||"past"===t.criterion.type&&!t.criterion.since&&!t.criterion.to?"... au ...":t.criterion.since+" au "+t.criterion.to," "),r.Db(1),r.nc("ngIf","pastAndRealTime"==t.criterion.type),r.Db(1),r.nc("ngIf","past"===t.criterion.type)}}function YU(t,e){1&t&&r.Kc(0," Temps r\xe9el ")}function QU(t,e){if(1&t&&r.Kc(0),2&t){const t=r.gc(2);r.Mc(" Temps r\xe9el depuis le ",t.criterion.since," ")}}function XU(t,e){if(1&t&&r.Kc(0),2&t){const t=r.gc(2);r.Nc(" P\xe9riode pass\xe9e du ",t.criterion.since," au ",t.criterion.to," ")}}function JU(t,e){if(1&t&&(r.Ic(0,YU,1,0,"ng-template",8),r.Ic(1,QU,1,1,"ng-template",8),r.Ic(2,XU,1,2,"ng-template",8)),2&t){const t=r.gc();r.nc("ngIf","realTime"==t.criterion.type),r.Db(1),r.nc("ngIf","pastAndRealTime"==t.criterion.type),r.Db(1),r.nc("ngIf","past"==t.criterion.type)}}let tB=(()=>{class t extends UU{constructor(){super(...arguments),this.minDate=new Date(2019,4,1),this.maxDate=new Date}updateSince(t){this.criterion.since=t?zO(t):""}updateTo(t){this.criterion.to=t?zO(t):""}resetDates(){this.criterion.since=void 0,this.criterion.to=void 0}}return t.\u0275fac=function(e){return eB(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-time-filter"]],features:[r.Cb([{provide:rc,useExisting:t,multi:!0}]),r.Ab],decls:4,vars:4,consts:[[3,"type","editable"],[3,"ngIf","ngIfElse"],["readonly",""],[1,"d-flex"],["color","primary",1,"d-flex-column","u-flex",3,"ngModel","ngModelChange","change"],["value","realTime",1,"pa-1"],["value","pastAndRealTime",1,"pa-1"],["value","past",1,"pa-1"],[3,"ngIf"],["matInput","",2,"opacity","0","width","0","height","0",3,"matDatepicker","min","max","dateChange"],["picker",""],["title","Choisir une date de d\xe9but",2,"align-self","center",3,"for"],[2,"opacity","0","width","0","height","0",3,"rangePicker","min","max"],["matStartDate","",3,"dateChange"],["matEndDate","",3,"dateChange"],["title","Choisir une p\xe9riode",2,"align-self","center",3,"for"]],template:function(t,e){if(1&t&&(r.Vb(0,"app-alert-rule-criterion",0),r.Ic(1,qU,10,5,"ng-template",1),r.Ic(2,JU,3,3,"ng-template",null,2,r.Jc),r.Ub()),2&t){const t=r.wc(3);r.nc("type",e.criteriaLabels.time)("editable",e.editable),r.Db(1),r.nc("ngIf",e.editable)("ngIfElse",t)}},directives:[$U,ut,sR,Vc,uh,hR,Ou,Ld,Pd,Bd,$d,zd,Hd,Gd],encapsulation:2,changeDetection:0}),t})();const eB=r.Xb(tB);let iB=(()=>{class t extends UU{}return t.\u0275fac=function(e){return nB(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-ais-interruption-criterion"]],features:[r.Cb([{provide:rc,useExisting:t,multi:!0}]),r.Ab],decls:1,vars:3,consts:[[3,"type","enable","editable","enableChange"]],template:function(t,e){1&t&&(r.Vb(0,"app-alert-rule-criterion",0),r.cc("enableChange",function(t){return e.enable=t}),r.Ub()),2&t&&r.nc("type",e.criteriaLabels.aisInterruption)("enable",e.enable)("editable",e.editable)},directives:[$U],encapsulation:2,changeDetection:0}),t})();const nB=r.Xb(iB);let rB=(()=>{class t extends UU{}return t.\u0275fac=function(e){return sB(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-transhipment-criterion"]],features:[r.Cb([{provide:rc,useExisting:t,multi:!0}]),r.Ab],decls:1,vars:3,consts:[[3,"type","enable","editable","enableChange"]],template:function(t,e){1&t&&(r.Vb(0,"app-alert-rule-criterion",0),r.cc("enableChange",function(t){return e.enable=t}),r.Ub()),2&t&&r.nc("type",e.criteriaLabels.transhipment)("enable",e.enable)("editable",e.editable)},directives:[$U],encapsulation:2,changeDetection:0}),t})();const sB=r.Xb(rB);let oB=(()=>{class t extends UU{}return t.\u0275fac=function(e){return aB(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-erratic-route-criterion"]],features:[r.Cb([{provide:rc,useExisting:t,multi:!0}]),r.Ab],decls:1,vars:3,consts:[[3,"type","enable","editable","enableChange"]],template:function(t,e){1&t&&(r.Vb(0,"app-alert-rule-criterion",0),r.cc("enableChange",function(t){return e.enable=t}),r.Ub()),2&t&&r.nc("type",e.criteriaLabels.erraticRoute)("enable",e.enable)("editable",e.editable)},directives:[$U],encapsulation:2,changeDetection:0}),t})();const aB=r.Xb(oB);function lB(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",4),r.Vb(1,"ngx-slider",5),r.cc("valueChange",function(e){return r.Ac(t),r.gc(2).criterion.min=e})("highValueChange",function(e){return r.Ac(t),r.gc(2).criterion.max=e}),r.Ub(),r.Ub()}if(2&t){const t=r.gc(2);r.Db(1),r.nc("value",t.criterion.min)("highValue",t.criterion.max)("options",t.speedSliderOptions)}}function cB(t,e){if(1&t&&r.Kc(0),2&t){const t=r.gc(2);r.Nc(" Vitesse : entre ",t.criterion.min," et ",t.criterion.max," ")}}function hB(t,e){if(1&t&&(r.Ic(0,lB,2,3,"ng-template",2),r.Ic(1,cB,1,2,"ng-template",null,3,r.Jc)),2&t){const t=r.wc(2),e=r.gc();r.nc("ngIf",e.editable)("ngIfElse",t)}}let uB=(()=>{class t extends UU{constructor(){super(...arguments),this.speedSliderOptions={floor:0,ceil:100,animate:!1}}}return t.\u0275fac=function(e){return dB(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-speed-criterion"]],features:[r.Cb([{provide:rc,useExisting:t,multi:!0}]),r.Ab],decls:2,vars:4,consts:[[3,"type","enable","editable","enableChange"],[3,"ngIf"],[3,"ngIf","ngIfElse"],["readonly",""],[1,"criterion-content","app-slider"],["name","speed",3,"value","highValue","options","valueChange","highValueChange"]],template:function(t,e){1&t&&(r.Vb(0,"app-alert-rule-criterion",0),r.cc("enableChange",function(t){return e.enable=t}),r.Ic(1,hB,3,2,"ng-template",1),r.Ub()),2&t&&(r.nc("type",e.criteriaLabels.speed)("enable",e.enable)("editable",e.editable),r.Db(1),r.nc("ngIf",e.criterion.enable))},directives:[$U,ut,pg],encapsulation:2,changeDetection:0}),t})();const dB=r.Xb(uB);function pB(t,e){for(let i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function fB(t,e){const i=e?"":"none";pB(t.style,{touchAction:e?"":"none",webkitUserDrag:e?"":"none",webkitTapHighlightColor:e?"":"transparent",userSelect:i,msUserSelect:i,webkitUserSelect:i,MozUserSelect:i})}function mB(t,e){const i=t.style;i.position=e?"":"fixed",i.top=i.opacity=e?"":"0",i.left=e?"":"-999em"}function gB(t){const e=t.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(t)*e}function AB(t,e){return t.getPropertyValue(e).split(",").map(t=>t.trim())}function bB(t){const e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}}function vB(t,e,i){const{top:n,bottom:r,left:s,right:o}=t;return i>=n&&i<=r&&e>=s&&e<=o}function _B(t,e,i){t.top+=e,t.bottom=t.top+t.height,t.left+=i,t.right=t.left+t.width}function yB(t,e,i,n){const{top:r,right:s,bottom:o,left:a,width:l,height:c}=t,h=l*e,u=c*e;return n>r-u&&n<o+u&&i>a-h&&i<s+h}class wB{constructor(t,e){this._document=t,this._viewportRuler=e,this.positions=new Map}clear(){this.positions.clear()}cache(t){this.clear(),this.positions.set(this._document,{scrollPosition:this._viewportRuler.getViewportScrollPosition()}),t.forEach(t=>{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:bB(t)})})}handleScroll(t){const e=t.target,i=this.positions.get(e);if(!i)return null;const n=e===this._document?e.documentElement:e,r=i.scrollPosition;let s,o;if(e===this._document){const t=this._viewportRuler.getViewportScrollPosition();s=t.top,o=t.left}else s=e.scrollTop,o=e.scrollLeft;const a=r.top-s,l=r.left-o;return this.positions.forEach((t,i)=>{t.clientRect&&e!==i&&n.contains(i)&&_B(t.clientRect,a,l)}),r.top=s,r.left=o,{top:a,left:l}}}function xB(t){const e=t.cloneNode(!0),i=e.querySelectorAll("[id]"),n=t.nodeName.toLowerCase();e.removeAttribute("id");for(let r=0;r<i.length;r++)i[r].removeAttribute("id");return"canvas"===n?EB(t,e):"input"!==n&&"select"!==n&&"textarea"!==n||kB(t,e),CB("canvas",t,e,EB),CB("input, textarea, select",t,e,kB),e}function CB(t,e,i,n){const r=e.querySelectorAll(t);if(r.length){const e=i.querySelectorAll(t);for(let t=0;t<r.length;t++)n(r[t],e[t])}}let SB=0;function kB(t,e){"file"!==e.type&&(e.value=t.value),"radio"===e.type&&e.name&&(e.name=`mat-clone-${e.name}-${SB++}`)}function EB(t,e){const i=e.getContext("2d");if(i)try{i.drawImage(t,0,0)}catch(Knt){}}const DB=Ai({passive:!0}),IB=Ai({passive:!1});class PB{constructor(t,e,i,n,r,s){this._config=e,this._document=i,this._ngZone=n,this._viewportRuler=r,this._dragDropRegistry=s,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._moveEvents=new _e.a,this._pointerMoveSubscription=ye.a.EMPTY,this._pointerUpSubscription=ye.a.EMPTY,this._scrollSubscription=ye.a.EMPTY,this._resizeSubscription=ye.a.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this._disabled=!1,this.beforeStarted=new _e.a,this.started=new _e.a,this.released=new _e.a,this.ended=new _e.a,this.entered=new _e.a,this.exited=new _e.a,this.dropped=new _e.a,this.moved=this._moveEvents,this._pointerDown=t=>{if(this.beforeStarted.next(),this._handles.length){const e=this._handles.find(e=>{const i=t.target;return!!i&&(i===e||e.contains(i))});!e||this._disabledHandles.has(e)||this.disabled||this._initializeDragSequence(e,t)}else this.disabled||this._initializeDragSequence(this._rootElement,t)},this._pointerMove=t=>{const e=this._getPointerPositionOnPage(t);if(!this._hasStartedDragging){if(Math.abs(e.x-this._pickupPositionOnPage.x)+Math.abs(e.y-this._pickupPositionOnPage.y)>=this._config.dragStartThreshold){const e=Date.now()>=this._dragStartTime+this._getDragStartDelay(t),i=this._dropContainer;if(!e)return void this._endDragSequence(t);i&&(i.isDragging()||i.isReceiving())||(t.preventDefault(),this._hasStartedDragging=!0,this._ngZone.run(()=>this._startDragSequence(t)))}return}this._boundaryElement&&(this._previewRect&&(this._previewRect.width||this._previewRect.height)||(this._previewRect=(this._preview||this._rootElement).getBoundingClientRect())),t.preventDefault();const i=this._getConstrainedPointerPosition(e);if(this._hasMoved=!0,this._lastKnownPointerPosition=e,this._updatePointerDirectionDelta(i),this._dropContainer)this._updateActiveDropContainer(i,e);else{const t=this._activeTransform;t.x=i.x-this._pickupPositionOnPage.x+this._passiveTransform.x,t.y=i.y-this._pickupPositionOnPage.y+this._passiveTransform.y,this._applyRootElementTransform(t.x,t.y),"undefined"!=typeof SVGElement&&this._rootElement instanceof SVGElement&&this._rootElement.setAttribute("transform",`translate(${t.x} ${t.y})`)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:i,event:t,distance:this._getDragDistance(i),delta:this._pointerDirectionDelta})})},this._pointerUp=t=>{this._endDragSequence(t)},this.withRootElement(t).withParent(e.parentDragRef||null),this._parentPositions=new wB(i,r),s.registerDragItem(this)}get disabled(){return this._disabled||!(!this._dropContainer||!this._dropContainer.disabled)}set disabled(t){const e=ti(t);e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions(),this._handles.forEach(t=>fB(t,e)))}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(t){this._handles=t.map(t=>si(t)),this._handles.forEach(t=>fB(t,this.disabled)),this._toggleNativeDragInteractions();const e=new Set;return this._disabledHandles.forEach(t=>{this._handles.indexOf(t)>-1&&e.add(t)}),this._disabledHandles=e,this}withPreviewTemplate(t){return this._previewTemplate=t,this}withPlaceholderTemplate(t){return this._placeholderTemplate=t,this}withRootElement(t){const e=si(t);return e!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{e.addEventListener("mousedown",this._pointerDown,IB),e.addEventListener("touchstart",this._pointerDown,DB)}),this._initialTransform=void 0,this._rootElement=e),"undefined"!=typeof SVGElement&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(t){return this._boundaryElement=t?si(t):null,this._resizeSubscription.unsubscribe(),t&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(t){return this._parentDragRef=t,this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&TB(this._rootElement),TB(this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(t){!this._disabledHandles.has(t)&&this._handles.indexOf(t)>-1&&(this._disabledHandles.add(t),fB(t,!0))}enableHandle(t){this._disabledHandles.has(t)&&(this._disabledHandles.delete(t),fB(t,this.disabled))}withDirection(t){return this._direction=t,this}_withDropContainer(t){this._dropContainer=t}getFreeDragPosition(){const t=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:t.x,y:t.y}}setFreeDragPosition(t){return this._activeTransform={x:0,y:0},this._passiveTransform.x=t.x,this._passiveTransform.y=t.y,this._dropContainer||this._applyRootElementTransform(t.x,t.y),this}_sortFromLastPointerPosition(){const t=this._lastKnownPointerPosition;t&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(t),t)}_removeSubscriptions(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe()}_destroyPreview(){this._preview&&TB(this._preview),this._previewRef&&this._previewRef.destroy(),this._preview=this._previewRef=null}_destroyPlaceholder(){this._placeholder&&TB(this._placeholder),this._placeholderRef&&this._placeholderRef.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(t){this._dragDropRegistry.isDragging(this)&&(this._removeSubscriptions(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging&&(this.released.next({source:this}),this._dropContainer?(this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(t),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)})):(this._passiveTransform.x=this._activeTransform.x,this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(this._getPointerPositionOnPage(t))})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this))))}_startDragSequence(t){RB(t)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const e=this._dropContainer;if(e){const t=this._rootElement,i=t.parentNode,n=this._preview=this._createPreviewElement(),r=this._placeholder=this._createPlaceholderElement(),s=this._anchor=this._anchor||this._document.createComment(""),o=this._getShadowRoot();i.insertBefore(s,t),mB(t,!1),this._document.body.appendChild(i.replaceChild(r,t)),function(t,e){return e||t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement||t.body}(this._document,o).appendChild(n),this.started.next({source:this}),e.start(),this._initialContainer=e,this._initialIndex=e.getItemIndex(this)}else this.started.next({source:this}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(e?e.getScrollableParents():[])}_initializeDragSequence(t,e){this._parentDragRef&&e.stopPropagation();const i=this.isDragging(),n=RB(e),r=!n&&0!==e.button,s=this._rootElement,o=!n&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now();if(e.target&&e.target.draggable&&"mousedown"===e.type&&e.preventDefault(),i||r||o)return;this._handles.length&&(this._rootElementTapHighlight=s.style.webkitTapHighlightColor||"",s.style.webkitTapHighlightColor="transparent"),this._hasStartedDragging=this._hasMoved=!1,this._removeSubscriptions(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scroll.subscribe(t=>{this._updateOnScroll(t)}),this._boundaryElement&&(this._boundaryRect=bB(this._boundaryElement));const a=this._previewTemplate;this._pickupPositionInElement=a&&a.template&&!a.matchSize?{x:0,y:0}:this._getPointerPositionInElement(t,e);const l=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:l.x,y:l.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(t){mB(this._rootElement,!0),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._boundaryRect=this._previewRect=void 0,this._ngZone.run(()=>{const e=this._dropContainer,i=e.getItemIndex(this),n=this._getPointerPositionOnPage(t),r=this._getDragDistance(this._getPointerPositionOnPage(t)),s=e._isOverContainer(n.x,n.y);this.ended.next({source:this,distance:r}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:r}),e.drop(this,i,this._initialIndex,this._initialContainer,s,r),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:t,y:e},{x:i,y:n}){let r=this._initialContainer._getSiblingContainerFromPosition(this,t,e);!r&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(t,e)&&(r=this._initialContainer),r&&r!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=r,this._dropContainer.enter(this,t,e,r===this._initialContainer&&r.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:r,currentIndex:r.getItemIndex(this)})}),this._dropContainer._startScrollingIfNecessary(i,n),this._dropContainer._sortItem(this,t,e,this._pointerDirectionDelta),this._preview.style.transform=OB(t-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y)}_createPreviewElement(){const t=this._previewTemplate,e=this.previewClass,i=t?t.template:null;let n;if(i&&t){const e=t.matchSize?this._rootElement.getBoundingClientRect():null,r=t.viewContainer.createEmbeddedView(i,t.context);r.detectChanges(),n=VB(r,this._document),this._previewRef=r,t.matchSize?FB(n,e):n.style.transform=OB(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else{const t=this._rootElement;n=xB(t),FB(n,t.getBoundingClientRect())}return pB(n.style,{pointerEvents:"none",margin:"0",position:"fixed",top:"0",left:"0",zIndex:`${this._config.zIndex||1e3}`}),fB(n,!1),n.classList.add("cdk-drag-preview"),n.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(t=>n.classList.add(t)):n.classList.add(e)),n}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();const t=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._preview.style.transform=OB(t.left,t.top);const e=function(t){const e=getComputedStyle(t),i=AB(e,"transition-property"),n=i.find(t=>"transform"===t||"all"===t);if(!n)return 0;const r=i.indexOf(n),s=AB(e,"transition-duration"),o=AB(e,"transition-delay");return gB(s[r])+gB(o[r])}(this._preview);return 0===e?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(t=>{const i=e=>{(!e||e.target===this._preview&&"transform"===e.propertyName)&&(this._preview.removeEventListener("transitionend",i),t(),clearTimeout(n))},n=setTimeout(i,1.5*e);this._preview.addEventListener("transitionend",i)}))}_createPlaceholderElement(){const t=this._placeholderTemplate,e=t?t.template:null;let i;return e?(this._placeholderRef=t.viewContainer.createEmbeddedView(e,t.context),this._placeholderRef.detectChanges(),i=VB(this._placeholderRef,this._document)):i=xB(this._rootElement),i.classList.add("cdk-drag-placeholder"),i}_getPointerPositionInElement(t,e){const i=this._rootElement.getBoundingClientRect(),n=t===this._rootElement?null:t,r=n?n.getBoundingClientRect():i,s=RB(e)?e.targetTouches[0]:e,o=this._getViewportScrollPosition();return{x:r.left-i.left+(s.pageX-r.left-o.left),y:r.top-i.top+(s.pageY-r.top-o.top)}}_getPointerPositionOnPage(t){const e=this._getViewportScrollPosition(),i=RB(t)?t.touches[0]||t.changedTouches[0]||{pageX:0,pageY:0}:t,n=i.pageX-e.left,r=i.pageY-e.top;if(this._ownerSVGElement){const t=this._ownerSVGElement.getScreenCTM();if(t){const e=this._ownerSVGElement.createSVGPoint();return e.x=n,e.y=r,e.matrixTransform(t.inverse())}}return{x:n,y:r}}_getConstrainedPointerPosition(t){const e=this._dropContainer?this._dropContainer.lockAxis:null;let{x:i,y:n}=this.constrainPosition?this.constrainPosition(t,this):t;if("x"===this.lockAxis||"x"===e?n=this._pickupPositionOnPage.y:"y"!==this.lockAxis&&"y"!==e||(i=this._pickupPositionOnPage.x),this._boundaryRect){const{x:t,y:e}=this._pickupPositionInElement,r=this._boundaryRect,s=this._previewRect,o=r.top+e,a=r.bottom-(s.height-e);i=MB(i,r.left+t,r.right-(s.width-t)),n=MB(n,o,a)}return{x:i,y:n}}_updatePointerDirectionDelta(t){const{x:e,y:i}=t,n=this._pointerDirectionDelta,r=this._pointerPositionAtLastDirectionChange,s=Math.abs(e-r.x),o=Math.abs(i-r.y);return s>this._config.pointerDirectionChangeThreshold&&(n.x=e>r.x?1:-1,r.x=e),o>this._config.pointerDirectionChangeThreshold&&(n.y=i>r.y?1:-1,r.y=i),n}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const t=this._handles.length>0||!this.isDragging();t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,fB(this._rootElement,t))}_removeRootElementListeners(t){t.removeEventListener("mousedown",this._pointerDown,IB),t.removeEventListener("touchstart",this._pointerDown,DB)}_applyRootElementTransform(t,e){const i=OB(t,e);null==this._initialTransform&&(this._initialTransform=this._rootElement.style.transform||""),this._rootElement.style.transform=this._initialTransform?i+" "+this._initialTransform:i}_getDragDistance(t){const e=this._pickupPositionOnPage;return e?{x:t.x-e.x,y:t.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:t,y:e}=this._passiveTransform;if(0===t&&0===e||this.isDragging()||!this._boundaryElement)return;const i=this._boundaryElement.getBoundingClientRect(),n=this._rootElement.getBoundingClientRect();if(0===i.width&&0===i.height||0===n.width&&0===n.height)return;const r=i.left-n.left,s=n.right-i.right,o=i.top-n.top,a=n.bottom-i.bottom;i.width>n.width?(r>0&&(t+=r),s>0&&(t-=s)):t=0,i.height>n.height?(o>0&&(e+=o),a>0&&(e-=a)):e=0,t===this._passiveTransform.x&&e===this._passiveTransform.y||this.setFreeDragPosition({y:e,x:t})}_getDragStartDelay(t){const e=this.dragStartDelay;return"number"==typeof e?e:RB(t)?e.touch:e?e.mouse:0}_updateOnScroll(t){const e=this._parentPositions.handleScroll(t);if(e){const i=t.target;this._boundaryRect&&(i===this._document||i!==this._boundaryElement&&i.contains(this._boundaryElement))&&_B(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){const t=this._parentPositions.positions.get(this._document);return t?t.scrollPosition:this._viewportRuler.getViewportScrollPosition()}_getShadowRoot(){return void 0===this._cachedShadowRoot&&(this._cachedShadowRoot=_i(this._rootElement)),this._cachedShadowRoot}}function OB(t,e){return`translate3d(${Math.round(t)}px, ${Math.round(e)}px, 0)`}function MB(t,e,i){return Math.max(e,Math.min(i,t))}function TB(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function RB(t){return"t"===t.type[0]}function VB(t,e){const i=t.rootNodes;if(1===i.length&&i[0].nodeType===e.ELEMENT_NODE)return i[0];const n=e.createElement("div");return i.forEach(t=>n.appendChild(t)),n}function FB(t,e){t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.transform=OB(e.left,e.top)}function LB(t,e,i){const n=UB(e,t.length-1),r=UB(i,t.length-1);if(n===r)return;const s=t[n],o=r<n?-1:1;for(let a=n;a!==r;a+=o)t[a]=t[a+o];t[r]=s}function UB(t,e){return Math.max(0,Math.min(e,t))}class BB{constructor(t,e,i,n,r){this._dragDropRegistry=e,this._ngZone=n,this._viewportRuler=r,this.disabled=!1,this.sortingDisabled=!1,this.autoScrollDisabled=!1,this.autoScrollStep=2,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.beforeStarted=new _e.a,this.entered=new _e.a,this.exited=new _e.a,this.dropped=new _e.a,this.sorted=new _e.a,this._isDragging=!1,this._itemPositions=[],this._previousSwap={drag:null,delta:0,overlaps:!1},this._draggables=[],this._siblings=[],this._orientation="vertical",this._activeSiblings=new Set,this._direction="ltr",this._viewportScrollSubscription=ye.a.EMPTY,this._verticalScrollDirection=0,this._horizontalScrollDirection=0,this._stopScrollTimers=new _e.a,this._cachedShadowRoot=null,this._startScrollInterval=()=>{this._stopScrolling(),AT(0,on).pipe(Sn(this._stopScrollTimers)).subscribe(()=>{const t=this._scrollNode,e=this.autoScrollStep;1===this._verticalScrollDirection?jB(t,-e):2===this._verticalScrollDirection&&jB(t,e),1===this._horizontalScrollDirection?zB(t,-e):2===this._horizontalScrollDirection&&zB(t,e)})},this.element=si(t),this._document=i,this.withScrollableParents([this.element]),e.registerDropContainer(this),this._parentPositions=new wB(i,r)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(t,e,i,n){let r;this._draggingStarted(),null==n?(r=this.sortingDisabled?this._draggables.indexOf(t):-1,-1===r&&(r=this._getItemIndexFromPointerPosition(t,e,i))):r=n;const s=this._activeDraggables,o=s.indexOf(t),a=t.getPlaceholderElement();let l=s[r];if(l===t&&(l=s[r+1]),o>-1&&s.splice(o,1),l&&!this._dragDropRegistry.isDragging(l)){const e=l.getRootElement();e.parentElement.insertBefore(a,e),s.splice(r,0,t)}else if(this._shouldEnterAsFirstChild(e,i)){const e=s[0].getRootElement();e.parentNode.insertBefore(a,e),s.unshift(t)}else si(this.element).appendChild(a),s.push(t);a.style.transform="",this._cacheItemPositions(),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:t,container:this,currentIndex:this.getItemIndex(t)})}exit(t){this._reset(),this.exited.next({item:t,container:this})}drop(t,e,i,n,r,s){this._reset(),this.dropped.next({item:t,currentIndex:e,previousIndex:i,container:this,previousContainer:n,isPointerOverContainer:r,distance:s})}withItems(t){const e=this._draggables;return this._draggables=t,t.forEach(t=>t._withDropContainer(this)),this.isDragging()&&(e.filter(t=>t.isDragging()).every(e=>-1===t.indexOf(e))?this._reset():this._cacheItems()),this}withDirection(t){return this._direction=t,this}connectedTo(t){return this._siblings=t.slice(),this}withOrientation(t){return this._orientation=t,this}withScrollableParents(t){const e=si(this.element);return this._scrollableElements=-1===t.indexOf(e)?[e,...t]:t.slice(),this}getScrollableParents(){return this._scrollableElements}getItemIndex(t){return this._isDragging?NB("horizontal"===this._orientation&&"rtl"===this._direction?this._itemPositions.slice().reverse():this._itemPositions,e=>e.drag===t):this._draggables.indexOf(t)}isReceiving(){return this._activeSiblings.size>0}_sortItem(t,e,i,n){if(this.sortingDisabled||!this._clientRect||!yB(this._clientRect,.05,e,i))return;const r=this._itemPositions,s=this._getItemIndexFromPointerPosition(t,e,i,n);if(-1===s&&r.length>0)return;const o="horizontal"===this._orientation,a=NB(r,e=>e.drag===t),l=r[s],c=l.clientRect,h=a>s?1:-1,u=this._getItemOffsetPx(r[a].clientRect,c,h),d=this._getSiblingOffsetPx(a,r,h),p=r.slice();LB(r,a,s),this.sorted.next({previousIndex:a,currentIndex:s,container:this,item:t}),r.forEach((e,i)=>{if(p[i]===e)return;const n=e.drag===t,r=n?u:d,s=n?t.getPlaceholderElement():e.drag.getRootElement();e.offset+=r,o?(s.style.transform=`translate3d(${Math.round(e.offset)}px, 0, 0)`,_B(e.clientRect,0,r)):(s.style.transform=`translate3d(0, ${Math.round(e.offset)}px, 0)`,_B(e.clientRect,r,0))}),this._previousSwap.overlaps=vB(c,e,i),this._previousSwap.drag=l.drag,this._previousSwap.delta=o?n.x:n.y}_startScrollingIfNecessary(t,e){if(this.autoScrollDisabled)return;let i,n=0,r=0;if(this._parentPositions.positions.forEach((s,o)=>{o!==this._document&&s.clientRect&&!i&&yB(s.clientRect,.05,t,e)&&([n,r]=function(t,e,i,n){const r=HB(e,n),s=KB(e,i);let o=0,a=0;if(r){const e=t.scrollTop;1===r?e>0&&(o=1):t.scrollHeight-e>t.clientHeight&&(o=2)}if(s){const e=t.scrollLeft;1===s?e>0&&(a=1):t.scrollWidth-e>t.clientWidth&&(a=2)}return[o,a]}(o,s.clientRect,t,e),(n||r)&&(i=o))}),!n&&!r){const{width:s,height:o}=this._viewportRuler.getViewportSize(),a={width:s,height:o,top:0,right:s,bottom:o,left:0};n=HB(a,e),r=KB(a,t),i=window}!i||n===this._verticalScrollDirection&&r===this._horizontalScrollDirection&&i===this._scrollNode||(this._verticalScrollDirection=n,this._horizontalScrollDirection=r,this._scrollNode=i,(n||r)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){const t=si(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=t.msScrollSnapType||t.scrollSnapType||"",t.scrollSnapType=t.msScrollSnapType="none",this._cacheItems(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){const t=si(this.element);this._parentPositions.cache(this._scrollableElements),this._clientRect=this._parentPositions.positions.get(t).clientRect}_cacheItemPositions(){const t="horizontal"===this._orientation;this._itemPositions=this._activeDraggables.map(t=>{const e=t.getVisibleElement();return{drag:t,offset:0,clientRect:bB(e)}}).sort((e,i)=>t?e.clientRect.left-i.clientRect.left:e.clientRect.top-i.clientRect.top)}_reset(){this._isDragging=!1;const t=si(this.element).style;t.scrollSnapType=t.msScrollSnapType=this._initialScrollSnap,this._activeDraggables.forEach(t=>{const e=t.getRootElement();e&&(e.style.transform="")}),this._siblings.forEach(t=>t._stopReceiving(this)),this._activeDraggables=[],this._itemPositions=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1,this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_getSiblingOffsetPx(t,e,i){const n="horizontal"===this._orientation,r=e[t].clientRect,s=e[t+-1*i];let o=r[n?"width":"height"]*i;if(s){const t=n?"left":"top",e=n?"right":"bottom";-1===i?o-=s.clientRect[t]-r[e]:o+=r[t]-s.clientRect[e]}return o}_getItemOffsetPx(t,e,i){const n="horizontal"===this._orientation;let r=n?e.left-t.left:e.top-t.top;return-1===i&&(r+=n?e.width-t.width:e.height-t.height),r}_shouldEnterAsFirstChild(t,e){if(!this._activeDraggables.length)return!1;const i=this._itemPositions,n="horizontal"===this._orientation;if(i[0].drag!==this._activeDraggables[0]){const r=i[i.length-1].clientRect;return n?t>=r.right:e>=r.bottom}{const r=i[0].clientRect;return n?t<=r.left:e<=r.top}}_getItemIndexFromPointerPosition(t,e,i,n){const r="horizontal"===this._orientation,s=NB(this._itemPositions,({drag:s,clientRect:o},a,l)=>{if(s===t)return l.length<2;if(n){const t=r?n.x:n.y;if(s===this._previousSwap.drag&&this._previousSwap.overlaps&&t===this._previousSwap.delta)return!1}return r?e>=Math.floor(o.left)&&e<Math.floor(o.right):i>=Math.floor(o.top)&&i<Math.floor(o.bottom)});return-1!==s&&this.sortPredicate(s,t,this)?s:-1}_cacheItems(){this._activeDraggables=this._draggables.slice(),this._cacheItemPositions(),this._cacheParentPositions()}_isOverContainer(t,e){return null!=this._clientRect&&vB(this._clientRect,t,e)}_getSiblingContainerFromPosition(t,e,i){return this._siblings.find(n=>n._canReceive(t,e,i))}_canReceive(t,e,i){if(!this._clientRect||!vB(this._clientRect,e,i)||!this.enterPredicate(t,this))return!1;const n=this._getShadowRoot().elementFromPoint(e,i);if(!n)return!1;const r=si(this.element);return n===r||r.contains(n)}_startReceiving(t,e){const i=this._activeSiblings;!i.has(t)&&e.every(t=>this.enterPredicate(t,this)||this._draggables.indexOf(t)>-1)&&(i.add(t),this._cacheParentPositions(),this._listenToScrollEvents())}_stopReceiving(t){this._activeSiblings.delete(t),this._viewportScrollSubscription.unsubscribe()}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scroll.subscribe(t=>{if(this.isDragging()){const e=this._parentPositions.handleScroll(t);e&&(this._itemPositions.forEach(({clientRect:t})=>{_B(t,e.top,e.left)}),this._itemPositions.forEach(({drag:t})=>{this._dragDropRegistry.isDragging(t)&&t._sortFromLastPointerPosition()}))}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){const t=_i(si(this.element));this._cachedShadowRoot=t||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){const t=this._activeDraggables.filter(t=>t.isDragging());this._siblings.forEach(e=>e._startReceiving(this,t))}}function NB(t,e){for(let i=0;i<t.length;i++)if(e(t[i],i,t))return i;return-1}function jB(t,e){t===window?t.scrollBy(0,e):t.scrollTop+=e}function zB(t,e){t===window?t.scrollBy(e,0):t.scrollLeft+=e}function HB(t,e){const{top:i,bottom:n,height:r}=t,s=.05*r;return e>=i-s&&e<=i+s?1:e>=n-s&&e<=n+s?2:0}function KB(t,e){const{left:i,right:n,width:r}=t,s=.05*r;return e>=i-s&&e<=i+s?1:e>=n-s&&e<=n+s?2:0}const $B=Ai({passive:!1,capture:!0});let GB=(()=>{class t{constructor(t,e){this._ngZone=t,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=[],this._globalListeners=new Map,this._draggingPredicate=t=>t.isDragging(),this.pointerMove=new _e.a,this.pointerUp=new _e.a,this.scroll=new _e.a,this._preventDefaultWhileDragging=t=>{this._activeDragInstances.length>0&&t.preventDefault()},this._persistentTouchmoveListener=t=>{this._activeDragInstances.length>0&&(this._activeDragInstances.some(this._draggingPredicate)&&t.preventDefault(),this.pointerMove.next(t))},this._document=e}registerDropContainer(t){this._dropInstances.has(t)||this._dropInstances.add(t)}registerDragItem(t){this._dragInstances.add(t),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,$B)})}removeDropContainer(t){this._dropInstances.delete(t)}removeDragItem(t){this._dragInstances.delete(t),this.stopDragging(t),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,$B)}startDragging(t,e){if(!(this._activeDragInstances.indexOf(t)>-1)&&(this._activeDragInstances.push(t),1===this._activeDragInstances.length)){const t=e.type.startsWith("touch");this._globalListeners.set(t?"touchend":"mouseup",{handler:t=>this.pointerUp.next(t),options:!0}).set("scroll",{handler:t=>this.scroll.next(t),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:$B}),t||this._globalListeners.set("mousemove",{handler:t=>this.pointerMove.next(t),options:$B}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((t,e)=>{this._document.addEventListener(e,t.handler,t.options)})})}}stopDragging(t){const e=this._activeDragInstances.indexOf(t);e>-1&&(this._activeDragInstances.splice(e,1),0===this._activeDragInstances.length&&this._clearGlobalListeners())}isDragging(t){return this._activeDragInstances.indexOf(t)>-1}ngOnDestroy(){this._dragInstances.forEach(t=>this.removeDragItem(t)),this._dropInstances.forEach(t=>this.removeDropContainer(t)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((t,e)=>{this._document.removeEventListener(e,t.handler,t.options)}),this._globalListeners.clear()}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.B),r.Zb(a))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(r.B),Object(r.Zb)(a))},token:t,providedIn:"root"}),t})();const WB={dragStartThreshold:5,pointerDirectionChangeThreshold:5};let ZB=(()=>{class t{constructor(t,e,i,n){this._document=t,this._ngZone=e,this._viewportRuler=i,this._dragDropRegistry=n}createDrag(t,e=WB){return new PB(t,e,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(t){return new BB(t,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(a),r.Zb(r.B),r.Zb(nr),r.Zb(GB))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(a),Object(r.Zb)(r.B),Object(r.Zb)(nr),Object(r.Zb)(GB))},token:t,providedIn:"root"}),t})();const qB=new r.s("CDK_DRAG_PARENT"),YB=new r.s("CdkDropListGroup"),QB=new r.s("CDK_DRAG_CONFIG");let XB=0;const JB=new r.s("CdkDropList");let tN=(()=>{class t{constructor(e,i,n,s,o,a,l){this.element=e,this._changeDetectorRef=n,this._scrollDispatcher=s,this._dir=o,this._group=a,this._destroyed=new _e.a,this.connectedTo=[],this.id="cdk-drop-list-"+XB++,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.dropped=new r.o,this.entered=new r.o,this.exited=new r.o,this.sorted=new r.o,this._unsortedItems=new Set,this._dropListRef=i.createDropList(e),this._dropListRef.data=this,l&&this._assignDefaults(l),this._dropListRef.enterPredicate=(t,e)=>this.enterPredicate(t.data,e.data),this._dropListRef.sortPredicate=(t,e,i)=>this.sortPredicate(t,e.data,i.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),t._dropLists.push(this),a&&a._items.add(this)}get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(t){this._dropListRef.disabled=this._disabled=ti(t)}addItem(t){this._unsortedItems.add(t),this._dropListRef.isDragging()&&this._syncItemsWithRef()}removeItem(t){this._unsortedItems.delete(t),this._dropListRef.isDragging()&&this._syncItemsWithRef()}getSortedItems(){return Array.from(this._unsortedItems).sort((t,e)=>t._dragRef.getVisibleElement().compareDocumentPosition(e._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){const e=t._dropLists.indexOf(this);e>-1&&t._dropLists.splice(e,1),this._group&&this._group._items.delete(this),this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}_setupInputSyncSubscription(e){this._dir&&this._dir.change.pipe(Pn(this._dir.value),Sn(this._destroyed)).subscribe(t=>e.withDirection(t)),e.beforeStarted.subscribe(()=>{const i=ni(this.connectedTo).map(e=>"string"==typeof e?t._dropLists.find(t=>t.id===e):e);if(this._group&&this._group._items.forEach(t=>{-1===i.indexOf(t)&&i.push(t)}),!this._scrollableParentsResolved){const t=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(t=>t.getElementRef().nativeElement);this._dropListRef.withScrollableParents(t),this._scrollableParentsResolved=!0}e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.sortingDisabled=ti(this.sortingDisabled),e.autoScrollDisabled=ti(this.autoScrollDisabled),e.autoScrollStep=ei(this.autoScrollStep,2),e.connectedTo(i.filter(t=>t&&t!==this).map(t=>t._dropListRef)).withOrientation(this.orientation)})}_handleEvents(t){t.beforeStarted.subscribe(()=>{this._syncItemsWithRef(),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(t=>{this.entered.emit({container:this,item:t.item.data,currentIndex:t.currentIndex})}),t.exited.subscribe(t=>{this.exited.emit({container:this,item:t.item.data}),this._changeDetectorRef.markForCheck()}),t.sorted.subscribe(t=>{this.sorted.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,container:this,item:t.item.data})}),t.dropped.subscribe(t=>{this.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,container:t.container.data,item:t.item.data,isPointerOverContainer:t.isPointerOverContainer,distance:t.distance}),this._changeDetectorRef.markForCheck()})}_assignDefaults(t){const{lockAxis:e,draggingDisabled:i,sortingDisabled:n,listAutoScrollDisabled:r,listOrientation:s}=t;this.disabled=null!=i&&i,this.sortingDisabled=null!=n&&n,this.autoScrollDisabled=null!=r&&r,this.orientation=s||"vertical",e&&(this.lockAxis=e)}_syncItemsWithRef(){this._dropListRef.withItems(this.getSortedItems().map(t=>t._dragRef))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(ZB),r.Pb(r.h),r.Pb(er),r.Pb(Zn,8),r.Pb(YB,12),r.Pb(QB,8))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(t,e){2&t&&(r.Eb("id",e.id),r.Hb("cdk-drop-list-disabled",e.disabled)("cdk-drop-list-dragging",e._dropListRef.isDragging())("cdk-drop-list-receiving",e._dropListRef.isReceiving()))},inputs:{connectedTo:["cdkDropListConnectedTo","connectedTo"],id:"id",enterPredicate:["cdkDropListEnterPredicate","enterPredicate"],sortPredicate:["cdkDropListSortPredicate","sortPredicate"],disabled:["cdkDropListDisabled","disabled"],sortingDisabled:["cdkDropListSortingDisabled","sortingDisabled"],autoScrollDisabled:["cdkDropListAutoScrollDisabled","autoScrollDisabled"],orientation:["cdkDropListOrientation","orientation"],lockAxis:["cdkDropListLockAxis","lockAxis"],data:["cdkDropListData","data"],autoScrollStep:["cdkDropListAutoScrollStep","autoScrollStep"]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],features:[r.Cb([{provide:YB,useValue:void 0},{provide:JB,useExisting:t}])]}),t._dropLists=[],t})();const eN=new r.s("CdkDragHandle");let iN=(()=>{class t{constructor(t,e){this.element=t,this._stateChanges=new _e.a,this._disabled=!1,this._parentDrag=e}get disabled(){return this._disabled}set disabled(t){this._disabled=ti(t),this._stateChanges.next(this)}ngOnDestroy(){this._stateChanges.complete()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(qB,12))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdkDragHandle",""]],hostAttrs:[1,"cdk-drag-handle"],inputs:{disabled:["cdkDragHandleDisabled","disabled"]},features:[r.Cb([{provide:eN,useExisting:t}])]}),t})();const nN=new r.s("CdkDragPlaceholder"),rN=new r.s("CdkDragPreview");let sN=(()=>{class t{constructor(e,i,n,s,o,a,l,c,h,u,d){this.element=e,this.dropContainer=i,this._ngZone=s,this._viewContainerRef=o,this._dir=l,this._changeDetectorRef=h,this._selfHandle=u,this._parentDrag=d,this._destroyed=new _e.a,this.started=new r.o,this.released=new r.o,this.ended=new r.o,this.entered=new r.o,this.exited=new r.o,this.dropped=new r.o,this.moved=new Ze.a(t=>{const e=this._dragRef.moved.pipe(Object(Ge.a)(t=>({source:this,pointerPosition:t.pointerPosition,event:t.event,delta:t.delta,distance:t.distance}))).subscribe(t);return()=>{e.unsubscribe()}}),this._dragRef=c.createDrag(e,{dragStartThreshold:a&&null!=a.dragStartThreshold?a.dragStartThreshold:5,pointerDirectionChangeThreshold:a&&null!=a.pointerDirectionChangeThreshold?a.pointerDirectionChangeThreshold:5,zIndex:null==a?void 0:a.zIndex}),this._dragRef.data=this,t._dragInstances.push(this),a&&this._assignDefaults(a),i&&(this._dragRef._withDropContainer(i._dropListRef),i.addItem(this)),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}get disabled(){return this._disabled||this.dropContainer&&this.dropContainer.disabled}set disabled(t){this._disabled=ti(t),this._dragRef.disabled=this._disabled}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}ngAfterViewInit(){this._ngZone.onStable.pipe(Qe(1),Sn(this._destroyed)).subscribe(()=>{this._updateRootElement(),this._handles.changes.pipe(Pn(this._handles),Pe(t=>{const e=t.filter(t=>t._parentDrag===this).map(t=>t.element);this._selfHandle&&this.rootElementSelector&&e.push(this.element),this._dragRef.withHandles(e)}),Mn(t=>Object(or.a)(...t.map(t=>t._stateChanges.pipe(Pn(t))))),Sn(this._destroyed)).subscribe(t=>{const e=this._dragRef,i=t.element.nativeElement;t.disabled?e.disableHandle(i):e.enableHandle(i)}),this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)})}ngOnChanges(t){const e=t.rootElementSelector,i=t.freeDragPosition;e&&!e.firstChange&&this._updateRootElement(),i&&!i.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this);const e=t._dragInstances.indexOf(this);e>-1&&t._dragInstances.splice(e,1),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()}_updateRootElement(){const t=this.element.nativeElement,e=this.rootElementSelector?oN(t,this.rootElementSelector):t;this._dragRef.withRootElement(e||t)}_getBoundaryElement(){const t=this.boundaryElement;return t?"string"==typeof t?oN(this.element.nativeElement,t):si(t):null}_syncInputs(e){e.beforeStarted.subscribe(()=>{if(!e.isDragging()){const t=this._dir,i=this.dragStartDelay,n=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,r=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.dragStartDelay="object"==typeof i&&i?i:ei(i),e.constrainPosition=this.constrainPosition,e.previewClass=this.previewClass,e.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(n).withPreviewTemplate(r),t&&e.withDirection(t.value)}}),e.beforeStarted.pipe(Qe(1)).subscribe(()=>{var i,n;if(this._parentDrag)return void e.withParent(this._parentDrag._dragRef);let r=this.element.nativeElement.parentElement;for(;r;){if(null===(i=r.classList)||void 0===i?void 0:i.contains("cdk-drag")){e.withParent((null===(n=t._dragInstances.find(t=>t.element.nativeElement===r))||void 0===n?void 0:n._dragRef)||null);break}r=r.parentElement}})}_handleEvents(t){t.started.subscribe(()=>{this.started.emit({source:this}),this._changeDetectorRef.markForCheck()}),t.released.subscribe(()=>{this.released.emit({source:this})}),t.ended.subscribe(t=>{this.ended.emit({source:this,distance:t.distance}),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(t=>{this.entered.emit({container:t.container.data,item:this,currentIndex:t.currentIndex})}),t.exited.subscribe(t=>{this.exited.emit({container:t.container.data,item:this})}),t.dropped.subscribe(t=>{this.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,container:t.container.data,isPointerOverContainer:t.isPointerOverContainer,item:this,distance:t.distance})})}_assignDefaults(t){const{lockAxis:e,dragStartDelay:i,constrainPosition:n,previewClass:r,boundaryElement:s,draggingDisabled:o,rootElementSelector:a}=t;this.disabled=null!=o&&o,this.dragStartDelay=i||0,e&&(this.lockAxis=e),n&&(this.constrainPosition=n),r&&(this.previewClass=r),s&&(this.boundaryElement=s),a&&(this.rootElementSelector=a)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(JB,12),r.Pb(a),r.Pb(r.B),r.Pb(r.S),r.Pb(QB,8),r.Pb(Zn,8),r.Pb(ZB),r.Pb(r.h),r.Pb(eN,10),r.Pb(qB,12))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdkDrag",""]],contentQueries:function(t,e,i){if(1&t&&(r.Ib(i,rN,1),r.Ib(i,nN,1),r.Ib(i,eN,1)),2&t){let t;r.vc(t=r.dc())&&(e._previewTemplate=t.first),r.vc(t=r.dc())&&(e._placeholderTemplate=t.first),r.vc(t=r.dc())&&(e._handles=t)}},hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(t,e){2&t&&r.Hb("cdk-drag-disabled",e.disabled)("cdk-drag-dragging",e._dragRef.isDragging())},inputs:{disabled:["cdkDragDisabled","disabled"],dragStartDelay:["cdkDragStartDelay","dragStartDelay"],lockAxis:["cdkDragLockAxis","lockAxis"],constrainPosition:["cdkDragConstrainPosition","constrainPosition"],previewClass:["cdkDragPreviewClass","previewClass"],boundaryElement:["cdkDragBoundary","boundaryElement"],rootElementSelector:["cdkDragRootElement","rootElementSelector"],data:["cdkDragData","data"],freeDragPosition:["cdkDragFreeDragPosition","freeDragPosition"]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[r.Cb([{provide:qB,useExisting:t}]),r.Bb]}),t._dragInstances=[],t})();function oN(t,e){let i=t.parentElement;for(;i;){if(i.matches?i.matches(e):i.msMatchesSelector(e))return i;i=i.parentElement}return null}let aN=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[ZB],imports:[rr]}),t})();function lN(t,e){if(1&t&&(r.Vb(0,"mat-option",9),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.value),r.Db(1),r.Mc(" ",t.label," ")}}function cN(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div"),r.Vb(1,"mat-form-field",5),r.Vb(2,"mat-label"),r.Kc(3,"Intervalle de temps"),r.Ub(),r.Vb(4,"mat-select",6),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).criterion.timeWindow=e}),r.Ic(5,lN,2,2,"mat-option",7),r.Ub(),r.Ub(),r.Vb(6,"mat-checkbox",8),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).criterion.sequential=e}),r.Kc(7," Passages ordonn\xe9s "),r.Ub(),r.Ub()}if(2&t){const t=r.gc(2);r.Db(4),r.nc("ngModel",t.criterion.timeWindow)("disabled",!t.editable),r.Db(1),r.nc("ngForOf",t.timeWindows),r.Db(1),r.nc("ngModel",t.criterion.sequential)("disabled",!t.editable)}}function hN(t,e){if(1&t&&(r.Vb(0,"div",21),r.Kc(1),r.Ub()),2&t){const t=r.gc().index;r.Db(1),r.Lc(t+1)}}function uN(t,e){1&t&&(r.Vb(0,"mat-icon",22),r.Kc(1,"drag_handle"),r.Ub())}function dN(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-list-item",17),r.cc("cdkDragStarted",function(){return r.Ac(t),r.gc(3).startReorderingPassages()}),r.Ic(1,hN,2,1,"div",18),r.Ic(2,uN,2,0,"mat-icon",19),r.Vb(3,"app-zone-item",20),r.cc("delete",function(){r.Ac(t);const i=e.$implicit;return r.gc(3).deleteZone(i.zone)}),r.Ub(),r.Ub()}if(2&t){const t=e.$implicit,i=r.gc(3);r.Db(1),r.nc("ngIf",i.criterion.sequential),r.Db(1),r.nc("ngIf",i.zonesEditable),r.Db(1),r.nc("zone",t.zone)("editable",i.zonesEditable)}}function pN(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-zone-form",23),r.cc("save",function(e){return r.Ac(t),r.gc(3).addCreatedZone(e)})("cancel",function(){return r.Ac(t),r.gc(3).hideCreateZoneForm()}),r.Ub()}}function fN(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",24),r.Vb(1,"span"),r.Kc(2,"\xa0Ajouter une zone"),r.Ub(),r.Ub(),r.Vb(3,"button",25),r.cc("click",function(){return r.Ac(t),r.gc(3).displayCreateZoneForm()}),r.Kc(4," Cr\xe9er une zone "),r.Ub()}if(2&t){r.gc();const t=r.wc(6),e=r.gc(2);r.nc("matMenuTriggerFor",t)("disabled",!e.zonesEditable),r.Db(3),r.nc("disabled",!e.zonesEditable)}}function mN(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",26),r.cc("click",function(){r.Ac(t);const i=e.$implicit;return r.gc(3).addZone(i)}),r.Kc(1),r.Ub()}if(2&t){const t=e.$implicit;r.Db(1),r.Mc(" ",t.name," ")}}function gN(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-list",10),r.cc("cdkDropListDropped",function(e){return r.Ac(t),r.gc(2).reorderPassage(e)}),r.Ic(1,dN,4,4,"mat-list-item",11),r.Ub(),r.Vb(2,"div",12),r.Ic(3,pN,1,0,"app-zone-form",13),r.Ic(4,fN,5,3,"ng-template",1),r.Ub(),r.Vb(5,"mat-menu",14,15),r.Ic(7,mN,2,1,"button",16),r.Ub()}if(2&t){const t=r.gc(2);r.Db(1),r.nc("ngForOf",t.criterion.passages)("ngForTrackBy",t.trackById),r.Db(2),r.nc("ngIf",t.showCreateZoneForm),r.Db(1),r.nc("ngIf",!t.showCreateZoneForm),r.Db(3),r.nc("ngForOf",t.availableZones)}}function AN(t,e){if(1&t&&(r.Vb(0,"div",21),r.Kc(1),r.Ub()),2&t){const t=r.gc().index;r.Db(1),r.Lc(t+1)}}function bN(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-list-item"),r.Ic(1,AN,2,1,"div",18),r.Vb(2,"button",29),r.cc("click",function(){r.Ac(t);const i=e.$implicit;return r.gc(3).viewZone(i.zone)}),r.Kc(3),r.Ub(),r.Ub()}if(2&t){const t=e.$implicit,i=r.gc(3);r.Db(1),r.nc("ngIf",i.criterion.sequential),r.Db(2),r.Mc(" ",t.zone.name," ")}}function vN(t,e){if(1&t&&(r.Vb(0,"mat-list",27),r.Ic(1,bN,4,2,"mat-list-item",28),r.Ub()),2&t){const t=r.gc(2);r.Db(1),r.nc("ngForOf",t.criterion.passages)}}function _N(t,e){if(1&t&&(r.Ic(0,cN,8,5,"div",2),r.Ic(1,gN,8,5,"ng-template",3),r.Ic(2,vN,2,1,"ng-template",null,4,r.Jc)),2&t){const t=r.wc(3),e=r.gc();r.nc("ngIf",e.criterion.passages.length>1),r.Db(1),r.nc("ngIf",e.editable)("ngIfElse",t)}}let yN=(()=>{class t extends UU{constructor(t,e,i){super(),this.editZoneService=t,this.mapService=e,this.zonesService=i,this.updateZones=new r.o,this.timeWindows=LI,this.reorderingPassages=!1,this.availableZones=[],this.showCreateZoneForm=!1,this.zonesEditable=!0,this.subscriptions=[],this.usedZonesIds$=new Av.a([])}ngOnInit(){this.usedZonesIds$.next(this.criterion.passages.map(t=>t.zone.id)),this.subscriptions.push(Hg([this.zonesService.zones$,this.usedZonesIds$]).subscribe(([t,e])=>{this.availableZones=t.filter(t=>!e.includes(t.id))})),this.subscriptions.push(this.usedZonesIds$.pipe(Gg(1)).subscribe(()=>{this.updateZones.next(null)})),this.subscriptions.push(this.editZoneService.editedZone$.pipe(mn(),fI(0)).subscribe(t=>{this.zonesEditable=!t}))}ngOnDestroy(){this.subscriptions.forEach(t=>{t.unsubscribe()})}get passages(){return this.criterion.passages.map(t=>t.zone.name).join(", ")}displayCreateZoneForm(){this.showCreateZoneForm=!0}hideCreateZoneForm(){this.showCreateZoneForm=!1}addCreatedZone(t){this.criterion.passages.push({zone:t}),this.hideCreateZoneForm()}viewZone(t){this.mapService.fitOn(wP(t.h3indexes))}deleteZone(t){this.criterion.passages.splice(this.criterion.passages.findIndex(e=>e.zone===t),1),this.usedZonesIds$.next(this.usedZonesIds$.value.filter(e=>e!==t.id))}addZone(t){this.criterion.passages.push({zone:t}),this.usedZonesIds$.next(this.usedZonesIds$.value.concat(t.id))}trackById(t,e){return e.zone.id}startReorderingPassages(){this.reorderingPassages=!0}reorderPassage(t){this.reorderingPassages=!1,LB(this.criterion.passages,t.previousIndex,t.currentIndex)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(sL),r.Pb(pI),r.Pb(kP))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-passage-in-zone-criterion"]],outputs:{updateZones:"updateZones"},features:[r.Cb([{provide:rc,useExisting:t,multi:!0}]),r.Ab],decls:2,vars:4,consts:[[3,"type","enable","editable","enableChange"],[3,"ngIf"],[4,"ngIf"],[3,"ngIf","ngIfElse"],["readonly",""],[1,"mr-2"],[3,"ngModel","disabled","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["color","primary","matTooltip","Cette option active le passage des zones dans l'ordre d\xe9fini",3,"ngModel","disabled","ngModelChange"],[3,"value"],["dense","","cdkDropList","",3,"cdkDropListDropped"],["cdkDrag","",3,"cdkDragStarted",4,"ngFor","ngForOf","ngForTrackBy"],[1,"criterion-content"],["class","u-flex",3,"save","cancel",4,"ngIf"],[1,"add-zones-menu"],["addZonesMenu","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["cdkDrag","",3,"cdkDragStarted"],["class","criterion__sequence-number",4,"ngIf"],["class","criterion__drag-handle","cdkDragHandle","","title","R\xe9ordonner",4,"ngIf"],[1,"u-flex",3,"zone","editable","delete"],[1,"criterion__sequence-number"],["cdkDragHandle","","title","R\xe9ordonner",1,"criterion__drag-handle"],[1,"u-flex",3,"save","cancel"],["mat-button","","title","Ajouter une zone existante",3,"matMenuTriggerFor","disabled"],["mat-button","","title","Cr\xe9er une nouvelle zone",3,"disabled","click"],["mat-menu-item","",3,"click"],["dense",""],[4,"ngFor","ngForOf"],["mat-button","","title","Visualiser la zone",1,"u-flex",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"app-alert-rule-criterion",0),r.cc("enableChange",function(t){return e.enable=t}),r.Ic(1,_N,4,3,"ng-template",1),r.Ub()),2&t&&(r.nc("type",e.criteriaLabels.passageInZone)("enable",e.enable)("editable",e.editable),r.Db(1),r.nc("ngIf",e.criterion.enable))},directives:[$U,ut,_u,cu,Vg,Vc,uh,ct,tF,oA,bl,yU,tN,eU,SU,sN,uU,Yp,iN,lU,Dl,sU,QL],styles:[".criterion__sequence-number[_ngcontent-%COMP%]{font-size:1.2em;font-weight:700;margin-right:.5em}.criterion__drag-handle[_ngcontent-%COMP%]{cursor:move;margin-right:.5em}.cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);background-color:#e6e9f7;font-size:12px}.cdk-drag-preview[_ngcontent-%COMP%] >.mat-list-item-content{display:flex;align-items:center;padding:0 16px;height:inherit}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%], .cdk-drop-list-dragging[_ngcontent-%COMP%] [_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}"]}),t})(),wN=(()=>{class t extends UU{}return t.\u0275fac=function(e){return xN(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-spoofing-criterion"]],features:[r.Cb([{provide:rc,useExisting:t,multi:!0}]),r.Ab],decls:1,vars:3,consts:[[3,"type","enable","editable","enableChange"]],template:function(t,e){1&t&&(r.Vb(0,"app-alert-rule-criterion",0),r.cc("enableChange",function(t){return e.enable=t}),r.Ub()),2&t&&r.nc("type",e.criteriaLabels.spoofing)("enable",e.enable)("editable",e.editable)},directives:[$U],encapsulation:2,changeDetection:0}),t})();const xN=r.Xb(wN),CN=["panel"];function SN(t,e){if(1&t&&(r.Vb(0,"div",0,1),r.lc(2),r.Ub()),2&t){const t=e.id,i=r.gc();r.nc("id",i.id)("ngClass",i._classList),r.Eb("aria-label",i.ariaLabel||null)("aria-labelledby",i._getPanelAriaLabelledby(t))}}const kN=["*"];let EN=0;class DN{constructor(t,e){this.source=t,this.option=e}}class IN{}const PN=Da(IN),ON=new r.s("mat-autocomplete-default-options",{providedIn:"root",factory:function(){return{autoActiveFirstOption:!1}}});let MN=(()=>{class t extends PN{constructor(t,e,i,n){super(),this._changeDetectorRef=t,this._elementRef=e,this._activeOptionChanges=ye.a.EMPTY,this.showPanel=!1,this._isOpen=!1,this.displayWith=null,this.optionSelected=new r.o,this.opened=new r.o,this.closed=new r.o,this.optionActivated=new r.o,this._classList={},this.id="mat-autocomplete-"+EN++,this.inertGroups=(null==n?void 0:n.SAFARI)||!1,this._autoActiveFirstOption=!!i.autoActiveFirstOption}get isOpen(){return this._isOpen&&this.showPanel}get autoActiveFirstOption(){return this._autoActiveFirstOption}set autoActiveFirstOption(t){this._autoActiveFirstOption=ti(t)}set classList(t){this._classList=t&&t.length?oi(t).reduce((t,e)=>(t[e]=!0,t),{}):{},this._setVisibilityClasses(this._classList),this._elementRef.nativeElement.className=""}ngAfterContentInit(){this._keyManager=new Ti(this.options).withWrap(),this._activeOptionChanges=this._keyManager.change.subscribe(t=>{this.optionActivated.emit({source:this,option:this.options.toArray()[t]||null})}),this._setVisibility()}ngOnDestroy(){this._activeOptionChanges.unsubscribe()}_setScrollTop(t){this.panel&&(this.panel.nativeElement.scrollTop=t)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options.length,this._setVisibilityClasses(this._classList),this._changeDetectorRef.markForCheck()}_emitSelectEvent(t){const e=new DN(this,t);this.optionSelected.emit(e)}_getPanelAriaLabelledby(t){return this.ariaLabel?null:this.ariaLabelledby?t+" "+this.ariaLabelledby:t}_setVisibilityClasses(t){t[this._visibleClass]=this.showPanel,t[this._hiddenClass]=!this.showPanel}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(r.l),r.Pb(ON),r.Pb(ci))},t.\u0275dir=r.Kb({type:t,viewQuery:function(t,e){if(1&t&&(r.Pc(r.O,3),r.Pc(CN,1)),2&t){let t;r.vc(t=r.dc())&&(e.template=t.first),r.vc(t=r.dc())&&(e.panel=t.first)}},inputs:{displayWith:"displayWith",autoActiveFirstOption:"autoActiveFirstOption",classList:["class","classList"],ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],panelWidth:"panelWidth"},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},features:[r.Ab]}),t})(),TN=(()=>{class t extends MN{constructor(){super(...arguments),this._visibleClass="mat-autocomplete-visible",this._hiddenClass="mat-autocomplete-hidden"}}return t.\u0275fac=function(e){return RN(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-autocomplete"]],contentQueries:function(t,e,i){if(1&t&&(r.Ib(i,dl,1),r.Ib(i,bl,1)),2&t){let t;r.vc(t=r.dc())&&(e.optionGroups=t),r.vc(t=r.dc())&&(e.options=t)}},hostAttrs:[1,"mat-autocomplete"],inputs:{disableRipple:"disableRipple"},exportAs:["matAutocomplete"],features:[r.Cb([{provide:al,useExisting:t}]),r.Ab],ngContentSelectors:kN,decls:1,vars:0,consts:[["role","listbox",1,"mat-autocomplete-panel",3,"id","ngClass"],["panel",""]],template:function(t,e){1&t&&(r.mc(),r.Ic(0,SN,3,4,"ng-template"))},directives:[at],styles:[".mat-autocomplete-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;visibility:hidden;max-width:none;max-height:256px;position:relative;width:100%;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.mat-autocomplete-panel.mat-autocomplete-visible{visibility:visible}.mat-autocomplete-panel.mat-autocomplete-hidden{visibility:hidden}.mat-autocomplete-panel-above .mat-autocomplete-panel{border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px}.mat-autocomplete-panel .mat-divider-horizontal{margin-top:-1px}.cdk-high-contrast-active .mat-autocomplete-panel{outline:solid 1px}mat-autocomplete{display:none}\n"],encapsulation:2,changeDetection:0}),t})();const RN=r.Xb(TN);let VN=(()=>{class t{constructor(t){this.elementRef=t}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l))},t.\u0275dir=r.Kb({type:t}),t})(),FN=(()=>{class t extends VN{}return t.\u0275fac=function(e){return LN(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","matAutocompleteOrigin",""]],exportAs:["matAutocompleteOrigin"],features:[r.Ab]}),t})();const LN=r.Xb(FN),UN=new r.s("mat-autocomplete-scroll-strategy"),BN={provide:UN,deps:[Fr],useFactory:function(t){return()=>t.scrollStrategies.reposition()}},NN={provide:rc,useExisting:Object(r.W)(()=>zN),multi:!0};let jN=(()=>{class t{constructor(t,e,i,n,r,s,o,a,l,c,h){this._element=t,this._overlay=e,this._viewContainerRef=i,this._zone=n,this._changeDetectorRef=r,this._dir=o,this._formField=a,this._document=l,this._viewportRuler=c,this._defaults=h,this._componentDestroyed=!1,this._autocompleteDisabled=!1,this._manuallyFloatingLabel=!1,this._viewportSubscription=ye.a.EMPTY,this._canOpenOnNextFocus=!0,this._closeKeyEventStream=new _e.a,this._windowBlurHandler=()=>{this._canOpenOnNextFocus=this._document.activeElement!==this._element.nativeElement||this.panelOpen},this._onChange=()=>{},this._onTouched=()=>{},this.position="auto",this.autocompleteAttribute="off",this._overlayAttached=!1,this.optionSelections=Ol(()=>this.autocomplete&&this.autocomplete.options?Object(or.a)(...this.autocomplete.options.map(t=>t.onSelectionChange)):this._zone.onStable.pipe(Qe(1),Mn(()=>this.optionSelections))),this._scrollStrategy=s}get autocompleteDisabled(){return this._autocompleteDisabled}set autocompleteDisabled(t){this._autocompleteDisabled=ti(t)}ngAfterViewInit(){const t=this._getWindow();void 0!==t&&this._zone.runOutsideAngular(()=>t.addEventListener("blur",this._windowBlurHandler))}ngOnChanges(t){t.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){const t=this._getWindow();void 0!==t&&t.removeEventListener("blur",this._windowBlurHandler),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}openPanel(){this._attachOverlay(),this._floatLabel()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this.autocomplete.closed.emit(),this.autocomplete._isOpen=this._overlayAttached=!1,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._componentDestroyed||this._changeDetectorRef.detectChanges())}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return Object(or.a)(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(He(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(He(()=>this._overlayAttached)):Se()).pipe(Object(Ge.a)(t=>t instanceof gl?t:null))}get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return Object(or.a)(en(this._document,"click"),en(this._document,"auxclick"),en(this._document,"touchend")).pipe(He(t=>{const e=this._isInsideShadowRoot&&t.composedPath?t.composedPath()[0]:t.target,i=this._formField?this._formField._elementRef.nativeElement:null,n=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;return this._overlayAttached&&e!==this._element.nativeElement&&(!i||!i.contains(e))&&(!n||!n.contains(e))&&!!this._overlayRef&&!this._overlayRef.overlayElement.contains(e)}))}writeValue(t){Promise.resolve(null).then(()=>this._setTriggerValue(t))}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this._element.nativeElement.disabled=t}_handleKeydown(t){const e=t.keyCode;if(27!==e||ke(t)||t.preventDefault(),this.activeOption&&13===e&&this.panelOpen)this.activeOption._selectViaInteraction(),this._resetActiveItem(),t.preventDefault();else if(this.autocomplete){const i=this.autocomplete._keyManager.activeItem,n=38===e||40===e;this.panelOpen||9===e?this.autocomplete._keyManager.onKeydown(t):n&&this._canOpen()&&this.openPanel(),(n||this.autocomplete._keyManager.activeItem!==i)&&this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0)}}_handleInput(t){let e=t.target,i=e.value;"number"===e.type&&(i=""==i?null:parseFloat(i)),this._previousValue!==i&&(this._previousValue=i,this._onChange(i),this._canOpen()&&this._document.activeElement===t.target&&this.openPanel())}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_floatLabel(t=!1){this._formField&&"auto"===this._formField.floatLabel&&(t?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField.floatLabel="auto",this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){const t=this._zone.onStable.pipe(Qe(1)),e=this.autocomplete.options.changes.pipe(Pe(()=>this._positionStrategy.reapplyLastPosition()),fI(0));return Object(or.a)(t,e).pipe(Mn(()=>{const t=this.panelOpen;return this._resetActiveItem(),this.autocomplete._setVisibility(),this.panelOpen&&(this._overlayRef.updatePosition(),t!==this.panelOpen&&this.autocomplete.opened.emit()),this.panelClosingActions}),Qe(1)).subscribe(t=>this._setValueAndClose(t))}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_setTriggerValue(t){const e=this.autocomplete&&this.autocomplete.displayWith?this.autocomplete.displayWith(t):t,i=null!=e?e:"";this._formField?this._formField._control.value=i:this._element.nativeElement.value=i,this._previousValue=i}_setValueAndClose(t){t&&t.source&&(this._clearPreviousSelectedOption(t.source),this._setTriggerValue(t.source.value),this._onChange(t.source.value),this._element.nativeElement.focus(),this.autocomplete._emitSelectEvent(t.source)),this.closePanel()}_clearPreviousSelectedOption(t){this.autocomplete.options.forEach(e=>{e!==t&&e.selected&&e.deselect()})}_attachOverlay(){var t;null==this._isInsideShadowRoot&&(this._isInsideShadowRoot=!!_i(this._element.nativeElement));let e=this._overlayRef;e?(this._positionStrategy.setOrigin(this._getConnectedElement()),e.updateSize({width:this._getPanelWidth()})):(this._portal=new fe(this.autocomplete.template,this._viewContainerRef,{id:null===(t=this._formField)||void 0===t?void 0:t._labelId}),e=this._overlay.create(this._getOverlayConfig()),this._overlayRef=e,e.keydownEvents().subscribe(t=>{(27===t.keyCode&&!ke(t)||38===t.keyCode&&ke(t,"altKey"))&&(this._resetActiveItem(),this._closeKeyEventStream.next(),t.stopPropagation(),t.preventDefault())}),this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&e&&e.updateSize({width:this._getPanelWidth()})})),e&&!e.hasAttached()&&(e.attach(this._portal),this._closingActionsSubscription=this._subscribeToClosingActions());const i=this.panelOpen;this.autocomplete._setVisibility(),this.autocomplete._isOpen=this._overlayAttached=!0,this.panelOpen&&i!==this.panelOpen&&this.autocomplete.opened.emit()}_getOverlayConfig(){var t;return new br({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir,panelClass:null===(t=this._defaults)||void 0===t?void 0:t.overlayPanelClass})}_getOverlayPosition(){const t=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(t),this._positionStrategy=t,t}_setStrategyPositions(t){const e=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],i=this._aboveClass,n=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:i},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:i}];let r;r="above"===this.position?n:"below"===this.position?e:[...e,...n],t.withPositions(r)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){const t=this.autocomplete;t.autoActiveFirstOption?t._keyManager.setFirstItemActive():t._keyManager.setActiveItem(-1)}_canOpen(){const t=this._element.nativeElement;return!t.readOnly&&!t.disabled&&!this._autocompleteDisabled}_getWindow(){var t;return(null===(t=this._document)||void 0===t?void 0:t.defaultView)||window}_scrollToOption(t){const e=this.autocomplete,i=vl(t,e.options,e.optionGroups);if(0===t&&1===i)e._setScrollTop(0);else{const i=e.options.toArray()[t];if(i){const t=i._getHostElement(),n=_l(t.offsetTop,t.offsetHeight,e._getScrollTop(),e.panel.nativeElement.offsetHeight);e._setScrollTop(n)}}}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(Fr),r.Pb(r.S),r.Pb(r.B),r.Pb(r.h),r.Pb(UN),r.Pb(Zn,8),r.Pb(vu,9),r.Pb(a,8),r.Pb(nr),r.Pb(ON,8))},t.\u0275dir=r.Kb({type:t,inputs:{position:["matAutocompletePosition","position"],autocompleteAttribute:["autocomplete","autocompleteAttribute"],autocompleteDisabled:["matAutocompleteDisabled","autocompleteDisabled"],autocomplete:["matAutocomplete","autocomplete"],connectedTo:["matAutocompleteConnectedTo","connectedTo"]},features:[r.Bb]}),t})(),zN=(()=>{class t extends jN{constructor(){super(...arguments),this._aboveClass="mat-autocomplete-panel-above"}}return t.\u0275fac=function(e){return HN(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-autocomplete-trigger"],hostVars:7,hostBindings:function(t,e){1&t&&r.cc("focusin",function(){return e._handleFocus()})("blur",function(){return e._onTouched()})("input",function(t){return e._handleInput(t)})("keydown",function(t){return e._handleKeydown(t)}),2&t&&r.Eb("autocomplete",e.autocompleteAttribute)("role",e.autocompleteDisabled?null:"combobox")("aria-autocomplete",e.autocompleteDisabled?null:"list")("aria-activedescendant",e.panelOpen&&e.activeOption?e.activeOption.id:null)("aria-expanded",e.autocompleteDisabled?null:e.panelOpen.toString())("aria-owns",e.autocompleteDisabled||!e.panelOpen||null==e.autocomplete?null:e.autocomplete.id)("aria-haspopup",!e.autocompleteDisabled)},exportAs:["matAutocompleteTrigger"],features:[r.Cb([NN]),r.Ab]}),t})();const HN=r.Xb(zN);let KN=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[BN],imports:[[zr,yl,Sa,Et],rr,yl,Sa]}),t})();const $N=["searchInput"];function GN(t,e){if(1&t&&(r.Vb(0,"mat-option",7),r.Vb(1,"div",8),r.Vb(2,"div"),r.Qb(3,"app-flag",9),r.Kc(4),r.Ub(),r.Vb(5,"div"),r.Vb(6,"span",10),r.Kc(7),r.Ub(),r.Kc(8),r.Ub(),r.Ub(),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t),r.Db(3),r.nc("flag",t.country.flag),r.Db(1),r.Mc(" ",t.name||"?"," "),r.Db(3),r.Mc("MMSI ",t.mmsi,""),r.Db(1),r.Mc(" IMO ",t.imo||"?"," ")}}let WN=(()=>{class t{constructor(t){this.workerService=t,this.allowTextValue=!1,this.existingItems=[],this.selectItem=new r.o,this.searchFormControl=new eh,this.loadingResults=!1}ngOnInit(){this.searchResults=this.searchFormControl.valueChanges.pipe(Be(300),Pe(()=>{this.loadingResults=!0}),Object(Ge.a)(t=>"string"==typeof t?t:t.name),np(t=>""===t?Se([]):this.workerService.ships.findShips(t.toUpperCase())),Object(Ge.a)(t=>(this.loadingResults=!1,this.existingItems.length>0?t.filter(t=>!this.existingItems.includes(t.mmsi)):t)))}selectShip(t){t&&(this.selectItem.emit(t),this.searchFormControl.reset(""))}selectValue(){this.allowTextValue&&this.searchFormControl.value&&(this.selectItem.emit(this.searchFormControl.value),this.searchFormControl.reset(""))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-ship-identifier-input"]],viewQuery:function(t,e){if(1&t&&r.Pc($N,1),2&t){let t;r.vc(t=r.dc())&&(e.inputElement=t.first)}},inputs:{allowTextValue:"allowTextValue",existingItems:"existingItems"},outputs:{selectItem:"selectItem"},decls:9,vars:6,consts:[["matAutocompleteOrigin","",1,"ship-identifier-input"],["origin","matAutocompleteOrigin"],["type","search","placeholder","Nom, MMSI, IMO...","matInput","",1,"ship-identifier-input__input",3,"formControl","matAutocomplete","matAutocompleteConnectedTo","keyup.enter"],["searchInput",""],[3,"optionSelected"],["autocomplete","matAutocomplete"],["class","ship-identifier-input__result-item",3,"value",4,"ngFor","ngForOf"],[1,"ship-identifier-input__result-item",3,"value"],[1,"d-flex-column"],[3,"flag"],[1,"mr-3"]],template:function(t,e){if(1&t&&(r.Vb(0,"div",0,1),r.Vb(2,"mat-form-field"),r.Vb(3,"input",2,3),r.cc("keyup.enter",function(){return e.selectValue()}),r.Ub(),r.Vb(5,"mat-autocomplete",4,5),r.cc("optionSelected",function(){return e.selectShip(e.searchFormControl.value)}),r.Ic(7,GN,9,5,"mat-option",6),r.hc(8,"async"),r.Ub(),r.Ub(),r.Ub()),2&t){const t=r.wc(1),i=r.wc(6);r.Db(3),r.nc("formControl",e.searchFormControl)("matAutocomplete",i)("matAutocompleteConnectedTo",t),r.Db(4),r.nc("ngForOf",r.ic(8,4,e.searchResults))}},directives:[FN,_u,Ou,ac,zN,Vc,bh,TN,ct,bl,GF],pipes:[St],styles:[".ship-identifier-input[_ngcontent-%COMP%]{flex:1;display:flex;color:#50647f}.ship-identifier-input[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:100%}.ship-identifier-input__input[_ngcontent-%COMP%]{border:0;outline:0;padding:8px;height:1.5em;min-width:300px}.ship-identifier-input__result-item[_ngcontent-%COMP%]{line-height:22px}","[_nghost-%COMP%] {\n flex: 1;\n display: flex;\n }"],changeDetection:0}),t})();function ZN(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-chip",7),r.cc("removed",function(){r.Ac(t);const i=e.index;return r.gc(3).criterion.identifiers.splice(i,1)}),r.Kc(1),r.Vb(2,"mat-icon",8),r.Kc(3,"cancel"),r.Ub(),r.Ub()}if(2&t){const t=e.$implicit;r.nc("selectable",!1),r.Db(1),r.Mc(" ",t," ")}}function qN(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-chip-list"),r.Ic(1,ZN,4,2,"mat-chip",4),r.Ub(),r.Vb(2,"div",5),r.Vb(3,"app-ship-identifier-input",6),r.cc("selectItem",function(e){return r.Ac(t),r.gc(2).addIdentifier(e)}),r.Ub(),r.Ub()}if(2&t){const t=r.gc(2);r.Db(1),r.nc("ngForOf",t.criterion.identifiers),r.Db(2),r.nc("allowTextValue",!0)}}function YN(t,e){if(1&t&&r.Kc(0),2&t){const t=r.gc(2);r.Mc(" Identifiants : ",t.criterion.identifiers.join(", ")," ")}}function QN(t,e){if(1&t&&(r.Ic(0,qN,4,2,"ng-template",2),r.Ic(1,YN,1,1,"ng-template",null,3,r.Jc)),2&t){const t=r.wc(2),e=r.gc();r.nc("ngIf",e.editable)("ngIfElse",t)}}let XN=(()=>{class t extends UU{addIdentifier(t){t&&this.criterion.identifiers.push(t instanceof String?t:t.name)}}return t.\u0275fac=function(e){return JN(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-identifier-filter"]],features:[r.Cb([{provide:rc,useExisting:t,multi:!0}]),r.Ab],decls:2,vars:4,consts:[[3,"type","enable","editable","enableChange"],[3,"ngIf"],[3,"ngIf","ngIfElse"],["readonly",""],["disableRipple","","removable","",3,"selectable","removed",4,"ngFor","ngForOf"],[1,"criterion-content"],[3,"allowTextValue","selectItem"],["disableRipple","","removable","",3,"selectable","removed"],["matChipRemove","","title","Retirer ce filtre"]],template:function(t,e){1&t&&(r.Vb(0,"app-alert-rule-criterion",0),r.cc("enableChange",function(t){return e.enable=t}),r.Ic(1,QN,3,2,"ng-template",1),r.Ub()),2&t&&(r.nc("type",e.criteriaLabels.identifier)("enable",e.enable)("editable",e.editable),r.Db(1),r.nc("ngIf",e.criterion.enable))},directives:[$U,ut,_L,ct,WN,pL,Yp,fL],encapsulation:2,changeDetection:0}),t})();const JN=r.Xb(XN);let tj=(()=>{class t{constructor(){this.values=[],this.key="",this.text="Tout s\xe9lectionner"}isChecked(){return this.model.value&&this.values.length&&this.model.value.length===this.values.length}isIndeterminate(){return this.model.value&&this.values.length&&this.model.value.length&&this.model.value.length<this.values.length}toggleSelection(t){this.model.update.emit(t.checked?this.values.map(t=>t[this.key]):[])}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-select-check-all"]],inputs:{model:"model",values:"values",key:"key",text:"text"},decls:2,vars:4,consts:[["color","primary",1,"mat-option",3,"disableRipple","indeterminate","checked","click","change"]],template:function(t,e){1&t&&(r.Vb(0,"mat-checkbox",0),r.cc("click",function(t){return t.stopPropagation()})("change",function(t){return e.toggleSelection(t)}),r.Kc(1),r.Ub()),2&t&&(r.nc("disableRipple",!0)("indeterminate",e.isIndeterminate())("checked",e.isChecked()),r.Db(1),r.Mc(" ",e.text," "))},directives:[tF],styles:[""]}),t})();function ej(t,e){if(1&t&&(r.Vb(0,"mat-option",10),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.id),r.Db(1),r.Mc(" ",t.name," ")}}function ij(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",4),r.Vb(1,"mat-form-field",5),r.Vb(2,"mat-label"),r.Kc(3,"Flottes"),r.Ub(),r.Vb(4,"mat-select",6,7),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).criterion.fleets=e}),r.Qb(6,"app-select-check-all",8),r.Ic(7,ej,2,2,"mat-option",9),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=r.wc(5),e=r.gc(2);r.Db(4),r.nc("ngModel",e.criterion.fleets),r.Db(2),r.nc("model",t)("values",e.fleets)("key","id"),r.Db(1),r.nc("ngForOf",e.fleets)}}function nj(t,e){if(1&t&&r.Kc(0),2&t){const t=r.gc(2);r.Mc(" Flottes : ",t.fleetNames.join(", ")," ")}}function rj(t,e){if(1&t&&(r.Ic(0,ij,8,5,"ng-template",2),r.Ic(1,nj,1,1,"ng-template",null,3,r.Jc)),2&t){const t=r.wc(2),e=r.gc();r.nc("ngIf",e.editable)("ngIfElse",t)}}let sj=(()=>{class t extends UU{constructor(t){super(),this.fleetsService=t,this.fleets=[],this.fleetsService.fleets$.subscribe(t=>{this.fleets=t})}get fleetNames(){return this.criterion.fleets.map(t=>{var e;return(null!==(e=this.fleetsService.fleetsById[t])&&void 0!==e?e:{}).name}).filter(t=>!!t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(OT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-fleet-filter"]],features:[r.Cb([{provide:rc,useExisting:t,multi:!0}]),r.Ab],decls:2,vars:4,consts:[[3,"type","enable","editable","enableChange"],[3,"ngIf"],[3,"ngIf","ngIfElse"],["readonly",""],[1,"criterion-content"],[1,"d-block"],["multiple","",3,"ngModel","ngModelChange"],["fleetSelection","ngModel"],[3,"model","values","key"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]],template:function(t,e){1&t&&(r.Vb(0,"app-alert-rule-criterion",0),r.cc("enableChange",function(t){return e.enable=t}),r.Ic(1,rj,3,2,"ng-template",1),r.Ub()),2&t&&(r.nc("type",e.criteriaLabels.fleet)("enable",e.enable)("editable",e.editable),r.Db(1),r.nc("ngIf",e.criterion.enable))},directives:[$U,ut,_u,cu,Vg,Vc,uh,tj,ct,bl],encapsulation:2,changeDetection:0}),t})();function oj(t,e){if(1&t&&(r.Vb(0,"mat-option",10),r.Qb(1,"app-flag",11),r.Kc(2),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.flag),r.Db(1),r.nc("flag",t.flag),r.Db(1),r.Mc(" ",t.name," ")}}function aj(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",4),r.Vb(1,"mat-form-field",5),r.Vb(2,"mat-label"),r.Kc(3,"Pavillon"),r.Ub(),r.Vb(4,"mat-select",6,7),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).criterion.flags=e}),r.Qb(6,"app-select-check-all",8),r.Ic(7,oj,3,3,"mat-option",9),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=r.wc(5),e=r.gc(2);r.Db(4),r.nc("ngModel",e.criterion.flags),r.Db(2),r.nc("model",t)("values",e.countries)("key","flag"),r.Db(1),r.nc("ngForOf",e.countries)}}function lj(t,e){if(1&t&&(r.Vb(0,"mat-option",10),r.Qb(1,"app-flag",11),r.Kc(2),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.flag),r.Db(1),r.nc("flag",t.flag),r.Db(1),r.Mc(" ",t.name," ")}}function cj(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-select",12,7),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).criterion.flags=e}),r.Qb(2,"app-select-check-all",8),r.Ic(3,lj,3,3,"mat-option",9),r.Ub()}if(2&t){const t=r.wc(1),e=r.gc(2);r.nc("ngModel",e.criterion.flags),r.Db(2),r.nc("model",t)("values",e.countries)("key","flag"),r.Db(1),r.nc("ngForOf",e.countries)}}function hj(t,e){if(1&t&&(r.Ic(0,aj,8,5,"ng-template",2),r.Ic(1,cj,4,5,"ng-template",null,3,r.Jc)),2&t){const t=r.wc(2),e=r.gc();r.nc("ngIf",e.editable)("ngIfElse",t)}}let uj=(()=>{class t extends UU{constructor(){super(...arguments),this.countries=jI}}return t.\u0275fac=function(e){return dj(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-flag-filter"]],features:[r.Cb([{provide:rc,useExisting:t,multi:!0}]),r.Ab],decls:2,vars:4,consts:[[3,"type","enable","editable","enableChange"],[3,"ngIf"],[3,"ngIf","ngIfElse"],["readonly",""],[1,"criterion-content"],[1,"d-block","px-3"],["multiple","",3,"ngModel","ngModelChange"],["countrySelection","ngModel"],[3,"model","values","key"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[3,"flag"],["multiple","","disabled","",3,"ngModel","ngModelChange"]],template:function(t,e){1&t&&(r.Vb(0,"app-alert-rule-criterion",0),r.cc("enableChange",function(t){return e.enable=t}),r.Ic(1,hj,3,2,"ng-template",1),r.Ub()),2&t&&(r.nc("type",e.criteriaLabels.flag)("enable",e.enable)("editable",e.editable),r.Db(1),r.nc("ngIf",e.criterion.enable))},directives:[$U,ut,_u,cu,Vg,Vc,uh,tj,ct,bl,GF],encapsulation:2,changeDetection:0}),t})();const dj=r.Xb(uj);function pj(t,e){if(1&t&&(r.Vb(0,"mat-option",10),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.key),r.Db(1),r.Mc(" ",t.name," ")}}function fj(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",4),r.Vb(1,"mat-form-field",5),r.Vb(2,"mat-label"),r.Kc(3,"Types"),r.Ub(),r.Vb(4,"mat-select",6,7),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).criterion.types=e}),r.Qb(6,"app-select-check-all",8),r.Ic(7,pj,2,2,"mat-option",9),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=r.wc(5),e=r.gc(2);r.Db(4),r.nc("ngModel",e.criterion.types),r.Db(2),r.nc("model",t)("values",e.vesselTypes)("key","key"),r.Db(1),r.nc("ngForOf",e.vesselTypes)}}function mj(t,e){if(1&t&&r.Kc(0),2&t){const t=r.gc(2);r.Mc(" ",t.criteriaTypes.join(", ")," ")}}function gj(t,e){if(1&t&&(r.Ic(0,fj,8,5,"ng-template",2),r.Ic(1,mj,1,1,"ng-template",null,3,r.Jc)),2&t){const t=r.wc(2),e=r.gc();r.nc("ngIf",e.editable)("ngIfElse",t)}}let Aj=(()=>{class t extends UU{constructor(){super(...arguments),this.typesControl=new eh,this.vesselTypes=kD,this.vesselTypeLabelsByType=ED}get criteriaTypes(){return this.criterion.types.map(t=>DD[t].name)}}return t.\u0275fac=function(e){return bj(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-type-filter"]],features:[r.Cb([{provide:rc,useExisting:t,multi:!0}]),r.Ab],decls:2,vars:4,consts:[[3,"type","enable","editable","enableChange"],[3,"ngIf"],[3,"ngIf","ngIfElse"],["readonly",""],[1,"criterion-content"],[1,"d-block"],["multiple","",3,"ngModel","ngModelChange"],["typeSelection","ngModel"],[3,"model","values","key"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]],template:function(t,e){1&t&&(r.Vb(0,"app-alert-rule-criterion",0),r.cc("enableChange",function(t){return e.enable=t}),r.Ic(1,gj,3,2,"ng-template",1),r.Ub()),2&t&&(r.nc("type",e.criteriaLabels.type)("enable",e.enable)("editable",e.editable),r.Db(1),r.nc("ngIf",e.criterion.enable))},directives:[$U,ut,_u,cu,Vg,Vc,uh,tj,ct,bl],encapsulation:2,changeDetection:0}),t})();const bj=r.Xb(Aj);function vj(t,e){1&t&&r.Rb(0)}const _j=function(t){return{alert:t}};function yj(t,e){if(1&t&&r.Ic(0,vj,1,0,"ng-container",6),2&t){const t=r.gc();r.nc("ngTemplateOutlet",t.titleRef)("ngTemplateOutletContext",r.sc(2,_j,t.alert))}}function wj(t,e){1&t&&r.Rb(0)}function xj(t,e){1&t&&(r.Vb(0,"mat-icon",16),r.Kc(1,"report_off"),r.Ub())}function Cj(t,e){if(1&t&&(r.Vb(0,"div",12),r.Ic(1,wj,1,0,"ng-container",6),r.Ic(2,xj,2,0,"mat-icon",13),r.Ub(),r.Vb(3,"div",14),r.hc(4,"timeago"),r.Vb(5,"mat-icon",15),r.Kc(6,"access_time"),r.Ub(),r.Kc(7),r.hc(8,"date"),r.Ub()),2&t){const t=r.gc();r.Db(1),r.nc("ngTemplateOutlet",t.titleRef)("ngTemplateOutletContext",r.sc(11,_j,t.alert)),r.Db(1),r.nc("ngIf",t.alert.false_positive),r.Db(1),r.oc("title",r.ic(4,5,1e3*t.alert.start)),r.Db(4),r.Mc(" ",r.kc(8,7,1e3*t.alert.start,"yyyy-MM-dd HH:mm:ss z",t.mapConfigService.useUTCDates$.value&&"z")," ")}}function Sj(t,e){1&t&&r.Rb(0)}function kj(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",17),r.cc("click",function(){return r.Ac(t),r.gc().unreadAlert()}),r.Vb(1,"mat-icon"),r.Kc(2,"markunread"),r.Ub(),r.Kc(3," Marquer comme non-lu "),r.Ub()}}function Ej(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",18),r.cc("click",function(){return r.Ac(t),r.gc().readAlert()}),r.Vb(1,"mat-icon"),r.Kc(2,"drafts"),r.Ub(),r.Kc(3," Marquer comme lu "),r.Ub()}}function Dj(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",19),r.cc("click",function(){return r.Ac(t),r.gc().markAsFalsePositive()}),r.Vb(1,"mat-icon"),r.Kc(2,"report_off"),r.Ub(),r.Kc(3," Marquer comme faux-positif "),r.Ub()}}function Ij(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",20),r.cc("click",function(){return r.Ac(t),r.gc().markAsTruePositive()}),r.Vb(1,"mat-icon"),r.Kc(2,"report"),r.Ub(),r.Kc(3," Marquer comme vrai-positif "),r.Ub()}}let Pj=(()=>{class t extends LT{constructor(t,e,i,n,s){super(),this.configService=t,this.historyService=e,this.mapConfigService=i,this.mapService=n,this.workerService=s,this.highlight=!1,this.simple=!0,this.update=new r.o}ngOnInit(){this.ensureMandatoryInputParams("alert")}locateAlert(){return Object(ue.a)(this,void 0,void 0,function*(){this.configService.devMode&&console.log("locate-alert",JSON.stringify(this.alert,null,2)),this.mapService.pingLocation([this.alert.lon,this.alert.lat]),this.mapService.centerOnLonLat([this.alert.lon,this.alert.lat]),this.alert.read||(yield this.readAlert())})}locateAndZoom(){this.mapService.locate([this.alert.lon,this.alert.lat])}readAlert(){return Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.alerts.markAlertAsRead(this.alert.id),this.alert.read=!0,this.emitUpdate()})}unreadAlert(){return Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.alerts.markAlertAsUnread(this.alert.id),this.alert.read=!1,this.emitUpdate()})}markAsFalsePositive(){return Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.alerts.markAlertAsFalsePositive(this.alert.id),this.alert.false_positive=!0,this.emitUpdate()})}markAsTruePositive(){return Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.alerts.markAlertAsTruePositive(this.alert.id),this.alert.false_positive=!1,this.emitUpdate()})}emitUpdate(){this.update.emit(this.alert)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(cI),r.Pb(bI),r.Pb(hI),r.Pb(pI),r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-alert-item"]],inputs:{alert:"alert",titleRef:"titleRef",menuItemsRef:"menuItemsRef",highlight:"highlight",simple:"simple"},outputs:{update:"update"},features:[r.Ab],decls:18,vars:15,consts:[[1,"alert-item"],["mat-button","","title","Localiser l'alerte (double-clic = zoom)",1,"alert-item__content",3,"click","dblclick"],[3,"ngIf"],["mat-button","","title","Actions",1,"alert-item__actions-button",3,"matMenuTriggerFor"],[1,"u-wide-menu"],["alertActionsMenu","matMenu"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["mat-menu-item","","title","Marquer comme non-lu",3,"click",4,"ngIf"],["mat-menu-item","","title","Marquer comme lu",3,"click",4,"ngIf"],["mat-menu-item","","title","Marquer comme faux-positif",3,"click",4,"ngIf"],["mat-menu-item","","title","Marquer comme vrai-positif",3,"click",4,"ngIf"],["mat-menu-item","","title","Visualiser la situation des navires",3,"click"],[1,"alert-item__title"],["style","margin-left: .5em","title","L'alerte a \xe9t\xe9 marqu\xe9e comme \xe9tant un faux-positif",4,"ngIf"],[1,"alert-item__timestamp",3,"title"],["title","R\xe9ception",1,"mini-icon","mr-1"],["title","L'alerte a \xe9t\xe9 marqu\xe9e comme \xe9tant un faux-positif",2,"margin-left",".5em"],["mat-menu-item","","title","Marquer comme non-lu",3,"click"],["mat-menu-item","","title","Marquer comme lu",3,"click"],["mat-menu-item","","title","Marquer comme faux-positif",3,"click"],["mat-menu-item","","title","Marquer comme vrai-positif",3,"click"]],template:function(t,e){if(1&t&&(r.Vb(0,"div",0),r.Vb(1,"button",1),r.cc("click",function(){return e.locateAlert()})("dblclick",function(){return e.locateAndZoom()}),r.Ic(2,yj,1,4,"ng-template",2),r.Ic(3,Cj,9,13,"ng-template",2),r.Ub(),r.Vb(4,"button",3),r.Vb(5,"mat-icon"),r.Kc(6,"more_vert"),r.Ub(),r.Ub(),r.Vb(7,"mat-menu",4,5),r.Ic(9,Sj,1,0,"ng-container",6),r.Ic(10,kj,4,0,"button",7),r.Ic(11,Ej,4,0,"button",8),r.Ic(12,Dj,4,0,"button",9),r.Ic(13,Ij,4,0,"button",10),r.Vb(14,"button",11),r.cc("click",function(){return e.historyService.setTimestamp(e.alert.start)}),r.Vb(15,"mat-icon"),r.Kc(16,"history"),r.Ub(),r.Kc(17," Visualiser la situation des navires "),r.Ub(),r.Ub(),r.Ub()),2&t){const t=r.wc(8);r.Hb("alert-item--unread",!e.alert.read)("alert-item--highlighted",e.highlight),r.Db(2),r.nc("ngIf",!e.simple),r.Db(1),r.nc("ngIf",e.simple),r.Db(1),r.nc("matMenuTriggerFor",t),r.Db(5),r.nc("ngTemplateOutlet",e.menuItemsRef)("ngTemplateOutletContext",r.sc(13,_j,e.alert)),r.Db(1),r.nc("ngIf",e.alert.read),r.Db(1),r.nc("ngIf",!e.alert.read),r.Db(1),r.nc("ngIf",!e.alert.false_positive),r.Db(1),r.nc("ngIf",e.alert.false_positive)}},directives:[Dl,ut,sU,Yp,eU,vt,QL],pipes:[Tx,kt],styles:[".alert-item[_ngcontent-%COMP%]{flex:1;display:flex;align-items:stretch;justify-content:stretch;transition:background-color 2s ease-out;min-height:82px;padding-left:6px}.alert-item--unread[_ngcontent-%COMP%]{font-weight:600;border-left:6px solid #3778ff;padding-left:0}.alert-item--highlighted[_ngcontent-%COMP%]{background-color:#f32121;transition:0s}.alert-item__content[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;align-items:stretch;justify-content:center;line-height:24px;padding:.5em;font-weight:inherit!important;text-align:left}.alert-item__title[_ngcontent-%COMP%]{padding:0;width:100%;display:flex;justify-content:space-between;align-items:center;font-size:1.1em}.alert-item__actions-button[_ngcontent-%COMP%]{min-width:inherit!important}.alert-item__timestamp[_ngcontent-%COMP%]{color:#424242;font-weight:500;display:flex;align-items:center}"],changeDetection:0}),t})();const Oj=["alertElements"];function Mj(t,e){if(1&t&&r.Kc(0),2&t){const t=r.gc();r.Mc(" ",t.activeRulesFiltersCount>0?t.activeRulesFiltersCount+" filtre(s) de r\xe8gles actif(s)":"Aucun filtre de r\xe8gles actif"," ")}}function Tj(t,e){1&t&&r.Kc(0," Afficher les filtres ")}function Rj(t,e){if(1&t&&(r.Vb(0,"mat-option",15),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.id),r.Db(1),r.Mc(" ",t.name," ")}}function Vj(t,e){if(1&t){const t=r.Wb();r.Vb(0,"h3",6),r.Kc(1," R\xe8gles d'alertes "),r.Vb(2,"button",12),r.cc("click",function(){return r.Ac(t),r.gc().resetRulesFilters()}),r.Kc(3," R\xe9initialiser "),r.Ub(),r.Ub(),r.Vb(4,"mat-list-item"),r.Vb(5,"mat-form-field"),r.Vb(6,"mat-label"),r.Kc(7,"R\xe8gles"),r.Ub(),r.Vb(8,"mat-select",13),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc().updateAlertRulesFilter(e)}),r.Ic(9,Rj,2,2,"mat-option",14),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.Db(8),r.nc("ngModel",t.alertsFilter.rules),r.Db(1),r.nc("ngForOf",t.alertRules)}}function Fj(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-alert-item",18,19),r.cc("update",function(i){r.Ac(t);const n=e.$implicit;return r.gc(2).updateAlert(n.id,i)}),r.Ub()}if(2&t){const t=e.$implicit,i=r.gc(2);r.nc("titleRef",i.alertTitleRef)("simple",i.simpleItems)("menuItemsRef",i.alertMenuItemsRef)("alert",t)("highlight",t.id===i.highlightedAlertId),r.Eb("data-id",t.id)}}function Lj(t,e){if(1&t&&(r.Vb(0,"div",16),r.Ic(1,Fj,2,6,"app-alert-item",17),r.Ub()),2&t){const t=r.gc();r.Db(1),r.nc("ngForOf",t.displayedAlerts)("ngForTrackBy",t.trackByIndex)}}function Uj(t,e){1&t&&(r.Vb(0,"div",20),r.Kc(1," Aucune alerte ne correspond aux filtres\n"),r.Ub())}function Bj(t,e){1&t&&(r.Vb(0,"div",20),r.Kc(1," Aucune alerte pour cette p\xe9riode\n"),r.Ub())}let Nj=(()=>{class t extends LT{constructor(t,e,i,n,r){super(),this.changeDetectorRef=t,this.ngZone=e,this.alertRulesService=i,this.configService=n,this.interactionsService=r,this.enableRuleFilters=!1,this.simpleItems=!0,this.alertRules=[],this.alertsFilter=new WD,this.filteredAlerts=[],this.displayedAlerts=[],this.currentAlertsPageIndex=0,this.alertsPageSize=30,this.highlightedAlertId=null,this.alertsFilter$=new Av.a(new WD),this.currentAlertsPageIndex$=new Av.a(0),this.filteredAlerts$=new Av.a([])}ngOnInit(){if(this.ensureMandatoryInputParams("alerts$"),this.subscriptions.push(this.alertRulesService.alertRules$.pipe(Rv()).subscribe(t=>{this.alertRules=t,this.alertRules.map(t=>t.id)})),this.configService.alertsFilter){const t=this.alertRules.map(t=>t.id);this.configService.alertsFilter.rules=this.configService.alertsFilter.rules.filter(e=>t.includes(e)),this.alertsFilter$.next(this.configService.alertsFilter)}else this.resetRulesFilters();this.subscriptions.push(this.alerts$.subscribe(t=>{this.alerts=t})),this.subscriptions.push(Hg([this.alerts$,this.alertsFilter$]).pipe(Object(Ge.a)(([t,e])=>t.filter(t=>(0===e.rules.length||e.rules.includes(t.rule_id))&&(e.showReadAlerts||!t.read)&&(e.showFalsePositiveAlerts||!t.false_positive)))).subscribe(t=>{this.filteredAlerts=t,this.filteredAlerts$.next(t)})),this.subscriptions.push(Hg([this.filteredAlerts$,this.currentAlertsPageIndex$]).pipe(He(([t,e])=>{if(0===t.length&&0!==e)return this.showAlertsPage(0),!1;const i=e*this.alertsPageSize;if(0===t.slice(i,i+this.alertsPageSize).length&&t.length>0){const e=Math.ceil(t.length/this.alertsPageSize)-1;return this.showAlertsPage(-1===e?0:e),!1}return!0}),Object(Ge.a)(([t,e])=>{const i=e*this.alertsPageSize;return t.slice(i,i+this.alertsPageSize)})).subscribe(t=>{this.displayedAlerts=t,this.changeDetectorRef.markForCheck()})),this.subscriptions.push(this.alertsFilter$.subscribe(t=>{this.alertsFilter=t,this.configService.set("alertsFilter",t),this.showAlertsPage(0)})),this.subscriptions.push(this.interactionsService.selectAlertFeature$.subscribe(t=>{const e=this.getPageIndexForAlertId(t.id);-1!==e&&this.currentAlertsPageIndex!==e&&this.showAlertsPage(e),setTimeout(()=>{const e=this.alertElements.find(e=>e.nativeElement.dataset.id===t.id);e&&e.nativeElement.scrollIntoView({behavior:"smooth"})},225),this.highlightedAlertId=t.id,this.ngZone.run(()=>{setTimeout(()=>{this.highlightedAlertId=null,this.changeDetectorRef.markForCheck()},16),this.changeDetectorRef.markForCheck()})}))}get activeRulesFiltersCount(){const t=this.alertsFilter.rules.length;return t===this.alertRules.length?0:t}updateShowReadAlerts(t){this.alertsFilter.showReadAlerts=t,this.triggerAlertsFilterUpdate()}updateShowFalsePositiveAlerts(t){this.alertsFilter.showFalsePositiveAlerts=t,this.triggerAlertsFilterUpdate()}updateAlertRulesFilter(t){this.alertsFilter.rules=t,this.triggerAlertsFilterUpdate()}resetRulesFilters(){this.updateAlertRulesFilter(this.alertRules.map(t=>t.id))}triggerAlertsFilterUpdate(){this.alertsFilter$.next(this.alertsFilter)}showAlertsPage(t){this.currentAlertsPageIndex$.next(t),this.currentAlertsPageIndex=t}trackByIndex(t){return t}updateAlert(t,e){const i=this.alerts.find(e=>e.id===t);if(!i)throw new Error(`Missing alert with id '${t}'`);Object.assign(i,e),this.alerts$.next(this.alerts)}getPageIndexForAlertId(t){const e=this.filteredAlerts.findIndex(e=>e.id===t);if(-1===e)return-1;const i=Math.ceil((e+1)/this.alertsPageSize)-1;return-1===i?0:i}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(r.B),r.Pb(DP),r.Pb(cI),r.Pb(ET))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-alerts-list"]],viewQuery:function(t,e){if(1&t&&r.Pc(Oj,1,r.l),2&t){let t;r.vc(t=r.dc())&&(e.alertElements=t)}},inputs:{alerts$:"alerts$",enableRuleFilters:"enableRuleFilters",alertTitleRef:"alertTitleRef",alertMenuItemsRef:"alertMenuItemsRef",simpleItems:"simpleItems"},features:[r.Ab],decls:22,vars:13,consts:[["mat-button","","title","Filtrer les alertes",1,"alerts-list__filters",3,"color","matMenuTriggerFor"],[3,"ngIf","ngIfElse"],["disabledRuleFilters",""],[1,"u-wide-menu"],["alertsFilterMenu","matMenu"],[3,"click"],["mat-subheader",""],["color","primary",3,"ngModel","ngModelChange"],[3,"ngIf"],["class","scrollable",4,"ngIf"],["class","panel__content u-center",4,"ngIf"],["showFirstLastButtons","","hidePageSize","",3,"pageIndex","length","pageSize","page"],["mat-button","","title","R\xe9initialiser les filtres",1,"alerts-list__reset-filters-btn",3,"click"],["multiple","",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"scrollable"],[3,"titleRef","simple","menuItemsRef","alert","highlight","update",4,"ngFor","ngForOf","ngForTrackBy"],[3,"titleRef","simple","menuItemsRef","alert","highlight","update"],["alertElements",""],[1,"panel__content","u-center"]],template:function(t,e){if(1&t&&(r.Vb(0,"button",0),r.Vb(1,"mat-icon"),r.Kc(2,"filter_list"),r.Ub(),r.Ic(3,Mj,1,1,"ng-template",1),r.Ic(4,Tj,1,0,"ng-template",null,2,r.Jc),r.Ub(),r.Vb(6,"mat-menu",3,4),r.Vb(8,"mat-list",5),r.cc("click",function(t){return t.stopPropagation()}),r.Vb(9,"h2",6),r.Kc(10,"Filtres"),r.Ub(),r.Vb(11,"mat-list-item"),r.Vb(12,"mat-checkbox",7),r.cc("ngModelChange",function(t){return e.updateShowReadAlerts(t)}),r.Kc(13,"Afficher les alertes lues"),r.Ub(),r.Ub(),r.Vb(14,"mat-list-item"),r.Vb(15,"mat-checkbox",7),r.cc("ngModelChange",function(t){return e.updateShowFalsePositiveAlerts(t)}),r.Kc(16,"Afficher les faux-positifs"),r.Ub(),r.Ub(),r.Ic(17,Vj,10,2,"ng-template",8),r.Ub(),r.Ub(),r.Ic(18,Lj,2,2,"div",9),r.Ic(19,Uj,2,0,"div",10),r.Ic(20,Bj,2,0,"div",10),r.Vb(21,"mat-paginator",11),r.cc("page",function(t){return e.showAlertsPage(t.pageIndex)}),r.Ub()),2&t){const t=r.wc(5),i=r.wc(7);r.nc("color",e.activeRulesFiltersCount?"primary":"default")("matMenuTriggerFor",i),r.Db(3),r.nc("ngIf",e.enableRuleFilters)("ngIfElse",t),r.Db(9),r.nc("ngModel",e.alertsFilter.showReadAlerts),r.Db(3),r.nc("ngModel",e.alertsFilter.showFalsePositiveAlerts),r.Db(2),r.nc("ngIf",e.enableRuleFilters),r.Db(1),r.nc("ngIf",e.displayedAlerts.length),r.Db(1),r.nc("ngIf",!e.filteredAlerts.length&&e.alerts.length),r.Db(1),r.nc("ngIf",!e.alerts.length),r.Db(1),r.nc("pageIndex",e.currentAlertsPageIndex)("length",e.filteredAlerts.length)("pageSize",e.alertsPageSize)}},directives:[Dl,sU,Yp,ut,eU,yU,CU,SU,tF,Vc,uh,yA,_u,cu,Vg,ct,bl,Pj],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;overflow:hidden}.alerts-list__filters[_ngcontent-%COMP%]{background-color:#e4e7ec;width:100%}.alerts-list__reset-filters-btn[_ngcontent-%COMP%]{margin-left:2em}"],changeDetection:0}),t})();function jj(t,e){1&t&&r.Qb(0,"mat-spinner",5)}function zj(t,e){1&t&&(r.Vb(0,"mat-error",33),r.Kc(1," Ce champ ne peut \xeatre vide. "),r.Ub())}function Hj(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-form-field",27),r.Vb(1,"input",28,29),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).alertRule.name=e}),r.Ub(),r.Ic(3,zj,2,0,"mat-error",30),r.Ub(),r.Vb(4,"button",31),r.cc("click",function(){return r.Ac(t),r.gc(2).save()}),r.Vb(5,"mat-icon"),r.Kc(6,"check"),r.Ub(),r.Ub(),r.Vb(7,"button",32),r.Vb(8,"mat-icon"),r.Kc(9,"clear"),r.Ub(),r.Ub()}if(2&t){const t=r.wc(2);r.gc();const e=r.wc(1),i=r.gc();r.Db(1),r.nc("ngModel",i.alertRule.name),r.Db(2),r.nc("ngIf",null==t.errors?null:t.errors.required),r.Db(1),r.nc("disabled",!e.form.valid),r.Db(3),r.nc("routerLink",i.newRule?"/alerts/rules":"/alerts/rules/"+i.alertRule.id)}}function Kj(t,e){if(1&t){const t=r.Wb();r.Vb(0,"h2",34),r.Kc(1),r.Ub(),r.Qb(2,"div",14),r.Vb(3,"button",35),r.Vb(4,"mat-icon"),r.Kc(5,"create"),r.Ub(),r.Ub(),r.Vb(6,"button",36),r.cc("click",function(){return r.Ac(t),r.gc(2).delete()}),r.Vb(7,"mat-icon"),r.Kc(8,"delete"),r.Ub(),r.Ub()}if(2&t){const t=r.gc(2);r.Db(1),r.Mc(" ",t.alertRule.name," "),r.Db(2),r.nc("routerLink","/alerts/rules/"+t.alertRule.id+"/edit")}}function $j(t,e){1&t&&(r.Vb(0,"div",17),r.Vb(1,"mat-chip-list",12),r.Vb(2,"mat-chip",37),r.Kc(3," Configuration incorrecte "),r.Ub(),r.Ub(),r.Ub())}function Gj(t,e){1&t&&(r.Vb(0,"div",17),r.Vb(1,"mat-chip-list",12),r.Vb(2,"mat-chip",37),r.Kc(3," Configuration incorrecte "),r.Ub(),r.Ub(),r.Ub())}function Wj(t,e){if(1&t){const t=r.Wb();r.Kc(0," \xa0 "),r.Vb(1,"mat-slide-toggle",38),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).alertRule.active=e}),r.Ub()}if(2&t){const t=r.gc(2);r.Db(1),r.nc("title",t.alertRule.active?"D\xe9sactiver":"Activer")("ngModel",t.alertRule.active)}}function Zj(t,e){1&t&&(r.Vb(0,"div",39),r.Kc(1," Une r\xe8gle active va permettre au serveur d'analyser les donn\xe9es en temps r\xe9el et remonter des alertes en fonction des crit\xe8res choisis. "),r.Ub(),r.Vb(2,"div",39),r.Kc(3," Une r\xe8gle d\xe9sactiv\xe9e ne remontera aucune nouvelle alerte. "),r.Ub(),r.Qb(4,"br"))}function qj(t,e){1&t&&(r.Vb(0,"div",40),r.Kc(1," Au moins un crit\xe8re est n\xe9cessaire pour d\xe9clencher les alertes. "),r.Ub())}function Yj(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-ais-interruption-criterion",41),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).alertRule.criteria.aisInterruption=e}),r.Ub(),r.Qb(1,"mat-divider")}if(2&t){const t=r.gc(2);r.nc("ngModel",t.alertRule.criteria.aisInterruption)("editable",t.editMode)}}function Qj(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-transhipment-criterion",42),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).alertRule.criteria.transhipment=e}),r.Ub(),r.Qb(1,"mat-divider")}if(2&t){const t=r.gc(2);r.nc("ngModel",t.alertRule.criteria.transhipment)("editable",t.editMode)}}function Xj(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-erratic-route-criterion",43),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).alertRule.criteria.erraticRoute=e}),r.Ub(),r.Qb(1,"mat-divider")}if(2&t){const t=r.gc(2);r.nc("ngModel",t.alertRule.criteria.erraticRoute)("editable",t.editMode)}}function Jj(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-speed-criterion",44),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).alertRule.criteria.speed=e}),r.Ub(),r.Qb(1,"mat-divider")}if(2&t){const t=r.gc(2);r.nc("ngModel",t.alertRule.criteria.speed)("editable",t.editMode)}}function tz(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-passage-in-zone-criterion",45),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).alertRule.criteria.passageInZone=e})("updateZones",function(){return r.Ac(t),r.gc(2).refreshAlertRulesZones()}),r.Ub(),r.Qb(1,"mat-divider")}if(2&t){const t=r.gc(2);r.nc("ngModel",t.alertRule.criteria.passageInZone)("editable",t.editMode)}}function ez(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-spoofing-criterion",46),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).alertRule.criteria.spoofing=e}),r.Ub()}if(2&t){const t=r.gc(2);r.nc("ngModel",t.alertRule.criteria.spoofing)("editable",t.editMode)}}function iz(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-identifier-filter",47),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).alertRule.criteria.identifier=e}),r.Ub(),r.Qb(1,"mat-divider")}if(2&t){const t=r.gc(2);r.nc("ngModel",t.alertRule.criteria.identifier)("editable",t.editMode)}}function nz(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-fleet-filter",48),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).alertRule.criteria.fleet=e}),r.Ub(),r.Qb(1,"mat-divider")}if(2&t){const t=r.gc(2);r.nc("ngModel",t.alertRule.criteria.fleet)("editable",t.editMode)}}function rz(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-flag-filter",49),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).alertRule.criteria.flag=e}),r.Ub(),r.Qb(1,"mat-divider")}if(2&t){const t=r.gc(2);r.nc("ngModel",t.alertRule.criteria.flag)("editable",t.editMode)}}function sz(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-type-filter",50),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).alertRule.criteria.type=e}),r.Ub(),r.Qb(1,"mat-divider")}if(2&t){const t=r.gc(2);r.nc("ngModel",t.alertRule.criteria.type)("editable",t.editMode)}}function oz(t,e){if(1&t&&(r.Vb(0,"span"),r.Kc(1),r.Ub()),2&t){const t=e.alert;r.Db(1),r.Lc(t.ship_name||"MMSI: "+t.mmsi)}}const az=function(t){return["/ships/",t]};function lz(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",54),r.Vb(1,"mat-icon"),r.Kc(2,"info"),r.Ub(),r.Kc(3," Voir d\xe9tail Navire "),r.Ub(),r.Vb(4,"button",55),r.cc("click",function(){r.Ac(t);const i=e.alert;return r.gc(3).locateShip(i.mmsi)}),r.Vb(5,"mat-icon"),r.Kc(6,"center_focus_strong"),r.Ub(),r.Kc(7," Voir position Navire "),r.Ub()}2&t&&r.nc("routerLink",r.sc(1,az,e.alert.mmsi))}function cz(t,e){if(1&t&&(r.Vb(0,"h3",22),r.Kc(1,"Alertes"),r.Ub(),r.Qb(2,"app-alerts-list",51),r.Ic(3,oz,2,1,"ng-template",null,52,r.Jc),r.Ic(5,lz,8,3,"ng-template",null,53,r.Jc)),2&t){const t=r.wc(4),e=r.wc(6),i=r.gc(2);r.Db(2),r.nc("alerts$",i.alerts$)("alertTitleRef",t)("alertMenuItemsRef",e)}}function hz(t,e){if(1&t){const t=r.Wb();r.Vb(0,"ng-form",6,7),r.Vb(2,"div",8),r.Ic(3,Hj,10,4,"ng-template",4),r.Ic(4,Kj,9,2,"ng-template",4),r.Ub(),r.Vb(5,"div",9),r.Ic(6,$j,4,0,"div",10),r.Ic(7,Gj,4,0,"div",10),r.Vb(8,"div",11),r.Kc(9," \xc9tat :\xa0 "),r.Vb(10,"mat-chip-list",12),r.Vb(11,"mat-chip",13),r.Kc(12),r.Ub(),r.Ub(),r.Ic(13,Wj,2,2,"ng-template",4),r.Qb(14,"div",14),r.Vb(15,"button",15),r.cc("click",function(){r.Ac(t);const e=r.gc();return e.showColorPicker=!e.showColorPicker}),r.Ub(),r.Vb(16,"input",16),r.cc("colorPickerChange",function(e){return r.Ac(t),r.gc().alertRule.color=e})("cpToggleChange",function(e){return r.Ac(t),r.gc().showColorPicker=e}),r.Ub(),r.Ub(),r.Vb(17,"div",17),r.Ic(18,Zj,5,0,"ng-template",4),r.Vb(19,"app-glitter",18),r.Kc(20," Rapport quotidien "),r.Vb(21,"mat-icon",19),r.Kc(22,"help"),r.Ub(),r.Kc(23," :\xa0 "),r.Vb(24,"mat-slide-toggle",20),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc().alertRule.enableDailyReport=e}),r.Ub(),r.Ub(),r.Qb(25,"br"),r.Kc(26," R\xe9sum\xe9 : "),r.Qb(27,"div",21),r.Ub(),r.Qb(28,"mat-divider"),r.Vb(29,"h3",22),r.Kc(30,"Zone"),r.Ub(),r.Vb(31,"app-zone-filter",23),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc().alertRule.criteria.zone=e})("updateZones",function(){return r.Ac(t),r.gc().refreshAlertRulesZones()}),r.Ub(),r.Qb(32,"mat-divider"),r.Vb(33,"h3",22),r.Kc(34,"Crit\xe8res"),r.Ub(),r.Ic(35,qj,2,0,"div",24),r.Ic(36,Yj,2,2,"ng-template",4),r.Ic(37,Qj,2,2,"ng-template",4),r.Ic(38,Xj,2,2,"ng-template",4),r.Ic(39,Jj,2,2,"ng-template",4),r.Ic(40,tz,2,2,"ng-template",4),r.Ic(41,ez,1,2,"ng-template",4),r.Vb(42,"h3",22),r.Kc(43,"Filtres"),r.Ub(),r.Vb(44,"div",25),r.Kc(45," L'ajout de filtres \xe0 une r\xe8gle permet de diminuer le nombre d'alertes. "),r.Ub(),r.Vb(46,"h4",22),r.Kc(47,"Sur \xe9v\xe9nement"),r.Ub(),r.Vb(48,"app-time-filter",26),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc().alertRule.criteria.time=e}),r.Ub(),r.Vb(49,"h4",22),r.Kc(50,"Sur navire"),r.Ub(),r.Ic(51,iz,2,2,"ng-template",4),r.Ic(52,nz,2,2,"ng-template",4),r.Ic(53,rz,2,2,"ng-template",4),r.Ic(54,sz,2,2,"ng-template",4),r.Ic(55,cz,7,3,"ng-template",4),r.Ub(),r.Ub()}if(2&t){const t=r.wc(1),e=r.gc();r.Db(3),r.nc("ngIf",e.editMode),r.Db(1),r.nc("ngIf",!e.editMode),r.Db(2),r.nc("ngIf",t.hasError("missingZone")),r.Db(1),r.nc("ngIf",!e.editMode&&!e.alertRule.validZone),r.Db(4),r.nc("disabled",!e.alertRule.active),r.Db(1),r.Mc(" ",e.alertRule.active?"Active":"D\xe9sactiv\xe9e"," "),r.Db(1),r.nc("ngIf",e.editMode),r.Db(2),r.Fc("background-color",e.alertRule.color),r.nc("disabled",!e.editMode)("title",e.editMode?"Changer la couleur des alertes de la r\xe8gle":"Couleur des alertes de la r\xe8gle"),r.Db(1),r.nc("colorPicker",e.alertRule.color)("cpAlphaChannel","disabled")("cpOutputFormat","hex")("cpToggle",e.showColorPicker),r.Db(2),r.nc("ngIf",e.editMode),r.Db(6),r.nc("title",e.alertRule.enableDailyReport?"D\xe9sactiver le rapport":"Activer le rapport")("ngModel",e.alertRule.enableDailyReport)("disabled",!e.editMode),r.Db(3),r.nc("innerHTML",e.summary,r.Bc),r.Db(4),r.nc("ngModel",e.alertRule.criteria.zone)("editable",e.editMode),r.Db(4),r.nc("ngIf",null==t.errors?null:t.errors.missingCriterion),r.Db(1),r.nc("ngIf",e.editMode||e.alertRule.criteria.aisInterruption.enable),r.Db(1),r.nc("ngIf",e.editMode||e.alertRule.criteria.transhipment.enable),r.Db(1),r.nc("ngIf",e.editMode||e.alertRule.criteria.erraticRoute.enable),r.Db(1),r.nc("ngIf",e.editMode||e.alertRule.criteria.speed.enable),r.Db(1),r.nc("ngIf",e.editMode||e.alertRule.criteria.passageInZone.enable),r.Db(1),r.nc("ngIf",e.editMode||e.alertRule.criteria.spoofing.enable),r.Db(7),r.nc("ngModel",e.alertRule.criteria.time)("editable",e.editMode),r.Db(3),r.nc("ngIf",e.editMode||e.alertRule.criteria.identifier.enable),r.Db(1),r.nc("ngIf",e.editMode||e.alertRule.criteria.fleet.enable),r.Db(1),r.nc("ngIf",e.editMode||e.alertRule.criteria.flag.enable),r.Db(1),r.nc("ngIf",e.editMode||e.alertRule.criteria.type.enable),r.Db(1),r.nc("ngIf",!e.editMode)}}let uz=(()=>{class t extends LT{constructor(t,e,i,n,r,s,o,a,l,c,h,u,d,p){super(),this.activatedRoute=t,this.domSanitizer=e,this.router=i,this.titleService=n,this.alertsService=r,this.alertRulesService=s,this.configService=o,this.editZoneService=a,this.fleetsService=l,this.mapService=c,this.timeRangeService=h,this.zonesLayerService=u,this.uiService=d,this.workerService=p,this.alertRuleId$=new Av.a(null),this.alertRule$=new Av.a(null),this.alerts$=new Av.a([]),this.editMode=!1,this.newRule=!1,this.showColorPicker=!1,this.save=()=>Object(ue.a)(this,void 0,void 0,function*(){if(this.newRule){const t=yield this.alertRulesService.createAlertRule(this.alertRule);yield this.router.navigateByUrl(`/alerts/rules/${t}`)}else yield this.alertRulesService.updateAlertRule(this.alertRule),yield this.router.navigateByUrl(`/alerts/rules/${this.alertRule.id}`)})}get summary(){return this.domSanitizer.bypassSecurityTrustHtml(function(t,e){var i,n,r,s,o,a,l,c,h,u,d;const p=["Tous les navires "],f=[];if((null===(i=t.criteria.identifier)||void 0===i?void 0:i.enable)&&f.push(`<br>- dont les identifiants sont ${t.criteria.identifier.identifiers.map(t=>`<em>${UD(t)}</em>`).join(" OU ")}`),null===(n=t.criteria.fleet)||void 0===n?void 0:n.enable){const i=t.criteria.fleet.fleets.map(t=>{var i,n;return null===(n=null!==(i=e.find(e=>e.id===t))&&void 0!==i?i:{})||void 0===n?void 0:n.name}).filter(t=>!!t);f.push(`<br>- faisant partie ${t.criteria.fleet.fleets.length>1?"des flottes":"de la flotte"} ${i.map(t=>`<em>${UD(t)}</em>`).join(" OU ")}`)}(null===(r=t.criteria.flag)||void 0===r?void 0:r.enable)&&f.push(t.criteria.flag.flags.length<5?`<br>- de pavillon ${t.criteria.flag.flags.map(t=>`<span class="flag-icon flag-icon-${t}" style="margin-right: 5px"></span><em>${zI[t]}</em>`).join(" OU ")}`:`<br>- de ${t.criteria.flag.flags.length} pavillons`),(null===(s=t.criteria.type)||void 0===s?void 0:s.enable)&&f.push(`<br>- de type ${t.criteria.type.types.map(t=>`<em>${DD[t].name}</em>`).join(" OU ")}`),f.length>0&&(p.push(":"),p.push(f.join("")),p.push("<br>"));const m=[];if((null===(o=t.criteria.aisInterruption)||void 0===o?void 0:o.enable)&&m.push("<br>- coup\xe9 leur transmission AIS"),(null===(a=t.criteria.transhipment)||void 0===a?void 0:a.enable)&&m.push("<br>- particip\xe9 \xe0 un transbordement"),(null===(l=t.criteria.erraticRoute)||void 0===l?void 0:l.enable)&&m.push("<br>- navigu\xe9 de fa\xe7on erratique"),(null===(c=t.criteria.speed)||void 0===c?void 0:c.enable)&&m.push(`<br>- eu une vitesse entre <em>${t.criteria.speed.min}</em> et <em>${t.criteria.speed.max}</em> noeuds`),null===(h=t.criteria.passageInZone)||void 0===h?void 0:h.enable){const e=t.criteria.passageInZone.sequential?" PUIS ":" ET ";m.push(`<br>- navigu\xe9 dans ${t.criteria.passageInZone.passages.length>1?"les zones":"la zone"} ${t.criteria.passageInZone.passages.map(t=>`<em>${UD(t.zone.name)}</em>`).join(e)}`),t.criteria.passageInZone.passages.length>1&&m.push(` dans un intervalle de ${UI[t.criteria.passageInZone.timeWindow]}`)}return(null===(u=t.criteria.spoofing)||void 0===u?void 0:u.enable)&&m.push("<br>- modifi\xe9 ses identifiants AIS"),0===m.length?"Il faut s\xe9lectionner au moins un crit\xe8re avant d'avoir une r\xe8gle applicable":(p.push("ayant :"),p.push(m.join("")),(null===(d=t.criteria.zone)||void 0===d?void 0:d.enable)&&p.push(`<br>dans ${t.criteria.zone.zones.length>1?"les zones":"la zone"} ${t.criteria.zone.zones.map(t=>`<em>${UD(t.name)}</em>`).join(" OU ")}`),p.push("."),p.join(""))}(this.alertRule,this.fleetsService.fleets$.value))}ngOnInit(){this.subscriptions.push(this.activatedRoute.data.subscribe(t=>{this.editMode=!!t.edit,this.newRule=!!t.new})),this.subscriptions.push(this.alertRuleId$.pipe(Gg(1)).subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){this.editMode?yield this.editAlertRule(t):yield this.viewAlertRule(t)}))),this.subscriptions.push(this.activatedRoute.paramMap.subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){this.newRule?(this.alertRule=function(){const t={name:"",active:!0,criteria:{},color:"#5e12e2",enableDailyReport:!1,validZone:!1};return NI(t.criteria),t}(),this.titleService.setTitle("Nouvelle r\xe8gle - ANAIS"),this.mapService.hasBooted||this.mapService.resetToDefaultView()):this.alertRuleId$.next(t.get("alertRuleId"))}))),this.subscriptions.push(this.alertRule$.pipe(Gg(1)).subscribe(t=>{this.titleService.setTitle(`R\xe8gle ${t.name} - ANAIS`),this.alertRule=t,this.refreshAlertRulesSummary(),this.refreshAlertRulesZones()})),this.editMode||this.subscriptions.push(Hg([this.alertRuleId$,this.timeRangeService.timeRange$]).subscribe(([t,e])=>Object(ue.a)(this,void 0,void 0,function*(){if(t){const i=yield this.workerService.alertRules.getAlertRuleAlerts(t,e.start,e.end),[n,r]=this.alertRulesService.getAlertRuleColor(t);i.forEach(t=>{t.color=n,t.rgbVecColor=r}),this.alertsService.updateAlerts(i),this.alerts$.next(i)}}))),this.editMode&&this.subscriptions.push(this.editZoneService.editedZone$.pipe(Gg(1),mn(),fI(0)).subscribe(t=>{t||(this.refreshAlertRulesZones(),this.refreshAlertRulesSummary())}))}ngOnDestroy(){super.ngOnDestroy(),this.zonesLayerService.clear(),this.editZoneService.cancelEditing(),this.alertsService.updateAlerts([]),this.alertRulesService.deselectAlertRule()}editAlertRule(t){return Object(ue.a)(this,void 0,void 0,function*(){yield this.fetchAlertRule(t)})}viewAlertRule(t){return Object(ue.a)(this,void 0,void 0,function*(){this.alertRuleId!==t&&(this.alertRuleId=t),yield this.fetchAlertRule(t)})}refreshAlertRulesZones(){var t;this.zonesLayerService.updateZones([].concat((t=this.alertRule).criteria.passageInZone.enable?t.criteria.passageInZone.passages.flatMap(t=>t.zone):[]).concat(t.criteria.zone.enable?t.criteria.zone.zones:[]))}refreshAlertRulesSummary(){}delete(){this.uiService.confirm({title:"Suppression",message:"Une fois supprim\xe9e, cette r\xe8gle ne sera plus accessible. Confirmez-vous la suppression de cette r\xe8gle ?",action:t=>Object(ue.a)(this,void 0,void 0,function*(){t&&(yield this.alertRulesService.deleteAlertRule(this.alertRule.id),yield this.router.navigateByUrl("/alerts/rules"))})})}locateShip(t){return Object(ue.a)(this,void 0,void 0,function*(){const e=yield this.workerService.ships.getShip(t);this.mapService.centerOnLonLat([e.lon,e.lat])})}fetchAlertRule(t){return Object(ue.a)(this,void 0,void 0,function*(){try{this.alertRule$.next(yield this.alertRulesService.selectAlertRule(t))}catch(e){if(e.notfound)throw this.router.navigateByUrl("/alerts/rules").catch(()=>{}),new Error(`La r\xe8gle <${t}> n'existe pas.`);throw e}})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(N_),r.Pb(ne),r.Pb(sw),r.Pb(he),r.Pb(IP),r.Pb(DP),r.Pb(cI),r.Pb(sL),r.Pb(OT),r.Pb(pI),r.Pb(yT),r.Pb(DT),r.Pb(VI),r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-alert-rule-panel"]],features:[r.Ab],decls:8,vars:2,consts:[[1,"panel"],[1,"d-flex",2,"background-color","#fff"],["mat-button","","title","Revenir \xe0 la liste","routerLink","/alerts/rules",1,"back-button"],["class","spinner","strokeWidth","4","diameter","80",4,"ngIf"],[3,"ngIf"],["strokeWidth","4","diameter","80",1,"spinner"],["name","form","appAlertRule","",1,"alert-rule-panel","panel","unscrollable"],["form","ngForm"],[1,"panel__header"],[1,"scrollable"],["class","panel__content",4,"ngIf"],[1,"panel__content","alert-rule-panel__header"],[1,"d-inline"],["color","primary","selected","","disableRipple","",3,"disabled"],[1,"u-flex"],["mat-mini-fab","",1,"alert-rule-panel__color-picker-button",3,"disabled","title","click"],["name","color",1,"alert-rule-panel__color-picker-attach",3,"colorPicker","cpAlphaChannel","cpOutputFormat","cpToggle","colorPickerChange","cpToggleChange"],[1,"panel__content"],["gid","daily-report","date","2021-07-02","width","200","height","24"],["matTooltip","Activer pour recevoir par email un rapport quotidien des alertes de la veille (jours UTC)","matTooltipPosition","above",1,"help-icon"],["name","enableDailyReport","color","primary",3,"title","ngModel","disabled","ngModelChange"],[1,"alert-rule-panel__summary",3,"innerHTML"],[1,"panel__subtitle"],["name","zone",3,"ngModel","editable","ngModelChange","updateZones"],["class","criterion-content alert-rule-panel__error-msg",4,"ngIf"],[1,"criterion-content"],["name","time",3,"ngModel","editable","ngModelChange"],[1,"alert-rule-panel__name-input"],["matInput","","name","name","placeholder","Nom de la r\xe8gle","required","","maxlength","64",3,"ngModel","ngModelChange"],["name","ngModel"],["class","input-error",4,"ngIf"],["mat-button","","color","primary","title","Enregistrer les changements","data-test","save-rule",3,"disabled","click"],["mat-button","","title","Annuler l'\xe9dition",3,"routerLink"],[1,"input-error"],[1,"panel__title"],["mat-button","","title","Modifier",3,"routerLink"],["mat-button","","color","warn","title","Supprimer la r\xe8gle",3,"click"],["color","warn","selected","","disableRipple","","title","La configuration de cette r\xe8gle est incorrecte. Elle doit contenir au moins une zone de filtrage."],["name","active","color","primary",3,"title","ngModel","ngModelChange"],[1,"alert-rule-panel__description"],[1,"criterion-content","alert-rule-panel__error-msg"],["name","aisInterruption",3,"ngModel","editable","ngModelChange"],["name","transhipment",3,"ngModel","editable","ngModelChange"],["name","erraticRoute",3,"ngModel","editable","ngModelChange"],["name","speed",3,"ngModel","editable","ngModelChange"],["name","passageInZone",3,"ngModel","editable","ngModelChange","updateZones"],["name","spoofing",3,"ngModel","editable","ngModelChange"],["name","identifier",3,"ngModel","editable","ngModelChange"],["name","fleet",3,"ngModel","editable","ngModelChange"],["name","flag",3,"ngModel","editable","ngModelChange"],["name","type",3,"ngModel","editable","ngModelChange"],[3,"alerts$","alertTitleRef","alertMenuItemsRef"],["alertTitleRef",""],["alertMenuItemsRef",""],["mat-menu-item","",3,"routerLink"],["mat-menu-item","",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"a",2),r.Vb(3,"mat-icon"),r.Kc(4,"arrow_back_ios"),r.Ub(),r.Kc(5," R\xe8gles d'alerte "),r.Ub(),r.Ub(),r.Ic(6,jj,1,0,"mat-spinner",3),r.Ic(7,hz,56,36,"ng-template",4),r.Ub()),2&t&&(r.Db(6),r.nc("ngIf",!e.alertRule),r.Db(1),r.nc("ngIf",e.alertRule))},directives:[Il,aw,Yp,ut,fF,oh,oL,_L,pL,Dl,mv,DL,oA,NL,Vc,uh,GT,FU,tB,_u,Ou,ac,Ih,Th,ow,nu,iB,rB,oB,uB,yN,wN,XN,sj,uj,Aj,Nj,QL],styles:["[_nghost-%COMP%]{display:flex;overflow:hidden}.back-button[_ngcontent-%COMP%]{line-height:36px}.alert-rule-panel__name-input[_ngcontent-%COMP%]{margin:.5em;flex:1;font-size:20px}.alert-rule-panel__header[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap}.alert-rule-panel__color-picker-button[_ngcontent-%COMP%]{margin-left:16px;margin-right:8px;height:30px;width:30px} .alert-rule-panel__color-picker-button.mat-fab:not(.mat-button-disabled):active:not([class*=mat-elevation-z]), .alert-rule-panel__color-picker-button.mat-mini-fab:not(.mat-button-disabled):active:not([class*=mat-elevation-z]){box-shadow:0 5px 7px -2px rgba(0,0,0,.2),0 8px 14px 2px rgba(0,0,0,.14),0 4px 20px 2px rgba(0,0,0,.12)!important}.alert-rule-panel__color-picker-attach[_ngcontent-%COMP%]{opacity:0;width:1px;height:1px;pointer-events:none}.alert-rule-panel__description[_ngcontent-%COMP%]{margin-top:.5em;font-size:14px}.alert-rule-panel__summary[_ngcontent-%COMP%] em{font-size:1.1em;font-weight:500;font-style:normal;color:#1515a6}.alert-rule-panel__error-msg[_ngcontent-%COMP%]{color:#ce1d1d}"]}),t})();function dz(t,e){1&t&&(r.Vb(0,"mat-chip",13),r.Kc(1,"D\xe9sactiv\xe9e"),r.Ub()),2&t&&r.nc("disabled",!0)}function pz(t,e){1&t&&(r.Vb(0,"mat-chip",14),r.Kc(1," Incorrecte "),r.Ub())}function fz(t,e){if(1&t&&(r.Vb(0,"li"),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Nc("",t.criteriaLabels.identifier.title," : ",t.alertRule.criteria.identifier.identifiers.join(", "),"")}}function mz(t,e){if(1&t&&(r.Vb(0,"li"),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Nc("",t.criteriaLabels.fleet.title," : ",t.fleets,"")}}function gz(t,e){1&t&&r.Qb(0,"app-flag",18),2&t&&r.nc("flag",e.$implicit)}function Az(t,e){if(1&t&&r.Ic(0,gz,1,1,"app-flag",17),2&t){const t=r.gc(2);r.nc("ngForOf",t.alertRule.criteria.flag.flags)}}function bz(t,e){if(1&t&&r.Kc(0),2&t){const t=r.gc(2);r.Mc(" ",t.alertRule.criteria.flag.flags.length," pavillons ")}}function vz(t,e){if(1&t&&(r.Vb(0,"li"),r.Kc(1),r.Ic(2,Az,1,1,"ng-template",15),r.Ic(3,bz,1,1,"ng-template",null,16,r.Jc),r.Ub()),2&t){const t=r.wc(4),e=r.gc();r.Db(1),r.Mc(" ",e.criteriaLabels.flag.title," : "),r.Db(1),r.nc("ngIf",e.alertRule.criteria.flag.flags.length<5)("ngIfElse",t)}}function _z(t,e){if(1&t&&(r.Vb(0,"li"),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Nc("",t.criteriaLabels.type.title," : ",t.types,"")}}function yz(t,e){if(1&t&&(r.Vb(0,"li"),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Oc("",t.criteriaLabels.speed.title," : [",t.alertRule.criteria.speed.min,", ",t.alertRule.criteria.speed.max,"]")}}function wz(t,e){if(1&t&&(r.Vb(0,"li"),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Lc(t.criteriaLabels.erraticRoute.title)}}function xz(t,e){if(1&t&&(r.Vb(0,"li"),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Lc(t.criteriaLabels.transhipment.title)}}function Cz(t,e){if(1&t&&(r.Vb(0,"li"),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Lc(t.criteriaLabels.aisInterruption.title)}}function Sz(t,e){if(1&t&&(r.Vb(0,"li"),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Nc("",t.criteriaLabels.passageInZone.title," : ",t.passages,"")}}function kz(t,e){if(1&t&&(r.Vb(0,"li"),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Lc(t.criteriaLabels.spoofing.title)}}function Ez(t,e){if(1&t&&(r.Vb(0,"li"),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Nc("",t.criteriaLabels.zone.title," : ",t.zones,"")}}let Dz=(()=>{class t extends LT{constructor(t){super(),this.fleetsService=t,this.criteriaLabels=LU,this.countriesLabelByFlag=zI}get passages(){return this.alertRule.criteria.passageInZone.passages.map(t=>t.zone.name).join(", ")}get fleets(){return this.alertRule.criteria.fleet.fleets.map(t=>{var e;return(null!==(e=this.fleetsService.fleetsById[t])&&void 0!==e?e:{}).name}).join(", ")}get zones(){return this.alertRule.criteria.zone.zones.map(t=>t.name).join(", ")}get types(){return this.alertRule.criteria.type.types.map(t=>DD[t].name).join(", ")}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(OT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-alert-rule-item"]],inputs:{alertRule:"alertRule"},features:[r.Ab],decls:28,vars:16,consts:[[1,"alert-rule-item"],[1,"alert-rule-item__header"],[1,"alert-rule-item__title"],[1,"d-inline","u-flex","alert-rule-item__state"],["color","primary","selected","","disableRipple","",3,"disabled",4,"ngIf"],["color","warn","selected","","disableRipple","","title","La configuration de cette r\xe8gle est incorrecte. Elle doit contenir au moins une zone de filtrage.",4,"ngIf"],[1,"alert-rule-item__indicators"],["title","Statistiques",1,"mr-1"],["title","Nombre d'alertes lev\xe9es au cours des derni\xe8res 24 heures"],[1,"mx-1"],["title","Nombre d'alertes lev\xe9es au cours des 7 derniers jours"],[1,"alert-rule-item__criteria"],[4,"ngIf"],["color","primary","selected","","disableRipple","",3,"disabled"],["color","warn","selected","","disableRipple","","title","La configuration de cette r\xe8gle est incorrecte. Elle doit contenir au moins une zone de filtrage."],[3,"ngIf","ngIfElse"],["tooManyFlags",""],["style","margin: 4px",3,"flag",4,"ngFor","ngForOf"],[2,"margin","4px",3,"flag"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"h4",1),r.Vb(2,"div",2),r.Kc(3),r.Ub(),r.Vb(4,"mat-chip-list",3),r.Ic(5,dz,2,1,"mat-chip",4),r.Ic(6,pz,2,0,"mat-chip",5),r.Ub(),r.Vb(7,"div",6),r.Vb(8,"mat-icon",7),r.Kc(9,"trending_up"),r.Ub(),r.Vb(10,"span",8),r.Kc(11),r.Ub(),r.Vb(12,"span",9),r.Kc(13,"/"),r.Ub(),r.Vb(14,"span",10),r.Kc(15),r.Ub(),r.Ub(),r.Ub(),r.Vb(16,"ul",11),r.Ic(17,fz,2,2,"li",12),r.Ic(18,mz,2,2,"li",12),r.Ic(19,vz,5,3,"li",12),r.Ic(20,_z,2,2,"li",12),r.Ic(21,yz,2,3,"li",12),r.Ic(22,wz,2,1,"li",12),r.Ic(23,xz,2,1,"li",12),r.Ic(24,Cz,2,1,"li",12),r.Ic(25,Sz,2,2,"li",12),r.Ic(26,kz,2,1,"li",12),r.Ic(27,Ez,2,2,"li",12),r.Ub(),r.Ub()),2&t&&(r.Db(3),r.Lc(e.alertRule.name),r.Db(2),r.nc("ngIf",!e.alertRule.active),r.Db(1),r.nc("ngIf",!e.alertRule.validZone),r.Db(5),r.Lc(e.alertRule.alertsSummary.lastDay),r.Db(4),r.Lc(e.alertRule.alertsSummary.lastWeek),r.Db(2),r.nc("ngIf",e.alertRule.criteria.identifier.enable),r.Db(1),r.nc("ngIf",e.alertRule.criteria.fleet.enable),r.Db(1),r.nc("ngIf",e.alertRule.criteria.flag.enable),r.Db(1),r.nc("ngIf",e.alertRule.criteria.type.enable),r.Db(1),r.nc("ngIf",e.alertRule.criteria.speed.enable),r.Db(1),r.nc("ngIf",e.alertRule.criteria.erraticRoute.enable),r.Db(1),r.nc("ngIf",e.alertRule.criteria.transhipment.enable),r.Db(1),r.nc("ngIf",e.alertRule.criteria.aisInterruption.enable),r.Db(1),r.nc("ngIf",e.alertRule.criteria.passageInZone.enable),r.Db(1),r.nc("ngIf",e.alertRule.criteria.spoofing.enable),r.Db(1),r.nc("ngIf",e.alertRule.criteria.zone.enable))},directives:[_L,ut,Yp,pL,ct,GF],styles:[".alert-rule-item__header[_ngcontent-%COMP%]{color:#1515a6;text-align:left;margin-top:8px;display:flex;align-items:center}.alert-rule-item__title[_ngcontent-%COMP%]{word-break:break-word;margin-right:8px}.alert-rule-item__state[_ngcontent-%COMP%]{pointer-events:none;touch-action:none}.alert-rule-item__indicators[_ngcontent-%COMP%]{font-size:14px;margin-left:8px;display:flex;align-items:center;pointer-events:all!important}.alert-rule-item__criteria[_ngcontent-%COMP%]{text-align:left;margin:0;line-height:18px;padding-left:1em}"],changeDetection:0}),t})();function Iz(t,e){1&t&&r.Qb(0,"mat-spinner",4)}function Pz(t,e){1&t&&(r.Vb(0,"p",6),r.Kc(1,"Aucune r\xe8gle n'a \xe9t\xe9 configur\xe9e."),r.Ub())}function Oz(t,e){1&t&&(r.Vb(0,"div",10),r.Vb(1,"mat-icon",11),r.Kc(2,"warning"),r.Ub(),r.Kc(3," La configuration de certaines r\xe8gles est incorrecte. Veuillez revoir leur configuration afin de les rendre \xe0 nouveau effectives. "),r.Ub())}function Mz(t,e){if(1&t&&(r.Vb(0,"button",12),r.Qb(1,"app-alert-rule-item",13),r.Ub()),2&t){const t=e.$implicit;r.pc("routerLink","/alerts/rules/",t.id,""),r.Db(1),r.nc("alertRule",t)}}function Tz(t,e){if(1&t&&(r.Vb(0,"p",6),r.Kc(1),r.Ub(),r.Ic(2,Oz,4,0,"div",7),r.Vb(3,"div",8),r.Ic(4,Mz,2,2,"button",9),r.Ub()),2&t){const t=r.gc(2);r.Db(1),r.Mc("Vous avez configur\xe9 ",t.alertRules.length," r\xe8gles d'alerte."),r.Db(1),r.nc("ngIf",t.containsInvalidAlertRule),r.Db(2),r.nc("ngForOf",t.alertRules)}}function Rz(t,e){if(1&t&&(r.Ic(0,Pz,2,0,"p",5),r.Ic(1,Tz,5,3,"ng-template",3)),2&t){const t=r.gc();r.nc("ngIf",0===t.alertRules.length),r.Db(1),r.nc("ngIf",t.alertRules.length>0)}}let Vz=(()=>{class t extends LT{constructor(t,e,i){super(),this.titleService=t,this.alertRulesService=e,this.mapService=i}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.titleService.setTitle("Liste des r\xe8gles - ANAIS"),this.mapService.hasBooted||this.mapService.resetToDefaultView(),this.alertRulesService.alertRules$.subscribe(t=>{this.alertRules=t,this.containsInvalidAlertRule=t.some(t=>!t.validZone)})})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(he),r.Pb(DP),r.Pb(pI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-alert-rules-panel"]],features:[r.Ab],decls:5,vars:2,consts:[["joyrideStep","rules-panel","stepPosition","right","title","R\xe8gles d'alertes","text","C'est ici que vous pouvez cr\xe9er et visualiser des r\xe8gles personnalis\xe9es afin d'\xeatre alert\xe9 automatiquement de comportements de navires r\xe9pondant \xe0 des algorithmes et des filtres que vous aurez choisis. Par exemple: navires avec pavillon espagnol, de type p\xeacheur, \xe9tant pass\xe9s \xe0 proximit\xe9 des c\xf4tes Corse et ayant transbord\xe9.",1,"panel"],["mat-button","","color","primary","routerLink","/alerts/rules/new"],["class","spinner","strokeWidth","4","diameter","80",4,"ngIf"],[3,"ngIf"],["strokeWidth","4","diameter","80",1,"spinner"],["class","panel__content",4,"ngIf"],[1,"panel__content"],["class","d-flex-center error-message panel__content mat-body",4,"ngIf"],[1,"alert-rules-panel__rules","scrollable"],["mat-button","",3,"routerLink",4,"ngFor","ngForOf"],[1,"d-flex-center","error-message","panel__content","mat-body"],[1,"mr-2"],["mat-button","",3,"routerLink"],[3,"alertRule"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"button",1),r.Kc(2,"Nouvelle r\xe8gle"),r.Ub(),r.Ic(3,Iz,1,0,"mat-spinner",2),r.Ic(4,Rz,2,2,"ng-template",3),r.Ub()),2&t&&(r.Db(3),r.nc("ngIf",!e.alertRules),r.Db(1),r.nc("ngIf",e.alertRules))},directives:[ax,Dl,ow,ut,fF,ct,Yp,Dz],styles:["[_nghost-%COMP%]{display:flex;overflow:hidden}.alert-rules-panel__rules[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:stretch}.alert-rules-panel__rules[_ngcontent-%COMP%] .mat-button{white-space:normal}"]}),t})();function Fz(t,e){if(1&t&&(r.Vb(0,"div",10),r.Vb(1,"mat-icon",11),r.Kc(2,"access_time"),r.Ub(),r.Vb(3,"div",12),r.hc(4,"timeago"),r.Kc(5),r.hc(6,"date"),r.Ub(),r.Ub()),2&t){const t=r.gc();r.Db(3),r.oc("title",r.ic(4,2,1e3*t.ship.timestamp)),r.Db(2),r.Mc(" ",r.kc(6,4,1e3*t.ship.timestamp,"yyyy-MM-dd HH:mm:ss z",t.useUTCDates&&"z")," ")}}let Lz=(()=>{class t extends LT{constructor(t,e){super(),this.changeDetectorRef=t,this.mapConfigService=e,this.showTimestamp=!1,this.useUTCDates=!1,this.vesselTypeLabelsByType=ED}ngOnInit(){this.ensureMandatoryInputParams("ship"),this.subscriptions.push(this.mapConfigService.useUTCDates$.subscribe(t=>{this.useUTCDates=t,this.changeDetectorRef.markForCheck()}))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-ship-item-small"]],inputs:{ship:"ship",showTimestamp:"showTimestamp"},features:[r.Ab],decls:23,vars:7,consts:[[1,"ship-item"],[1,"ship-item__col1"],[1,"u-flex","d-flex-center"],[1,"ship-item__flag",3,"mmsi"],[1,"d-flex-column"],[1,"ship-item__name"],[1,"ship-item__type"],["class","ship-item__timestamp","title","Derni\xe8re r\xe9ception",4,"ngIf"],[1,"ship-item__col2"],[1,"ship-item__label"],["title","Derni\xe8re r\xe9ception",1,"ship-item__timestamp"],[1,"mini-icon","mr-1"],[3,"title"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"div",2),r.Qb(3,"app-flag",3),r.Vb(4,"div",4),r.Vb(5,"div",5),r.Kc(6),r.Ub(),r.Vb(7,"small",6),r.Kc(8),r.Ub(),r.Ub(),r.Ub(),r.Ic(9,Fz,7,8,"div",7),r.Ub(),r.Vb(10,"div",8),r.Vb(11,"div"),r.Vb(12,"span",9),r.Kc(13,"MMSI"),r.Ub(),r.Kc(14),r.Ub(),r.Vb(15,"div"),r.Vb(16,"span",9),r.Kc(17,"IMO"),r.Ub(),r.Kc(18),r.Ub(),r.Vb(19,"div"),r.Vb(20,"span",9),r.Kc(21,"Callsign"),r.Ub(),r.Kc(22),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(3),r.nc("mmsi",e.ship.mmsi),r.Db(3),r.Lc(e.ship.name||"?"),r.Db(2),r.Lc(e.ship.cargo?e.vesselTypeLabelsByType[e.ship.cargo]:"?"),r.Db(1),r.nc("ngIf",e.showTimestamp),r.Db(5),r.Mc(" ",e.ship.mmsi,""),r.Db(4),r.Mc(" ",e.ship.imo||"?",""),r.Db(4),r.Mc(" ",e.ship.callsign||"?",""))},directives:[GF,ut,Yp],pipes:[Tx,kt],styles:["[_nghost-%COMP%]{flex:1;display:block;position:relative}.ship-item[_ngcontent-%COMP%]{font-size:12px;line-height:16px;display:flex}.ship-item__col1[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column}.ship-item__col2[_ngcontent-%COMP%]{display:flex;flex-direction:column;text-align:right}.ship-item__flag[_ngcontent-%COMP%]{margin-right:4px}.ship-item__name[_ngcontent-%COMP%]{font-size:14px}.ship-item__type[_ngcontent-%COMP%]{line-height:1em;font-size:11px}.ship-item__timestamp[_ngcontent-%COMP%]{margin-top:4px;display:flex;align-items:center;color:grey}.ship-item__timestamp[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%]{font-size:1em;height:1em;width:1em;margin-right:.3em;margin-left:.3em}.ship-item__label[_ngcontent-%COMP%]{color:grey;font-size:10px}"],changeDetection:0}),t})();function Uz(t,e){1&t&&r.Qb(0,"mat-spinner",5)}function Bz(t,e){if(1&t&&(r.Vb(0,"div",6),r.Vb(1,"div",7),r.Vb(2,"div",8),r.Vb(3,"mat-icon",9),r.Kc(4,"trending_up"),r.Ub(),r.Kc(5," Dernier jour "),r.Ub(),r.Kc(6),r.Ub(),r.Vb(7,"div",10),r.Vb(8,"div",8),r.Vb(9,"mat-icon",9),r.Kc(10,"trending_up"),r.Ub(),r.Kc(11," Derni\xe8re semaine "),r.Ub(),r.Kc(12),r.Ub(),r.Ub()),2&t){const t=r.gc();r.Db(6),r.Mc(" ",t.alertsSummary.lastDay," "),r.Db(6),r.Mc(" ",t.alertsSummary.lastWeek," ")}}function Nz(t,e){1&t&&r.Qb(0,"mat-spinner",5)}function jz(t,e){if(1&t&&(r.Vb(0,"div",14),r.Vb(1,"mat-icon",9),r.Kc(2,"warning"),r.Ub(),r.Kc(3),r.Ub(),r.Qb(4,"app-ship-item-small",15),r.Vb(5,"div",16),r.hc(6,"timeago"),r.Vb(7,"mat-icon",17),r.Kc(8,"access_time"),r.Ub(),r.Kc(9),r.hc(10,"date"),r.Ub()),2&t){const t=e.alert,i=r.gc(2);r.Db(3),r.Mc(" ",t.rule_name," "),r.Db(1),r.nc("ship",t.ship),r.Db(1),r.oc("title",r.ic(6,4,1e3*t.start)),r.Db(4),r.Mc(" ",r.kc(10,6,1e3*t.start,"yyyy-MM-dd HH:mm:ss z",i.useUTCDates&&"z")," ")}}const zz=function(t){return["/alerts/rules/",t]},Hz=function(t){return["/ships/",t]};function Kz(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",18),r.Vb(1,"mat-icon"),r.Kc(2,"info"),r.Ub(),r.Kc(3," Voir la r\xe8gle "),r.Ub(),r.Vb(4,"button",18),r.Vb(5,"mat-icon"),r.Kc(6,"info"),r.Ub(),r.Kc(7," Voir d\xe9tail Navire "),r.Ub(),r.Vb(8,"button",19),r.cc("click",function(){r.Ac(t);const i=e.alert;return r.gc(2).locateShip(i.mmsi)}),r.Vb(9,"mat-icon"),r.Kc(10,"center_focus_strong"),r.Ub(),r.Kc(11," Voir position actuelle Navire "),r.Ub()}if(2&t){const t=e.alert;r.nc("routerLink",r.sc(2,zz,t.rule_id)),r.Db(4),r.nc("routerLink",r.sc(4,Hz,t.mmsi))}}function $z(t,e){if(1&t&&(r.Qb(0,"app-alerts-list",11),r.Ic(1,jz,11,10,"ng-template",null,12,r.Jc),r.Ic(3,Kz,12,6,"ng-template",null,13,r.Jc)),2&t){const t=r.wc(2),e=r.wc(4),i=r.gc();r.nc("alerts$",i.alerts$)("enableRuleFilters",!0)("simpleItems",!1)("alertTitleRef",t)("alertMenuItemsRef",e)}}let Gz=(()=>{class t extends LT{constructor(t,e,i,n,r,s,o){super(),this.titleService=t,this.alertRulesService=e,this.alertsService=i,this.mapService=n,this.mapConfigService=r,this.timeRangeService=s,this.workerService=o,this.alerts$=new Av.a([]),this.alertsSummary=null,this.alertsLoaded=!1,this.useUTCDates=!1}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.titleService.setTitle("Alertes - ANAIS"),this.subscriptions.push(this.mapConfigService.useUTCDates$.subscribe(t=>{this.useUTCDates=t}),this.timeRangeService.timeRange$.subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){const e=yield this.workerService.alerts.list(t.start,t.end);e.forEach(t=>{const[e,i]=this.alertRulesService.getAlertRuleColor(t.rule_id);t.color=e,t.rgbVecColor=i}),this.alertsService.updateAlerts(e),this.alerts$.next(e),this.alertsLoaded=!0})),Object(or.a)(Se(0),AT(3e5)).subscribe(()=>Object(ue.a)(this,void 0,void 0,function*(){this.alertsSummary=yield this.workerService.alerts.getAlertsSummary()})))})}ngOnDestroy(){super.ngOnDestroy(),this.alertsService.updateAlerts([])}locateShip(t){return Object(ue.a)(this,void 0,void 0,function*(){const e=yield this.workerService.ships.getShip(t);this.mapService.pingLocation([e.lon,e.lat]),this.mapService.centerOnLonLat([e.lon,e.lat])})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(he),r.Pb(DP),r.Pb(IP),r.Pb(pI),r.Pb(hI),r.Pb(yT),r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-alerts-dashboard"]],features:[r.Ab],decls:9,vars:4,consts:[["joyrideStep","alerts-panel","stepPosition","right","title","Tableau de bord des alertes","text","Cet endroit contient un tableau de bord de toutes les alertes lev\xe9es par toutes vos r\xe8gles.",1,"panel"],[1,"panel__title"],["class","small-spinner","strokeWidth","4","diameter","60",4,"ngIf"],["class","d-flex",4,"ngIf"],[3,"ngIf"],["strokeWidth","4","diameter","60",1,"small-spinner"],[1,"d-flex"],["title","Nombre d'alertes lev\xe9es au cours des derni\xe8res 24 heures",1,"indicator","mat-elevation-z8"],[1,"indicator__label"],[1,"mr-1"],["title","Nombre d'alertes lev\xe9es au cours des 7 derniers jours",1,"indicator","mat-elevation-z8"],[3,"alerts$","enableRuleFilters","simpleItems","alertTitleRef","alertMenuItemsRef"],["alertTitleRef",""],["alertMenuItemsRef",""],[1,"d-flex-center"],[1,"alert__ship",3,"ship"],[1,"alert__timestamp",3,"title"],["title","Date de l'alerte",1,"mini-icon","mr-1"],["mat-menu-item","",3,"routerLink"],["mat-menu-item","",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"h2",1),r.Kc(2,"Indicateurs"),r.Ub(),r.Ic(3,Uz,1,0,"mat-spinner",2),r.Ic(4,Bz,13,2,"div",3),r.Vb(5,"h2",1),r.Kc(6,"Listes des alertes"),r.Ub(),r.Ic(7,Nz,1,0,"mat-spinner",2),r.Ic(8,$z,5,5,"ng-template",4),r.Ub()),2&t&&(r.Db(3),r.nc("ngIf",!e.alertsSummary),r.Db(1),r.nc("ngIf",e.alertsSummary),r.Db(3),r.nc("ngIf",!e.alertsLoaded),r.Db(1),r.nc("ngIf",e.alertsLoaded))},directives:[ax,ut,fF,Yp,Nj,Lz,QL,ow],pipes:[Tx,kt],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;overflow:hidden}.indicator[_ngcontent-%COMP%]{flex:1;position:relative;margin:8px;font-size:1.5em;justify-content:center;min-height:3em;padding:.7em 8px 8px;border-radius:4px}.indicator[_ngcontent-%COMP%], .indicator__label[_ngcontent-%COMP%]{display:flex;align-items:center}.indicator__label[_ngcontent-%COMP%]{position:absolute;top:0;left:4px;color:#8c8c8c;font-size:12px}.alert__ship[_ngcontent-%COMP%]{border-left:1px solid grey;padding-left:3px;display:block}.alert__timestamp[_ngcontent-%COMP%]{color:grey;display:flex;align-items:center}"]}),t})();const Wz=["*"],Zz=["tabListContainer"],qz=["tabList"],Yz=["nextPaginator"],Qz=["previousPaginator"],Xz=["mat-tab-nav-bar",""],Jz=new r.s("MatInkBarPositioner",{providedIn:"root",factory:function(){return t=>({left:t?(t.offsetLeft||0)+"px":"0",width:t?(t.offsetWidth||0)+"px":"0"})}});let tH=(()=>{class t{constructor(t,e,i,n){this._elementRef=t,this._ngZone=e,this._inkBarPositioner=i,this._animationMode=n}alignToElement(t){this.show(),"undefined"!=typeof requestAnimationFrame?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this._setStyles(t))}):this._setStyles(t)}show(){this._elementRef.nativeElement.style.visibility="visible"}hide(){this._elementRef.nativeElement.style.visibility="hidden"}_setStyles(t){const e=this._inkBarPositioner(t),i=this._elementRef.nativeElement;i.style.left=e.left,i.style.width=e.width}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.B),r.Pb(Jz),r.Pb(pa,8))},t.\u0275dir=r.Kb({type:t,selectors:[["mat-ink-bar"]],hostAttrs:[1,"mat-ink-bar"],hostVars:2,hostBindings:function(t,e){2&t&&r.Hb("_mat-animation-noopable","NoopAnimations"===e._animationMode)}}),t})();const eH=Ai({passive:!0});let iH=(()=>{class t{constructor(t,e,i,n,s,o,a){this._elementRef=t,this._changeDetectorRef=e,this._viewportRuler=i,this._dir=n,this._ngZone=s,this._platform=o,this._animationMode=a,this._scrollDistance=0,this._selectedIndexChanged=!1,this._destroyed=new _e.a,this._showPaginationControls=!1,this._disableScrollAfter=!0,this._disableScrollBefore=!0,this._stopScrolling=new _e.a,this.disablePagination=!1,this._selectedIndex=0,this.selectFocusedIndex=new r.o,this.indexFocused=new r.o,s.runOutsideAngular(()=>{en(t.nativeElement,"mouseleave").pipe(Sn(this._destroyed)).subscribe(()=>{this._stopInterval()})})}get selectedIndex(){return this._selectedIndex}set selectedIndex(t){t=ei(t),this._selectedIndex!=t&&(this._selectedIndexChanged=!0,this._selectedIndex=t,this._keyManager&&this._keyManager.updateActiveItem(t))}ngAfterViewInit(){en(this._previousPaginator.nativeElement,"touchstart",eH).pipe(Sn(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("before")}),en(this._nextPaginator.nativeElement,"touchstart",eH).pipe(Sn(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("after")})}ngAfterContentInit(){const t=this._dir?this._dir.change:Se(null),e=this._viewportRuler.change(150),i=()=>{this.updatePagination(),this._alignInkBarToSelectedTab()};this._keyManager=new Ri(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap(),this._keyManager.updateActiveItem(this._selectedIndex),"undefined"!=typeof requestAnimationFrame?requestAnimationFrame(i):i(),Object(or.a)(t,e,this._items.changes).pipe(Sn(this._destroyed)).subscribe(()=>{Promise.resolve().then(i),this._keyManager.withHorizontalOrientation(this._getLayoutDirection())}),this._keyManager.change.pipe(Sn(this._destroyed)).subscribe(t=>{this.indexFocused.emit(t),this._setTabFocus(t)})}ngAfterContentChecked(){this._tabLabelCount!=this._items.length&&(this.updatePagination(),this._tabLabelCount=this._items.length,this._changeDetectorRef.markForCheck()),this._selectedIndexChanged&&(this._scrollToLabel(this._selectedIndex),this._checkScrollingControls(),this._alignInkBarToSelectedTab(),this._selectedIndexChanged=!1,this._changeDetectorRef.markForCheck()),this._scrollDistanceChanged&&(this._updateTabScrollPosition(),this._scrollDistanceChanged=!1,this._changeDetectorRef.markForCheck())}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete(),this._stopScrolling.complete()}_handleKeydown(t){if(!ke(t))switch(t.keyCode){case 13:case 32:this.focusIndex!==this.selectedIndex&&(this.selectFocusedIndex.emit(this.focusIndex),this._itemSelected(t));break;default:this._keyManager.onKeydown(t)}}_onContentChanges(){const t=this._elementRef.nativeElement.textContent;t!==this._currentTextContent&&(this._currentTextContent=t||"",this._ngZone.run(()=>{this.updatePagination(),this._alignInkBarToSelectedTab(),this._changeDetectorRef.markForCheck()}))}updatePagination(){this._checkPaginationEnabled(),this._checkScrollingControls(),this._updateTabScrollPosition()}get focusIndex(){return this._keyManager?this._keyManager.activeItemIndex:0}set focusIndex(t){this._isValidIndex(t)&&this.focusIndex!==t&&this._keyManager&&this._keyManager.setActiveItem(t)}_isValidIndex(t){if(!this._items)return!0;const e=this._items?this._items.toArray()[t]:null;return!!e&&!e.disabled}_setTabFocus(t){if(this._showPaginationControls&&this._scrollToLabel(t),this._items&&this._items.length){this._items.toArray()[t].focus();const e=this._tabListContainer.nativeElement,i=this._getLayoutDirection();e.scrollLeft="ltr"==i?0:e.scrollWidth-e.offsetWidth}}_getLayoutDirection(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}_updateTabScrollPosition(){if(this.disablePagination)return;const t=this.scrollDistance,e="ltr"===this._getLayoutDirection()?-t:t;this._tabList.nativeElement.style.transform=`translateX(${Math.round(e)}px)`,(this._platform.TRIDENT||this._platform.EDGE)&&(this._tabListContainer.nativeElement.scrollLeft=0)}get scrollDistance(){return this._scrollDistance}set scrollDistance(t){this._scrollTo(t)}_scrollHeader(t){return this._scrollTo(this._scrollDistance+("before"==t?-1:1)*this._tabListContainer.nativeElement.offsetWidth/3)}_handlePaginatorClick(t){this._stopInterval(),this._scrollHeader(t)}_scrollToLabel(t){if(this.disablePagination)return;const e=this._items?this._items.toArray()[t]:null;if(!e)return;const i=this._tabListContainer.nativeElement.offsetWidth,{offsetLeft:n,offsetWidth:r}=e.elementRef.nativeElement;let s,o;"ltr"==this._getLayoutDirection()?(s=n,o=s+r):(o=this._tabList.nativeElement.offsetWidth-n,s=o-r);const a=this.scrollDistance,l=this.scrollDistance+i;s<a?this.scrollDistance-=a-s+60:o>l&&(this.scrollDistance+=o-l+60)}_checkPaginationEnabled(){if(this.disablePagination)this._showPaginationControls=!1;else{const t=this._tabList.nativeElement.scrollWidth>this._elementRef.nativeElement.offsetWidth;t||(this.scrollDistance=0),t!==this._showPaginationControls&&this._changeDetectorRef.markForCheck(),this._showPaginationControls=t}}_checkScrollingControls(){this.disablePagination?this._disableScrollAfter=this._disableScrollBefore=!0:(this._disableScrollBefore=0==this.scrollDistance,this._disableScrollAfter=this.scrollDistance==this._getMaxScrollDistance(),this._changeDetectorRef.markForCheck())}_getMaxScrollDistance(){return this._tabList.nativeElement.scrollWidth-this._tabListContainer.nativeElement.offsetWidth||0}_alignInkBarToSelectedTab(){const t=this._items&&this._items.length?this._items.toArray()[this.selectedIndex]:null,e=t?t.elementRef.nativeElement:null;e?this._inkBar.alignToElement(e):this._inkBar.hide()}_stopInterval(){this._stopScrolling.next()}_handlePaginatorPress(t,e){e&&null!=e.button&&0!==e.button||(this._stopInterval(),wn(650,100).pipe(Sn(Object(or.a)(this._stopScrolling,this._destroyed))).subscribe(()=>{const{maxScrollDistance:e,distance:i}=this._scrollHeader(t);(0===i||i>=e)&&this._stopInterval()}))}_scrollTo(t){if(this.disablePagination)return{maxScrollDistance:0,distance:0};const e=this._getMaxScrollDistance();return this._scrollDistance=Math.max(0,Math.min(e,t)),this._scrollDistanceChanged=!0,this._checkScrollingControls(),{maxScrollDistance:e,distance:this._scrollDistance}}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.h),r.Pb(nr),r.Pb(Zn,8),r.Pb(r.B),r.Pb(ci),r.Pb(pa,8))},t.\u0275dir=r.Kb({type:t,inputs:{disablePagination:"disablePagination"}}),t})(),nH=(()=>{class t extends iH{constructor(t,e,i,n,r,s,o){super(t,n,r,e,i,s,o),this._disableRipple=!1,this.color="primary"}get backgroundColor(){return this._backgroundColor}set backgroundColor(t){const e=this._elementRef.nativeElement.classList;e.remove(`mat-background-${this.backgroundColor}`),t&&e.add(`mat-background-${t}`),this._backgroundColor=t}get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=ti(t)}_itemSelected(){}ngAfterContentInit(){this._items.changes.pipe(Pn(null),Sn(this._destroyed)).subscribe(()=>{this.updateActiveLink()}),super.ngAfterContentInit()}updateActiveLink(){if(!this._items)return;const t=this._items.toArray();for(let e=0;e<t.length;e++)if(t[e].active)return this.selectedIndex=e,void this._changeDetectorRef.markForCheck();this.selectedIndex=-1,this._inkBar.hide()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(Zn,8),r.Pb(r.B),r.Pb(r.h),r.Pb(nr),r.Pb(ci),r.Pb(pa,8))},t.\u0275dir=r.Kb({type:t,inputs:{color:"color",backgroundColor:"backgroundColor",disableRipple:"disableRipple"},features:[r.Ab]}),t})(),rH=(()=>{class t extends nH{constructor(t,e,i,n,r,s,o){super(t,e,i,n,r,s,o)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(Zn,8),r.Pb(r.B),r.Pb(r.h),r.Pb(nr),r.Pb(ci),r.Pb(pa,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["","mat-tab-nav-bar",""]],contentQueries:function(t,e,i){if(1&t&&r.Ib(i,lH,1),2&t){let t;r.vc(t=r.dc())&&(e._items=t)}},viewQuery:function(t,e){if(1&t&&(r.Pc(tH,3),r.Pc(Zz,3),r.Pc(qz,3),r.Pc(Yz,1),r.Pc(Qz,1)),2&t){let t;r.vc(t=r.dc())&&(e._inkBar=t.first),r.vc(t=r.dc())&&(e._tabListContainer=t.first),r.vc(t=r.dc())&&(e._tabList=t.first),r.vc(t=r.dc())&&(e._nextPaginator=t.first),r.vc(t=r.dc())&&(e._previousPaginator=t.first)}},hostAttrs:[1,"mat-tab-nav-bar","mat-tab-header"],hostVars:10,hostBindings:function(t,e){2&t&&r.Hb("mat-tab-header-pagination-controls-enabled",e._showPaginationControls)("mat-tab-header-rtl","rtl"==e._getLayoutDirection())("mat-primary","warn"!==e.color&&"accent"!==e.color)("mat-accent","accent"===e.color)("mat-warn","warn"===e.color)},inputs:{color:"color"},exportAs:["matTabNavBar","matTabNav"],features:[r.Ab],attrs:Xz,ngContentSelectors:Wz,decls:13,vars:8,consts:[["aria-hidden","true","mat-ripple","",1,"mat-tab-header-pagination","mat-tab-header-pagination-before","mat-elevation-z4",3,"matRippleDisabled","click","mousedown","touchend"],["previousPaginator",""],[1,"mat-tab-header-pagination-chevron"],[1,"mat-tab-link-container",3,"keydown"],["tabListContainer",""],[1,"mat-tab-list",3,"cdkObserveContent"],["tabList",""],[1,"mat-tab-links"],["aria-hidden","true","mat-ripple","",1,"mat-tab-header-pagination","mat-tab-header-pagination-after","mat-elevation-z4",3,"matRippleDisabled","mousedown","click","touchend"],["nextPaginator",""]],template:function(t,e){1&t&&(r.mc(),r.Vb(0,"div",0,1),r.cc("click",function(){return e._handlePaginatorClick("before")})("mousedown",function(t){return e._handlePaginatorPress("before",t)})("touchend",function(){return e._stopInterval()}),r.Qb(2,"div",2),r.Ub(),r.Vb(3,"div",3,4),r.cc("keydown",function(t){return e._handleKeydown(t)}),r.Vb(5,"div",5,6),r.cc("cdkObserveContent",function(){return e._onContentChanges()}),r.Vb(7,"div",7),r.lc(8),r.Ub(),r.Qb(9,"mat-ink-bar"),r.Ub(),r.Ub(),r.Vb(10,"div",8,9),r.cc("mousedown",function(t){return e._handlePaginatorPress("after",t)})("click",function(){return e._handlePaginatorClick("after")})("touchend",function(){return e._stopInterval()}),r.Qb(12,"div",2),r.Ub()),2&t&&(r.Hb("mat-tab-header-pagination-disabled",e._disableScrollBefore),r.nc("matRippleDisabled",e._disableScrollBefore||e.disableRipple),r.Db(5),r.Hb("_mat-animation-noopable","NoopAnimations"===e._animationMode),r.Db(5),r.Hb("mat-tab-header-pagination-disabled",e._disableScrollAfter),r.nc("matRippleDisabled",e._disableScrollAfter||e.disableRipple))},directives:[il,xi,tH],styles:['.mat-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mat-tab-header-pagination{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:transparent;touch-action:none}.mat-tab-header-pagination-controls-enabled .mat-tab-header-pagination{display:flex}.mat-tab-header-pagination-before,.mat-tab-header-rtl .mat-tab-header-pagination-after{padding-left:4px}.mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-rtl .mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-tab-header-rtl .mat-tab-header-pagination-before,.mat-tab-header-pagination-after{padding-right:4px}.mat-tab-header-rtl .mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;content:"";height:8px;width:8px}.mat-tab-header-pagination-disabled{box-shadow:none;cursor:default}.mat-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-tab-links{display:flex}[mat-align-tabs=center]>.mat-tab-link-container .mat-tab-links{justify-content:center}[mat-align-tabs=end]>.mat-tab-link-container .mat-tab-links{justify-content:flex-end}.mat-ink-bar{position:absolute;bottom:0;height:2px;transition:500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable.mat-ink-bar{transition:none;animation:none}.mat-tab-group-inverted-header .mat-ink-bar{bottom:auto;top:0}.cdk-high-contrast-active .mat-ink-bar{outline:solid 2px;height:0}.mat-tab-link-container{display:flex;flex-grow:1;overflow:hidden;z-index:1}.mat-tab-link{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;vertical-align:top;text-decoration:none;position:relative;overflow:hidden;-webkit-tap-highlight-color:transparent}.mat-tab-link:focus{outline:none}.mat-tab-link:focus:not(.mat-tab-disabled){opacity:1}.cdk-high-contrast-active .mat-tab-link:focus{outline:dotted 2px;outline-offset:-2px}.mat-tab-link.mat-tab-disabled{cursor:default}.cdk-high-contrast-active .mat-tab-link.mat-tab-disabled{opacity:.5}.mat-tab-link .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}.cdk-high-contrast-active .mat-tab-link{opacity:1}[mat-stretch-tabs] .mat-tab-link{flex-basis:0;flex-grow:1}.mat-tab-link.mat-tab-disabled{pointer-events:none}@media(max-width: 599px){.mat-tab-link{min-width:72px}}\n'],encapsulation:2}),t})();class sH{}const oH=Ia(Da(ka(sH)));let aH=(()=>{class t extends oH{constructor(t,e,i,n,r,s){super(),this._tabNavBar=t,this.elementRef=e,this._focusMonitor=r,this._isActive=!1,this.rippleConfig=i||{},this.tabIndex=parseInt(n)||0,"NoopAnimations"===s&&(this.rippleConfig.animation={enterDuration:0,exitDuration:0})}get active(){return this._isActive}set active(t){ti(t)!==this._isActive&&(this._isActive=t,this._tabNavBar.updateActiveLink())}get rippleDisabled(){return this.disabled||this.disableRipple||this._tabNavBar.disableRipple||!!this.rippleConfig.disabled}focus(){this.elementRef.nativeElement.focus()}ngAfterViewInit(){this._focusMonitor.monitor(this.elementRef)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this.elementRef)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(nH),r.Pb(r.l),r.Pb(el,8),r.ac("tabindex"),r.Pb(qi),r.Pb(pa,8))},t.\u0275dir=r.Kb({type:t,inputs:{active:"active"},features:[r.Ab]}),t})(),lH=(()=>{class t extends aH{constructor(t,e,i,n,r,s,o,a){super(t,e,r,s,o,a),this._tabLinkRipple=new tl(this,i,e,n),this._tabLinkRipple.setupTriggerEvents(e.nativeElement)}ngOnDestroy(){super.ngOnDestroy(),this._tabLinkRipple._removeTriggerEvents()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(rH),r.Pb(r.l),r.Pb(r.B),r.Pb(ci),r.Pb(el,8),r.ac("tabindex"),r.Pb(qi),r.Pb(pa,8))},t.\u0275dir=r.Kb({type:t,selectors:[["","mat-tab-link",""],["","matTabLink",""]],hostAttrs:[1,"mat-tab-link","mat-focus-indicator"],hostVars:7,hostBindings:function(t,e){2&t&&(r.Eb("aria-current",e.active?"page":null)("aria-disabled",e.disabled)("tabIndex",e.tabIndex),r.Hb("mat-tab-disabled",e.disabled)("mat-tab-label-active",e.active))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex"},exportAs:["matTabLink"],features:[r.Ab]}),t})(),cH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Et,Sa,ve,nl,Ci,Ji],Sa]}),t})();function hH(t,e){if(1&t&&(r.Vb(0,"a",3,4),r.Kc(2),r.Ub()),2&t){const t=e.$implicit,i=r.wc(1);r.pc("title","Onglet ",t.label,""),r.nc("routerLink",t.link)("active",i.isActive),r.Db(2),r.Mc(" ",t.label," ")}}let uH=(()=>{class t extends LT{constructor(t){super(),this.mapService=t,this.tabs=[{label:"Alertes",link:"/alerts/dashboard"},{label:"R\xe8gles",link:"/alerts/rules"}]}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.mapService.hasBooted||this.mapService.resetToDefaultView()})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(pI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-alerts-panel"]],features:[r.Ab],decls:4,vars:1,consts:[[1,"panel"],["mat-tab-nav-bar","","mat-align-tabs","center",1,"tabs"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active","title",4,"ngFor","ngForOf"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active","title"],["rla","routerLinkActive"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"nav",1),r.Ic(2,hH,3,4,"a",2),r.Ub(),r.Qb(3,"router-outlet"),r.Ub()),2&t&&(r.Db(2),r.nc("ngForOf",e.tabs))},directives:[rH,ct,hw,aw,lH,cw],styles:[".tabs[_ngcontent-%COMP%]{background-color:#f2c94c}"]}),t})();var dH=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),pH=function(t){function e(e){var i=t.call(this)||this;return i.id_=void 0,i.geometryName_="geometry",i.style_=null,i.styleFunction_=void 0,i.geometryChangeKey_=null,i.addEventListener(UE(i.geometryName_),i.handleGeometryChanged_),e&&("function"==typeof e.getSimplifiedGeometry?i.setGeometry(e):i.setProperties(e)),i}return dH(e,t),e.prototype.clone=function(){var t=new e(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());var i=this.getGeometry();i&&t.setGeometry(i.clone());var n=this.getStyle();return n&&t.setStyle(n),t},e.prototype.getGeometry=function(){return this.get(this.geometryName_)},e.prototype.getId=function(){return this.id_},e.prototype.getGeometryName=function(){return this.geometryName_},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.handleGeometryChange_=function(){this.changed()},e.prototype.handleGeometryChanged_=function(){this.geometryChangeKey_&&(ik(this.geometryChangeKey_),this.geometryChangeKey_=null);var t=this.getGeometry();t&&(this.geometryChangeKey_=tk(t,"change",this.handleGeometryChange_,this)),this.changed()},e.prototype.setGeometry=function(t){this.set(this.geometryName_,t)},e.prototype.setStyle=function(t){var e,i;this.style_=t,this.styleFunction_=t?"function"==typeof(e=t)?e:(Array.isArray(e)?i=e:(yS("function"==typeof e.getZIndex,41),i=[e]),function(){return i}):void 0,this.changed()},e.prototype.setId=function(t){this.id_=t,this.changed()},e.prototype.setGeometryName=function(t){this.removeEventListener(UE(this.geometryName_),this.handleGeometryChanged_),this.geometryName_=t,this.addEventListener(UE(this.geometryName_),this.handleGeometryChanged_),this.handleGeometryChanged_()},e}(BE),fH=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function mH(t){for(var e=[],i=0,n=t.length;i<n;++i)e.push(t[i].clone());return e}var gH=function(t){function e(e){var i=t.call(this)||this;return i.geometries_=e||null,i.changeEventsKeys_=[],i.listenGeometriesChange_(),i}return fH(e,t),e.prototype.unlistenGeometriesChange_=function(){this.changeEventsKeys_.forEach(ik),this.changeEventsKeys_.length=0},e.prototype.listenGeometriesChange_=function(){if(this.geometries_)for(var t=0,e=this.geometries_.length;t<e;++t)this.changeEventsKeys_.push(tk(this.geometries_[t],"change",this.changed,this))},e.prototype.clone=function(){var t=new e(null);return t.setGeometries(this.geometries_),t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,i,n){if(n<SS(this.getExtent(),t,e))return n;for(var r=this.geometries_,s=0,o=r.length;s<o;++s)n=r[s].closestPointXY(t,e,i,n);return n},e.prototype.containsXY=function(t,e){for(var i=this.geometries_,n=0,r=i.length;n<r;++n)if(i[n].containsXY(t,e))return!0;return!1},e.prototype.computeExtent=function(t){OS(t);for(var e=this.geometries_,i=0,n=e.length;i<n;++i)VS(t,e[i].getExtent());return t},e.prototype.getGeometries=function(){return mH(this.geometries_)},e.prototype.getGeometriesArray=function(){return this.geometries_},e.prototype.getGeometriesArrayRecursive=function(){for(var t=[],e=this.geometries_,i=0,n=e.length;i<n;++i)e[i].getType()===this.getType()?t=t.concat(e[i].getGeometriesArrayRecursive()):t.push(e[i]);return t},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<this.simplifiedGeometryMaxMinSquaredTolerance)return this;for(var i=[],n=this.geometries_,r=!1,s=0,o=n.length;s<o;++s){var a=n[s],l=a.getSimplifiedGeometry(t);i.push(l),l!==a&&(r=!0)}if(r){var c=new e(null);return c.setGeometriesArray(i),c}return this.simplifiedGeometryMaxMinSquaredTolerance=t,this},e.prototype.getType=function(){return"GeometryCollection"},e.prototype.intersectsExtent=function(t){for(var e=this.geometries_,i=0,n=e.length;i<n;++i)if(e[i].intersectsExtent(t))return!0;return!1},e.prototype.isEmpty=function(){return 0===this.geometries_.length},e.prototype.rotate=function(t,e){for(var i=this.geometries_,n=0,r=i.length;n<r;++n)i[n].rotate(t,e);this.changed()},e.prototype.scale=function(t,e,i){var n=i;n||(n=HS(this.getExtent()));for(var r=this.geometries_,s=0,o=r.length;s<o;++s)r[s].scale(t,e,n);this.changed()},e.prototype.setGeometries=function(t){this.setGeometriesArray(mH(t))},e.prototype.setGeometriesArray=function(t){this.unlistenGeometriesChange_(),this.geometries_=t,this.listenGeometriesChange_(),this.changed()},e.prototype.applyTransform=function(t){for(var e=this.geometries_,i=0,n=e.length;i<n;++i)e[i].applyTransform(t);this.changed()},e.prototype.translate=function(t,e){for(var i=this.geometries_,n=0,r=i.length;n<r;++n)i[n].translate(t,e);this.changed()},e.prototype.disposeInternal=function(){this.unlistenGeometriesChange_(),t.prototype.disposeInternal.call(this)},e}(AM),AH=function(){function t(){this.dataProjection=null,this.defaultFeatureProjection=null}return t.prototype.getReadOptions=function(t,e){var i;if(e){var n=e.dataProjection?eE(e.dataProjection):this.readProjection(t);e.extent&&n&&n.getUnits()===ck.TILE_PIXELS&&(n=eE(n)).setWorldExtent(e.extent),i={dataProjection:n,featureProjection:e.featureProjection}}return this.adaptOptions(i)},t.prototype.adaptOptions=function(t){return zC({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},t)},t.prototype.getType=function(){return ZC()},t.prototype.readFeature=function(t,e){return ZC()},t.prototype.readFeatures=function(t,e){return ZC()},t.prototype.readGeometry=function(t,e){return ZC()},t.prototype.readProjection=function(t){return ZC()},t.prototype.writeFeature=function(t,e){return ZC()},t.prototype.writeFeatures=function(t,e){return ZC()},t.prototype.writeGeometry=function(t,e){return ZC()},t}();function bH(t,e,i){var n,r=i?eE(i.featureProjection):null,s=i?eE(i.dataProjection):null;if(n=r&&s&&!aE(r,s)?(e?t.clone():t).transform(e?r:s,e?s:r):t,e&&i&&void 0!==i.decimals){var o=Math.pow(10,i.decimals);n===t&&(n=t.clone()),n.applyTransform(function(t){for(var e=0,i=t.length;e<i;++e)t[e]=Math.round(t[e]*o)/o;return t})}return n}var vH=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function _H(t){return"string"==typeof t?JSON.parse(t)||null:null!==t?t:null}var yH=function(t){function e(){return t.call(this)||this}return vH(e,t),e.prototype.getType=function(){return"json"},e.prototype.readFeature=function(t,e){return this.readFeatureFromObject(_H(t),this.getReadOptions(t,e))},e.prototype.readFeatures=function(t,e){return this.readFeaturesFromObject(_H(t),this.getReadOptions(t,e))},e.prototype.readFeatureFromObject=function(t,e){return ZC()},e.prototype.readFeaturesFromObject=function(t,e){return ZC()},e.prototype.readGeometry=function(t,e){return this.readGeometryFromObject(_H(t),this.getReadOptions(t,e))},e.prototype.readGeometryFromObject=function(t,e){return ZC()},e.prototype.readProjection=function(t){return this.readProjectionFromObject(_H(t))},e.prototype.readProjectionFromObject=function(t){return ZC()},e.prototype.writeFeature=function(t,e){return JSON.stringify(this.writeFeatureObject(t,e))},e.prototype.writeFeatureObject=function(t,e){return ZC()},e.prototype.writeFeatures=function(t,e){return JSON.stringify(this.writeFeaturesObject(t,e))},e.prototype.writeFeaturesObject=function(t,e){return ZC()},e.prototype.writeGeometry=function(t,e){return JSON.stringify(this.writeGeometryObject(t,e))},e.prototype.writeGeometryObject=function(t,e){return ZC()},e}(AH);function wH(t,e,i,n,r,s,o){var a,l,c=(i-e)/n;if(1===c)a=e;else if(2===c)a=e,l=r;else if(0!==c){for(var h=t[e],u=t[e+1],d=0,p=[0],f=e+n;f<i;f+=n){var m=t[f],g=t[f+1];d+=Math.sqrt((m-h)*(m-h)+(g-u)*(g-u)),p.push(d),h=m,u=g}var A=r*d,b=function(t,e,i){for(var n,r,s=TC,o=0,a=t.length,l=!1;o<a;)(r=+s(t[n=o+(a-o>>1)],e))<0?o=n+1:(a=n,l=!r);return l?o:~o}(p,A);b<0?(l=(A-p[-b-2])/(p[-b-1]-p[-b-2]),a=e+(-b-2)*n):a=e+b*n}var v=o>1?o:2,_=s||new Array(v);for(f=0;f<v;++f)_[f]=void 0===a?NaN:void 0===l?t[a+f]:vk(t[a+f],t[a+n+f],l);return _}function xH(t,e,i,n,r,s){if(i==e)return null;var o;if(r<t[e+n-1])return s?((o=t.slice(e,e+n))[n-1]=r,o):null;if(t[i-1]<r)return s?((o=t.slice(i-n,i))[n-1]=r,o):null;if(r==t[e+n-1])return t.slice(e,e+n);for(var a=e/n,l=i/n;a<l;){var c=a+l>>1;r<t[(c+1)*n-1]?l=c:a=c+1}var h=t[a*n-1];if(r==h)return t.slice((a-1)*n,(a-1)*n+n);var u=(r-h)/(t[(a+1)*n-1]-h);o=[];for(var d=0;d<n-1;++d)o.push(vk(t[(a-1)*n+d],t[a*n+d],u));return o.push(r),o}function CH(t,e,i,n){for(var r=t[e],s=t[e+1],o=0,a=e+n;a<i;a+=n){var l=t[a],c=t[a+1];o+=Math.sqrt((l-r)*(l-r)+(c-s)*(c-s)),r=l,s=c}return o}var SH=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),kH=function(t){function e(e,i){var n=t.call(this)||this;return n.flatMidpoint_=null,n.flatMidpointRevision_=-1,n.maxDelta_=-1,n.maxDeltaRevision_=-1,void 0===i||Array.isArray(e[0])?n.setCoordinates(e,i):n.setFlatCoordinates(i,e),n}return SH(e,t),e.prototype.appendCoordinate=function(t){this.flatCoordinates?LC(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,i,n){return n<SS(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(wM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),CM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,i,n))},e.prototype.forEachSegment=function(t){return GM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinateAtM=function(t,e){return"XYM"!=this.layout&&"XYZM"!=this.layout?null:xH(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,void 0!==e&&e)},e.prototype.getCoordinates=function(){return TM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinateAt=function(t,e){return wH(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)},e.prototype.getLength=function(){return CH(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getFlatMidpoint=function(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[];return i.length=IM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i,0),new e(i,"XY")},e.prototype.getType=function(){return"LineString"},e.prototype.intersectsExtent=function(t){return WM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=EM(this.flatCoordinates,0,t,this.stride),this.changed()},e}(_M),EH=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),DH=function(t){function e(e,i,n){var r=t.call(this)||this;if(r.ends_=[],r.maxDelta_=-1,r.maxDeltaRevision_=-1,Array.isArray(e[0]))r.setCoordinates(e,i);else if(void 0!==i&&n)r.setFlatCoordinates(i,e),r.ends_=n;else{for(var s=r.getLayout(),o=e,a=[],l=[],c=0,h=o.length;c<h;++c){var u=o[c];0===c&&(s=u.getLayout()),LC(a,u.getFlatCoordinates()),l.push(a.length)}r.setFlatCoordinates(s,a),r.ends_=l}return r}return EH(e,t),e.prototype.appendLineString=function(t){this.flatCoordinates?LC(this.flatCoordinates,t.getFlatCoordinates().slice()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,i,n){return n<SS(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(xM(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),SM(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,e,i,n))},e.prototype.getCoordinateAtM=function(t,e,i){return"XYM"!=this.layout&&"XYZM"!=this.layout||0===this.flatCoordinates.length?null:function(t,e,i,n,r,s,o){if(o)return xH(t,e,i[i.length-1],n,r,s);var a;if(r<t[n-1])return s?((a=t.slice(0,n))[n-1]=r,a):null;if(t[t.length-1]<r)return s?((a=t.slice(t.length-n))[n-1]=r,a):null;for(var l=0,c=i.length;l<c;++l){var h=i[l];if(e!=h){if(r<t[e+n-1])return null;if(r<=t[h-1])return xH(t,e,h,n,r,!1);e=h}}return null}(this.flatCoordinates,0,this.ends_,this.stride,t,void 0!==e&&e,void 0!==i&&i)},e.prototype.getCoordinates=function(){return RM(this.flatCoordinates,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getLineString=function(t){return t<0||this.ends_.length<=t?null:new kH(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLineStrings=function(){for(var t=this.flatCoordinates,e=this.ends_,i=this.layout,n=[],r=0,s=0,o=e.length;s<o;++s){var a=e[s],l=new kH(t.slice(r,a),i);n.push(l),r=a}return n},e.prototype.getFlatMidpoints=function(){for(var t=[],e=this.flatCoordinates,i=0,n=this.ends_,r=this.stride,s=0,o=n.length;s<o;++s){var a=n[s];LC(t,wH(e,i,a,r,.5)),i=a}return t},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[],n=[];return i.length=function(t,e,i,n,r,s,o,a){for(var l=0,c=i.length;l<c;++l){var h=i[l];o=IM(t,e,h,n,r,s,o),a.push(o),e=h}return o}(this.flatCoordinates,0,this.ends_,this.stride,t,i,0,n),new e(i,"XY",n)},e.prototype.getType=function(){return"MultiLineString"},e.prototype.intersectsExtent=function(t){return function(t,e,i,n,r){for(var s=0,o=i.length;s<o;++s){if(WM(t,e,i[s],n,r))return!0;e=i[s]}return!1}(this.flatCoordinates,0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=DM(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()},e}(_M),IH=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),PH=function(t){function e(e,i){var n=t.call(this)||this;return i&&!Array.isArray(e[0])?n.setFlatCoordinates(i,e):n.setCoordinates(e,i),n}return IH(e,t),e.prototype.appendPoint=function(t){this.flatCoordinates?LC(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,i,n){if(n<SS(this.getExtent(),t,e))return n;for(var r=this.flatCoordinates,s=this.stride,o=0,a=r.length;o<a;o+=s){var l=mk(t,e,r[o],r[o+1]);if(l<n){n=l;for(var c=0;c<s;++c)i[c]=r[o+c];i.length=s}}return n},e.prototype.getCoordinates=function(){return TM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getPoint=function(t){return t<0||(this.flatCoordinates?this.flatCoordinates.length/this.stride:0)<=t?null:new jM(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)},e.prototype.getPoints=function(){for(var t=this.flatCoordinates,e=this.layout,i=this.stride,n=[],r=0,s=t.length;r<s;r+=i){var o=new jM(t.slice(r,r+i),e);n.push(o)}return n},e.prototype.getType=function(){return"MultiPoint"},e.prototype.intersectsExtent=function(t){for(var e=this.flatCoordinates,i=this.stride,n=0,r=e.length;n<r;n+=i)if(DS(t,e[n],e[n+1]))return!0;return!1},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=EM(this.flatCoordinates,0,t,this.stride),this.changed()},e}(_M),OH=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),MH=function(t){function e(e,i,n){var r=t.call(this)||this;if(r.endss_=[],r.flatInteriorPointsRevision_=-1,r.flatInteriorPoints_=null,r.maxDelta_=-1,r.maxDeltaRevision_=-1,r.orientedRevision_=-1,r.orientedFlatCoordinates_=null,!n&&!Array.isArray(e[0])){for(var s=r.getLayout(),o=e,a=[],l=[],c=0,h=o.length;c<h;++c){var u=o[c];0===c&&(s=u.getLayout());for(var d=a.length,p=u.getEnds(),f=0,m=p.length;f<m;++f)p[f]+=d;LC(a,u.getFlatCoordinates()),l.push(p)}i=s,e=a,n=l}return void 0!==i&&n?(r.setFlatCoordinates(i,e),r.endss_=n):r.setCoordinates(e,i),r}return OH(e,t),e.prototype.appendPolygon=function(t){var e;if(this.flatCoordinates){var i=this.flatCoordinates.length;LC(this.flatCoordinates,t.getFlatCoordinates());for(var n=0,r=(e=t.getEnds().slice()).length;n<r;++n)e[n]+=i}else this.flatCoordinates=t.getFlatCoordinates().slice(),e=t.getEnds().slice(),this.endss_.push();this.endss_.push(e),this.changed()},e.prototype.clone=function(){for(var t=this.endss_.length,i=new Array(t),n=0;n<t;++n)i[n]=this.endss_[n].slice();var r=new e(this.flatCoordinates.slice(),this.layout,i);return r.applyProperties(this),r},e.prototype.closestPointXY=function(t,e,i,n){return n<SS(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(function(t,e,i,n,r){for(var s=0,o=i.length;s<o;++s){var a=i[s];r=xM(t,e,a,n,r),e=a[a.length-1]}return r}(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),function(t,e,i,n,r,s,o,a,l,c,h){for(var u=[NaN,NaN],d=0,p=i.length;d<p;++d){var f=i[d];c=SM(t,e,f,n,r,!0,o,a,l,c,u),e=f[f.length-1]}return c}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,0,t,e,i,n))},e.prototype.containsXY=function(t,e){return function(t,e,i,n,r,s){if(0===i.length)return!1;for(var o=0,a=i.length;o<a;++o){var l=i[o];if(KM(t,e,l,n,r,s))return!0;e=l[l.length-1]}return!1}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,e)},e.prototype.getArea=function(){return function(t,e,i,n){for(var r=0,s=0,o=i.length;s<o;++s){var a=i[s];r+=LM(t,e,a,n),e=a[a.length-1]}return r}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)},e.prototype.getCoordinates=function(t){var e;return void 0!==t?JM(e=this.getOrientedFlatCoordinates().slice(),0,this.endss_,this.stride,t):e=this.flatCoordinates,VM(e,0,this.endss_,this.stride)},e.prototype.getEndss=function(){return this.endss_},e.prototype.getFlatInteriorPoints=function(){if(this.flatInteriorPointsRevision_!=this.getRevision()){var t=function(t,e,i,n){for(var r=[],s=[1/0,1/0,-1/0,-1/0],o=0,a=i.length;o<a;++o){var l=i[o];s=TS(t,e,l[0],n),r.push((s[0]+s[2])/2,(s[1]+s[3])/2),e=l[l.length-1]}return r}(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=function(t,e,i,n,r){for(var s=[],o=0,a=i.length;o<a;++o){var l=i[o];s=$M(t,e,l,n,r,2*o,s),e=l[l.length-1]}return s}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_},e.prototype.getInteriorPoints=function(){return new PH(this.getFlatInteriorPoints().slice(),"XYM")},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;!function(t,e,i,n,r){for(var s=0,o=i.length;s<o;++s){var a=i[s];if(!QM(t,e,a,n,void 0))return!1;a.length&&(e=a[a.length-1])}return!0}(t,0,this.endss_,this.stride)?(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=JM(this.orientedFlatCoordinates_,0,this.endss_,this.stride)):this.orientedFlatCoordinates_=t,this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[],n=[];return i.length=function(t,e,i,n,r,s,o,a){for(var l=0,c=i.length;l<c;++l){var h=i[l],u=[];o=MM(t,e,h,n,r,s,o,u),a.push(u),e=h[h.length-1]}return o}(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(t),i,0,n),new e(i,"XY",n)},e.prototype.getPolygon=function(t){if(t<0||this.endss_.length<=t)return null;var e;if(0===t)e=0;else{var i=this.endss_[t-1];e=i[i.length-1]}var n=this.endss_[t].slice(),r=n[n.length-1];if(0!==e)for(var s=0,o=n.length;s<o;++s)n[s]-=e;return new iT(this.flatCoordinates.slice(e,r),this.layout,n)},e.prototype.getPolygons=function(){for(var t=this.layout,e=this.flatCoordinates,i=this.endss_,n=[],r=0,s=0,o=i.length;s<o;++s){var a=i[s].slice(),l=a[a.length-1];if(0!==r)for(var c=0,h=a.length;c<h;++c)a[c]-=r;var u=new iT(e.slice(r,l),t,a);n.push(u),r=l}return n},e.prototype.getType=function(){return"MultiPolygon"},e.prototype.intersectsExtent=function(t){return function(t,e,i,n,r){for(var s=0,o=i.length;s<o;++s){var a=i[s];if(ZM(t,e,a,n,r))return!0;e=a[a.length-1]}return!1}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,3),this.flatCoordinates||(this.flatCoordinates=[]);var i=function(t,e,i,n,r){for(var s=r||[],o=0,a=0,l=i.length;a<l;++a){var c=DM(t,e,i[a],n,s[o]);s[o++]=c,e=c[c.length-1]}return s.length=o,s}(this.flatCoordinates,0,t,this.stride,this.endss_);if(0===i.length)this.flatCoordinates.length=0;else{var n=i[i.length-1];this.flatCoordinates.length=0===n.length?0:n[n.length-1]}this.changed()},e}(_M),TH=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function RH(t,e){if(!t)return null;var i;switch(t.type){case"Point":i=function(t){return new jM(t.coordinates)}(t);break;case"LineString":i=function(t){return new kH(t.coordinates)}(t);break;case"Polygon":i=function(t){return new iT(t.coordinates)}(t);break;case"MultiPoint":i=function(t){return new PH(t.coordinates)}(t);break;case"MultiLineString":i=function(t){return new DH(t.coordinates)}(t);break;case"MultiPolygon":i=function(t){return new MH(t.coordinates)}(t);break;case"GeometryCollection":i=function(t,e){var i=t.geometries.map(function(t){return RH(t,void 0)});return new gH(i)}(t);break;default:throw new Error("Unsupported GeoJSON type: "+t.type)}return bH(i,!1,e)}function VH(t,e){var i,n=(t=bH(t,!0,e)).getType();switch(n){case"Point":i=function(t,e){return{type:"Point",coordinates:t.getCoordinates()}}(t);break;case"LineString":i=function(t,e){return{type:"LineString",coordinates:t.getCoordinates()}}(t);break;case"Polygon":i=function(t,e){var i;return e&&(i=e.rightHanded),{type:"Polygon",coordinates:t.getCoordinates(i)}}(t,e);break;case"MultiPoint":i=function(t,e){return{type:"MultiPoint",coordinates:t.getCoordinates()}}(t);break;case"MultiLineString":i=function(t,e){return{type:"MultiLineString",coordinates:t.getCoordinates()}}(t);break;case"MultiPolygon":i=function(t,e){var i;return e&&(i=e.rightHanded),{type:"MultiPolygon",coordinates:t.getCoordinates(i)}}(t,e);break;case"GeometryCollection":i=function(t,e){return{type:"GeometryCollection",geometries:t.getGeometriesArray().map(function(t){var i=zC({},e);return delete i.featureProjection,VH(t,i)})}}(t,e);break;case"Circle":i={type:"GeometryCollection",geometries:[]};break;default:throw new Error("Unsupported geometry type: "+n)}return i}var FH=function(t){function e(e){var i=this,n=e||{};return(i=t.call(this)||this).dataProjection=eE(n.dataProjection?n.dataProjection:"EPSG:4326"),n.featureProjection&&(i.defaultFeatureProjection=eE(n.featureProjection)),i.geometryName_=n.geometryName,i.extractGeometryName_=n.extractGeometryName,i}return TH(e,t),e.prototype.readFeatureFromObject=function(t,e){var i,n=RH((i="Feature"===t.type?t:{type:"Feature",geometry:t,properties:null}).geometry,e),r=new pH;return this.geometryName_?r.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in i!==void 0&&r.setGeometryName(i.geometry_name),r.setGeometry(n),"id"in i&&r.setId(i.id),i.properties&&r.setProperties(i.properties,!0),r},e.prototype.readFeaturesFromObject=function(t,e){var i=null;if("FeatureCollection"===t.type){i=[];for(var n=t.features,r=0,s=n.length;r<s;++r)i.push(this.readFeatureFromObject(n[r],e))}else i=[this.readFeatureFromObject(t,e)];return i},e.prototype.readGeometryFromObject=function(t,e){return RH(t,e)},e.prototype.readProjectionFromObject=function(t){var e,i=t.crs;return i?"name"==i.type?e=eE(i.properties.name):"EPSG"===i.type?e=eE("EPSG:"+i.properties.code):yS(!1,36):e=this.dataProjection,e},e.prototype.writeFeatureObject=function(t,e){e=this.adaptOptions(e);var i={type:"Feature",geometry:null,properties:null},n=t.getId();if(void 0!==n&&(i.id=n),!t.hasProperties())return i;var r=t.getProperties(),s=t.getGeometry();return s&&(i.geometry=VH(s,e),delete r[t.getGeometryName()]),$C(r)||(i.properties=r),i},e.prototype.writeFeaturesObject=function(t,e){e=this.adaptOptions(e);for(var i=[],n=0,r=t.length;n<r;++n)i.push(this.writeFeatureObject(t[n],e));return{type:"FeatureCollection",features:i}},e.prototype.writeGeometryObject=function(t,e){return VH(t,this.adaptOptions(e))},e}(yH);const LH=new FH({featureProjection:"EPSG:3857"});function UH(t,e){1&t&&r.Qb(0,"mat-spinner",7)}function BH(t,e){1&t&&(r.Vb(0,"p",10),r.Kc(1,"Vous n'avez pas encore cr\xe9\xe9 d'annotation."),r.Ub())}function NH(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",13),r.Vb(1,"button",14),r.cc("click",function(){r.Ac(t);const i=e.$implicit;return r.gc(3).locateAnnotation(i)}),r.Kc(2),r.Ub(),r.Vb(3,"button",15),r.cc("click",function(){r.Ac(t);const i=e.$implicit;return r.gc(3).editAnnotation(i)}),r.Vb(4,"mat-icon"),r.Kc(5,"edit"),r.Ub(),r.Ub(),r.Vb(6,"button",16),r.cc("click",function(){r.Ac(t);const i=e.$implicit;return r.gc(3).deleteAnnotation(i)}),r.Vb(7,"mat-icon"),r.Kc(8,"delete"),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=e.$implicit,i=r.gc(3);r.nc("@fadeAnimation",void 0),r.Db(2),r.Mc(" ",t.name," "),r.Db(1),r.nc("disabled",i.isEditingAnnotation),r.Db(3),r.nc("disabled",i.isEditingAnnotation)}}function jH(t,e){if(1&t&&(r.Vb(0,"div",11),r.Ic(1,NH,9,4,"div",12),r.Ub()),2&t){const t=r.gc(2);r.Db(1),r.nc("ngForOf",t.annotations)("ngForTrackBy",t.trackById)}}function zH(t,e){if(1&t&&(r.Ic(0,BH,2,0,"p",8),r.Ic(1,jH,2,2,"div",9)),2&t){const t=r.gc();r.nc("ngIf",0===t.annotations.length),r.Db(1),r.nc("ngIf",t.annotations.length>0)}}let HH=(()=>{class t extends LT{constructor(t,e,i,n){super(),this.titleService=t,this.annotationsService=e,this.mapService=i,this.uiService=n,this.annotations=[],this.isEditingAnnotation=!1,this.showCreateAnnotationForm=!1,this.annotationsEditable=!0}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.titleService.setTitle("Liste des annotations - ANAIS"),this.mapService.hasBooted||this.mapService.resetToDefaultView(),this.subscriptions.push(this.annotationsService.annotations$.subscribe(t=>{this.annotations=t}),this.annotationsService.editedAnnotation$.pipe(Object(Ge.a)(t=>!!t)).subscribe(t=>{this.isEditingAnnotation=t}))})}ngOnDestroy(){super.ngOnDestroy()}displayCreateAnnotationForm(){this.showCreateAnnotationForm=!0}hideCreateAnnotationForm(){this.showCreateAnnotationForm=!1}trackById(t,e){return e.id}locateAnnotation(t){switch(t.geom.type){case"Point":this.mapService.pingLocation(t.geom.coordinates),this.mapService.centerOnLonLat(t.geom.coordinates);break;case"LineString":case"Polygon":this.mapService.fitOn(LH.readGeometry(t.geom));break;default:throw new Error(`Type d'annotation inconnu : \`${t.geom.type}\``)}}editAnnotation(t){this.locateAnnotation(t),this.annotationsService.editAnnotation(t)}deleteAnnotation(t){this.uiService.confirm({title:"Suppression",message:"Confirmez-vous la suppression de cette annotation ?",action:e=>Object(ue.a)(this,void 0,void 0,function*(){e&&(yield this.annotationsService.deleteAnnotation(t.id))})})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(he),r.Pb(MP),r.Pb(pI),r.Pb(VI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-annotations-panel"]],features:[r.Ab],decls:9,vars:3,consts:[["joyrideStep","annotations-panel","title","Gestion des annotations","text","C'est ici que vous pouvez g\xe9rer vos annotations sur la carte.",1,"panel"],[1,"panel__header","panel__header--blue"],[1,"panel__title","u-flex"],[1,"scrollable","d-flex-column"],["class","spinner","strokeWidth","4","diameter","80",4,"ngIf"],[3,"ngIf"],["mat-stroked-button","","color","primary","title","Cr\xe9er une annotation",1,"ma-2",3,"disabled","click"],["strokeWidth","4","diameter","80",1,"spinner"],["class","panel__content",4,"ngIf"],["class","d-flex-column",4,"ngIf"],[1,"panel__content"],[1,"d-flex-column"],["class","d-flex","style","transition: .5s",4,"ngFor","ngForOf","ngForTrackBy"],[1,"d-flex",2,"transition",".5s"],["mat-button","","title","Localiser l'annotation",1,"u-flex",3,"click"],["mat-button","","title","\xc9diter la zone",3,"disabled","click"],["mat-button","","title","Supprimer la zone",3,"disabled","click"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"h2",2),r.Kc(3,"Annotations"),r.Ub(),r.Ub(),r.Vb(4,"div",3),r.Ic(5,UH,1,0,"mat-spinner",4),r.Ic(6,zH,2,2,"ng-template",5),r.Vb(7,"button",6),r.cc("click",function(){return e.annotationsService.createNewAnnotation()}),r.Kc(8," Nouvelle annotation "),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(5),r.nc("ngIf",!e.annotations),r.Db(1),r.nc("ngIf",e.annotations),r.Db(1),r.nc("disabled",e.isEditingAnnotation))},directives:[ax,ut,Dl,fF,ct,Yp],encapsulation:2,data:{animation:[$r("fadeAnimation",[Qr(":enter",[Zr({opacity:0}),Gr(500,Zr({opacity:1}))]),Qr(":leave",[Zr({pointerEvents:"none",transform:"scale(1)"}),Gr(500,Zr({opacity:0,transform:"scale(0)",height:0}))])])]}}),t})();const KH=/@(.+),(.+),(.+)z(?:,(.+Z))?/;let $H=(()=>{class t extends LT{constructor(t,e,i,n,r,s){super(),this.location=t,this.titleService=e,this.historyService=i,this.mapService=n,this.mapConfigService=r,this.routeService=s}ngOnInit(){if(!this.mapService.hasBooted){const t=this.location.path().match(KH);if(t){const e=function(t,e){if(0!==e){const i=e+180;t[0]<e-180&&(t[0]+=360),t[0]>i&&(t[0]-=360)}return t}([+t[2],+t[1]],this.mapConfigService.longitudeCenter$.value);this.mapService.centerOnLonLat(e,+t[3]);const i=t[4];i&&this.historyService.setTimestamp(Math.ceil(new Date(i).getTime()/1e3))}else this.mapService.resetToDefaultView()}this.subscriptions.push(this.routeService.viewURL$.pipe(He(t=>!!t)).subscribe(t=>{this.location.replaceState(`/${t}`),this.titleService.setTitle(`${t} - ANAIS`)}))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(w),r.Pb(he),r.Pb(bI),r.Pb(pI),r.Pb(hI),r.Pb(vI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-empty-panel"]],features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2}),t})();function GH(t){return{id:t.id,name:t.name,ships:t.ships.map(t=>t.mmsi)}}function WH(t){return[["mmsi","imo","name","timestamp","lon","lat","hdms","sog","cog"].join(","),...t.map(t=>function(t){return[t.ship.mmsi,t.ship.imo,t.ship.name,HO(1e3*t.timestamp),t.lon,t.lat,Yk([t.lon,t.lat]),t.sog,t.cog]}(t).join(","))].join("\n")}var ZH=i("M39V");function qH(t,e){const i=new Blob([JSON.stringify(t,null,2)],{type:"application/json"});QH(URL.createObjectURL(i),e)}function YH(t,e,i){const n=new Blob([t],{type:i});QH(URL.createObjectURL(n),e)}function QH(t,e){const i=document.createElement("a");document.body.appendChild(i),i.type="hidden",i.href=t,i.download=e,i.target="_blank",i.click(),document.body.removeChild(i),URL.revokeObjectURL(t)}function XH(t){return Object(ue.a)(this,void 0,void 0,function*(){return new Promise(e=>{const i=new FileReader;i.addEventListener("loadend",()=>{e(i.result)}),i.readAsText(t,"utf-8")})})}const JH={0:"Under way using engine",1:"At anchor",2:"Not under command",3:"Restricted manoeuverability",4:"Constrained by her draught",5:"Moored",6:"Aground",7:"Engaged in Fishing",8:"Under way sailing",9:"Reserved for future amendment of Navigational Status for HSC",10:"Reserved for future amendment of Navigational Status for WIG",11:"Reserved for future use",12:"Reserved for future use",13:"Reserved for future use",14:"AIS-SART is active",15:"Not defined (default)"},tK=Object.values(JH).filter((t,e)=>e<9||15===e).map((t,e)=>({key:e,label:t}));function eK(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",9),r.cc("click",function(){r.Ac(t);const e=r.gc();return e.deleteItem.emit(e.ship)}),r.Vb(1,"mat-icon"),r.Kc(2,"delete"),r.Ub(),r.Ub()}}const iK=function(t){return["/ships/",t]};function nK(t,e){if(1&t&&(r.Vb(0,"button",10),r.Vb(1,"mat-icon"),r.Kc(2,"info"),r.Ub(),r.Ub()),2&t){const t=r.gc();r.nc("routerLink",r.sc(1,iK,t.ship.mmsi))}}let rK=(()=>{class t{constructor(t){this.mapService=t,this.editable=!1,this.deleteItem=new r.o,this.navigationStatusByKey=JH,this.vesselTypeLabelsByType=ED,this.hasPosition=!0}ngOnChanges(t){var e,i;t.ship&&(this.hasPosition=FD(null===(e=t.ship.currentValue)||void 0===e?void 0:e.lon)&&FD(null===(i=t.ship.currentValue)||void 0===i?void 0:i.lat))}locateShip(){this.mapService.centerOnLonLat([this.ship.lon,this.ship.lat])}locateAndZoomToShip(){this.mapService.locate([this.ship.lon,this.ship.lat])}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(pI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-fleet-ship-item"]],inputs:{ship:"ship",editable:"editable"},outputs:{deleteItem:"deleteItem"},features:[r.Bb],decls:14,vars:8,consts:[[1,"fleet-ship-item"],["mat-button","",1,"fleet-ship-item__link",3,"title","disabled","click","dblclick"],[1,"fleet-ship-item__flag",3,"mmsi"],[1,"fleet-ship-item__title"],[1,"fleet-ship-item__name"],[1,"fleet-ship-item__type"],["mat-button","",3,"click",4,"ngIf"],["mat-button","",3,"routerLink",4,"ngIf"],[1,"fleet-ship-item","ml-2","mb-2","mat-small"],["mat-button","",3,"click"],["mat-button","",3,"routerLink"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"button",1),r.cc("click",function(){return e.locateShip()})("dblclick",function(){return e.locateAndZoomToShip()}),r.Qb(2,"app-flag",2),r.Vb(3,"div",3),r.Vb(4,"strong",4),r.Kc(5),r.Ub(),r.Vb(6,"small",5),r.Kc(7),r.Ub(),r.Ub(),r.Ub(),r.Ic(8,eK,3,0,"button",6),r.Ic(9,nK,3,3,"button",7),r.Ub(),r.Vb(10,"div",8),r.Kc(11," Statut :\xa0"),r.Vb(12,"strong"),r.Kc(13),r.Ub(),r.Ub()),2&t&&(r.Db(1),r.nc("title",e.hasPosition?"Localiser le navire":"Ce navire n'a pas de position")("disabled",!e.hasPosition),r.Db(1),r.nc("mmsi",e.ship.mmsi),r.Db(3),r.Lc(e.ship.name||"?"),r.Db(2),r.Lc(e.ship.cargo?e.vesselTypeLabelsByType[e.ship.cargo]:"?"),r.Db(1),r.nc("ngIf",e.editable),r.Db(1),r.nc("ngIf",!e.editable),r.Db(4),r.Lc(e.navigationStatusByKey[e.ship.status]||"?"))},directives:[Dl,GF,ut,Yp,ow],styles:[".fleet-ship-item[_ngcontent-%COMP%], .fleet-ship-item__button-content[_ngcontent-%COMP%]{display:flex}.fleet-ship-item__link[_ngcontent-%COMP%]{flex:1;padding:0;line-height:inherit;text-align:inherit;font-size:inherit;font-weight:inherit}.fleet-ship-item__link[_ngcontent-%COMP%] .mat-button-wrapper{display:flex}.fleet-ship-item__flag[_ngcontent-%COMP%]{margin:5px}.fleet-ship-item__title[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:5px 0;flex:1}.fleet-ship-item__name[_ngcontent-%COMP%]{font-size:1.2em}.fleet-ship-item__type[_ngcontent-%COMP%]{font-size:.9em;color:#555}"],changeDetection:0}),t})();function sK(t,e){1&t&&r.Qb(0,"mat-spinner",5)}function oK(t,e){1&t&&(r.Vb(0,"mat-error",22),r.Kc(1," Ce champ ne peut \xeatre vide. "),r.Ub())}function aK(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-form-field",16),r.Vb(1,"input",17,18),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).fleet.name=e}),r.Ub(),r.Ic(3,oK,2,0,"mat-error",19),r.Ub(),r.Vb(4,"button",20),r.Vb(5,"mat-icon"),r.Kc(6,"check"),r.Ub(),r.Ub(),r.Vb(7,"button",21),r.Vb(8,"mat-icon"),r.Kc(9,"clear"),r.Ub(),r.Ub()}if(2&t){const t=r.wc(2);r.gc();const e=r.wc(1),i=r.gc();r.Db(1),r.nc("ngModel",i.fleet.name),r.Db(2),r.nc("ngIf",null==t.errors?null:t.errors.required),r.Db(1),r.nc("app-async-action",i.saveFleet)("disabled",!e.form.valid),r.Db(3),r.nc("routerLink",i.newFleet?"/fleets":"/fleets/"+i.fleet.id)}}function lK(t,e){if(1&t){const t=r.Wb();r.Vb(0,"h2",23),r.Kc(1),r.Ub(),r.Vb(2,"button",24),r.Vb(3,"mat-icon"),r.Kc(4,"create"),r.Ub(),r.Ub(),r.Vb(5,"button",25),r.Vb(6,"mat-icon"),r.Kc(7,"more_vert"),r.Ub(),r.Ub(),r.Vb(8,"mat-menu",null,26),r.Vb(10,"button",27),r.cc("click",function(){return r.Ac(t),r.gc(2).exportFleet()}),r.Vb(11,"mat-icon"),r.Kc(12,"cloud_download"),r.Ub(),r.Vb(13,"span"),r.Kc(14,"Exporter la flotte"),r.Ub(),r.Ub(),r.Vb(15,"button",28),r.cc("click",function(){return r.Ac(t),r.gc(2).deleteFleet()}),r.Vb(16,"mat-icon",29),r.Kc(17,"delete"),r.Ub(),r.Vb(18,"span",29),r.Kc(19,"Supprimer"),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=r.wc(9),e=r.gc(2);r.Db(1),r.Mc(" ",e.fleet.name," "),r.Db(1),r.nc("routerLink","/fleets/"+e.fleet.id+"/edit"),r.Db(3),r.nc("matMenuTriggerFor",t)}}function cK(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",30),r.Vb(1,"button",31),r.cc("click",function(){return r.Ac(t),r.gc(2).fitOnFleet()}),r.Vb(2,"mat-icon"),r.Kc(3,"center_focus_strong"),r.Ub(),r.Ub(),r.Vb(4,"button",32),r.cc("click",function(){return r.Ac(t),r.gc(2).mapConfigService.toggleTrailsLayer()}),r.Vb(5,"mat-icon"),r.Kc(6,"gesture"),r.Ub(),r.Ub(),r.Vb(7,"button",32),r.cc("click",function(){return r.Ac(t),r.gc(2).mapConfigService.toggleDetailedShipTraces()}),r.Qb(8,"mat-icon",33),r.Ub(),r.Vb(9,"button",32),r.cc("click",function(){return r.Ac(t),r.gc(2).mapConfigService.toggleFleetShipsOnly()}),r.Vb(10,"mat-icon"),r.Kc(11,"directions_boat"),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=r.gc(2);r.Db(4),r.Hb("button-active",t.mapConfigService.showTrailsLayer$.value),r.pc("title","",t.mapConfigService.showTrailsLayer$.value?"Masquer":"Afficher"," les traces des navires"),r.Db(3),r.nc("title",t.mapConfigService.detailedShipTraces$.value?"Les traces d\xe9taill\xe9es sont affich\xe9es. Cliquer pour afficher les traces simplifi\xe9es.":"Les traces simplifi\xe9es sont affich\xe9es. Cliquer pour afficher les traces d\xe9taill\xe9es (Note: ~10x plus de donn\xe9es \xe0 t\xe9l\xe9charger)"),r.Db(1),r.nc("svgIcon",t.mapConfigService.detailedShipTraces$.value?"trail-detailed":"trail-simple"),r.Db(1),r.Hb("button-active",!t.mapConfigService.showFleetShipsOnly$.value),r.pc("title","",t.mapConfigService.showFleetShipsOnly$.value?"Afficher":"Masquer"," les autres navires")}}function hK(t,e){1&t&&(r.Vb(0,"p",34),r.Kc(1,"Aucun navire n'a \xe9t\xe9 configur\xe9"),r.Ub())}function uK(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-fleet-ship-item",35),r.cc("deleteItem",function(e){return r.Ac(t),r.gc(2).deleteShip(e)}),r.Ub()}if(2&t){const t=e.$implicit,i=r.gc(2);r.nc("ship",t)("editable",i.editMode)}}function dK(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",34),r.Vb(1,"app-ship-identifier-input",36),r.cc("selectItem",function(e){return r.Ac(t),r.gc(2).addShipToFleet(e)}),r.Ub(),r.Ub()}if(2&t){const t=r.gc(2);r.Db(1),r.nc("existingItems",t.fleetShipsIds)}}function pK(t,e){if(1&t&&(r.Vb(0,"div",40),r.Vb(1,"div",41),r.Vb(2,"mat-icon",42),r.Kc(3,"warning"),r.Ub(),r.Kc(4),r.Ub(),r.Vb(5,"div"),r.Kc(6),r.Ub(),r.Ub()),2&t){const t=e.alert;r.Db(4),r.Mc(" ",t.rule_name," "),r.Db(2),r.Lc(t.ship_name)}}const fK=function(t){return["/ships/",t]},mK=function(t){return["/alerts/rules/",t]};function gK(t,e){if(1&t&&(r.Vb(0,"button",43),r.Vb(1,"mat-icon"),r.Kc(2,"info"),r.Ub(),r.Kc(3," Voir d\xe9tail Navire "),r.Ub(),r.Vb(4,"button",43),r.Vb(5,"mat-icon"),r.Kc(6,"info"),r.Ub(),r.Kc(7," Voir la r\xe8gle "),r.Ub()),2&t){const t=e.alert;r.nc("routerLink",r.sc(2,fK,t.mmsi)),r.Db(4),r.nc("routerLink",r.sc(4,mK,t.rule_id))}}function AK(t,e){if(1&t&&(r.Vb(0,"h3",13),r.Kc(1,"Alertes"),r.Ub(),r.Qb(2,"app-alerts-list",37),r.Ic(3,pK,7,2,"ng-template",null,38,r.Jc),r.Ic(5,gK,8,6,"ng-template",null,39,r.Jc)),2&t){const t=r.wc(4),e=r.wc(6),i=r.gc(2);r.Db(2),r.nc("alerts$",i.alerts$)("alertTitleRef",t)("alertMenuItemsRef",e)}}function bK(t,e){if(1&t){const t=r.Wb();r.Vb(0,"ng-form",6,7),r.Vb(2,"div",8),r.Ic(3,aK,10,5,"ng-template",4),r.Ic(4,lK,20,3,"ng-template",4),r.Ub(),r.Qb(5,"mat-divider"),r.Ic(6,cK,12,8,"div",9),r.Vb(7,"app-glitter",10),r.Vb(8,"button",11),r.cc("click",function(){return r.Ac(t),r.gc().exportShipsPositions()}),r.Kc(9," Exporter les traces "),r.Ub(),r.Ub(),r.Vb(10,"div",12),r.Vb(11,"h3",13),r.Kc(12,"Navires"),r.Ub(),r.Ic(13,hK,2,0,"p",14),r.Ic(14,uK,1,2,"app-fleet-ship-item",15),r.Ic(15,dK,2,1,"div",14),r.Ic(16,AK,7,3,"ng-template",4),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.Db(3),r.nc("ngIf",t.editMode),r.Db(1),r.nc("ngIf",!t.editMode),r.Db(2),r.nc("ngIf",!t.editMode),r.Db(7),r.nc("ngIf",0===t.fleet.ships.length),r.Db(1),r.nc("ngForOf",t.fleet.ships),r.Db(1),r.nc("ngIf",t.editMode),r.Db(1),r.nc("ngIf",!t.editMode)}}let vK=(()=>{class t extends LT{constructor(t,e,i,n,r,s,o,a,l,c){super(),this.activatedRoute=t,this.router=e,this.titleService=i,this.configService=n,this.fleetsService=r,this.interactionsService=s,this.mapService=o,this.mapConfigService=a,this.timeRangeService=l,this.uiService=c,this.timeRangeSubscription=new ye.a,this.componentDestroyed=!1,this.alerts$=new Av.a([]),this.editMode=!1,this.newFleet=!1,this.saveFleet=()=>Object(ue.a)(this,void 0,void 0,function*(){const t=GH(this.fleet);if(this.newFleet){const e=yield this.fleetsService.createFleet(t);yield this.router.navigateByUrl(`/fleets/${e}`)}else yield this.fleetsService.updateFleet(t),yield this.router.navigateByUrl(`/fleets/${this.fleet.id}`)}),this.exportShipsPositions=()=>Object(ue.a)(this,void 0,void 0,function*(){const t=this.timeRangeService.timeRange$.value,e=FO(1e3*t.start,"yyyy-MM-dd'T'HH-mm-ss"),i=FO(1e3*t.end,"yyyy-MM-dd'T'HH-mm-ss");YH(WH(this.fleetsService.fleetTrails$.value.reduce((t,e)=>t.concat(e),[])),`anais-traces-${this.fleet.name}-${e}-${i}.csv`,"text/csv")})}ngOnInit(){this.globalTimeRange=this.timeRangeService.timeRange$.value,this.timeRangeService.updateTimeRange(iI.last_day),this.subscriptions.push(this.activatedRoute.data.subscribe(t=>{this.editMode=!!t.edit,this.newFleet=!!t.new})),this.mapService.hasBooted||this.mapService.resetToDefaultView(),this.subscriptions.push(this.activatedRoute.paramMap.subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){this.newFleet?(this.fleet={name:"",ships:[]},this.titleService.setTitle("Nouvelle flotte - ANAIS")):(this.fleetId=t.get("fleetId"),yield this.fetchFleet())})))}ngOnDestroy(){super.ngOnDestroy(),this.componentDestroyed=!0,this.fleetsService.deselectFleet(),this.timeRangeSubscription.unsubscribe(),this.timeRangeService.timeRange$.next(this.globalTimeRange.refresh())}get fleetShipsIds(){return this.fleet.ships.map(t=>t.mmsi)}fetchFleet(){return Object(ue.a)(this,void 0,void 0,function*(){try{this.timeRangeSubscription.unsubscribe();const{fleet:t,alerts:e}=yield this.fleetsService.selectFleet(this.fleetId);if(this.componentDestroyed)return;this.fleet=t,this.alerts$.next(e),this.titleService.setTitle(`Flotte ${this.fleet.name} - ANAIS`),this.timeRangeSubscription=this.timeRangeService.timeRange$.pipe(Gg(1)).subscribe(()=>Object(ue.a)(this,void 0,void 0,function*(){this.fleet&&!this.editMode&&(yield this.fetchFleet())}))}catch(t){if(t.notfound)throw this.router.navigateByUrl("/fleets").catch(()=>{}),new Error(`La flotte <${this.fleetId}> n'existe pas.`);throw t}})}deleteFleet(){this.uiService.confirm({title:"Suppression",message:"Une fois supprim\xe9e, cette flotte ne sera plus accessible. Confirmez-vous la suppression de cette flotte ?",action:t=>Object(ue.a)(this,void 0,void 0,function*(){t&&(yield this.fleetsService.deleteFleet(this.fleet.id),yield this.router.navigateByUrl("/fleets"))})})}exportFleet(){const t=GH(this.fleet);delete t.id;const e=(new Date).toISOString().substr(0,19).replace(/:/g,"-");qH(t,`ANAIS-flotte-${this.fleet.name}-${e}.json`)}addShipToFleet(t){t&&this.fleet.ships.push(t)}deleteShip(t){this.fleet.ships=this.fleet.ships.filter(e=>e!==t)}fitOnFleet(){if(this.fleet.ships.length>0){const{lon:t,lat:e}=this.fleet.ships[0],i=qD.New(t,e,t,e);this.fleet.ships.filter(t=>FD(t.lon)&&FD(t.lat)).forEach(t=>{i.addPoint(t.lon,t.lat)}),this.mapService.fitOn(i.toExtent())}}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(N_),r.Pb(sw),r.Pb(he),r.Pb(cI),r.Pb(OT),r.Pb(ET),r.Pb(pI),r.Pb(hI),r.Pb(yT),r.Pb(VI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-fleet-panel"]],features:[r.Ab],decls:8,vars:2,consts:[[1,"panel"],[1,"d-flex",2,"background-color","#fff"],["mat-button","","title","Revenir \xe0 la liste","routerLink","/fleets",1,"back-button"],["class","spinner","strokeWidth","4","diameter","80",4,"ngIf"],[3,"ngIf"],["strokeWidth","4","diameter","80",1,"spinner"],["name","form",1,"d-flex-column","unscrollable"],["form","ngForm"],[1,"panel__header","panel__header--blue"],["class","d-flex",4,"ngIf"],["gid","export-trace-fleet","date","2020-12-14"],["mat-button","","title","Exporter les traces au format CSV",1,"d-block",3,"click"],[1,"scrollable"],[1,"panel__subtitle"],["class","panel__content",4,"ngIf"],[3,"ship","editable","deleteItem",4,"ngFor","ngForOf"],[1,"fleet-panel__name-input"],["matInput","","name","name","placeholder","Nom de la flotte","required","","maxlength","64",3,"ngModel","ngModelChange"],["name","ngModel"],["class","input-error",4,"ngIf"],["mat-button","","color","primary","title","Enregistrer les changements","data-test","save-fleet",3,"app-async-action","disabled"],["mat-button","","title","Annuler l'\xe9dition",3,"routerLink"],[1,"input-error"],[1,"panel__title","u-flex"],["mat-button","","title","Modifier",3,"routerLink"],["mat-button","","title","Autres actions",3,"matMenuTriggerFor"],["menu","matMenu"],["mat-menu-item","","title","Exporter la flotte au format JSON",3,"click"],["mat-menu-item","","title","Supprimer la flotte",3,"click"],["color","warn"],[1,"d-flex"],["mat-button","","title","Centrer sur la flotte",1,"d-block",3,"click"],["mat-button","",1,"d-block",3,"title","click"],[3,"svgIcon"],[1,"panel__content"],[3,"ship","editable","deleteItem"],[3,"existingItems","selectItem"],[3,"alerts$","alertTitleRef","alertMenuItemsRef"],["alertTitleRef",""],["alertMenuItemsRef",""],[1,"fleet-panel__alert-item"],[1,"d-flex-center"],[1,"rule-name-icon"],["mat-menu-item","",3,"routerLink"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"a",2),r.Vb(3,"mat-icon"),r.Kc(4,"arrow_back_ios"),r.Ub(),r.Kc(5," Flottes "),r.Ub(),r.Ub(),r.Ic(6,sK,1,0,"mat-spinner",3),r.Ic(7,bK,17,7,"ng-template",4),r.Ub()),2&t&&(r.Db(6),r.nc("ngIf",!e.fleet),r.Db(1),r.nc("ngIf",e.fleet))},directives:[Il,aw,Yp,ut,fF,oh,GT,DL,Dl,ct,_u,Ou,ac,Ih,Th,Vc,uh,dR,ow,nu,sU,eU,QL,rK,WN,Nj],styles:[".back-button[_ngcontent-%COMP%]{line-height:36px}.fleet-panel__name-input[_ngcontent-%COMP%]{margin:.5em;flex:1;font-size:20px}.rule-name-icon[_ngcontent-%COMP%]{font-size:20px;height:20px;width:20px;margin-right:.3em}"]}),t})();function _K(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",4),r.Vb(1,"mat-form-field",13),r.Vb(2,"mat-label"),r.Kc(3,"Nom"),r.Ub(),r.Vb(4,"input",14),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc().$implicit.newName=e}),r.Ub(),r.Ub(),r.Ub(),r.Vb(5,"div",5),r.Vb(6,"button",15),r.cc("click",function(){r.Ac(t);const e=r.gc().$implicit;return r.gc().applyRenaming(e)}),r.Vb(7,"mat-icon"),r.Kc(8,"done"),r.Ub(),r.Kc(9," Valider "),r.Ub(),r.Vb(10,"button",16),r.cc("click",function(){r.Ac(t);const e=r.gc().$implicit;return r.gc().cancelRenaming(e)}),r.Vb(11,"mat-icon"),r.Kc(12,"clear"),r.Ub(),r.Kc(13," Annuler "),r.Ub(),r.Ub()}if(2&t){const t=r.gc(),e=t.$implicit,i=t.index,n=r.gc();r.Db(4),r.nc("ngModel",e.newName),r.Db(2),r.nc("disabled",n.isFleetNameTaken(e.newName,i))}}function yK(t,e){if(1&t&&(r.Vb(0,"mat-icon"),r.Kc(1,"arrow_right_alt"),r.Ub(),r.Kc(2)),2&t){const t=r.gc(2).$implicit;r.Db(2),r.Mc(" ",t.newName," ")}}function wK(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",4),r.Kc(1),r.Ic(2,yK,3,1,"ng-template",12),r.Ub(),r.Vb(3,"div",5),r.Vb(4,"button",17),r.cc("click",function(){r.Ac(t);const e=r.gc().$implicit,i=r.gc();return i.toggleResolution(e,i.ConflictResolution.Update)}),r.Vb(5,"mat-icon"),r.Kc(6,"update"),r.Ub(),r.Kc(7," Mettre \xe0 jour "),r.Ub(),r.Vb(8,"button",18),r.cc("click",function(){r.Ac(t);const e=r.gc().$implicit;return r.gc().openRenamingForm(e)}),r.Vb(9,"mat-icon"),r.Kc(10,"edit"),r.Ub(),r.Kc(11," Renommer "),r.Ub(),r.Ub()}if(2&t){const t=r.gc().$implicit,e=r.gc();r.Db(1),r.Mc(" ",t.fleet.name," "),r.Db(1),r.nc("ngIf",t.newName),r.Db(2),r.Hb("pressed-button",t.resolution===e.ConflictResolution.Update),r.Db(4),r.Hb("pressed-button",t.resolution===e.ConflictResolution.Rename)}}function xK(t,e){if(1&t&&(r.Vb(0,"div",11),r.Ic(1,_K,14,2,"ng-template",12),r.Ic(2,wK,12,6,"ng-template",12),r.Ub()),2&t){const t=e.$implicit;r.Db(1),r.nc("ngIf",t.renaming),r.Db(1),r.nc("ngIf",!t.renaming)}}var CK=function(t){return t.Rename="rename",t.Update="update",t}({});let SK=(()=>{class t{constructor(t){this.data=t,this.ConflictResolution=CK,this.displayedColumns=["name","action"]}ngOnInit(){this.conflicts=this.data.fleets.map(t=>({fleet:t,resolution:null,renaming:!1,newName:""})),this.fleetNames=this.data.fleetNames}toggleResolution(t,e){t.resolution=e,t.resolution===CK.Update&&(t.newName="")}isFormValid(){return this.conflicts.every(t=>null!==t.resolution)}openRenamingForm(t){t.resolution=null,t.renaming=!0,t.newName=t.fleet.name}cancelRenaming(t){t.renaming=!1,t.newName=""}applyRenaming(t){t.renaming=!1,t.resolution=CK.Rename}isFleetNameTaken(t,e){return this.fleetNames.includes(t)||this.conflicts.filter((t,i)=>i!==e).some(e=>e.newName===t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(jl))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-import-fleet-dialog"]],decls:18,vars:4,consts:[["mat-dialog-title",""],["mat-dialog-content","",2,"min-width","600px"],[1,"d-flex-column-center"],[1,"d-flex","mb-2"],[1,"column-name"],[1,"column-resolution"],["class","d-flex-center mt-2",4,"ngFor","ngForOf"],["mat-dialog-actions",""],[1,"u-flex"],["mat-button","","color","primary",3,"disabled","mat-dialog-close"],["mat-button","",3,"mat-dialog-close"],[1,"d-flex-center","mt-2"],[3,"ngIf"],[1,"mr-3"],["matInput","","placeholder","Ma flotte","required","",3,"ngModel","ngModelChange"],["mat-raised-button","","color","primary",1,"mx-2",3,"disabled","click"],["mat-button","",1,"mx-2",3,"click"],["mat-stroked-button","","title","Mettre \xe0 jour",1,"mx-2",3,"click"],["mat-stroked-button","","title","Renommer",1,"mx-2",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"h1",0),r.Kc(1,"Mise \xe0 jour des flottes"),r.Ub(),r.Vb(2,"div",1),r.Vb(3,"p"),r.Kc(4,"Certaines flottes que vous voulez importer existent d\xe9j\xe0. Vous devez choisir entre mettre \xe0 jour les flottes existantes et les remplacer, ou bien renommer les nouvelles flottes."),r.Ub(),r.Vb(5,"div",2),r.Vb(6,"div",3),r.Vb(7,"div",4),r.Kc(8," Nom de flotte "),r.Ub(),r.Vb(9,"div",5),r.Kc(10," Action "),r.Ub(),r.Ub(),r.Ic(11,xK,3,2,"div",6),r.Ub(),r.Ub(),r.Vb(12,"div",7),r.Qb(13,"div",8),r.Vb(14,"button",9),r.Kc(15," Importer "),r.Ub(),r.Vb(16,"button",10),r.Kc(17," Annuler "),r.Ub(),r.Ub()),2&t&&(r.Db(11),r.nc("ngForOf",e.conflicts),r.Db(3),r.nc("disabled",!e.isFormValid())("mat-dialog-close",e.conflicts),r.Db(2),r.nc("mat-dialog-close",null))},directives:[ql,Yl,ct,Ql,Dl,Zl,ut,_u,cu,Ou,ac,Ih,Vc,uh,Yp],styles:[".pressed-button[_ngcontent-%COMP%]{background-color:#94cba5}.column-name[_ngcontent-%COMP%]{min-width:200px;display:inline-flex;align-items:center}.column-resolution[_ngcontent-%COMP%]{min-width:300px;text-align:center}"]}),t})();const kK=["importFileInput"];function EK(t,e){1&t&&r.Qb(0,"mat-spinner",9)}function DK(t,e){1&t&&(r.Vb(0,"p",11),r.Kc(1,"Aucune flotte n'a \xe9t\xe9 configur\xe9e."),r.Ub())}function IK(t,e){if(1&t&&(r.Vb(0,"button",14),r.Kc(1),r.Vb(2,"em"),r.Kc(3),r.Ub(),r.Ub()),2&t){const t=e.$implicit;r.pc("routerLink","/fleets/",t.id,""),r.Db(1),r.Mc(" ",t.name," "),r.Db(2),r.Nc("(",t.ships.length," navire",t.ships.length>1?"s":"",")")}}function PK(t,e){if(1&t&&(r.Vb(0,"div",12),r.Ic(1,IK,4,4,"button",13),r.Ub()),2&t){const t=r.gc(2);r.Db(1),r.nc("ngForOf",t.fleets)}}function OK(t,e){if(1&t&&(r.Ic(0,DK,2,0,"p",10),r.Ic(1,PK,2,1,"ng-template",8)),2&t){const t=r.gc();r.nc("ngIf",0===t.fleets.length),r.Db(1),r.nc("ngIf",t.fleets.length>0)}}let MK=(()=>{class t extends LT{constructor(t,e,i,n,r){super(),this.titleService=t,this.dialog=e,this.fleetsService=i,this.mapService=n,this.uiService=r}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.titleService.setTitle("Liste des flottes - ANAIS"),this.mapService.hasBooted||this.mapService.resetToDefaultView(),this.fleets=yield this.fleetsService.refreshFleets()})}triggerImportFleetDialog(){this.importFileInput.nativeElement.click()}onFilesChange(t){return Object(ue.a)(this,void 0,void 0,function*(){const e=t.target.files||t.dataTransfer.files;e.length&&((yield Promise.all(Array.from(e).map(t=>Object(ue.a)(this,void 0,void 0,function*(){try{const e=JSON.parse(yield XH(t));if("string"==typeof e.name&&e.ships instanceof Array&&e.ships.every(t=>"string"==typeof t))return e;throw new Error("Structure JSON incorrecte")}catch(e){throw new Error(`Import du fichier \`${t.name}\` \xe9chou\xe9: ${e.message}`)}}))).then(t=>Object(ue.a)(this,void 0,void 0,function*(){const e=this.fleets.map(t=>t.name),i=t.filter(t=>e.includes(t.name)),n=t.filter(t=>!i.includes(t)),r=[];if(i.length>0){const t=yield this.openImportFleetDialog(i,e);if(null==t)return!0;t.forEach(t=>{t.resolution===CK.Update?(t.fleet.id=this.fleets.find(e=>e.name===t.fleet.name).id,r.push(t.fleet)):t.resolution===CK.Rename&&(t.fleet.name=t.newName,n.push(t.fleet))})}yield Promise.all([...n.map(t=>Object(ue.a)(this,void 0,void 0,function*(){yield this.fleetsService.createFleet(t)})),...r.map(t=>Object(ue.a)(this,void 0,void 0,function*(){yield this.fleetsService.updateFleet(t)}))])})))||(this.fleets=yield this.fleetsService.refreshFleets(),this.uiService.success("Les flottes ont \xe9t\xe9 import\xe9es"),t.target.value=""))})}openImportFleetDialog(t,e){return Object(ue.a)(this,void 0,void 0,function*(){return new Promise(i=>{this.dialogRef=this.dialog.open(SK,{data:{fleets:t,fleetNames:e},autoFocus:!1,closeOnNavigation:!0}),this.dialogRef.afterClosed().subscribe(t=>{i(t)})})})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(he),r.Pb(Gl),r.Pb(OT),r.Pb(pI),r.Pb(VI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-fleets-panel"]],viewQuery:function(t,e){if(1&t&&r.Pc(kK,3),2&t){let t;r.vc(t=r.dc())&&(e.importFileInput=t.first)}},features:[r.Ab],decls:12,vars:2,consts:[["joyrideStep","fleets-panel","title","Flottes de navires","text","C'est ici que vous pouvez cr\xe9er et suivre vos flottes de navires.",1,"panel"],[1,"panel__header","panel__header--blue"],[1,"panel__title","u-flex"],["mat-button","","color","primary","title","Cr\xe9er une flotte","joyrideStep","create-fleet-button","text","Ce bouton permet de cr\xe9er une flotte de navires.","routerLink","/fleets/new"],["type","file","accept","application/json","multiple","","hidden","",3,"change"],["importFileInput",""],["mat-button","","title","Importer une flotte","joyrideStep","import-fleet-button","text","Ce bouton permet d'importer un fichier export\xe9 depuis une flotte ANAIS existante (JSON dans les t\xe9l\xe9chargements). L'export sert \xe0 partager des flottes entre plusieurs comptes par simple transfert et import du fichier. Ce fichier peut aussi \xeatre exploit\xe9 en dehors d'ANAIS.",3,"click"],["class","spinner","strokeWidth","4","diameter","80",4,"ngIf"],[3,"ngIf"],["strokeWidth","4","diameter","80",1,"spinner"],["class","panel__content",4,"ngIf"],[1,"panel__content"],[1,"d-flex-column","scrollable"],["mat-button","",3,"routerLink",4,"ngFor","ngForOf"],["mat-button","",3,"routerLink"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"h2",2),r.Kc(3,"Flottes"),r.Ub(),r.Ub(),r.Vb(4,"button",3),r.Kc(5,"Nouvelle flotte"),r.Ub(),r.Vb(6,"input",4,5),r.cc("change",function(t){return e.onFilesChange(t)}),r.Ub(),r.Vb(8,"button",6),r.cc("click",function(){return e.triggerImportFleetDialog()}),r.Kc(9,"Importer"),r.Ub(),r.Ic(10,EK,1,0,"mat-spinner",7),r.Ic(11,OK,2,2,"ng-template",8),r.Ub()),2&t&&(r.Db(10),r.nc("ngIf",!e.fleets),r.Db(1),r.nc("ngIf",e.fleets))},directives:[ax,Dl,ow,ut,fF,ct],styles:[""]}),t})(),TK=(()=>{class t extends LT{constructor(t,e,i,n,r){super(),this.titleService=t,this.historyService=e,this.mapService=i,this.playbackService=n,this.selectionService=r}ngOnInit(){this.titleService.setTitle("Rejeu de situation - ANAIS"),this.mapService.hasBooted||this.mapService.resetToDefaultView(),this.historyService.resetTimestamp(),this.selectionService.clear(),setTimeout(()=>{this.playbackService.enterPlaybackMode()})}ngOnDestroy(){this.playbackService.exitPlaybackMode()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(he),r.Pb(bI),r.Pb(pI),r.Pb(tM),r.Pb(xT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-playback-loader"]],features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2}),t})(),RK=(()=>{class t{constructor(t,e,i){this.mapConfigService=t,this.mapService=e,this.uiService=i,this.isSelectingArea$=new Av.a(!1),this.isSelectingArea$.pipe(Gg(1)).subscribe(t=>{this.uiService.setDrawingMode(t)})}startSelectingArea(){this.isSelectingArea$.next(!0)}cancelSelectingArea(){this.isSelectingArea$.next(!1)}finishSelectingArea(){this.mapConfigService.updateRestrictedAreas(qD.fromOLExtent(this.mapService.view$.value.extent).toLatLonExtent()),this.cancelSelectingArea()}removeArea(){this.mapConfigService.updateRestrictedAreas(null)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(hI),r.Zb(pI),r.Zb(VI))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const VK=["sliderWrapper"],FK=Ai({passive:!1}),LK={provide:rc,useExisting:Object(r.W)(()=>jK),multi:!0};class UK{}class BK{constructor(t){this._elementRef=t}}const NK=Ia(Ea(ka(BK),"accent"));let jK=(()=>{class t extends NK{constructor(t,e,i,n,s,o,a,l){super(t),this._focusMonitor=e,this._changeDetectorRef=i,this._dir=n,this._ngZone=o,this._animationMode=l,this._invert=!1,this._max=100,this._min=0,this._step=1,this._thumbLabel=!1,this._tickInterval=0,this._value=null,this._vertical=!1,this.change=new r.o,this.input=new r.o,this.valueChange=new r.o,this.onTouched=()=>{},this._percent=0,this._isSliding=!1,this._isActive=!1,this._tickIntervalPercent=0,this._sliderDimensions=null,this._controlValueAccessorChangeFn=()=>{},this._dirChangeSubscription=ye.a.EMPTY,this._pointerDown=t=>{this.disabled||this._isSliding||!zK(t)&&0!==t.button||this._ngZone.run(()=>{const e=this.value,i=HK(t);this._isSliding=!0,this._lastPointerEvent=t,t.preventDefault(),this._focusHostElement(),this._onMouseenter(),this._bindGlobalEvents(t),this._focusHostElement(),this._updateValueFromPosition(i),this._valueOnSlideStart=e,e!=this.value&&this._emitInputEvent()})},this._pointerMove=t=>{if(this._isSliding){t.preventDefault();const e=this.value;this._lastPointerEvent=t,this._updateValueFromPosition(HK(t)),e!=this.value&&this._emitInputEvent()}},this._pointerUp=t=>{this._isSliding&&(t.preventDefault(),this._removeGlobalEvents(),this._isSliding=!1,this._valueOnSlideStart==this.value||this.disabled||this._emitChangeEvent(),this._valueOnSlideStart=this._lastPointerEvent=null)},this._windowBlur=()=>{this._lastPointerEvent&&this._pointerUp(this._lastPointerEvent)},this._document=a,this.tabIndex=parseInt(s)||0,o.runOutsideAngular(()=>{const e=t.nativeElement;e.addEventListener("mousedown",this._pointerDown,FK),e.addEventListener("touchstart",this._pointerDown,FK)})}get invert(){return this._invert}set invert(t){this._invert=ti(t)}get max(){return this._max}set max(t){this._max=ei(t,this._max),this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}get min(){return this._min}set min(t){this._min=ei(t,this._min),null===this._value&&(this.value=this._min),this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}get step(){return this._step}set step(t){this._step=ei(t,this._step),this._step%1!=0&&(this._roundToDecimal=this._step.toString().split(".").pop().length),this._changeDetectorRef.markForCheck()}get thumbLabel(){return this._thumbLabel}set thumbLabel(t){this._thumbLabel=ti(t)}get tickInterval(){return this._tickInterval}set tickInterval(t){this._tickInterval="auto"===t?"auto":"number"==typeof t||"string"==typeof t?ei(t,this._tickInterval):0}get value(){return null===this._value&&(this.value=this._min),this._value}set value(t){if(t!==this._value){let e=ei(t);this._roundToDecimal&&e!==this.min&&e!==this.max&&(e=parseFloat(e.toFixed(this._roundToDecimal))),this._value=e,this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}}get vertical(){return this._vertical}set vertical(t){this._vertical=ti(t)}get displayValue(){return this.displayWith?this.displayWith(this.value):this._roundToDecimal&&this.value&&this.value%1!=0?this.value.toFixed(this._roundToDecimal):this.value||0}focus(t){this._focusHostElement(t)}blur(){this._blurHostElement()}get percent(){return this._clamp(this._percent)}_shouldInvertAxis(){return this.vertical?!this.invert:this.invert}_isMinValue(){return 0===this.percent}_getThumbGap(){return this.disabled?7:this._isMinValue()&&!this.thumbLabel?this._isActive?10:7:0}_getTrackBackgroundStyles(){const t=this.vertical?`1, ${1-this.percent}, 1`:1-this.percent+", 1, 1";return{transform:`translate${this.vertical?"Y":"X"}(${this._shouldInvertMouseCoords()?"-":""}${this._getThumbGap()}px) scale3d(${t})`}}_getTrackFillStyles(){const t=this.percent,e=this.vertical?`1, ${t}, 1`:`${t}, 1, 1`;return{transform:`translate${this.vertical?"Y":"X"}(${this._shouldInvertMouseCoords()?"":"-"}${this._getThumbGap()}px) scale3d(${e})`,display:0===t?"none":""}}_getTicksContainerStyles(){return{transform:`translate${this.vertical?"Y":"X"}(${this.vertical||"rtl"!=this._getDirection()?"-":""}${this._tickIntervalPercent/2*100}%)`}}_getTicksStyles(){let t=100*this._tickIntervalPercent,e={backgroundSize:this.vertical?`2px ${t}%`:`${t}% 2px`,transform:`translateZ(0) translate${this.vertical?"Y":"X"}(${this.vertical||"rtl"!=this._getDirection()?"":"-"}${t/2}%)${this.vertical||"rtl"!=this._getDirection()?"":" rotate(180deg)"}`};if(this._isMinValue()&&this._getThumbGap()){const t=this._shouldInvertAxis();let i;i=this.vertical?t?"Bottom":"Top":t?"Right":"Left",e[`padding${i}`]=`${this._getThumbGap()}px`}return e}_getThumbContainerStyles(){const t=this._shouldInvertAxis();return{transform:`translate${this.vertical?"Y":"X"}(-${100*(("rtl"!=this._getDirection()||this.vertical?t:!t)?this.percent:1-this.percent)}%)`}}_shouldInvertMouseCoords(){const t=this._shouldInvertAxis();return"rtl"!=this._getDirection()||this.vertical?t:!t}_getDirection(){return this._dir&&"rtl"==this._dir.value?"rtl":"ltr"}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{this._isActive=!!t&&"keyboard"!==t,this._changeDetectorRef.detectChanges()}),this._dir&&(this._dirChangeSubscription=this._dir.change.subscribe(()=>{this._changeDetectorRef.markForCheck()}))}ngOnDestroy(){const t=this._elementRef.nativeElement;t.removeEventListener("mousedown",this._pointerDown,FK),t.removeEventListener("touchstart",this._pointerDown,FK),this._lastPointerEvent=null,this._removeGlobalEvents(),this._focusMonitor.stopMonitoring(this._elementRef),this._dirChangeSubscription.unsubscribe()}_onMouseenter(){this.disabled||(this._sliderDimensions=this._getSliderDimensions(),this._updateTickIntervalPercent())}_onFocus(){this._sliderDimensions=this._getSliderDimensions(),this._updateTickIntervalPercent()}_onBlur(){this.onTouched()}_onKeydown(t){if(this.disabled||ke(t))return;const e=this.value;switch(t.keyCode){case 33:this._increment(10);break;case 34:this._increment(-10);break;case 35:this.value=this.max;break;case 36:this.value=this.min;break;case 37:this._increment("rtl"==this._getDirection()?1:-1);break;case 38:this._increment(1);break;case 39:this._increment("rtl"==this._getDirection()?-1:1);break;case 40:this._increment(-1);break;default:return}e!=this.value&&(this._emitInputEvent(),this._emitChangeEvent()),this._isSliding=!0,t.preventDefault()}_onKeyup(){this._isSliding=!1}_getWindow(){return this._document.defaultView||window}_bindGlobalEvents(t){const e=this._document,i=zK(t),n=i?"touchend":"mouseup";e.addEventListener(i?"touchmove":"mousemove",this._pointerMove,FK),e.addEventListener(n,this._pointerUp,FK),i&&e.addEventListener("touchcancel",this._pointerUp,FK);const r=this._getWindow();void 0!==r&&r&&r.addEventListener("blur",this._windowBlur)}_removeGlobalEvents(){const t=this._document;t.removeEventListener("mousemove",this._pointerMove,FK),t.removeEventListener("mouseup",this._pointerUp,FK),t.removeEventListener("touchmove",this._pointerMove,FK),t.removeEventListener("touchend",this._pointerUp,FK),t.removeEventListener("touchcancel",this._pointerUp,FK);const e=this._getWindow();void 0!==e&&e&&e.removeEventListener("blur",this._windowBlur)}_increment(t){this.value=this._clamp((this.value||0)+this.step*t,this.min,this.max)}_updateValueFromPosition(t){if(!this._sliderDimensions)return;let e=this._clamp(((this.vertical?t.y:t.x)-(this.vertical?this._sliderDimensions.top:this._sliderDimensions.left))/(this.vertical?this._sliderDimensions.height:this._sliderDimensions.width));if(this._shouldInvertMouseCoords()&&(e=1-e),0===e)this.value=this.min;else if(1===e)this.value=this.max;else{const t=this._calculateValue(e),i=Math.round((t-this.min)/this.step)*this.step+this.min;this.value=this._clamp(i,this.min,this.max)}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.value),this.valueChange.emit(this.value),this.change.emit(this._createChangeEvent())}_emitInputEvent(){this.input.emit(this._createChangeEvent())}_updateTickIntervalPercent(){if(this.tickInterval&&this._sliderDimensions)if("auto"==this.tickInterval){let t=this.vertical?this._sliderDimensions.height:this._sliderDimensions.width,e=Math.ceil(30/(t*this.step/(this.max-this.min)));this._tickIntervalPercent=e*this.step/t}else this._tickIntervalPercent=this.tickInterval*this.step/(this.max-this.min)}_createChangeEvent(t=this.value){let e=new UK;return e.source=this,e.value=t,e}_calculatePercentage(t){return((t||0)-this.min)/(this.max-this.min)}_calculateValue(t){return this.min+t*(this.max-this.min)}_clamp(t,e=0,i=1){return Math.max(e,Math.min(t,i))}_getSliderDimensions(){return this._sliderWrapper?this._sliderWrapper.nativeElement.getBoundingClientRect():null}_focusHostElement(t){this._elementRef.nativeElement.focus(t)}_blurHostElement(){this._elementRef.nativeElement.blur()}writeValue(t){this.value=t}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(qi),r.Pb(r.h),r.Pb(Zn,8),r.ac("tabindex"),r.Pb(r.B),r.Pb(a),r.Pb(pa,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-slider"]],viewQuery:function(t,e){if(1&t&&r.Pc(VK,1),2&t){let t;r.vc(t=r.dc())&&(e._sliderWrapper=t.first)}},hostAttrs:["role","slider",1,"mat-slider","mat-focus-indicator"],hostVars:29,hostBindings:function(t,e){1&t&&r.cc("focus",function(){return e._onFocus()})("blur",function(){return e._onBlur()})("keydown",function(t){return e._onKeydown(t)})("keyup",function(){return e._onKeyup()})("mouseenter",function(){return e._onMouseenter()})("selectstart",function(t){return t.preventDefault()}),2&t&&(r.Yb("tabIndex",e.tabIndex),r.Eb("aria-disabled",e.disabled)("aria-valuemax",e.max)("aria-valuemin",e.min)("aria-valuenow",e.value)("aria-valuetext",null==e.valueText?e.displayValue:e.valueText)("aria-orientation",e.vertical?"vertical":"horizontal"),r.Hb("mat-slider-disabled",e.disabled)("mat-slider-has-ticks",e.tickInterval)("mat-slider-horizontal",!e.vertical)("mat-slider-axis-inverted",e._shouldInvertAxis())("mat-slider-invert-mouse-coords",e._shouldInvertMouseCoords())("mat-slider-sliding",e._isSliding)("mat-slider-thumb-label-showing",e.thumbLabel)("mat-slider-vertical",e.vertical)("mat-slider-min-value",e._isMinValue())("mat-slider-hide-last-tick",e.disabled||e._isMinValue()&&e._getThumbGap()&&e._shouldInvertAxis())("_mat-animation-noopable","NoopAnimations"===e._animationMode))},inputs:{disabled:"disabled",color:"color",tabIndex:"tabIndex",invert:"invert",max:"max",min:"min",value:"value",step:"step",thumbLabel:"thumbLabel",tickInterval:"tickInterval",vertical:"vertical",displayWith:"displayWith",valueText:"valueText"},outputs:{change:"change",input:"input",valueChange:"valueChange"},exportAs:["matSlider"],features:[r.Cb([LK]),r.Ab],decls:13,vars:6,consts:[[1,"mat-slider-wrapper"],["sliderWrapper",""],[1,"mat-slider-track-wrapper"],[1,"mat-slider-track-background",3,"ngStyle"],[1,"mat-slider-track-fill",3,"ngStyle"],[1,"mat-slider-ticks-container",3,"ngStyle"],[1,"mat-slider-ticks",3,"ngStyle"],[1,"mat-slider-thumb-container",3,"ngStyle"],[1,"mat-slider-focus-ring"],[1,"mat-slider-thumb"],[1,"mat-slider-thumb-label"],[1,"mat-slider-thumb-label-text"]],template:function(t,e){1&t&&(r.Vb(0,"div",0,1),r.Vb(2,"div",2),r.Qb(3,"div",3),r.Qb(4,"div",4),r.Ub(),r.Vb(5,"div",5),r.Qb(6,"div",6),r.Ub(),r.Vb(7,"div",7),r.Qb(8,"div",8),r.Qb(9,"div",9),r.Vb(10,"div",10),r.Vb(11,"span",11),r.Kc(12),r.Ub(),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(3),r.nc("ngStyle",e._getTrackBackgroundStyles()),r.Db(1),r.nc("ngStyle",e._getTrackFillStyles()),r.Db(1),r.nc("ngStyle",e._getTicksContainerStyles()),r.Db(1),r.nc("ngStyle",e._getTicksStyles()),r.Db(1),r.nc("ngStyle",e._getThumbContainerStyles()),r.Db(5),r.Lc(e.displayValue))},directives:[bt],styles:['.mat-slider{display:inline-block;position:relative;box-sizing:border-box;padding:8px;outline:none;vertical-align:middle}.mat-slider:not(.mat-slider-disabled):active,.mat-slider.mat-slider-sliding:not(.mat-slider-disabled){cursor:-webkit-grabbing;cursor:grabbing}.mat-slider-wrapper{position:absolute}.mat-slider-track-wrapper{position:absolute;top:0;left:0;overflow:hidden}.mat-slider-track-fill{position:absolute;transform-origin:0 0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-track-background{position:absolute;transform-origin:100% 100%;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-ticks-container{position:absolute;left:0;top:0;overflow:hidden}.mat-slider-ticks{background-repeat:repeat;background-clip:content-box;box-sizing:border-box;opacity:0;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-thumb-container{position:absolute;z-index:1;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-focus-ring{position:absolute;width:30px;height:30px;border-radius:50%;transform:scale(0);opacity:0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider.cdk-keyboard-focused .mat-slider-focus-ring,.mat-slider.cdk-program-focused .mat-slider-focus-ring{transform:scale(1);opacity:1}.mat-slider:not(.mat-slider-disabled):not(.mat-slider-sliding) .mat-slider-thumb-label,.mat-slider:not(.mat-slider-disabled):not(.mat-slider-sliding) .mat-slider-thumb{cursor:-webkit-grab;cursor:grab}.mat-slider-thumb{position:absolute;right:-10px;bottom:-10px;box-sizing:border-box;width:20px;height:20px;border:3px solid transparent;border-radius:50%;transform:scale(0.7);transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),border-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-thumb-label{display:none;align-items:center;justify-content:center;position:absolute;width:28px;height:28px;border-radius:50%;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),border-radius 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.cdk-high-contrast-active .mat-slider-thumb-label{outline:solid 1px}.mat-slider-thumb-label-text{z-index:1;opacity:0;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-sliding .mat-slider-track-fill,.mat-slider-sliding .mat-slider-track-background,.mat-slider-sliding .mat-slider-thumb-container{transition-duration:0ms}.mat-slider-has-ticks .mat-slider-wrapper::after{content:"";position:absolute;border-width:0;border-style:solid;opacity:0;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-has-ticks.cdk-focused:not(.mat-slider-hide-last-tick) .mat-slider-wrapper::after,.mat-slider-has-ticks:hover:not(.mat-slider-hide-last-tick) .mat-slider-wrapper::after{opacity:1}.mat-slider-has-ticks.cdk-focused:not(.mat-slider-disabled) .mat-slider-ticks,.mat-slider-has-ticks:hover:not(.mat-slider-disabled) .mat-slider-ticks{opacity:1}.mat-slider-thumb-label-showing .mat-slider-focus-ring{display:none}.mat-slider-thumb-label-showing .mat-slider-thumb-label{display:flex}.mat-slider-axis-inverted .mat-slider-track-fill{transform-origin:100% 100%}.mat-slider-axis-inverted .mat-slider-track-background{transform-origin:0 0}.mat-slider:not(.mat-slider-disabled).cdk-focused.mat-slider-thumb-label-showing .mat-slider-thumb{transform:scale(0)}.mat-slider:not(.mat-slider-disabled).cdk-focused .mat-slider-thumb-label{border-radius:50% 50% 0}.mat-slider:not(.mat-slider-disabled).cdk-focused .mat-slider-thumb-label-text{opacity:1}.mat-slider:not(.mat-slider-disabled).cdk-mouse-focused .mat-slider-thumb,.mat-slider:not(.mat-slider-disabled).cdk-touch-focused .mat-slider-thumb,.mat-slider:not(.mat-slider-disabled).cdk-program-focused .mat-slider-thumb{border-width:2px;transform:scale(1)}.mat-slider-disabled .mat-slider-focus-ring{transform:scale(0);opacity:0}.mat-slider-disabled .mat-slider-thumb{border-width:4px;transform:scale(0.5)}.mat-slider-disabled .mat-slider-thumb-label{display:none}.mat-slider-horizontal{height:48px;min-width:128px}.mat-slider-horizontal .mat-slider-wrapper{height:2px;top:23px;left:8px;right:8px}.mat-slider-horizontal .mat-slider-wrapper::after{height:2px;border-left-width:2px;right:0;top:0}.mat-slider-horizontal .mat-slider-track-wrapper{height:2px;width:100%}.mat-slider-horizontal .mat-slider-track-fill{height:2px;width:100%;transform:scaleX(0)}.mat-slider-horizontal .mat-slider-track-background{height:2px;width:100%;transform:scaleX(1)}.mat-slider-horizontal .mat-slider-ticks-container{height:2px;width:100%}.cdk-high-contrast-active .mat-slider-horizontal .mat-slider-ticks-container{height:0;outline:solid 2px;top:1px}.mat-slider-horizontal .mat-slider-ticks{height:2px;width:100%}.mat-slider-horizontal .mat-slider-thumb-container{width:100%;height:0;top:50%}.mat-slider-horizontal .mat-slider-focus-ring{top:-15px;right:-15px}.mat-slider-horizontal .mat-slider-thumb-label{right:-14px;top:-40px;transform:translateY(26px) scale(0.01) rotate(45deg)}.mat-slider-horizontal .mat-slider-thumb-label-text{transform:rotate(-45deg)}.mat-slider-horizontal.cdk-focused .mat-slider-thumb-label{transform:rotate(45deg)}.cdk-high-contrast-active .mat-slider-horizontal.cdk-focused .mat-slider-thumb-label,.cdk-high-contrast-active .mat-slider-horizontal.cdk-focused .mat-slider-thumb-label-text{transform:none}.mat-slider-vertical{width:48px;min-height:128px}.mat-slider-vertical .mat-slider-wrapper{width:2px;top:8px;bottom:8px;left:23px}.mat-slider-vertical .mat-slider-wrapper::after{width:2px;border-top-width:2px;bottom:0;left:0}.mat-slider-vertical .mat-slider-track-wrapper{height:100%;width:2px}.mat-slider-vertical .mat-slider-track-fill{height:100%;width:2px;transform:scaleY(0)}.mat-slider-vertical .mat-slider-track-background{height:100%;width:2px;transform:scaleY(1)}.mat-slider-vertical .mat-slider-ticks-container{width:2px;height:100%}.cdk-high-contrast-active .mat-slider-vertical .mat-slider-ticks-container{width:0;outline:solid 2px;left:1px}.mat-slider-vertical .mat-slider-focus-ring{bottom:-15px;left:-15px}.mat-slider-vertical .mat-slider-ticks{width:2px;height:100%}.mat-slider-vertical .mat-slider-thumb-container{height:100%;width:0;left:50%}.mat-slider-vertical .mat-slider-thumb{-webkit-backface-visibility:hidden;backface-visibility:hidden}.mat-slider-vertical .mat-slider-thumb-label{bottom:-14px;left:-40px;transform:translateX(26px) scale(0.01) rotate(-45deg)}.mat-slider-vertical .mat-slider-thumb-label-text{transform:rotate(45deg)}.mat-slider-vertical.cdk-focused .mat-slider-thumb-label{transform:rotate(-45deg)}[dir=rtl] .mat-slider-wrapper::after{left:0;right:auto}[dir=rtl] .mat-slider-horizontal .mat-slider-track-fill{transform-origin:100% 100%}[dir=rtl] .mat-slider-horizontal .mat-slider-track-background{transform-origin:0 0}[dir=rtl] .mat-slider-horizontal.mat-slider-axis-inverted .mat-slider-track-fill{transform-origin:0 0}[dir=rtl] .mat-slider-horizontal.mat-slider-axis-inverted .mat-slider-track-background{transform-origin:100% 100%}.mat-slider._mat-animation-noopable .mat-slider-track-fill,.mat-slider._mat-animation-noopable .mat-slider-track-background,.mat-slider._mat-animation-noopable .mat-slider-ticks,.mat-slider._mat-animation-noopable .mat-slider-thumb-container,.mat-slider._mat-animation-noopable .mat-slider-focus-ring,.mat-slider._mat-animation-noopable .mat-slider-thumb,.mat-slider._mat-animation-noopable .mat-slider-thumb-label,.mat-slider._mat-animation-noopable .mat-slider-thumb-label-text,.mat-slider._mat-animation-noopable .mat-slider-has-ticks .mat-slider-wrapper::after{transition:none}\n'],encapsulation:2,changeDetection:0}),t})();function zK(t){return"t"===t.type[0]}function HK(t){const e=zK(t)?t.touches[0]||t.changedTouches[0]:t;return{x:e.clientX,y:e.clientY}}let KK=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Et,Sa],Sa]}),t})(),$K=(()=>{class t{validate(t){return function(t){const e=parseInt(t.value,10);return!isNaN(e)&&e>=-180&&e<=180?null:{invalidLongitude:{value:t.value}}}(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","appLongitude",""]],features:[r.Cb([{provide:hc,useExisting:t,multi:!0}])]}),t})();var GK=i("FRV3"),WK=i.n(GK);let ZK=(()=>{class t{constructor(){this.sampleCode="const fs = require('fs')\nconst http = require('http')\n\n// Avec cette configuration, l'URL \xe0 configurer dans l'interface ANAIS est : http://localhost:3001/mysecret\nconst accessKey = 'mysecret'\nconst listenPort = 3001\nconst geoPositionFilePath = '/tmp/position.log'\n\nconst headers = {\n 'access-control-allow-origin': '*'\n}\nconst server = http.createServer(async (req, res) => {\n const key = req.url.slice(1)\n if (key !== accessKey) {\n res.writeHead(401, headers)\n res.end('')\n } else {\n res.writeHead(200, headers)\n // La r\xe9ponse doit \xeatre au format 'latitude,longitude' en projection EPSG:4326\n fs.createReadStream(geoPositionFilePath).pipe(res)\n }\n})\n\nserver.listen(listenPort, '127.0.0.1', () => {\n console.log('GeoServer started on port %d', listenPort)\n})\n"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-geolocation-sample-server-dialog"]],decls:19,vars:1,consts:[["mat-dialog-title","",1,"d-flex"],[1,"u-flex"],["mat-button","","title","Fermer le panneau",3,"mat-dialog-close"],[1,"mat-typography"],["href","https://nodejs.org/"]],template:function(t,e){1&t&&(r.Vb(0,"h2",0),r.Kc(1," Configuration d'un serveur HTTP pour exposer la position "),r.Qb(2,"div",1),r.Vb(3,"button",2),r.Vb(4,"mat-icon"),r.Kc(5,"close"),r.Ub(),r.Ub(),r.Ub(),r.Vb(6,"mat-dialog-content",3),r.Vb(7,"p"),r.Kc(8,"Le code JavaScript ci-dessous est a ex\xe9cuter par "),r.Vb(9,"a",4),r.Kc(10,"Node.js"),r.Ub(),r.Kc(11," et permet de d\xe9marrer un serveur HTTP en local et exposer la position latitude et longitude \xe0 partir d'un fichier."),r.Ub(),r.Vb(12,"p"),r.Kc(13,"Afin que l'interface d'ANAIS reconnaisse bien cette position, il faut que le serveur renvoie bien la position au format "),r.Vb(14,"em"),r.Kc(15,"longitude,latitude"),r.Ub(),r.Kc(16," en projection EPSG:4326."),r.Ub(),r.Vb(17,"pre"),r.Kc(18),r.Ub(),r.Ub()),2&t&&(r.Db(18),r.Lc(e.sampleCode))},directives:[ql,Dl,Zl,Yp,Yl],styles:[""]}),t})();var qK=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),YK=function(t){function e(e){var i=t.call(this,"error")||this;return i.code=e.code,i.message=e.message,i}return qK(e,t),e}(MC),QK=function(t){function e(e){var i=t.call(this)||this,n=e||{};return i.position_=null,i.transform_=Jk,i.watchId_=void 0,i.addEventListener(UE("projection"),i.handleProjectionChanged_),i.addEventListener(UE("tracking"),i.handleTrackingChanged_),void 0!==n.projection&&i.setProjection(n.projection),void 0!==n.trackingOptions&&i.setTrackingOptions(n.trackingOptions),i.setTracking(void 0!==n.tracking&&n.tracking),i}return qK(e,t),e.prototype.disposeInternal=function(){this.setTracking(!1),t.prototype.disposeInternal.call(this)},e.prototype.handleProjectionChanged_=function(){var t=this.getProjection();t&&(this.transform_=lE(eE("EPSG:4326"),t),this.position_&&this.set("position",this.transform_(this.position_)))},e.prototype.handleTrackingChanged_=function(){if("geolocation"in navigator){var t=this.getTracking();t&&void 0===this.watchId_?this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions()):t||void 0===this.watchId_||(navigator.geolocation.clearWatch(this.watchId_),this.watchId_=void 0)}},e.prototype.positionChange_=function(t){var e=t.coords;this.set("accuracy",e.accuracy),this.set("altitude",null===e.altitude?void 0:e.altitude),this.set("altitudeAccuracy",null===e.altitudeAccuracy?void 0:e.altitudeAccuracy),this.set("heading",null===e.heading?void 0:Ak(e.heading)),this.position_?(this.position_[0]=e.longitude,this.position_[1]=e.latitude):this.position_=[e.longitude,e.latitude];var i=this.transform_(this.position_);this.set("position",i),this.set("speed",null===e.speed?void 0:e.speed);var n=function(t,e,i,n){for(var r=[],s=0;s<32;++s)LC(r,jk(t,e,2*Math.PI*s/32,void 0));return r.push(r[0],r[1]),new eT(r,"XY",[r.length])}(this.position_,e.accuracy);n.applyTransform(this.transform_),this.set("accuracyGeometry",n),this.changed()},e.prototype.positionError_=function(t){this.dispatchEvent(new YK(t))},e.prototype.getAccuracy=function(){return this.get("accuracy")},e.prototype.getAccuracyGeometry=function(){return this.get("accuracyGeometry")||null},e.prototype.getAltitude=function(){return this.get("altitude")},e.prototype.getAltitudeAccuracy=function(){return this.get("altitudeAccuracy")},e.prototype.getHeading=function(){return this.get("heading")},e.prototype.getPosition=function(){return this.get("position")},e.prototype.getProjection=function(){return this.get("projection")},e.prototype.getSpeed=function(){return this.get("speed")},e.prototype.getTracking=function(){return this.get("tracking")},e.prototype.getTrackingOptions=function(){return this.get("trackingOptions")},e.prototype.setProjection=function(t){this.set("projection",eE(t))},e.prototype.setTracking=function(t){this.set("tracking",t)},e.prototype.setTrackingOptions=function(t){this.set("trackingOptions",t)},e}(BE),XK=function(t){return t.Browser="browser",t.FixedLocation="fixed_location",t.Server="server",t}({});class JK{constructor(t={}){Object.assign(this,t)}}function t$(t){const e=Nk(t);return e<926?Math.round(100*e)/100+" m":Math.round(e/1852*100)/100+" Nq"}function e$(t,e){return`${i$(e[0]-t[0],e[1]-t[1])}\xb0 ${t$(new kH([t,e]))}`}function i$(t,e){return Math.round((450-180*Math.atan2(e,t)/Math.PI)%360)}let n$=(()=>{class t{constructor(t){this.configService=t,this.enable$=new Av.a(!1),this.source$=new Av.a(XK.Browser),this.serverURL$=new Av.a(""),this.fixedLocation$=new Av.a(null),this.showBearing$=new Av.a(!1),this.location$=new Av.a(null),this.headingAngle$=new Av.a(-1),this.retrievalError$=new Av.a(""),this.validConfiguration$=new Av.a(!1),this.locationFetchInterval=2e3,this.location$.subscribe(t=>{this.oldLocation&&t&&this.headingAngle$.next(i$(t.lon-this.oldLocation.lon,t.lat-this.oldLocation.lat)),this.oldLocation=t}),this.source$.subscribe(()=>{this.oldLocation=null,this.headingAngle$.next(-1)}),this.geolocation=new QK({trackingOptions:{enableHighAccuracy:!0},tracking:!1}),this.geolocation.on("change:position",()=>{const t=this.geolocation.getPosition();this.location$.next(t?new ZD(t[0],t[1]):null)}),Hg([this.enable$,this.serverURL$,this.fixedLocation$,this.source$]).subscribe(([t,e,i,n])=>{let r=!1;t&&n===XK.Server&&e?(this.fetchTimer&&window.clearInterval(this.fetchTimer),this.fetchTimer=window.setInterval(()=>Object(ue.a)(this,void 0,void 0,function*(){if(this.serverURL$.value)try{this.location$.next(yield this.fetchLocation(this.serverURL$.value)),""!==this.retrievalError$.value&&this.retrievalError$.next("")}catch(t){this.retrievalError$.next(t.message)}}),this.locationFetchInterval),r=!0):(window.clearInterval(this.fetchTimer),this.fetchTimer=null);const s=t&&n===XK.Browser;if(s&&!this.geolocation.getTracking()){const t=this.geolocation.getPosition();this.location$.next(t?new ZD(t[0],t[1]):null)}if(s&&(r=!0),this.geolocation.setTracking(s),t&&n===XK.FixedLocation&&i){const{lon:t,lat:e}=WK()(i);this.location$.next(new ZD(t,e)),r=!0}t||""!==this.retrievalError$.value&&this.retrievalError$.next(""),this.validConfiguration$.next(r)}),this.loadConfig(),Object(or.a)(this.enable$,this.fixedLocation$,this.serverURL$,this.showBearing$,this.source$).subscribe(()=>{this.configService.set("geolocationConfig",new JK({enable:this.enable$.value,fixedLocation:this.fixedLocation$.value,serverURL:this.serverURL$.value,showBearing:this.showBearing$.value,source:this.source$.value}))})}loadConfig(){const t=this.configService.geolocationConfig;t&&(FD(t.enable)&&this.enable$.next(t.enable),FD(t.fixedLocation)&&this.fixedLocation$.next(t.fixedLocation),FD(t.serverURL)&&this.serverURL$.next(t.serverURL),FD(t.showBearing)&&this.showBearing$.next(t.showBearing),FD(t.source)&&this.source$.next(t.source))}fetchLocation(t){return Object(ue.a)(this,void 0,void 0,function*(){let e;try{e=yield fetch(t)}catch(n){throw new Error(`Impossible de r\xe9cup\xe9rer la position : ${n.message}. Le serveur est-il joignable ?`)}if(!e.ok)throw new Error(`Mauvais code retour (${e.status}). Une r\xe9ponse de type 200 est attendue.`);const i=yield e.text();try{const t=i.split(",");if(2!==t.length)throw new Error(`Mauvais format. R\xe9ponse re\xe7ue : '${i.slice(0,50)}'`);const e=parseFloat(t[0]),n=parseFloat(t[1]);if(isNaN(e))throw new Error(`La latitude '${t[0]}' n'est pas un nombre valide`);if(isNaN(n))throw new Error(`La longitude '${t[0]}' n'est pas un nombre valide`);return new ZD(n,e)}catch(n){throw new Error(`Impossible de d\xe9coder la position : ${n.message}. Le format "latitude,longitude" est attendu.`)}})}updateEnable(t){this.enable$.next(t)}updateServerURL(t){this.serverURL$.next(t)}updateFixedLocation(t){this.fixedLocation$.next(t)}updateSource(t){this.source$.next(t),this.retrievalError$.next("")}toggleShowBearing(){this.showBearing$.next(!this.showBearing$.value)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(cI))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function r$(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-form-field",2),r.Vb(1,"mat-label"),r.Kc(2,"URL du serveur"),r.Ub(),r.Vb(3,"input",10),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).serverURL=e}),r.Ub(),r.Ub(),r.Vb(4,"button",11),r.cc("click",function(){return r.Ac(t),r.gc(2).saveServerLocation()}),r.Kc(5," Enregistrer "),r.Ub(),r.Vb(6,"button",12),r.cc("click",function(){return r.Ac(t),r.gc(2).tryFetchLocation()}),r.Kc(7," Tester l'URL "),r.Ub()}if(2&t){const t=r.gc(2);r.Db(3),r.nc("ngModel",t.serverURL)("disabled",!t.geolocationLayerService.enable$.value),r.Db(1),r.nc("disabled",!t.geolocationLayerService.enable$.value),r.Db(2),r.nc("disabled",!t.serverURL||!t.geolocationLayerService.enable$.value)}}function s$(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",13),r.Kc(1),r.Ub(),r.Vb(2,"button",14),r.cc("click",function(){return r.Ac(t),r.gc(2).editMode=!0}),r.Kc(3," \xc9diter "),r.Ub()}if(2&t){const t=r.gc(2);r.Db(1),r.Lc(t.serverURL||"Aucune URL configur\xe9e"),r.Db(1),r.nc("disabled",!t.geolocationLayerService.enable$.value)}}function o$(t,e){if(1&t&&(r.Vb(0,"div",15),r.Kc(1),r.Ub()),2&t){const t=r.gc(2);r.Db(1),r.Mc(" ",t.fetchAttempt," ")}}function a$(t,e){1&t&&(r.Vb(0,"p",16),r.Vb(1,"mat-icon",2),r.Kc(2,"warning"),r.Ub(),r.Kc(3," Avec certaines versions de Firefox, il faut autoriser le chargement de contenu non s\xe9curis\xe9 (HTTP) afin d'acc\xe9der \xe0 votre serveur en local. "),r.Ub(),r.Qb(4,"img",17))}function l$(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",1),r.Vb(1,"div",2),r.Kc(2,"URL du serveur :"),r.Ub(),r.Ic(3,r$,8,4,"ng-template",7),r.Ic(4,s$,4,2,"ng-template",7),r.Ub(),r.Ic(5,o$,2,1,"div",8),r.Vb(6,"div"),r.Kc(7," Pour mettre en oeuvre un serveur qui expose une position \xe0 partir d'un fichier local, veuillez vous r\xe9f\xe9rer \xe0 cet "),r.Vb(8,"button",9),r.cc("click",function(){return r.Ac(t),r.gc().openGeolocationSampleServerDialog()}),r.Kc(9,"exemple de serveur HTTP"),r.Ub(),r.Kc(10,". "),r.Qb(11,"br"),r.Kc(12," Sinon pour tester cette fonctionnalit\xe9, vous pouvez "),r.Vb(13,"button",9),r.cc("click",function(){return r.Ac(t),r.gc().useSampleServer()}),r.Kc(14,"utiliser l'URL de test"),r.Ub(),r.Kc(15," qui simule une position GPS : "),r.Vb(16,"em"),r.Kc(17),r.Ub(),r.Kc(18,". "),r.Ub(),r.Ic(19,a$,5,0,"ng-template",7)}if(2&t){const t=r.gc();r.Db(3),r.nc("ngIf",t.editMode),r.Db(1),r.nc("ngIf",!t.editMode),r.Db(1),r.nc("ngIf",t.fetchAttempt),r.Db(3),r.nc("disabled",!t.geolocationLayerService.enable$.value),r.Db(5),r.nc("disabled",!t.geolocationLayerService.enable$.value),r.Db(4),r.Lc(t.sampleServerURL),r.Db(2),r.nc("ngIf",t.isFirefox)}}function c$(t,e){1&t&&(r.Vb(0,"mat-error"),r.Kc(1,"Ce champ est n\xe9cessaire"),r.Ub())}function h$(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-form-field",2),r.Vb(1,"input",18),r.cc("accept",function(e){return r.Ac(t),r.gc(2).onFixedLocationUpdate(e)})("complete",function(e){return r.Ac(t),r.gc(2).onFixedLocationComplete(e)}),r.Ub(),r.Ic(2,c$,2,0,"mat-error",19),r.Ub(),r.Vb(3,"button",20),r.cc("click",function(){return r.Ac(t),r.gc(2).saveFixedLocation()}),r.Kc(4," Enregistrer "),r.Ub()}if(2&t){const t=r.gc(2);r.Db(1),r.nc("formControl",t.fixedLocation)("imask",t.lonLatMask),r.Db(1),r.nc("ngIf",null==t.fixedLocation.errors?null:t.fixedLocation.errors.mandatory),r.Db(1),r.nc("disabled",!t.fixedLocation.valid||!t.geolocationLayerService.enable$.value)}}function u$(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",13),r.Kc(1),r.Ub(),r.Vb(2,"button",14),r.cc("click",function(){return r.Ac(t),r.gc(2).editMode=!0}),r.Kc(3," \xc9diter "),r.Ub()}if(2&t){const t=r.gc(2);r.Db(1),r.Lc(t.fixedLocation.value||"Aucune position configur\xe9e"),r.Db(1),r.nc("disabled",!t.geolocationLayerService.enable$.value)}}function d$(t,e){if(1&t&&(r.Vb(0,"div",1),r.Vb(1,"div",2),r.Kc(2,"Position :"),r.Ub(),r.Ic(3,h$,5,4,"ng-template",7),r.Ic(4,u$,4,2,"ng-template",7),r.Ub()),2&t){const t=r.gc();r.Db(3),r.nc("ngIf",t.editMode),r.Db(1),r.nc("ngIf",!t.editMode)}}let p$=(()=>{class t{constructor(t,e){this.dialog=t,this.geolocationLayerService=e,this.editMode=!1,this.fixedLocation=new eh(""),this.fetchAttempt=null,this.sampleServerURL="https://sample-geoserver.anais.fabnum.fr/",this.lonLatMask={mask:"LAT\xb0`MIN'`MIN\"NS LON\xb0`MIN'`MIN\"EW",lazy:!1,blocks:{LON:{mask:ob,from:0,to:180},LAT:{mask:ob,from:0,to:85},NS:{mask:gb,enum:["N","S"]},EW:{mask:gb,enum:["E","W"]},MIN:{mask:ob,from:0,to:59}}}}ngOnInit(){this.geolocationLayerService.enable$.subscribe(t=>{t?this.fixedLocation.enable():this.fixedLocation.disable()}),this.geolocationLayerService.fixedLocation$.subscribe(t=>{this.fixedLocation.setValue(null!=t?t:"")}),this.geolocationLayerService.serverURL$.subscribe(t=>{this.serverURL=t}),this.geolocationLayerService.source$.subscribe(t=>{this.source=t,this.editMode=!1}),this.isFirefox=ZH.getParser(window.navigator.userAgent).isBrowser("firefox")}updateEnable(t){this.geolocationLayerService.updateEnable(t)}updateSource(t){this.geolocationLayerService.updateSource(t)}saveServerLocation(){return Object(ue.a)(this,void 0,void 0,function*(){try{""!==this.serverURL&&(yield this.geolocationLayerService.fetchLocation(this.serverURL)),this.geolocationLayerService.updateServerURL(this.serverURL),this.editMode=!1,this.fetchAttempt=""}catch(t){this.fetchAttempt=t.message}})}tryFetchLocation(){return Object(ue.a)(this,void 0,void 0,function*(){try{const t=yield this.geolocationLayerService.fetchLocation(this.serverURL);this.fetchAttempt=`Position r\xe9cup\xe9r\xe9e: latitude=${t.lat}, longitude=${t.lon}`}catch(t){this.fetchAttempt=t.message}})}openGeolocationSampleServerDialog(){this.dialog.open(ZK)}useSampleServer(){return Object(ue.a)(this,void 0,void 0,function*(){this.serverURL=this.sampleServerURL,yield this.saveServerLocation()})}saveFixedLocation(){return Object(ue.a)(this,void 0,void 0,function*(){this.fixedLocation.valid&&this.geolocationLayerService.updateFixedLocation(this.fixedLocation.value),this.editMode=!1})}onFixedLocationUpdate(t){this.fixedLocation.setErrors({mandatory:!0})}onFixedLocationComplete(t){try{WK()(t),this.fixedLocation.setErrors({mandatory:null}),this.fixedLocation.setValue(t,{emitEvent:!1})}catch($nt){}}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Gl),r.Pb(n$))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-geolocation-settings"]],decls:14,vars:5,consts:[["color","primary",1,"d-block","mt-2",3,"ngModel","ngModelChange"],[1,"d-flex-center","mt-2"],[1,"mr-2"],[3,"ngModel","disabled","ngModelChange"],["color","primary","value","browser"],["color","primary","value","server"],["color","primary","value","fixed_location"],[3,"ngIf"],["class","mt-1",4,"ngIf"],["mat-stroked-button","",1,"text-link",3,"disabled","click"],["matInput","",3,"ngModel","disabled","ngModelChange"],["mat-stroked-button","","title","Enregistrer l'URL du serveur",3,"disabled","click"],["mat-stroked-button","","title","Tester la r\xe9cup\xe9ration de cette URL",3,"disabled","click"],[2,"min-width","180px"],["mat-stroked-button","",1,"ml-2",3,"disabled","click"],[1,"mt-1"],[1,"firefox-warning-geolocation"],["src","assets/images/help-firefox-mixed-content-tutorial.png","alt","Configuration Firefox",1,"ml-3"],["matInput","",3,"formControl","imask","accept","complete"],[4,"ngIf"],["type","submit","mat-stroked-button","","title","Enregistrer",3,"disabled","click"]],template:function(t,e){1&t&&(r.Vb(0,"mat-slide-toggle",0),r.cc("ngModelChange",function(t){return e.updateEnable(t)}),r.Kc(1," Afficher la position GPS sur la carte\n"),r.Ub(),r.Vb(2,"div",1),r.Vb(3,"label",2),r.Kc(4,"Source :"),r.Ub(),r.Vb(5,"mat-radio-group",3),r.cc("ngModelChange",function(t){return e.updateSource(t)}),r.Vb(6,"mat-radio-button",4),r.Kc(7,"API Navigateur"),r.Ub(),r.Vb(8,"mat-radio-button",5),r.Kc(9,"Serveur"),r.Ub(),r.Vb(10,"mat-radio-button",6),r.Kc(11,"Point de r\xe9f\xe9rence"),r.Ub(),r.Ub(),r.Ub(),r.Ic(12,l$,20,7,"ng-template",7),r.Ic(13,d$,5,2,"ng-template",7)),2&t&&(r.nc("ngModel",e.geolocationLayerService.enable$.value),r.Db(5),r.nc("ngModel",e.geolocationLayerService.source$.value)("disabled",!e.geolocationLayerService.enable$.value),r.Db(7),r.nc("ngIf","server"===e.source),r.Db(1),r.nc("ngIf","fixed_location"===e.source))},directives:[NL,Vc,uh,sR,hR,ut,Dl,_u,cu,Ou,ac,Yp,bh,Cb,nu],styles:[".mat-radio-button[_ngcontent-%COMP%] ~ .mat-radio-button[_ngcontent-%COMP%]{margin-left:16px}.firefox-warning-geolocation[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:.9em;color:#d41a1a}.text-link[_ngcontent-%COMP%]{padding:0 8px;line-height:2em}"]}),t})();function f$(t,e){if(1&t&&(r.Vb(0,"mat-option",18),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.value),r.Db(1),r.Mc(" ",t.label," ")}}function m$(t,e){1&t&&(r.Vb(0,"mat-chip",23),r.Kc(1,"Restriction active"),r.Ub())}function g$(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-chip-list",19),r.Ic(1,m$,2,0,"mat-chip",20),r.Ub(),r.Vb(2,"button",21),r.cc("click",function(){return r.Ac(t),r.gc(2).mapRestrictionService.removeArea()}),r.Vb(3,"mat-icon"),r.Kc(4,"delete"),r.Ub(),r.Ub(),r.Vb(5,"button",22),r.cc("click",function(){return r.Ac(t),r.gc(2).mapRestrictionService.startSelectingArea()}),r.Vb(6,"mat-icon"),r.Kc(7,"edit"),r.Ub(),r.Ub()}if(2&t){const t=r.gc(2);r.Db(1),r.nc("ngIf",t.mapConfigService.restrictedAreas$.value)}}function A$(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",24),r.cc("click",function(){return r.Ac(t),r.gc(2).mapRestrictionService.startSelectingArea()}),r.Kc(1," S\xe9lectionner une zone "),r.Ub()}}function b$(t,e){if(1&t){const t=r.Wb();r.Vb(0,"h5"),r.Kc(1,"Intervalle de rafraichissement des derni\xe8res positions des navires"),r.Ub(),r.Vb(2,"div"),r.Kc(3,"En vue temps r\xe9el, les positions des navires sont rafraichies selon cet intervalle."),r.Ub(),r.Vb(4,"mat-form-field"),r.Vb(5,"mat-select",5),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc().mapConfigService.updateShipRefreshInterval(e)}),r.Ic(6,f$,2,2,"mat-option",6),r.Ub(),r.Ub(),r.Vb(7,"h5"),r.Kc(8,"Restriction de la carte"),r.Ub(),r.Vb(9,"p"),r.Kc(10," Cette option permet de limiter la r\xe9cup\xe9ration des navires \xe0 une zone de la carte. Notez que la zone restreinte va d\xe9signer les tuiles de donn\xe9es \xe0 charger. Il est donc normal que la zone charg\xe9e soit un peu plus grande que la zone choisie. "),r.Ub(),r.Vb(11,"div",16),r.Ic(12,g$,8,1,"ng-template",4),r.Ic(13,A$,2,0,"button",17),r.Ub()}if(2&t){const t=r.gc();r.Db(5),r.nc("ngModel",t.mapConfigService.shipRefreshInterval$.value),r.Db(1),r.nc("ngForOf",t.shipRefreshIntervals),r.Db(6),r.nc("ngIf",t.mapConfigService.restrictedAreas$.value),r.Db(1),r.nc("ngIf",!t.mapConfigService.restrictedAreas$.value)}}function v$(t,e){if(1&t&&(r.Vb(0,"mat-option",18),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.key),r.Db(1),r.Mc(" ",t.label," ")}}function _$(t,e){1&t&&(r.Vb(0,"mat-error"),r.Kc(1,"La longitude est invalide"),r.Ub())}const y$=[{label:"30 secondes",value:3e4},{label:"1 minute",value:6e4},{label:"2 minutes",value:12e4},{label:"5 minutes",value:3e5},{label:"10 minutes",value:6e5},{label:"20 minutes",value:12e5},{label:"D\xe9sactiv\xe9",value:2147483647}];let w$=(()=>{class t{constructor(t,e,i){this.configService=t,this.mapConfigService=e,this.mapRestrictionService=i,this.shipRefreshIntervals=y$,this.availableTimeRanges=tI.filter(t=>!t.isCustom)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(cI),r.Pb(hI),r.Pb(RK))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-settings-dialog"]],decls:82,vars:20,consts:[["mat-dialog-title","",1,"d-flex"],[1,"u-flex"],["mat-button","","title","Fermer le panneau",3,"mat-dialog-close"],["color","primary",1,"d-block",3,"ngModel","ngModelChange"],[3,"ngIf"],[3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"my-3"],["color","primary","title","Ce param\xe8tre permet d'afficher des hexagones plus petits lors de la s\xe9lection de zones.",1,"d-block",3,"ngModel","ngModelChange"],["color","primary","title","Ce param\xe8tre permet d'afficher les traces des navires traduites en arcs dirig\xe9s dans la grille hexagonale.",1,"d-block",3,"ngModel","ngModelChange"],[1,"d-flex-center","my-2"],[1,"mr-2"],["color","primary","thumbLabel","true",2,"width","300px",3,"min","max","step","tickInterval","value","change"],["type","number","matInput","","appLongitude","",3,"ngModel","ngModelChange"],["longitudeCenter","ngModel"],[4,"ngIf"],[1,"d-flex-center"],["mat-raised-button","",3,"click",4,"ngIf"],[3,"value"],[1,"d-inline","mr-2"],["color","primary","selected","",4,"ngIf"],["mat-button","","color","warn","title","Supprimer la zone de restriction",3,"click"],["mat-button","","title","Mettre \xe0 jour la zone de restriction",3,"click"],["color","primary","selected",""],["mat-raised-button","",3,"click"]],template:function(t,e){if(1&t&&(r.Vb(0,"h1",0),r.Kc(1," Param\xe8tres g\xe9n\xe9raux "),r.Qb(2,"div",1),r.Vb(3,"button",2),r.Vb(4,"mat-icon"),r.Kc(5,"close"),r.Ub(),r.Ub(),r.Ub(),r.Vb(6,"div"),r.Vb(7,"h3"),r.Kc(8,"Bande passante"),r.Ub(),r.Vb(9,"p"),r.Kc(10," Ces param\xe8tres peuvent \xeatre utilis\xe9s pour r\xe9duire la bande passante utilis\xe9e quand le d\xe9bit de la connexion internet est faible (par exemple dans un avion ou un navire). "),r.Ub(),r.Vb(11,"h5"),r.Kc(12,"Chargement manuel"),r.Ub(),r.Vb(13,"p"),r.Kc(14," Par d\xe9faut, les donn\xe9es navires et a\xe9ronefs sont charg\xe9s par tuiles \xe0 chaque d\xe9placement de carte, et rafraichis r\xe9guli\xe8rement. Le chargement manuel d\xe9sactive la r\xe9cup\xe9ration automatique des donn\xe9es et permet \xe0 l'utilisateur de d\xe9clencher manuellement cette r\xe9cup\xe9ration. "),r.Ub(),r.Vb(15,"mat-slide-toggle",3),r.cc("ngModelChange",function(t){return e.mapConfigService.updateManualMapFetch(t)}),r.Kc(16," Chargement manuel actif "),r.Ub(),r.Ic(17,b$,14,4,"ng-template",4),r.Vb(18,"h5"),r.Kc(19,"P\xe9riode de temps par d\xe9faut"),r.Ub(),r.Vb(20,"div"),r.Kc(21,"Cette p\xe9riode de temps permet d'afficher l'historique des traces et des alertes affich\xe9 lorsque l'on visualise le d\xe9tail d'un navire."),r.Ub(),r.Vb(22,"mat-form-field"),r.Vb(23,"mat-select",5),r.cc("ngModelChange",function(t){return e.configService.set("defaultTimeRange",t)}),r.Ic(24,v$,2,2,"mat-option",6),r.Ub(),r.Ub(),r.Vb(25,"h5"),r.Kc(26,"Limite de zoom minimum"),r.Ub(),r.Vb(27,"div"),r.Kc(28,"Par d\xe9faut le zoom minimum est limit\xe9 afin de r\xe9duire la consommation r\xe9seau et m\xe9moire de l'application. Si vous d\xe9sactivez cette option, vous pourrez alors d\xe9zoomer mais cela aura un co\xfbt en termes de bande passante et de capacit\xe9s de traitement (CPU et m\xe9moire). Il se peut que votre navigateur se bloque si vous n'avez pas assez de m\xe9moire !"),r.Ub(),r.Vb(29,"mat-slide-toggle",3),r.cc("ngModelChange",function(t){return e.mapConfigService.updateLimitMinimumZoom(t)}),r.Kc(30," Limite de zoom active "),r.Ub(),r.Qb(31,"mat-divider",7),r.Vb(32,"h3"),r.Kc(33,"Affichage"),r.Ub(),r.Vb(34,"mat-slide-toggle",3),r.cc("ngModelChange",function(t){return e.mapConfigService.updatePreloadMapTiles(t)}),r.Vb(35,"div"),r.Kc(36,"Pr\xe9charger les tuiles du fond de carte (affichage plus rapide mais bande passante x2 environ)"),r.Ub(),r.Ub(),r.Vb(37,"mat-slide-toggle",3),r.cc("ngModelChange",function(t){return e.mapConfigService.updateZoomOnLocationEvents(t)}),r.Kc(38," Zoomer sur la carte lors d'\xe9v\xe9nements de localisation "),r.Ub(),r.Vb(39,"mat-slide-toggle",3),r.cc("ngModelChange",function(t){return e.mapConfigService.updateHidePositionsInLowZooms(t)}),r.Kc(40," Masquer les points des traces quand le zoom est bas "),r.Ub(),r.Vb(41,"mat-slide-toggle",8),r.cc("ngModelChange",function(t){return e.mapConfigService.updateHighHexagonsResolution(t)}),r.Kc(42," Utiliser des hexagones de haute r\xe9solution "),r.Ub(),r.Vb(43,"mat-slide-toggle",9),r.cc("ngModelChange",function(t){return e.mapConfigService.updateDebugH3Trace(t)}),r.Kc(44," Voir l'analyse des traces des navires dans la grille hexagonale (fonction de Debug) "),r.Ub(),r.Vb(45,"mat-slide-toggle",3),r.cc("ngModelChange",function(t){return e.mapConfigService.updateShowMarineTrafficPhotos(t)}),r.Kc(46," Afficher les photos de Marine Traffic dans la fiche navire "),r.Ub(),r.Vb(47,"mat-slide-toggle",3),r.cc("ngModelChange",function(t){return e.mapConfigService.updateShowMarineTrafficDeparture(t)}),r.Kc(48," Afficher le bouton pour r\xe9cup\xe9rer la provenance de Marine Traffic "),r.Ub(),r.Vb(49,"div",10),r.Vb(50,"label",11),r.Kc(51,"Transparence des \xe9tiquettes et infobulles :"),r.Ub(),r.Kc(52," Transparent "),r.Vb(53,"mat-slider",12),r.cc("change",function(t){return e.mapConfigService.updateTooltipsOpacity(t.value)}),r.Ub(),r.Kc(54," Opaque "),r.Ub(),r.Vb(55,"mat-slide-toggle",3),r.cc("ngModelChange",function(t){return e.mapConfigService.updateUseUTCDates(t)}),r.Kc(56," Afficher les dates en UTC "),r.Ub(),r.Vb(57,"h5"),r.Kc(58,"D\xe9calage de longitude"),r.Ub(),r.Vb(59,"div"),r.Kc(60," Par d\xe9faut, les donn\xe9es sont affich\xe9es de la longitude -180 \xe0 la longitude +180. Or cet affichage occasionne une coupure de l'affichage au milieu de l'oc\xe9an pacifique. Si vous travaillez r\xe9guli\xe8rement sur cette zone, alors pour pouvez d\xe9caler le centre afin de d\xe9placer la coupure \xe0 un endroit moins important pour vous. "),r.Ub(),r.Vb(61,"mat-form-field"),r.Vb(62,"mat-label"),r.Kc(63,"Longitude"),r.Ub(),r.Vb(64,"input",13,14),r.cc("ngModelChange",function(t){return e.mapConfigService.updateLongitudeCenter(t)}),r.Ub(),r.Ic(66,_$,2,0,"mat-error",15),r.Ub(),r.Qb(67,"mat-divider",7),r.Vb(68,"h3"),r.Kc(69,"G\xe9olocalisation"),r.Ub(),r.Vb(70,"div"),r.Kc(71,"L'option ci-dessous permet d'afficher une position en temps-r\xe9el sur la carte, en utilisant un point de r\xe9f\xe9rence, l'API navigateur, ou bien un serveur HTTP en local."),r.Ub(),r.Vb(72,"div"),r.Kc(73,"Si vous \xeates dans un avion ou dans un navire, cette option permet par exemple d'afficher la position de l'avion ou du navire embarquant ANAIS."),r.Ub(),r.Vb(74,"div"),r.Kc(75,"Notez bien que cette information de position est utilis\xe9e localement pour \xeatre affich\xe9e sur la carte."),r.Ub(),r.Vb(76,"div"),r.Kc(77,"Cette position n'est "),r.Vb(78,"strong"),r.Kc(79,"jamais"),r.Ub(),r.Kc(80," envoy\xe9e sur internet (serveur ANAIS ou autre)"),r.Ub(),r.Qb(81,"app-geolocation-settings"),r.Ub()),2&t){const t=r.wc(65);r.Db(15),r.nc("ngModel",e.mapConfigService.manualMapFetch$.value),r.Db(2),r.nc("ngIf",!e.mapConfigService.manualMapFetch$.value),r.Db(6),r.nc("ngModel",e.configService.defaultTimeRange),r.Db(1),r.nc("ngForOf",e.availableTimeRanges),r.Db(5),r.nc("ngModel",e.mapConfigService.limitMinimumZoom$.value),r.Db(5),r.nc("ngModel",e.mapConfigService.preloadMapTiles$.value),r.Db(3),r.nc("ngModel",e.mapConfigService.zoomOnLocationEvents$.value),r.Db(2),r.nc("ngModel",e.mapConfigService.hidePositionsInLowZooms$.value),r.Db(2),r.nc("ngModel",e.mapConfigService.highHexagonsResolution$.value),r.Db(2),r.nc("ngModel",e.mapConfigService.debugH3Trace$.value),r.Db(2),r.nc("ngModel",e.mapConfigService.showMarineTrafficPhotos$.value),r.Db(2),r.nc("ngModel",e.mapConfigService.showMarineTrafficDeparture$.value),r.Db(6),r.nc("min",0)("max",1)("step",.1)("tickInterval",1)("value",e.mapConfigService.tooltipsOpacity$.value),r.Db(2),r.nc("ngModel",e.mapConfigService.useUTCDates$.value),r.Db(9),r.nc("ngModel",e.mapConfigService.longitudeCenter$.value),r.Db(2),r.nc("ngIf",t.invalid&&t.errors.invalidLongitude)}},directives:[ql,Dl,Zl,Yp,NL,Vc,uh,ut,_u,Vg,ct,GT,jK,cu,fh,Ou,ac,$K,p$,bl,_L,pL,nu],styles:[""]}),t})(),x$=(()=>{class t extends LT{constructor(t,e,i,n,r,s){super(),this.titleService=t,this.router=e,this.dialog=i,this.mapService=n,this.routeService=r,this.uiService=s}ngOnInit(){this.titleService.setTitle("Param\xe8tres - ANAIS"),this.mapService.hasBooted||this.mapService.resetToDefaultView(),this.subscriptions.push(this.uiService.drawingMode$.pipe(mn()).subscribe(t=>{t?this.dialogRef&&(this.dialogRef.close(!1),this.dialogRef=null):this.dialogRef||this.createDialog()}))}createDialog(){this.dialogRef=this.dialog.open(w$,{height:"90vh",width:"90vw",maxWidth:"90vw",closeOnNavigation:!0}),this.dialogRef.afterClosed().subscribe((t=!0)=>Object(ue.a)(this,void 0,void 0,function*(){if(t){const t=this.routeService.previousUrl||"";yield this.router.navigateByUrl(t)}}))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(he),r.Pb(sw),r.Pb(Gl),r.Pb(pI),r.Pb(vI),r.Pb(VI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-settings-loader"]],features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2}),t})();function C$(t){return e=>e.lift(new S$(t))}class S${constructor(t){this.value=t}call(t,e){return e.subscribe(new k$(t,this.value))}}class k$ extends Ee.a{constructor(t,e){super(t),this.value=e}_next(t){this.destination.next(this.value)}}const E$=["*"];function D$(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",2),r.cc("click",function(){return r.Ac(t),r.gc()._onBackdropClicked()}),r.Ub()}if(2&t){const t=r.gc();r.Hb("mat-drawer-shown",t._isShowingBackdrop())}}function I$(t,e){1&t&&(r.Vb(0,"mat-drawer-content"),r.lc(1,2),r.Ub())}const P$=[[["mat-drawer"]],[["mat-drawer-content"]],"*"],O$=["mat-drawer","mat-drawer-content","*"],M$={transformDrawer:$r("transform",[qr("open, open-instant",Zr({transform:"none",visibility:"visible"})),qr("void",Zr({"box-shadow":"none",visibility:"hidden"})),Qr("void => open-instant",Gr("0ms")),Qr("void <=> open, open-instant => void",Gr("400ms cubic-bezier(0.25, 0.8, 0.25, 1)"))])},T$=new r.s("MAT_DRAWER_DEFAULT_AUTOSIZE",{providedIn:"root",factory:function(){return!1}}),R$=new r.s("MAT_DRAWER_CONTAINER");let V$=(()=>{class t extends ir{constructor(t,e,i,n,r){super(i,n,r),this._changeDetectorRef=t,this._container=e}ngAfterContentInit(){this._container._contentMarginChanges.subscribe(()=>{this._changeDetectorRef.markForCheck()})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(Object(r.W)(()=>L$)),r.Pb(r.l),r.Pb(er),r.Pb(r.B))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-drawer-content"]],hostAttrs:[1,"mat-drawer-content"],hostVars:4,hostBindings:function(t,e){2&t&&r.Fc("margin-left",e._container._contentMargins.left,"px")("margin-right",e._container._contentMargins.right,"px")},features:[r.Ab],ngContentSelectors:E$,decls:1,vars:0,template:function(t,e){1&t&&(r.mc(),r.lc(0))},encapsulation:2,changeDetection:0}),t})(),F$=(()=>{class t{constructor(t,e,i,n,s,o,a){this._elementRef=t,this._focusTrapFactory=e,this._focusMonitor=i,this._platform=n,this._ngZone=s,this._doc=o,this._container=a,this._elementFocusedBeforeDrawerWasOpened=null,this._enableAnimations=!1,this._position="start",this._mode="over",this._disableClose=!1,this._opened=!1,this._animationStarted=new _e.a,this._animationEnd=new _e.a,this._animationState="void",this.openedChange=new r.o(!0),this._openedStream=this.openedChange.pipe(He(t=>t),Object(Ge.a)(()=>{})),this.openedStart=this._animationStarted.pipe(He(t=>t.fromState!==t.toState&&0===t.toState.indexOf("open")),C$(void 0)),this._closedStream=this.openedChange.pipe(He(t=>!t),Object(Ge.a)(()=>{})),this.closedStart=this._animationStarted.pipe(He(t=>t.fromState!==t.toState&&"void"===t.toState),C$(void 0)),this._destroyed=new _e.a,this.onPositionChanged=new r.o,this._modeChanged=new _e.a,this.openedChange.subscribe(t=>{t?(this._doc&&(this._elementFocusedBeforeDrawerWasOpened=this._doc.activeElement),this._takeFocus()):this._isFocusWithinDrawer()&&this._restoreFocus()}),this._ngZone.runOutsideAngular(()=>{en(this._elementRef.nativeElement,"keydown").pipe(He(t=>27===t.keyCode&&!this.disableClose&&!ke(t)),Sn(this._destroyed)).subscribe(t=>this._ngZone.run(()=>{this.close(),t.stopPropagation(),t.preventDefault()}))}),this._animationEnd.pipe(mn((t,e)=>t.fromState===e.fromState&&t.toState===e.toState)).subscribe(t=>{const{fromState:e,toState:i}=t;(0===i.indexOf("open")&&"void"===e||"void"===i&&0===e.indexOf("open"))&&this.openedChange.emit(this._opened)})}get position(){return this._position}set position(t){(t="end"===t?"end":"start")!=this._position&&(this._position=t,this.onPositionChanged.emit())}get mode(){return this._mode}set mode(t){this._mode=t,this._updateFocusTrapState(),this._modeChanged.next()}get disableClose(){return this._disableClose}set disableClose(t){this._disableClose=ti(t)}get autoFocus(){const t=this._autoFocus;return null==t?"side"!==this.mode:t}set autoFocus(t){this._autoFocus=ti(t)}get opened(){return this._opened}set opened(t){this.toggle(ti(t))}_takeFocus(){this.autoFocus&&this._focusTrap&&this._focusTrap.focusInitialElementWhenReady().then(t=>{t||"function"!=typeof this._elementRef.nativeElement.focus||this._elementRef.nativeElement.focus()})}_restoreFocus(){this.autoFocus&&(this._elementFocusedBeforeDrawerWasOpened?this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened,this._openedVia):this._elementRef.nativeElement.blur(),this._elementFocusedBeforeDrawerWasOpened=null,this._openedVia=null)}_isFocusWithinDrawer(){var t;const e=null===(t=this._doc)||void 0===t?void 0:t.activeElement;return!!e&&this._elementRef.nativeElement.contains(e)}ngAfterContentInit(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._updateFocusTrapState()}ngAfterContentChecked(){this._platform.isBrowser&&(this._enableAnimations=!0)}ngOnDestroy(){this._focusTrap&&this._focusTrap.destroy(),this._animationStarted.complete(),this._animationEnd.complete(),this._modeChanged.complete(),this._destroyed.next(),this._destroyed.complete()}open(t){return this.toggle(!0,t)}close(){return this.toggle(!1)}_closeViaBackdropClick(){return this._setOpen(!1,!0)}toggle(t=!this.opened,e){return this._setOpen(t,!t&&this._isFocusWithinDrawer(),e)}_setOpen(t,e,i="program"){return this._opened=t,t?(this._animationState=this._enableAnimations?"open":"open-instant",this._openedVia=i):(this._animationState="void",e&&this._restoreFocus()),this._updateFocusTrapState(),new Promise(t=>{this.openedChange.pipe(Qe(1)).subscribe(e=>t(e?"open":"close"))})}_getWidth(){return this._elementRef.nativeElement&&this._elementRef.nativeElement.offsetWidth||0}_updateFocusTrapState(){this._focusTrap&&(this._focusTrap.enabled=this.opened&&"side"!==this.mode)}_animationStartListener(t){this._animationStarted.next(t)}_animationDoneListener(t){this._animationEnd.next(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(Bi),r.Pb(qi),r.Pb(ci),r.Pb(r.B),r.Pb(a,8),r.Pb(R$,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-drawer"]],hostAttrs:["tabIndex","-1",1,"mat-drawer"],hostVars:12,hostBindings:function(t,e){1&t&&r.Gc("@transform.start",function(t){return e._animationStartListener(t)})("@transform.done",function(t){return e._animationDoneListener(t)}),2&t&&(r.Eb("align",null),r.Hc("@transform",e._animationState),r.Hb("mat-drawer-end","end"===e.position)("mat-drawer-over","over"===e.mode)("mat-drawer-push","push"===e.mode)("mat-drawer-side","side"===e.mode)("mat-drawer-opened",e.opened))},inputs:{position:"position",mode:"mode",disableClose:"disableClose",autoFocus:"autoFocus",opened:"opened"},outputs:{openedChange:"openedChange",_openedStream:"opened",openedStart:"openedStart",_closedStream:"closed",closedStart:"closedStart",onPositionChanged:"positionChanged"},exportAs:["matDrawer"],ngContentSelectors:E$,decls:2,vars:0,consts:[[1,"mat-drawer-inner-container"]],template:function(t,e){1&t&&(r.mc(),r.Vb(0,"div",0),r.lc(1),r.Ub())},encapsulation:2,data:{animation:[M$.transformDrawer]},changeDetection:0}),t})(),L$=(()=>{class t{constructor(t,e,i,n,s,o=!1,a){this._dir=t,this._element=e,this._ngZone=i,this._changeDetectorRef=n,this._animationMode=a,this._drawers=new r.F,this.backdropClick=new r.o,this._destroyed=new _e.a,this._doCheckSubject=new _e.a,this._contentMargins={left:null,right:null},this._contentMarginChanges=new _e.a,t&&t.change.pipe(Sn(this._destroyed)).subscribe(()=>{this._validateDrawers(),this.updateContentMargins()}),s.change().pipe(Sn(this._destroyed)).subscribe(()=>this.updateContentMargins()),this._autosize=o}get start(){return this._start}get end(){return this._end}get autosize(){return this._autosize}set autosize(t){this._autosize=ti(t)}get hasBackdrop(){return null==this._backdropOverride?!this._start||"side"!==this._start.mode||!this._end||"side"!==this._end.mode:this._backdropOverride}set hasBackdrop(t){this._backdropOverride=null==t?null:ti(t)}get scrollable(){return this._userContent||this._content}ngAfterContentInit(){this._allDrawers.changes.pipe(Pn(this._allDrawers),Sn(this._destroyed)).subscribe(t=>{this._drawers.reset(t.filter(t=>!t._container||t._container===this)),this._drawers.notifyOnChanges()}),this._drawers.changes.pipe(Pn(null)).subscribe(()=>{this._validateDrawers(),this._drawers.forEach(t=>{this._watchDrawerToggle(t),this._watchDrawerPosition(t),this._watchDrawerMode(t)}),(!this._drawers.length||this._isDrawerOpen(this._start)||this._isDrawerOpen(this._end))&&this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),this._ngZone.runOutsideAngular(()=>{this._doCheckSubject.pipe(Be(10),Sn(this._destroyed)).subscribe(()=>this.updateContentMargins())})}ngOnDestroy(){this._contentMarginChanges.complete(),this._doCheckSubject.complete(),this._drawers.destroy(),this._destroyed.next(),this._destroyed.complete()}open(){this._drawers.forEach(t=>t.open())}close(){this._drawers.forEach(t=>t.close())}updateContentMargins(){let t=0,e=0;if(this._left&&this._left.opened)if("side"==this._left.mode)t+=this._left._getWidth();else if("push"==this._left.mode){const i=this._left._getWidth();t+=i,e-=i}if(this._right&&this._right.opened)if("side"==this._right.mode)e+=this._right._getWidth();else if("push"==this._right.mode){const i=this._right._getWidth();e+=i,t-=i}t=t||null,e=e||null,t===this._contentMargins.left&&e===this._contentMargins.right||(this._contentMargins={left:t,right:e},this._ngZone.run(()=>this._contentMarginChanges.next(this._contentMargins)))}ngDoCheck(){this._autosize&&this._isPushed()&&this._ngZone.runOutsideAngular(()=>this._doCheckSubject.next())}_watchDrawerToggle(t){t._animationStarted.pipe(He(t=>t.fromState!==t.toState),Sn(this._drawers.changes)).subscribe(t=>{"open-instant"!==t.toState&&"NoopAnimations"!==this._animationMode&&this._element.nativeElement.classList.add("mat-drawer-transition"),this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),"side"!==t.mode&&t.openedChange.pipe(Sn(this._drawers.changes)).subscribe(()=>this._setContainerClass(t.opened))}_watchDrawerPosition(t){t&&t.onPositionChanged.pipe(Sn(this._drawers.changes)).subscribe(()=>{this._ngZone.onMicrotaskEmpty.pipe(Qe(1)).subscribe(()=>{this._validateDrawers()})})}_watchDrawerMode(t){t&&t._modeChanged.pipe(Sn(Object(or.a)(this._drawers.changes,this._destroyed))).subscribe(()=>{this.updateContentMargins(),this._changeDetectorRef.markForCheck()})}_setContainerClass(t){const e=this._element.nativeElement.classList,i="mat-drawer-container-has-open";t?e.add(i):e.remove(i)}_validateDrawers(){this._start=this._end=null,this._drawers.forEach(t=>{"end"==t.position?this._end=t:this._start=t}),this._right=this._left=null,this._dir&&"rtl"===this._dir.value?(this._left=this._end,this._right=this._start):(this._left=this._start,this._right=this._end)}_isPushed(){return this._isDrawerOpen(this._start)&&"over"!=this._start.mode||this._isDrawerOpen(this._end)&&"over"!=this._end.mode}_onBackdropClicked(){this.backdropClick.emit(),this._closeModalDrawersViaBackdrop()}_closeModalDrawersViaBackdrop(){[this._start,this._end].filter(t=>t&&!t.disableClose&&this._canHaveBackdrop(t)).forEach(t=>t._closeViaBackdropClick())}_isShowingBackdrop(){return this._isDrawerOpen(this._start)&&this._canHaveBackdrop(this._start)||this._isDrawerOpen(this._end)&&this._canHaveBackdrop(this._end)}_canHaveBackdrop(t){return"side"!==t.mode||!!this._backdropOverride}_isDrawerOpen(t){return null!=t&&t.opened}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Zn,8),r.Pb(r.l),r.Pb(r.B),r.Pb(r.h),r.Pb(nr),r.Pb(T$),r.Pb(pa,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-drawer-container"]],contentQueries:function(t,e,i){if(1&t&&(r.Ib(i,V$,1),r.Ib(i,F$,1)),2&t){let t;r.vc(t=r.dc())&&(e._content=t.first),r.vc(t=r.dc())&&(e._allDrawers=t)}},viewQuery:function(t,e){if(1&t&&r.Pc(V$,1),2&t){let t;r.vc(t=r.dc())&&(e._userContent=t.first)}},hostAttrs:[1,"mat-drawer-container"],hostVars:2,hostBindings:function(t,e){2&t&&r.Hb("mat-drawer-container-explicit-backdrop",e._backdropOverride)},inputs:{autosize:"autosize",hasBackdrop:"hasBackdrop"},outputs:{backdropClick:"backdropClick"},exportAs:["matDrawerContainer"],features:[r.Cb([{provide:R$,useExisting:t}])],ngContentSelectors:O$,decls:4,vars:2,consts:[["class","mat-drawer-backdrop",3,"mat-drawer-shown","click",4,"ngIf"],[4,"ngIf"],[1,"mat-drawer-backdrop",3,"click"]],template:function(t,e){1&t&&(r.mc(P$),r.Ic(0,D$,1,2,"div",0),r.lc(1),r.lc(2,1),r.Ic(3,I$,2,0,"mat-drawer-content",1)),2&t&&(r.nc("ngIf",e.hasBackdrop),r.Db(3),r.nc("ngIf",!e._content))},directives:[ut,V$],styles:[".mat-drawer-container{position:relative;z-index:1;box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}.cdk-high-contrast-active .mat-drawer-backdrop{opacity:.5}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}.cdk-high-contrast-active .mat-drawer,.cdk-high-contrast-active [dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}.cdk-high-contrast-active [dir=rtl] .mat-drawer,.cdk-high-contrast-active .mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer{transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}.mat-sidenav-fixed{position:fixed}\n"],encapsulation:2,changeDetection:0}),t})(),U$=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Et,Sa,hi,rr],rr,Sa]}),t})();var B$=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),N$=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r.element=i,r.index=n,r}return B$(e,t),e}(MC),j$=function(t){function e(e,i){var n=t.call(this)||this;if(n.unique_=!!(i||{}).unique,n.array_=e||[],n.unique_)for(var r=0,s=n.array_.length;r<s;++r)n.assertUnique_(n.array_[r],r);return n.updateLength_(),n}return B$(e,t),e.prototype.clear=function(){for(;this.getLength()>0;)this.pop()},e.prototype.extend=function(t){for(var e=0,i=t.length;e<i;++e)this.push(t[e]);return this},e.prototype.forEach=function(t){for(var e=this.array_,i=0,n=e.length;i<n;++i)t(e[i],i,e)},e.prototype.getArray=function(){return this.array_},e.prototype.item=function(t){return this.array_[t]},e.prototype.getLength=function(){return this.get("length")},e.prototype.insertAt=function(t,e){this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new N$("add",e,t))},e.prototype.pop=function(){return this.removeAt(this.getLength()-1)},e.prototype.push=function(t){this.unique_&&this.assertUnique_(t);var e=this.getLength();return this.insertAt(e,t),this.getLength()},e.prototype.remove=function(t){for(var e=this.array_,i=0,n=e.length;i<n;++i)if(e[i]===t)return this.removeAt(i)},e.prototype.removeAt=function(t){var e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new N$("remove",e,t)),e},e.prototype.setAt=function(t,e){var i=this.getLength();if(t<i){this.unique_&&this.assertUnique_(e,t);var n=this.array_[t];this.array_[t]=e,this.dispatchEvent(new N$("remove",n,t)),this.dispatchEvent(new N$("add",e,t))}else{for(var r=i;r<t;++r)this.insertAt(r,void 0);this.insertAt(t,e)}},e.prototype.updateLength_=function(){this.set("length",this.array_.length)},e.prototype.assertUnique_=function(t,e){for(var i=0,n=this.array_.length;i<n;++i)if(this.array_[i]===t&&i!==e)throw new _S(58)},e}(BE),z$=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function H$(t,e,i,n){var r=t.getZoom();if(void 0!==r){var s=t.getConstrainedZoom(r+e),o=t.getResolutionForZoom(s);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:o,anchor:i,duration:void 0!==n?n:250,easing:XC})}}var K$=function(t){function e(e){var i=t.call(this)||this;return e&&e.handleEvent&&(i.handleEvent=e.handleEvent),i.map_=null,i.setActive(!0),i}return z$(e,t),e.prototype.getActive=function(){return this.get("active")},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set("active",t)},e.prototype.setMap=function(t){this.map_=t},e}(BE),$$={SINGLECLICK:"singleclick",CLICK:"click",DBLCLICK:"dblclick",POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},G$=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),W$=function(t){function e(e){var i=t.call(this)||this,n=e||{};return i.delta_=n.delta?n.delta:1,i.duration_=void 0!==n.duration?n.duration:250,i}return G$(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==$$.DBLCLICK){var i=t.originalEvent,n=t.coordinate,r=i.shiftKey?-this.delta_:this.delta_;H$(t.map.getView(),r,n,this.duration_),i.preventDefault(),e=!0}return!e},e}(K$),Z$=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function q$(t){for(var e=t.length,i=0,n=0,r=0;r<e;r++)i+=t[r].clientX,n+=t[r].clientY;return[i/e,n/e]}var Y$=function(t){function e(e){var i=this,n=e||{};return i=t.call(this,n)||this,n.handleDownEvent&&(i.handleDownEvent=n.handleDownEvent),n.handleDragEvent&&(i.handleDragEvent=n.handleDragEvent),n.handleMoveEvent&&(i.handleMoveEvent=n.handleMoveEvent),n.handleUpEvent&&(i.handleUpEvent=n.handleUpEvent),n.stopDown&&(i.stopDown=n.stopDown),i.handlingDownUpSequence=!1,i.trackedPointers_={},i.targetPointers=[],i}return Z$(e,t),e.prototype.getPointerCount=function(){return this.targetPointers.length},e.prototype.handleDownEvent=function(t){return!1},e.prototype.handleDragEvent=function(t){},e.prototype.handleEvent=function(t){if(!t.originalEvent)return!0;var e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==$$.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==$$.POINTERUP){var i=this.handleUpEvent(t);this.handlingDownUpSequence=i&&this.targetPointers.length>0}}else if(t.type==$$.POINTERDOWN){var n=this.handleDownEvent(t);this.handlingDownUpSequence=n,e=this.stopDown(n)}else t.type==$$.POINTERMOVE&&this.handleMoveEvent(t);return!e},e.prototype.handleMoveEvent=function(t){},e.prototype.handleUpEvent=function(t){return!1},e.prototype.stopDown=function(t){return t},e.prototype.updateTrackedPointers_=function(t){if(function(t){var e=t.type;return e===$$.POINTERDOWN||e===$$.POINTERDRAG||e===$$.POINTERUP}(t)){var e=t.originalEvent,i=e.pointerId.toString();t.type==$$.POINTERUP?delete this.trackedPointers_[i]:(t.type==$$.POINTERDOWN||i in this.trackedPointers_)&&(this.trackedPointers_[i]=e),this.targetPointers=KC(this.trackedPointers_)}},e}(K$);function Q$(t){var e=arguments;return function(t){for(var i=!0,n=0,r=e.length;n<r&&(i=i&&e[n](t));++n);return i}}var X$=function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},J$=function(t){return!t.map.getTargetElement().hasAttribute("tabindex")||function(t){return t.target.getTargetElement().contains(document.activeElement)}(t)},tG=BC,eG=function(t){var e=t.originalEvent;return 0==e.button&&!(sS&&oS&&e.ctrlKey)},iG=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},nG=function(t){var e=t.originalEvent;return!e.altKey&&(oS?e.metaKey:e.ctrlKey)&&!e.shiftKey},rG=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},sG=function(t){var e=t.originalEvent.target.tagName;return"INPUT"!==e&&"SELECT"!==e&&"TEXTAREA"!==e},oG=function(t){var e=t.originalEvent;return yS(void 0!==e,56),"mouse"==e.pointerType},aG=function(t){var e=t.originalEvent;return yS(void 0!==e,56),e.isPrimary&&0===e.button},lG=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),cG=function(t){function e(e){var i=t.call(this,{stopDown:NC})||this,n=e||{};i.kinetic_=n.kinetic,i.lastCentroid=null,i.panning_=!1;var r=n.condition?n.condition:Q$(iG,aG);return i.condition_=n.onFocusOnly?Q$(J$,r):r,i.noKinetic_=!1,i}return lG(e,t),e.prototype.handleDragEvent=function(t){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());var e,i,n=this.targetPointers,r=q$(n);if(n.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(r[0],r[1]),this.lastCentroid){var s=[this.lastCentroid[0]-r[0],r[1]-this.lastCentroid[1]],o=t.map.getView();e=s,i=o.getResolution(),e[0]*=i,e[1]*=i,Gk(s,o.getRotation()),o.adjustCenterInternal(s)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=r,this.lastPointersCount_=n.length,t.originalEvent.preventDefault()},e.prototype.handleUpEvent=function(t){var e=t.map,i=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var n=this.kinetic_.getDistance(),r=this.kinetic_.getAngle(),s=i.getCenterInternal(),o=e.getPixelFromCoordinateInternal(s),a=e.getCoordinateFromPixelInternal([o[0]-n*Math.cos(r),o[1]-n*Math.sin(r)]);i.animateInternal({center:i.getConstrainedCenter(a),duration:500,easing:XC})}return this.panning_&&(this.panning_=!1,i.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>0&&this.condition_(t)){var e=t.map.getView();return this.lastCentroid=null,e.getAnimating()&&e.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1},e}(Y$);function hG(t){return void 0!==t?0:void 0}function uG(t){return void 0!==t?t:void 0}var dG=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),pG=function(t){function e(e){var i=this,n=e||{};return(i=t.call(this,{stopDown:NC})||this).condition_=n.condition?n.condition:X$,i.lastAngle_=void 0,i.duration_=void 0!==n.duration?n.duration:250,i}return dG(e,t),e.prototype.handleDragEvent=function(t){if(oG(t)){var e=t.map,i=e.getView();if(i.getConstraints().rotation!==hG){var n=e.getSize(),r=t.pixel,s=Math.atan2(n[1]/2-r[1],r[0]-n[0]/2);void 0!==this.lastAngle_&&i.adjustRotationInternal(-(s-this.lastAngle_)),this.lastAngle_=s}}},e.prototype.handleUpEvent=function(t){return!oG(t)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){return!(!oG(t)||!eG(t)||!this.condition_(t)||(t.map.getView().beginInteraction(),this.lastAngle_=void 0,0))},e}(Y$),fG=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),mG=function(t){function e(e){var i=t.call(this)||this;return i.geometry_=null,i.element_=document.createElement("div"),i.element_.style.position="absolute",i.element_.style.pointerEvents="auto",i.element_.className="ol-box "+e,i.map_=null,i.startPixel_=null,i.endPixel_=null,i}return fG(e,t),e.prototype.disposeInternal=function(){this.setMap(null)},e.prototype.render_=function(){var t=this.startPixel_,e=this.endPixel_,i=this.element_.style;i.left=Math.min(t[0],e[0])+"px",i.top=Math.min(t[1],e[1])+"px",i.width=Math.abs(e[0]-t[0])+"px",i.height=Math.abs(e[1]-t[1])+"px"},e.prototype.setMap=function(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);var e=this.element_.style;e.left="inherit",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)},e.prototype.setPixels=function(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()},e.prototype.createOrUpdateGeometry=function(){var t=this.startPixel_,e=this.endPixel_,i=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);i[4]=i[0].slice(),this.geometry_?this.geometry_.setCoordinates([i]):this.geometry_=new iT([i])},e.prototype.getGeometry=function(){return this.geometry_},e}(OC),gG=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),AG=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r.coordinate=i,r.mapBrowserEvent=n,r}return gG(e,t),e}(MC),bG=function(t){function e(e){var i=t.call(this)||this,n=e||{};return i.box_=new mG(n.className||"ol-dragbox"),i.minArea_=void 0!==n.minArea?n.minArea:64,n.onBoxEnd&&(i.onBoxEnd=n.onBoxEnd),i.startPixel_=null,i.condition_=n.condition?n.condition:eG,i.boxEndCondition_=n.boxEndCondition?n.boxEndCondition:i.defaultBoxEndCondition,i}return gG(e,t),e.prototype.defaultBoxEndCondition=function(t,e,i){var n=i[0]-e[0],r=i[1]-e[1];return n*n+r*r>=this.minArea_},e.prototype.getGeometry=function(){return this.box_.getGeometry()},e.prototype.handleDragEvent=function(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new AG("boxdrag",t.coordinate,t))},e.prototype.handleUpEvent=function(t){this.box_.setMap(null);var e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new AG(e?"boxend":"boxcancel",t.coordinate,t)),!1},e.prototype.handleDownEvent=function(t){return!!this.condition_(t)&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new AG("boxstart",t.coordinate,t)),!0)},e.prototype.onBoxEnd=function(t){},e}(Y$),vG=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),_G=function(t){function e(e){var i=this,n=e||{};return(i=t.call(this,{condition:n.condition?n.condition:rG,className:n.className||"ol-dragzoom",minArea:n.minArea})||this).duration_=void 0!==n.duration?n.duration:200,i.out_=void 0!==n.out&&n.out,i}return vG(e,t),e.prototype.onBoxEnd=function(t){var e,i=this.getMap(),n=i.getView(),r=i.getSize(),s=this.getGeometry().getExtent();if(this.out_){var o=n.calculateExtentInternal(r),a=(e=[i.getPixelFromCoordinateInternal(jS(s)),i.getPixelFromCoordinateInternal(qS(s))],function(t,e){for(var i=0,n=e.length;i<n;++i)FS(t,e[i]);return t}(OS(void 0),e));JS(o,1/n.getResolutionForExtentInternal(a,r)),s=o}var l=n.getConstrainedResolution(n.getResolutionForExtentInternal(s,r)),c=n.getConstrainedCenter(HS(s),l);n.animateInternal({resolution:l,center:c,duration:this.duration_,easing:XC})},e}(bG),yG=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wG=function(t){function e(e){var i=t.call(this)||this,n=e||{};return i.defaultCondition_=function(t){return iG(t)&&sG(t)},i.condition_=void 0!==n.condition?n.condition:i.defaultCondition_,i.duration_=void 0!==n.duration?n.duration:100,i.pixelDelta_=void 0!==n.pixelDelta?n.pixelDelta:128,i}return yG(e,t),e.prototype.handleEvent=function(t){var e=!1;if("keydown"==t.type){var i=t.originalEvent,n=i.keyCode;if(this.condition_(t)&&(40==n||37==n||39==n||38==n)){var r=t.map.getView(),s=r.getResolution()*this.pixelDelta_,o=0,a=0;40==n?a=-s:37==n?o=-s:39==n?o=s:a=s;var l=[o,a];Gk(l,r.getRotation()),function(t,e,i){var n=t.getCenterInternal();n&&t.animateInternal({duration:void 0!==i?i:250,easing:tS,center:t.getConstrainedCenter([n[0]+e[0],n[1]+e[1]])})}(r,l,this.duration_),i.preventDefault(),e=!0}}return!e},e}(K$),xG=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),CG=function(t){function e(e){var i=t.call(this)||this,n=e||{};return i.condition_=n.condition?n.condition:sG,i.delta_=n.delta?n.delta:1,i.duration_=void 0!==n.duration?n.duration:100,i}return xG(e,t),e.prototype.handleEvent=function(t){var e=!1;if("keydown"==t.type||"keypress"==t.type){var i=t.originalEvent,n=i.charCode;if(this.condition_(t)&&(n=="+".charCodeAt(0)||n=="-".charCodeAt(0))){var r=t.map,s=n=="+".charCodeAt(0)?this.delta_:-this.delta_;H$(r.getView(),s,void 0,this.duration_),i.preventDefault(),e=!0}}return!e},e}(K$),SG=function(){function t(t,e,i){this.decay_=t,this.minVelocity_=e,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0}return t.prototype.begin=function(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0},t.prototype.update=function(t,e){this.points_.push(t,e,Date.now())},t.prototype.end=function(){if(this.points_.length<6)return!1;var t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;for(var i=e-3;i>0&&this.points_[i+2]>t;)i-=3;var n=this.points_[e+2]-this.points_[i+2];if(n<1e3/60)return!1;var r=this.points_[e]-this.points_[i],s=this.points_[e+1]-this.points_[i+1];return this.angle_=Math.atan2(s,r),this.initialVelocity_=Math.sqrt(r*r+s*s)/n,this.initialVelocity_>this.minVelocity_},t.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},t.prototype.getAngle=function(){return this.angle_},t}(),kG=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),EG=function(t){function e(e){var i=this,n=e||{};(i=t.call(this,n)||this).totalDelta_=0,i.lastDelta_=0,i.maxDelta_=void 0!==n.maxDelta?n.maxDelta:1,i.duration_=void 0!==n.duration?n.duration:250,i.timeout_=void 0!==n.timeout?n.timeout:80,i.useAnchor_=void 0===n.useAnchor||n.useAnchor,i.constrainResolution_=void 0!==n.constrainResolution&&n.constrainResolution;var r=n.condition?n.condition:tG;return i.condition_=n.onFocusOnly?Q$(J$,r):r,i.lastAnchor_=null,i.startTime_=void 0,i.mode_=void 0,i.trackpadEventGap_=400,i.deltaPerZoom_=300,i}return kG(e,t),e.prototype.endInteraction_=function(){this.trackpadTimeoutId_=void 0,this.getMap().getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)},e.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;if("wheel"!==t.type)return!0;var e,i=t.map,n=t.originalEvent;if(n.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),"wheel"==t.type&&(e=n.deltaY,rS&&n.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(e/=aS),n.deltaMode===WheelEvent.DOM_DELTA_LINE&&(e*=40)),0===e)return!1;this.lastDelta_=e;var r=Date.now();void 0===this.startTime_&&(this.startTime_=r),(!this.mode_||r-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(e)<4?"trackpad":"wheel");var s=i.getView();if("trackpad"===this.mode_&&!s.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(s.getAnimating()&&s.cancelAnimations(),s.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),s.adjustZoom(-e/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=r,!1;this.totalDelta_+=e;var o=Math.max(this.timeout_-(r-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,i),o),!1},e.prototype.handleWheelZoom_=function(t){var e=t.getView();e.getAnimating()&&e.cancelAnimations();var i=-uk(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),H$(e,i,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0},e.prototype.setMouseAnchor=function(t){this.useAnchor_=t,t||(this.lastAnchor_=null)},e}(K$),DG=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),IG=function(t){function e(e){var i=this,n=e||{},r=n;return r.stopDown||(r.stopDown=NC),(i=t.call(this,r)||this).anchor_=null,i.lastAngle_=void 0,i.rotating_=!1,i.rotationDelta_=0,i.threshold_=void 0!==n.threshold?n.threshold:.3,i.duration_=void 0!==n.duration?n.duration:250,i}return DG(e,t),e.prototype.handleDragEvent=function(t){var e=0,i=this.targetPointers[0],n=this.targetPointers[1],r=Math.atan2(n.clientY-i.clientY,n.clientX-i.clientX);if(void 0!==this.lastAngle_){var s=r-this.lastAngle_;this.rotationDelta_+=s,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=s}this.lastAngle_=r;var o=t.map,a=o.getView();if(a.getConstraints().rotation!==hG){var l=o.getViewport().getBoundingClientRect(),c=q$(this.targetPointers);c[0]-=l.left,c[1]-=l.top,this.anchor_=o.getCoordinateFromPixelInternal(c),this.rotating_&&(o.render(),a.adjustRotationInternal(e,this.anchor_))}},e.prototype.handleUpEvent=function(t){return!(this.targetPointers.length<2&&(t.map.getView().endInteraction(this.duration_),1))},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}(Y$),PG=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),OG=function(t){function e(e){var i=this,n=e||{},r=n;return r.stopDown||(r.stopDown=NC),(i=t.call(this,r)||this).anchor_=null,i.duration_=void 0!==n.duration?n.duration:400,i.lastDistance_=void 0,i.lastScaleDelta_=1,i}return PG(e,t),e.prototype.handleDragEvent=function(t){var e=1,i=this.targetPointers[0],n=this.targetPointers[1],r=i.clientX-n.clientX,s=i.clientY-n.clientY,o=Math.sqrt(r*r+s*s);void 0!==this.lastDistance_&&(e=this.lastDistance_/o),this.lastDistance_=o;var a=t.map,l=a.getView();1!=e&&(this.lastScaleDelta_=e);var c=a.getViewport().getBoundingClientRect(),h=q$(this.targetPointers);h[0]-=c.left,h[1]-=c.top,this.anchor_=a.getCoordinateFromPixelInternal(h),a.render(),l.adjustResolutionInternal(e,this.anchor_)},e.prototype.handleUpEvent=function(t){return!(this.targetPointers.length<2&&(t.map.getView().endInteraction(this.duration_,this.lastScaleDelta_>1?1:-1),1))},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}(Y$);function MG(t){var e=t||{},i=new j$,n=new SG(-.005,.05,100);return(void 0===e.altShiftDragRotate||e.altShiftDragRotate)&&i.push(new pG),(void 0===e.doubleClickZoom||e.doubleClickZoom)&&i.push(new W$({delta:e.zoomDelta,duration:e.zoomDuration})),(void 0===e.dragPan||e.dragPan)&&i.push(new cG({onFocusOnly:e.onFocusOnly,kinetic:n})),(void 0===e.pinchRotate||e.pinchRotate)&&i.push(new IG),(void 0===e.pinchZoom||e.pinchZoom)&&i.push(new OG({duration:e.zoomDuration})),(void 0===e.keyboard||e.keyboard)&&(i.push(new wG),i.push(new CG({delta:e.zoomDelta,duration:e.zoomDuration}))),(void 0===e.mouseWheelZoom||e.mouseWheelZoom)&&i.push(new EG({onFocusOnly:e.onFocusOnly,duration:e.zoomDuration})),(void 0===e.shiftDragZoom||e.shiftDragZoom)&&i.push(new _G({duration:e.zoomDuration})),i}var TG=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),RG=function(t){function e(e){var i=t.call(this)||this,n=zC({},e);return n.opacity=void 0!==e.opacity?e.opacity:1,yS("number"==typeof n.opacity,64),n.visible=void 0===e.visible||e.visible,n.zIndex=e.zIndex,n.maxResolution=void 0!==e.maxResolution?e.maxResolution:1/0,n.minResolution=void 0!==e.minResolution?e.minResolution:0,n.minZoom=void 0!==e.minZoom?e.minZoom:-1/0,n.maxZoom=void 0!==e.maxZoom?e.maxZoom:1/0,i.className_=void 0!==n.className?e.className:"ol-layer",delete n.className,i.setProperties(n),i.state_=null,i}return TG(e,t),e.prototype.getClassName=function(){return this.className_},e.prototype.getLayerState=function(t){var e=this.state_||{layer:this,managed:void 0===t||t},i=this.getZIndex();return e.opacity=uk(Math.round(100*this.getOpacity())/100,0,1),e.sourceState=this.getSourceState(),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==i?i:!1===e.managed?1/0:0,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e},e.prototype.getLayersArray=function(t){return ZC()},e.prototype.getLayerStatesArray=function(t){return ZC()},e.prototype.getExtent=function(){return this.get("extent")},e.prototype.getMaxResolution=function(){return this.get("maxResolution")},e.prototype.getMinResolution=function(){return this.get("minResolution")},e.prototype.getMinZoom=function(){return this.get("minZoom")},e.prototype.getMaxZoom=function(){return this.get("maxZoom")},e.prototype.getOpacity=function(){return this.get("opacity")},e.prototype.getSourceState=function(){return ZC()},e.prototype.getVisible=function(){return this.get("visible")},e.prototype.getZIndex=function(){return this.get("zIndex")},e.prototype.setExtent=function(t){this.set("extent",t)},e.prototype.setMaxResolution=function(t){this.set("maxResolution",t)},e.prototype.setMinResolution=function(t){this.set("minResolution",t)},e.prototype.setMaxZoom=function(t){this.set("maxZoom",t)},e.prototype.setMinZoom=function(t){this.set("minZoom",t)},e.prototype.setOpacity=function(t){yS("number"==typeof t,64),this.set("opacity",t)},e.prototype.setVisible=function(t){this.set("visible",t)},e.prototype.setZIndex=function(t){this.set("zIndex",t)},e.prototype.disposeInternal=function(){this.state_&&(this.state_.layer=null,this.state_=null),t.prototype.disposeInternal.call(this)},e}(BE),VG=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function FG(t,e){if(!t.visible)return!1;var i=e.resolution;if(i<t.minResolution||i>=t.maxResolution)return!1;var n=e.zoom;return n>t.minZoom&&n<=t.maxZoom}var LG=function(t){function e(e){var i=this,n=zC({},e);return delete n.source,(i=t.call(this,n)||this).mapPrecomposeKey_=null,i.mapRenderKey_=null,i.sourceChangeKey_=null,i.renderer_=null,e.render&&(i.render=e.render),e.map&&i.setMap(e.map),i.addEventListener(UE("source"),i.handleSourcePropertyChange_),i.setSource(e.source?e.source:null),i}return VG(e,t),e.prototype.getLayersArray=function(t){var e=t||[];return e.push(this),e},e.prototype.getLayerStatesArray=function(t){var e=t||[];return e.push(this.getLayerState()),e},e.prototype.getSource=function(){return this.get("source")||null},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():"undefined"},e.prototype.handleSourceChange_=function(){this.changed()},e.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&(ik(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=tk(t,"change",this.handleSourceChange_,this)),this.changed()},e.prototype.getFeatures=function(t){return this.renderer_.getFeatures(t)},e.prototype.render=function(t,e){var i=this.getRenderer();if(i.prepareFrame(t))return i.renderFrame(t,e)},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&(ik(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(ik(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=tk(t,"precompose",function(t){var e=t.frameState.layerStatesArray,i=this.getLayerState(!1);yS(!e.some(function(t){return t.layer===i.layer}),67),e.push(i)},this),this.mapRenderKey_=tk(this,"change",t.render,t),this.changed())},e.prototype.setSource=function(t){this.set("source",t)},e.prototype.getRenderer=function(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_},e.prototype.hasRenderer=function(){return!!this.renderer_},e.prototype.createRenderer=function(){return null},e.prototype.disposeInternal=function(){this.setSource(null),t.prototype.disposeInternal.call(this)},e}(RG),UG=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),BG=function(t){function e(e){var i=this,n=e||{},r=zC({},n);return delete r.preload,delete r.useInterimTilesOnError,(i=t.call(this,r)||this).setPreload(void 0!==n.preload?n.preload:0),i.setUseInterimTilesOnError(void 0===n.useInterimTilesOnError||n.useInterimTilesOnError),i}return UG(e,t),e.prototype.getPreload=function(){return this.get("preload")},e.prototype.setPreload=function(t){this.set("preload",t)},e.prototype.getUseInterimTilesOnError=function(){return this.get("useInterimTilesOnError")},e.prototype.setUseInterimTilesOnError=function(t){this.set("useInterimTilesOnError",t)},e}(LG),NG=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),jG=function(t){function e(e){var i=t.call(this)||this;return i.boundHandleImageChange_=i.handleImageChange_.bind(i),i.layer_=e,i.declutterExecutorGroup=null,i}return NG(e,t),e.prototype.getFeatures=function(t){return ZC()},e.prototype.prepareFrame=function(t){return ZC()},e.prototype.renderFrame=function(t,e){return ZC()},e.prototype.loadedTileCallback=function(t,e,i){t[e]||(t[e]={}),t[e][i.tileCoord.toString()]=i},e.prototype.createLoadedTileFinder=function(t,e,i){return(function(n,r){var s=this.loadedTileCallback.bind(this,i,n);return t.forEachLoadedTile(e,n,r,s)}).bind(this)},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,r){},e.prototype.getDataAtPixel=function(t,e,i){return ZC()},e.prototype.getLayer=function(){return this.layer_},e.prototype.handleFontsChanged=function(){},e.prototype.handleImageChange_=function(t){2===t.target.getState()&&this.renderIfReadyAndVisible()},e.prototype.loadImage=function(t){var e=t.getState();return 2!=e&&3!=e&&t.addEventListener("change",this.boundHandleImageChange_),0==e&&(t.load(),e=t.getState()),2==e},e.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t.getVisible()&&"ready"==t.getSourceState()&&t.changed()},e}(TE),zG=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),HG=function(t){function e(e,i,n,r){var s=t.call(this,e)||this;return s.inversePixelTransform=i,s.frameState=n,s.context=r,s}return zG(e,t),e}(MC),KG=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))","?\\s*([-,\\\"\\'\\sa-z]+?)\\s*$"].join(""),"i"),$G=["style","variant","weight","size","lineHeight","family"],GG=function(t){var e=t.match(KG);if(!e)return null;for(var i={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},n=0,r=$G.length;n<r;++n){var s=e[n+1];void 0!==s&&(i[$G[n]]=s)}return i.families=i.family.split(/,\s?/),i},WG=[],ZG=[0,0,0,0],qG=new BE;(new WC).setSize=function(){console.warn("labelCache is deprecated.")};var YG,QG,XG=null,JG={},tW=function(){var t,e,i=["monospace","serif"],n=i.length,r="wmytzilWMYTZIL@#/&?$%10\uf013";function s(t,s,o){for(var a=!0,l=0;l<n;++l){var c=i[l];if(e=iW(t+" "+s+" 32px "+c,r),o!=c){var h=iW(t+" "+s+" 32px "+o+","+c,r);a=a&&h!=e}}return!!a}function o(){for(var e=!0,i=qG.getKeys(),n=0,r=i.length;n<r;++n){var o=i[n];qG.get(o)<100&&(s.apply(this,o.split("\n"))?(HC(JG),XG=null,YG=void 0,qG.set(o,100)):(qG.set(o,qG.get(o)+1,!0),e=!1))}e&&(clearInterval(t),t=void 0)}return function(e){var i=GG(e);if(i)for(var n=i.families,r=0,a=n.length;r<a;++r){var l=n[r],c=i.style+"\n"+i.weight+"\n"+l;void 0===qG.get(c)&&(qG.set(c,100,!0),s(i.style,i.weight,l)||(qG.set(c,0,!0),void 0===t&&(t=setInterval(o,32))))}}}();function eW(t,e){return XG||(XG=uS(1,1)),t!=YG&&(XG.font=t,YG=XG.font),XG.measureText(e)}function iW(t,e){return eW(t,e).width}function nW(t,e,i){if(e in i)return i[e];var n=iW(t,e);return i[e]=n,n}function rW(t,e,i,n){0!==e&&(t.translate(i,n),t.rotate(e),t.translate(-i,-n))}var sW=null;function oW(t){return lS?uM(t):(sW||(sW=uS(1,1).canvas),sW.style.transform=uM(t),sW.style.transform)}var aW=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),lW=function(t){function e(e){var i=t.call(this,e)||this;return i.container=null,i.tempTransform=[1,0,0,1,0,0],i.pixelTransform=[1,0,0,1,0,0],i.inversePixelTransform=[1,0,0,1,0,0],i.context=null,i.containerReused=!1,i}return aW(e,t),e.prototype.useContainer=function(t,e,i){var n,r,s=this.getLayer().getClassName();if(t&&""===t.style.opacity&&t.className===s&&(o=t.firstElementChild)instanceof HTMLCanvasElement&&(r=o.getContext("2d")),!r||0!==r.canvas.width&&r.canvas.style.transform!==e?this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1):(this.container=t,this.context=r,this.containerReused=!0),!this.container){(n=document.createElement("div")).className=s;var o,a=n.style;a.position="absolute",a.width="100%",a.height="100%",r=uS(),n.appendChild(o=r.canvas),(a=o.style).position="absolute",a.left="0",a.transformOrigin="top left",this.container=n,this.context=r}},e.prototype.clip=function(t,e,i){var n=e.pixelRatio,r=e.size[0]*n/2,s=e.size[1]*n/2,o=e.viewState.rotation,a=ZS(i),l=qS(i),c=zS(i),h=jS(i);lM(e.coordinateToPixelTransform,a),lM(e.coordinateToPixelTransform,l),lM(e.coordinateToPixelTransform,c),lM(e.coordinateToPixelTransform,h),t.save(),rW(t,-o,r,s),t.beginPath(),t.moveTo(a[0]*n,a[1]*n),t.lineTo(l[0]*n,l[1]*n),t.lineTo(c[0]*n,c[1]*n),t.lineTo(h[0]*n,h[1]*n),t.clip(),rW(t,o,r,s)},e.prototype.clipUnrotated=function(t,e,i){var n=ZS(i),r=qS(i),s=zS(i),o=jS(i);lM(e.coordinateToPixelTransform,n),lM(e.coordinateToPixelTransform,r),lM(e.coordinateToPixelTransform,s),lM(e.coordinateToPixelTransform,o);var a=this.inversePixelTransform;lM(a,n),lM(a,r),lM(a,s),lM(a,o),t.save(),t.beginPath(),t.moveTo(Math.round(n[0]),Math.round(n[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.clip()},e.prototype.dispatchRenderEvent_=function(t,e,i){var n=this.getLayer();if(n.hasListener(t)){var r=new HG(t,this.inversePixelTransform,i,e);n.dispatchEvent(r)}},e.prototype.preRender=function(t,e){this.dispatchRenderEvent_("prerender",t,e)},e.prototype.postRender=function(t,e){this.dispatchRenderEvent_("postrender",t,e)},e.prototype.getRenderTransform=function(t,e,i,n,r,s,o){var a=n/e;return cM(this.tempTransform,r/2,s/2,a,-a,-i,-t[0]+o,-t[1])},e.prototype.getDataAtPixel=function(t,e,i){var n,r=lM(this.inversePixelTransform,t.slice()),s=this.context,o=this.getLayer().getExtent();if(o&&!kS(o,lM(e.pixelToCoordinateTransform,t.slice())))return null;try{var a=Math.round(r[0]),l=Math.round(r[1]),c=document.createElement("canvas"),h=c.getContext("2d");c.width=1,c.height=1,h.clearRect(0,0,1,1),h.drawImage(s.canvas,a,l,1,1,0,0,1,1),n=h.getImageData(0,0,1,1).data}catch(u){return"SecurityError"===u.name?new Uint8Array:n}return 0===n[3]?null:n},e}(jG),cW=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),hW=function(t){function e(e){var i=t.call(this,e)||this;return i.extentChanged=!0,i.renderedExtent_=null,i.renderedProjection=null,i.renderedTiles=[],i.newTiles_=!1,i.tmpExtent=[1/0,1/0,-1/0,-1/0],i.tmpTileRange_=new $E(0,0,0,0),i}return cW(e,t),e.prototype.isDrawableTile=function(t){var e=this.getLayer(),i=t.getState(),n=e.getUseInterimTilesOnError();return 2==i||4==i||3==i&&!n},e.prototype.getTile=function(t,e,i,n){var r=n.pixelRatio,s=n.viewState.projection,o=this.getLayer(),a=o.getSource().getTile(t,e,i,r,s);return 3==a.getState()&&(o.getUseInterimTilesOnError()?o.getPreload()>0&&(this.newTiles_=!0):a.setState(2)),this.isDrawableTile(a)||(a=a.getInterimTile()),a},e.prototype.loadedTileCallback=function(e,i,n){return!!this.isDrawableTile(n)&&t.prototype.loadedTileCallback.call(this,e,i,n)},e.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},e.prototype.renderFrame=function(t,e){var i=t.layerStatesArray[t.layerIndex],n=t.viewState,r=n.projection,s=n.resolution,o=n.center,a=n.rotation,l=t.pixelRatio,c=this.getLayer(),h=c.getSource(),u=h.getRevision(),d=h.getTileGridForProjection(r),p=d.getZForResolution(s,h.zDirection),f=d.getResolution(p),m=t.extent,g=i.extent&&mE(i.extent);g&&(m=WS(m,mE(i.extent)));var A=h.getTilePixelRatio(l),b=Math.round(t.size[0]*A),v=Math.round(t.size[1]*A);if(a){var _=Math.round(Math.sqrt(b*b+v*v));b=_,v=_}var y=f*b/2/A,w=f*v/2/A,x=[o[0]-y,o[1]-w,o[0]+y,o[1]+w],C=d.getTileRangeForExtentAndZ(m,p),S={};S[p]={};var k=this.createLoadedTileFinder(h,r,S),E=this.tmpExtent,D=this.tmpTileRange_;this.newTiles_=!1;for(var I=C.minX;I<=C.maxX;++I)for(var P=C.minY;P<=C.maxY;++P){var O=this.getTile(p,I,P,t);if(this.isDrawableTile(O)){var M=YC(this);if(2==O.getState()){S[p][O.tileCoord.toString()]=O;var T=O.inTransition(M);this.newTiles_||!T&&-1!==this.renderedTiles.indexOf(O)||(this.newTiles_=!0)}if(1===O.getAlpha(M,t.time))continue}var R=d.getTileCoordChildTileRange(O.tileCoord,D,E),V=!1;R&&(V=k(p+1,R)),V||d.forEachTileCoordParentTileRange(O.tileCoord,k,D,E)}var F=f/s;cM(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/A,1/A,a,-b/2,-v/2);var L=oW(this.pixelTransform);this.useContainer(e,L,i.opacity);var U=this.context,B=U.canvas;hM(this.inversePixelTransform,this.pixelTransform),cM(this.tempTransform,b/2,v/2,F,F,0,-b/2,-v/2),B.width!=b||B.height!=v?(B.width=b,B.height=v):this.containerReused||U.clearRect(0,0,b,v),g&&this.clipUnrotated(U,t,g),zC(U,h.getContextOptions()),this.preRender(U,t),this.renderedTiles.length=0;var N,j,z,H=Object.keys(S).map(Number);H.sort(TC),1!==i.opacity||this.containerReused&&!h.getOpaque(t.viewState.projection)?(N=[],j=[]):H=H.reverse();for(var K=H.length-1;K>=0;--K){var $=H[K],G=h.getTilePixelSize($,l,r),W=d.getResolution($)/f,Z=G[0]*W*F,q=G[1]*W*F,Y=d.getTileCoordForCoordAndZ(ZS(x),$),Q=d.getTileCoordExtent(Y),X=lM(this.tempTransform,[A*(Q[0]-x[0])/f,A*(x[3]-Q[3])/f]),J=A*h.getGutterForProjection(r),tt=S[$];for(var et in tt){var it=(O=tt[et]).tileCoord,nt=X[0]-(Y[1]-it[1])*Z,rt=Math.round(nt+Z),st=X[1]-(Y[2]-it[2])*q,ot=Math.round(st+q),at=rt-(I=Math.round(nt)),lt=ot-(P=Math.round(st)),ct=p===$;if(!(T=ct&&1!==O.getAlpha(YC(this),t.time)))if(N){U.save(),z=[I,P,I+at,P,I+at,P+lt,I,P+lt];for(var ht=0,ut=N.length;ht<ut;++ht)if(p!==$&&$<j[ht]){var dt=N[ht];U.beginPath(),U.moveTo(z[0],z[1]),U.lineTo(z[2],z[3]),U.lineTo(z[4],z[5]),U.lineTo(z[6],z[7]),U.moveTo(dt[6],dt[7]),U.lineTo(dt[4],dt[5]),U.lineTo(dt[2],dt[3]),U.lineTo(dt[0],dt[1]),U.clip()}N.push(z),j.push($)}else U.clearRect(I,P,at,lt);this.drawTileImage(O,t,I,P,at,lt,J,ct,i.opacity),N&&!T&&U.restore(),this.renderedTiles.push(O),this.updateUsedTiles(t.usedTiles,h,O)}}return this.renderedRevision=u,this.renderedResolution=f,this.extentChanged=!this.renderedExtent_||!RS(this.renderedExtent_,x),this.renderedExtent_=x,this.renderedPixelRatio=l,this.renderedProjection=r,this.manageTilePyramid(t,h,d,l,r,m,p,c.getPreload()),this.scheduleExpireCache(t,h),this.postRender(U,t),i.extent&&U.restore(),L!==B.style.transform&&(B.style.transform=L),this.container},e.prototype.drawTileImage=function(t,e,i,n,r,s,o,a,l){var c=this.getTileImage(t);if(c){var h=YC(this),u=a?t.getAlpha(h,e.time):1,d=l*u,p=d!==this.context.globalAlpha;p&&(this.context.save(),this.context.globalAlpha=d),this.context.drawImage(c,o,o,c.width-2*o,c.height-2*o,i,n,r,s),p&&this.context.restore(),1!==u?e.animate=!0:a&&t.endTransition(h)}},e.prototype.getImage=function(){var t=this.context;return t?t.canvas:null},e.prototype.getTileImage=function(t){return t.getImage()},e.prototype.scheduleExpireCache=function(t,e){if(e.canExpireCache()){var i=(function(t,e,i){var n=YC(t);n in i.usedTiles&&t.expireCache(i.viewState.projection,i.usedTiles[n])}).bind(null,e);t.postRenderFunctions.push(i)}},e.prototype.updateUsedTiles=function(t,e,i){var n=YC(e);n in t||(t[n]={}),t[n][i.getKey()]=!0},e.prototype.manageTilePyramid=function(t,e,i,n,r,s,o,a,l){var c=YC(e);c in t.wantedTiles||(t.wantedTiles[c]={});var h,u,d,p,f,m,g=t.wantedTiles[c],A=t.tileQueue,b=0;for(m=i.getMinZoom();m<=o;++m)for(u=i.getTileRangeForExtentAndZ(s,m,u),d=i.getResolution(m),p=u.minX;p<=u.maxX;++p)for(f=u.minY;f<=u.maxY;++f)o-m<=a?(++b,0==(h=e.getTile(m,p,f,n,r)).getState()&&(g[h.getKey()]=!0,A.isKeyQueued(h.getKey())||A.enqueue([h,c,i.getTileCoordCenter(h.tileCoord),d])),void 0!==l&&l(h)):e.useTile(m,p,f,r);e.updateCacheSize(b,r)},e}(lW),uW=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),dW=function(t){function e(e){return t.call(this,e)||this}return uW(e,t),e.prototype.createRenderer=function(){return new hW(this)},e}(BG),pW=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,fW=/^([a-z]*)$|^hsla?\(.*\)$/i;function mW(t){return"string"==typeof t?t:wW(t)}function gW(t){var e=document.createElement("div");if(e.style.color=t,""!==e.style.color){document.body.appendChild(e);var i=getComputedStyle(e).color;return document.body.removeChild(e),i}return""}var AW,bW,vW=(AW={},bW=0,function(t){var e;if(AW.hasOwnProperty(t))e=AW[t];else{if(bW>=1024){var i=0;for(var n in AW)0==(3&i++)&&(delete AW[n],--bW)}e=function(t){var e,i,n,r,s;if(fW.exec(t)&&(t=gW(t)),pW.exec(t)){var o,a=t.length-1;o=a<=4?1:2;var l=4===a||8===a;e=parseInt(t.substr(1+0*o,o),16),i=parseInt(t.substr(1+1*o,o),16),n=parseInt(t.substr(1+2*o,o),16),r=l?parseInt(t.substr(1+3*o,o),16):255,1==o&&(e=(e<<4)+e,i=(i<<4)+i,n=(n<<4)+n,l&&(r=(r<<4)+r)),s=[e,i,n,r/255]}else 0==t.indexOf("rgba(")?yW(s=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((s=t.slice(4,-1).split(",").map(Number)).push(1),yW(s)):yS(!1,14);return s}(t),AW[t]=e,++bW}return e});function _W(t){return Array.isArray(t)?t:vW(t)}function yW(t){return t[0]=uk(t[0]+.5|0,0,255),t[1]=uk(t[1]+.5|0,0,255),t[2]=uk(t[2]+.5|0,0,255),t[3]=uk(t[3],0,1),t}function wW(t){var e=t[0];e!=(0|e)&&(e=e+.5|0);var i=t[1];i!=(0|i)&&(i=i+.5|0);var n=t[2];return n!=(0|n)&&(n=n+.5|0),"rgba("+e+","+i+","+n+","+(void 0===t[3]?1:t[3])+")"}function xW(t,e,i){return e+":"+t+":"+(i?mW(i):"null")}var CW=new(function(){function t(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}return t.prototype.clear=function(){this.cache_={},this.cacheSize_=0},t.prototype.canExpireCache=function(){return this.cacheSize_>this.maxCacheSize_},t.prototype.expire=function(){if(this.canExpireCache()){var t=0;for(var e in this.cache_)0!=(3&t++)||this.cache_[e].hasListener()||(delete this.cache_[e],--this.cacheSize_)}},t.prototype.get=function(t,e,i){var n=xW(t,e,i);return n in this.cache_?this.cache_[n]:null},t.prototype.set=function(t,e,i,n){var r=xW(t,e,i);this.cache_[r]=n,++this.cacheSize_},t.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()},t}()),SW=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function kW(t,e){CW.expire()}var EW=function(t){function e(e){var i=t.call(this)||this;return i.map_=e,i}return SW(e,t),e.prototype.dispatchRenderEvent=function(t,e){ZC()},e.prototype.calculateMatrices2D=function(t){var e=t.viewState,i=t.coordinateToPixelTransform,n=t.pixelToCoordinateTransform;cM(i,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),hM(n,i)},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,r,s,o,a){var l,c=e.viewState;function h(t,e,i,n){return r.call(s,e,t?i:null,n)}var u=c.projection,d=Qk(t.slice(),u),p=[[0,0]];if(u.canWrapX()&&n){var f=YS(u.getExtent());p.push([-f,0],[f,0])}for(var m=e.layerStatesArray,g=m.length,A=[],b=[],v=0;v<p.length;v++)for(var _=g-1;_>=0;--_){var y=m[_],w=y.layer;if(w.hasRenderer()&&FG(y,c)&&o.call(a,w)){var x=w.getRenderer(),C=w.getSource();if(x&&C){var S=C.getWrapX()?d:t,k=h.bind(null,y.managed);b[0]=S[0]+p[v][0],b[1]=S[1]+p[v][1],l=x.forEachFeatureAtCoordinate(b,e,i,k,A)}if(l)return l}}if(0!==A.length){var E=1/A.length;return A.forEach(function(t,e){return t.distanceSq+=e*E}),A.sort(function(t,e){return t.distanceSq-e.distanceSq}),A.some(function(t){return l=t.callback(t.feature,t.layer,t.geometry)}),l}},e.prototype.forEachLayerAtPixel=function(t,e,i,n,r){return ZC()},e.prototype.hasFeatureAtCoordinate=function(t,e,i,n,r,s){return void 0!==this.forEachFeatureAtCoordinate(t,e,i,n,BC,this,r,s)},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){ZC()},e.prototype.scheduleExpireIconCache=function(t){CW.canExpireCache()&&t.postRenderFunctions.push(kW)},e}(OC),DW=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),IW=function(t){function e(e){var i=t.call(this,e)||this;i.fontChangeListenerKey_=tk(qG,"propertychange",e.redrawText.bind(e)),i.element_=document.createElement("div");var n=i.element_.style;n.position="absolute",n.width="100%",n.height="100%",n.zIndex="0",i.element_.className="ol-unselectable ol-layers";var r=e.getViewport();return r.insertBefore(i.element_,r.firstChild||null),i.children_=[],i.renderedVisible_=!0,i}return DW(e,t),e.prototype.dispatchRenderEvent=function(t,e){var i=this.getMap();if(i.hasListener(t)){var n=new HG(t,void 0,e);i.dispatchEvent(n)}},e.prototype.disposeInternal=function(){ik(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),t.prototype.disposeInternal.call(this)},e.prototype.renderFrame=function(t){if(t){this.calculateMatrices2D(t),this.dispatchRenderEvent("precompose",t);var e=t.layerStatesArray.sort(function(t,e){return t.zIndex-e.zIndex}),i=t.viewState;this.children_.length=0;for(var n=[],r=null,s=0,o=e.length;s<o;++s){var a=e[s];if(t.layerIndex=s,FG(a,i)&&("ready"==a.sourceState||"undefined"==a.sourceState)){var l=a.layer,c=l.render(t,r);c&&(c!==r&&(this.children_.push(c),r=c),"getDeclutter"in l&&n.push(l))}}for(s=n.length-1;s>=0;--s)n[s].renderDeclutter(t);!function(t,e){for(var i=t.childNodes,n=0;;++n){var r=i[n],s=e[n];if(!r&&!s)break;r!==s&&(r?s?t.insertBefore(s,r):(t.removeChild(r),--n):t.appendChild(s))}}(this.element_,this.children_),this.dispatchRenderEvent("postcompose",t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}else this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1)},e.prototype.forEachLayerAtPixel=function(t,e,i,n,r){for(var s=e.viewState,o=e.layerStatesArray,a=o.length-1;a>=0;--a){var l=o[a],c=l.layer;if(c.hasRenderer()&&FG(l,s)&&r(c)){var h=c.getRenderer().getDataAtPixel(t,e,i);if(h){var u=n(c,h);if(u)return u}}}},e}(EW),PW=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),OW=function(t){function e(e){var i=this,n=e||{},r=zC({},n);delete r.layers;var s=n.layers;return(i=t.call(this,r)||this).layersListenerKeys_=[],i.listenerKeys_={},i.addEventListener(UE("layers"),i.handleLayersChanged_),s?Array.isArray(s)?s=new j$(s.slice(),{unique:!0}):yS("function"==typeof s.getArray,43):s=new j$(void 0,{unique:!0}),i.setLayers(s),i}return PW(e,t),e.prototype.handleLayerChange_=function(){this.changed()},e.prototype.handleLayersChanged_=function(){this.layersListenerKeys_.forEach(ik),this.layersListenerKeys_.length=0;var t=this.getLayers();for(var e in this.layersListenerKeys_.push(tk(t,"add",this.handleLayersAdd_,this),tk(t,"remove",this.handleLayersRemove_,this)),this.listenerKeys_)this.listenerKeys_[e].forEach(ik);HC(this.listenerKeys_);for(var i=t.getArray(),n=0,r=i.length;n<r;n++){var s=i[n];this.listenerKeys_[YC(s)]=[tk(s,"propertychange",this.handleLayerChange_,this),tk(s,"change",this.handleLayerChange_,this)]}this.changed()},e.prototype.handleLayersAdd_=function(t){var e=t.element;this.listenerKeys_[YC(e)]=[tk(e,"propertychange",this.handleLayerChange_,this),tk(e,"change",this.handleLayerChange_,this)],this.changed()},e.prototype.handleLayersRemove_=function(t){var e=YC(t.element);this.listenerKeys_[e].forEach(ik),delete this.listenerKeys_[e],this.changed()},e.prototype.getLayers=function(){return this.get("layers")},e.prototype.setLayers=function(t){this.set("layers",t)},e.prototype.getLayersArray=function(t){var e=void 0!==t?t:[];return this.getLayers().forEach(function(t){t.getLayersArray(e)}),e},e.prototype.getLayerStatesArray=function(t){var e=void 0!==t?t:[],i=e.length;this.getLayers().forEach(function(t){t.getLayerStatesArray(e)});for(var n=this.getLayerState(),r=i,s=e.length;r<s;r++){var o=e[r];o.opacity*=n.opacity,o.visible=o.visible&&n.visible,o.maxResolution=Math.min(o.maxResolution,n.maxResolution),o.minResolution=Math.max(o.minResolution,n.minResolution),o.minZoom=Math.max(o.minZoom,n.minZoom),o.maxZoom=Math.min(o.maxZoom,n.maxZoom),void 0!==n.extent&&(o.extent=void 0!==o.extent?WS(o.extent,n.extent):n.extent)}return e},e.prototype.getSourceState=function(){return"ready"},e}(RG),MW=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),TW=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r.map=i,r.frameState=void 0!==n?n:null,r}return MW(e,t),e}(MC),RW=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),VW=function(t){function e(e,i,n,r,s){var o=t.call(this,e,i,s)||this;return o.originalEvent=n,o.pixel_=null,o.coordinate_=null,o.dragging=void 0!==r&&r,o}return RW(e,t),Object.defineProperty(e.prototype,"pixel",{get:function(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_},set:function(t){this.pixel_=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"coordinate",{get:function(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_},set:function(t){this.coordinate_=t},enumerable:!1,configurable:!0}),e.prototype.preventDefault=function(){t.prototype.preventDefault.call(this),this.originalEvent.preventDefault()},e.prototype.stopPropagation=function(){t.prototype.stopPropagation.call(this),this.originalEvent.stopPropagation()},e}(TW),FW=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),LW=function(t){function e(e,i){var n=t.call(this,e)||this;n.map_=e,n.emulateClicks_=!1,n.dragging_=!1,n.dragListenerKeys_=[],n.moveTolerance_=i?i*aS:aS,n.down_=null;var r=n.map_.getViewport();return n.activePointers_=0,n.trackedTouches_={},n.element_=r,n.pointerdownListenerKey_=tk(r,"pointerdown",n.handlePointerDown_,n),n.relayedListenerKey_=tk(r,"pointermove",n.relayEvent_,n),n.boundHandleTouchMove_=n.handleTouchMove_.bind(n),n.element_.addEventListener("touchmove",n.boundHandleTouchMove_,!!hS&&{passive:!1}),n}return FW(e,t),e.prototype.emulateClick_=function(t){var e=new VW($$.CLICK,this.map_,t);this.dispatchEvent(e),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new VW($$.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout((function(){this.clickTimeoutId_=void 0;var e=new VW($$.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}).bind(this),250)},e.prototype.updateActivePointers_=function(t){var e=t;e.type==$$.POINTERUP||e.type==$$.POINTERCANCEL?delete this.trackedTouches_[e.pointerId]:e.type==$$.POINTERDOWN&&(this.trackedTouches_[e.pointerId]=!0),this.activePointers_=Object.keys(this.trackedTouches_).length},e.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var e=new VW($$.POINTERUP,this.map_,t);this.dispatchEvent(e),this.emulateClicks_&&!e.propagationStopped&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),0===this.activePointers_&&(this.dragListenerKeys_.forEach(ik),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)},e.prototype.isMouseActionButton_=function(t){return 0===t.button},e.prototype.handlePointerDown_=function(t){this.emulateClicks_=0===this.activePointers_,this.updateActivePointers_(t);var e=new VW($$.POINTERDOWN,this.map_,t);if(this.dispatchEvent(e),this.down_=t,0===this.dragListenerKeys_.length){var i=this.map_.getOwnerDocument();this.dragListenerKeys_.push(tk(i,$$.POINTERMOVE,this.handlePointerMove_,this),tk(i,$$.POINTERUP,this.handlePointerUp_,this),tk(this.element_,$$.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==i&&this.dragListenerKeys_.push(tk(this.element_.getRootNode(),$$.POINTERUP,this.handlePointerUp_,this))}},e.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.dragging_=!0;var e=new VW($$.POINTERDRAG,this.map_,t,this.dragging_);this.dispatchEvent(e)}},e.prototype.relayEvent_=function(t){this.originalPointerMoveEvent_=t;var e=!(!this.down_||!this.isMoving_(t));this.dispatchEvent(new VW(t.type,this.map_,t,e))},e.prototype.handleTouchMove_=function(t){this.originalPointerMoveEvent_&&!this.originalPointerMoveEvent_.defaultPrevented||t.preventDefault()},e.prototype.isMoving_=function(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_},e.prototype.disposeInternal=function(){this.relayedListenerKey_&&(ik(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener("touchmove",this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(ik(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(ik),this.dragListenerKeys_.length=0,this.element_=null,t.prototype.disposeInternal.call(this)},e}(WC),UW=1/0,BW=function(){function t(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}return t.prototype.clear=function(){this.elements_.length=0,this.priorities_.length=0,HC(this.queuedElements_)},t.prototype.dequeue=function(){var t=this.elements_,e=this.priorities_,i=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));var n=this.keyFunction_(i);return delete this.queuedElements_[n],i},t.prototype.enqueue=function(t){yS(!(this.keyFunction_(t)in this.queuedElements_),31);var e=this.priorityFunction_(t);return e!=UW&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)},t.prototype.getCount=function(){return this.elements_.length},t.prototype.getLeftChildIndex_=function(t){return 2*t+1},t.prototype.getRightChildIndex_=function(t){return 2*t+2},t.prototype.getParentIndex_=function(t){return t-1>>1},t.prototype.heapify_=function(){var t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)},t.prototype.isEmpty=function(){return 0===this.elements_.length},t.prototype.isKeyQueued=function(t){return t in this.queuedElements_},t.prototype.isQueued=function(t){return this.isKeyQueued(this.keyFunction_(t))},t.prototype.siftUp_=function(t){for(var e=this.elements_,i=this.priorities_,n=e.length,r=e[t],s=i[t],o=t;t<n>>1;){var a=this.getLeftChildIndex_(t),l=this.getRightChildIndex_(t),c=l<n&&i[l]<i[a]?l:a;e[t]=e[c],i[t]=i[c],t=c}e[t]=r,i[t]=s,this.siftDown_(o,t)},t.prototype.siftDown_=function(t,e){for(var i=this.elements_,n=this.priorities_,r=i[e],s=n[e];e>t;){var o=this.getParentIndex_(e);if(!(n[o]>s))break;i[e]=i[o],n[e]=n[o],e=o}i[e]=r,n[e]=s},t.prototype.reprioritize=function(){var t,e,i,n=this.priorityFunction_,r=this.elements_,s=this.priorities_,o=0,a=r.length;for(e=0;e<a;++e)(i=n(t=r[e]))==UW?delete this.queuedElements_[this.keyFunction_(t)]:(s[o]=i,r[o++]=t);r.length=o,s.length=o,this.heapify_()},t}(),NW=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),jW=function(t){function e(e,i){var n=t.call(this,function(t){return e.apply(null,t)},function(t){return t[0].getKey()})||this;return n.boundHandleTileChange_=n.handleTileChange.bind(n),n.tileChangeCallback_=i,n.tilesLoading_=0,n.tilesLoadingKeys_={},n}return NW(e,t),e.prototype.enqueue=function(e){var i=t.prototype.enqueue.call(this,e);return i&&e[0].addEventListener("change",this.boundHandleTileChange_),i},e.prototype.getTilesLoading=function(){return this.tilesLoading_},e.prototype.handleTileChange=function(t){var e=t.target,i=e.getState();if(e.hifi&&2===i||3===i||4===i){e.removeEventListener("change",this.boundHandleTileChange_);var n=e.getKey();n in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[n],--this.tilesLoading_),this.tileChangeCallback_()}},e.prototype.loadMoreTiles=function(t,e){for(var i,n,r=0;this.tilesLoading_<t&&r<e&&this.getCount()>0;)n=(i=this.dequeue()[0]).getKey(),0!==i.getState()||n in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[n]=!0,++this.tilesLoading_,++r,i.load())},e}(BW);function zW(t,e,i){return function(n,r,s,o,a){if(n){var l=e?0:s[0]*r,c=e?0:s[1]*r,h=a?a[0]:0,u=a?a[1]:0,d=t[0]+l/2+h,p=t[2]-l/2+h,f=t[1]+c/2+u,m=t[3]-c/2+u;d>p&&(p=d=(p+d)/2),f>m&&(m=f=(m+f)/2);var g=uk(n[0],d,p),A=uk(n[1],f,m),b=30*r;return o&&i&&(g+=-b*Math.log(1+Math.max(0,d-n[0])/b)+b*Math.log(1+Math.max(0,n[0]-p)/b),A+=-b*Math.log(1+Math.max(0,f-n[1])/b)+b*Math.log(1+Math.max(0,n[1]-m)/b)),[g,A]}}}function HW(t){return t}function KW(t,e,i,n){var r=YS(e)/i[0],s=GS(e)/i[1];return n?Math.min(t,Math.max(r,s)):Math.min(t,Math.min(r,s))}function $W(t,e,i){var n=Math.min(t,e);return n*=Math.log(1+50*Math.max(0,t/e-1))/50+1,i&&(n=Math.max(n,i),n/=Math.log(1+50*Math.max(0,i/t-1))/50+1),uk(n,i/2,2*e)}function GW(t,e,i,n,r){return function(s,o,a,l){if(void 0!==s){var c=n?KW(t,n,a,r):t;return(void 0===i||i)&&l?$W(s,c,e):uk(s,e,c)}}}var WW=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function ZW(t,e){setTimeout(function(){t(e)},0)}function qW(t){return!(t.sourceCenter&&t.targetCenter&&!$k(t.sourceCenter,t.targetCenter))&&t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation}function YW(t,e,i,n,r){var s=Math.cos(-r),o=Math.sin(-r),a=t[0]*s-t[1]*o,l=t[1]*s+t[0]*o;return[(a+=(e[0]/2-i[0])*n)*s-(l+=(i[1]-e[1]/2)*n)*(o=-o),l*s+a*o]}var QW=function(t){function e(e){var i=t.call(this)||this,n=zC({},e);return i.hints_=[0,0],i.animations_=[],i.projection_=rE(n.projection,"EPSG:3857"),i.viewportSize_=[100,100],i.targetCenter_=null,i.cancelAnchor_=void 0,n.center&&(n.center=pE(n.center)),n.extent&&(n.extent=mE(n.extent)),i.applyOptions_(n),i}return WW(e,t),e.prototype.applyOptions_=function(t){var e=function(t){var e,i,n,r=void 0!==t.minZoom?t.minZoom:0,s=void 0!==t.maxZoom?t.maxZoom:28,o=void 0!==t.zoomFactor?t.zoomFactor:2,a=void 0!==t.multiWorld&&t.multiWorld,l=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,c=void 0!==t.showFullExtent&&t.showFullExtent,h=rE(t.projection,"EPSG:3857"),u=h.getExtent(),d=t.constrainOnlyCenter,p=t.extent;if(a||p||!h.isGlobal()||(d=!1,p=u),void 0!==t.resolutions){var f=t.resolutions;i=f[r],n=void 0!==f[s]?f[s]:f[f.length-1],e=t.constrainResolution?function(t,e,i,n){return function(r,s,o,a){if(void 0!==r){var l=t[0],c=t[t.length-1],h=i?KW(l,i,o,n):l;if(a)return void 0===e||e?$W(r,h,c):uk(r,c,h);var u=Math.min(h,r),d=Math.floor(VC(t,u,s));return t[d]>h&&d<t.length-1?t[d+1]:t[d]}}}(f,l,!d&&p,c):GW(i,n,l,!d&&p,c)}else{var m=(u?Math.max(YS(u),GS(u)):360*lk[ck.DEGREES]/h.getMetersPerUnit())/256/Math.pow(2,0),g=m/Math.pow(2,28);void 0!==(i=t.maxResolution)?r=0:i=m/Math.pow(o,r),void 0===(n=t.minResolution)&&(n=void 0!==t.maxZoom?void 0!==t.maxResolution?i/Math.pow(o,s):m/Math.pow(o,s):g),s=r+Math.floor(Math.log(i/n)/Math.log(o)),n=i/Math.pow(o,s-r),e=t.constrainResolution?function(t,e,i,n,r,s){return function(o,a,l,c){if(void 0!==o){var h=r?KW(e,r,l,s):e,u=void 0!==i?i:0;if(c)return void 0===n||n?$W(o,h,u):uk(o,u,h);var d=Math.ceil(Math.log(e/h)/Math.log(t)-1e-9),p=-a*(.5-1e-9)+.5,f=Math.min(h,o),m=Math.floor(Math.log(e/f)/Math.log(t)+p),g=Math.max(d,m);return uk(e/Math.pow(t,g),u,h)}}}(o,i,n,l,!d&&p,c):GW(i,n,l,!d&&p,c)}return{constraint:e,maxResolution:i,minResolution:n,minZoom:r,zoomFactor:o}}(t);this.maxResolution_=e.maxResolution,this.minResolution_=e.minResolution,this.zoomFactor_=e.zoomFactor,this.resolutions_=t.resolutions,this.padding=t.padding,this.minZoom_=e.minZoom;var i=function(t){if(void 0!==t.extent)return zW(t.extent,t.constrainOnlyCenter,void 0===t.smoothExtentConstraint||t.smoothExtentConstraint);var e=rE(t.projection,"EPSG:3857");if(!0!==t.multiWorld&&e.isGlobal()){var i=e.getExtent().slice();return i[0]=-1/0,i[2]=1/0,zW(i,!1,!1)}return HW}(t),n=e.constraint,r=function(t){if(void 0===t.enableRotation||t.enableRotation){var e=t.constrainRotation;return void 0===e||!0===e?(n=Ak(5),function(t,e){return e?t:void 0!==t?Math.abs(t)<=n?0:t:void 0}):!1===e?uG:"number"==typeof e?(i=2*Math.PI/e,function(t,e){return e?t:void 0!==t?t=Math.floor(t/i+.5)*i:void 0}):uG}return hG;var i,n}(t);this.constraints_={center:i,resolution:n,rotation:r},this.setRotation(void 0!==t.rotation?t.rotation:0),this.setCenterInternal(void 0!==t.center?t.center:null),void 0!==t.resolution?this.setResolution(t.resolution):void 0!==t.zoom&&this.setZoom(t.zoom),this.setProperties({}),this.options_=t},e.prototype.getUpdatedOptions_=function(t){var e=zC({},this.options_);return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),zC({},e,t)},e.prototype.animate=function(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);for(var e=new Array(arguments.length),i=0;i<e.length;++i){var n=arguments[i];n.center&&((n=zC({},n)).center=pE(n.center,this.getProjection())),n.anchor&&((n=zC({},n)).anchor=pE(n.anchor,this.getProjection())),e[i]=n}this.animateInternal.apply(this,e)},e.prototype.animateInternal=function(t){var e,i=arguments.length;if(i>1&&"function"==typeof arguments[i-1]&&(e=arguments[i-1],--i),!this.isDef()){var n=arguments[i-1];return n.center&&this.setCenterInternal(n.center),void 0!==n.zoom&&this.setZoom(n.zoom),void 0!==n.rotation&&this.setRotation(n.rotation),void(e&&ZW(e,!0))}for(var r=Date.now(),s=this.targetCenter_.slice(),o=this.targetResolution_,a=this.targetRotation_,l=[],c=0;c<i;++c){var h=arguments[c],u={start:r,complete:!1,anchor:h.anchor,duration:void 0!==h.duration?h.duration:1e3,easing:h.easing||JC,callback:e};if(h.center&&(u.sourceCenter=s,u.targetCenter=h.center.slice(),s=u.targetCenter),void 0!==h.zoom?(u.sourceResolution=o,u.targetResolution=this.getResolutionForZoom(h.zoom),o=u.targetResolution):h.resolution&&(u.sourceResolution=o,u.targetResolution=h.resolution,o=u.targetResolution),void 0!==h.rotation){u.sourceRotation=a;var d=bk(h.rotation-a+Math.PI,2*Math.PI)-Math.PI;u.targetRotation=a+d,a=u.targetRotation}qW(u)?u.complete=!0:r+=u.duration,l.push(u)}this.animations_.push(l),this.setHint(0,1),this.updateAnimations_()},e.prototype.getAnimating=function(){return this.hints_[0]>0},e.prototype.getInteracting=function(){return this.hints_[1]>0},e.prototype.cancelAnimations=function(){var t;this.setHint(0,-this.hints_[0]);for(var e=0,i=this.animations_.length;e<i;++e){var n=this.animations_[e];if(n[0].callback&&ZW(n[0].callback,!1),!t)for(var r=0,s=n.length;r<s;++r){var o=n[r];if(!o.complete){t=o.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t},e.prototype.updateAnimations_=function(){if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),this.getAnimating()){for(var t=Date.now(),e=!1,i=this.animations_.length-1;i>=0;--i){for(var n=this.animations_[i],r=!0,s=0,o=n.length;s<o;++s){var a=n[s];if(!a.complete){var l=a.duration>0?(t-a.start)/a.duration:1;l>=1?(a.complete=!0,l=1):r=!1;var c=a.easing(l);if(a.sourceCenter){var h=a.sourceCenter[0],u=a.sourceCenter[1];this.targetCenter_=[h+c*(a.targetCenter[0]-h),u+c*(a.targetCenter[1]-u)]}if(a.sourceResolution&&a.targetResolution){var d=1===c?a.targetResolution:a.sourceResolution+c*(a.targetResolution-a.sourceResolution);if(a.anchor){var p=this.getViewportSize_(this.getRotation()),f=this.constraints_.resolution(d,0,p,!0);this.targetCenter_=this.calculateCenterZoom(f,a.anchor)}this.targetResolution_=d,this.applyTargetState_(!0)}if(void 0!==a.sourceRotation&&void 0!==a.targetRotation){var m=1===c?bk(a.targetRotation+Math.PI,2*Math.PI)-Math.PI:a.sourceRotation+c*(a.targetRotation-a.sourceRotation);if(a.anchor){var g=this.constraints_.rotation(m,!0);this.targetCenter_=this.calculateCenterRotate(g,a.anchor)}this.targetRotation_=m}if(this.applyTargetState_(!0),e=!0,!a.complete)break}}if(r){this.animations_[i]=null,this.setHint(0,-1);var A=n[0].callback;A&&ZW(A,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}},e.prototype.calculateCenterRotate=function(t,e){var i,n,r,s=this.getCenterInternal();return void 0!==s&&(Gk(i=[s[0]-e[0],s[1]-e[1]],t-this.getRotation()),(n=i)[0]+=+(r=e)[0],n[1]+=+r[1]),i},e.prototype.calculateCenterZoom=function(t,e){var i,n=this.getCenterInternal(),r=this.getResolution();return void 0!==n&&void 0!==r&&(i=[e[0]-t*(e[0]-n[0])/r,e[1]-t*(e[1]-n[1])/r]),i},e.prototype.getViewportSize_=function(t){var e=this.viewportSize_;if(t){var i=e[0],n=e[1];return[Math.abs(i*Math.cos(t))+Math.abs(n*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(n*Math.cos(t))]}return e},e.prototype.setViewportSize=function(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)},e.prototype.getCenter=function(){var t=this.getCenterInternal();return t?dE(t,this.getProjection()):t},e.prototype.getCenterInternal=function(){return this.get("center")},e.prototype.getConstraints=function(){return this.constraints_},e.prototype.getConstrainResolution=function(){return this.options_.constrainResolution},e.prototype.getHints=function(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()},e.prototype.calculateExtent=function(t){return fE(this.calculateExtentInternal(t),this.getProjection())},e.prototype.calculateExtentInternal=function(t){var e=t||this.getViewportSize_(),i=this.getCenterInternal();yS(i,1);var n=this.getResolution();yS(void 0!==n,2);var r=this.getRotation();return yS(void 0!==r,3),$S(i,n,r,e)},e.prototype.getMaxResolution=function(){return this.maxResolution_},e.prototype.getMinResolution=function(){return this.minResolution_},e.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},e.prototype.setMaxZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))},e.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},e.prototype.setMinZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))},e.prototype.setConstrainResolution=function(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolution=function(){return this.get("resolution")},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,e){return this.getResolutionForExtentInternal(mE(t,this.getProjection()),e)},e.prototype.getResolutionForExtentInternal=function(t,e){var i=e||this.getViewportSize_(),n=YS(t)/i[0],r=GS(t)/i[1];return Math.max(n,r)},e.prototype.getResolutionForValueFunction=function(t){var e=t||2,i=this.getConstrainedResolution(this.maxResolution_),n=Math.log(i/this.minResolution_)/Math.log(e);return function(t){return i/Math.pow(e,t*n)}},e.prototype.getRotation=function(){return this.get("rotation")},e.prototype.getValueForResolutionFunction=function(t){var e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),n=Math.log(i/this.minResolution_)/e;return function(t){return Math.log(i/t)/e/n}},e.prototype.getViewportSizeMinusPadding_=function(t){var e=this.getViewportSize_(t),i=this.padding;return i&&(e=[e[0]-i[1]-i[3],e[1]-i[0]-i[2]]),e},e.prototype.getState=function(){var t=this.getProjection(),e=this.getResolution(),i=this.getRotation(),n=this.getCenterInternal(),r=this.padding;if(r){var s=this.getViewportSizeMinusPadding_();n=YW(n,this.getViewportSize_(),[s[0]/2+r[3],s[1]/2+r[0]],e,i)}return{center:n.slice(0),projection:void 0!==t?t:null,resolution:e,rotation:i,zoom:this.getZoom()}},e.prototype.getZoom=function(){var t,e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t},e.prototype.getZoomForResolution=function(t){var e,i,n=this.minZoom_||0;if(this.resolutions_){var r=VC(this.resolutions_,t,1);n=r,e=this.resolutions_[r],i=r==this.resolutions_.length-1?2:e/this.resolutions_[r+1]}else e=this.maxResolution_,i=this.zoomFactor_;return n+Math.log(e/t)/Math.log(i)},e.prototype.getResolutionForZoom=function(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;var e=uk(Math.floor(t),0,this.resolutions_.length-2);return this.resolutions_[e]/Math.pow(this.resolutions_[e]/this.resolutions_[e+1],uk(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)},e.prototype.fit=function(t,e){var i;if(yS(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t))yS(!XS(t),25),i=nT(n=mE(t,this.getProjection()));else if("Circle"===t.getType()){var n;(i=nT(n=mE(t.getExtent(),this.getProjection()))).rotate(this.getRotation(),HS(n))}else i=t;this.fitInternal(i,e)},e.prototype.fitInternal=function(t,e){var i=e||{},n=i.size;n||(n=this.getViewportSizeMinusPadding_());var r,s=void 0!==i.padding?i.padding:[0,0,0,0],o=void 0!==i.nearest&&i.nearest;r=void 0!==i.minResolution?i.minResolution:void 0!==i.maxZoom?this.getResolutionForZoom(i.maxZoom):0;for(var a=t.getFlatCoordinates(),l=this.getRotation(),c=Math.cos(-l),h=Math.sin(-l),u=1/0,d=1/0,p=-1/0,f=-1/0,m=t.getStride(),g=0,A=a.length;g<A;g+=m){var b=a[g]*c-a[g+1]*h,v=a[g]*h+a[g+1]*c;u=Math.min(u,b),d=Math.min(d,v),p=Math.max(p,b),f=Math.max(f,v)}var _=this.getResolutionForExtentInternal([u,d,p,f],[n[0]-s[1]-s[3],n[1]-s[0]-s[2]]);_=isNaN(_)?r:Math.max(_,r),_=this.getConstrainedResolution(_,o?0:1);var y=(u+p)/2,w=(d+f)/2,x=this.getConstrainedCenter([(y+=(s[1]-s[3])/2*_)*c-(w+=(s[0]-s[2])/2*_)*(h=-h),w*c+y*h],_),C=i.callback?i.callback:jC;void 0!==i.duration?this.animateInternal({resolution:_,center:x,duration:i.duration,easing:i.easing},C):(this.targetResolution_=_,this.targetCenter_=x,this.applyTargetState_(!1,!0),ZW(C,!0))},e.prototype.centerOn=function(t,e,i){this.centerOnInternal(pE(t,this.getProjection()),e,i)},e.prototype.centerOnInternal=function(t,e,i){this.setCenterInternal(YW(t,e,i,this.getResolution(),this.getRotation()))},e.prototype.calculateCenterShift=function(t,e,i,n){var r,s=this.padding;if(s&&t){var o=this.getViewportSizeMinusPadding_(-i),a=YW(t,n,[o[0]/2+s[3],o[1]/2+s[0]],e,i);r=[t[0]-a[0],t[1]-a[1]]}return r},e.prototype.isDef=function(){return!!this.getCenterInternal()&&void 0!==this.getResolution()},e.prototype.adjustCenter=function(t){var e=dE(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])},e.prototype.adjustCenterInternal=function(t){var e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])},e.prototype.adjustResolution=function(t,e){var i=e&&pE(e,this.getProjection());this.adjustResolutionInternal(t,i)},e.prototype.adjustResolutionInternal=function(t,e){var i=this.getAnimating()||this.getInteracting(),n=this.getViewportSize_(this.getRotation()),r=this.constraints_.resolution(this.targetResolution_*t,0,n,i);e&&(this.targetCenter_=this.calculateCenterZoom(r,e)),this.targetResolution_*=t,this.applyTargetState_()},e.prototype.adjustZoom=function(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)},e.prototype.adjustRotation=function(t,e){e&&(e=pE(e,this.getProjection())),this.adjustRotationInternal(t,e)},e.prototype.adjustRotationInternal=function(t,e){var i=this.getAnimating()||this.getInteracting(),n=this.constraints_.rotation(this.targetRotation_+t,i);e&&(this.targetCenter_=this.calculateCenterRotate(n,e)),this.targetRotation_+=t,this.applyTargetState_()},e.prototype.setCenter=function(t){this.setCenterInternal(pE(t,this.getProjection()))},e.prototype.setCenterInternal=function(t){this.targetCenter_=t,this.applyTargetState_()},e.prototype.setHint=function(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]},e.prototype.setResolution=function(t){this.targetResolution_=t,this.applyTargetState_()},e.prototype.setRotation=function(t){this.targetRotation_=t,this.applyTargetState_()},e.prototype.setZoom=function(t){this.setResolution(this.getResolutionForZoom(t))},e.prototype.applyTargetState_=function(t,e){var i=this.getAnimating()||this.getInteracting()||e,n=this.constraints_.rotation(this.targetRotation_,i),r=this.getViewportSize_(n),s=this.constraints_.resolution(this.targetResolution_,0,r,i),o=this.constraints_.center(this.targetCenter_,s,r,i,this.calculateCenterShift(this.targetCenter_,s,n,r));this.get("rotation")!==n&&this.set("rotation",n),this.get("resolution")!==s&&this.set("resolution",s),this.get("center")&&$k(this.get("center"),o)||this.set("center",o),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0},e.prototype.resolveConstraints=function(t,e,i){var n=void 0!==t?t:200,r=e||0,s=this.constraints_.rotation(this.targetRotation_),o=this.getViewportSize_(s),a=this.constraints_.resolution(this.targetResolution_,r,o),l=this.constraints_.center(this.targetCenter_,a,o,!1,this.calculateCenterShift(this.targetCenter_,a,s,o));if(0===n&&!this.cancelAnchor_)return this.targetResolution_=a,this.targetRotation_=s,this.targetCenter_=l,void this.applyTargetState_();var c=i||(0===n?this.cancelAnchor_:void 0);this.cancelAnchor_=void 0,this.getResolution()===a&&this.getRotation()===s&&this.getCenterInternal()&&$k(this.getCenterInternal(),l)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:s,center:l,resolution:a,duration:n,easing:XC,anchor:c}))},e.prototype.beginInteraction=function(){this.resolveConstraints(0),this.setHint(1,1)},e.prototype.endInteraction=function(t,e,i){var n=i&&pE(i,this.getProjection());this.endInteractionInternal(t,e,n)},e.prototype.endInteractionInternal=function(t,e,i){this.setHint(1,-1),this.resolveConstraints(t,e,i)},e.prototype.getConstrainedCenter=function(t,e){var i=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),i)},e.prototype.getConstrainedZoom=function(t,e){var i=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(i,e))},e.prototype.getConstrainedResolution=function(t,e){var i=e||0,n=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,i,n)},e}(BE),XW=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),JW=function(t){function e(e){var i=t.call(this)||this,n=function(t){var e=null;void 0!==t.keyboardEventTarget&&(e="string"==typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);var i,n,r,s={},o=t.layers&&"function"==typeof t.layers.getLayers?t.layers:new OW({layers:t.layers});return s.layergroup=o,s.target=t.target,s.view=void 0!==t.view?t.view:new QW,void 0!==t.controls&&(Array.isArray(t.controls)?i=new j$(t.controls.slice()):(yS("function"==typeof t.controls.getArray,47),i=t.controls)),void 0!==t.interactions&&(Array.isArray(t.interactions)?n=new j$(t.interactions.slice()):(yS("function"==typeof t.interactions.getArray,48),n=t.interactions)),void 0!==t.overlays?Array.isArray(t.overlays)?r=new j$(t.overlays.slice()):(yS("function"==typeof t.overlays.getArray,49),r=t.overlays):r=new j$,{controls:i,interactions:n,keyboardEventTarget:e,overlays:r,values:s}}(e);return i.boundHandleBrowserEvent_=i.handleBrowserEvent.bind(i),i.maxTilesLoading_=void 0!==e.maxTilesLoading?e.maxTilesLoading:16,i.pixelRatio_=void 0!==e.pixelRatio?e.pixelRatio:aS,i.animationDelay_=(function(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}).bind(i),i.coordinateToPixelTransform_=[1,0,0,1,0,0],i.pixelToCoordinateTransform_=[1,0,0,1,0,0],i.frameIndex_=0,i.frameState_=null,i.previousExtent_=null,i.viewPropertyListenerKey_=null,i.viewChangeListenerKey_=null,i.layerGroupPropertyListenerKeys_=null,i.viewport_=document.createElement("div"),i.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),i.viewport_.style.position="relative",i.viewport_.style.overflow="hidden",i.viewport_.style.width="100%",i.viewport_.style.height="100%",i.overlayContainer_=document.createElement("div"),i.overlayContainer_.style.position="absolute",i.overlayContainer_.style.zIndex="0",i.overlayContainer_.style.width="100%",i.overlayContainer_.style.height="100%",i.overlayContainer_.style.pointerEvents="none",i.overlayContainer_.className="ol-overlaycontainer",i.viewport_.appendChild(i.overlayContainer_),i.overlayContainerStopEvent_=document.createElement("div"),i.overlayContainerStopEvent_.style.position="absolute",i.overlayContainerStopEvent_.style.zIndex="0",i.overlayContainerStopEvent_.style.width="100%",i.overlayContainerStopEvent_.style.height="100%",i.overlayContainerStopEvent_.style.pointerEvents="none",i.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",i.viewport_.appendChild(i.overlayContainerStopEvent_),i.mapBrowserEventHandler_=null,i.moveTolerance_=e.moveTolerance,i.keyboardEventTarget_=n.keyboardEventTarget,i.keyHandlerKeys_=null,i.controls=n.controls||new j$,i.interactions=n.interactions||new j$,i.overlays_=n.overlays,i.overlayIdIndex_={},i.renderer_=null,i.postRenderFunctions_=[],i.tileQueue_=new jW(i.getTilePriority.bind(i),i.handleTileChange_.bind(i)),i.addEventListener(UE("layergroup"),i.handleLayerGroupChanged_),i.addEventListener(UE("view"),i.handleViewChanged_),i.addEventListener(UE("size"),i.handleSizeChanged_),i.addEventListener(UE("target"),i.handleTargetChanged_),i.setProperties(n.values),i.controls.forEach((function(t){t.setMap(this)}).bind(i)),i.controls.addEventListener("add",(function(t){t.element.setMap(this)}).bind(i)),i.controls.addEventListener("remove",(function(t){t.element.setMap(null)}).bind(i)),i.interactions.forEach((function(t){t.setMap(this)}).bind(i)),i.interactions.addEventListener("add",(function(t){t.element.setMap(this)}).bind(i)),i.interactions.addEventListener("remove",(function(t){t.element.setMap(null)}).bind(i)),i.overlays_.forEach(i.addOverlayInternal_.bind(i)),i.overlays_.addEventListener("add",(function(t){this.addOverlayInternal_(t.element)}).bind(i)),i.overlays_.addEventListener("remove",(function(t){var e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)}).bind(i)),i}return XW(e,t),e.prototype.createRenderer=function(){throw new Error("Use a map type that has a createRenderer method")},e.prototype.addControl=function(t){this.getControls().push(t)},e.prototype.addInteraction=function(t){this.getInteractions().push(t)},e.prototype.addLayer=function(t){this.getLayerGroup().getLayers().push(t)},e.prototype.addOverlay=function(t){this.getOverlays().push(t)},e.prototype.addOverlayInternal_=function(t){var e=t.getId();void 0!==e&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)},e.prototype.disposeInternal=function(){this.setTarget(null),t.prototype.disposeInternal.call(this)},e.prototype.forEachFeatureAtPixel=function(t,e,i){if(this.frameState_){var n=this.getCoordinateFromPixelInternal(t);return this.renderer_.forEachFeatureAtCoordinate(n,this.frameState_,void 0!==(i=void 0!==i?i:{}).hitTolerance?i.hitTolerance:0,!1!==i.checkWrapped,e,null,void 0!==i.layerFilter?i.layerFilter:BC,null)}},e.prototype.getFeaturesAtPixel=function(t,e){var i=[];return this.forEachFeatureAtPixel(t,function(t){i.push(t)},e),i},e.prototype.forEachLayerAtPixel=function(t,e,i){if(this.frameState_){var n=i||{};return this.renderer_.forEachLayerAtPixel(t,this.frameState_,void 0!==n.hitTolerance?n.hitTolerance:0,e,n.layerFilter||BC)}},e.prototype.hasFeatureAtPixel=function(t,e){if(!this.frameState_)return!1;var i=this.getCoordinateFromPixelInternal(t);return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,void 0!==(e=void 0!==e?e:{}).hitTolerance?e.hitTolerance:0,!1!==e.checkWrapped,void 0!==e.layerFilter?e.layerFilter:BC,null)},e.prototype.getEventCoordinate=function(t){return this.getCoordinateFromPixel(this.getEventPixel(t))},e.prototype.getEventCoordinateInternal=function(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))},e.prototype.getEventPixel=function(t){var e=this.viewport_.getBoundingClientRect(),i="changedTouches"in t?t.changedTouches[0]:t;return[i.clientX-e.left,i.clientY-e.top]},e.prototype.getTarget=function(){return this.get("target")},e.prototype.getTargetElement=function(){var t=this.getTarget();return void 0!==t?"string"==typeof t?document.getElementById(t):t:null},e.prototype.getCoordinateFromPixel=function(t){return dE(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())},e.prototype.getCoordinateFromPixelInternal=function(t){var e=this.frameState_;return e?lM(e.pixelToCoordinateTransform,t.slice()):null},e.prototype.getControls=function(){return this.controls},e.prototype.getOverlays=function(){return this.overlays_},e.prototype.getOverlayById=function(t){var e=this.overlayIdIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getInteractions=function(){return this.interactions},e.prototype.getLayerGroup=function(){return this.get("layergroup")},e.prototype.getLayers=function(){return this.getLayerGroup().getLayers()},e.prototype.getLoading=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),e=0,i=t.length;e<i;++e){var n=t[e].layer.getSource();if(n&&n.loading)return!0}return!1},e.prototype.getPixelFromCoordinate=function(t){var e=pE(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)},e.prototype.getPixelFromCoordinateInternal=function(t){var e=this.frameState_;return e?lM(e.coordinateToPixelTransform,t.slice(0,2)):null},e.prototype.getRenderer=function(){return this.renderer_},e.prototype.getSize=function(){return this.get("size")},e.prototype.getView=function(){return this.get("view")},e.prototype.getViewport=function(){return this.viewport_},e.prototype.getOverlayContainer=function(){return this.overlayContainer_},e.prototype.getOverlayContainerStopEvent=function(){return this.overlayContainerStopEvent_},e.prototype.getOwnerDocument=function(){return this.getTargetElement()?this.getTargetElement().ownerDocument:document},e.prototype.getTilePriority=function(t,e,i,n){return function(t,e,i,n,r){if(!t||!(i in t.wantedTiles))return UW;if(!t.wantedTiles[i][e.getKey()])return UW;var s=t.viewState.center,o=n[0]-s[0],a=n[1]-s[1];return 65536*Math.log(r)+Math.sqrt(o*o+a*a)/r}(this.frameState_,t,e,i,n)},e.prototype.handleBrowserEvent=function(t,e){var i=new VW(e||t.type,this,t);this.handleMapBrowserEvent(i)},e.prototype.handleMapBrowserEvent=function(t){if(this.frameState_){var e=t.originalEvent,i=e.type;if("pointerdown"===i||"wheel"===i||"keydown"===i){var n=this.getOwnerDocument(),r=this.viewport_.getRootNode?this.viewport_.getRootNode():n,s="host"in r?r.elementFromPoint(e.clientX,e.clientY):e.target;if(this.overlayContainerStopEvent_.contains(s)||!(r===n?n.documentElement:r).contains(s))return}if(t.frameState=this.frameState_,!1!==this.dispatchEvent(t))for(var o=this.getInteractions().getArray().slice(),a=o.length-1;a>=0;a--){var l=o[a];if(l.getMap()===this&&l.getActive()&&this.getTargetElement()&&(!l.handleEvent(t)||t.propagationStopped))break}}},e.prototype.handlePostRender=function(){var t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){var i=this.maxTilesLoading_,n=i;if(t){var r=t.viewHints;if(r[0]||r[1]){var s=!cS&&Date.now()-t.time>8;i=s?0:8,n=s?0:2}}e.getTilesLoading()<i&&(e.reprioritize(),e.loadMoreTiles(i,n))}!t||!this.hasListener("rendercomplete")||t.animate||this.tileQueue_.getTilesLoading()||this.getLoading()||this.renderer_.dispatchRenderEvent("rendercomplete",t);for(var o=this.postRenderFunctions_,a=0,l=o.length;a<l;++a)o[a](this,t);o.length=0},e.prototype.handleSizeChanged_=function(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()},e.prototype.handleTargetChanged_=function(){var t;if(this.getTarget()&&(t=this.getTargetElement()),this.mapBrowserEventHandler_){for(var e=0,i=this.keyHandlerKeys_.length;e<i;++e)ik(this.keyHandlerKeys_[e]);this.keyHandlerKeys_=null,this.viewport_.removeEventListener("contextmenu",this.boundHandleBrowserEvent_),this.viewport_.removeEventListener("wheel",this.boundHandleBrowserEvent_),void 0!==this.handleResize_&&(removeEventListener("resize",this.handleResize_,!1),this.handleResize_=void 0),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,mS(this.viewport_)}if(t){for(var n in t.appendChild(this.viewport_),this.renderer_||(this.renderer_=this.createRenderer()),this.mapBrowserEventHandler_=new LW(this,this.moveTolerance_),$$)this.mapBrowserEventHandler_.addEventListener($$[n],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener("contextmenu",this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener("wheel",this.boundHandleBrowserEvent_,!!hS&&{passive:!1});var r=this.keyboardEventTarget_?this.keyboardEventTarget_:t;this.keyHandlerKeys_=[tk(r,"keydown",this.handleBrowserEvent,this),tk(r,"keypress",this.handleBrowserEvent,this)],this.handleResize_||(this.handleResize_=this.updateSize.bind(this),window.addEventListener("resize",this.handleResize_,!1))}else this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderTimeoutHandle_=void 0,this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0);this.updateSize()},e.prototype.handleTileChange_=function(){this.render()},e.prototype.handleViewPropertyChanged_=function(){this.render()},e.prototype.handleViewChanged_=function(){this.viewPropertyListenerKey_&&(ik(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(ik(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);var t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=tk(t,"propertychange",this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=tk(t,"change",this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()},e.prototype.handleLayerGroupChanged_=function(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(ik),this.layerGroupPropertyListenerKeys_=null);var t=this.getLayerGroup();t&&(this.layerGroupPropertyListenerKeys_=[tk(t,"propertychange",this.render,this),tk(t,"change",this.render,this)]),this.render()},e.prototype.isRendered=function(){return!!this.frameState_},e.prototype.renderSync=function(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()},e.prototype.redrawText=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),e=0,i=t.length;e<i;++e){var n=t[e].layer;n.hasRenderer()&&n.getRenderer().handleFontsChanged()}},e.prototype.render=function(){this.renderer_&&void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))},e.prototype.removeControl=function(t){return this.getControls().remove(t)},e.prototype.removeInteraction=function(t){return this.getInteractions().remove(t)},e.prototype.removeLayer=function(t){return this.getLayerGroup().getLayers().remove(t)},e.prototype.removeOverlay=function(t){return this.getOverlays().remove(t)},e.prototype.renderFrame_=function(t){var e=this,i=this.getSize(),n=this.getView(),r=this.frameState_,s=null;if(void 0!==i&&function(t){return t[0]>0&&t[1]>0}(i)&&n&&n.isDef()){var o=n.getHints(this.frameState_?this.frameState_.viewHints:void 0),a=n.getState();s={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:$S(a.center,a.resolution,a.rotation,i),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:i,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:a,viewHints:o,wantedTiles:{}}}this.frameState_=s,this.renderer_.renderFrame(s),s&&(s.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,s.postRenderFunctions),r&&(!this.previousExtent_||!XS(this.previousExtent_)&&!RS(s.extent,this.previousExtent_))&&(this.dispatchEvent(new TW("movestart",this,r)),this.previousExtent_=OS(this.previousExtent_)),this.previousExtent_&&!s.viewHints[0]&&!s.viewHints[1]&&!RS(s.extent,this.previousExtent_)&&(this.dispatchEvent(new TW("moveend",this,s)),CS(s.extent,this.previousExtent_))),this.dispatchEvent(new TW("postrender",this,s)),this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout(function(){e.postRenderTimeoutHandle_=void 0,e.handlePostRender()},0))},e.prototype.setLayerGroup=function(t){this.set("layergroup",t)},e.prototype.setSize=function(t){this.set("size",t)},e.prototype.setTarget=function(t){this.set("target",t)},e.prototype.setView=function(t){this.set("view",t)},e.prototype.updateSize=function(){var t=this.getTargetElement();if(t){var e=getComputedStyle(t);this.setSize([t.offsetWidth-parseFloat(e.borderLeftWidth)-parseFloat(e.paddingLeft)-parseFloat(e.paddingRight)-parseFloat(e.borderRightWidth),t.offsetHeight-parseFloat(e.borderTopWidth)-parseFloat(e.paddingTop)-parseFloat(e.paddingBottom)-parseFloat(e.borderBottomWidth)])}else this.setSize(void 0);this.updateViewportSize_()},e.prototype.updateViewportSize_=function(){var t=this.getView();if(t){var e=void 0,i=getComputedStyle(this.viewport_);i.width&&i.height&&(e=[parseInt(i.width,10),parseInt(i.height,10)]),t.setViewportSize(e)}},e}(BE),tZ=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),eZ=function(t){function e(e){var i=t.call(this)||this,n=e.element;return!n||e.target||n.style.pointerEvents||(n.style.pointerEvents="auto"),i.element=n||null,i.target_=null,i.map_=null,i.listenerKeys=[],e.render&&(i.render=e.render),e.target&&i.setTarget(e.target),i}return tZ(e,t),e.prototype.disposeInternal=function(){mS(this.element),t.prototype.disposeInternal.call(this)},e.prototype.getMap=function(){return this.map_},e.prototype.setMap=function(t){this.map_&&mS(this.element);for(var e=0,i=this.listenerKeys.length;e<i;++e)ik(this.listenerKeys[e]);this.listenerKeys.length=0,this.map_=t,this.map_&&((this.target_?this.target_:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==jC&&this.listenerKeys.push(tk(t,"postrender",this.render,this)),t.render())},e.prototype.render=function(t){},e.prototype.setTarget=function(t){this.target_="string"==typeof t?document.getElementById(t):t},e}(BE),iZ=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),nZ=function(t){function e(e){var i=this,n=e||{};(i=t.call(this,{element:document.createElement("div"),render:n.render,target:n.target})||this).ulElement_=document.createElement("ul"),i.collapsed_=void 0===n.collapsed||n.collapsed,i.userCollapsed_=i.collapsed_,i.overrideCollapsible_=void 0!==n.collapsible,i.collapsible_=void 0===n.collapsible||n.collapsible,i.collapsible_||(i.collapsed_=!1);var r=void 0!==n.className?n.className:"ol-attribution",s=void 0!==n.tipLabel?n.tipLabel:"Attributions",o=void 0!==n.expandClassName?n.expandClassName:r+"-expand",a=void 0!==n.collapseLabel?n.collapseLabel:"\xbb",l=void 0!==n.collapseClassName?n.collapseClassName:r+"-collpase";"string"==typeof a?(i.collapseLabel_=document.createElement("span"),i.collapseLabel_.textContent=a,i.collapseLabel_.className=l):i.collapseLabel_=a;var c=void 0!==n.label?n.label:"i";"string"==typeof c?(i.label_=document.createElement("span"),i.label_.textContent=c,i.label_.className=o):i.label_=c;var h=i.collapsible_&&!i.collapsed_?i.collapseLabel_:i.label_,u=document.createElement("button");u.setAttribute("type","button"),u.title=s,u.appendChild(h),u.addEventListener("click",i.handleClick_.bind(i),!1);var d=i.element;return d.className=r+" ol-unselectable ol-control"+(i.collapsed_&&i.collapsible_?" ol-collapsed":"")+(i.collapsible_?"":" ol-uncollapsible"),d.appendChild(i.ulElement_),d.appendChild(u),i.renderedAttributions_=[],i.renderedVisible_=!0,i}return iZ(e,t),e.prototype.collectSourceAttributions_=function(t){for(var e={},i=[],n=!0,r=t.layerStatesArray,s=0,o=r.length;s<o;++s){var a=r[s];if(FG(a,t.viewState)){var l=a.layer.getSource();if(l){var c=l.getAttributions();if(c){var h=c(t);if(h)if(n=n&&!1!==l.getAttributionsCollapsible(),Array.isArray(h))for(var u=0,d=h.length;u<d;++u)h[u]in e||(i.push(h[u]),e[h[u]]=!0);else h in e||(i.push(h),e[h]=!0)}}}}return this.overrideCollapsible_||this.setCollapsible(n),i},e.prototype.updateElement_=function(t){if(t){var e=this.collectSourceAttributions_(t),i=e.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!UC(e,this.renderedAttributions_)){gS(this.ulElement_);for(var n=0,r=e.length;n<r;++n){var s=document.createElement("li");s.innerHTML=e[n],this.ulElement_.appendChild(s)}this.renderedAttributions_=e}}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},e.prototype.handleClick_=function(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_},e.prototype.handleToggle_=function(){this.element.classList.toggle("ol-collapsed"),this.collapsed_?fS(this.collapseLabel_,this.label_):fS(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_},e.prototype.getCollapsible=function(){return this.collapsible_},e.prototype.setCollapsible=function(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())},e.prototype.setCollapsed=function(t){this.userCollapsed_=t,this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()},e.prototype.getCollapsed=function(){return this.collapsed_},e.prototype.render=function(t){this.updateElement_(t.frameState)},e}(eZ),rZ=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),sZ=function(t){function e(e){var i=this,n=e||{};i=t.call(this,{element:document.createElement("div"),render:n.render,target:n.target})||this;var r=void 0!==n.className?n.className:"ol-rotate",s=void 0!==n.label?n.label:"\u21e7",o=void 0!==n.compassClassName?n.compassClassName:"ol-compass";i.label_=null,"string"==typeof s?(i.label_=document.createElement("span"),i.label_.className=o,i.label_.textContent=s):(i.label_=s,i.label_.classList.add(o));var a=n.tipLabel?n.tipLabel:"Reset rotation",l=document.createElement("button");l.className=r+"-reset",l.setAttribute("type","button"),l.title=a,l.appendChild(i.label_),l.addEventListener("click",i.handleClick_.bind(i),!1);var c=i.element;return c.className=r+" ol-unselectable ol-control",c.appendChild(l),i.callResetNorth_=n.resetNorth?n.resetNorth:void 0,i.duration_=void 0!==n.duration?n.duration:250,i.autoHide_=void 0===n.autoHide||n.autoHide,i.rotation_=void 0,i.autoHide_&&i.element.classList.add("ol-hidden"),i}return rZ(e,t),e.prototype.handleClick_=function(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()},e.prototype.resetNorth_=function(){var t=this.getMap().getView();if(t){var e=t.getRotation();void 0!==e&&(this.duration_>0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:XC}):t.setRotation(0))}},e.prototype.render=function(t){var e=t.frameState;if(e){var i=e.viewState.rotation;if(i!=this.rotation_){var n="rotate("+i+"rad)";if(this.autoHide_){var r=this.element.classList.contains("ol-hidden");r||0!==i?r&&0!==i&&this.element.classList.remove("ol-hidden"):this.element.classList.add("ol-hidden")}this.label_.style.transform=n}this.rotation_=i}},e}(eZ),oZ=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),aZ=function(t){function e(e){var i=this,n=e||{};i=t.call(this,{element:document.createElement("div"),target:n.target})||this;var r=void 0!==n.className?n.className:"ol-zoom",s=void 0!==n.delta?n.delta:1,o=void 0!==n.zoomInClassName?n.zoomInClassName:r+"-in",a=void 0!==n.zoomOutClassName?n.zoomOutClassName:r+"-out",l=void 0!==n.zoomInLabel?n.zoomInLabel:"+",c=void 0!==n.zoomOutLabel?n.zoomOutLabel:"\u2212",h=void 0!==n.zoomInTipLabel?n.zoomInTipLabel:"Zoom in",u=void 0!==n.zoomOutTipLabel?n.zoomOutTipLabel:"Zoom out",d=document.createElement("button");d.className=o,d.setAttribute("type","button"),d.title=h,d.appendChild("string"==typeof l?document.createTextNode(l):l),d.addEventListener("click",i.handleClick_.bind(i,s),!1);var p=document.createElement("button");p.className=a,p.setAttribute("type","button"),p.title=u,p.appendChild("string"==typeof c?document.createTextNode(c):c),p.addEventListener("click",i.handleClick_.bind(i,-s),!1);var f=i.element;return f.className=r+" ol-unselectable ol-control",f.appendChild(d),f.appendChild(p),i.duration_=void 0!==n.duration?n.duration:250,i}return oZ(e,t),e.prototype.handleClick_=function(t,e){e.preventDefault(),this.zoomByDelta_(t)},e.prototype.zoomByDelta_=function(t){var e=this.getMap().getView();if(e){var i=e.getZoom();if(void 0!==i){var n=e.getConstrainedZoom(i+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:n,duration:this.duration_,easing:XC})):e.setZoom(n)}}},e}(eZ),lZ=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),cZ=function(t){function e(e){return(e=zC({},e)).controls||(e.controls=function(t){var e={},i=new j$;return(void 0===e.zoom||e.zoom)&&i.push(new aZ(e.zoomOptions)),(void 0===e.rotate||e.rotate)&&i.push(new sZ(e.rotateOptions)),(void 0===e.attribution||e.attribution)&&i.push(new nZ(e.attributionOptions)),i}()),e.interactions||(e.interactions=MG({onFocusOnly:!0})),t.call(this,e)||this}return lZ(e,t),e.prototype.createRenderer=function(){return new IW(this)},e}(JW);class hZ{constructor(t){Object.assign(this,t)}static fromOLView(t){return new hZ({zoom:t.getZoom(),center:t.getProperties().center,extent:t.calculateExtent(),resolution:t.getResolution(),minResolution:t.getMinResolution(),maxResolution:t.getMaxResolution(),projection:t.getProjection(),viewportSize:t.viewportSize_})}toURL(){const t=oE(this.center);return`@${t[1].toFixed(7)},${t[0].toFixed(7)},${this.zoom}z`}toLocateEvent(){return new dI({center:this.center,zoom:this.zoom})}}const uZ=["root"],dZ=["*"];let pZ=(()=>{class t extends LT{constructor(t,e,i,n,r,s){super(),this.ngZone=t,this.changeDetectionRef=e,this.mapService=i,this.mapConfigService=n,this.mapStateService=r,this.workerService=s,this.horizontalCenterShiftPixels=0,this.cursor="default",this.viewChange$=new _e.a,this.animatingMinimumZoom=!1}ngOnInit(){this.changeDetectionRef.detach(),this.mapService.init(),this.mapService.locateEvents$.pipe(Rv(),fI(0)).subscribe(t=>{this.ngZone.runOutsideAngular(()=>{if(!function(){const t=document.createElement("canvas");for(const e of fZ)try{const i=t.getContext(e);if(i)return i.getExtension("WEBGL_lose_context").loseContext(),!0}catch($nt){}return!1}())throw new Error("Impossible de r\xe9cup\xe9rer le contexte WebGL. Veuillez rafraichir l'onglet ou fermer puis r\xe9ouvrir votre navigateur.");this.createMap(t.center,t.zoom)})}),this.subscriptions.push(this.workerService.applicationHealth$.pipe(Object(Ge.a)(t=>!!(null==t?void 0:t.maintenance)),mn(),Gg(1)).subscribe(t=>{this.map.updateSize()}))}ngOnDestroy(){super.ngOnDestroy(),this.mapService.destroy()}createMap(t,e){let i=1;this.mapStateService.minimumZoom$.pipe(Rv()).subscribe(t=>{i=t});const n=new QW({minZoom:i,maxZoom:21,smoothResolutionConstraint:!1}),r=this.computeRealCenter(new dI({center:t,zoom:e}),n);n.setCenter(r.center),n.setZoom(r.zoom);const s=new dW;this.map=new cZ({target:this.rootElement.nativeElement,view:n,layers:[s],controls:[],interactions:MG({keyboard:!1,doubleClickZoom:!1,pinchRotate:!1,shiftDragZoom:!1})}),n.on("change",()=>this.viewChange$.next()),n.on("change:resolution",()=>this.viewChange$.next()),this.map.on("pointerdrag",()=>this.viewChange$.next()),this.subscriptions.push(en(this.map,"pointermove").pipe(wm(16,Le,{leading:!1,trailing:!0})).subscribe(t=>{t.dragging?"grabbing"!==this.cursor&&(this.cursor=this.map.getTargetElement().style.cursor="move"):(this.mapService.emitPointerMoveEvent(t),this.map.hasFeatureAtPixel(this.map.getEventPixel(t.originalEvent),{hitTolerance:3,layerFilter:t=>t.selectable})?"pointer"!==this.cursor&&(this.cursor=this.map.getTargetElement().style.cursor="pointer"):"default"!==this.cursor&&(this.cursor=this.map.getTargetElement().style.cursor="default"))})),this.subscriptions.push(en(this.map.getTargetElement(),"mouseup").subscribe(()=>{"default"!==this.cursor&&(this.cursor=this.map.getTargetElement().style.cursor="default")})),this.subscriptions.push(this.mapService.locateEvents$.subscribe(t=>{n.cancelAnimations(),n.animate(this.computeRealCenter(t,n))})),this.subscriptions.push(this.mapService.fitEvents$.subscribe(t=>{n.cancelAnimations(),n.fit(t.polygon,{duration:t.duration,padding:[100,100,100,100+this.horizontalCenterShiftPixels]})})),this.subscriptions.push(this.mapService.zoomEvents$.subscribe(t=>{const e=n.getConstrainedResolution(n.getResolutionForZoom(n.getZoom()+t));n.cancelAnimations();const i=n.getCenter();n.animate({resolution:e,center:[i[0]+this.horizontalCenterShiftPixels/2*(t>0?1:-.5)*e,i[1]],duration:250,easing:XC})})),this.subscriptions.push(this.mapConfigService.preloadMapTiles$.subscribe(t=>{s.setPreload(t?1/0:0)}),this.mapConfigService.baseLayer$.subscribe(t=>{s.setSource(t.source)})),this.subscriptions.push(this.mapStateService.minimumZoom$.pipe(Gg(1),Be(60)).subscribe(t=>{t!==n.getMinZoom()&&(n.getZoom()<t?(this.animatingMinimumZoom=!0,n.cancelAnimations(),n.animate({zoom:t,duration:250,easing:XC}),setTimeout(()=>{n.setMinZoom(t),this.animatingMinimumZoom=!1,this.viewChange$.next()},250)):n.setMinZoom(t))})),this.subscriptions.push(this.viewChange$.pipe(He(()=>!this.animatingMinimumZoom),wm(50,Le,{leading:!1,trailing:!0})).subscribe(()=>{this.mapService.updateViewState(hZ.fromOLView(this.map.getView()))}));const o=AT(10).subscribe(()=>{this.map.isRendered()?(this.viewChange$.next(),o.unsubscribe()):this.map.updateSize()});fD.a.production||(window.map=this.map)}onWindowResize(){this.map&&this.viewChange$.next()}computeRealCenter(t,e){const i=t.zoom?e.getResolutionForZoom(t.zoom):e.getResolution();return t.center[0]-=this.horizontalCenterShiftPixels/2*i,t}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.B),r.Pb(r.h),r.Pb(pI),r.Pb(hI),r.Pb(gT),r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-map"]],viewQuery:function(t,e){if(1&t&&r.Pc(uZ,3),2&t){let t;r.vc(t=r.dc())&&(e.rootElement=t.first)}},hostBindings:function(t,e){1&t&&r.cc("resize",function(){return e.onWindowResize()},!1,r.zc)},inputs:{horizontalCenterShiftPixels:"horizontalCenterShiftPixels"},exportAs:["map"],features:[r.Ab],ngContentSelectors:dZ,decls:3,vars:0,consts:[[1,"map"],["root",""]],template:function(t,e){1&t&&(r.mc(),r.Vb(0,"div",0,1),r.lc(2),r.Ub())},styles:[".map[_ngcontent-%COMP%]{width:100%;height:100%;position:absolute;overflow:hidden}"],changeDetection:0}),t})();const fZ=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function mZ(t,e){if(1&t&&(r.Vb(0,"div",10),r.Vb(1,"mat-icon",11),r.Kc(2,"access_time"),r.Ub(),r.Vb(3,"div",12),r.hc(4,"timeago"),r.Kc(5),r.hc(6,"date"),r.Ub(),r.Ub()),2&t){const t=r.gc();r.Db(3),r.oc("title",r.ic(4,2,1e3*t.aircraft.timestamp)),r.Db(2),r.Mc(" ",r.kc(6,4,1e3*t.aircraft.timestamp,"yyyy-MM-dd HH:mm:ss z",t.useUTCDates&&"z")," ")}}let gZ=(()=>{class t extends LT{constructor(t,e){super(),this.changeDetectorRef=t,this.mapConfigService=e,this.showTimestamp=!1,this.useUTCDates=!1}ngOnInit(){this.ensureMandatoryInputParams("aircraft"),this.subscriptions.push(this.mapConfigService.useUTCDates$.subscribe(t=>{this.useUTCDates=t,this.changeDetectorRef.markForCheck()}))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-aircraft-item-small"]],inputs:{aircraft:"aircraft",showTimestamp:"showTimestamp"},features:[r.Ab],decls:23,vars:8,consts:[[1,"aircraft-item"],[1,"aircraft-item__col1"],[1,"u-flex","d-flex-center"],[1,"aircraft-item__flag",3,"flag"],[1,"d-flex-column"],[1,"aircraft-item__name"],[1,"aircraft-item__type"],["class","aircraft-item__timestamp","title","Derni\xe8re r\xe9ception",4,"ngIf"],[1,"aircraft-item__col2"],[1,"aircraft-item__label"],["title","Derni\xe8re r\xe9ception",1,"aircraft-item__timestamp"],[1,"mini-icon","mr-1"],[3,"title"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"div",2),r.Qb(3,"app-flag",3),r.Vb(4,"div",4),r.Vb(5,"strong",5),r.Kc(6),r.Ub(),r.Vb(7,"small",6),r.Kc(8),r.Ub(),r.Ub(),r.Ub(),r.Ic(9,mZ,7,8,"div",7),r.Ub(),r.Vb(10,"div",8),r.Vb(11,"div"),r.Vb(12,"span",9),r.Kc(13,"ICAO"),r.Ub(),r.Kc(14),r.Ub(),r.Vb(15,"div"),r.Vb(16,"span",9),r.Kc(17,"Reg"),r.Ub(),r.Kc(18),r.Ub(),r.Vb(19,"div"),r.Vb(20,"span",9),r.Kc(21,"Callsign"),r.Ub(),r.Kc(22),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(3),r.nc("flag",e.aircraft.country.flag),r.Db(3),r.Nc("",e.aircraft.callsign||"?"," / ",e.aircraft.icao,""),r.Db(2),r.Lc(e.aircraft.type||"?"),r.Db(1),r.nc("ngIf",e.showTimestamp),r.Db(5),r.Mc(" ",e.aircraft.icao,""),r.Db(4),r.Mc(" ",e.aircraft.registration||"?",""),r.Db(4),r.Mc(" ",e.aircraft.callsign||"?",""))},directives:[GF,ut,Yp],pipes:[Tx,kt],styles:["[_nghost-%COMP%]{flex:1;display:block;position:relative}.aircraft-item[_ngcontent-%COMP%]{font-size:12px;line-height:16px;display:flex}.aircraft-item__col1[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column}.aircraft-item__col2[_ngcontent-%COMP%]{display:flex;flex-direction:column;text-align:right}.aircraft-item__flag[_ngcontent-%COMP%]{margin-right:4px}.aircraft-item__name[_ngcontent-%COMP%]{font-size:14px}.aircraft-item__type[_ngcontent-%COMP%]{line-height:1em;font-size:11px}.aircraft-item__timestamp[_ngcontent-%COMP%]{margin-top:4px;display:flex;align-items:center;color:grey}.aircraft-item__timestamp[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%]{font-size:1em;height:1em;width:1em;margin-right:.3em;margin-left:.3em}.aircraft-item__label[_ngcontent-%COMP%]{color:grey;font-size:10px}"],changeDetection:0}),t})();function AZ(t,e){1&t&&(r.Vb(0,"div",9),r.Kc(1," Chargement en cours... "),r.Ub())}function bZ(t,e){if(1&t&&(r.Vb(0,"div",10),r.Kc(1),r.Ub()),2&t){const t=r.gc(2);r.Db(1),r.Mc(" ",t.entitySelection.error," ")}}function vZ(t,e){if(1&t&&(r.Ic(0,AZ,2,0,"div",7),r.Ic(1,bZ,2,1,"div",8)),2&t){const t=r.gc();r.nc("ngIf",!t.entitySelection.error),r.Db(1),r.nc("ngIf",t.entitySelection.error)}}function _Z(t,e){if(1&t&&r.Qb(0,"app-ship-item-small",13),2&t){const t=r.gc(2);r.nc("ship",t.entitySelection.entity)("showTimestamp",!0)}}function yZ(t,e){if(1&t&&r.Qb(0,"app-aircraft-item-small",14),2&t){const t=r.gc(2);r.nc("aircraft",t.entitySelection.entity)("showTimestamp",!0)}}function wZ(t,e){if(1&t&&(r.Ic(0,_Z,1,2,"app-ship-item-small",11),r.Ic(1,yZ,1,2,"app-aircraft-item-small",12)),2&t){const t=r.gc();r.nc("ngIf",t.entitySelection.type===t.EntityType.Ship),r.Db(1),r.nc("ngIf",t.entitySelection.type===t.EntityType.Aircraft)}}const xZ=function(t,e){return[t,e]};let CZ=(()=>{class t extends LT{constructor(t,e){super(),this.mapService=t,this.selectionService=e,this.EntityType=OP,this.hasPosition=!0}ngOnChanges(t){var e,i,n,r;t.entitySelection&&(this.hasPosition=FD(null===(i=null===(e=t.entitySelection.currentValue)||void 0===e?void 0:e.entity)||void 0===i?void 0:i.lon)&&FD(null===(r=null===(n=t.entitySelection.currentValue)||void 0===n?void 0:n.entity)||void 0===r?void 0:r.lat))}locate(){this.mapService.pingLocation([this.entitySelection.entity.lon,this.entitySelection.entity.lat]),this.mapService.centerOnLonLat([this.entitySelection.entity.lon,this.entitySelection.entity.lat])}locateAndZoom(){this.mapService.locate([this.entitySelection.entity.lon,this.entitySelection.entity.lat])}removeSelection(){return Object(ue.a)(this,void 0,void 0,function*(){yield this.selectionService.toggleSelection(this.entitySelection.type,this.entitySelection.id)})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(pI),r.Pb(xT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-entity-selection"]],inputs:{entitySelection:"entitySelection"},features:[r.Ab,r.Bb],decls:15,vars:9,consts:[[1,"entity-selection","mat-elevation-z8"],[1,"entity-selection__background-icon"],[3,"ngIf"],[1,"d-flex"],["mat-button","",1,"entity-selection__action",3,"title","disabled","click","dblclick"],["mat-button","","title","Ouvrir la fiche d\xe9taill\xe9e",1,"entity-selection__action",3,"routerLink"],["mat-button","","title","Supprimer de la s\xe9lection",1,"entity-selection__action",3,"click"],["class","pa-3 u-relative u-flex",4,"ngIf"],["class","pa-1 u-relative u-flex error-message mat-small",4,"ngIf"],[1,"pa-3","u-relative","u-flex"],[1,"pa-1","u-relative","u-flex","error-message","mat-small"],["class","pa-1",3,"ship","showTimestamp",4,"ngIf"],["class","pa-1",3,"aircraft","showTimestamp",4,"ngIf"],[1,"pa-1",3,"ship","showTimestamp"],[1,"pa-1",3,"aircraft","showTimestamp"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"mat-icon",1),r.Kc(2),r.Ub(),r.Ic(3,vZ,2,2,"ng-template",2),r.Ic(4,wZ,2,2,"ng-template",2),r.Vb(5,"div",3),r.Vb(6,"button",4),r.cc("click",function(){return e.locate()})("dblclick",function(){return e.locateAndZoom()}),r.Vb(7,"mat-icon"),r.Kc(8,"center_focus_strong"),r.Ub(),r.Ub(),r.Vb(9,"button",5),r.Vb(10,"mat-icon"),r.Kc(11,"info"),r.Ub(),r.Ub(),r.Vb(12,"button",6),r.cc("click",function(){return e.removeSelection()}),r.Vb(13,"mat-icon"),r.Kc(14,"close"),r.Ub(),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(2),r.Lc(e.entitySelection.type===e.EntityType.Ship?"directions_boat":"flight"),r.Db(1),r.nc("ngIf",!e.entitySelection.entity),r.Db(1),r.nc("ngIf",e.entitySelection.entity),r.Db(2),r.nc("title",e.hasPosition?"Centrer la vue (double-clic = zoom)":"Ce navire n'a pas de position")("disabled",!e.entitySelection.entity||!e.hasPosition),r.Db(3),r.nc("routerLink",r.tc(6,xZ,e.entitySelection.type+"s",e.entitySelection.id)))},directives:[Yp,ut,Dl,ow,Lz,gZ],styles:["[_nghost-%COMP%]{display:block}.entity-selection[_ngcontent-%COMP%], [_nghost-%COMP%]{position:relative;overflow:hidden}.entity-selection[_ngcontent-%COMP%]{background-color:#f7f7f7;width:292px;min-height:93px;margin-bottom:8px;display:flex;flex-direction:column;pointer-events:all}.entity-selection__background-icon[_ngcontent-%COMP%]{position:absolute;font-size:136px;left:-64px;color:#ededed;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.entity-selection__action[_ngcontent-%COMP%]{flex:1;min-width:inherit;padding:inherit}"],changeDetection:0}),t})();var SZ=i("JaUx"),kZ=i.n(SZ),EZ=function(){function t(t){this.rbush_=new kZ.a(t),this.items_={}}return t.prototype.insert=function(t,e){var i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(i),this.items_[YC(e)]=i},t.prototype.load=function(t,e){for(var i=new Array(e.length),n=0,r=e.length;n<r;n++){var s=t[n],o=e[n],a={minX:s[0],minY:s[1],maxX:s[2],maxY:s[3],value:o};i[n]=a,this.items_[YC(o)]=a}this.rbush_.load(i)},t.prototype.remove=function(t){var e=YC(t),i=this.items_[e];return delete this.items_[e],null!==this.rbush_.remove(i)},t.prototype.update=function(t,e){var i=this.items_[YC(e)];RS([i.minX,i.minY,i.maxX,i.maxY],t)||(this.remove(e),this.insert(t,e))},t.prototype.getAll=function(){return this.rbush_.all().map(function(t){return t.value})},t.prototype.getInExtent=function(t){return this.rbush_.search({minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}).map(function(t){return t.value})},t.prototype.forEach=function(t){return this.forEach_(this.getAll(),t)},t.prototype.forEachInExtent=function(t,e){return this.forEach_(this.getInExtent(t),e)},t.prototype.forEach_=function(t,e){for(var i,n=0,r=t.length;n<r;n++)if(i=e(t[n]))return i;return i},t.prototype.isEmpty=function(){return $C(this.items_)},t.prototype.clear=function(){this.rbush_.clear(),this.items_={}},t.prototype.getExtent=function(t){var e=this.rbush_.toJSON();return PS(e.minX,e.minY,e.maxX,e.maxY,t)},t.prototype.concat=function(t){for(var e in this.rbush_.load(t.rbush_.all()),t.items_)this.items_[e]=t.items_[e]},t}(),DZ=function(){function t(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=ZE(t.scale),this.displacement_=t.displacement}return t.prototype.clone=function(){var e=this.getScale();return new t({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()})},t.prototype.getOpacity=function(){return this.opacity_},t.prototype.getRotateWithView=function(){return this.rotateWithView_},t.prototype.getRotation=function(){return this.rotation_},t.prototype.getScale=function(){return this.scale_},t.prototype.getScaleArray=function(){return this.scaleArray_},t.prototype.getDisplacement=function(){return this.displacement_},t.prototype.getAnchor=function(){return ZC()},t.prototype.getImage=function(t){return ZC()},t.prototype.getHitDetectionImage=function(){return ZC()},t.prototype.getPixelRatio=function(t){return 1},t.prototype.getImageState=function(){return ZC()},t.prototype.getImageSize=function(){return ZC()},t.prototype.getHitDetectionImageSize=function(){return ZC()},t.prototype.getOrigin=function(){return ZC()},t.prototype.getSize=function(){return ZC()},t.prototype.setOpacity=function(t){this.opacity_=t},t.prototype.setRotateWithView=function(t){this.rotateWithView_=t},t.prototype.setRotation=function(t){this.rotation_=t},t.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=ZE(t)},t.prototype.listenImageChange=function(t){ZC()},t.prototype.load=function(){ZC()},t.prototype.unlistenImageChange=function(t){ZC()},t}();function IZ(t){return Array.isArray(t)?wW(t):t}var PZ=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),OZ=function(t){function e(e){var i=this;return(i=t.call(this,{opacity:1,rotateWithView:void 0!==e.rotateWithView&&e.rotateWithView,rotation:void 0!==e.rotation?e.rotation:0,scale:void 0!==e.scale?e.scale:1,displacement:void 0!==e.displacement?e.displacement:[0,0]})||this).canvas_={},i.hitDetectionCanvas_=null,i.fill_=void 0!==e.fill?e.fill:null,i.origin_=[0,0],i.points_=e.points,i.radius_=void 0!==e.radius?e.radius:e.radius1,i.radius2_=e.radius2,i.angle_=void 0!==e.angle?e.angle:0,i.stroke_=void 0!==e.stroke?e.stroke:null,i.anchor_=null,i.size_=null,i.imageSize_=null,i.hitDetectionImageSize_=null,i.render(),i}return PZ(e,t),e.prototype.clone=function(){var t=this.getScale(),i=new e({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice()});return i.setOpacity(this.getOpacity()),i},e.prototype.getAnchor=function(){return this.anchor_},e.prototype.getAngle=function(){return this.angle_},e.prototype.getFill=function(){return this.fill_},e.prototype.getHitDetectionImage=function(){if(!this.hitDetectionCanvas_){var t=this.createRenderOptions();this.createHitDetectionCanvas_(t)}return this.hitDetectionCanvas_},e.prototype.getImage=function(t){if(!this.canvas_[t||1]){var e=this.createRenderOptions(),i=uS(e.size*t||1,e.size*t||1);this.draw_(e,i,0,0,t||1),this.canvas_[t||1]=i.canvas}return this.canvas_[t||1]},e.prototype.getPixelRatio=function(t){return t},e.prototype.getImageSize=function(){return this.imageSize_},e.prototype.getHitDetectionImageSize=function(){return this.hitDetectionImageSize_},e.prototype.getImageState=function(){return 2},e.prototype.getOrigin=function(){return this.origin_},e.prototype.getPoints=function(){return this.points_},e.prototype.getRadius=function(){return this.radius_},e.prototype.getRadius2=function(){return this.radius2_},e.prototype.getSize=function(){return this.size_},e.prototype.getStroke=function(){return this.stroke_},e.prototype.listenImageChange=function(t){},e.prototype.load=function(){},e.prototype.unlistenImageChange=function(t){},e.prototype.createRenderOptions=function(){var t,e="round",i="round",n=0,r=null,s=0,o=0;return this.stroke_&&(null===(t=this.stroke_.getColor())&&(t="#000"),t=IZ(t),void 0===(o=this.stroke_.getWidth())&&(o=1),r=this.stroke_.getLineDash(),s=this.stroke_.getLineDashOffset(),void 0===(i=this.stroke_.getLineJoin())&&(i="round"),void 0===(e=this.stroke_.getLineCap())&&(e="round"),void 0===(n=this.stroke_.getMiterLimit())&&(n=10)),{strokeStyle:t,strokeWidth:o,size:2*(this.radius_+o)+1,lineCap:e,lineDash:r,lineDashOffset:s,lineJoin:i,miterLimit:n}},e.prototype.render=function(){var t=this.createRenderOptions(),e=uS(t.size,t.size);this.draw_(t,e,0,0,1),this.canvas_={},this.canvas_[1]=e.canvas;var i=e.canvas.width,n=i,r=this.getDisplacement();this.hitDetectionImageSize_=[t.size,t.size],this.createHitDetectionCanvas_(t),this.anchor_=[i/2-r[0],i/2+r[1]],this.size_=[i,i],this.imageSize_=[n,n]},e.prototype.draw_=function(t,e,i,n,r){var s,o,a;e.setTransform(r,0,0,r,0,0),e.translate(i,n),e.beginPath();var l=this.points_;if(l===1/0)e.arc(t.size/2,t.size/2,this.radius_,0,2*Math.PI,!0);else{var c=void 0!==this.radius2_?this.radius2_:this.radius_;for(c!==this.radius_&&(l*=2),s=0;s<=l;s++)o=2*s*Math.PI/l-Math.PI/2+this.angle_,e.lineTo(t.size/2+(a=s%2==0?this.radius_:c)*Math.cos(o),t.size/2+a*Math.sin(o))}if(this.fill_){var h=this.fill_.getColor();null===h&&(h="#000"),e.fillStyle=IZ(h),e.fill()}this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,e.setLineDash&&t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineCap=t.lineCap,e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke()),e.closePath()},e.prototype.createHitDetectionCanvas_=function(t){if(this.hitDetectionCanvas_=this.getImage(1),this.fill_){var e=this.fill_.getColor(),i=0;if("string"==typeof e&&(e=_W(e)),null===e?i=1:Array.isArray(e)&&(i=4===e.length?e[3]:1),0===i){var n=uS(t.size,t.size);this.hitDetectionCanvas_=n.canvas,this.drawHitDetectionCanvas_(t,n,0,0)}}},e.prototype.drawHitDetectionCanvas_=function(t,e,i,n){e.translate(i,n),e.beginPath();var r=this.points_;if(r===1/0)e.arc(t.size/2,t.size/2,this.radius_,0,2*Math.PI,!0);else{var s=void 0!==this.radius2_?this.radius2_:this.radius_;s!==this.radius_&&(r*=2);var o=void 0,a=void 0,l=void 0;for(o=0;o<=r;o++)l=2*o*Math.PI/r-Math.PI/2+this.angle_,e.lineTo(t.size/2+(a=o%2==0?this.radius_:s)*Math.cos(l),t.size/2+a*Math.sin(l))}e.fillStyle="#000",e.fill(),this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.stroke()),e.closePath()},e}(DZ),MZ=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),TZ=function(t){function e(e){var i=e||{};return t.call(this,{points:1/0,fill:i.fill,radius:i.radius,stroke:i.stroke,scale:void 0!==i.scale?i.scale:1,rotation:void 0!==i.rotation?i.rotation:0,rotateWithView:void 0!==i.rotateWithView&&i.rotateWithView,displacement:void 0!==i.displacement?i.displacement:[0,0]})||this}return MZ(e,t),e.prototype.clone=function(){var t=this.getScale(),i=new e({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()});return i.setOpacity(this.getOpacity()),i},e.prototype.setRadius=function(t){this.radius_=t,this.render()},e}(OZ),RZ=function(){function t(t){var e=t||{};this.color_=void 0!==e.color?e.color:null}return t.prototype.clone=function(){var e=this.getColor();return new t({color:Array.isArray(e)?e.slice():e||void 0})},t.prototype.getColor=function(){return this.color_},t.prototype.setColor=function(t){this.color_=t},t}(),VZ=function(){function t(t){var e=t||{};this.color_=void 0!==e.color?e.color:null,this.lineCap_=e.lineCap,this.lineDash_=void 0!==e.lineDash?e.lineDash:null,this.lineDashOffset_=e.lineDashOffset,this.lineJoin_=e.lineJoin,this.miterLimit_=e.miterLimit,this.width_=e.width}return t.prototype.clone=function(){var e=this.getColor();return new t({color:Array.isArray(e)?e.slice():e||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})},t.prototype.getColor=function(){return this.color_},t.prototype.getLineCap=function(){return this.lineCap_},t.prototype.getLineDash=function(){return this.lineDash_},t.prototype.getLineDashOffset=function(){return this.lineDashOffset_},t.prototype.getLineJoin=function(){return this.lineJoin_},t.prototype.getMiterLimit=function(){return this.miterLimit_},t.prototype.getWidth=function(){return this.width_},t.prototype.setColor=function(t){this.color_=t},t.prototype.setLineCap=function(t){this.lineCap_=t},t.prototype.setLineDash=function(t){this.lineDash_=t},t.prototype.setLineDashOffset=function(t){this.lineDashOffset_=t},t.prototype.setLineJoin=function(t){this.lineJoin_=t},t.prototype.setMiterLimit=function(t){this.miterLimit_=t},t.prototype.setWidth=function(t){this.width_=t},t}(),FZ=function(){function t(t){var e=t||{};this.geometry_=null,this.geometryFunction_=NZ,void 0!==e.geometry&&this.setGeometry(e.geometry),this.fill_=void 0!==e.fill?e.fill:null,this.image_=void 0!==e.image?e.image:null,this.renderer_=void 0!==e.renderer?e.renderer:null,this.stroke_=void 0!==e.stroke?e.stroke:null,this.text_=void 0!==e.text?e.text:null,this.zIndex_=e.zIndex}return t.prototype.clone=function(){var e=this.getGeometry();return e&&"object"==typeof e&&(e=e.clone()),new t({geometry:e,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},t.prototype.getRenderer=function(){return this.renderer_},t.prototype.setRenderer=function(t){this.renderer_=t},t.prototype.getGeometry=function(){return this.geometry_},t.prototype.getGeometryFunction=function(){return this.geometryFunction_},t.prototype.getFill=function(){return this.fill_},t.prototype.setFill=function(t){this.fill_=t},t.prototype.getImage=function(){return this.image_},t.prototype.setImage=function(t){this.image_=t},t.prototype.getStroke=function(){return this.stroke_},t.prototype.setStroke=function(t){this.stroke_=t},t.prototype.getText=function(){return this.text_},t.prototype.setText=function(t){this.text_=t},t.prototype.getZIndex=function(){return this.zIndex_},t.prototype.setGeometry=function(t){"function"==typeof t?this.geometryFunction_=t:"string"==typeof t?this.geometryFunction_=function(e){return e.get(t)}:t?void 0!==t&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=NZ,this.geometry_=t},t.prototype.setZIndex=function(t){this.zIndex_=t},t}(),LZ=null;function UZ(t,e){if(!LZ){var i=new RZ({color:"rgba(255,255,255,0.4)"}),n=new VZ({color:"#3399CC",width:1.25});LZ=[new FZ({image:new TZ({fill:i,stroke:n,radius:5}),fill:i,stroke:n})]}return LZ}function BZ(){var t={},e=[255,255,255,1],i=[0,153,255,1];return t.Polygon=[new FZ({fill:new RZ({color:[255,255,255,.5]})})],t.MultiPolygon=t.Polygon,t.LineString=[new FZ({stroke:new VZ({color:e,width:5})}),new FZ({stroke:new VZ({color:i,width:3})})],t.MultiLineString=t.LineString,t.Circle=t.Polygon.concat(t.LineString),t.Point=[new FZ({image:new TZ({radius:6,fill:new RZ({color:i}),stroke:new VZ({color:e,width:1.5})}),zIndex:1/0})],t.MultiPoint=t.Point,t.GeometryCollection=t.Polygon.concat(t.LineString,t.Point),t}function NZ(t){return t.getGeometry()}var jZ=FZ,zZ=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),HZ=function(t){function e(e){var i=this,n=e||{},r=zC({},n);return delete r.style,delete r.renderBuffer,delete r.updateWhileAnimating,delete r.updateWhileInteracting,(i=t.call(this,r)||this).declutter_=void 0!==n.declutter&&n.declutter,i.renderBuffer_=void 0!==n.renderBuffer?n.renderBuffer:100,i.style_=null,i.styleFunction_=void 0,i.setStyle(n.style),i.updateWhileAnimating_=void 0!==n.updateWhileAnimating&&n.updateWhileAnimating,i.updateWhileInteracting_=void 0!==n.updateWhileInteracting&&n.updateWhileInteracting,i}return zZ(e,t),e.prototype.getDeclutter=function(){return this.declutter_},e.prototype.getFeatures=function(e){return t.prototype.getFeatures.call(this,e)},e.prototype.getRenderBuffer=function(){return this.renderBuffer_},e.prototype.getRenderOrder=function(){return this.get("renderOrder")},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.getUpdateWhileAnimating=function(){return this.updateWhileAnimating_},e.prototype.getUpdateWhileInteracting=function(){return this.updateWhileInteracting_},e.prototype.renderDeclutter=function(t){t.declutterTree||(t.declutterTree=new kZ.a(9)),this.getRenderer().renderDeclutter(t)},e.prototype.setRenderOrder=function(t){this.set("renderOrder",t)},e.prototype.setStyle=function(t){var e,i,n;this.style_=void 0!==t?t:UZ,this.styleFunction_=null===t?void 0:("function"==typeof(e=this.style_)?i=e:(Array.isArray(e)?n=e:(yS("function"==typeof e.getZIndex,41),n=[e]),i=function(){return n}),i),this.changed()},e}(LG),KZ={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},$Z=[KZ.FILL],GZ=[KZ.STROKE],WZ=[KZ.BEGIN_PATH],ZZ=[KZ.CLOSE_PATH],qZ=KZ,YZ=function(){function t(){}return t.prototype.drawCustom=function(t,e,i){},t.prototype.drawGeometry=function(t){},t.prototype.setStyle=function(t){},t.prototype.drawCircle=function(t,e){},t.prototype.drawFeature=function(t,e){},t.prototype.drawGeometryCollection=function(t,e){},t.prototype.drawLineString=function(t,e){},t.prototype.drawMultiLineString=function(t,e){},t.prototype.drawMultiPoint=function(t,e){},t.prototype.drawMultiPolygon=function(t,e){},t.prototype.drawPoint=function(t,e){},t.prototype.drawPolygon=function(t,e){},t.prototype.drawText=function(t,e){},t.prototype.setFillStrokeStyle=function(t,e){},t.prototype.setImageStyle=function(t,e){},t.prototype.setTextStyle=function(t,e){},t}(),QZ=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),XZ=function(t){function e(e,i,n,r){var s=t.call(this)||this;return s.tolerance=e,s.maxExtent=i,s.pixelRatio=r,s.maxLineWidth=0,s.resolution=n,s.beginGeometryInstruction1_=null,s.beginGeometryInstruction2_=null,s.bufferedMaxExtent_=null,s.instructions=[],s.coordinates=[],s.tmpCoordinate_=[],s.hitDetectionInstructions=[],s.state={},s}return QZ(e,t),e.prototype.applyPixelRatio=function(t){var e=this.pixelRatio;return 1==e?t:t.map(function(t){return t*e})},e.prototype.appendFlatPointCoordinates=function(t,e){for(var i=this.getBufferedMaxExtent(),n=this.tmpCoordinate_,r=this.coordinates,s=r.length,o=0,a=t.length;o<a;o+=e)n[0]=t[o],n[1]=t[o+1],kS(i,n)&&(r[s++]=n[0],r[s++]=n[1]);return s},e.prototype.appendFlatLineCoordinates=function(t,e,i,n,r,s){var o=this.coordinates,a=o.length,l=this.getBufferedMaxExtent();s&&(e+=n);var c,h,u,d=t[e],p=t[e+1],f=this.tmpCoordinate_,m=!0;for(c=e+n;c<i;c+=n)f[0]=t[c],f[1]=t[c+1],(u=IS(l,f))!==h?(m&&(o[a++]=d,o[a++]=p,m=!1),o[a++]=f[0],o[a++]=f[1]):1===u?(o[a++]=f[0],o[a++]=f[1],m=!1):m=!0,d=f[0],p=f[1],h=u;return(r&&m||c===e+n)&&(o[a++]=d,o[a++]=p),a},e.prototype.drawCustomCoordinates_=function(t,e,i,n,r){for(var s=0,o=i.length;s<o;++s){var a=i[s],l=this.appendFlatLineCoordinates(t,e,a,n,!1,!1);r.push(l),e=a}return e},e.prototype.drawCustom=function(t,e,i){this.beginGeometry(t,e);var n,r,s,o,a,l=t.getType(),c=t.getStride(),h=this.coordinates.length;if("MultiPolygon"==l){n=t.getOrientedFlatCoordinates(),o=[];var u=t.getEndss();a=0;for(var d=0,p=u.length;d<p;++d){var f=[];a=this.drawCustomCoordinates_(n,a,u[d],c,f),o.push(f)}this.instructions.push([qZ.CUSTOM,h,o,t,i,VM])}else"Polygon"==l||"MultiLineString"==l?(s=[],n="Polygon"==l?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),a=this.drawCustomCoordinates_(n,0,t.getEnds(),c,s),this.instructions.push([qZ.CUSTOM,h,s,t,i,RM])):"LineString"==l||"Circle"==l?(n=t.getFlatCoordinates(),r=this.appendFlatLineCoordinates(n,0,n.length,c,!1,!1),this.instructions.push([qZ.CUSTOM,h,r,t,i,TM])):"MultiPoint"==l?(n=t.getFlatCoordinates(),(r=this.appendFlatPointCoordinates(n,c))>h&&this.instructions.push([qZ.CUSTOM,h,r,t,i,TM])):"Point"==l&&(n=t.getFlatCoordinates(),this.coordinates.push(n[0],n[1]),this.instructions.push([qZ.CUSTOM,h,r=this.coordinates.length,t,i]));this.endGeometry(e)},e.prototype.beginGeometry=function(t,e){this.beginGeometryInstruction1_=[qZ.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[qZ.BEGIN_GEOMETRY,e,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},e.prototype.finish=function(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}},e.prototype.reverseHitDetectionInstructions=function(){var t,e=this.hitDetectionInstructions;e.reverse();var i,n,r=e.length,s=-1;for(t=0;t<r;++t)(n=(i=e[t])[0])==qZ.END_GEOMETRY?s=t:n==qZ.BEGIN_GEOMETRY&&(i[2]=t,FC(this.hitDetectionInstructions,s,t),s=-1)},e.prototype.setFillStrokeStyle=function(t,e){var i=this.state;if(t){var n=t.getColor();i.fillStyle=IZ(n||"#000")}else i.fillStyle=void 0;if(e){var r=e.getColor();i.strokeStyle=IZ(r||"#000");var s=e.getLineCap();i.lineCap=void 0!==s?s:"round";var o=e.getLineDash();i.lineDash=o?o.slice():WG;var a=e.getLineDashOffset();i.lineDashOffset=a||0;var l=e.getLineJoin();i.lineJoin=void 0!==l?l:"round";var c=e.getWidth();i.lineWidth=void 0!==c?c:1;var h=e.getMiterLimit();i.miterLimit=void 0!==h?h:10,i.lineWidth>this.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0},e.prototype.createFill=function(t){var e=t.fillStyle,i=[qZ.SET_FILL_STYLE,e];return"string"!=typeof e&&i.push(!0),i},e.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},e.prototype.createStroke=function(t){return[qZ.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},e.prototype.updateFillStyle=function(t,e){var i=t.fillStyle;"string"==typeof i&&t.currentFillStyle==i||(void 0!==i&&this.instructions.push(e.call(this,t)),t.currentFillStyle=i)},e.prototype.updateStrokeStyle=function(t,e){var i=t.strokeStyle,n=t.lineCap,r=t.lineDash,s=t.lineDashOffset,o=t.lineJoin,a=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=n||r!=t.currentLineDash&&!UC(t.currentLineDash,r)||t.currentLineDashOffset!=s||t.currentLineJoin!=o||t.currentLineWidth!=a||t.currentMiterLimit!=l)&&(void 0!==i&&e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=n,t.currentLineDash=r,t.currentLineDashOffset=s,t.currentLineJoin=o,t.currentLineWidth=a,t.currentMiterLimit=l)},e.prototype.endGeometry=function(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var e=[qZ.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)},e.prototype.getBufferedMaxExtent=function(){return this.bufferedMaxExtent_||(this.bufferedMaxExtent_=CS(this.maxExtent),this.maxLineWidth>0&&xS(this.bufferedMaxExtent_,this.resolution*(this.maxLineWidth+1)/2,this.bufferedMaxExtent_)),this.bufferedMaxExtent_},e}(YZ),JZ=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),tq=function(t){function e(e,i,n,r){var s=t.call(this,e,i,n,r)||this;return s.hitDetectionImage_=null,s.image_=null,s.imagePixelRatio_=void 0,s.anchorX_=void 0,s.anchorY_=void 0,s.height_=void 0,s.opacity_=void 0,s.originX_=void 0,s.originY_=void 0,s.rotateWithView_=void 0,s.rotation_=void 0,s.scale_=void 0,s.width_=void 0,s.declutterImageWithText_=void 0,s}return JZ(e,t),e.prototype.drawPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var i=t.getFlatCoordinates(),n=t.getStride(),r=this.coordinates.length,s=this.appendFlatPointCoordinates(i,n);this.instructions.push([qZ.DRAW_IMAGE,r,s,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterImageWithText_]),this.hitDetectionInstructions.push([qZ.DRAW_IMAGE,r,s,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterImageWithText_]),this.endGeometry(e)}},e.prototype.drawMultiPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var i=t.getFlatCoordinates(),n=t.getStride(),r=this.coordinates.length,s=this.appendFlatPointCoordinates(i,n);this.instructions.push([qZ.DRAW_IMAGE,r,s,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterImageWithText_]),this.hitDetectionInstructions.push([qZ.DRAW_IMAGE,r,s,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterImageWithText_]),this.endGeometry(e)}},e.prototype.finish=function(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,t.prototype.finish.call(this)},e.prototype.setImageStyle=function(t,e){var i=t.getAnchor(),n=t.getSize(),r=t.getHitDetectionImage(),s=t.getImage(this.pixelRatio),o=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=i[0],this.anchorY_=i[1],this.hitDetectionImage_=r,this.image_=s,this.height_=n[1],this.opacity_=t.getOpacity(),this.originX_=o[0],this.originY_=o[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=n[0],this.declutterImageWithText_=e},e}(XZ),eq=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),iq=function(t){function e(e,i,n,r){return t.call(this,e,i,n,r)||this}return eq(e,t),e.prototype.drawFlatCoordinates_=function(t,e,i,n){var r=this.coordinates.length,s=this.appendFlatLineCoordinates(t,e,i,n,!1,!1),o=[qZ.MOVE_TO_LINE_TO,r,s];return this.instructions.push(o),this.hitDetectionInstructions.push(o),i},e.prototype.drawLineString=function(t,e){var i=this.state;if(void 0!==i.strokeStyle&&void 0!==i.lineWidth){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([qZ.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],WZ);var n=t.getFlatCoordinates(),r=t.getStride();this.drawFlatCoordinates_(n,0,n.length,r),this.hitDetectionInstructions.push(GZ),this.endGeometry(e)}},e.prototype.drawMultiLineString=function(t,e){var i=this.state;if(void 0!==i.strokeStyle&&void 0!==i.lineWidth){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([qZ.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],WZ);for(var n=t.getEnds(),r=t.getFlatCoordinates(),s=t.getStride(),o=0,a=0,l=n.length;a<l;++a)o=this.drawFlatCoordinates_(r,o,n[a],s);this.hitDetectionInstructions.push(GZ),this.endGeometry(e)}},e.prototype.finish=function(){var e=this.state;return null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&this.instructions.push(GZ),this.reverseHitDetectionInstructions(),this.state=null,t.prototype.finish.call(this)},e.prototype.applyStroke=function(e){null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&(this.instructions.push(GZ),e.lastStroke=this.coordinates.length),e.lastStroke=0,t.prototype.applyStroke.call(this,e),this.instructions.push(WZ)},e}(XZ),nq=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),rq=function(t){function e(e,i,n,r){return t.call(this,e,i,n,r)||this}return nq(e,t),e.prototype.drawFlatCoordinatess_=function(t,e,i,n){var r=this.state,s=void 0!==r.fillStyle,o=void 0!==r.strokeStyle,a=i.length;this.instructions.push(WZ),this.hitDetectionInstructions.push(WZ);for(var l=0;l<a;++l){var c=i[l],h=this.coordinates.length,u=this.appendFlatLineCoordinates(t,e,c,n,!0,!o),d=[qZ.MOVE_TO_LINE_TO,h,u];this.instructions.push(d),this.hitDetectionInstructions.push(d),o&&(this.instructions.push(ZZ),this.hitDetectionInstructions.push(ZZ)),e=c}return s&&(this.instructions.push($Z),this.hitDetectionInstructions.push($Z)),o&&(this.instructions.push(GZ),this.hitDetectionInstructions.push(GZ)),e},e.prototype.drawCircle=function(t,e){var i=this.state;if(void 0!==i.fillStyle||void 0!==i.strokeStyle){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([qZ.SET_FILL_STYLE,"#000"]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([qZ.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var n=t.getFlatCoordinates(),r=t.getStride(),s=this.coordinates.length;this.appendFlatLineCoordinates(n,0,n.length,r,!1,!1);var o=[qZ.CIRCLE,s];this.instructions.push(WZ,o),this.hitDetectionInstructions.push(WZ,o),void 0!==i.fillStyle&&(this.instructions.push($Z),this.hitDetectionInstructions.push($Z)),void 0!==i.strokeStyle&&(this.instructions.push(GZ),this.hitDetectionInstructions.push(GZ)),this.endGeometry(e)}},e.prototype.drawPolygon=function(t,e){var i=this.state;if(void 0!==i.fillStyle||void 0!==i.strokeStyle){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([qZ.SET_FILL_STYLE,"#000"]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([qZ.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var n=t.getEnds(),r=t.getOrientedFlatCoordinates(),s=t.getStride();this.drawFlatCoordinatess_(r,0,n,s),this.endGeometry(e)}},e.prototype.drawMultiPolygon=function(t,e){var i=this.state;if(void 0!==i.fillStyle||void 0!==i.strokeStyle){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([qZ.SET_FILL_STYLE,"#000"]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([qZ.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);for(var n=t.getEndss(),r=t.getOrientedFlatCoordinates(),s=t.getStride(),o=0,a=0,l=n.length;a<l;++a)o=this.drawFlatCoordinatess_(r,o,n[a],s);this.endGeometry(e)}},e.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var e=this.tolerance;if(0!==e)for(var i=this.coordinates,n=0,r=i.length;n<r;++n)i[n]=PM(i[n],e);return t.prototype.finish.call(this)},e.prototype.setFillStrokeStyles_=function(){var t=this.state;void 0!==t.fillStyle&&this.updateFillStyle(t,this.createFill),void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)},e}(XZ);function sq(t,e,i,n,r){var s,o,a,l,c,h,u,d,p,f=i,m=i,g=0,A=0,b=i;for(s=i;s<n;s+=r){var v=e[s],_=e[s+1];void 0!==l&&(d=v-l,p=_-c,a=Math.sqrt(d*d+p*p),void 0!==h&&(A+=o,Math.acos((h*d+u*p)/(o*a))>t&&(A>g&&(g=A,f=b,m=s),A=0,b=s-r)),o=a,h=d,u=p),l=v,c=_}return(A+=a)>g?[b,s]:[f,m]}var oq=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),aq={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},lq={Circle:rq,Default:XZ,Image:tq,LineString:iq,Polygon:rq,Text:function(t){function e(e,i,n,r){var s=t.call(this,e,i,n,r)||this;return s.labels_=null,s.text_="",s.textOffsetX_=0,s.textOffsetY_=0,s.textRotateWithView_=void 0,s.textRotation_=0,s.textFillState_=null,s.fillStates={},s.textStrokeState_=null,s.strokeStates={},s.textState_={},s.textStates={},s.textKey_="",s.fillKey_="",s.strokeKey_="",s.declutterImageWithText_=void 0,s}return oq(e,t),e.prototype.finish=function(){var e=t.prototype.finish.call(this);return e.textStates=this.textStates,e.fillStates=this.fillStates,e.strokeStates=this.strokeStates,e},e.prototype.drawText=function(t,e){var i=this.textState_;if(""!==this.text_&&i&&(this.textFillState_||this.textStrokeState_)){var n=this.coordinates,r=n.length,s=t.getType(),o=null,a=t.getStride();if("line"!==i.placement||"LineString"!=s&&"MultiLineString"!=s&&"Polygon"!=s&&"MultiPolygon"!=s){var l=i.overflow?null:[];switch(s){case"Point":case"MultiPoint":o=t.getFlatCoordinates();break;case"LineString":o=t.getFlatMidpoint();break;case"Circle":o=t.getCenter();break;case"MultiLineString":o=t.getFlatMidpoints(),a=2;break;case"Polygon":o=t.getFlatInteriorPoint(),i.overflow||l.push(o[2]/this.resolution),a=3;break;case"MultiPolygon":var c=t.getFlatInteriorPoints();for(o=[],v=0,_=c.length;v<_;v+=3)i.overflow||l.push(c[v+2]/this.resolution),o.push(c[v],c[v+1]);if(0===o.length)return;a=2}if((E=this.appendFlatPointCoordinates(o,a))===r)return;this.saveTextStates_(),(i.backgroundFill||i.backgroundStroke)&&(this.setFillStrokeStyle(i.backgroundFill,i.backgroundStroke),i.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),i.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);var h=i.padding;if(h!=ZG&&(i.scale[0]<0||i.scale[1]<0)){var u=i.padding[0],d=i.padding[1],p=i.padding[2],f=i.padding[3];i.scale[0]<0&&(d=-d,f=-f),i.scale[1]<0&&(u=-u,p=-p),h=[u,d,p,f]}var m=this.pixelRatio;this.instructions.push([qZ.DRAW_IMAGE,r,E,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterImageWithText_,h==ZG?ZG:h.map(function(t){return t*m}),!!i.backgroundFill,!!i.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,l]);var g=1/m;this.hitDetectionInstructions.push([qZ.DRAW_IMAGE,r,E,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[g,g],NaN,this.declutterImageWithText_,h,!!i.backgroundFill,!!i.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,l]),this.endGeometry(e)}else{if(!QS(this.getBufferedMaxExtent(),t.getExtent()))return;var A=void 0;if(o=t.getFlatCoordinates(),"LineString"==s)A=[o.length];else if("MultiLineString"==s)A=t.getEnds();else if("Polygon"==s)A=t.getEnds().slice(0,1);else if("MultiPolygon"==s){var b=t.getEndss();A=[];for(var v=0,_=b.length;v<_;++v)A.push(b[v][0])}this.beginGeometry(t,e);for(var y=i.textAlign,w=0,x=void 0,C=0,S=A.length;C<S;++C){if(null==y){var k=sq(i.maxAngle,o,w,A[C],a);w=k[0],x=k[1]}else x=A[C];for(v=w;v<x;v+=a)n.push(o[v],o[v+1]);var E;w=A[C],this.drawChars_(r,E=n.length),r=E}this.endGeometry(e)}}},e.prototype.saveTextStates_=function(){var t=this.textStrokeState_,e=this.textState_,i=this.textFillState_,n=this.strokeKey_;t&&(n in this.strokeStates||(this.strokeStates[n]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));var r=this.textKey_;r in this.textStates||(this.textStates[r]={font:e.font,textAlign:e.textAlign||"center",textBaseline:e.textBaseline||"middle",scale:e.scale});var s=this.fillKey_;i&&(s in this.fillStates||(this.fillStates[s]={fillStyle:i.fillStyle}))},e.prototype.drawChars_=function(t,e){var i=this.textStrokeState_,n=this.textState_,r=this.strokeKey_,s=this.textKey_,o=this.fillKey_;this.saveTextStates_();var a=this.pixelRatio,l=aq[n.textBaseline],c=this.textOffsetY_*a,h=this.text_,u=i?i.lineWidth*Math.abs(n.scale[0])/2:0;this.instructions.push([qZ.DRAW_CHARS,t,e,l,n.overflow,o,n.maxAngle,a,c,r,u*a,h,s,1]),this.hitDetectionInstructions.push([qZ.DRAW_CHARS,t,e,l,n.overflow,o,n.maxAngle,1,c,r,u,h,s,1/a])},e.prototype.setTextStyle=function(t,e){var i,n,r;if(t){var s=t.getFill();s?((n=this.textFillState_)||(this.textFillState_=n={}),n.fillStyle=IZ(s.getColor()||"#000")):this.textFillState_=n=null;var o=t.getStroke();if(o){(r=this.textStrokeState_)||(this.textStrokeState_=r={});var a=o.getLineDash(),l=o.getLineDashOffset(),c=o.getWidth(),h=o.getMiterLimit();r.lineCap=o.getLineCap()||"round",r.lineDash=a?a.slice():WG,r.lineDashOffset=void 0===l?0:l,r.lineJoin=o.getLineJoin()||"round",r.lineWidth=void 0===c?1:c,r.miterLimit=void 0===h?10:h,r.strokeStyle=IZ(o.getColor()||"#000")}else this.textStrokeState_=r=null;i=this.textState_;var u=t.getFont()||"10px sans-serif";tW(u);var d=t.getScaleArray();i.overflow=t.getOverflow(),i.font=u,i.maxAngle=t.getMaxAngle(),i.placement=t.getPlacement(),i.textAlign=t.getTextAlign(),i.textBaseline=t.getTextBaseline()||"middle",i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||ZG,i.scale=void 0===d?[1,1]:d;var p=t.getOffsetX(),f=t.getOffsetY(),m=t.getRotateWithView(),g=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=void 0===p?0:p,this.textOffsetY_=void 0===f?0:f,this.textRotateWithView_=void 0!==m&&m,this.textRotation_=void 0===g?0:g,this.strokeKey_=r?("string"==typeof r.strokeStyle?r.strokeStyle:YC(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.textBaseline||"?"),this.fillKey_=n?"string"==typeof n.fillStyle?n.fillStyle:"|"+YC(n.fillStyle):""}else this.text_="";this.declutterImageWithText_=e},e}(XZ)},cq=function(){function t(t,e,i,n){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=n,this.resolution_=i,this.buildersByZIndex_={}}return t.prototype.finish=function(){var t={};for(var e in this.buildersByZIndex_){t[e]=t[e]||{};var i=this.buildersByZIndex_[e];for(var n in i){var r=i[n].finish();t[e][n]=r}}return t},t.prototype.getBuilder=function(t,e){var i=void 0!==t?t.toString():"0",n=this.buildersByZIndex_[i];void 0===n&&(this.buildersByZIndex_[i]=n={});var r=n[e];return void 0===r&&(r=new(0,lq[e])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),n[e]=r),r},t}();function hq(t,e,i,n,r,s,o,a,l,c,h,u){var d=t[e],p=t[e+1],f=0,m=0,g=0,A=0;function b(){f=d,m=p,d=t[e+=n],p=t[e+1],A+=g,g=Math.sqrt((d-f)*(d-f)+(p-m)*(p-m))}do{b()}while(e<i-n&&A+g<s);for(var v=(s-A)/g,_=vk(f,d,v),y=vk(m,p,v),w=e-n,x=A,C=s+a*l(c,r,h);e<i-n&&A+g<C;)b();var S,k=vk(f,d,v=(C-A)/g),E=vk(m,p,v);if(u){var D=[_,y,k,E];pM(D,0,4,2,u,D,D),S=D[0]>D[2]}else S=_>k;var I,P=Math.PI,O=[],M=w+n===e;if(g=0,A=x,d=t[e=w],p=t[e+1],M){b();var T=Math.atan2(p-m,d-f);return S&&(T+=T>0?-P:P),O[0]=[z=(k+_)/2,H=(E+y)/2,(C-s)/2,T,r],O}for(var R=0,V=r.length;R<V;){b();var F=Math.atan2(p-m,d-f);if(S&&(F+=F>0?-P:P),void 0!==I){var L=F-I;if(L+=L>P?-2*P:L<-P?2*P:0,Math.abs(L)>o)return null}I=F;for(var U=R,B=0;R<V;++R){var N=a*l(c,r[S?V-R-1:R],h);if(e+n<i&&A+g<s+B+N/2)break;B+=N}if(R!==U){var j=S?r.substring(V-U,V-R):r.substring(U,R),z=vk(f,d,v=(s+B/2-A)/g),H=vk(m,p,v);O.push([z,H,B/2,F,j]),s+=B}}return O}var uq=[1/0,1/0,-1/0,-1/0],dq=[],pq=[],fq=[],mq=[];function gq(t){return t[3].declutterBox}var Aq=new RegExp("["+String.fromCharCode(1425)+"-"+String.fromCharCode(2303)+String.fromCharCode(64285)+"-"+String.fromCharCode(65023)+String.fromCharCode(65136)+"-"+String.fromCharCode(65276)+String.fromCharCode(67584)+"-"+String.fromCharCode(69631)+String.fromCharCode(124928)+"-"+String.fromCharCode(126975)+"]");function bq(t,e){return"start"!==e&&"end"!==e||Aq.test(t)||(e="start"===e?"left":"right"),aq[e]}var vq=function(){function t(t,e,i,n,r){this.overlaps=i,this.pixelRatio=e,this.resolution=t,this.instructions=n.instructions,this.coordinates=n.coordinates,this.coordinateCache_={},this.renderBuffer_=r,this.renderedTransform_=[1,0,0,1,0,0],this.hitDetectionInstructions=n.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=n.fillStates||{},this.strokeStates=n.strokeStates||{},this.textStates=n.textStates||{},this.widths_={},this.labels_={}}return t.prototype.createLabel=function(t,e,i,n){var r=t+e+i+n;if(this.labels_[r])return this.labels_[r];var s=n?this.strokeStates[n]:null,o=i?this.fillStates[i]:null,a=this.textStates[e],l=this.pixelRatio,c=[a.scale[0]*l,a.scale[1]*l],h=bq(t,a.textAlign||"center"),u=n&&s.lineWidth?s.lineWidth:0,d=t.split("\n"),p=d.length,f=[],m=function(t,e,i){for(var n=e.length,r=0,s=0;s<n;++s){var o=iW(t,e[s]);r=Math.max(r,o),i.push(o)}return r}(a.font,d,f),g=function(t){var e=JG[t];if(null==e){if(lS){var i=GG(t),n=eW(t,"\u017dg");e=(isNaN(Number(i.lineHeight))?1.2:Number(i.lineHeight))*(n.actualBoundingBoxAscent+n.actualBoundingBoxDescent)}else QG||((QG=document.createElement("div")).innerHTML="M",QG.style.margin="0 !important",QG.style.padding="0 !important",QG.style.position="absolute !important",QG.style.left="-99999px !important"),QG.style.font=t,document.body.appendChild(QG),e=QG.offsetHeight,document.body.removeChild(QG);JG[t]=e}return e}(a.font),A=m+u,b=[],v=(A+2)*c[0],_=(g*p+u)*c[1],y={width:v<0?Math.floor(v):Math.ceil(v),height:_<0?Math.floor(_):Math.ceil(_),contextInstructions:b};1==c[0]&&1==c[1]||b.push("scale",c),b.push("font",a.font),n&&(b.push("strokeStyle",s.strokeStyle),b.push("lineWidth",u),b.push("lineCap",s.lineCap),b.push("lineJoin",s.lineJoin),b.push("miterLimit",s.miterLimit),(lS?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D).prototype.setLineDash&&(b.push("setLineDash",[s.lineDash]),b.push("lineDashOffset",s.lineDashOffset))),i&&b.push("fillStyle",o.fillStyle),b.push("textBaseline","middle"),b.push("textAlign","center");var w,x=.5-h,C=h*A+x*u;if(n)for(w=0;w<p;++w)b.push("strokeText",[d[w],C+x*f[w],.5*(u+g)+w*g]);if(i)for(w=0;w<p;++w)b.push("fillText",[d[w],C+x*f[w],.5*(u+g)+w*g]);return this.labels_[r]=y,y},t.prototype.replayTextBackground_=function(t,e,i,n,r,s,o){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,i),t.lineTo.apply(t,n),t.lineTo.apply(t,r),t.lineTo.apply(t,e),s&&(this.alignFill_=s[2],this.fill_(t)),o&&(this.setStrokeStyle_(t,o),t.stroke())},t.prototype.calculateImageOrLabelDimensions_=function(t,e,i,n,r,s,o,a,l,c,h,u,d,p,f,m){var g,A=i-(o*=u[0]),b=n-(a*=u[1]),v=r+l>t?t-l:r,_=s+c>e?e-c:s,y=p[3]+v*u[0]+p[1],w=p[0]+_*u[1]+p[2],x=A-p[3],C=b-p[0];return(f||0!==h)&&(dq[0]=x,mq[0]=x,dq[1]=C,pq[1]=C,pq[0]=x+y,fq[0]=pq[0],fq[1]=C+w,mq[1]=fq[1]),0!==h?(lM(g=cM([1,0,0,1,0,0],i,n,1,1,h,-i,-n),dq),lM(g,pq),lM(g,fq),lM(g,mq),PS(Math.min(dq[0],pq[0],fq[0],mq[0]),Math.min(dq[1],pq[1],fq[1],mq[1]),Math.max(dq[0],pq[0],fq[0],mq[0]),Math.max(dq[1],pq[1],fq[1],mq[1]),uq)):PS(Math.min(x,x+y),Math.min(C,C+w),Math.max(x,x+y),Math.max(C,C+w),uq),d&&(A=Math.round(A),b=Math.round(b)),{drawImageX:A,drawImageY:b,drawImageW:v,drawImageH:_,originX:l,originY:c,declutterBox:{minX:uq[0],minY:uq[1],maxX:uq[2],maxY:uq[3],value:m},canvasTransform:g,scale:u}},t.prototype.replayImageOrLabel_=function(t,e,i,n,r,s,o){var a=n.declutterBox,l=t.canvas,c=o?o[2]*n.scale[0]/2:0;return a.minX-c<=l.width/e&&a.maxX+c>=0&&a.minY-c<=l.height/e&&a.maxY+c>=0&&(!(!s&&!o)&&this.replayTextBackground_(t,dq,pq,fq,mq,s,o),function(t,e,i,n,r,s,o,a,l,c,h){t.save(),1!==i&&(t.globalAlpha*=i),e&&t.setTransform.apply(t,e),n.contextInstructions?(t.translate(l,c),t.scale(h[0],h[1]),function(t,e){for(var i=t.contextInstructions,n=0,r=i.length;n<r;n+=2)Array.isArray(i[n+1])?e[i[n]].apply(e,i[n+1]):e[i[n]]=i[n+1]}(n,t)):h[0]<0||h[1]<0?(t.translate(l,c),t.scale(h[0],h[1]),t.drawImage(n,r,s,o,a,0,0,o,a)):t.drawImage(n,r,s,o,a,l,c,o*h[0],a*h[1]),t.restore()}(t,n.canvasTransform,r,i,n.originX,n.originY,n.drawImageW,n.drawImageH,n.drawImageX,n.drawImageY,n.scale)),!0},t.prototype.fill_=function(t){if(this.alignFill_){var e=lM(this.renderedTransform_,[0,0]),i=512*this.pixelRatio;t.save(),t.translate(e[0]%i,e[1]%i),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()},t.prototype.setStrokeStyle_=function(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.setLineDash&&(t.lineDashOffset=e[7],t.setLineDash(e[6]))},t.prototype.drawLabelWithPointPlacement_=function(t,e,i,n){var r=this.textStates[e],s=this.createLabel(t,e,n,i),o=this.strokeStates[i],a=this.pixelRatio,l=bq(t,r.textAlign||"center"),c=aq[r.textBaseline||"middle"],h=o&&o.lineWidth?o.lineWidth:0;return{label:s,anchorX:l*(s.width/a-2*r.scale[0])+2*(.5-l)*h,anchorY:c*s.height/a+2*(.5-c)*h}},t.prototype.execute_=function(t,e,i,n,r,s,o,a){var l,c,h;this.pixelCoordinates_&&UC(i,this.renderedTransform_)?l=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),l=dM(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),(c=this.renderedTransform_)[0]=(h=i)[0],c[1]=h[1],c[2]=h[2],c[3]=h[3],c[4]=h[4],c[5]=h[5]);for(var u,d,p,f,m,g,A,b,v,_,y,w,x,C,S,k,E=0,D=n.length,I=0,P=0,O=0,M=null,T=null,R=this.coordinateCache_,V=this.viewRotation_,F=Math.round(1e12*Math.atan2(-i[1],i[0]))/1e12,L={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:V},U=this.instructions!=n||this.overlaps?0:200;E<D;){var B=n[E];switch(B[0]){case qZ.BEGIN_GEOMETRY:k=B[3],(x=B[1]).getGeometry()?void 0===o||QS(o,k.getExtent())?++E:E=B[2]+1:E=B[2];break;case qZ.BEGIN_PATH:P>U&&(this.fill_(t),P=0),O>U&&(t.stroke(),O=0),P||O||(t.beginPath(),f=NaN,m=NaN),++E;break;case qZ.CIRCLE:var N=l[I=B[1]],j=l[I+1],z=l[I+2]-N,H=l[I+3]-j,K=Math.sqrt(z*z+H*H);t.moveTo(N+K,j),t.arc(N,j,K,0,2*Math.PI,!0),++E;break;case qZ.CLOSE_PATH:t.closePath(),++E;break;case qZ.CUSTOM:I=B[1],u=B[2];var $=B[4],G=6==B.length?B[5]:void 0;L.geometry=B[3],L.feature=x,E in R||(R[E]=[]);var W=R[E];G?G(l,I,u,2,W):(W[0]=l[I],W[1]=l[I+1],W.length=2),$(W,L),++E;break;case qZ.DRAW_IMAGE:I=B[1],u=B[2],d=B[4],p=B[5];var Z=B[6],q=B[7],Y=B[8],Q=B[9],X=B[10],J=B[11],tt=B[12],et=B[13],it=B[14];if(!(b=B[3])&&B.length>=19){var nt=this.drawLabelWithPointPlacement_(v=B[18],_=B[19],y=B[20],w=B[21]);B[3]=b=nt.label,B[4]=d=(nt.anchorX-B[22])*this.pixelRatio,B[5]=p=(nt.anchorY-B[23])*this.pixelRatio,B[6]=Z=b.height,B[13]=et=b.width}var rt=void 0;B.length>24&&(rt=B[24]);var st=void 0,ot=void 0,at=void 0;B.length>16?(st=B[15],ot=B[16],at=B[17]):(st=ZG,ot=!1,at=!1),X&&F?J+=V:X||F||(J-=V);for(var lt=0;I<u;I+=2)if(!(rt&&rt[lt++]<et/this.pixelRatio)){var ct=[t,e,b,Tt=this.calculateImageOrLabelDimensions_(b.width,b.height,l[I],l[I+1],et,Z,d,p,Y,Q,J,tt,r,st,ot||at,x),q,ot?M:null,at?T:null],ht=void 0,ut=void 0;if(a&&it){if(!it[I]){it[I]=ct;continue}if(ht=it[I],delete it[I],ut=gq(ht),a.collides(ut))continue}a&&a.collides(Tt.declutterBox)||(ht&&(a&&a.insert(ut),this.replayImageOrLabel_.apply(this,ht)),a&&a.insert(Tt.declutterBox),this.replayImageOrLabel_.apply(this,ct))}++E;break;case qZ.DRAW_CHARS:var dt=B[1],pt=B[2],ft=B[3],mt=B[4];w=B[5];var gt=B[6],At=B[7],bt=B[8];y=B[9];var vt=B[10];v=B[11];var _t=[B[13],B[13]],yt=this.textStates[_=B[12]],wt=yt.font,xt=[yt.scale[0]*At,yt.scale[1]*At],Ct=void 0;wt in this.widths_?Ct=this.widths_[wt]:this.widths_[wt]=Ct={};var St=CH(l,dt,pt,2),kt=Math.abs(xt[0])*nW(wt,v,Ct);if(mt||kt<=St){var Et=hq(l,dt,pt,2,v,(St-kt)*aq[this.textStates[_].textAlign],gt,Math.abs(xt[0]),nW,wt,Ct,F?0:this.viewRotation_);t:if(Et){var Dt=[],It=void 0,Pt=void 0,Ot=void 0,Mt=void 0;if(y)for(It=0,Pt=Et.length;It<Pt;++It){Ot=this.createLabel((Mt=Et[It])[4],_,"",y);var Tt=this.calculateImageOrLabelDimensions_(Ot.width,Ot.height,Mt[0],Mt[1],Ot.width,Ot.height,d=Mt[2]+(xt[0]<0?-vt:vt),p=ft*Ot.height+2*(.5-ft)*vt*xt[1]/xt[0]-bt,0,0,Mt[3],_t,!1,ZG,!1,x);if(a&&a.collides(Tt.declutterBox))break t;Dt.push([t,e,Ot,Tt,1,null,null])}if(w)for(It=0,Pt=Et.length;It<Pt;++It){if(Ot=this.createLabel((Mt=Et[It])[4],_,w,""),Tt=this.calculateImageOrLabelDimensions_(Ot.width,Ot.height,Mt[0],Mt[1],Ot.width,Ot.height,d=Mt[2],p=ft*Ot.height-bt,0,0,Mt[3],_t,!1,ZG,!1,x),a&&a.collides(Tt.declutterBox))break t;Dt.push([t,e,Ot,Tt,1,null,null])}a&&a.load(Dt.map(gq));for(var Rt=0,Vt=Dt.length;Rt<Vt;++Rt)this.replayImageOrLabel_.apply(this,Dt[Rt])}}++E;break;case qZ.END_GEOMETRY:if(void 0!==s){var Ft=s(x=B[1],k);if(Ft)return Ft}++E;break;case qZ.FILL:U?P++:this.fill_(t),++E;break;case qZ.MOVE_TO_LINE_TO:for(u=B[2],A=(S=l[(I=B[1])+1])+.5|0,(g=(C=l[I])+.5|0)===f&&A===m||(t.moveTo(C,S),f=g,m=A),I+=2;I<u;I+=2)g=(C=l[I])+.5|0,A=(S=l[I+1])+.5|0,I!=u-2&&g===f&&A===m||(t.lineTo(C,S),f=g,m=A);++E;break;case qZ.SET_FILL_STYLE:M=B,this.alignFill_=B[2],P&&(this.fill_(t),P=0,O&&(t.stroke(),O=0)),t.fillStyle=B[1],++E;break;case qZ.SET_STROKE_STYLE:T=B,O&&(t.stroke(),O=0),this.setStrokeStyle_(t,B),++E;break;case qZ.STROKE:U?O++:t.stroke(),++E;break;default:++E}}P&&this.fill_(t),O&&t.stroke()},t.prototype.execute=function(t,e,i,n,r,s){this.viewRotation_=n,this.execute_(t,e,i,this.instructions,r,void 0,void 0,s)},t.prototype.executeHitDetection=function(t,e,i,n,r){return this.viewRotation_=i,this.execute_(t,1,e,this.hitDetectionInstructions,!0,n,r)},t}(),_q=["Polygon","Circle","LineString","Image","Text","Default"],yq=function(){function t(t,e,i,n,r,s){this.maxExtent_=t,this.overlaps_=n,this.pixelRatio_=i,this.resolution_=e,this.renderBuffer_=s,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=[1,0,0,1,0,0],this.createExecutors_(r)}return t.prototype.clip=function(t,e){var i=this.getClipCoords(e);t.beginPath(),t.moveTo(i[0],i[1]),t.lineTo(i[2],i[3]),t.lineTo(i[4],i[5]),t.lineTo(i[6],i[7]),t.clip()},t.prototype.createExecutors_=function(t){for(var e in t){var i=this.executorsByZIndex_[e];void 0===i&&(this.executorsByZIndex_[e]=i={});var n=t[e],r=[this.renderBuffer_||0,this.renderBuffer_||0];for(var s in n)i[s]=new vq(this.resolution_,this.pixelRatio_,this.overlaps_,n[s],r)}},t.prototype.hasExecutors=function(t){for(var e in this.executorsByZIndex_)for(var i=this.executorsByZIndex_[e],n=0,r=t.length;n<r;++n)if(t[n]in i)return!0;return!1},t.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,r,s){var o=2*(n=Math.round(n))+1,a=cM(this.hitDetectionTransform_,n+.5,n+.5,1/e,-1/e,-i,-t[0],-t[1]),l=!this.hitDetectionContext_;l&&(this.hitDetectionContext_=uS(o,o));var c,h=this.hitDetectionContext_;h.canvas.width!==o||h.canvas.height!==o?(h.canvas.width=o,h.canvas.height=o):l||h.clearRect(0,0,o,o),void 0!==this.renderBuffer_&&(FS(c=[1/0,1/0,-1/0,-1/0],t),xS(c,e*(this.renderBuffer_+n),c));var u,d=function(t){if(void 0!==wq[t])return wq[t];for(var e=2*t+1,i=t*t,n=new Array(i+1),r=0;r<=t;++r)for(var s=0;s<=t;++s){var o=r*r+s*s;if(o>i)break;var a=n[o];a||(n[o]=a=[]),a.push(4*((t+r)*e+(t+s))+3),r>0&&a.push(4*((t-r)*e+(t+s))+3),s>0&&(a.push(4*((t+r)*e+(t-s))+3),r>0&&a.push(4*((t-r)*e+(t-s))+3))}for(var l=[],c=(r=0,n.length);r<c;++r)n[r]&&l.push.apply(l,n[r]);return wq[t]=l,l}(n);function p(t,e){for(var i=h.getImageData(0,0,o,o).data,a=0,l=d.length;a<l;a++)if(i[d[a]]>0){if(!s||"Image"!==u&&"Text"!==u||-1!==s.indexOf(t)){var c=(d[a]-3)/4,p=n-c%o,f=n-(c/o|0),m=r(t,e,p*p+f*f);if(m)return m}h.clearRect(0,0,o,o);break}}var f,m,g,A,b,v=Object.keys(this.executorsByZIndex_).map(Number);for(v.sort(TC),f=v.length-1;f>=0;--f){var _=v[f].toString();for(g=this.executorsByZIndex_[_],m=_q.length-1;m>=0;--m)if(void 0!==(A=g[u=_q[m]])&&(b=A.executeHitDetection(h,a,i,p,c)))return b}},t.prototype.getClipCoords=function(t){var e=this.maxExtent_;if(!e)return null;var i=e[0],n=e[1],r=e[2],s=e[3],o=[i,n,i,s,r,s,r,n];return dM(o,0,8,2,t,o),o},t.prototype.isEmpty=function(){return $C(this.executorsByZIndex_)},t.prototype.execute=function(t,e,i,n,r,s,o){var a=Object.keys(this.executorsByZIndex_).map(Number);a.sort(TC),this.maxExtent_&&(t.save(),this.clip(t,i));var l,c,h,u,d,p,f=s||_q;for(o&&a.reverse(),l=0,c=a.length;l<c;++l){var m=a[l].toString();for(d=this.executorsByZIndex_[m],h=0,u=f.length;h<u;++h)void 0!==(p=d[f[h]])&&p.execute(t,e,i,n,r,o)}this.maxExtent_&&t.restore()},t}(),wq={},xq=yq,Cq=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Sq=function(t){function e(e,i,n,r,s,o,a){var l=t.call(this)||this;return l.context_=e,l.pixelRatio_=i,l.extent_=n,l.transform_=r,l.viewRotation_=s,l.squaredTolerance_=o,l.userTransform_=a,l.contextFillState_=null,l.contextStrokeState_=null,l.contextTextState_=null,l.fillState_=null,l.strokeState_=null,l.image_=null,l.imageAnchorX_=0,l.imageAnchorY_=0,l.imageHeight_=0,l.imageOpacity_=0,l.imageOriginX_=0,l.imageOriginY_=0,l.imageRotateWithView_=!1,l.imageRotation_=0,l.imageScale_=[0,0],l.imageWidth_=0,l.text_="",l.textOffsetX_=0,l.textOffsetY_=0,l.textRotateWithView_=!1,l.textRotation_=0,l.textScale_=[0,0],l.textFillState_=null,l.textStrokeState_=null,l.textState_=null,l.pixelCoordinates_=[],l.tmpLocalTransform_=[1,0,0,1,0,0],l}return Cq(e,t),e.prototype.drawImages_=function(t,e,i,n){if(this.image_){var r=dM(t,e,i,2,this.transform_,this.pixelCoordinates_),s=this.context_,o=this.tmpLocalTransform_,a=s.globalAlpha;1!=this.imageOpacity_&&(s.globalAlpha=a*this.imageOpacity_);var l=this.imageRotation_;this.imageRotateWithView_&&(l+=this.viewRotation_);for(var c=0,h=r.length;c<h;c+=2){var u=r[c]-this.imageAnchorX_,d=r[c+1]-this.imageAnchorY_;if(0!==l||1!=this.imageScale_[0]||1!=this.imageScale_[1]){var p=u+this.imageAnchorX_,f=d+this.imageAnchorY_;cM(o,p,f,1,1,l,-p,-f),s.setTransform.apply(s,o),s.translate(p,f),s.scale(this.imageScale_[0],this.imageScale_[1]),s.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),s.setTransform(1,0,0,1,0,0)}else s.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,u,d,this.imageWidth_,this.imageHeight_)}1!=this.imageOpacity_&&(s.globalAlpha=a)}},e.prototype.drawText_=function(t,e,i,n){if(this.textState_&&""!==this.text_){this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);var r=dM(t,e,i,n,this.transform_,this.pixelCoordinates_),s=this.context_,o=this.textRotation_;for(this.textRotateWithView_&&(o+=this.viewRotation_);e<i;e+=n){var a=r[e]+this.textOffsetX_,l=r[e+1]+this.textOffsetY_;if(0!==o||1!=this.textScale_[0]||1!=this.textScale_[1]){var c=cM(this.tmpLocalTransform_,a,l,1,1,o,-a,-l);s.setTransform.apply(s,c),s.translate(a,l),s.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&s.strokeText(this.text_,0,0),this.textFillState_&&s.fillText(this.text_,0,0),s.setTransform(1,0,0,1,0,0)}else this.textStrokeState_&&s.strokeText(this.text_,a,l),this.textFillState_&&s.fillText(this.text_,a,l)}}},e.prototype.moveToLineTo_=function(t,e,i,n,r){var s=this.context_,o=dM(t,e,i,n,this.transform_,this.pixelCoordinates_);s.moveTo(o[0],o[1]);var a=o.length;r&&(a-=2);for(var l=2;l<a;l+=2)s.lineTo(o[l],o[l+1]);return r&&s.closePath(),i},e.prototype.drawRings_=function(t,e,i,n){for(var r=0,s=i.length;r<s;++r)e=this.moveToLineTo_(t,e,i[r],n,!0);return e},e.prototype.drawCircle=function(t){if(QS(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=function(t,e,i){var n=t.getFlatCoordinates();if(n){var r=t.getStride();return dM(n,0,n.length,r,e,i)}return null}(t,this.transform_,this.pixelCoordinates_),i=e[2]-e[0],n=e[3]-e[1],r=Math.sqrt(i*i+n*n),s=this.context_;s.beginPath(),s.arc(e[0],e[1],r,0,2*Math.PI),this.fillState_&&s.fill(),this.strokeState_&&s.stroke()}""!==this.text_&&this.drawText_(t.getCenter(),0,2,2)}},e.prototype.setStyle=function(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())},e.prototype.setTransform=function(t){this.transform_=t},e.prototype.drawGeometry=function(t){switch(t.getType()){case"Point":this.drawPoint(t);break;case"LineString":this.drawLineString(t);break;case"Polygon":this.drawPolygon(t);break;case"MultiPoint":this.drawMultiPoint(t);break;case"MultiLineString":this.drawMultiLineString(t);break;case"MultiPolygon":this.drawMultiPolygon(t);break;case"GeometryCollection":this.drawGeometryCollection(t);break;case"Circle":this.drawCircle(t)}},e.prototype.drawFeature=function(t,e){var i=e.getGeometryFunction()(t);i&&QS(this.extent_,i.getExtent())&&(this.setStyle(e),this.drawGeometry(i))},e.prototype.drawGeometryCollection=function(t){for(var e=t.getGeometriesArray(),i=0,n=e.length;i<n;++i)this.drawGeometry(e[i])},e.prototype.drawPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)},e.prototype.drawMultiPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)},e.prototype.drawLineString=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),QS(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var e=this.context_,i=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(i,0,i.length,t.getStride(),!1),e.stroke()}if(""!==this.text_){var n=t.getFlatMidpoint();this.drawText_(n,0,2,2)}}},e.prototype.drawMultiLineString=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getExtent();if(QS(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var i=this.context_,n=t.getFlatCoordinates(),r=0,s=t.getEnds(),o=t.getStride();i.beginPath();for(var a=0,l=s.length;a<l;++a)r=this.moveToLineTo_(n,r,s[a],o,!1);i.stroke()}if(""!==this.text_){var c=t.getFlatMidpoints();this.drawText_(c,0,c.length,2)}}},e.prototype.drawPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),QS(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var i=t.getFlatInteriorPoint();this.drawText_(i,0,2,2)}}},e.prototype.drawMultiPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),QS(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_,i=t.getOrientedFlatCoordinates(),n=0,r=t.getEndss(),s=t.getStride();e.beginPath();for(var o=0,a=r.length;o<a;++o)n=this.drawRings_(i,n,r[o],s);this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var l=t.getFlatInteriorPoints();this.drawText_(l,0,l.length,2)}}},e.prototype.setContextFillState_=function(t){var e=this.context_,i=this.contextFillState_;i?i.fillStyle!=t.fillStyle&&(i.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})},e.prototype.setContextStrokeState_=function(t){var e=this.context_,i=this.contextStrokeState_;i?(i.lineCap!=t.lineCap&&(i.lineCap=t.lineCap,e.lineCap=t.lineCap),e.setLineDash&&(UC(i.lineDash,t.lineDash)||e.setLineDash(i.lineDash=t.lineDash),i.lineDashOffset!=t.lineDashOffset&&(i.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset)),i.lineJoin!=t.lineJoin&&(i.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),i.lineWidth!=t.lineWidth&&(i.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),i.miterLimit!=t.miterLimit&&(i.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),i.strokeStyle!=t.strokeStyle&&(i.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,e.setLineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})},e.prototype.setContextTextState_=function(t){var e=this.context_,i=this.contextTextState_,n=t.textAlign?t.textAlign:"center";i?(i.font!=t.font&&(i.font=t.font,e.font=t.font),i.textAlign!=n&&(i.textAlign=n,e.textAlign=n),i.textBaseline!=t.textBaseline&&(i.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=n,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:n,textBaseline:t.textBaseline})},e.prototype.setFillStrokeStyle=function(t,e){if(t){var i=t.getColor();this.fillState_={fillStyle:IZ(i||"#000")}}else this.fillState_=null;if(e){var n=e.getColor(),r=e.getLineCap(),s=e.getLineDash(),o=e.getLineDashOffset(),a=e.getLineJoin(),l=e.getWidth(),c=e.getMiterLimit();this.strokeState_={lineCap:void 0!==r?r:"round",lineDash:s||WG,lineDashOffset:o||0,lineJoin:void 0!==a?a:"round",lineWidth:this.pixelRatio_*(void 0!==l?l:1),miterLimit:void 0!==c?c:10,strokeStyle:IZ(n||"#000")}}else this.strokeState_=null},e.prototype.setImageStyle=function(t){if(t){var e=t.getSize();if(e){var i=t.getAnchor(),n=t.getImage(1),r=t.getOrigin(),s=t.getScaleArray();this.imageAnchorX_=i[0],this.imageAnchorY_=i[1],this.imageHeight_=e[1],this.image_=n,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=r[0],this.imageOriginY_=r[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation(),this.imageScale_=[this.pixelRatio_*s[0],this.pixelRatio_*s[1]],this.imageWidth_=e[0]}else this.image_=null}else this.image_=null},e.prototype.setTextStyle=function(t){if(t){var e=t.getFill();if(e){var i=e.getColor();this.textFillState_={fillStyle:IZ(i||"#000")}}else this.textFillState_=null;var n=t.getStroke();if(n){var r=n.getColor(),s=n.getLineCap(),o=n.getLineDash(),a=n.getLineDashOffset(),l=n.getLineJoin(),c=n.getWidth(),h=n.getMiterLimit();this.textStrokeState_={lineCap:void 0!==s?s:"round",lineDash:o||WG,lineDashOffset:a||0,lineJoin:void 0!==l?l:"round",lineWidth:void 0!==c?c:1,miterLimit:void 0!==h?h:10,strokeStyle:IZ(r||"#000")}}else this.textStrokeState_=null;var u=t.getFont(),d=t.getOffsetX(),p=t.getOffsetY(),f=t.getRotateWithView(),m=t.getRotation(),g=t.getScaleArray(),A=t.getText(),b=t.getTextAlign(),v=t.getTextBaseline();this.textState_={font:void 0!==u?u:"10px sans-serif",textAlign:void 0!==b?b:"center",textBaseline:void 0!==v?v:"middle"},this.text_=void 0!==A?A:"",this.textOffsetX_=void 0!==d?this.pixelRatio_*d:0,this.textOffsetY_=void 0!==p?this.pixelRatio_*p:0,this.textRotateWithView_=void 0!==f&&f,this.textRotation_=void 0!==m?m:0,this.textScale_=[this.pixelRatio_*g[0],this.pixelRatio_*g[1]]}else this.text_=""},e}(YZ),kq=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Eq=null,Dq=function(t){function e(e,i,n,r,s,o){var a=t.call(this)||this;return a.hitDetectionImage_=null,a.image_=e||new Image,null!==r&&(a.image_.crossOrigin=r),a.canvas_={},a.color_=o,a.unlisten_=null,a.imageState_=s,a.size_=n,a.src_=i,a}return kq(e,t),e.prototype.isTainted_=function(){if(void 0===this.tainted_&&2===this.imageState_){Eq||(Eq=uS(1,1)),Eq.drawImage(this.image_,0,0);try{Eq.getImageData(0,0,1,1),this.tainted_=!1}catch($nt){Eq=null,this.tainted_=!0}}return!0===this.tainted_},e.prototype.dispatchChangeEvent_=function(){this.dispatchEvent("change")},e.prototype.handleImageError_=function(){this.imageState_=3,this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.handleImageLoad_=function(){this.imageState_=2,this.size_?(this.image_.width=this.size_[0],this.image_.height=this.size_[1]):this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.getImage=function(t){return this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_},e.prototype.getPixelRatio=function(t){return this.replaceColor_(t),this.canvas_[t]?t:1},e.prototype.getImageState=function(){return this.imageState_},e.prototype.getHitDetectionImage=function(){if(!this.hitDetectionImage_)if(this.isTainted_()){var t=this.size_[0],e=this.size_[1],i=uS(t,e);i.fillRect(0,0,t,e),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_},e.prototype.getSize=function(){return this.size_},e.prototype.getSrc=function(){return this.src_},e.prototype.load=function(){if(0==this.imageState_){this.imageState_=1;try{this.image_.src=this.src_}catch($nt){this.handleImageError_()}this.unlisten_=rk(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}},e.prototype.replaceColor_=function(t){if(this.color_&&!this.canvas_[t]){var e=document.createElement("canvas");this.canvas_[t]=e,e.width=Math.ceil(this.image_.width*t),e.height=Math.ceil(this.image_.height*t);var i=e.getContext("2d");if(i.scale(t,t),i.drawImage(this.image_,0,0),i.globalCompositeOperation="multiply","multiply"===i.globalCompositeOperation||this.isTainted_())i.fillStyle=mW(this.color_),i.fillRect(0,0,e.width,e.height),i.globalCompositeOperation="destination-in",i.drawImage(this.image_,0,0);else{for(var n=i.getImageData(0,0,e.width,e.height),r=n.data,s=this.color_[0]/255,o=this.color_[1]/255,a=this.color_[2]/255,l=this.color_[3],c=0,h=r.length;c<h;c+=4)r[c]*=s,r[c+1]*=o,r[c+2]*=a,r[c+3]*=l;i.putImageData(n,0,0)}}},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(WC),Iq=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Pq=function(t){function e(e){var i=this,n=e||{};(i=t.call(this,{opacity:void 0!==n.opacity?n.opacity:1,rotation:void 0!==n.rotation?n.rotation:0,scale:void 0!==n.scale?n.scale:1,displacement:void 0!==n.displacement?n.displacement:[0,0],rotateWithView:void 0!==n.rotateWithView&&n.rotateWithView})||this).anchor_=void 0!==n.anchor?n.anchor:[.5,.5],i.normalizedAnchor_=null,i.anchorOrigin_=void 0!==n.anchorOrigin?n.anchorOrigin:"top-left",i.anchorXUnits_=void 0!==n.anchorXUnits?n.anchorXUnits:"fraction",i.anchorYUnits_=void 0!==n.anchorYUnits?n.anchorYUnits:"fraction",i.crossOrigin_=void 0!==n.crossOrigin?n.crossOrigin:null;var r=void 0!==n.img?n.img:null,s=void 0!==n.imgSize?n.imgSize:null,o=n.src;yS(!(void 0!==o&&r),4),yS(!r||r&&s,5),void 0!==o&&0!==o.length||!r||(o=r.src||YC(r)),yS(void 0!==o&&o.length>0,6);var a=void 0!==n.src?0:2;return i.color_=void 0!==n.color?_W(n.color):null,i.iconImage_=function(t,e,i,n,r,s){var o=CW.get(e,n,s);return o||(o=new Dq(t,e,i,n,r,s),CW.set(e,n,s,o)),o}(r,o,s,i.crossOrigin_,a,i.color_),i.offset_=void 0!==n.offset?n.offset:[0,0],i.offsetOrigin_=void 0!==n.offsetOrigin?n.offsetOrigin:"top-left",i.origin_=null,i.size_=void 0!==n.size?n.size:null,i}return Iq(e,t),e.prototype.clone=function(){var t=this.getScale();return new e({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,crossOrigin:this.crossOrigin_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,src:this.getSrc(),offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,size:null!==this.size_?this.size_.slice():void 0,opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})},e.prototype.getAnchor=function(){if(this.normalizedAnchor_)return this.normalizedAnchor_;var t=this.anchor_,e=this.getSize();if("fraction"==this.anchorXUnits_||"fraction"==this.anchorYUnits_){if(!e)return null;t=this.anchor_.slice(),"fraction"==this.anchorXUnits_&&(t[0]*=e[0]),"fraction"==this.anchorYUnits_&&(t[1]*=e[1])}if("top-left"!=this.anchorOrigin_){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),"top-right"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[0]=-t[0]+e[0]),"bottom-left"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[1]=-t[1]+e[1])}return this.normalizedAnchor_=t,this.normalizedAnchor_},e.prototype.setAnchor=function(t){this.anchor_=t,this.normalizedAnchor_=null},e.prototype.getColor=function(){return this.color_},e.prototype.getImage=function(t){return this.iconImage_.getImage(t)},e.prototype.getPixelRatio=function(t){return this.iconImage_.getPixelRatio(t)},e.prototype.getImageSize=function(){return this.iconImage_.getSize()},e.prototype.getHitDetectionImageSize=function(){return this.getImageSize()},e.prototype.getImageState=function(){return this.iconImage_.getImageState()},e.prototype.getHitDetectionImage=function(){return this.iconImage_.getHitDetectionImage()},e.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var t=this.offset_,e=this.getDisplacement();if("top-left"!=this.offsetOrigin_){var i=this.getSize(),n=this.iconImage_.getSize();if(!i||!n)return null;t=t.slice(),"top-right"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[0]=n[0]-i[0]-t[0]),"bottom-left"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[1]=n[1]-i[1]-t[1])}return t[0]+=e[0],t[1]+=e[1],this.origin_=t,this.origin_},e.prototype.getSrc=function(){return this.iconImage_.getSrc()},e.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},e.prototype.listenImageChange=function(t){this.iconImage_.addEventListener("change",t)},e.prototype.load=function(){this.iconImage_.load()},e.prototype.unlistenImageChange=function(t){this.iconImage_.removeEventListener("change",t)},e}(DZ),Oq={Point:function(t,e,i,n,r){var s,o=i.getImage(),a=i.getText();if(r&&(t=r,s=o&&a&&a.getText()?{}:void 0),o){if(2!=o.getImageState())return;var l=t.getBuilder(i.getZIndex(),"Image");l.setImageStyle(o,s),l.drawPoint(e,n)}if(a&&a.getText()){var c=t.getBuilder(i.getZIndex(),"Text");c.setTextStyle(a,s),c.drawText(e,n)}},LineString:function(t,e,i,n,r){var s=i.getStroke();if(s){var o=t.getBuilder(i.getZIndex(),"LineString");o.setFillStrokeStyle(null,s),o.drawLineString(e,n)}var a=i.getText();if(a&&a.getText()){var l=(r||t).getBuilder(i.getZIndex(),"Text");l.setTextStyle(a),l.drawText(e,n)}},Polygon:function(t,e,i,n,r){var s=i.getFill(),o=i.getStroke();if(s||o){var a=t.getBuilder(i.getZIndex(),"Polygon");a.setFillStrokeStyle(s,o),a.drawPolygon(e,n)}var l=i.getText();if(l&&l.getText()){var c=(r||t).getBuilder(i.getZIndex(),"Text");c.setTextStyle(l),c.drawText(e,n)}},MultiPoint:function(t,e,i,n,r){var s,o=i.getImage(),a=i.getText();if(r&&(t=r,s=o&&a&&a.getText()?{}:void 0),o){if(2!=o.getImageState())return;var l=t.getBuilder(i.getZIndex(),"Image");l.setImageStyle(o,s),l.drawMultiPoint(e,n)}if(a&&a.getText()){var c=(r||t).getBuilder(i.getZIndex(),"Text");c.setTextStyle(a,s),c.drawText(e,n)}},MultiLineString:function(t,e,i,n,r){var s=i.getStroke();if(s){var o=t.getBuilder(i.getZIndex(),"LineString");o.setFillStrokeStyle(null,s),o.drawMultiLineString(e,n)}var a=i.getText();if(a&&a.getText()){var l=(r||t).getBuilder(i.getZIndex(),"Text");l.setTextStyle(a),l.drawText(e,n)}},MultiPolygon:function(t,e,i,n,r){var s=i.getFill(),o=i.getStroke();if(o||s){var a=t.getBuilder(i.getZIndex(),"Polygon");a.setFillStrokeStyle(s,o),a.drawMultiPolygon(e,n)}var l=i.getText();if(l&&l.getText()){var c=(r||t).getBuilder(i.getZIndex(),"Text");c.setTextStyle(l),c.drawText(e,n)}},GeometryCollection:function(t,e,i,n,r){var s,o,a=e.getGeometriesArray();for(s=0,o=a.length;s<o;++s)(0,Oq[a[s].getType()])(t,a[s],i,n,r)},Circle:function(t,e,i,n,r){var s=i.getFill(),o=i.getStroke();if(s||o){var a=t.getBuilder(i.getZIndex(),"Circle");a.setFillStrokeStyle(s,o),a.drawCircle(e,n)}var l=i.getText();if(l&&l.getText()){var c=(r||t).getBuilder(i.getZIndex(),"Text");c.setTextStyle(l),c.drawText(e,n)}}};function Mq(t,e){return parseInt(YC(t),10)-parseInt(YC(e),10)}function Tq(t,e){var i=Rq(t,e);return i*i}function Rq(t,e){return.5*t/e}function Vq(t,e,i,n,r,s,o){var a=!1,l=i.getImage();if(l){var c=l.getImageState();2==c||3==c?l.unlistenImageChange(r):(0==c&&l.load(),c=l.getImageState(),l.listenImageChange(r),a=!0)}return function(t,e,i,n,r,s){var o=i.getGeometryFunction()(e);if(o){var a=o.simplifyTransformed(n,r);i.getRenderer()?Fq(t,a,i,e):(0,Oq[a.getType()])(t,a,i,e,s)}}(t,e,i,n,s,o),a}function Fq(t,e,i,n){if("GeometryCollection"!=e.getType())t.getBuilder(i.getZIndex(),"Default").drawCustom(e,n,i.getRenderer());else for(var r=e.getGeometries(),s=0,o=r.length;s<o;++s)Fq(t,r[s],i,n)}var Lq=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Uq=function(t){function e(e){var i=t.call(this,e)||this;return i.boundHandleStyleImageChange_=i.handleStyleImageChange_.bind(i),i.dirty_=!1,i.hitDetectionImageData_=null,i.renderedFeatures_=null,i.renderedRevision_=-1,i.renderedResolution_=NaN,i.renderedExtent_=[1/0,1/0,-1/0,-1/0],i.renderedCenter_=null,i.renderedProjection_=null,i.renderedRenderOrder_=null,i.replayGroup_=null,i.replayGroupChanged=!0,i.declutterExecutorGroup=null,i.clipping=!0,i}return Lq(e,t),e.prototype.useContainer=function(e,i,n){n<1&&(e=null),t.prototype.useContainer.call(this,e,i,n)},e.prototype.renderWorlds=function(t,e,i){var n=e.extent,r=e.viewState,s=r.center,o=r.resolution,a=r.projection,l=r.rotation,c=a.getExtent(),h=this.getLayer().getSource(),u=e.pixelRatio,d=e.viewHints,p=!(d[0]||d[1]),f=this.context,m=Math.round(e.size[0]*u),g=Math.round(e.size[1]*u),A=h.getWrapX()&&a.canWrapX(),b=A?YS(c):null,v=A?Math.ceil((n[2]-c[2])/b)+1:1,_=A?Math.floor((n[0]-c[0])/b):0;do{var y=this.getRenderTransform(s,o,l,u,m,g,_*b);t.execute(f,1,y,l,p,void 0,i)}while(++_<v)},e.prototype.renderDeclutter=function(t){this.declutterExecutorGroup&&this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree)},e.prototype.renderFrame=function(t,e){var i=t.pixelRatio,n=t.layerStatesArray[t.layerIndex];!function(t,e,i){aM(t,e,0,0,i,0,0)}(this.pixelTransform,1/i,1/i),hM(this.inversePixelTransform,this.pixelTransform);var r=uM(this.pixelTransform);this.useContainer(e,r,n.opacity);var s=this.context,o=s.canvas,a=this.replayGroup_,l=this.declutterExecutorGroup;if((!a||a.isEmpty())&&(!l||l.isEmpty()))return!this.containerReused&&o.width>0&&(o.width=0),this.container;var c=Math.round(t.size[0]*i),h=Math.round(t.size[1]*i);o.width!=c||o.height!=h?(o.width=c,o.height=h,o.style.transform!==r&&(o.style.transform=r)):this.containerReused||s.clearRect(0,0,c,h),this.preRender(s,t);var u=t.viewState,d=!1;if(n.extent&&this.clipping){var p=mE(n.extent);(d=!ES(p,t.extent)&&QS(p,t.extent))&&this.clipUnrotated(s,t,p)}this.renderWorlds(a,t),d&&s.restore(),this.postRender(s,t);var f=n.opacity,m=this.container;return f!==parseFloat(m.style.opacity)&&(m.style.opacity=1===f?"":String(f)),this.renderedRotation_!==u.rotation&&(this.renderedRotation_=u.rotation,this.hitDetectionImageData_=null),this.container},e.prototype.getFeatures=function(t){return new Promise((function(e){if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){var i=[this.context.canvas.width,this.context.canvas.height];lM(this.pixelTransform,i);var n=this.renderedCenter_,r=this.renderedResolution_,s=this.renderedRotation_,o=this.renderedProjection_,a=this.renderedExtent_,l=this.getLayer(),c=[],h=i[0]/2,u=i[1]/2;c.push(this.getRenderTransform(n,r,s,.5,h,u,0).slice());var d=l.getSource(),p=o.getExtent();if(d.getWrapX()&&o.canWrapX()&&!ES(p,a)){for(var f=a[0],m=YS(p),g=0;f<p[0];)--g,c.push(this.getRenderTransform(n,r,s,.5,h,u,m*g).slice()),f+=m;for(g=0,f=a[2];f>p[2];)++g,c.push(this.getRenderTransform(n,r,s,.5,h,u,m*g).slice()),f-=m}this.hitDetectionImageData_=function(t,e,i,n,r,s,o){var a=uS(t[0]/2,t[1]/2);a.imageSmoothingEnabled=!1;for(var l=a.canvas,c=new Sq(a,.5,r,null,o),h=i.length,u=Math.floor(16777215/h),d={},p=1;p<=h;++p){var f=i[p-1],m=f.getStyleFunction()||n;if(n){var g=m(f,s);if(g){Array.isArray(g)||(g=[g]);for(var A="#"+("000000"+(p*u).toString(16)).slice(-6),b=0,v=g.length;b<v;++b){var _=g[b],y=_.clone(),w=y.getFill();w&&w.setColor(A);var x=y.getStroke();x&&x.setColor(A),y.setText(void 0);var C=_.getImage();if(C){var S=C.getImageSize();if(!S)continue;var k=document.createElement("canvas");k.width=S[0],k.height=S[1];var E=k.getContext("2d",{alpha:!1});E.fillStyle=A;var D=E.canvas;E.fillRect(0,0,D.width,D.height),uS(S?S[0]:D.width,S?S[1]:D.height).drawImage(D,0,0),y.setImage(new Pq({img:D,imgSize:S,anchor:C.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:C.getOrigin(),size:C.getSize(),opacity:C.getOpacity(),scale:C.getScale(),rotation:C.getRotation(),rotateWithView:C.getRotateWithView()}))}var I=Number(y.getZIndex());(T=d[I])||(d[I]=T={},T.Polygon=[],T.Circle=[],T.LineString=[],T.Point=[]);var P=y.getGeometryFunction()(f);P&&QS(r,P.getExtent())&&T[P.getType().replace("Multi","")].push(P,y)}}}}for(var O=Object.keys(d).map(Number).sort(TC),M=(p=0,O.length);p<M;++p){var T=d[O[p]];for(var R in T){var V=T[R];for(b=0,v=V.length;b<v;b+=2){c.setStyle(V[b+1]);for(var F=0,L=e.length;F<L;++F)c.setTransform(e[F]),c.drawGeometry(V[b])}}}return a.getImageData(0,0,l.width,l.height)}(i,c,this.renderedFeatures_,l.getStyleFunction(),a,r,s)}e(function(t,e,i){var n=[];if(i){var r=4*(Math.round(t[0]/2)+Math.round(t[1]/2)*i.width),s=i.data[r+2]+256*(i.data[r+1]+256*i.data[r]),o=Math.floor(16777215/e.length);s&&s%o==0&&n.push(e[s/o-1])}return n}(t,this.renderedFeatures_,this.hitDetectionImageData_))}).bind(this))},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,r){var s=this;if(this.replayGroup_){var o,a=e.viewState.resolution,l=e.viewState.rotation,c=this.getLayer(),h={},u=function(t,e,i){var s=YC(t),o=h[s];if(o){if(!0!==o&&i<o.distanceSq){if(0===i)return h[s]=!0,r.splice(r.lastIndexOf(o),1),n(t,c,e);o.geometry=e,o.distanceSq=i}}else{if(0===i)return h[s]=!0,n(t,c,e);r.push(h[s]={feature:t,layer:c,geometry:e,distanceSq:i,callback:n})}},d=[this.replayGroup_];return this.declutterExecutorGroup&&d.push(this.declutterExecutorGroup),d.some(function(n){return o=n.forEachFeatureAtCoordinate(t,a,l,i,u,n===s.declutterExecutorGroup?e.declutterTree.all().map(function(t){return t.value}):null)}),o}},e.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.prepareFrame=function(t){var e=this.getLayer(),i=e.getSource();if(!i)return!1;var n=t.viewHints[0],r=t.viewHints[1],s=e.getUpdateWhileAnimating(),o=e.getUpdateWhileInteracting();if(!this.dirty_&&!s&&n||!o&&r)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;var a=t.extent,l=t.viewState,c=l.projection,h=l.resolution,u=t.pixelRatio,d=e.getRevision(),p=e.getRenderBuffer(),f=e.getRenderOrder();void 0===f&&(f=Mq);var m=l.center.slice(),g=xS(a,p*h),A=[g.slice()],b=c.getExtent();if(i.getWrapX()&&c.canWrapX()&&!ES(b,t.extent)){var v=YS(b),_=Math.max(YS(g)/2,v);g[0]=b[0]-_,g[2]=b[2]+_,Qk(m,c);var y=function(t,e){var i=e.getExtent(),n=HS(t);if(e.canWrapX()&&(n[0]<i[0]||n[0]>=i[2])){var r=YS(i),s=Math.floor((n[0]-i[0])/r)*r;t[0]-=s,t[2]-=s}return t}(A[0],c);y[0]<b[0]&&y[2]<b[2]?A.push([y[0]+v,y[1],y[2]+v,y[3]]):y[0]>b[0]&&y[2]>b[2]&&A.push([y[0]-v,y[1],y[2]-v,y[3]])}if(!this.dirty_&&this.renderedResolution_==h&&this.renderedRevision_==d&&this.renderedRenderOrder_==f&&ES(this.renderedExtent_,g))return this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;var w,x,C,S=new cq(Rq(h,u),g,h,u);for(this.getLayer().getDeclutter()&&(w=new cq(Rq(h,u),g,h,u)),x=0,C=A.length;x<C;++x)i.loadFeatures(A[x],h,c);var k=Tq(h,u),E=(function(t){var i,n=t.getStyleFunction()||e.getStyleFunction();if(n&&(i=n(t,h)),i){var r=this.renderFeature(t,k,i,S,undefined,w);this.dirty_=this.dirty_||r}}).bind(this),D=fE(g),I=i.getFeaturesInExtent(D);for(f&&I.sort(f),x=0,C=I.length;x<C;++x)E(I[x]);this.renderedFeatures_=I;var P=S.finish(),O=new xq(g,h,u,i.getOverlaps(),P,e.getRenderBuffer());return w&&(this.declutterExecutorGroup=new xq(g,h,u,i.getOverlaps(),w.finish(),e.getRenderBuffer())),this.renderedResolution_=h,this.renderedRevision_=d,this.renderedRenderOrder_=f,this.renderedExtent_=g,this.renderedCenter_=m,this.renderedProjection_=c,this.replayGroup_=O,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0},e.prototype.renderFeature=function(t,e,i,n,r,s){if(!i)return!1;var o=!1;if(Array.isArray(i))for(var a=0,l=i.length;a<l;++a)o=Vq(n,t,i[a],e,this.boundHandleStyleImageChange_,r,s)||o;else o=Vq(n,t,i,e,this.boundHandleStyleImageChange_,r,s);return o},e}(lW),Bq=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Nq=function(t){function e(e){return t.call(this,e)||this}return Bq(e,t),e.prototype.createRenderer=function(){return new Uq(this)},e}(HZ);function jq(t,e){return[[-1/0,-1/0,1/0,1/0]]}function zq(t,e){return function(i,n,r,s,o){var a=this;!function(t,e,i,n,r,s,o){var a=new XMLHttpRequest;a.open("GET","function"==typeof t?t(i,n,r):t,!0),"arraybuffer"==e.getType()&&(a.responseType="arraybuffer"),a.withCredentials=!1,a.onload=function(t){if(!a.status||a.status>=200&&a.status<300){var n=e.getType(),l=void 0;"json"==n||"text"==n?l=a.responseText:"xml"==n?(l=a.responseXML)||(l=(new DOMParser).parseFromString(a.responseText,"application/xml")):"arraybuffer"==n&&(l=a.response),l?s(e.readFeatures(l,{extent:i,featureProjection:r}),e.readProjection(l)):o()}else o()},a.onerror=o,a.send()}(t,e,i,n,r,function(t,e){void 0!==s&&s(t),a.addFeatures(t)},o||jC)}}var Hq=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Kq=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r.feature=i,r.features=n,r}return Hq(e,t),e}(MC),$q=function(t){function e(e){var i=this,n=e||{};(i=t.call(this,{attributions:n.attributions,projection:void 0,state:"ready",wrapX:void 0===n.wrapX||n.wrapX})||this).loader_=jC,i.format_=n.format,i.overlaps_=void 0===n.overlaps||n.overlaps,i.url_=n.url,void 0!==n.loader?i.loader_=n.loader:void 0!==i.url_&&(yS(i.format_,7),i.loader_=zq(i.url_,i.format_)),i.strategy_=void 0!==n.strategy?n.strategy:jq;var r,s,o=void 0===n.useSpatialIndex||n.useSpatialIndex;return i.featuresRtree_=o?new EZ:null,i.loadedExtentsRtree_=new EZ,i.nullGeometryFeatures_={},i.idIndex_={},i.uidIndex_={},i.featureChangeKeys_={},i.featuresCollection_=null,Array.isArray(n.features)?s=n.features:n.features&&(s=(r=n.features).getArray()),o||void 0!==r||(r=new j$(s)),void 0!==s&&i.addFeaturesInternal(s),void 0!==r&&i.bindFeaturesCollection_(r),i}return Hq(e,t),e.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},e.prototype.addFeatureInternal=function(t){var e=YC(t);if(this.addToIndex_(e,t)){this.setupChangeEvents_(e,t);var i=t.getGeometry();if(i){var n=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(n,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new Kq("addfeature",t))}else this.featuresCollection_&&this.featuresCollection_.remove(t)},e.prototype.setupChangeEvents_=function(t,e){this.featureChangeKeys_[t]=[tk(e,"change",this.handleFeatureChange_,this),tk(e,"propertychange",this.handleFeatureChange_,this)]},e.prototype.addToIndex_=function(t,e){var i=!0,n=e.getId();return void 0!==n&&(n.toString()in this.idIndex_?i=!1:this.idIndex_[n.toString()]=e),i&&(yS(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),i},e.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},e.prototype.addFeaturesInternal=function(t){for(var e=[],i=[],n=[],r=0,s=t.length;r<s;r++){var o=YC(l=t[r]);this.addToIndex_(o,l)&&i.push(l)}r=0;for(var a=i.length;r<a;r++){var l;o=YC(l=i[r]),this.setupChangeEvents_(o,l);var c=l.getGeometry();if(c){var h=c.getExtent();e.push(h),n.push(l)}else this.nullGeometryFeatures_[o]=l}this.featuresRtree_&&this.featuresRtree_.load(e,n),r=0;for(var u=i.length;r<u;r++)this.dispatchEvent(new Kq("addfeature",i[r]))},e.prototype.bindFeaturesCollection_=function(t){var e=!1;this.addEventListener("addfeature",function(i){e||(e=!0,t.push(i.feature),e=!1)}),this.addEventListener("removefeature",function(i){e||(e=!0,t.remove(i.feature),e=!1)}),t.addEventListener("add",(function(t){e||(e=!0,this.addFeature(t.element),e=!1)}).bind(this)),t.addEventListener("remove",(function(t){e||(e=!0,this.removeFeature(t.element),e=!1)}).bind(this)),this.featuresCollection_=t},e.prototype.clear=function(t){if(t){for(var e in this.featureChangeKeys_)this.featureChangeKeys_[e].forEach(ik);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_)for(var i in this.featuresRtree_.forEach(this.removeFeatureInternal.bind(this)),this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[i]);this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};var n=new Kq("clear");this.dispatchEvent(n),this.changed()},e.prototype.forEachFeature=function(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)},e.prototype.forEachFeatureAtCoordinateDirect=function(t,e){return this.forEachFeatureInExtent([t[0],t[1],t[0],t[1]],function(i){return i.getGeometry().intersectsCoordinate(t)?e(i):void 0})},e.prototype.forEachFeatureInExtent=function(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)},e.prototype.forEachFeatureIntersectingExtent=function(t,e){return this.forEachFeatureInExtent(t,function(i){if(i.getGeometry().intersectsExtent(t)){var n=e(i);if(n)return n}})},e.prototype.getFeaturesCollection=function(){return this.featuresCollection_},e.prototype.getFeatures=function(){var t;return this.featuresCollection_?t=this.featuresCollection_.getArray():this.featuresRtree_&&(t=this.featuresRtree_.getAll(),$C(this.nullGeometryFeatures_)||LC(t,KC(this.nullGeometryFeatures_))),t},e.prototype.getFeaturesAtCoordinate=function(t){var e=[];return this.forEachFeatureAtCoordinateDirect(t,function(t){e.push(t)}),e},e.prototype.getFeaturesInExtent=function(t){return this.featuresRtree_?this.featuresRtree_.getInExtent(t):this.featuresCollection_?this.featuresCollection_.getArray():[]},e.prototype.getClosestFeatureToCoordinate=function(t,e){var i=t[0],n=t[1],r=null,s=[NaN,NaN],o=1/0,a=[-1/0,-1/0,1/0,1/0],l=e||BC;return this.featuresRtree_.forEachInExtent(a,function(t){if(l(t)){var e=t.getGeometry(),c=o;if((o=e.closestPointXY(i,n,s,o))<c){r=t;var h=Math.sqrt(o);a[0]=i-h,a[1]=n-h,a[2]=i+h,a[3]=n+h}}}),r},e.prototype.getExtent=function(t){return this.featuresRtree_.getExtent(t)},e.prototype.getFeatureById=function(t){var e=this.idIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getFeatureByUid=function(t){var e=this.uidIndex_[t];return void 0!==e?e:null},e.prototype.getFormat=function(){return this.format_},e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.getUrl=function(){return this.url_},e.prototype.handleFeatureChange_=function(t){var e=t.target,i=YC(e),n=e.getGeometry();if(n){var r=n.getExtent();i in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[i],this.featuresRtree_&&this.featuresRtree_.insert(r,e)):this.featuresRtree_&&this.featuresRtree_.update(r,e)}else i in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[i]=e);var s=e.getId();if(void 0!==s){var o=s.toString();this.idIndex_[o]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[o]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[i]=e;this.changed(),this.dispatchEvent(new Kq("changefeature",e))},e.prototype.hasFeature=function(t){var e=t.getId();return void 0!==e?e in this.idIndex_:YC(t)in this.uidIndex_},e.prototype.isEmpty=function(){return this.featuresRtree_.isEmpty()&&$C(this.nullGeometryFeatures_)},e.prototype.loadFeatures=function(t,e,i){var n=this.loadedExtentsRtree_,r=this.strategy_(t,e);this.loading=!1;for(var s=function(t,s){var a=r[t];n.forEachInExtent(a,function(t){return ES(t.extent,a)})||(o.dispatchEvent(new Kq("featuresloadstart")),o.loader_.call(o,a,e,i,(function(t){this.dispatchEvent(new Kq("featuresloadend",void 0,t))}).bind(o),(function(){this.dispatchEvent(new Kq("featuresloaderror"))}).bind(o)),n.insert(a,{extent:a.slice()}),o.loading=o.loader_!==jC)},o=this,a=0,l=r.length;a<l;++a)s(a)},e.prototype.refresh=function(){this.clear(!0),this.loadedExtentsRtree_.clear(),t.prototype.refresh.call(this)},e.prototype.removeLoadedExtent=function(t){var e,i=this.loadedExtentsRtree_;i.forEachInExtent(t,function(i){if(RS(i.extent,t))return e=i,!0}),e&&i.remove(e)},e.prototype.removeFeature=function(t){var e=YC(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t),this.changed()},e.prototype.removeFeatureInternal=function(t){var e=YC(t);this.featureChangeKeys_[e].forEach(ik),delete this.featureChangeKeys_[e];var i=t.getId();void 0!==i&&delete this.idIndex_[i.toString()],delete this.uidIndex_[e],this.dispatchEvent(new Kq("removefeature",t))},e.prototype.removeFromIdIndex_=function(t){var e=!1;for(var i in this.idIndex_)if(this.idIndex_[i]===t){delete this.idIndex_[i],e=!0;break}return e},e.prototype.setLoader=function(t){this.loader_=t},e.prototype.setUrl=function(t){yS(this.format_,7),this.setLoader(zq(t,this.format_))},e}(zE),Gq=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Wq=[0,0,0,0],Zq=[],qq=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r.features=i,r.mapBrowserEvent=n,r}return Gq(e,t),e}(MC);function Yq(t,e){return t.index-e.index}function Qq(t,e,i){var n=e.geometry;if("Circle"===n.getType()){var r=n;if(1===e.index){var s=Wk(r.getCenter(),pE(t)),o=Math.sqrt(s)-r.getRadius();return o*o}}var a=pE(t);return Zq[0]=pE(e.segment[0]),Zq[1]=pE(e.segment[1]),qk(a,Zq)}function Xq(t,e,i){var n=e.geometry;if("Circle"===n.getType()&&1===e.index)return dE(n.getClosestPoint(pE(t)));var r=pE(t);return Zq[0]=pE(e.segment[0]),Zq[1]=pE(e.segment[1]),dE(Hk(r,Zq))}var Jq=function(t){function e(e){var i,n,r=t.call(this,e)||this;if(r.boundHandleFeatureChange_=r.handleFeatureChange_.bind(r),r.condition_=e.condition?e.condition:aG,r.defaultDeleteCondition_=function(t){return function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey}(t)&&function(t){return t.type==$$.SINGLECLICK}(t)},r.deleteCondition_=e.deleteCondition?e.deleteCondition:r.defaultDeleteCondition_,r.insertVertexCondition_=e.insertVertexCondition?e.insertVertexCondition:tG,r.vertexFeature_=null,r.vertexSegments_=null,r.lastPixel_=[0,0],r.ignoreNextSingleClick_=!1,r.featuresBeingModified_=null,r.rBush_=new EZ,r.pixelTolerance_=void 0!==e.pixelTolerance?e.pixelTolerance:10,r.snappedToVertex_=!1,r.changingFeature_=!1,r.dragSegments_=[],r.overlay_=new Nq({source:new $q({useSpatialIndex:!1,wrapX:!!e.wrapX}),style:e.style?e.style:(i=BZ(),function(t,e){return i.Point}),updateWhileAnimating:!0,updateWhileInteracting:!0}),r.SEGMENT_WRITERS_={Point:r.writePointGeometry_.bind(r),LineString:r.writeLineStringGeometry_.bind(r),LinearRing:r.writeLineStringGeometry_.bind(r),Polygon:r.writePolygonGeometry_.bind(r),MultiPoint:r.writeMultiPointGeometry_.bind(r),MultiLineString:r.writeMultiLineStringGeometry_.bind(r),MultiPolygon:r.writeMultiPolygonGeometry_.bind(r),Circle:r.writeCircleGeometry_.bind(r),GeometryCollection:r.writeGeometryCollectionGeometry_.bind(r)},r.source_=null,r.hitDetection_=null,e.features?n=e.features:e.source&&(r.source_=e.source,n=new j$(r.source_.getFeatures()),r.source_.addEventListener("addfeature",r.handleSourceAdd_.bind(r)),r.source_.addEventListener("removefeature",r.handleSourceRemove_.bind(r))),!n)throw new Error("The modify interaction requires features, a source or a layer");return e.hitDetection&&(r.hitDetection_=e.hitDetection),r.features_=n,r.features_.forEach(r.addFeature_.bind(r)),r.features_.addEventListener("add",r.handleFeatureAdd_.bind(r)),r.features_.addEventListener("remove",r.handleFeatureRemove_.bind(r)),r.lastPointerEvent_=null,r.delta_=[0,0],r}return Gq(e,t),e.prototype.addFeature_=function(t){var e=t.getGeometry();if(e){var i=this.SEGMENT_WRITERS_[e.getType()];i&&i(t,e)}var n=this.getMap();n&&n.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,n),t.addEventListener("change",this.boundHandleFeatureChange_)},e.prototype.willModifyFeatures_=function(t,e){if(!this.featuresBeingModified_){this.featuresBeingModified_=new j$;for(var i=this.featuresBeingModified_.getArray(),n=0,r=e.length;n<r;++n){var s=e[n][0].feature;-1===i.indexOf(s)&&this.featuresBeingModified_.push(s)}this.dispatchEvent(new qq("modifystart",this.featuresBeingModified_,t))}},e.prototype.removeFeature_=function(t){this.removeFeatureSegmentData_(t),this.vertexFeature_&&0===this.features_.getLength()&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.removeEventListener("change",this.boundHandleFeatureChange_)},e.prototype.removeFeatureSegmentData_=function(t){var e=this.rBush_,i=[];e.forEach(function(e){t===e.feature&&i.push(e)});for(var n=i.length-1;n>=0;--n){for(var r=i[n],s=this.dragSegments_.length-1;s>=0;--s)this.dragSegments_[s][0]===r&&this.dragSegments_.splice(s,1);e.remove(r)}},e.prototype.setActive=function(e){this.vertexFeature_&&!e&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.prototype.setActive.call(this,e)},e.prototype.setMap=function(e){this.overlay_.setMap(e),t.prototype.setMap.call(this,e)},e.prototype.getOverlay=function(){return this.overlay_},e.prototype.handleSourceAdd_=function(t){t.feature&&this.features_.push(t.feature)},e.prototype.handleSourceRemove_=function(t){t.feature&&this.features_.remove(t.feature)},e.prototype.handleFeatureAdd_=function(t){this.addFeature_(t.element)},e.prototype.handleFeatureChange_=function(t){if(!this.changingFeature_){var e=t.target;this.removeFeature_(e),this.addFeature_(e)}},e.prototype.handleFeatureRemove_=function(t){this.removeFeature_(t.element)},e.prototype.writePointGeometry_=function(t,e){var i=e.getCoordinates(),n={feature:t,geometry:e,segment:[i,i]};this.rBush_.insert(e.getExtent(),n)},e.prototype.writeMultiPointGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length;n<r;++n){var s=i[n],o={feature:t,geometry:e,depth:[n],index:n,segment:[s,s]};this.rBush_.insert(e.getExtent(),o)}},e.prototype.writeLineStringGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length-1;n<r;++n){var s=i.slice(n,n+2),o={feature:t,geometry:e,index:n,segment:s};this.rBush_.insert(wS(s),o)}},e.prototype.writeMultiLineStringGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length;n<r;++n)for(var s=i[n],o=0,a=s.length-1;o<a;++o){var l=s.slice(o,o+2),c={feature:t,geometry:e,depth:[n],index:o,segment:l};this.rBush_.insert(wS(l),c)}},e.prototype.writePolygonGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length;n<r;++n)for(var s=i[n],o=0,a=s.length-1;o<a;++o){var l=s.slice(o,o+2),c={feature:t,geometry:e,depth:[n],index:o,segment:l};this.rBush_.insert(wS(l),c)}},e.prototype.writeMultiPolygonGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length;n<r;++n)for(var s=i[n],o=0,a=s.length;o<a;++o)for(var l=s[o],c=0,h=l.length-1;c<h;++c){var u=l.slice(c,c+2),d={feature:t,geometry:e,depth:[o,n],index:c,segment:u};this.rBush_.insert(wS(u),d)}},e.prototype.writeCircleGeometry_=function(t,e){var i=e.getCenter(),n={feature:t,geometry:e,index:0,segment:[i,i]},r={feature:t,geometry:e,index:1,segment:[i,i]},s=[n,r];n.featureSegments=s,r.featureSegments=s,this.rBush_.insert(MS(i),n),this.rBush_.insert(e.getExtent(),r)},e.prototype.writeGeometryCollectionGeometry_=function(t,e){for(var i=e.getGeometriesArray(),n=0;n<i.length;++n){var r=i[n];(0,this.SEGMENT_WRITERS_[r.getType()])(t,r)}},e.prototype.createOrUpdateVertexFeature_=function(t,e,i){var n=this.vertexFeature_;return n?n.getGeometry().setCoordinates(t):(n=new pH(new jM(t)),this.vertexFeature_=n,this.overlay_.getSource().addFeature(n)),n.set("features",e),n.set("geometries",i),n},e.prototype.handleEvent=function(e){return!e.originalEvent||(this.lastPointerEvent_=e,e.map.getView().getInteracting()||e.type!=$$.POINTERMOVE||this.handlingDownUpSequence||this.handlePointerMove_(e),this.vertexFeature_&&this.deleteCondition_(e)&&(i=!(e.type!=$$.SINGLECLICK||!this.ignoreNextSingleClick_)||this.removePoint()),e.type==$$.SINGLECLICK&&(this.ignoreNextSingleClick_=!1),t.prototype.handleEvent.call(this,e)&&!i);var i},e.prototype.handleDragEvent=function(t){this.ignoreNextSingleClick_=!1,this.willModifyFeatures_(t,this.dragSegments_);for(var e=[t.coordinate[0]+this.delta_[0],t.coordinate[1]+this.delta_[1]],i=[],n=[],r=0,s=this.dragSegments_.length;r<s;++r){var o=this.dragSegments_[r],a=o[0],l=a.feature;-1===i.indexOf(l)&&i.push(l);var c=a.geometry;-1===n.indexOf(c)&&n.push(c);for(var h=a.depth,u=void 0,d=a.segment,p=o[1];e.length<c.getStride();)e.push(d[p][e.length]);switch(c.getType()){case"Point":u=e,d[0]=e,d[1]=e;break;case"MultiPoint":(u=c.getCoordinates())[a.index]=e,d[0]=e,d[1]=e;break;case"LineString":(u=c.getCoordinates())[a.index+p]=e,d[p]=e;break;case"MultiLineString":case"Polygon":(u=c.getCoordinates())[h[0]][a.index+p]=e,d[p]=e;break;case"MultiPolygon":(u=c.getCoordinates())[h[1]][h[0]][a.index+p]=e,d[p]=e;break;case"Circle":if(d[0]=e,d[1]=e,0===a.index)this.changingFeature_=!0,c.setCenter(e),this.changingFeature_=!1;else{this.changingFeature_=!0,t.map.getView().getProjection();var f=Zk(pE(c.getCenter()),pE(e));c.setRadius(f),this.changingFeature_=!1}}u&&this.setGeometryCoordinates_(c,u)}this.createOrUpdateVertexFeature_(e,i,n)},e.prototype.handleDownEvent=function(t){if(!this.condition_(t))return!1;var e=t.coordinate;this.handlePointerAtPixel_(t.pixel,t.map,e),this.dragSegments_.length=0,this.featuresBeingModified_=null;var i=this.vertexFeature_;if(i){t.map.getView().getProjection();var n=[],r=i.getGeometry().getCoordinates(),s=wS([r]),o=this.rBush_.getInExtent(s),a={};o.sort(Yq);for(var l=0,c=o.length;l<c;++l){var h=o[l],u=h.segment,d=YC(h.geometry),p=h.depth;if(p&&(d+="-"+p.join("-")),a[d]||(a[d]=new Array(2)),"Circle"!==h.geometry.getType()||1!==h.index)if(!$k(u[0],r)||a[d][0])if(!$k(u[1],r)||a[d][1])YC(u)in this.vertexSegments_&&!a[d][0]&&!a[d][1]&&this.insertVertexCondition_(t)&&n.push(h);else{if(("LineString"===h.geometry.getType()||"MultiLineString"===h.geometry.getType())&&a[d][0]&&0===a[d][0].index)continue;this.dragSegments_.push([h,1]),a[d][1]=h}else this.dragSegments_.push([h,0]),a[d][0]=h;else $k(Xq(e,h),r)&&!a[d][0]&&(this.dragSegments_.push([h,0]),a[d][0]=h)}n.length&&this.willModifyFeatures_(t,[n]);for(var f=n.length-1;f>=0;--f)this.insertVertex_(n[f],r)}return!!this.vertexFeature_},e.prototype.handleUpEvent=function(t){for(var e=this.dragSegments_.length-1;e>=0;--e){var i=this.dragSegments_[e][0],n=i.geometry;if("Circle"===n.getType()){var r=n.getCenter(),s=i.featureSegments[0],o=i.featureSegments[1];s.segment[0]=r,s.segment[1]=r,o.segment[0]=r,o.segment[1]=r,this.rBush_.update(MS(r),s),this.rBush_.update(n.getExtent(),o)}else this.rBush_.update(wS(i.segment),i)}return this.featuresBeingModified_&&(this.dispatchEvent(new qq("modifyend",this.featuresBeingModified_,t)),this.featuresBeingModified_=null),!1},e.prototype.handlePointerMove_=function(t){this.lastPixel_=t.pixel,this.handlePointerAtPixel_(t.pixel,t.map,t.coordinate)},e.prototype.handlePointerAtPixel_=function(t,e,i){var n,r,s=this,o=i||e.getCoordinateFromPixel(t);if(e.getView().getProjection(),this.hitDetection_&&e.forEachFeatureAtPixel(t,function(t,e,i){if("Point"===(i=i||t.getGeometry()).getType()){r=i;var s=i.getCoordinates();n=[{feature:t,geometry:i,segment:[s,s]}]}return!0},{layerFilter:"object"==typeof this.hitDetection_?function(t){return t===s.hitDetection_}:void 0}),!n){var a=fE(xS(mE(MS(o,Wq)),e.getView().getResolution()*this.pixelTolerance_,Wq));n=this.rBush_.getInExtent(a)}if(n&&n.length>0){var l=n.sort(function(t,e){return Qq(o,t)-Qq(o,e)})[0],c=l.segment,h=Xq(o,l),u=e.getPixelFromCoordinate(h),d=Zk(t,u);if(r||d<=this.pixelTolerance_){var p={};if(p[YC(c)]=!0,this.delta_[0]=h[0]-o[0],this.delta_[1]=h[1]-o[1],"Circle"===l.geometry.getType()&&1===l.index)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(h,[l.feature],[l.geometry]);else{var f=e.getPixelFromCoordinate(c[0]),m=e.getPixelFromCoordinate(c[1]),g=Wk(u,f),A=Wk(u,m);d=Math.sqrt(Math.min(g,A)),this.snappedToVertex_=d<=this.pixelTolerance_,this.snappedToVertex_&&(h=g>A?c[1]:c[0]),this.createOrUpdateVertexFeature_(h,[l.feature],[l.geometry]);var b={};b[YC(l.geometry)]=!0;for(var v=1,_=n.length;v<_;++v){var y=n[v].segment;if(!($k(c[0],y[0])&&$k(c[1],y[1])||$k(c[0],y[1])&&$k(c[1],y[0])))break;var w=YC(n[v].geometry);w in b||(b[w]=!0,p[YC(y)]=!0)}}return void(this.vertexSegments_=p)}}this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null)},e.prototype.insertVertex_=function(t,e){for(var i,n=t.segment,r=t.feature,s=t.geometry,o=t.depth,a=t.index;e.length<s.getStride();)e.push(0);switch(s.getType()){case"MultiLineString":case"Polygon":(i=s.getCoordinates())[o[0]].splice(a+1,0,e);break;case"MultiPolygon":(i=s.getCoordinates())[o[1]][o[0]].splice(a+1,0,e);break;case"LineString":(i=s.getCoordinates()).splice(a+1,0,e);break;default:return}this.setGeometryCoordinates_(s,i);var l=this.rBush_;l.remove(t),this.updateSegmentIndices_(s,a,o,1);var c={segment:[n[0],e],feature:r,geometry:s,depth:o,index:a};l.insert(wS(c.segment),c),this.dragSegments_.push([c,1]);var h={segment:[e,n[1]],feature:r,geometry:s,depth:o,index:a+1};l.insert(wS(h.segment),h),this.dragSegments_.push([h,0]),this.ignoreNextSingleClick_=!0},e.prototype.removePoint=function(){if(this.lastPointerEvent_&&this.lastPointerEvent_.type!=$$.POINTERDRAG){var t=this.lastPointerEvent_;this.willModifyFeatures_(t,this.dragSegments_);var e=this.removeVertex_();return this.dispatchEvent(new qq("modifyend",this.featuresBeingModified_,t)),this.featuresBeingModified_=null,e}return!1},e.prototype.removeVertex_=function(){var t,e,i,n,r,s,o,a,l,c,h,u=this.dragSegments_,d={},p=!1;for(r=u.length-1;r>=0;--r)h=YC((c=(i=u[r])[0]).feature),c.depth&&(h+="-"+c.depth.join("-")),h in d||(d[h]={}),0===i[1]?(d[h].right=c,d[h].index=c.index):1==i[1]&&(d[h].left=c,d[h].index=c.index+1);for(h in d){switch(l=d[h].right,(a=(s=d[h].index)-1)<0&&(a=0),t=e=(n=(c=void 0!==(o=d[h].left)?o:l).geometry).getCoordinates(),p=!1,n.getType()){case"MultiLineString":e[c.depth[0]].length>2&&(e[c.depth[0]].splice(s,1),p=!0);break;case"LineString":e.length>2&&(e.splice(s,1),p=!0);break;case"MultiPolygon":t=t[c.depth[1]];case"Polygon":(t=t[c.depth[0]]).length>4&&(s==t.length-1&&(s=0),t.splice(s,1),p=!0,0===s&&(t.pop(),t.push(t[0]),a=t.length-1))}if(p){this.setGeometryCoordinates_(n,e);var f=[];if(void 0!==o&&(this.rBush_.remove(o),f.push(o.segment[0])),void 0!==l&&(this.rBush_.remove(l),f.push(l.segment[1])),void 0!==o&&void 0!==l){var m={depth:c.depth,feature:c.feature,geometry:c.geometry,index:a,segment:f};this.rBush_.insert(wS(m.segment),m)}this.updateSegmentIndices_(n,s,c.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),u.length=0}}return p},e.prototype.setGeometryCoordinates_=function(t,e){this.changingFeature_=!0,t.setCoordinates(e),this.changingFeature_=!1},e.prototype.updateSegmentIndices_=function(t,e,i,n){this.rBush_.forEachInExtent(t.getExtent(),function(r){r.geometry===t&&(void 0===i||void 0===r.depth||UC(r.depth,i))&&r.index>e&&(r.index+=n)})},e}(Y$),tY=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),eY=function(t){function e(e,i,n){var r=t.call(this)||this;return void 0!==n&&void 0===i?r.setFlatCoordinates(n,e):r.setCenterAndRadius(e,i||0,n),r}return tY(e,t),e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,i,n){var r=this.flatCoordinates,s=t-r[0],o=e-r[1],a=s*s+o*o;if(a<n){if(0===a)for(var l=0;l<this.stride;++l)i[l]=r[l];else{var c=this.getRadius()/Math.sqrt(a);for(i[0]=r[0]+c*s,i[1]=r[1]+c*o,l=2;l<this.stride;++l)i[l]=r[l]}return i.length=this.stride,a}return n},e.prototype.containsXY=function(t,e){var i=this.flatCoordinates,n=t-i[0],r=e-i[1];return n*n+r*r<=this.getRadiusSquared_()},e.prototype.getCenter=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.computeExtent=function(t){var e=this.flatCoordinates,i=e[this.stride]-e[0];return PS(e[0]-i,e[1]-i,e[0]+i,e[1]+i,t)},e.prototype.getRadius=function(){return Math.sqrt(this.getRadiusSquared_())},e.prototype.getRadiusSquared_=function(){var t=this.flatCoordinates[this.stride]-this.flatCoordinates[0],e=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return t*t+e*e},e.prototype.getType=function(){return"Circle"},e.prototype.intersectsExtent=function(t){if(QS(t,this.getExtent())){var e=this.getCenter();return t[0]<=e[0]&&t[2]>=e[0]||t[1]<=e[1]&&t[3]>=e[1]||BS(t,this.intersectsCoordinate.bind(this))}return!1},e.prototype.setCenter=function(t){var e=this.stride,i=this.flatCoordinates[e]-this.flatCoordinates[0],n=t.slice();n[e]=n[0]+i;for(var r=1;r<e;++r)n[e+r]=t[r];this.setFlatCoordinates(this.layout,n),this.changed()},e.prototype.setCenterAndRadius=function(t,e,i){this.setLayout(i,t,0),this.flatCoordinates||(this.flatCoordinates=[]);var n=this.flatCoordinates,r=kM(n,0,t);n[r++]=n[0]+e;for(var s=1,o=this.stride;s<o;++s)n[r++]=n[s];n.length=r,this.changed()},e.prototype.getCoordinates=function(){return null},e.prototype.setCoordinates=function(t,e){},e.prototype.setRadius=function(t){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+t,this.changed()},e.prototype.rotate=function(t,e){var i=this.getCenter(),n=this.getStride();this.setCenter(pM(i,0,i.length,n,t,e,i)),this.changed()},e.prototype.translate=function(t,e){var i=this.getCenter(),n=this.getStride();this.setCenter(fM(i,0,i.length,n,t,e,i)),this.changed()},e}(_M),iY=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),nY=function(t){function e(e,i){var n=t.call(this,e)||this;return n.feature=i,n}return iY(e,t),e}(MC),rY=function(t){function e(e){var i,n,r=this,s=e;s.stopDown||(s.stopDown=NC),(r=t.call(this,s)||this).shouldHandle_=!1,r.downPx_=null,r.freehand_=!1,r.source_=e.source?e.source:null,r.features_=e.features?e.features:null,r.snapTolerance_=e.snapTolerance?e.snapTolerance:12,r.type_=e.type,r.mode_=("Point"===(i=r.type_)||"MultiPoint"===i?n="Point":"LineString"===i||"MultiLineString"===i?n="LineString":"Polygon"===i||"MultiPolygon"===i?n="Polygon":"Circle"===i&&(n="Circle"),n),r.stopClick_=!!e.stopClick,r.minPoints_=e.minPoints?e.minPoints:"Polygon"===r.mode_?3:2,r.maxPoints_="Circle"===r.mode_?2:e.maxPoints?e.maxPoints:1/0,r.finishCondition_=e.finishCondition?e.finishCondition:BC;var o,a=e.geometryFunction;if(!a){var l,c=r.mode_;"Circle"===c?a=function(t,e,i){var n=e||new eY([NaN,NaN]),r=pE(t[0]),s=Wk(r,pE(t[t.length-1]));return n.setCenterAndRadius(r,Math.sqrt(s)),n}:("Point"===c?l=jM:"LineString"===c?l=kH:"Polygon"===c&&(l=iT),a=function(t,e,i){return e?e.setCoordinates("Polygon"===c?t[0].length?[t[0].concat([t[0][0]])]:[]:t):e=new l(t),e})}return r.geometryFunction_=a,r.dragVertexDelay_=void 0!==e.dragVertexDelay?e.dragVertexDelay:500,r.finishCoordinate_=null,r.sketchFeature_=null,r.sketchPoint_=null,r.sketchCoords_=null,r.sketchLine_=null,r.sketchLineCoords_=null,r.squaredClickTolerance_=e.clickTolerance?e.clickTolerance*e.clickTolerance:36,r.overlay_=new Nq({source:new $q({useSpatialIndex:!1,wrapX:!!e.wrapX&&e.wrapX}),style:e.style?e.style:(o=BZ(),function(t,e){return o[t.getGeometry().getType()]}),updateWhileInteracting:!0}),r.geometryName_=e.geometryName,r.condition_=e.condition?e.condition:iG,r.freehandCondition_=e.freehand?tG:e.freehandCondition?e.freehandCondition:rG,r.addEventListener(UE("active"),r.updateState_),r}return iY(e,t),e.prototype.setMap=function(e){t.prototype.setMap.call(this,e),this.updateState_()},e.prototype.getOverlay=function(){return this.overlay_},e.prototype.handleEvent=function(e){"contextmenu"===e.originalEvent.type&&e.originalEvent.preventDefault(),this.freehand_="Point"!==this.mode_&&this.freehandCondition_(e);var i=e.type===$$.POINTERMOVE,n=!0;return!this.freehand_&&this.lastDragTime_&&e.type===$$.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=e.pixel,this.shouldHandle_=!this.freehand_,i=!0):this.lastDragTime_=void 0,this.shouldHandle_&&void 0!==this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)),this.freehand_&&e.type===$$.POINTERDRAG&&null!==this.sketchFeature_?(this.addToDrawing_(e.coordinate),n=!1):this.freehand_&&e.type===$$.POINTERDOWN?n=!1:i&&this.getPointerCount()<2?(n=e.type===$$.POINTERMOVE)&&this.freehand_?(this.handlePointerMove_(e),this.shouldHandle_&&e.originalEvent.preventDefault()):("mouse"===e.originalEvent.pointerType||e.type===$$.POINTERDRAG&&void 0===this.downTimeout_)&&this.handlePointerMove_(e):e.type===$$.DBLCLICK&&(n=!1),t.prototype.handleEvent.call(this,e)&&n},e.prototype.handleDownEvent=function(t){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=t.pixel,this.finishCoordinate_||this.startDrawing_(t.coordinate),!0):this.condition_(t)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout((function(){this.handlePointerMove_(new VW($$.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}).bind(this),this.dragVertexDelay_),this.downPx_=t.pixel,!0):(this.lastDragTime_=void 0,!1)},e.prototype.handleUpEvent=function(t){var e=!0;if(0===this.getPointerCount())if(this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(t),this.shouldHandle_){switch(!0){case!this.finishCoordinate_:if(this.startDrawing_(t.coordinate),"Point"!==this.mode_)break;case this.freehand_||this.atFinish_(t.pixel)&&this.finishCondition_(t):this.finishDrawing();break;case!this.freehand_:this.addToDrawing_(t.coordinate)}e=!1}else this.freehand_&&this.abortDrawing();return!e&&this.stopClick_&&t.originalEvent.stopPropagation(),e},e.prototype.handlePointerMove_=function(t){if(this.pointerType_=t.originalEvent.pointerType,this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){var e=this.downPx_,i=t.pixel,n=e[0]-i[0],r=e[1]-i[1],s=n*n+r*r;if(this.shouldHandle_=this.freehand_?s>this.squaredClickTolerance_:s<=this.squaredClickTolerance_,!this.shouldHandle_)return}this.finishCoordinate_?this.modifyDrawing_(t.coordinate):this.createOrUpdateSketchPoint_(t)},e.prototype.atFinish_=function(t){var e=!1;if(this.sketchFeature_){var i=!1,n=[this.finishCoordinate_],r=this.mode_;if("Point"===r)e=!0;else if("Circle"===r)e=2===this.sketchCoords_.length;else if("LineString"===r)i=this.sketchCoords_.length>this.minPoints_;else if("Polygon"===r){var s=this.sketchCoords_;i=s[0].length>this.minPoints_,n=[s[0][0],s[0][s[0].length-2]]}if(i)for(var o=this.getMap(),a=0,l=n.length;a<l;a++){var c=n[a],h=o.getPixelFromCoordinate(c),u=t[0]-h[0],d=t[1]-h[1],p=this.freehand_?1:this.snapTolerance_;if(e=Math.sqrt(u*u+d*d)<=p){this.finishCoordinate_=c;break}}}return e},e.prototype.createOrUpdateSketchPoint_=function(t){var e=t.coordinate.slice();this.sketchPoint_?this.sketchPoint_.getGeometry().setCoordinates(e):(this.sketchPoint_=new pH(new jM(e)),this.updateSketchFeatures_())},e.prototype.createOrUpdateCustomSketchLine_=function(t){this.sketchLine_||(this.sketchLine_=new pH);var e=t.getLinearRing(0),i=this.sketchLine_.getGeometry();i?(i.setFlatCoordinates(e.getLayout(),e.getFlatCoordinates()),i.changed()):(i=new kH(e.getFlatCoordinates(),e.getLayout()),this.sketchLine_.setGeometry(i))},e.prototype.startDrawing_=function(t){var e=this.getMap().getView().getProjection();this.finishCoordinate_=t,"Point"===this.mode_?this.sketchCoords_=t.slice():"Polygon"===this.mode_?(this.sketchCoords_=[[t.slice(),t.slice()]],this.sketchLineCoords_=this.sketchCoords_[0]):this.sketchCoords_=[t.slice(),t.slice()],this.sketchLineCoords_&&(this.sketchLine_=new pH(new kH(this.sketchLineCoords_)));var i=this.geometryFunction_(this.sketchCoords_,void 0,e);this.sketchFeature_=new pH,this.geometryName_&&this.sketchFeature_.setGeometryName(this.geometryName_),this.sketchFeature_.setGeometry(i),this.updateSketchFeatures_(),this.dispatchEvent(new nY("drawstart",this.sketchFeature_))},e.prototype.modifyDrawing_=function(t){var e,i,n=this.getMap(),r=this.sketchFeature_.getGeometry(),s=n.getView().getProjection();"Point"===this.mode_?i=this.sketchCoords_:"Polygon"===this.mode_?(i=(e=this.sketchCoords_[0])[e.length-1],this.atFinish_(n.getPixelFromCoordinate(t))&&(t=this.finishCoordinate_.slice())):i=(e=this.sketchCoords_)[e.length-1],i[0]=t[0],i[1]=t[1],this.geometryFunction_(this.sketchCoords_,r,s),this.sketchPoint_&&this.sketchPoint_.getGeometry().setCoordinates(t),"Polygon"===r.getType()&&"Polygon"!==this.mode_?this.createOrUpdateCustomSketchLine_(r):this.sketchLineCoords_&&this.sketchLine_.getGeometry().setCoordinates(this.sketchLineCoords_),this.updateSketchFeatures_()},e.prototype.addToDrawing_=function(t){var e,i,n=this.sketchFeature_.getGeometry(),r=this.getMap().getView().getProjection(),s=this.mode_;"LineString"===s||"Circle"===s?(this.finishCoordinate_=t.slice(),(i=this.sketchCoords_).length>=this.maxPoints_&&(this.freehand_?i.pop():e=!0),i.push(t.slice()),this.geometryFunction_(i,n,r)):"Polygon"===s&&((i=this.sketchCoords_[0]).length>=this.maxPoints_&&(this.freehand_?i.pop():e=!0),i.push(t.slice()),e&&(this.finishCoordinate_=i[0]),this.geometryFunction_(this.sketchCoords_,n,r)),this.updateSketchFeatures_(),e&&this.finishDrawing()},e.prototype.removeLastPoint=function(){if(this.sketchFeature_){var t,e=this.sketchFeature_.getGeometry(),i=this.getMap().getView().getProjection(),n=this.mode_;if("LineString"===n||"Circle"===n){if((t=this.sketchCoords_).splice(-2,1),t.length>=2){this.finishCoordinate_=t[t.length-2].slice();var r=this.finishCoordinate_.slice();t[t.length-1]=r,this.sketchPoint_.setGeometry(new jM(r))}this.geometryFunction_(t,e,i),"Polygon"===e.getType()&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(e)}else if("Polygon"===n){(t=this.sketchCoords_[0]).splice(-2,1);var s=this.sketchLine_.getGeometry();t.length>=2&&(r=t[t.length-2].slice(),t[t.length-1]=r,this.sketchPoint_.setGeometry(new jM(r))),s.setCoordinates(t),this.geometryFunction_(this.sketchCoords_,e,i)}1===t.length&&this.abortDrawing(),this.updateSketchFeatures_()}},e.prototype.finishDrawing=function(){var t=this.abortDrawing_();if(t){var e=this.sketchCoords_,i=t.getGeometry(),n=this.getMap().getView().getProjection();"LineString"===this.mode_?(e.pop(),this.geometryFunction_(e,i,n)):"Polygon"===this.mode_&&(e[0].pop(),this.geometryFunction_(e,i,n),e=i.getCoordinates()),"MultiPoint"===this.type_?t.setGeometry(new PH([e])):"MultiLineString"===this.type_?t.setGeometry(new DH([e])):"MultiPolygon"===this.type_&&t.setGeometry(new MH([e])),this.dispatchEvent(new nY("drawend",t)),this.features_&&this.features_.push(t),this.source_&&this.source_.addFeature(t)}},e.prototype.abortDrawing_=function(){this.finishCoordinate_=null;var t=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),t},e.prototype.abortDrawing=function(){var t=this.abortDrawing_();t&&this.dispatchEvent(new nY("drawabort",t))},e.prototype.appendCoordinates=function(t){var e,i=this.mode_,n=!this.sketchFeature_;if(n&&this.startDrawing_(t[0]),"LineString"===i||"Circle"===i)e=this.sketchCoords_;else{if("Polygon"!==i)return;e=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[]}n&&e.shift(),e.pop();for(var r=0;r<t.length;r++)this.addToDrawing_(t[r]);var s=t[t.length-1];this.addToDrawing_(s),this.modifyDrawing_(s)},e.prototype.extend=function(t){var e=t.getGeometry();this.sketchFeature_=t,this.sketchCoords_=e.getCoordinates();var i=this.sketchCoords_[this.sketchCoords_.length-1];this.finishCoordinate_=i.slice(),this.sketchCoords_.push(i.slice()),this.sketchPoint_=new pH(new jM(i)),this.updateSketchFeatures_(),this.dispatchEvent(new nY("drawstart",this.sketchFeature_))},e.prototype.updateSketchFeatures_=function(){var t=[];this.sketchFeature_&&t.push(this.sketchFeature_),this.sketchLine_&&t.push(this.sketchLine_),this.sketchPoint_&&t.push(this.sketchPoint_);var e=this.overlay_.getSource();e.clear(!0),e.addFeatures(t)},e.prototype.updateState_=function(){var t=this.getMap(),e=this.getActive();t&&e||this.abortDrawing(),this.overlay_.setMap(e?t:null)},e}(Y$),sY=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function oY(t){return t.feature?t.feature:t.element?t.element:void 0}var aY=[],lY=function(t){function e(e){var i=this,n=e||{},r=n;return r.handleDownEvent||(r.handleDownEvent=BC),r.stopDown||(r.stopDown=NC),(i=t.call(this,r)||this).source_=n.source?n.source:null,i.vertex_=void 0===n.vertex||n.vertex,i.edge_=void 0===n.edge||n.edge,i.features_=n.features?n.features:null,i.featuresListenerKeys_=[],i.featureChangeListenerKeys_={},i.indexedFeaturesExtents_={},i.pendingFeatures_={},i.pixelTolerance_=void 0!==n.pixelTolerance?n.pixelTolerance:10,i.rBush_=new EZ,i.SEGMENT_WRITERS_={Point:i.writePointGeometry_.bind(i),LineString:i.writeLineStringGeometry_.bind(i),LinearRing:i.writeLineStringGeometry_.bind(i),Polygon:i.writePolygonGeometry_.bind(i),MultiPoint:i.writeMultiPointGeometry_.bind(i),MultiLineString:i.writeMultiLineStringGeometry_.bind(i),MultiPolygon:i.writeMultiPolygonGeometry_.bind(i),GeometryCollection:i.writeGeometryCollectionGeometry_.bind(i),Circle:i.writeCircleGeometry_.bind(i)},i}return sY(e,t),e.prototype.addFeature=function(t,e){var i=void 0===e||e,n=YC(t),r=t.getGeometry();if(r){var s=this.SEGMENT_WRITERS_[r.getType()];s&&(this.indexedFeaturesExtents_[n]=r.getExtent([1/0,1/0,-1/0,-1/0]),s(t,r))}i&&(this.featureChangeListenerKeys_[n]=tk(t,"change",this.handleFeatureChange_,this))},e.prototype.forEachFeatureAdd_=function(t){this.addFeature(t)},e.prototype.forEachFeatureRemove_=function(t){this.removeFeature(t)},e.prototype.getFeatures_=function(){var t;return this.features_?t=this.features_:this.source_&&(t=this.source_.getFeatures()),t},e.prototype.handleEvent=function(e){var i=this.snapTo(e.pixel,e.coordinate,e.map);return i.snapped&&(e.coordinate=i.vertex.slice(0,2),e.pixel=i.vertexPixel),t.prototype.handleEvent.call(this,e)},e.prototype.handleFeatureAdd_=function(t){var e=oY(t);this.addFeature(e)},e.prototype.handleFeatureRemove_=function(t){var e=oY(t);this.removeFeature(e)},e.prototype.handleFeatureChange_=function(t){var e=t.target;if(this.handlingDownUpSequence){var i=YC(e);i in this.pendingFeatures_||(this.pendingFeatures_[i]=e)}else this.updateFeature_(e)},e.prototype.handleUpEvent=function(t){var e=KC(this.pendingFeatures_);return e.length&&(e.forEach(this.updateFeature_.bind(this)),this.pendingFeatures_={}),!1},e.prototype.removeFeature=function(t,e){var i=void 0===e||e,n=YC(t),r=this.indexedFeaturesExtents_[n];if(r){var s=this.rBush_,o=[];s.forEachInExtent(r,function(e){t===e.feature&&o.push(e)});for(var a=o.length-1;a>=0;--a)s.remove(o[a])}i&&(ik(this.featureChangeListenerKeys_[n]),delete this.featureChangeListenerKeys_[n])},e.prototype.setMap=function(e){var i=this.getMap(),n=this.featuresListenerKeys_,r=this.getFeatures_();i&&(n.forEach(ik),n.length=0,r.forEach(this.forEachFeatureRemove_.bind(this))),t.prototype.setMap.call(this,e),e&&(this.features_?n.push(tk(this.features_,"add",this.handleFeatureAdd_,this),tk(this.features_,"remove",this.handleFeatureRemove_,this)):this.source_&&n.push(tk(this.source_,"addfeature",this.handleFeatureAdd_,this),tk(this.source_,"removefeature",this.handleFeatureRemove_,this)),r.forEach(this.forEachFeatureAdd_.bind(this)))},e.prototype.snapTo=function(t,e,i){var n=wS([i.getCoordinateFromPixel([t[0]-this.pixelTolerance_,t[1]+this.pixelTolerance_]),i.getCoordinateFromPixel([t[0]+this.pixelTolerance_,t[1]-this.pixelTolerance_])]),r=this.rBush_.getInExtent(n);this.vertex_&&!this.edge_&&(r=r.filter(function(t){return"Circle"!==t.feature.getGeometry().getType()}));var s=!1,o=null,a=null;if(0===r.length)return{snapped:s,vertex:o,vertexPixel:a};i.getView().getProjection();for(var l,c=pE(e),h=1/0,u=0;u<r.length;++u){var d=r[u];aY[0]=pE(d.segment[0]),aY[1]=pE(d.segment[1]);var p=qk(c,aY);p<h&&(l=d,h=p)}var f=l.segment;if(this.vertex_&&!this.edge_){var m=i.getPixelFromCoordinate(f[0]),g=i.getPixelFromCoordinate(f[1]),A=Wk(t,m),b=Wk(t,g);Math.sqrt(Math.min(A,b))<=this.pixelTolerance_&&(s=!0,a=i.getPixelFromCoordinate(o=A>b?f[1]:f[0]))}else if(this.edge_){var v="Circle"===l.feature.getGeometry().getType();if(v)o=dE(function(t,e){var i=e.getRadius(),n=e.getCenter(),r=n[0],s=n[1],o=t[0]-r,a=t[1]-s;0===o&&0===a&&(o=1);var l=Math.sqrt(o*o+a*a);return[r+i*o/l,s+i*a/l]}(c,l.feature.getGeometry()));else aY[0]=pE(f[0]),aY[1]=pE(f[1]),o=dE(Hk(c,aY));Zk(t,a=i.getPixelFromCoordinate(o))<=this.pixelTolerance_&&(s=!0,this.vertex_&&!v)&&(m=i.getPixelFromCoordinate(f[0]),g=i.getPixelFromCoordinate(f[1]),A=Wk(a,m),b=Wk(a,g),Math.sqrt(Math.min(A,b))<=this.pixelTolerance_&&(a=i.getPixelFromCoordinate(o=A>b?f[1]:f[0])))}return s&&(a=[Math.round(a[0]),Math.round(a[1])]),{snapped:s,vertex:o,vertexPixel:a}},e.prototype.updateFeature_=function(t){this.removeFeature(t,!1),this.addFeature(t,!1)},e.prototype.writeCircleGeometry_=function(t,e){this.getMap().getView().getProjection();for(var i=function(t,e,i){for(var n=e||32,r=t.getStride(),s=t.getLayout(),o=t.getCenter(),a=r*(n+1),l=new Array(a),c=0;c<a;c+=r){l[c]=0,l[c+1]=0;for(var h=2;h<r;h++)l[c+h]=o[h]}var u=new eT(l,s,[l.length]);return function(t,e,i,n){for(var r=t.getFlatCoordinates(),s=t.getStride(),o=r.length/s-1,a=n||0,l=0;l<=o;++l){var c=l*s,h=a+2*bk(l,o)*Math.PI/o;r[c]=e[0]+i*Math.cos(h),r[c+1]=e[1]+i*Math.sin(h)}t.changed()}(u,o,t.getRadius(),i),u}(e).getCoordinates()[0],n=0,r=i.length-1;n<r;++n){var s=i.slice(n,n+2),o={feature:t,segment:s};this.rBush_.insert(wS(s),o)}},e.prototype.writeGeometryCollectionGeometry_=function(t,e){for(var i=e.getGeometriesArray(),n=0;n<i.length;++n){var r=this.SEGMENT_WRITERS_[i[n].getType()];r&&r(t,i[n])}},e.prototype.writeLineStringGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length-1;n<r;++n){var s=i.slice(n,n+2),o={feature:t,segment:s};this.rBush_.insert(wS(s),o)}},e.prototype.writeMultiLineStringGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length;n<r;++n)for(var s=i[n],o=0,a=s.length-1;o<a;++o){var l=s.slice(o,o+2),c={feature:t,segment:l};this.rBush_.insert(wS(l),c)}},e.prototype.writeMultiPointGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length;n<r;++n){var s=i[n],o={feature:t,segment:[s,s]};this.rBush_.insert(e.getExtent(),o)}},e.prototype.writeMultiPolygonGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length;n<r;++n)for(var s=i[n],o=0,a=s.length;o<a;++o)for(var l=s[o],c=0,h=l.length-1;c<h;++c){var u=l.slice(c,c+2),d={feature:t,segment:u};this.rBush_.insert(wS(u),d)}},e.prototype.writePointGeometry_=function(t,e){var i=e.getCoordinates(),n={feature:t,segment:[i,i]};this.rBush_.insert(e.getExtent(),n)},e.prototype.writePolygonGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length;n<r;++n)for(var s=i[n],o=0,a=s.length-1;o<a;++o){var l=s.slice(o,o+2),c={feature:t,segment:l};this.rBush_.insert(wS(l),c)}},e}(Y$),cY=function(){function t(t){var e=t||{};this.font_=e.font,this.rotation_=e.rotation,this.rotateWithView_=e.rotateWithView,this.scale_=e.scale,this.scaleArray_=ZE(void 0!==e.scale?e.scale:1),this.text_=e.text,this.textAlign_=e.textAlign,this.textBaseline_=e.textBaseline,this.fill_=void 0!==e.fill?e.fill:new RZ({color:"#333"}),this.maxAngle_=void 0!==e.maxAngle?e.maxAngle:Math.PI/4,this.placement_=void 0!==e.placement?e.placement:"point",this.overflow_=!!e.overflow,this.stroke_=void 0!==e.stroke?e.stroke:null,this.offsetX_=void 0!==e.offsetX?e.offsetX:0,this.offsetY_=void 0!==e.offsetY?e.offsetY:0,this.backgroundFill_=e.backgroundFill?e.backgroundFill:null,this.backgroundStroke_=e.backgroundStroke?e.backgroundStroke:null,this.padding_=void 0===e.padding?null:e.padding}return t.prototype.clone=function(){var e=this.getScale();return new t({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(e)?e.slice():e,text:this.getText(),textAlign:this.getTextAlign(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()})},t.prototype.getOverflow=function(){return this.overflow_},t.prototype.getFont=function(){return this.font_},t.prototype.getMaxAngle=function(){return this.maxAngle_},t.prototype.getPlacement=function(){return this.placement_},t.prototype.getOffsetX=function(){return this.offsetX_},t.prototype.getOffsetY=function(){return this.offsetY_},t.prototype.getFill=function(){return this.fill_},t.prototype.getRotateWithView=function(){return this.rotateWithView_},t.prototype.getRotation=function(){return this.rotation_},t.prototype.getScale=function(){return this.scale_},t.prototype.getScaleArray=function(){return this.scaleArray_},t.prototype.getStroke=function(){return this.stroke_},t.prototype.getText=function(){return this.text_},t.prototype.getTextAlign=function(){return this.textAlign_},t.prototype.getTextBaseline=function(){return this.textBaseline_},t.prototype.getBackgroundFill=function(){return this.backgroundFill_},t.prototype.getBackgroundStroke=function(){return this.backgroundStroke_},t.prototype.getPadding=function(){return this.padding_},t.prototype.setOverflow=function(t){this.overflow_=t},t.prototype.setFont=function(t){this.font_=t},t.prototype.setMaxAngle=function(t){this.maxAngle_=t},t.prototype.setOffsetX=function(t){this.offsetX_=t},t.prototype.setOffsetY=function(t){this.offsetY_=t},t.prototype.setPlacement=function(t){this.placement_=t},t.prototype.setRotateWithView=function(t){this.rotateWithView_=t},t.prototype.setFill=function(t){this.fill_=t},t.prototype.setRotation=function(t){this.rotation_=t},t.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=ZE(void 0!==t?t:1)},t.prototype.setStroke=function(t){this.stroke_=t},t.prototype.setText=function(t){this.text_=t},t.prototype.setTextAlign=function(t){this.textAlign_=t},t.prototype.setTextBaseline=function(t){this.textBaseline_=t},t.prototype.setBackgroundFill=function(t){this.backgroundFill_=t},t.prototype.setBackgroundStroke=function(t){this.backgroundStroke_=t},t.prototype.setPadding=function(t){this.padding_=t},t}();const hY=new VZ({color:"rgba(195, 38, 125, 1)",lineDash:[4,8],width:2}),uY=new jZ({image:new TZ({radius:13,stroke:hY})}),dY=new jZ({stroke:hY}),pY=new RZ({color:"#000000"}),fY={Point(t){const e=new cY({text:t.name,font:"12px sans-serif",placement:"point",offsetY:-20,fill:pY}),i=[new jZ({text:e,image:new TZ({radius:7,stroke:new VZ({color:t.color}),fill:new RZ({color:`${t.color}9f`})})})];return t.editing&&i.push(uY),i},LineString(t){const e=new cY({text:t.name,font:"12px sans-serif",placement:"line",textBaseline:"bottom",offsetY:-5,overflow:!0,fill:pY}),i=new VZ({color:t.color,width:2}),n=[new jZ({stroke:i})],r=t.getGeometry();return r.forEachSegment((t,i)=>{n.push(new jZ({geometry:new kH([t,i]),text:e}))}),t.editing&&(n.push(dY),r.getCoordinates().forEach(e=>{const r=new jM(e);n.push(new jZ({geometry:r,image:new TZ({radius:13,stroke:hY})})),n.push(new jZ({geometry:r,image:new TZ({radius:7,stroke:i,fill:new RZ({color:t.color})})}))})),n},Polygon(t){const e=new cY({text:t.name,font:"12px sans-serif",placement:"point",fill:pY}),i=new VZ({color:t.color}),n=[new jZ({text:e,stroke:i,fill:new RZ({color:`${t.color}3f`})})];return t.editing&&(n.push(dY),t.getGeometry().getCoordinates()[0].forEach(e=>{const r=new jM(e);n.push(new jZ({geometry:r,image:new TZ({radius:13,stroke:hY})})),n.push(new jZ({geometry:r,image:new TZ({radius:7,stroke:i,fill:new RZ({color:t.color})})}))})),n}};class mY extends pH{constructor(t){super({geometry:LH.readGeometry(t.geom)}),this.editing=!1,this.annotation=t,this.color=this.annotation.color,this.name=this.annotation.name,t.geom&&this.setStyle(fY[this.getGeometry().getType()](this))}updateColor(t){this.color=t,this.changed()}updateName(t){this.name=t,this.changed()}setEditingStyle(){this.editing=!0,this.getGeometry()&&this.setStyle(fY[this.getGeometry().getType()])}}new jZ;const gY=new VZ({color:"rgba(0, 0, 0, 0.8)"}),AY=new RZ({color:"rgba(255, 255, 255, 0.2)"}),bY=new jZ({image:new TZ({radius:7,stroke:gY,fill:AY})});let vY=(()=>{class t extends LT{constructor(t,e,i,n,r,s){super(),this.ngZone=t,this.annotationsService=e,this.interactionsService=i,this.mapService=n,this.mapStateService=r,this.tooltipsService=s,this.modifyCollection=new j$,this.updatingGeomFromLayer=!1}ngOnInit(){this.ensureMandatoryInputParams("map"),this.source=new $q({features:[]}),this.layer=new Nq({source:this.source,updateWhileAnimating:!0,updateWhileInteracting:!0,zIndex:2}),this.layer.selectable=!0,this.map.addLayer(this.layer),this.subscriptions.push(this.mapStateService.featuresSelectable$.subscribe(t=>{this.layer.selectable=t}),this.annotationsService.annotations$.subscribe(t=>{this.source.clear(!0),this.source.addFeatures(t.map(t=>new mY(t)))}),Hg([this.annotationsService.editedAnnotation$.pipe(Object(Ge.a)(t=>!!t),mn()),this.annotationsService.editedAnnotationGeomType$]).pipe(Be(16)).subscribe(([t,e])=>{this.ngZone.runOutsideAngular(()=>{this.removeInteractions(),t&&this.createInteractions(e)})}),this.mapStateService.showAnnotationsLayer$.subscribe(t=>{this.layer.setVisible(t)})),this.eventListeners.push(this.map.on("click",t=>{this.ngZone.run(()=>{this.handleClickEvent(t)})})),this.subscriptions.push(this.mapService.pointerMove$.subscribe(t=>{this.handleMoveEvent(t)}))}ngOnDestroy(){super.ngOnDestroy(),this.map.removeLayer(this.layer)}createInteractions(t){const e=this.annotationsService.editedAnnotation$.value;let i=this.source.forEachFeature(t=>{if(t.annotation.id===e.id)return t});i||(i=new mY(e),this.source.addFeature(i)),i.setEditingStyle(),this.editedFeature=i,this.modifyCollection.clear(),this.modifyCollection.push(i),this.modifyInteraction=new Jq({features:this.modifyCollection,style:bY,condition:aG}),this.map.addInteraction(this.modifyInteraction);const n=new j$;this.drawInteraction=new rY({type:t,features:n,style:bY,condition:aG}),this.map.addInteraction(this.drawInteraction),this.snapInteraction=new lY({features:this.modifyCollection,pixelTolerance:20}),this.map.addInteraction(this.snapInteraction),this.drawInteraction.on("drawstart",t=>{CC({category:"app",message:"annotation: drawstart"}),this.modifyInteraction.setActive(!1),this.editedFeature.setGeometry(t.feature.getGeometry()),this.editedFeature.setEditingStyle(),this.updateEditedAnnotationGeometry(null)}),this.drawInteraction.on("drawend",t=>{CC({category:"app",message:"annotation: drawend"}),this.modifyInteraction.setActive(!0),this.updateEditedAnnotationGeometry(t.feature)}),this.drawInteraction.on("drawabort",t=>{this.modifyInteraction.setActive(!0)}),this.modifyInteraction.on("modifyend",t=>{CC({category:"app",message:"annotation: modifyend"}),this.updateEditedAnnotationGeometry(t.features.pop())}),this.annotationsService.editedAnnotation$.pipe(Gg(1),ar(t=>!!t),Object(Ge.a)(t=>t.color),mn()).subscribe(t=>{this.editedFeature.updateColor(t)}),this.annotationsService.editedAnnotation$.pipe(Gg(1),ar(t=>!!t),Object(Ge.a)(t=>t.name),mn()).subscribe(t=>{this.editedFeature.updateName(t)}),this.annotationsService.editedAnnotation$.pipe(Gg(1),ar(t=>!!t),Object(Ge.a)(t=>t.geom),mn(),He(()=>!this.updatingGeomFromLayer)).subscribe(t=>{this.editedFeature.setGeometry(LH.readGeometry(t)),this.editedFeature.setEditingStyle()})}updateEditedAnnotationGeometry(t){this.updatingGeomFromLayer=!0,this.annotationsService.updateEditedAnnotationGeom(t?LH.writeGeometryObject(t.getGeometry()):null),this.updatingGeomFromLayer=!1}removeInteractions(){this.editedFeature&&(this.editedFeature=null),this.drawInteraction&&this.map.removeInteraction(this.drawInteraction),this.modifyInteraction&&this.map.removeInteraction(this.modifyInteraction),this.snapInteraction&&this.map.removeInteraction(this.snapInteraction)}handleClickEvent(t){this.layer.selectable&&this.map.forEachFeatureAtPixel(t.pixel,t=>(this.interactionsService.clickOnEntity(OP.Annotation,t.annotation),!0),{layerFilter:t=>t===this.layer})}handleMoveEvent(t){this.layer.selectable&&(this.map.forEachFeatureAtPixel(t.pixel,e=>{const[i,n]=oE(t.coordinate);return e.annotation.lon=i,e.annotation.lat=n,this.tooltipsService.hoverEntity(OP.Annotation,e.annotation),!0},{hitTolerance:3,layerFilter:t=>t===this.layer})||this.tooltipsService.hoverEntity(OP.Annotation,null))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.B),r.Pb(MP),r.Pb(ET),r.Pb(pI),r.Pb(gT),r.Pb(kT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-annotations-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();var _Y=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),yY=function(t){function e(e){var i=t.call(this,e)||this;return i.image_=null,i}return _Y(e,t),e.prototype.getImage=function(){return this.image_?this.image_.getImage():null},e.prototype.prepareFrame=function(t){var e=t.layerStatesArray[t.layerIndex],i=t.pixelRatio,n=t.viewState,r=n.resolution,s=this.getLayer().getSource(),o=t.viewHints,a=t.extent;if(void 0!==e.extent&&(a=WS(a,mE(e.extent))),!o[0]&&!o[1]&&!XS(a))if(s){var l=s.getImage(a,r,i,n.projection);l&&this.loadImage(l)&&(this.image_=l)}else this.image_=null;return!!this.image_},e.prototype.renderFrame=function(t,e){var i=this.image_,n=i.getExtent(),r=i.getResolution(),s=i.getPixelRatio(),o=t.layerStatesArray[t.layerIndex],a=t.pixelRatio,l=t.viewState,c=l.center,h=t.size,u=a*r/(l.resolution*s),d=Math.round(h[0]*a),p=Math.round(h[1]*a),f=l.rotation;if(f){var m=Math.round(Math.sqrt(d*d+p*p));d=m,p=m}cM(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/a,1/a,f,-d/2,-p/2),hM(this.inversePixelTransform,this.pixelTransform);var g=oW(this.pixelTransform);this.useContainer(e,g,o.opacity);var A=this.context,b=A.canvas;b.width!=d||b.height!=p?(b.width=d,b.height=p):this.containerReused||A.clearRect(0,0,d,p);var v=!1;if(o.extent){var _=mE(o.extent);(v=!ES(_,t.extent)&&QS(_,t.extent))&&this.clipUnrotated(A,t,_)}var y=i.getImage(),w=cM(this.tempTransform,d/2,p/2,u,u,0,s*(n[0]-c[0])/r,s*(c[1]-n[3])/r);this.renderedResolution=r*a/s;var x=w[4],C=w[5],S=y.width*w[0],k=y.height*w[3];if(zC(A,this.getLayer().getSource().getContextOptions()),this.preRender(A,t),S>=.5&&k>=.5){var E=o.opacity,D=void 0;1!==E&&(D=this.context.globalAlpha,this.context.globalAlpha=E),this.context.drawImage(y,0,0,+y.width,+y.height,Math.round(x),Math.round(C),Math.round(S),Math.round(k)),1!==E&&(this.context.globalAlpha=D)}return this.postRender(A,t),v&&A.restore(),g!==b.style.transform&&(b.style.transform=g),this.container},e}(lW),wY=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),xY=function(t){function e(e,i,n,r,s){var o=this;return(o=t.call(this,e,i,n,void 0!==s?0:2)||this).loader_=void 0!==s?s:null,o.canvas_=r,o.error_=null,o}return wY(e,t),e.prototype.getError=function(){return this.error_},e.prototype.handleLoad_=function(t){t?(this.error_=t,this.state=3):this.state=2,this.changed()},e.prototype.load=function(){0==this.state&&(this.state=1,this.changed(),this.loader_(this.handleLoad_.bind(this)))},e.prototype.getImage=function(){return this.canvas_},e}(bS),CY=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),SY=function(t){function e(e){var i=t.call(this,e)||this;return i.vectorRenderer_=new Uq(e),i.layerImageRatio_=e.getImageRatio(),i.coordinateToVectorPixelTransform_=[1,0,0,1,0,0],i.renderedPixelToCoordinateTransform_=null,i}return CY(e,t),e.prototype.disposeInternal=function(){this.vectorRenderer_.dispose(),t.prototype.disposeInternal.call(this)},e.prototype.getFeatures=function(t){if(this.vectorRenderer_){var e=lM(this.coordinateToVectorPixelTransform_,lM(this.renderedPixelToCoordinateTransform_,t.slice()));return this.vectorRenderer_.getFeatures(e)}return new Promise(function(t,e){t([])})},e.prototype.handleFontsChanged=function(){this.vectorRenderer_.handleFontsChanged()},e.prototype.prepareFrame=function(t){var e=t.pixelRatio,i=t.viewState,n=i.resolution,r=t.viewHints,s=this.vectorRenderer_,o=t.extent;1!==this.layerImageRatio_&&JS(o=o.slice(0),this.layerImageRatio_);var a=YS(o)/n,l=GS(o)/n;if(!r[0]&&!r[1]&&!XS(o)){s.useContainer(null,null,1);var c=s.context,h=zC({},t,{declutterTree:new kZ.a(9),extent:o,size:[a,l],viewState:zC({},t.viewState,{rotation:0})}),u=new xY(o,n,e,c.canvas,function(t){s.prepareFrame(h)&&s.replayGroupChanged&&(s.clipping=!1,s.renderFrame(h,null),s.renderDeclutter(h),t())});u.addEventListener("change",(function(){if(2===u.getState()){this.image_=u;var t=u.getResolution(),n=u.getPixelRatio(),r=t*e/n;this.renderedResolution=r,this.coordinateToVectorPixelTransform_=cM(this.coordinateToVectorPixelTransform_,a/2,l/2,1/r,-1/r,0,-i.center[0],-i.center[1])}}).bind(this)),u.load()}return this.image_&&(this.renderedPixelToCoordinateTransform_=t.pixelToCoordinateTransform.slice()),!!this.image_},e.prototype.preRender=function(){},e.prototype.postRender=function(){},e.prototype.renderDeclutter=function(){},e.prototype.forEachFeatureAtCoordinate=function(e,i,n,r,s){return this.vectorRenderer_?this.vectorRenderer_.forEachFeatureAtCoordinate(e,i,n,r,s):t.prototype.forEachFeatureAtCoordinate.call(this,e,i,n,r,s)},e}(yY),kY=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),EY=function(t){function e(e){var i=this,n=e||{},r=zC({},n);return delete r.imageRatio,(i=t.call(this,r)||this).imageRatio_=void 0!==n.imageRatio?n.imageRatio:1,i}return kY(e,t),e.prototype.getImageRatio=function(){return this.imageRatio_},e.prototype.createRenderer=function(){return new SY(this)},e}(HZ);class DY extends pH{constructor(t){super(),this.h3index=t,super.setGeometry(oT(t))}static New(t){return new DY(t)}}new jZ({stroke:new VZ({color:"#cc0000",width:1}),fill:new RZ({color:"#ff00001a"})});const IY=new jZ({stroke:new VZ({color:"#ff0000",width:1}),fill:new RZ({color:"#ff00004a"})}),PY=["#F1C40F","#27AE60","#9B59B6","#3498DB","#E74C3C","#1ABC9C","#E67E22","#16A085","#C0392B","#8E44AD","#2980B9","#F39C12","#2ECC71","#D35400"],OY={1:1,2:1,3:1,4:2,5:3,6:3,7:4,8:5,9:5,10:6,11:7,12:7,13:8,14:8,15:9,16:9,17:10,18:11,19:12,20:12,21:12},MY={1:0,2:0,3:0,4:1,5:2,6:2,7:3,8:4,9:4,10:5,11:6,12:7,13:7,14:8,15:9,16:9,17:10,18:10,19:10,20:10,21:10},TY=PY.map(t=>new jZ({stroke:new VZ({color:t,width:1}),fill:new RZ({color:"rgba(0, 0, 255, 0)"})}));let RY=(()=>{class t extends LT{constructor(t,e,i,n,r){super(),this.configService=t,this.drawingService=e,this.mapConfigService=i,this.mapService=n,this.mapStateService=r}ngOnInit(){this.ensureMandatoryInputParams("map"),this.source=new $q({features:[]}),this.layer=new EY({source:this.source}),this.map.addLayer(this.layer),this.subscriptions.push(this.mapStateService.selectableHexagons$.subscribe(t=>{this.layer.selectable=t,!t&&this.hoveredHexagonFeature&&(this.hoveredHexagonFeature.setStyle(TY[this.hexagonsResolution()]),this.hoveredHexagonFeature=null)}),this.mapStateService.showHexagonsLayer$.subscribe(t=>{this.layer.setVisible(t)}),Hg([this.mapStateService.showHexagonsLayer$,this.mapService.view$]).pipe(Gg(1),He(([t,e])=>t&&!!e),Be(200)).subscribe(([t,e])=>this.refreshFeatures(e)),this.mapService.pointerMove$.pipe(He(()=>this.layer.selectable)).subscribe(t=>{this.handleMoveEvent(t)})),this.eventListeners.push(this.map.on("click",t=>this.handleClickEvent(t)))}ngOnDestroy(){super.ngOnDestroy(),this.map.removeLayer(this.layer)}refreshFeatures(t){this.source.clear(!0);let e=this.hexagonsResolution();const i=qD.fromOLExtent(t.extent).scale(1.2);let n=this.generateFeatures(i,e);n.forEach(t=>{t.setStyle(TY[e])}),this.source.addFeatures(n),this.mapConfigService.debugH3Trace$.value&&(e-=1,e>=1&&(n=this.generateFeatures(i,e),n.forEach(t=>{t.setStyle(TY[e])}),this.source.addFeatures(n)),e-=1,e>=1&&(n=this.generateFeatures(i,e),n.forEach(t=>{t.setStyle(TY[e])}),this.source.addFeatures(n)))}generateFeatures(t,e){return t.getBoundedPolygons().map(t=>mP(t,e,!0)).flat().map(t=>new DY(t))}hexagonsResolution(){return(this.mapConfigService.highHexagonsResolution$.value?OY:MY)[Math.round(this.map.getView().getZoom())]}handleClickEvent(t){this.layer.selectable&&this.map.forEachFeatureAtPixel(t.pixel,t=>(this.configService.devMode&&console.log("DEBUG: select hexagon",t.h3index),this.drawingService.selectHexagon(t.h3index),!0),{layerFilter:t=>t===this.layer})}handleMoveEvent(t){const e=this.map.forEachFeatureAtPixel(t.pixel,t=>t,{layerFilter:t=>t===this.layer});e?e!==this.hoveredHexagonFeature&&(this.hoveredHexagonFeature&&this.hoveredHexagonFeature.setStyle(TY[this.hexagonsResolution()]),e.setStyle(IY),this.hoveredHexagonFeature=e):this.hoveredHexagonFeature&&(this.hoveredHexagonFeature.setStyle(TY[this.hexagonsResolution()]),this.hoveredHexagonFeature=null)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(cI),r.Pb(TP),r.Pb(hI),r.Pb(pI),r.Pb(gT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-hexagons-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();class VY extends pH{constructor(t){super(),this.edgeGroup=t,this.setGeometry(new iT(this.edgeGroup.edges.map(t=>lT(t).map(t=>sE(t))))),this.setStyle(new jZ({stroke:new VZ({color:this.edgeGroup.color,width:1}),fill:new RZ({color:`${this.edgeGroup.color}9f`})}))}}const FY=new VZ({color:"#ff0000aa",width:4});class LY extends pH{constructor(t,e){super(),this.h3index=t,this.color=e,this.setId(t),this.setGeometry(new iT([lT(t).map(t=>sE(t))])),this.resetStyle()}resetStyle(){var t;this.setStyle(this.color?new jZ({stroke:new VZ({color:this.color,width:1}),fill:new RZ({color:`${this.color}9f`})}):TY[(t=this.h3index,parseInt(t.charAt(2),16))])}enableHighlightedStyle(){const t=[IY,new jZ({stroke:new VZ({color:this.color,width:1}),fill:new RZ({color:`${this.color}9f`})})],[e,i]=vP(this.h3index),n=new kH([sE(sI(dP(e))),sE(sI(dP(i)))]);n.applyTransform(t=>(Object.assign(t,function(t,e){if(4!==t.length)throw new Error(`Invalid line length. Expected 4, got ${t.length}`);const i=(t[2]-t[0])/2,n=(t[3]-t[1])/2,r=t[0]+i,s=t[1]+n;return[r-.5*i,s-.5*n,r+.5*i,s+.5*n]}(t)),null)),t.push(new jZ({geometry:n,stroke:FY})),n.forEachSegment((e,i)=>{const n=i[0]-e[0],r=i[1]-e[1],s=Math.sqrt(n*n+r*r)/8,o=Math.atan2(r,n),a=new kH([i,[i[0]-1.5*s,i[1]+s]]);a.rotate(o,i);const l=new kH([i,[i[0]-1.5*s,i[1]-s]]);l.rotate(o,i),t.push(new jZ({geometry:a,stroke:FY})),t.push(new jZ({geometry:l,stroke:FY}))}),this.setStyle(t)}}let UY=(()=>{class t extends LT{constructor(t,e,i,n){super(),this.configService=t,this.mapService=e,this.mapStateService=i,this.movesService=n}ngOnInit(){this.ensureMandatoryInputParams("map"),this.gridSource=new $q({features:[]}),this.gridLayer=new EY({source:this.gridSource}),this.map.addLayer(this.gridLayer),this.gridLayer.selectable=!0,this.selectionSource=new $q({features:[]}),this.selectionLayer=new EY({source:this.selectionSource}),this.map.addLayer(this.selectionLayer),this.subscriptions.push(this.movesService.selectedEdgeGroups$.subscribe(t=>{this.refreshSelectedEdgeGroupsFeatures(t)}),this.mapStateService.showEdgesLayer$.subscribe(t=>{this.gridLayer.setVisible(t)}),Hg([this.mapStateService.showEdgesLayer$,this.mapService.view$]).pipe(Gg(1),He(([t,e])=>t&&!!e),Be(200)).subscribe(([t,e])=>this.refreshGridFeatures(e)),this.mapService.pointerMove$.pipe(He(()=>this.gridLayer.getVisible())).subscribe(t=>{this.handleMoveEvent(t)})),this.eventListeners.push(this.map.on("click",t=>this.handleClickEvent(t)))}ngOnDestroy(){super.ngOnDestroy(),this.map.removeLayer(this.gridLayer),this.map.removeLayer(this.selectionLayer)}refreshGridFeatures(t){this.gridSource.clear(!0);const e=qD.fromOLExtent(t.extent).scale(t.zoom<=5?1.1:t.zoom<=9?1.5:2);let i=this.edgesResolution();const n=[this.generateFeatures(e,i)];i-=1,i>=1&&n.push(this.generateFeatures(e,i)),i-=1,i>=1&&t.zoom<8&&n.push(this.generateFeatures(e,i)),this.gridSource.addFeatures(n.flat())}refreshSelectedEdgeGroupsFeatures(t){this.selectionSource.clear(!0),this.selectionSource.addFeatures(t.map(t=>new VY(t)))}generateFeatures(t,e){return t.getBoundedPolygons().map(t=>mP(t,e,!0)).flat().map(t=>function(t){var e=tP(t),i=e[0],n=e[1],r=$I._calloc(6,ZI);WI.getH3UnidirectionalEdgesFromHexagon(i,n,r);var s=aP(r,6);return $I._free(r),s}(t)).flat().filter(t=>{const e=gP(t),i=AP(t),n="string"!=typeof(r=e)?-1:parseInt(r.charAt(1),16);var r;const s=fP(e,n-1),o=fP(i,n-1);return 2===n||n>2&&s===o}).map(t=>new LY(t))}edgesResolution(){return Math.min(OY[Math.round(this.map.getView().getZoom())],6)}handleClickEvent(t){this.gridLayer.selectable&&this.map.forEachFeatureAtPixel(t.pixel,t=>(this.configService.devMode&&console.log("DEBUG: select h3 edge",t.h3index),this.movesService.toggleEdge(t.h3index),!0),{layerFilter:t=>t===this.gridLayer})}handleMoveEvent(t){const e=this.map.forEachFeatureAtPixel(t.pixel,t=>t,{layerFilter:t=>t===this.gridLayer});e?e!==this.hoveredEdgeFeature&&(this.hoveredEdgeFeature&&this.hoveredEdgeFeature.resetStyle(),e.enableHighlightedStyle(),this.hoveredEdgeFeature=e):this.hoveredEdgeFeature&&(this.hoveredEdgeFeature.resetStyle(),this.hoveredEdgeFeature=null)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(cI),r.Pb(pI),r.Pb(gT),r.Pb(mT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-edges-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();class BY extends pH{constructor(t){super({geometry:new MH(t.h3indexes.map(t=>oT(t)))}),this.zone=t}}const NY=nM.map(t=>new jZ({stroke:new VZ({color:t,width:1}),fill:new RZ({color:`${t}1a`})})),jY=new jZ({text:new cY({font:"12px Calibri,sans-serif",fill:new RZ({color:"#000"}),stroke:new VZ({color:"#fff",width:3})})});let zY=(()=>{class t extends LT{constructor(t){super(),this.zonesLayerService=t}ngOnInit(){this.ensureMandatoryInputParams("map"),this.source=new $q({features:[]}),this.layer=new Nq({source:this.source,updateWhileAnimating:!0,updateWhileInteracting:!0,zIndex:1}),this.map.addLayer(this.layer),this.subscriptions.push(this.zonesLayerService.zones$.subscribe(t=>{this.source.clear(!0),this.source.addFeatures(t.map((t,e)=>{const i=new BY(t);return i.setStyle(function(){return jY.getText().setText(t.name),[NY[e%NY.length],jY]}),i}))}))}ngOnDestroy(){super.ngOnDestroy(),this.map.removeLayer(this.layer)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(DT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-zones-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();var HY,KY=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function $Y(t,e){for(var i=KY.length,n=0;n<i;++n)try{var r=t.getContext(KY[n],e);if(r)return r}catch($nt){}return null}function GY(t){switch(t){case 34962:return Float32Array;case 34963:return Uint32Array;default:return Float32Array}}var WY=function(){function t(t,e){this.array=null,this.type=t,yS(34962===t||34963===t,62),this.usage=void 0!==e?e:35044}return t.prototype.ofSize=function(t){this.array=new(GY(this.type))(t)},t.prototype.fromArray=function(t){this.array=GY(this.type).from(t)},t.prototype.fromArrayBuffer=function(t){this.array=new(GY(this.type))(t)},t.prototype.getType=function(){return this.type},t.prototype.getArray=function(){return this.array},t.prototype.getUsage=function(){return this.usage},t.prototype.getSize=function(){return this.array?this.array.length:0},t}(),ZY=function(){function t(t){this.gl_=t.webGlContext;var e=this.gl_;this.scaleRatio_=t.scaleRatio||1,this.renderTargetTexture_=e.createTexture(),this.renderTargetTextureSize_=null,this.frameBuffer_=e.createFramebuffer();var i=e.createShader(e.VERTEX_SHADER);e.shaderSource(i,t.vertexShader||"\n precision mediump float;\n \n attribute vec2 a_position;\n varying vec2 v_texCoord;\n varying vec2 v_screenCoord;\n \n uniform vec2 u_screenSize;\n \n void main() {\n v_texCoord = a_position * 0.5 + 0.5;\n v_screenCoord = v_texCoord * u_screenSize;\n gl_Position = vec4(a_position, 0.0, 1.0);\n }\n"),e.compileShader(i);var n=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(n,t.fragmentShader||"\n precision mediump float;\n \n uniform sampler2D u_image;\n \n varying vec2 v_texCoord;\n \n void main() {\n gl_FragColor = texture2D(u_image, v_texCoord);\n }\n"),e.compileShader(n),this.renderTargetProgram_=e.createProgram(),e.attachShader(this.renderTargetProgram_,i),e.attachShader(this.renderTargetProgram_,n),e.linkProgram(this.renderTargetProgram_),this.renderTargetVerticesBuffer_=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,-1,1,1,-1,1]),e.STATIC_DRAW),this.renderTargetAttribLocation_=e.getAttribLocation(this.renderTargetProgram_,"a_position"),this.renderTargetUniformLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_screenSize"),this.renderTargetTextureLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_image"),this.uniforms_=[],t.uniforms&&Object.keys(t.uniforms).forEach((function(i){this.uniforms_.push({value:t.uniforms[i],location:e.getUniformLocation(this.renderTargetProgram_,i)})}).bind(this))}return t.prototype.getGL=function(){return this.gl_},t.prototype.init=function(t){var e=this.getGL(),i=[e.drawingBufferWidth*this.scaleRatio_,e.drawingBufferHeight*this.scaleRatio_];if(e.bindFramebuffer(e.FRAMEBUFFER,this.getFrameBuffer()),e.viewport(0,0,i[0],i[1]),!this.renderTargetTextureSize_||this.renderTargetTextureSize_[0]!==i[0]||this.renderTargetTextureSize_[1]!==i[1]){this.renderTargetTextureSize_=i;var n=e.RGBA,r=e.RGBA,s=e.UNSIGNED_BYTE;e.bindTexture(e.TEXTURE_2D,this.renderTargetTexture_),e.texImage2D(e.TEXTURE_2D,0,n,i[0],i[1],0,r,s,null),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.renderTargetTexture_,0)}},t.prototype.apply=function(t,e){var i=this.getGL(),n=t.size;i.bindFramebuffer(i.FRAMEBUFFER,e?e.getFrameBuffer():null),i.activeTexture(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,this.renderTargetTexture_),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),i.enable(i.BLEND),i.blendFunc(i.ONE,i.ONE_MINUS_SRC_ALPHA),i.viewport(0,0,i.drawingBufferWidth,i.drawingBufferHeight),i.bindBuffer(i.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),i.useProgram(this.renderTargetProgram_),i.enableVertexAttribArray(this.renderTargetAttribLocation_),i.vertexAttribPointer(this.renderTargetAttribLocation_,2,i.FLOAT,!1,0,0),i.uniform2f(this.renderTargetUniformLocation_,n[0],n[1]),i.uniform1i(this.renderTargetTextureLocation_,0),this.applyUniforms(t),i.drawArrays(i.TRIANGLES,0,6)},t.prototype.getFrameBuffer=function(){return this.frameBuffer_},t.prototype.applyUniforms=function(t){var e,i=this.getGL(),n=1;this.uniforms_.forEach(function(r){if((e="function"==typeof r.value?r.value(t):r.value)instanceof HTMLCanvasElement||e instanceof ImageData)r.texture||(r.texture=i.createTexture()),i.activeTexture(i["TEXTURE"+n]),i.bindTexture(i.TEXTURE_2D,r.texture),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),e instanceof ImageData?i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,e.width,e.height,0,i.UNSIGNED_BYTE,new Uint8Array(e.data)):i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,e),i.uniform1i(r.location,n++);else if(Array.isArray(e))switch(e.length){case 2:return void i.uniform2f(r.location,e[0],e[1]);case 3:return void i.uniform3f(r.location,e[0],e[1],e[2]);case 4:return void i.uniform4f(r.location,e[0],e[1],e[2],e[3]);default:return}else"number"==typeof e&&i.uniform1f(r.location,e)})},t}();function qY(t,e){return t[0]=e[0],t[1]=e[1],t[4]=e[2],t[5]=e[3],t[12]=e[4],t[13]=e[5],t}var YY=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),QY={UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123,UNSIGNED_INT:5125,FLOAT:5126};function XY(t){switch(t){case QY.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case QY.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case QY.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case QY.FLOAT:default:return Float32Array.BYTES_PER_ELEMENT}}var JY=function(t){function e(e){var i=t.call(this)||this,n=e||{};i.boundHandleWebGLContextLost_=i.handleWebGLContextLost.bind(i),i.boundHandleWebGLContextRestored_=i.handleWebGLContextRestored.bind(i),i.canvas_=document.createElement("canvas"),i.canvas_.style.position="absolute",i.canvas_.style.left="0",i.gl_=$Y(i.canvas_);var r=i.getGL();if(i.bufferCache_={},i.currentProgram_=null,yS(RC(function(){if(!HY){var t=$Y(document.createElement("canvas"));t&&(HY=t.getSupportedExtensions())}return HY}(),"OES_element_index_uint"),63),r.getExtension("OES_element_index_uint"),i.canvas_.addEventListener("webglcontextlost",i.boundHandleWebGLContextLost_),i.canvas_.addEventListener("webglcontextrestored",i.boundHandleWebGLContextRestored_),i.offsetRotateMatrix_=[1,0,0,1,0,0],i.offsetScaleMatrix_=[1,0,0,1,0,0],i.tmpMat4_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],i.uniformLocations_={},i.attribLocations_={},i.uniforms_=[],n.uniforms)for(var s in n.uniforms)i.uniforms_.push({name:s,value:n.uniforms[s]});return i.postProcessPasses_=n.postProcesses?n.postProcesses.map(function(t){return new ZY({webGlContext:r,scaleRatio:t.scaleRatio,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms})}):[new ZY({webGlContext:r})],i.shaderCompileErrors_=null,i.startTime_=Date.now(),i}return YY(e,t),e.prototype.bindBuffer=function(t){var e=this.getGL(),i=YC(t),n=this.bufferCache_[i];if(!n){var r=e.createBuffer();this.bufferCache_[i]=n={buffer:t,webGlBuffer:r}}e.bindBuffer(t.getType(),n.webGlBuffer)},e.prototype.flushBufferData=function(t){var e=this.getGL();this.bindBuffer(t),e.bufferData(t.getType(),t.getArray(),t.getUsage())},e.prototype.deleteBuffer=function(t){var e=this.getGL(),i=YC(t),n=this.bufferCache_[i];e.isContextLost()||e.deleteBuffer(n.buffer),delete this.bufferCache_[i]},e.prototype.disposeInternal=function(){this.canvas_.removeEventListener("webglcontextlost",this.boundHandleWebGLContextLost_),this.canvas_.removeEventListener("webglcontextrestored",this.boundHandleWebGLContextRestored_)},e.prototype.prepareDraw=function(t){var e=this.getGL(),i=this.getCanvas(),n=t.size,r=t.pixelRatio;i.width=n[0]*r,i.height=n[1]*r,i.style.width=n[0]+"px",i.style.height=n[1]+"px",e.useProgram(this.currentProgram_);for(var s=this.postProcessPasses_.length-1;s>=0;s--)this.postProcessPasses_[s].init(t);e.bindTexture(e.TEXTURE_2D,null),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.enable(e.BLEND),e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA),e.useProgram(this.currentProgram_),this.applyFrameState(t),this.applyUniforms(t)},e.prototype.prepareDrawToRenderTarget=function(t,e,i){var n=this.getGL(),r=e.getSize();n.bindFramebuffer(n.FRAMEBUFFER,e.getFramebuffer()),n.viewport(0,0,r[0],r[1]),n.bindTexture(n.TEXTURE_2D,e.getTexture()),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),n.enable(n.BLEND),n.blendFunc(n.ONE,i?n.ZERO:n.ONE_MINUS_SRC_ALPHA),n.useProgram(this.currentProgram_),this.applyFrameState(t),this.applyUniforms(t)},e.prototype.drawElements=function(t,e){var i=this.getGL();i.drawElements(i.TRIANGLES,e-t,i.UNSIGNED_INT,4*t)},e.prototype.finalizeDraw=function(t){for(var e=0;e<this.postProcessPasses_.length;e++)this.postProcessPasses_[e].apply(t,this.postProcessPasses_[e+1]||null)},e.prototype.getCanvas=function(){return this.canvas_},e.prototype.getGL=function(){return this.gl_},e.prototype.applyFrameState=function(t){var e=t.size,i=t.viewState.rotation,n=sM(this.offsetScaleMatrix_);!function(t,e,i){oM(t,aM(rM,e,0,0,i,0,0))}(n,2/e[0],2/e[1]);var r,s,o,a,l=sM(this.offsetRotateMatrix_);0!==i&&(r=l,s=-i,o=Math.cos(s),a=Math.sin(s),oM(r,aM(rM,o,a,-a,o,0,0))),this.setUniformMatrixValue("u_offsetScaleMatrix",qY(this.tmpMat4_,n)),this.setUniformMatrixValue("u_offsetRotateMatrix",qY(this.tmpMat4_,l)),this.setUniformFloatValue("u_time",.001*(Date.now()-this.startTime_)),this.setUniformFloatValue("u_zoom",t.viewState.zoom),this.setUniformFloatValue("u_resolution",t.viewState.resolution)},e.prototype.applyUniforms=function(t){var e,i=this.getGL(),n=0;this.uniforms_.forEach((function(r){if((e="function"==typeof r.value?r.value(t):r.value)instanceof HTMLCanvasElement||e instanceof HTMLImageElement||e instanceof ImageData)r.texture||(r.prevValue=void 0,r.texture=i.createTexture()),i.activeTexture(i["TEXTURE"+n]),i.bindTexture(i.TEXTURE_2D,r.texture),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),(!(e instanceof HTMLImageElement)||e.complete)&&r.prevValue!==e&&(r.prevValue=e,i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,e)),i.uniform1i(this.getUniformLocation(r.name),n++);else if(Array.isArray(e)&&6===e.length)this.setUniformMatrixValue(r.name,qY(this.tmpMat4_,e));else if(Array.isArray(e)&&e.length<=4)switch(e.length){case 2:return void i.uniform2f(this.getUniformLocation(r.name),e[0],e[1]);case 3:return void i.uniform3f(this.getUniformLocation(r.name),e[0],e[1],e[2]);case 4:return void i.uniform4f(this.getUniformLocation(r.name),e[0],e[1],e[2],e[3]);default:return}else"number"==typeof e&&i.uniform1f(this.getUniformLocation(r.name),e)}).bind(this))},e.prototype.useProgram=function(t){return t!=this.currentProgram_&&(this.getGL().useProgram(t),this.currentProgram_=t,this.uniformLocations_={},this.attribLocations_={},!0)},e.prototype.compileShader=function(t,e){var i=this.getGL(),n=i.createShader(e);return i.shaderSource(n,t),i.compileShader(n),n},e.prototype.getProgram=function(t,e){var i=this.getGL(),n=this.compileShader(t,i.FRAGMENT_SHADER),r=this.compileShader(e,i.VERTEX_SHADER);this.shaderCompileErrors_=null,i.getShaderInfoLog(n)&&(this.shaderCompileErrors_="Fragment shader compilation failed:\n"+i.getShaderInfoLog(n)),i.getShaderInfoLog(r)&&(this.shaderCompileErrors_=(this.shaderCompileErrors_||"")+"Vertex shader compilation failed:\n"+i.getShaderInfoLog(r));var s=i.createProgram();return i.attachShader(s,n),i.attachShader(s,r),i.linkProgram(s),s},e.prototype.getShaderCompileErrors=function(){return this.shaderCompileErrors_},e.prototype.getUniformLocation=function(t){return void 0===this.uniformLocations_[t]&&(this.uniformLocations_[t]=this.getGL().getUniformLocation(this.currentProgram_,t)),this.uniformLocations_[t]},e.prototype.getAttributeLocation=function(t){return void 0===this.attribLocations_[t]&&(this.attribLocations_[t]=this.getGL().getAttribLocation(this.currentProgram_,t)),this.attribLocations_[t]},e.prototype.makeProjectionTransform=function(t,e){var i=t.size,n=t.viewState.rotation,r=t.viewState.resolution,s=t.viewState.center;return sM(e),cM(e,0,0,2/(r*i[0]),2/(r*i[1]),-n,-s[0],-s[1]),e},e.prototype.setUniformFloatValue=function(t,e){this.getGL().uniform1f(this.getUniformLocation(t),e)},e.prototype.setUniformMatrixValue=function(t,e){this.getGL().uniformMatrix4fv(this.getUniformLocation(t),!1,e)},e.prototype.enableAttributeArray_=function(t,e,i,n,r){var s=this.getAttributeLocation(t);s<0||(this.getGL().enableVertexAttribArray(s),this.getGL().vertexAttribPointer(s,e,i,!1,n,r))},e.prototype.enableAttributes=function(t){for(var e=function(t){for(var e=0,i=0;i<t.length;i++){var n=t[i];e+=n.size*XY(n.type)}return e}(t),i=0,n=0;n<t.length;n++){var r=t[n];this.enableAttributeArray_(r.name,r.size,r.type||5126,e,i),i+=r.size*XY(r.type)}},e.prototype.handleWebGLContextLost=function(){HC(this.bufferCache_),this.currentProgram_=null},e.prototype.handleWebGLContextRestored=function(){},e.prototype.createTexture=function(t,e,i){var n=this.getGL(),r=i||n.createTexture(),s=n.RGBA,o=n.RGBA,a=n.UNSIGNED_BYTE;return n.bindTexture(n.TEXTURE_2D,r),e?n.texImage2D(n.TEXTURE_2D,0,s,o,a,e):n.texImage2D(n.TEXTURE_2D,0,s,t[0],t[1],0,o,a,null),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),r},e}(OC),tQ=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),eQ=function(t){function e(e,i){var n=t.call(this,e)||this,r=i||{};return n.helper=new JY({postProcesses:r.postProcesses,uniforms:r.uniforms}),void 0!==r.className&&(n.helper.getCanvas().className=r.className),n}return tQ(e,t),e.prototype.disposeInternal=function(){this.helper.dispose(),t.prototype.disposeInternal.call(this)},e.prototype.getShaderCompileErrors=function(){return this.helper.getShaderCompileErrors()},e.prototype.dispatchRenderEvent_=function(t,e){var i=this.getLayer();if(i.hasListener(t)){var n=new HG(t,null,e,null);i.dispatchEvent(n)}},e.prototype.preRender=function(t){this.dispatchRenderEvent_("prerender",t)},e.prototype.postRender=function(t){this.dispatchRenderEvent_("postrender",t)},e}(jG),iQ=new Uint8Array(4),nQ=function(){function t(t,e){this.helper_=t;var i=t.getGL();this.texture_=i.createTexture(),this.framebuffer_=i.createFramebuffer(),this.size_=e||[1,1],this.data_=new Uint8Array(0),this.dataCacheDirty_=!0,this.updateSize_()}return t.prototype.setSize=function(t){UC(t,this.size_)||(this.size_[0]=t[0],this.size_[1]=t[1],this.updateSize_())},t.prototype.getSize=function(){return this.size_},t.prototype.clearCachedData=function(){this.dataCacheDirty_=!0},t.prototype.readAll=function(){if(this.dataCacheDirty_){var t=this.size_,e=this.helper_.getGL();e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.readPixels(0,0,t[0],t[1],e.RGBA,e.UNSIGNED_BYTE,this.data_),this.dataCacheDirty_=!1}return this.data_},t.prototype.readPixel=function(t,e){if(t<0||e<0||t>this.size_[0]||e>=this.size_[1])return iQ[0]=0,iQ[1]=0,iQ[2]=0,iQ[3]=0,iQ;this.readAll();var i=Math.floor(t)+(this.size_[1]-Math.floor(e)-1)*this.size_[0];return iQ[0]=this.data_[4*i],iQ[1]=this.data_[4*i+1],iQ[2]=this.data_[4*i+2],iQ[3]=this.data_[4*i+3],iQ},t.prototype.getTexture=function(){return this.texture_},t.prototype.getFramebuffer=function(){return this.framebuffer_},t.prototype.updateSize_=function(){var t=this.size_,e=this.helper_.getGL();this.texture_=this.helper_.createTexture(t,null,this.texture_),e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.viewport(0,0,t[0],t[1]),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture_,0),this.data_=new Uint8Array(t[0]*t[1]*4)},t}(),rQ=new Blob(['var e="function"==typeof Object.assign?Object.assign:function(e,n){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1,o=arguments.length;r<o;++r){var i=arguments[r];if(null!=i)for(var f in i)i.hasOwnProperty(f)&&(t[f]=i[f])}return t},n="GENERATE_BUFFERS",t=[],r={vertexPosition:0,indexPosition:0};function o(e,n,t,r,o){e[n+0]=t,e[n+1]=r,e[n+2]=o}function i(e,n,i,f,s,u){var a=3+s,l=e[n+0],v=e[n+1],c=t;c.length=s;for(var g=0;g<c.length;g++)c[g]=e[n+2+g];var b=u?u.vertexPosition:0,h=u?u.indexPosition:0,d=b/a;return o(i,b,l,v,0),c.length&&i.set(c,b+3),o(i,b+=a,l,v,1),c.length&&i.set(c,b+3),o(i,b+=a,l,v,2),c.length&&i.set(c,b+3),o(i,b+=a,l,v,3),c.length&&i.set(c,b+3),b+=a,f[h++]=d,f[h++]=d+1,f[h++]=d+3,f[h++]=d+1,f[h++]=d+2,f[h++]=d+3,r.vertexPosition=b,r.indexPosition=h,r}var f=self;f.onmessage=function(t){var r=t.data;if(r.type===n){for(var o=r.customAttributesCount,s=2+o,u=new Float32Array(r.renderInstructions),a=u.length/s,l=4*a*(o+3),v=new Uint32Array(6*a),c=new Float32Array(l),g=null,b=0;b<u.length;b+=s)g=i(u,b,c,v,o,g);var h=e({vertexBuffer:c.buffer,indexBuffer:v.buffer,renderInstructions:u.buffer},r);f.postMessage(h,[c.buffer,v.buffer,u.buffer])}};'],{type:"application/javascript"}),sQ=URL.createObjectURL(rQ),oQ=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),aQ=function(t){function e(e,i){var n=this,r=i.uniforms||{},s=[1,0,0,1,0,0];r.u_projectionMatrix=s,(n=t.call(this,e,{className:i.className,uniforms:r,postProcesses:i.postProcesses})||this).sourceRevision_=-1,n.verticesBuffer_=new WY(34962,35048),n.hitVerticesBuffer_=new WY(34962,35048),n.indicesBuffer_=new WY(34963,35048),n.program_=n.helper.getProgram(i.fragmentShader,i.vertexShader),n.hitDetectionEnabled_=!(!i.hitFragmentShader||!i.hitVertexShader),n.hitProgram_=n.hitDetectionEnabled_&&n.helper.getProgram(i.hitFragmentShader,i.hitVertexShader);var o=i.attributes?i.attributes.map(function(t){return{name:"a_"+t.name,size:1,type:QY.FLOAT}}):[];n.attributes=[{name:"a_position",size:2,type:QY.FLOAT},{name:"a_index",size:1,type:QY.FLOAT}].concat(o),n.hitDetectionAttributes=[{name:"a_position",size:2,type:QY.FLOAT},{name:"a_index",size:1,type:QY.FLOAT},{name:"a_hitColor",size:4,type:QY.FLOAT},{name:"a_featureUid",size:1,type:QY.FLOAT}].concat(o),n.customAttributes=i.attributes?i.attributes:[],n.previousExtent_=[1/0,1/0,-1/0,-1/0],n.currentTransform_=s,n.renderTransform_=[1,0,0,1,0,0],n.invertRenderTransform_=[1,0,0,1,0,0],n.renderInstructions_=new Float32Array(0),n.hitRenderInstructions_=new Float32Array(0),n.hitRenderTarget_=n.hitDetectionEnabled_&&new nQ(n.helper),n.worker_=new Worker(sQ),n.worker_.addEventListener("message",(function(t){var e=t.data;if("GENERATE_BUFFERS"===e.type){var i=e.projectionTransform;e.hitDetection?(this.hitVerticesBuffer_.fromArrayBuffer(e.vertexBuffer),this.helper.flushBufferData(this.hitVerticesBuffer_)):(this.verticesBuffer_.fromArrayBuffer(e.vertexBuffer),this.helper.flushBufferData(this.verticesBuffer_)),this.indicesBuffer_.fromArrayBuffer(e.indexBuffer),this.helper.flushBufferData(this.indicesBuffer_),this.renderTransform_=i,hM(this.invertRenderTransform_,this.renderTransform_),e.hitDetection?this.hitRenderInstructions_=new Float32Array(t.data.renderInstructions):this.renderInstructions_=new Float32Array(t.data.renderInstructions),this.getLayer().changed()}}).bind(n)),n.featureCache_={},n.featureCount_=0;var a=n.getLayer().getSource();return n.sourceListenKeys_=[tk(a,"addfeature",n.handleSourceFeatureAdded_,n),tk(a,"changefeature",n.handleSourceFeatureChanged_,n),tk(a,"removefeature",n.handleSourceFeatureDelete_,n),tk(a,"clear",n.handleSourceFeatureClear_,n)],a.forEachFeature((function(t){this.featureCache_[YC(t)]={feature:t,properties:t.getProperties(),geometry:t.getGeometry()},this.featureCount_++}).bind(n)),n}return oQ(e,t),e.prototype.handleSourceFeatureAdded_=function(t){var e=t.feature;this.featureCache_[YC(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()},this.featureCount_++},e.prototype.handleSourceFeatureChanged_=function(t){var e=t.feature;this.featureCache_[YC(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()}},e.prototype.handleSourceFeatureDelete_=function(t){delete this.featureCache_[YC(t.feature)],this.featureCount_--},e.prototype.handleSourceFeatureClear_=function(){this.featureCache_={},this.featureCount_=0},e.prototype.renderFrame=function(t){this.preRender(t);var e=this.indicesBuffer_.getSize();this.helper.drawElements(0,e),this.helper.finalizeDraw(t);var i=this.helper.getCanvas(),n=t.layerStatesArray[t.layerIndex].opacity;return n!==parseFloat(i.style.opacity)&&(i.style.opacity=String(n)),this.hitDetectionEnabled_&&(this.renderHitDetection(t),this.hitRenderTarget_.clearCachedData()),this.postRender(t),i},e.prototype.prepareFrame=function(t){var e=this.getLayer(),i=e.getSource(),n=t.viewState,r=!t.viewHints[0]&&!t.viewHints[1],s=!RS(this.previousExtent_,t.extent),o=this.sourceRevision_<i.getRevision();if(o&&(this.sourceRevision_=i.getRevision()),r&&(s||o)){var a=n.projection,l=n.resolution,c=e instanceof HZ?e.getRenderBuffer():0,h=xS(t.extent,c*l);i.loadFeatures(h,l,a),this.rebuildBuffers_(t),this.previousExtent_=t.extent.slice()}return this.helper.makeProjectionTransform(t,this.currentTransform_),oM(this.currentTransform_,this.invertRenderTransform_),this.helper.useProgram(this.program_),this.helper.prepareDraw(t),this.helper.bindBuffer(this.verticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.attributes),!0},e.prototype.rebuildBuffers_=function(t){var e=[1,0,0,1,0,0];this.helper.makeProjectionTransform(t,e);var i,n,r=(2+this.customAttributes.length)*this.featureCount_;if(this.renderInstructions_&&this.renderInstructions_.length===r||(this.renderInstructions_=new Float32Array(r)),this.hitDetectionEnabled_){var s=(7+this.customAttributes.length)*this.featureCount_;this.hitRenderInstructions_&&this.hitRenderInstructions_.length===s||(this.hitRenderInstructions_=new Float32Array(s))}var o,a,l,c=[],h=[],u=0,d=0;for(var p in this.featureCache_)if((n=(i=this.featureCache_[p]).geometry)&&"Point"===n.getType()){c[0]=n.getFlatCoordinates()[0],c[1]=n.getFlatCoordinates()[1],lM(e,c),a=d+6,l=void 0,(l=h||[])[0]=Math.floor(a/256/256/256)/255,l[1]=Math.floor(a/256/256)%256/255,l[2]=Math.floor(a/256)%256/255,l[3]=a%256/255,o=l,this.renderInstructions_[u++]=c[0],this.renderInstructions_[u++]=c[1],this.hitDetectionEnabled_&&(this.hitRenderInstructions_[d++]=c[0],this.hitRenderInstructions_[d++]=c[1],this.hitRenderInstructions_[d++]=o[0],this.hitRenderInstructions_[d++]=o[1],this.hitRenderInstructions_[d++]=o[2],this.hitRenderInstructions_[d++]=o[3],this.hitRenderInstructions_[d++]=Number(p));for(var f=void 0,m=0;m<this.customAttributes.length;m++)f=this.customAttributes[m].callback(i.feature,i.properties),this.renderInstructions_[u++]=f,this.hitDetectionEnabled_&&(this.hitRenderInstructions_[d++]=f)}var g={type:"GENERATE_BUFFERS",renderInstructions:this.renderInstructions_.buffer,customAttributesCount:this.customAttributes.length};if(g.projectionTransform=e,this.worker_.postMessage(g,[this.renderInstructions_.buffer]),this.renderInstructions_=null,this.hitDetectionEnabled_){var A={type:"GENERATE_BUFFERS",renderInstructions:this.hitRenderInstructions_.buffer,customAttributesCount:5+this.customAttributes.length};A.projectionTransform=e,A.hitDetection=!0,this.worker_.postMessage(A,[this.hitRenderInstructions_.buffer]),this.hitRenderInstructions_=null}},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,r){if(yS(this.hitDetectionEnabled_,66),this.hitRenderInstructions_){var s=lM(e.coordinateToPixelTransform,t.slice()),o=this.hitRenderTarget_.readPixel(s[0]/2,s[1]/2),a=(h=[o[0]/255,o[1]/255,o[2]/255,o[3]/255],u=0,u+=Math.round(256*h[0]*256*256*255),u+=Math.round(256*h[1]*256*255),(u+=Math.round(256*h[2]*255))+Math.round(255*h[3])),l=Math.floor(this.hitRenderInstructions_[a]).toString(),c=this.getLayer().getSource().getFeatureByUid(l);return c?n(c,this.getLayer(),null):void 0}var h,u},e.prototype.renderHitDetection=function(t){if(this.hitVerticesBuffer_.getSize()){this.hitRenderTarget_.setSize([Math.floor(t.size[0]/2),Math.floor(t.size[1]/2)]),this.helper.useProgram(this.hitProgram_),this.helper.prepareDrawToRenderTarget(t,this.hitRenderTarget_,!0),this.helper.bindBuffer(this.hitVerticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.hitDetectionAttributes);var e=this.indicesBuffer_.getSize();this.helper.drawElements(0,e)}},e.prototype.disposeInternal=function(){this.worker_.terminate(),this.layer_=null,this.sourceListenKeys_.forEach(function(t){ik(t)}),this.sourceListenKeys_=null,t.prototype.disposeInternal.call(this)},e}(eQ),lQ={};function cQ(t){if("number"==typeof t)return 1;if("boolean"==typeof t)return 8;if("string"==typeof t)return fW.test(e=t)&&(e=gW(e)),pW.test(e)||0===e.indexOf("rgba(")||0===e.indexOf("rgb(")?6:2;var e;if(!Array.isArray(t))throw new Error("Unhandled value type: "+JSON.stringify(t));var i=t;if(i.every(function(t){return"number"==typeof t}))return 3===i.length||4===i.length?20:16;if("string"!=typeof i[0])throw new Error("Expected an expression operator but received: "+JSON.stringify(i));var n=lQ[i[0]];if(void 0===n)throw new Error("Unrecognized expression operator: "+JSON.stringify(i));return n.getReturnType(i.slice(1))}function hQ(t){var e=t.toString();return-1===e.indexOf(".")?e+".0":e}function uQ(t){if(t.length<2||t.length>4)throw new Error("`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.");return"vec"+t.length+"("+t.map(hQ).join(", ")+")"}function dQ(t,e){return void 0===t.stringLiteralsMap[e]&&(t.stringLiteralsMap[e]=Object.keys(t.stringLiteralsMap).length),t.stringLiteralsMap[e]}function pQ(t,e,i){if(Array.isArray(e)&&"string"==typeof e[0]){var n=lQ[e[0]];if(void 0===n)throw new Error("Unrecognized expression operator: "+JSON.stringify(e));return n.toGlsl(t,e.slice(1),i)}var r,s=cQ(e);return(1&s)>0?hQ(e):(8&s)>0?e.toString():(2&s)>0&&(void 0===i||2==i)?function(t,e){return hQ(dQ(t,e))}(t,e.toString()):(4&s)>0&&(void 0===i||4==i)?((r=_W(e).slice()).length<4&&r.push(1),uQ(r.map(function(t,e){return e<3?t/255:t}))):(16&s)>0?uQ(e):void 0}function fQ(t){if(!(1&cQ(t)))throw new Error("A numeric value was expected, got "+JSON.stringify(t)+" instead")}function mQ(t){for(var e=0;e<t.length;e++)fQ(t[e])}function gQ(t){if(!(2&cQ(t)))throw new Error("A string value was expected, got "+JSON.stringify(t)+" instead")}function AQ(t){if(!(8&cQ(t)))throw new Error("A boolean value was expected, got "+JSON.stringify(t)+" instead")}function bQ(t,e){if(t.length!==e)throw new Error("Exactly "+e+" arguments were expected, got "+t.length+" instead")}function vQ(t,e){if(t.length<e)throw new Error("At least "+e+" arguments were expected, got "+t.length+" instead")}function _Q(t,e){if(t.length>e)throw new Error("At most "+e+" arguments were expected, got "+t.length+" instead")}function yQ(t){if(t.length%2!=0)throw new Error("An even amount of arguments was expected, got "+t+" instead")}function wQ(t,e){if(Math.log2(e)%1!=0)throw new Error("Could not infer only one type from the following expression: "+JSON.stringify(t))}function xQ(t){return{getReturnType:function(t){return 8},toGlsl:function(e,i){bQ(i,2);for(var n=31,r=0;r<i.length;r++)n&=cQ(i[r]);if(0===n)throw new Error("All arguments should be of compatible type, got "+JSON.stringify(i)+" instead");return"("+pQ(e,i[0],n)+" "+t+" "+pQ(e,i[1],n)+")"}}}function CQ(t){return{getReturnType:function(t){return 8},toGlsl:function(e,i){vQ(i,2);for(var n=0;n<i.length;n++)AQ(i[n]);return"("+i.map(function(t){return pQ(e,t)}).join(" "+t+" ")+")"}}}lQ.get={getReturnType:function(t){return 31},toGlsl:function(t,e){bQ(e,1),gQ(e[0]);var i=e[0].toString();return-1===t.attributes.indexOf(i)&&t.attributes.push(i),(t.inFragmentShader?"v_":"a_")+i}},lQ.var={getReturnType:function(t){return 31},toGlsl:function(t,e){bQ(e,1),gQ(e[0]);var i=e[0].toString();return-1===t.variables.indexOf(i)&&t.variables.push(i),"u_"+i}},lQ.time={getReturnType:function(t){return 1},toGlsl:function(t,e){return bQ(e,0),"u_time"}},lQ.zoom={getReturnType:function(t){return 1},toGlsl:function(t,e){return bQ(e,0),"u_zoom"}},lQ.resolution={getReturnType:function(t){return 1},toGlsl:function(t,e){return bQ(e,0),"u_resolution"}},lQ["*"]={getReturnType:function(t){return 1},toGlsl:function(t,e){return bQ(e,2),mQ(e),"("+pQ(t,e[0])+" * "+pQ(t,e[1])+")"}},lQ["/"]={getReturnType:function(t){return 1},toGlsl:function(t,e){return bQ(e,2),mQ(e),"("+pQ(t,e[0])+" / "+pQ(t,e[1])+")"}},lQ["+"]={getReturnType:function(t){return 1},toGlsl:function(t,e){return bQ(e,2),mQ(e),"("+pQ(t,e[0])+" + "+pQ(t,e[1])+")"}},lQ["-"]={getReturnType:function(t){return 1},toGlsl:function(t,e){return bQ(e,2),mQ(e),"("+pQ(t,e[0])+" - "+pQ(t,e[1])+")"}},lQ.clamp={getReturnType:function(t){return 1},toGlsl:function(t,e){bQ(e,3),mQ(e);var i=pQ(t,e[1]),n=pQ(t,e[2]);return"clamp("+pQ(t,e[0])+", "+i+", "+n+")"}},lQ["%"]={getReturnType:function(t){return 1},toGlsl:function(t,e){return bQ(e,2),mQ(e),"mod("+pQ(t,e[0])+", "+pQ(t,e[1])+")"}},lQ["^"]={getReturnType:function(t){return 1},toGlsl:function(t,e){return bQ(e,2),mQ(e),"pow("+pQ(t,e[0])+", "+pQ(t,e[1])+")"}},lQ[">"]={getReturnType:function(t){return 8},toGlsl:function(t,e){return bQ(e,2),mQ(e),"("+pQ(t,e[0])+" > "+pQ(t,e[1])+")"}},lQ[">="]={getReturnType:function(t){return 8},toGlsl:function(t,e){return bQ(e,2),mQ(e),"("+pQ(t,e[0])+" >= "+pQ(t,e[1])+")"}},lQ["<"]={getReturnType:function(t){return 8},toGlsl:function(t,e){return bQ(e,2),mQ(e),"("+pQ(t,e[0])+" < "+pQ(t,e[1])+")"}},lQ["<="]={getReturnType:function(t){return 8},toGlsl:function(t,e){return bQ(e,2),mQ(e),"("+pQ(t,e[0])+" <= "+pQ(t,e[1])+")"}},lQ["=="]=xQ("=="),lQ["!="]=xQ("!="),lQ["!"]={getReturnType:function(t){return 8},toGlsl:function(t,e){return bQ(e,1),AQ(e[0]),"(!"+pQ(t,e[0])+")"}},lQ.all=CQ("&&"),lQ.any=CQ("||"),lQ.between={getReturnType:function(t){return 8},toGlsl:function(t,e){bQ(e,3),mQ(e);var i=pQ(t,e[1]),n=pQ(t,e[2]),r=pQ(t,e[0]);return"("+r+" >= "+i+" && "+r+" <= "+n+")"}},lQ.array={getReturnType:function(t){return 16},toGlsl:function(t,e){vQ(e,2),_Q(e,4),mQ(e);var i=e.map(function(e){return pQ(t,e,1)});return"vec"+e.length+"("+i.join(", ")+")"}},lQ.color={getReturnType:function(t){return 4},toGlsl:function(t,e){vQ(e,3),_Q(e,4),mQ(e),3===e.length&&e.push(1);var i=e.map(function(e,i){return pQ(t,e,1)+(i<3?" / 255.0":"")});return"vec"+e.length+"("+i.join(", ")+")"}},lQ.interpolate={getReturnType:function(t){for(var e=5,i=3;i<t.length;i+=2)e&=cQ(t[i]);return e},toGlsl:function(t,e,i){yQ(e),vQ(e,6);var n,r=e[0];switch(r[0]){case"linear":n=1;break;case"exponential":n=r[1];break;default:n=null}if(!n)throw new Error('Invalid interpolation type for "interpolate" operator, received: '+JSON.stringify(r));var s=void 0!==i?i:31,o=lQ.interpolate.getReturnType(e)&s;wQ(e,o);for(var a=pQ(t,e[1]),l=null,c=2;c<e.length-2;c+=2){var h=pQ(t,e[c]),u=pQ(t,e[c+1],o),d=pQ(t,e[c+2]);l="mix("+(l||u)+", "+pQ(t,e[c+3],o)+", pow(clamp(("+a+" - "+h+") / ("+d+" - "+h+"), 0.0, 1.0), "+hQ(n)+"))"}return l}},lQ.match={getReturnType:function(t){for(var e=31,i=2;i<t.length;i+=2)e&=cQ(t[i]);return e&cQ(t[t.length-1])},toGlsl:function(t,e,i){yQ(e),vQ(e,4);var n=void 0!==i?i:31,r=lQ.match.getReturnType(e)&n;wQ(e,r);for(var s=pQ(t,e[0]),o=pQ(t,e[e.length-1],r),a=null,l=e.length-3;l>=1;l-=2)a="("+s+" == "+pQ(t,e[l])+" ? "+pQ(t,e[l+1],r)+" : "+(a||o)+")";return a}},lQ.case={getReturnType:function(t){for(var e=31,i=1;i<t.length;i+=2)e&=cQ(t[i]);return e&cQ(t[t.length-1])},toGlsl:function(t,e,i){!function(t){if(t.length%2==0)throw new Error("An odd amount of arguments was expected, got "+t+" instead")}(e),vQ(e,3);var n=void 0!==i?i:31,r=lQ.case.getReturnType(e)&n;wQ(e,r);for(var s=0;s<e.length-1;s+=2)AQ(e[s]);var o=pQ(t,e[e.length-1],r),a=null;for(s=e.length-3;s>=0;s-=2)a="("+pQ(t,e[s])+" ? "+pQ(t,e[s+1],r)+" : "+(a||o)+")";return a}};var SQ=function(){function t(){this.uniforms=[],this.attributes=[],this.varyings=[],this.sizeExpression="vec2(1.0)",this.rotationExpression="0.0",this.offsetExpression="vec2(0.0)",this.colorExpression="vec4(1.0)",this.texCoordExpression="vec4(0.0, 0.0, 1.0, 1.0)",this.discardExpression="false",this.rotateWithView=!1}return t.prototype.addUniform=function(t){return this.uniforms.push(t),this},t.prototype.addAttribute=function(t){return this.attributes.push(t),this},t.prototype.addVarying=function(t,e,i){return this.varyings.push({name:t,type:e,expression:i}),this},t.prototype.setSizeExpression=function(t){return this.sizeExpression=t,this},t.prototype.setRotationExpression=function(t){return this.rotationExpression=t,this},t.prototype.setSymbolOffsetExpression=function(t){return this.offsetExpression=t,this},t.prototype.setColorExpression=function(t){return this.colorExpression=t,this},t.prototype.setTextureCoordinateExpression=function(t){return this.texCoordExpression=t,this},t.prototype.setFragmentDiscardExpression=function(t){return this.discardExpression=t,this},t.prototype.setSymbolRotateWithView=function(t){return this.rotateWithView=t,this},t.prototype.getSizeExpression=function(){return this.sizeExpression},t.prototype.getOffsetExpression=function(){return this.offsetExpression},t.prototype.getColorExpression=function(){return this.colorExpression},t.prototype.getTextureCoordinateExpression=function(){return this.texCoordExpression},t.prototype.getFragmentDiscardExpression=function(){return this.discardExpression},t.prototype.getSymbolVertexShader=function(t){var e=this.rotateWithView?"u_offsetScaleMatrix * u_offsetRotateMatrix":"u_offsetScaleMatrix",i=this.attributes,n=this.varyings;return t&&(i=i.concat("vec4 a_hitColor"),n=n.concat({name:"v_hitColor",type:"vec4",expression:"a_hitColor"})),"precision mediump float;\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\n"+this.uniforms.map(function(t){return"uniform "+t+";"}).join("\n")+"\nattribute vec2 a_position;\nattribute float a_index;\n"+i.map(function(t){return"attribute "+t+";"}).join("\n")+"\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\n"+n.map(function(t){return"varying "+t.type+" "+t.name+";"}).join("\n")+"\nvoid main(void) {\n mat4 offsetMatrix = "+e+";\n vec2 halfSize = "+this.sizeExpression+" * 0.5;\n vec2 offset = "+this.offsetExpression+";\n float angle = "+this.rotationExpression+";\n float offsetX;\n float offsetY;\n if (a_index == 0.0) {\n offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\n offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\n } else if (a_index == 1.0) {\n offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\n offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\n } else if (a_index == 2.0) {\n offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\n offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\n } else {\n offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\n offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\n }\n vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n vec4 texCoord = "+this.texCoordExpression+";\n float u = a_index == 0.0 || a_index == 3.0 ? texCoord.s : texCoord.p;\n float v = a_index == 2.0 || a_index == 3.0 ? texCoord.t : texCoord.q;\n v_texCoord = vec2(u, v);\n u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n v = a_index == 2.0 || a_index == 3.0 ? 0.0 : 1.0;\n v_quadCoord = vec2(u, v);\n"+n.map(function(t){return" "+t.name+" = "+t.expression+";"}).join("\n")+"\n}"},t.prototype.getSymbolFragmentShader=function(t){var e=t?" if (gl_FragColor.a < 0.1) { discard; } gl_FragColor = v_hitColor;":"",i=this.varyings;return t&&(i=i.concat({name:"v_hitColor",type:"vec4",expression:"a_hitColor"})),"precision mediump float;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\n"+this.uniforms.map(function(t){return"uniform "+t+";"}).join("\n")+"\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\n"+i.map(function(t){return"varying "+t.type+" "+t.name+";"}).join("\n")+"\nvoid main(void) {\n if ("+this.discardExpression+") { discard; }\n gl_FragColor = "+this.colorExpression+";\n gl_FragColor.rgb *= gl_FragColor.a;\n"+e+"\n}"},t}(),kQ=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),EQ=function(t){function e(e){var i=this,n=zC({},e);return(i=t.call(this,n)||this).parseResult_=function(t){var e=t.symbol,i=void 0!==e.size?e.size:1,n=e.color||"white",r=e.textureCoord||[0,0,1,1],s=e.offset||[0,0],o=void 0!==e.opacity?e.opacity:1,a=void 0!==e.rotation?e.rotation:0,l={inFragmentShader:!1,variables:[],attributes:[],stringLiteralsMap:{}},c=pQ(l,i,17),h=pQ(l,s,16),u=pQ(l,r,16),d=pQ(l,a,1),p={inFragmentShader:!0,variables:l.variables,attributes:[],stringLiteralsMap:l.stringLiteralsMap},f=pQ(p,n,4),m=pQ(p,o,1),g="1.0",A="vec2("+pQ(p,i,17)+").x";switch(e.symbolType){case"square":case"image":break;case"circle":g="(1.0-smoothstep(1.-4./"+A+",1.,dot(v_quadCoord-.5,v_quadCoord-.5)*4.))";break;case"triangle":var b="(v_quadCoord*2.-1.)",v="(atan("+b+".x,"+b+".y))";g="(1.0-smoothstep(.5-3./"+A+",.5,cos(floor(.5+"+v+"/2.094395102)*2.094395102-"+v+")*length("+b+")))";break;default:throw new Error("Unexpected symbol type: "+e.symbolType)}var _=(new SQ).setSizeExpression("vec2("+c+")").setRotationExpression(d).setSymbolOffsetExpression(h).setTextureCoordinateExpression(u).setSymbolRotateWithView(!!e.rotateWithView).setColorExpression("vec4("+f+".rgb, "+f+".a * "+m+" * "+g+")");if(t.filter){var y=pQ(p,t.filter,8);_.setFragmentDiscardExpression("!"+y)}var w={};if(p.variables.forEach(function(e){_.addUniform("float u_"+e),w["u_"+e]=function(){if(!t.variables||void 0===t.variables[e])throw new Error("The following variable is missing from the style: "+e);var i=t.variables[e];return"string"==typeof i&&(i=dQ(l,i)),void 0!==i?i:-9999999}}),"image"===e.symbolType&&e.src){var x=new Image;x.src=e.src,_.addUniform("sampler2D u_texture").setColorExpression(_.getColorExpression()+" * texture2D(u_texture, v_texCoord)"),w.u_texture=x}return p.attributes.forEach(function(t){-1===l.attributes.indexOf(t)&&l.attributes.push(t),_.addVarying("v_"+t,"float","a_"+t)}),l.attributes.forEach(function(t){_.addAttribute("float a_"+t)}),{builder:_,attributes:l.attributes.map(function(t){return{name:t,callback:function(e,i){var n=i[t];return"string"==typeof n&&(n=dQ(l,n)),void 0!==n?n:-9999999}}}),uniforms:w}}(e.style),i.hitDetectionDisabled_=!!e.disableHitDetection,i}return kQ(e,t),e.prototype.createRenderer=function(){return new aQ(this,{className:this.getClassName(),vertexShader:this.parseResult_.builder.getSymbolVertexShader(),fragmentShader:this.parseResult_.builder.getSymbolFragmentShader(),hitVertexShader:!this.hitDetectionDisabled_&&this.parseResult_.builder.getSymbolVertexShader(!0),hitFragmentShader:!this.hitDetectionDisabled_&&this.parseResult_.builder.getSymbolFragmentShader(!0),uniforms:this.parseResult_.uniforms,attributes:this.parseResult_.attributes})},e.prototype.disposeInternal=function(){this.getRenderer().disposeInternal(),t.prototype.disposeInternal.call(this)},e}(LG);window.ol&&!ol.ext&&(ol.ext={});var DQ=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t};window.ol&&(ol.inherits||(ol.inherits=DQ)),window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),window.Element&&!Element.prototype.remove&&(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)});var IQ=DQ,PQ=function(t,e){var i=t[0]-e[0],n=t[1]-e[1];return Math.sqrt(i*i+n*n)},OQ=function(t,e){return t[0]==e[0]&&t[1]==e[1]};kH.prototype.splitAt=function(t,e){var i;if(!t)return[this];if(e||(e=1e-10),t.length&&t[0].length){var n=[this];for(i=0;i<t.length;i++){for(var r=[],s=0;s<n.length;s++){var o=n[s].splitAt(t[i],e);r=r.concat(o)}n=r}return n}if(OQ(t,this.getFirstCoordinate())||OQ(t,this.getLastCoordinate()))return[this];var a=this.getCoordinates(),l=[a[0]],c=[];for(i=0;i<a.length-1;i++)if(!OQ(a[i],a[i+1])){if(OQ(t,a[i+1]))l.push(a[i+1]),c.push(new kH(l)),l=[];else if(!OQ(t,a[i])){var h,u=!1;a[i][0]==a[i+1][0]?(h=(a[i][1]-t[1])/(a[i][1]-a[i+1][1]),u=a[i][0]==t[0]&&0<h&&h<=1):a[i][1]==a[i+1][1]?(h=(a[i][0]-t[0])/(a[i][0]-a[i+1][0]),u=a[i][1]==t[1]&&0<h&&h<=1):(h=(a[i][0]-t[0])/(a[i][0]-a[i+1][0]),u=Math.abs(h-(a[i][1]-t[1])/(a[i][1]-a[i+1][1]))<=e&&0<h&&h<=1),u&&(l.push(t),c.push(new kH(l)),l=[t])}l.push(a[i+1])}return l.length>1&&c.push(new kH(l)),c.length?c:[this]};var MQ=function(t){t||(t={}),jZ.call(this,{renderer:this._render.bind(this),stroke:t.stroke,text:t.text,zIndex:t.zIndex,geometry:t.geometry}),this._visible=!1!==t.visible,"function"==typeof t.width?this._widthFn=t.width:this.setWidth(t.width),this.setWidth2(t.width2),"function"==typeof t.color?this._colorFn=t.color:this.setColor(t.color),this.setColor2(t.color2),this.setLineCap(t.lineCap),this.setArrow(t.arrow),this.setArrowSize(t.arrowSize),this.setArrowColor(t.arrowColor),this._offset=[0,0],this.setOffset(t.offset0,0),this.setOffset(t.offset1,1)};IQ(MQ,jZ),MQ.prototype.setWidth=function(t){this._width=t||0},MQ.prototype.setWidth2=function(t){this._width2=t},MQ.prototype.getOffset=function(t){return this._offset[t]},MQ.prototype.setOffset=function(t,e){switch(t=Math.max(0,parseFloat(t)),e){case 0:this._offset[0]=t;break;case 1:this._offset[1]=t}},MQ.prototype.setLineCap=function(t){this._lineCap="round"===t?"round":"butt"},MQ.prototype.getWidth=function(t,e){return this._widthFn?this._widthFn(t,e):this._width+(("number"==typeof this._width2?this._width2:this._width)-this._width)*e},MQ.prototype.setColor=function(t){try{this._color=_W(t)}catch($nt){this._color=[0,0,0,1]}},MQ.prototype.setColor2=function(t){try{this._color2=_W(t)}catch($nt){this._color2=null}},MQ.prototype.setArrowColor=function(t){try{this._acolor=mW(t)}catch($nt){this._acolor=null}},MQ.prototype.getColor=function(t,e){if(this._colorFn)return mW(this._colorFn(t,e));var i=this._color,n=this._color2||this._color;return"rgba("+ +Math.round(i[0]+(n[0]-i[0])*e)+","+Math.round(i[1]+(n[1]-i[1])*e)+","+Math.round(i[2]+(n[2]-i[2])*e)+","+(i[3]+(n[3]-i[3])*e)+")"},MQ.prototype.getArrow=function(){return this._arrow},MQ.prototype.setArrow=function(t){this._arrow=parseInt(t),(this._arrow<-1||this._arrow>2)&&(this._arrow=0)},MQ.prototype.getArrowSize=function(){return this._arrowSize||[16,16]},MQ.prototype.setArrowSize=function(t){Array.isArray(t)?this._arrowSize=t:"number"==typeof t&&(this._arrowSize=[t,t])},MQ.prototype.drawArrow=function(t,e,i,n,r){var s=this.getArrowSize()[0]*r,o=PQ(e,i),a=(e[0]-i[0])/o,l=(e[1]-i[1])/o;n=Math.max(this.getArrowSize()[1]/2,n/2)*r,t.beginPath(),t.moveTo(e[0],e[1]),t.lineTo(e[0]-s*a+n*l,e[1]-s*l-n*a),t.lineTo(e[0]-s*a-n*l,e[1]-s*l+n*a),t.lineTo(e[0],e[1]),t.fill()},MQ.prototype._render=function(t,e){if("LineString"===e.geometry.getType()){var i,n,r,s=e.context;if(!this._visible){var o=e.pixelRatio/e.resolution,a=Math.cos(e.rotation),l=Math.sin(e.rotation);n=e.geometry.getCoordinates();var c=t[0][0]-n[0][0]*o*a-n[0][1]*o*l,h=t[0][1]-n[0][0]*o*l+n[0][1]*o*a;for(t=[],i=0;r=n[i];i++)t[i]=[c+r[0]*o*a+r[1]*o*l,h+r[0]*o*l-r[1]*o*a,r[2]]}var u=this.getArrowSize()[0]*e.pixelRatio;s.save(),this.getOffset(0)&&this._splitAsize(t,this.getOffset(0)*e.pixelRatio),this.getOffset(1)&&this._splitAsize(t,this.getOffset(1)*e.pixelRatio,!0),t.length>1&&(-1===this.getArrow()||2===this.getArrow())&&(r=this._splitAsize(t,u),s.fillStyle=this._acolor?this._acolor:this.getColor(e.feature,0),this.drawArrow(s,r[0],r[1],this.getWidth(e.feature,0),e.pixelRatio)),t.length>1&&this.getArrow()>0&&(r=this._splitAsize(t,u,!0),s.fillStyle=this._acolor?this._acolor:this.getColor(e.feature,1),this.drawArrow(s,r[0],r[1],this.getWidth(e.feature,1),e.pixelRatio));var d=this._splitInto(t,255,2),p=0,f=d.length;if(s.lineJoin="round",s.lineCap=this._lineCap||"butt",d.length>1)for(p=0;p<d.length;p++){var m=p/f;for(n=d[p],s.lineWidth=this.getWidth(e.feature,m)*e.pixelRatio,s.strokeStyle=this.getColor(e.feature,m),s.beginPath(),s.moveTo(n[0][0],n[0][1]),i=1;r=n[i];i++)s.lineTo(r[0],r[1]);s.stroke()}s.restore()}},MQ.prototype._splitAsize=function(t,e,i){var n,r,s,o,a=0;for(n=s=i?t.pop():t.shift();t.length;){if(r=i?t.pop():t.shift(),a+(o=PQ(n,r))>e){o=PQ(n=[n[0]+(r[0]-n[0])*(e-a)/o,n[1]+(r[1]-n[1])*(e-a)/o],s),i?(t.push(r),t.push(n),t.push([n[0]+(s[0]-n[0])/o,n[1]+(s[1]-n[1])/o])):(t.unshift(r),t.unshift(n),t.unshift([n[0]+(s[0]-n[0])/o,n[1]+(s[1]-n[1])/o]));break}a+=o,n=r}return[s,n]},MQ.prototype._splitInto=function(t,e,i){var n,r,s,o=[],a=0;for(n=1;r=t[n];n++)a+=PQ(t[n-1],r);var l=Math.max(i||2,a/(e||255)),c=t[0];a=0;var h=[c];for(n=1,r=t[1];n<t.length;){var u=r[0]-c[0],d=r[1]-c[1];if(a+(s=Math.sqrt(u*u+d*d))>l){var p=(l-a)/s;h.push([c[0]+u*p,c[1]+d*p]),o.push(h),h=[c=[c[0]+u*p*.9,c[1]+d*p*.9]],a=0}else a+=s,h.push(c=r),r=t[++n]}return o.push(h),o};var TQ=MQ;const RQ=[13e3,12500,12e3,11500,11e3,10500,1e4,9500,9e3,8500,8500,7500,7e3,6500,6e3,5500,5e3,4500,4e3,3500,3e3,2500,2e3,1500,1200,1e3,800,600,400,300,200,100],VQ=["#ff0000","#ff00e4","#d800ff","#ae00ff","#9600ff","#7800ff","#6000ff","#4e00ff","#3600ff","#2400ff","#1200ff","#0000ff","#001eff","#0030ff","#0054ff","#0078ff","#0096ff","#00a8ff","#00c0ff","#00eaff","#00ffe4","#00ffd2","#00ff9c","#00ff72","#00ff36","#00ff0c","#1eff00","#42ff00","#ccff00","#f0ff00","#ffea00","#ffe062"],FQ=VQ.map(t=>CP(t));function LQ(t){return(t*=.3048)<=100?"#ffffff":VQ[RQ.findIndex(e=>e<t)]}class UQ extends pH{constructor(t,e,i,n){super({geometry:new kH([sE(t),sE(e)])}),super.setStyle(new TQ({color:LQ(i),color2:LQ(n),width:2}))}}class BQ extends pH{constructor(t){super({geometry:new jM(sE([t.lon,t.lat]))}),this.position=t;const[e,i,n]=(r=t.altitude,(r*=.3048)<=100?[255,255,255]:FQ[RQ.findIndex(t=>t<r)]);var r;this.set("red",e,!0),this.set("green",i,!0),this.set("blue",n,!0)}}class NQ extends pH{constructor(t,e){super({geometry:new jM(sE([t.lon,t.lat]))}),this.position=t;const i=iM[e];this.set("red",i[0],!0),this.set("green",i[1],!0),this.set("blue",i[2],!0)}}const jQ=eM.map(t=>new jZ({stroke:new VZ({color:t,width:2})})),zQ=eM.map(t=>new jZ({stroke:new VZ({color:t,lineDash:[5,15],width:2})}));class HQ extends pH{constructor(t,e,i){super({geometry:new kH([sE(t),sE(e)])}),super.setStyle(i)}}let KQ=(()=>{class t{constructor(t,e,i){this.eventsService=t,this.fleetsService=e,this.selectionService=i,this.trails$=new Av.a([]),Hg([this.eventsService.transhipmentTrail$,this.fleetsService.fleetTrails$,this.selectionService.trails$]).subscribe(([t,e,i])=>{this.trails$.next([t,...e,...i].filter(t=>!!t))})}clear(){this.trails$.next([])}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(IT),r.Zb(OT),r.Zb(xT))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),$Q=(()=>{class t extends LT{constructor(t,e,i,n,r,s){super(),this.interactionsService=t,this.mapConfigService=e,this.mapService=i,this.mapStateService=n,this.tooltipsService=r,this.trailsLayerService=s,this.pointerMoveSubscription=new ye.a,this.show=!1}ngOnInit(){this.ensureMandatoryInputParams("map"),this.positionsSource=new $q({features:[]}),this.positionsLayer=new EQ({source:this.positionsSource,style:{symbol:{symbolType:"circle",size:9,color:["color",["get","red"],["get","green"],["get","blue"]],offset:[0,0]}}}),this.positionsLayer.selectable=!0,this.map.addLayer(this.positionsLayer),this.trailSource=new $q({features:[],wrapX:!1}),this.trailsLayer=new Nq({source:this.trailSource,updateWhileAnimating:!0,updateWhileInteracting:!0}),this.map.addLayer(this.trailsLayer),this.subscriptions.push(this.mapStateService.featuresSelectable$.subscribe(t=>{this.positionsLayer.selectable=t})),this.subscriptions.push(this.mapStateService.showTrailsLayer$.subscribe(t=>{this.show=t,this.updatePositionsLayerVisibility(),this.trailsLayer.setVisible(this.show),this.show?this.pointerMoveSubscription=this.mapService.pointerMove$.subscribe(t=>{this.handleMoveEvent(t)}):this.pointerMoveSubscription.unsubscribe()})),this.subscriptions.push(this.trailsLayerService.trails$.pipe(mn((t,e)=>{return(i=t).length===(n=e).length&&i.every((t,e)=>t===n[e]);var i,n})).subscribe(t=>{const e=[],i=[];t.filter(t=>{var e;return!!(null===(e=t[0])||void 0===e?void 0:e.ship)}).forEach((t,n)=>{e.push(...t.map(t=>new NQ(t,n%eM.length))),i.push(...function(t,e){if(t.length<2)return[];const i=[];for(let n=1;n<t.length;n++){const r=t[n-1],s=t[n];i.push(new HQ([r.lon,r.lat],[s.lon,s.lat],(t[n-1].gap?zQ:jQ)[e%eM.length]))}return i}(t,n))}),t.filter(t=>{var e;return!!(null===(e=t[0])||void 0===e?void 0:e.aircraft)}).forEach((t,n)=>{e.push(...t.map(t=>new BQ(t))),i.push(...function(t,e){if(t.length<2)return[];const i=[];for(let n=1;n<t.length;n++){const e=t[n-1],r=t[n];i.push(new UQ([e.lon,e.lat],[r.lon,r.lat],e.altitude,r.altitude))}return i}(t))}),this.trailSource.clear(!0),this.positionsSource.clear(!0),this.trailSource.addFeatures(i),this.positionsSource.addFeatures(e)})),this.subscriptions.push(this.mapService.view$.subscribe(()=>{this.updatePositionsLayerVisibility()})),this.eventListeners.push(this.map.on("click",t=>this.handleClickEvent(t)))}ngOnDestroy(){super.ngOnDestroy(),this.map.removeLayer(this.positionsLayer),this.map.removeLayer(this.trailsLayer),this.pointerMoveSubscription.unsubscribe()}handleClickEvent(t){this.positionsLayer.selectable&&this.map.forEachFeatureAtPixel(t.pixel,t=>(t.position.ship?this.interactionsService.clickOnEntity(OP.ShipPosition,t.position):t.position.aircraft&&this.interactionsService.clickOnEntity(OP.AircraftPosition,t.position),!0),{hitTolerance:3,layerFilter:t=>t===this.positionsLayer})}handleMoveEvent(t){if(this.positionsLayer.selectable){let e=!1,i=!1;this.map.forEachFeatureAtPixel(t.pixel,t=>(t.position.ship?(e=!0,this.tooltipsService.hoverEntity(OP.ShipPosition,t.position)):t.position.aircraft&&(i=!0,this.tooltipsService.hoverEntity(OP.AircraftPosition,t.position)),!0),{hitTolerance:3,layerFilter:t=>t===this.positionsLayer}),e||this.tooltipsService.hoverEntity(OP.ShipPosition,null),i||this.tooltipsService.hoverEntity(OP.AircraftPosition,null)}}updatePositionsLayerVisibility(){const t=this.mapService.view$.value;this.positionsLayer.setVisible(this.show&&t&&(!this.mapConfigService.hidePositionsInLowZooms$.value||t.zoom>=8))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(ET),r.Pb(hI),r.Pb(pI),r.Pb(gT),r.Pb(kT),r.Pb(KQ))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-trails-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();class GQ{constructor(t){if(this.hexCode={0:"0000",1:"0001",2:"0010",3:"0011",4:"0100",5:"0101",6:"0110",7:"0111",8:"1000",9:"1001",a:"1010",b:"1011",c:"1100",d:"1101",e:"1110",f:"1111"},this.bits="",null!=t){15===t.length&&(this.bits+="0000");for(let e=0;e<t.length;e++)this.bits+=this.hexCode[t[e]]}}getLiteral(){const t=this.getLiteralArr();let e=`${t[0]}`;for(let i=1;i<t.length;i++)(i-1)%3==0&&(e+="-"),e+=`${t[i]}`;return e}getLiteralEdge(t){const e=this.getLiteralArr(),i=t.getLiteralArr();let n=`${e[0]}`;for(let r=1;r<e.length-1;r++)(r-1)%3==0&&(n+="-"),n+=`${e[r]}`;return n+=` / ${e[e.length-1]}-${i[i.length-1]}`,n}getLiteralArr(){const t=[];t.push(this.getFaceNb());for(let e=1;e<=15;e++){const i=this.getCellNb(e);7!==i&&t.push(i)}return t}getFaceNb(){let t="";for(let e=12;e<19;e++)t=this.bits[e]+t;return t=this.reverse(t),parseInt(t,2)}getCellNb(t){let e="";const i=16+3*t;for(let n=i;n<i+3;n++)e=this.bits[n]+e;return e=this.reverse(e),parseInt(e,2)}reverse(t){return t.split("").reverse().join("")}}function WQ(t){const e=t.getGeometry(),i=new VZ({color:PY[t.element.edge?t.element.res:t.element.res+1],lineCap:"square",width:4}),n=[new jZ({stroke:i})];return t.element.edge&&e.forEachSegment((e,r)=>{const s=Math.atan2(r[1]-e[1],r[0]-e[0]),o=5+10*Math.pow(12-t.element.res,2),a=new kH([r,[r[0]-o,r[1]+o]]);a.rotate(s,r);const l=new kH([r,[r[0]-o,r[1]-o]]);l.rotate(s,r),n.push(new jZ({geometry:a,stroke:i})),n.push(new jZ({geometry:l,stroke:i}))}),n}class ZQ extends pH{constructor(t,e){super({geometry:2===e.length?new kH(e):new iT(e)}),this.element=t,super.setStyle(WQ)}static New(t){return new ZQ(t,ZQ.PointsArr(t))}static PointsArr(t){let e=[];if(bP(t.h3index)){const i=gP(t.h3index),n=AP(t.h3index),r=dP(i),s=dP(n);t.edge=!0,t.lat=s[0],t.lon=s[1];const o=new GQ(i),a=new GQ(n);t.literal=o.getLiteralEdge(a),e.push(sE([r[1],r[0]])),e.push(sE([s[1],s[0]])),t.shift&&ZQ.shift(e,15-t.res)}else{const i=dP(t.h3index);t.edge=!1,t.lat=i[0],t.lon=i[1];const n=new GQ(t.h3index);t.literal=n.getLiteral(),e=[pP(t.h3index,!0).map(t=>sE(t))]}return e}static shift(t,e){const i=t[0],n=t[1],r=Math.atan2(n[1]-i[1],n[0]-i[0]),s=4*e,o=[Math.sin(r)*s+i[0],-Math.cos(r)*s+i[1]],a=[Math.sin(r)*s+n[0],-Math.cos(r)*s+n[1]];t[0]=o,t[1]=a}}class qQ{static reversedEdge(t){const e=vP(t);return i=e[0],r=(n=tP(e[1]))[0],s=n[1],o=tP(i),sP(WI.getH3UnidirectionalEdge(r,s,o[0],o[1]));var i,n,r,s,o}}let YQ=(()=>{class t extends LT{constructor(t,e,i,n,r,s){super(),this.h3TracesLayerService=t,this.interactionsService=e,this.tooltipsService=i,this.mapConfigService=n,this.mapService=r,this.mapStateService=s}ngOnInit(){this.ensureMandatoryInputParams("map"),this.h3ElementsSource=new $q({features:[]}),this.h3ElementsLayer=new Nq({source:this.h3ElementsSource,updateWhileAnimating:!0,updateWhileInteracting:!0}),this.h3ElementsLayer.selectable=!0,this.map.addLayer(this.h3ElementsLayer),this.subscriptions.push(this.mapStateService.featuresSelectable$.subscribe(t=>{this.h3ElementsLayer.selectable=t})),this.subscriptions.push(this.mapService.view$.subscribe(t=>{t&&this.h3ElementsLayer.setVisible(!this.mapConfigService.hidePositionsInLowZooms$.value||t.zoom>=8)})),this.subscriptions.push(this.h3TracesLayerService.trails$.subscribe(t=>{this.h3ElementsSource.clear(!0),this.mapConfigService.debugH3Trace$.value&&this.h3ElementsSource.addFeatures(t.map(QQ).flat())})),this.eventListeners.push(this.map.on("click",t=>{this.handleClickEvent(t)})),this.subscriptions.push(this.mapService.pointerMove$.subscribe(t=>{this.handleMoveEvent(t)}))}ngOnDestroy(){super.ngOnDestroy(),this.map.removeLayer(this.h3ElementsLayer)}handleClickEvent(t){this.h3ElementsLayer.selectable&&this.map.forEachFeatureAtPixel(t.pixel,t=>(this.interactionsService.clickOnEntity(OP.H3Element,t.element),!0),{hitTolerance:3,layerFilter:t=>t===this.h3ElementsLayer})}handleMoveEvent(t){this.h3ElementsLayer.selectable&&(this.map.forEachFeatureAtPixel(t.pixel,t=>(this.tooltipsService.hoverEntity(OP.H3Element,t.element),!0),{hitTolerance:3,layerFilter:t=>t===this.h3ElementsLayer})||this.tooltipsService.hoverEntity(OP.H3Element,null))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(GP),r.Pb(ET),r.Pb(kT),r.Pb(hI),r.Pb(pI),r.Pb(gT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-h3traces-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();function QQ(t){const e=t.elements,i=[],n={};for(let r=1;r<e.length;r++){const t=e[r];bP(t.h3index)&&(n[t.h3index]=1,n[qQ.reversedEdge(t.h3index)]&&(t.shift=!0)),i.push(ZQ.New(t))}return i}class XQ extends aQ{constructor(t,e){super(t,e)}prepareFrame(t){const e=this.getLayer(),i=e.getSource(),n=t.viewState,r=!t.viewHints[0]&&!t.viewHints[1],s=!RS(this.previousExtent_,t.extent),o=this.sourceRevision_<i.getRevision();return o&&(this.sourceRevision_=i.getRevision()),(r&&s||o)&&(clearTimeout(this.pendingBufferRefresh),this.pendingBufferRefresh=setTimeout(()=>{const r=n.projection,s=n.resolution,o=e instanceof HZ?e.getRenderBuffer():0,a=xS(t.extent,o*s);i.loadFeatures(a,s,r),this.rebuildBuffers_(t),this.previousExtent_=t.extent.slice()},300)),this.helper.makeProjectionTransform(t,this.currentTransform_),oM(this.currentTransform_,this.invertRenderTransform_),this.helper.useProgram(this.program_),this.helper.prepareDraw(t),this.helper.bindBuffer(this.verticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.attributes),!0}}var JQ=function(t){return t[t.Ship=0]="Ship",t[t.Point=1]="Point",t}({});const tX={aircraft:"/assets/images/aircraft.png",ship:"/assets/images/ship.png",point:"/assets/images/point.png"},eX={};let iX=(()=>{class t{init(){return Object(ue.a)(this,void 0,void 0,function*(){yield Promise.all(Object.entries(tX).map(([t,e])=>Object(ue.a)(this,void 0,void 0,function*(){eX[t]=yield function(t){return Object(ue.a)(this,void 0,void 0,function*(){return new Promise(e=>{const i=new Image;i.src=t,i.onload=()=>{e(i)}})})}(e)})))})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();class nX extends Nq{constructor(t){super(t)}createRenderer(){const t=new XQ(this,{attributes:[{name:"angle",callback:t=>t.ship.course},{name:"red",callback:t=>t.iconColor[0]},{name:"green",callback:t=>t.iconColor[1]},{name:"blue",callback:t=>t.iconColor[2]},{name:"alpha",callback:t=>t.ship.visible?t.ship.transparent?.5:1:0},{name:"iconKey",callback:t=>t.iconKey}],uniforms:{u_texture_point:eX.point,u_texture_ship:eX.ship,u_iconSize:12},vertexShader:"\nprecision mediump float;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_iconSize;\n\nattribute vec2 a_position;\nattribute float a_index;\nattribute float a_angle;\nattribute float a_red;\nattribute float a_green;\nattribute float a_blue;\nattribute float a_alpha;\nattribute float a_iconKey;\n\nvarying vec2 v_texCoord;\nvarying vec4 v_color;\nvarying float v_iconKey;\nvarying float v_alpha;\n\nvoid main(void) {\n vec2 size = vec2(u_iconSize);\n mat4 offsetMatrix = u_offsetScaleMatrix;\n vec2 offset = vec2(0.0);\n float offsetX = a_index == 0.0 || a_index == 3.0 ? offset.x - size.x / 2.0 : offset.x + size.x / 2.0;\n float offsetY = a_index == 0.0 || a_index == 1.0 ? offset.y - size.y / 2.0 : offset.y + size.y / 2.0;\n vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n\n vec4 texCoord = vec4(0.0, 0.0, 1.0, 1.0);\n float u = a_index == 0.0 || a_index == 3.0 ? texCoord.s : texCoord.q;\n float v = a_index == 2.0 || a_index == 3.0 ? texCoord.t : texCoord.p;\n v_texCoord = vec2(u, v);\n\n if (a_iconKey == 0.0) {\n vec2 rotationVector = vec2(sin(a_angle), cos(a_angle));\n vec2 centeredTexCoord = v_texCoord - 0.5;\n vec2 rotatedPosition = vec2(\n centeredTexCoord.x * rotationVector.y + centeredTexCoord.y * rotationVector.x,\n centeredTexCoord.y * rotationVector.y - centeredTexCoord.x * rotationVector.x\n ) + 0.5;\n v_texCoord = rotatedPosition;\n }\n\n v_color = vec4(a_red, a_green, a_blue, a_alpha);\n v_iconKey = a_iconKey;\n v_alpha = a_alpha;\n}\n",fragmentShader:"\nprecision mediump float;\n\nuniform sampler2D u_texture_ship;\nuniform sampler2D u_texture_point;\n\nvarying vec2 v_texCoord;\nvarying vec4 v_color;\nvarying float v_iconKey;\nvarying float v_alpha;\n\nvoid main(void) {\n if (v_alpha == 0.0) {\n discard;\n }\n vec4 textureColor;\n if (v_iconKey == 0.0) {\n textureColor = texture2D(u_texture_ship, v_texCoord);\n } else if (v_iconKey == 1.0) {\n textureColor = texture2D(u_texture_point, v_texCoord);\n } else {\n // error\n }\n gl_FragColor = v_color * textureColor;\n gl_FragColor.rgb *= gl_FragColor.a;\n}\n",hitVertexShader:"\nprecision mediump float;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_iconSize;\n\nattribute vec2 a_position;\nattribute float a_index;\nattribute vec4 a_hitColor;\nattribute float a_angle;\nattribute float a_iconKey;\nattribute float a_alpha;\n\nvarying vec2 v_texCoord;\nvarying vec4 v_hitColor;\nvarying float v_iconKey;\nvarying float v_alpha;\n\nvoid main(void) {\n float size = u_iconSize;\n mat4 offsetMatrix = u_offsetScaleMatrix;\n float offsetX = a_index == 0.0 || a_index == 3.0 ? -size / 2.0 : size / 2.0;\n float offsetY = a_index == 0.0 || a_index == 1.0 ? -size / 2.0 : size / 2.0;\n vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n\n vec4 texCoord = vec4(0.0, 0.0, 1.0, 1.0);\n float u = a_index == 0.0 || a_index == 3.0 ? texCoord.s : texCoord.q;\n float v = a_index == 2.0 || a_index == 3.0 ? texCoord.t : texCoord.p;\n v_texCoord = vec2(u, v);\n\n if (a_iconKey == 0.0) {\n vec2 rotationVector = vec2(sin(a_angle), cos(a_angle));\n vec2 centeredTexCoord = vec2(u, v) - 0.5;\n vec2 rotatedPosition = vec2(\n centeredTexCoord.x * rotationVector.y + centeredTexCoord.y * rotationVector.x,\n centeredTexCoord.y * rotationVector.y - centeredTexCoord.x * rotationVector.x\n ) + 0.5;\n v_texCoord = rotatedPosition;\n }\n\n v_hitColor = a_hitColor;\n v_iconKey = a_iconKey;\n v_alpha = a_alpha;\n}\n",hitFragmentShader:"\nprecision mediump float;\n\nuniform sampler2D u_texture_ship;\nuniform sampler2D u_texture_point;\n\nvarying vec2 v_texCoord;\nvarying vec4 v_hitColor;\nvarying float v_iconKey;\nvarying float v_alpha;\n\nvoid main(void) {\n if (v_alpha == 0.0) {\n discard;\n }\n vec4 textureColor;\n if (v_iconKey == 0.0) {\n textureColor = texture2D(u_texture_ship, v_texCoord);\n } else if (v_iconKey == 1.0) {\n textureColor = texture2D(u_texture_point, v_texCoord);\n } else {\n // error\n }\n if (textureColor.a < 0.1) {\n discard;\n }\n\n gl_FragColor = v_hitColor;\n}\n"});return t.renderDeclutter=function(){},t}disposeInternal(){this.renderer_.dispose(),super.disposeInternal()}}const rX=xP("#000000"),sX=xP("#f31717"),oX=xP("#fddb21"),aX=xP("#3fd830");class lX extends pH{constructor(t,e){super({geometry:new jM(sE(e>0?cX(t,e):[t.lon,t.lat]))}),this.ship=t}updateStyle(t){this.ship.visible?(this.iconColor=t.colorModeShipType?this.ship.shipType.rgbColor:this.ship.colorResultTimestamp>=t.absoluteImportantTimestamp?sX:this.ship.colorResultTimestamp>=t.absoluteMinimumTimestamp?oX:aX,this.iconKey=this.ship.stationary?JQ.Point:JQ.Ship):this.iconColor=rX}updateShip(t,e){e>0?this.extrapolatePosition(e):this.ship.lon!==t.lon&&this.ship.lat!==t.lat&&super.getGeometry().setCoordinates(sE([t.lon,t.lat])),this.ship=t}extrapolatePosition(t){t>0&&super.getGeometry().setCoordinates(sE(cX(this.ship,t)))}}function cX(t,e){const{lon:i,lat:n,course:r,numberSog:s,timestamp:o}=t,a=e-o;return a>0?function([t,e],i,n){let r=e*Math.PI/180,s=t*Math.PI/180;return r=Math.asin(Math.sin(r)*Math.cos(i/6378137)+Math.cos(r)*Math.sin(i/6378137)*Math.cos(n)),s+=Math.atan2(Math.sin(n)*Math.sin(i/6378137)*Math.cos(r),Math.cos(i/6378137)-Math.sin(r)*Math.sin(r)),[180*s/Math.PI,180*r/Math.PI]}([i,n],a*s/1.944,r):[i,n]}let hX=(()=>{class t{constructor(t,e,i){this.historyService=t,this.mapConfigService=e,this.uiService=i}registerVisibleAircraftsCallback(t){this.getVisibleAircraftsFn=t}registerVisibleShipsCallback(t){this.getVisibleShipsFn=t}exportVisiblePositions(){let t=this.historyService.timestamp$.value;0===t&&(t=NO(new Date));const e=FO(1e3*t,"yyyy-MM-dd'T'HH-mm-ss");let i=!1;const n=this.mapConfigService.showShipsLayer$.value;if(n){const t=this.getVisibleShipsFn();t.length&&(i=!0,YH(function(t){return[["timestamp","lon","lat","hdms","mmsi","imo","callsign","name","flag","cargo","type","length","width","draught","destination","departure","eta"].join(","),...t.map(t=>function(t){return[HO(1e3*t.timestamp),t.lon,t.lat,t.hdms,...QO(t)]}(t).join(","))].join("\n")}(t),`anais-pistes-ships-${e}.csv`,"text/csv"))}const r=this.mapConfigService.showAircraftsLayer$.value;if(r){const t=this.getVisibleAircraftsFn();t.length&&(i=!0,YH(function(t){return[["icao","callsign","squawk","timestamp","lon","lat","hdms","altitude"].join(","),...t.map(t=>function(t){return[t.icao,t.callsign,t.squawk,HO(t.timestamp),t.lon,t.lat,Yk([t.lon,t.lat]),t.altitude]}(t).join(","))].join("\n")}(t),`anais-pistes-aircrafts-${e}.csv`,"text/csv"))}if(!i){const t=[n&&"navire",r&&"a\xe9ronef"].filter(t=>!!t).join(" ou ")||"navire ou a\xe9ronef";this.uiService.error(`La vue courante ne contient aucun ${t}`)}}getEntitiesInExtent(t){const e=[];return this.mapConfigService.showShipsLayer$.value&&e.push(...this.getVisibleShipsFn(t)),this.mapConfigService.showAircraftsLayer$.value&&e.push(...this.getVisibleAircraftsFn(t)),e}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(bI),r.Zb(hI),r.Zb(VI))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),uX=(()=>{class t{constructor(t,e,i){this.fleetsService=t,this.mapConfigService=e,this.selectionService=i,this.selectedShips$=new Av.a([]),Hg([this.fleetsService.selectedFleet$.pipe(Object(Ge.a)(t=>t?t.ships:[])),this.selectionService.entities$.pipe(Object(Ge.a)(t=>t.filter(t=>!!t.entity&&t.type===OP.Ship).map(t=>t.entity)))]).subscribe(([t,e])=>{const i=[].concat(...t,...e);this.mapConfigService.updateSelectedShipsFilter(i.map(t=>t.mmsi)),this.selectedShips$.next(i)})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(OT),r.Zb(hI),r.Zb(xT))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),dX=(()=>{class t extends LT{constructor(t,e,i,n,r,s,o,a,l,c,h,u){super(),this.ngZone=t,this.configService=e,this.exportService=i,this.historyService=n,this.interactionsService=r,this.mapConfigService=s,this.mapService=o,this.mapStateService=a,this.selectedShipsService=l,this.shipsService=c,this.workerService=h,this.tooltipsService=u,this.shipFeaturesByArea=new Map,this.timestampByArea=new Map,this.oldTimestamp=-1,this.viewedAreas=[],this.chunkedFeedUpdateByArea=new Map,this.selectedShipsFeaturesByMMSI=new Map}ngOnInit(){this.ensureMandatoryInputParams("map"),this.source=new $q({features:[]}),this.layer=new nX({source:this.source,updateWhileAnimating:!0,updateWhileInteracting:!0}),this.layer.selectable=!0,this.map.addLayer(this.layer),this.layer.getRenderer().helper.getCanvas().addEventListener("webglcontextlost",t=>{throw new Error("Le contexte WebGL a \xe9t\xe9 perdu (les navires et avions ne sont plus affichables). Veuillez rafraichir l'onglet ou fermer puis r\xe9ouvrir votre navigateur.")},{once:!0});const t=this.layer.getRenderer().helper.uniforms_.find(t=>"u_iconSize"===t.name);this.subscriptions.push(this.mapService.view$.subscribe(e=>{if(!e)return;const i=Math.min(Math.round((e.zoom-4)/12*16+12),28);i!==t.value&&(t.value=i,this.layer.changed()),this.viewedAreas=DC(qD.fromOLExtent(this.mapService.view$.value.extent).toLatLonExtent()).map(t=>t.id)}),this.mapStateService.showShipsLayer$.subscribe(t=>{t||(this.shipFeaturesByArea.clear(),this.timestampByArea.clear(),this.source.clear(!0)),setTimeout(()=>{this.layer.setVisible(t)})}),this.mapStateService.showShipsLayer$.pipe(Gg(1),He(t=>t)).subscribe(()=>{this.source.addFeatures([...this.selectedShipsFeaturesByMMSI.values()])}),this.mapConfigService.manualMapFetch$.subscribe(()=>{this.shipFeaturesByArea.clear(),this.timestampByArea.clear(),this.source.clear(!0)}),this.mapStateService.featuresSelectable$.subscribe(t=>{this.layer.selectable=t}),this.mapConfigService.shipFilter$.subscribe(t=>{this.configService.devMode&&console.time(`ships-layer: update ${this.shipsService.shipsCount$.value} ship states`),this.source.forEachFeature(e=>{YO(e.ship,t),e.updateStyle(t)}),this.configService.devMode&&console.timeEnd(`ships-layer: update ${this.shipsService.shipsCount$.value} ship states`),this.shipFilter=t,this.source.changed()}),this.mapConfigService.enableHistoryModeExtrapolation$.subscribe(t=>{if(t&&this.historyService.timestamp$.value>0){const t=this.historyService.timestamp$.value;this.source.forEachFeature(e=>{e.ship.stationary||e.extrapolatePosition(t)})}else this.source.forEachFeature(t=>{const{lon:e,lat:i}=t.ship;t.setGeometry(new jM(sE([e,i])))});this.source.changed()}),this.historyService.timestamp$.subscribe(t=>{(0===t&&this.oldTimestamp>0||t>0&&0===this.oldTimestamp)&&(this.shipFeaturesByArea.clear(),this.timestampByArea.clear(),this.source.clear(!0),0===t&&this.oldTimestamp>0&&this.source.addFeatures([...this.selectedShipsFeaturesByMMSI.values()])),this.oldTimestamp=t}),this.mapConfigService.restrictedAreaLonLat$.subscribe(()=>{this.shipFeaturesByArea.clear(),this.timestampByArea.clear(),this.source.clear(!0)}),this.workerService.areaShipsFeeds$.subscribe(t=>{if(!t.chunked||t.start){const e=(this.shipFeaturesByArea.get(t.area.id)||[]).reduce((t,e)=>(t[e.ship.mmsi]=e,t),{});this.chunkedFeedUpdateByArea.set(t.area.id,{featuresByMMSI:e,additions:[],updates:[]})}const e=this.chunkedFeedUpdateByArea.get(t.area.id);let i=t.data;const n=!this.mapConfigService.manualMapFetch$.value&&this.mapConfigService.restrictedAreaLonLat$.value;if(n){const[t,e,r,s]=n;i=i.filter(i=>t<=i.lon&&i.lon<=r&&e<=i.lat&&i.lat<=s)}const r=this.mapConfigService.enableHistoryModeExtrapolation$.value&&this.historyService.timestamp$.value>0?this.historyService.timestamp$.value:0,s=[];i.filter(t=>t.lon).forEach(t=>{YO(t,this.shipFilter);let i=e.featuresByMMSI[t.mmsi];i?(i.updateShip(t,r),e.updates.push(i)):(i=new lX(t,r),s.push(i)),i.updateStyle(this.shipFilter),delete e.featuresByMMSI[t.mmsi]}),this.source.addFeatures(s),e.additions=e.additions.concat(s),t.chunked&&!t.end||(Object.values(e.featuresByMMSI).forEach(t=>{this.source.hasFeature(t)&&this.source.removeFeature(t)}),this.shipFeaturesByArea.set(t.area.id,e.updates.concat(e.additions)),this.timestampByArea.set(t.area.id,Date.now()),this.chunkedFeedUpdateByArea.delete(t.area.id),this.refreshTotalShipsCount())}),this.selectedShipsService.selectedShips$.subscribe(t=>{const e=this.historyService.timestamp$.value;if(e>0)return;const i=[],n=[],r=new Map;t.forEach(t=>{YO(t,this.shipFilter);let s=this.selectedShipsFeaturesByMMSI.get(t.mmsi);s?(s.updateShip(t,e),n.push(s)):(s=new lX(t,e),i.push(s)),r.set(t.mmsi,s),s.updateStyle(this.shipFilter),this.selectedShipsFeaturesByMMSI.delete(t.mmsi)}),[...this.selectedShipsFeaturesByMMSI.values()].forEach(t=>{this.source.hasFeature(t)&&this.source.removeFeature(t)}),this.source.addFeatures(i),this.selectedShipsFeaturesByMMSI=r})),this.eventListeners.push(this.map.on("click",t=>{this.ngZone.run(()=>{this.handleClickEvent(t)})})),this.subscriptions.push(Hg([this.mapService.view$.pipe(Gg(1),wm(500,Le,{leading:!1,trailing:!0})),this.mapConfigService.shipFilter$,this.workerService.areaShipsFeeds$.pipe(Be(300,on))]).subscribe(([t])=>{const e=this.source.getFeaturesInExtent(t.extent).filter(t=>t.ship.visible).map(t=>t.ship);if(e.length<200){const t=e.sort((t,e)=>t.mmsi<e.mmsi?-1:1);this.shipsService.shipsInView$.next(t)}else this.shipsService.shipsInView$.next([])}),this.mapService.pointerMove$.subscribe(t=>{this.handleMoveEvent(t)}),AT(6e4).pipe(He(()=>!this.mapConfigService.manualMapFetch$.value&&!this.historyService.timestamp$.value)).subscribe(()=>{const t=Date.now();for(const[e,i]of this.timestampByArea.entries())!this.viewedAreas.includes(e)&&i<t-18e4&&((this.shipFeaturesByArea.get(e)||[]).forEach(t=>{this.source.hasFeature(t)&&this.source.removeFeature(t)}),this.shipFeaturesByArea.delete(e),this.timestampByArea.delete(e))})),this.exportService.registerVisibleShipsCallback(t=>this.source.getFeaturesInExtent(null!=t?t:this.map.getView().calculateExtent()).map(t=>t.ship).filter(t=>t.visible))}ngOnDestroy(){super.ngOnDestroy(),this.map.removeLayer(this.layer)}handleClickEvent(t){this.layer.selectable&&this.map.forEachFeatureAtPixel(t.pixel,t=>(this.configService.devMode&&console.log("DEBUG: select ship",t.ship),this.interactionsService.clickOnEntity(OP.Ship,t.ship),!0),{hitTolerance:3,layerFilter:t=>t===this.layer})}handleMoveEvent(t){this.layer.selectable&&(this.map.forEachFeatureAtPixel(t.pixel,t=>(this.tooltipsService.hoverEntity(OP.Ship,t.ship),!0),{hitTolerance:3,layerFilter:t=>t===this.layer})||this.tooltipsService.hoverEntity(OP.Ship,null))}refreshTotalShipsCount(){let t=0;for(const e of this.shipFeaturesByArea.values())t+=e.length;this.shipsService.shipsCount$.next(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.B),r.Pb(cI),r.Pb(hX),r.Pb(bI),r.Pb(ET),r.Pb(hI),r.Pb(pI),r.Pb(gT),r.Pb(uX),r.Pb(wT),r.Pb(_I.a),r.Pb(kT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-ships-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();class pX extends pH{constructor(t){super({geometry:new jM(sE([t.lon,t.lat])),rotation:t.radiansTrack}),this.aircraft=t}updateAircraft(t){this.aircraft.lon!==t.lon&&this.aircraft.lat!==t.lat&&(super.getGeometry().setCoordinates(sE([t.lon,t.lat])),super.set("rotation",t.radiansTrack)),this.aircraft=t}}let fX=(()=>{class t{constructor(){this.aircraftsInView$=new Av.a([])}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),mX=(()=>{class t extends LT{constructor(t,e,i,n,r,s,o,a,l,c,h,u){super(),this.changeDetectorRef=t,this.ngZone=e,this.aircraftsService=i,this.configService=n,this.exportService=r,this.historyService=s,this.interactionsService=o,this.mapService=a,this.mapConfigService=l,this.mapStateService=c,this.tooltipsService=h,this.workerService=u,this.aircraftsFeaturesByArea=new Map,this.oldTimestamp=-1}ngOnInit(){this.ensureMandatoryInputParams("map"),this.changeDetectorRef.detach(),this.source=new $q({features:[]}),this.layer=new EQ({source:this.source,style:{symbol:{symbolType:"image",src:"assets/images/aircraft.png",size:["interpolate",["linear"],["zoom"],4,12,10,30],rotation:["get","rotation"],offset:[0,0]}}}),this.layer.selectable=!0,this.map.addLayer(this.layer),this.subscriptions.push(this.mapStateService.showAircraftsLayer$.subscribe(t=>{t||(this.aircraftsFeaturesByArea.clear(),this.source.clear(!0)),setTimeout(()=>{this.layer.setVisible(t)})}),this.mapConfigService.manualMapFetch$.subscribe(()=>{this.aircraftsFeaturesByArea.clear(),this.source.clear(!0)}),this.mapStateService.featuresSelectable$.subscribe(t=>{this.layer.selectable=t}),this.historyService.timestamp$.subscribe(t=>{(0===t&&this.oldTimestamp>0||t>0&&0===this.oldTimestamp)&&(this.aircraftsFeaturesByArea.clear(),this.source.clear(!0)),this.oldTimestamp=t}),this.mapConfigService.restrictedAreaLonLat$.subscribe(()=>{this.aircraftsFeaturesByArea.clear(),this.source.clear(!0)}),this.workerService.areaAircraftsFeeds$.subscribe(t=>{const e=(this.aircraftsFeaturesByArea.get(t.area.id)||[]).reduce((t,e)=>(t[e.aircraft.icao]=e,t),{}),i=[],n=[];let r=t.data;const s=!this.mapConfigService.manualMapFetch$.value&&this.mapConfigService.restrictedAreaLonLat$.value;if(s){const[t,e,i,n]=s;r=r.filter(r=>t<=r.lon&&r.lon<=i&&e<=r.lat&&r.lat<=n)}r.forEach(t=>{let r=e[t.icao];r?(r.updateAircraft(t),n.push(r)):(r=new pX(t),i.push(r)),delete e[t.icao]}),Object.values(e).forEach(t=>{this.source.hasFeature(t)&&this.source.removeFeature(t)}),this.source.addFeatures(i),this.aircraftsFeaturesByArea.set(t.area.id,n.concat(i)),this.source.changed()})),this.eventListeners.push(this.map.on("click",t=>{this.ngZone.run(()=>{this.handleClickEvent(t)})})),this.subscriptions.push(Hg([this.mapService.view$.pipe(Gg(1),wm(500,Le,{leading:!1,trailing:!0})),this.workerService.areaAircraftsFeeds$.pipe(Be(16))]).subscribe(([t])=>{const e=this.source.getFeaturesInExtent(t.extent).filter(t=>t.aircraft.visible).map(t=>t.aircraft);if(e.length<200){const t=e.sort((t,e)=>t.icao<e.icao?-1:1);this.aircraftsService.aircraftsInView$.next(t)}else this.aircraftsService.aircraftsInView$.next([])}),this.mapService.pointerMove$.subscribe(t=>{this.handleMoveEvent(t)})),this.exportService.registerVisibleAircraftsCallback(t=>this.source.getFeaturesInExtent(null!=t?t:this.map.getView().calculateExtent()).map(t=>t.aircraft).filter(t=>t.visible))}ngOnDestroy(){super.ngOnDestroy(),this.map.removeLayer(this.layer)}handleClickEvent(t){this.layer.selectable&&this.map.forEachFeatureAtPixel(t.pixel,t=>(this.configService.devMode&&console.log("DEBUG: select aircraft",JSON.stringify(t.aircraft,null,2)),this.interactionsService.clickOnEntity(OP.Aircraft,t.aircraft),!0),{hitTolerance:3,layerFilter:t=>t===this.layer})}handleMoveEvent(t){this.layer.selectable&&(this.map.forEachFeatureAtPixel(t.pixel,t=>(this.tooltipsService.hoverEntity(OP.Aircraft,t.aircraft),!0),{hitTolerance:3,layerFilter:t=>t===this.layer})||this.tooltipsService.hoverEntity(OP.Aircraft,null))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(r.B),r.Pb(fX),r.Pb(cI),r.Pb(hX),r.Pb(bI),r.Pb(ET),r.Pb(pI),r.Pb(hI),r.Pb(gT),r.Pb(kT),r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-aircrafts-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2}),t})();class gX extends pH{constructor(t){super({geometry:new jM(sE([t.lon,t.lat]))}),this.alert=t,this.set("red",t.rgbVecColor[0],!0),this.set("green",t.rgbVecColor[1],!0),this.set("blue",t.rgbVecColor[2],!0)}}let AX=(()=>{class t{constructor(t,e,i){this.alertsService=t,this.fleetsService=e,this.selectionService=i,this.alerts$=new Av.a([]),Hg([this.alertsService.alerts$,this.fleetsService.fleetAlerts$,this.selectionService.alerts$]).subscribe(([t,e,i])=>{this.alerts$.next([...t,...e,...i])})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(IP),r.Zb(OT),r.Zb(xT))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),bX=(()=>{class t extends LT{constructor(t,e,i,n,r,s){super(),this.ngZone=t,this.alertsLayerService=e,this.interactionsService=i,this.mapService=n,this.mapStateService=r,this.tooltipsService=s}ngOnInit(){this.ensureMandatoryInputParams("map"),this.source=new $q({features:[]}),this.layer=new EQ({source:this.source,style:{symbol:{symbolType:"triangle",size:18,color:["color",["get","red"],["get","green"],["get","blue"]],offset:[0,0]}}}),this.layer.selectable=!0,this.map.addLayer(this.layer),this.subscriptions.push(this.mapStateService.featuresSelectable$.subscribe(t=>{this.layer.selectable=t})),this.subscriptions.push(this.alertsLayerService.alerts$.subscribe(t=>{const e=t.map(t=>new gX(t));this.source.clear(!0),this.source.addFeatures(e)}),this.mapStateService.showAlertsLayer$.subscribe(t=>{this.layer.setVisible(t)})),this.eventListeners.push(this.map.on("click",t=>{this.ngZone.run(()=>{this.handleClickEvent(t)})})),this.subscriptions.push(this.mapService.pointerMove$.subscribe(t=>{this.handleMoveEvent(t)}))}ngOnDestroy(){super.ngOnDestroy(),this.map.removeLayer(this.layer)}handleClickEvent(t){this.layer.selectable&&this.map.forEachFeatureAtPixel(t.pixel,t=>(this.interactionsService.clickOnEntity(OP.Alert,t.alert),!0),{layerFilter:t=>t===this.layer})}handleMoveEvent(t){this.layer.selectable&&(this.map.forEachFeatureAtPixel(t.pixel,t=>(this.tooltipsService.hoverEntity(OP.Alert,t.alert),!0),{hitTolerance:3,layerFilter:t=>t===this.layer})||this.tooltipsService.hoverEntity(OP.Alert,null))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.B),r.Pb(AX),r.Pb(ET),r.Pb(pI),r.Pb(gT),r.Pb(kT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-alerts-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();const vX=VP.reduce((t,e)=>(t[e.key]=CP(e.color),t),{}),_X=CP("grey");class yX extends pH{constructor(t){super({geometry:new jM(sE([t.lon,t.lat]))}),this.event=t;const e=vX[t.type]||_X;this.set("red",e[0],!0),this.set("green",e[1],!0),this.set("blue",e[2],!0)}static New(t){return new yX(t)}}let wX=(()=>{class t extends LT{constructor(t,e,i,n,r,s){super(),this.ngZone=t,this.eventsLayerService=e,this.interactionsService=i,this.mapService=n,this.mapStateService=r,this.tooltipsService=s}ngOnInit(){this.ensureMandatoryInputParams("map"),this.source=new $q({features:[]}),this.layer=new EQ({source:this.source,style:{symbol:{symbolType:"circle",size:9,color:["color",["get","red"],["get","green"],["get","blue"]],offset:[0,0]}}}),this.layer.selectable=!0,this.map.addLayer(this.layer),this.subscriptions.push(this.mapStateService.featuresSelectable$.subscribe(t=>{this.layer.selectable=t})),this.subscriptions.push(this.eventsLayerService.events$.subscribe(t=>{const e=t.map(yX.New);this.source.clear(!0),this.source.addFeatures(e)}),this.mapStateService.showEventsLayer$.subscribe(t=>{this.layer.setVisible(t)})),this.eventListeners.push(this.map.on("click",t=>{this.ngZone.run(()=>{this.handleClickEvent(t)})})),this.subscriptions.push(this.mapService.pointerMove$.subscribe(t=>{this.handleMoveEvent(t)}))}ngOnDestroy(){super.ngOnDestroy(),this.map.removeLayer(this.layer)}handleClickEvent(t){this.layer.selectable&&this.map.forEachFeatureAtPixel(t.pixel,t=>(this.interactionsService.clickOnEntity(OP.Event,t.event),!0),{hitTolerance:3,layerFilter:t=>t===this.layer})}handleMoveEvent(t){this.layer.selectable&&(this.map.forEachFeatureAtPixel(t.pixel,t=>(this.tooltipsService.hoverEntity(OP.Event,t.event),!0),{hitTolerance:3,layerFilter:t=>t===this.layer})||this.tooltipsService.hoverEntity(OP.Event,null))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.B),r.Pb($P),r.Pb(ET),r.Pb(pI),r.Pb(gT),r.Pb(kT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-events-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();const xX=nM.map(t=>new jZ({stroke:new VZ({color:t,width:1}),fill:new RZ({color:`${t}1a`})})),CX=new jZ({text:new cY({font:"11px Calibri,sans-serif",fill:new RZ({color:"#000"}),stroke:new VZ({color:"#fff",width:3})})});let SX=(()=>{class t extends LT{constructor(t,e,i){super(),this.mapService=t,this.mapStateService=e,this.portsService=i,this.portsZones=[]}ngOnInit(){this.ensureMandatoryInputParams("map"),this.source=new $q({features:[]}),this.layer=new Nq({source:this.source,updateWhileAnimating:!0,updateWhileInteracting:!0,zIndex:1,visible:!1}),this.map.addLayer(this.layer),this.subscriptions.push(Hg([this.mapStateService.showPortsLayer$,this.mapService.view$]).pipe(Object(Ge.a)(([t,e])=>t&&e&&e.zoom>=11),mn()).subscribe(t=>{this.layer.setVisible(t)}),this.portsService.ports$.subscribe(t=>{this.portsZones=t.map(t=>({name:`${t.label} - ${t.iso3}\n${t.sourcesLabels}`,h3indexes:t.h3indexes})),this.source.clear(!0),this.source.addFeatures(this.portsZones.map((t,e)=>{const i=new BY(t);return i.setStyle(function(){return CX.getText().setText(t.name),[xX[e%xX.length],CX]}),i}))}))}ngOnDestroy(){super.ngOnDestroy(),this.map.removeLayer(this.layer)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(pI),r.Pb(gT),r.Pb(TT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-ports-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();var kX=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),EX=function(t){function e(e){var i=t.call(this)||this;i.options=e,i.id=e.id,i.insertFirst=void 0===e.insertFirst||e.insertFirst,i.stopEvent=void 0===e.stopEvent||e.stopEvent,i.element=document.createElement("div"),i.element.className=void 0!==e.className?e.className:"ol-overlay-container ol-selectable",i.element.style.position="absolute",i.element.style.pointerEvents="auto";var n=e.autoPan;return n&&"object"!=typeof n&&(n={animation:e.autoPanAnimation,margin:e.autoPanMargin}),i.autoPan=n||!1,i.rendered={transform_:"",visible:!0},i.mapPostrenderListenerKey=null,i.addEventListener(UE("element"),i.handleElementChanged),i.addEventListener(UE("map"),i.handleMapChanged),i.addEventListener(UE("offset"),i.handleOffsetChanged),i.addEventListener(UE("position"),i.handlePositionChanged),i.addEventListener(UE("positioning"),i.handlePositioningChanged),void 0!==e.element&&i.setElement(e.element),i.setOffset(void 0!==e.offset?e.offset:[0,0]),i.setPositioning(void 0!==e.positioning?e.positioning:"top-left"),void 0!==e.position&&i.setPosition(e.position),i}return kX(e,t),e.prototype.getElement=function(){return this.get("element")},e.prototype.getId=function(){return this.id},e.prototype.getMap=function(){return this.get("map")},e.prototype.getOffset=function(){return this.get("offset")},e.prototype.getPosition=function(){return this.get("position")},e.prototype.getPositioning=function(){return this.get("positioning")},e.prototype.handleElementChanged=function(){gS(this.element);var t=this.getElement();t&&this.element.appendChild(t)},e.prototype.handleMapChanged=function(){this.mapPostrenderListenerKey&&(mS(this.element),ik(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);var t=this.getMap();if(t){this.mapPostrenderListenerKey=tk(t,"postrender",this.render,this),this.updatePixelPosition();var e=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?e.insertBefore(this.element,e.childNodes[0]||null):e.appendChild(this.element),this.performAutoPan()}},e.prototype.render=function(){this.updatePixelPosition()},e.prototype.handleOffsetChanged=function(){this.updatePixelPosition()},e.prototype.handlePositionChanged=function(){this.updatePixelPosition(),this.performAutoPan()},e.prototype.handlePositioningChanged=function(){this.updatePixelPosition()},e.prototype.setElement=function(t){this.set("element",t)},e.prototype.setMap=function(t){this.set("map",t)},e.prototype.setOffset=function(t){this.set("offset",t)},e.prototype.setPosition=function(t){this.set("position",t)},e.prototype.performAutoPan=function(){this.autoPan&&this.panIntoView(this.autoPan)},e.prototype.panIntoView=function(t){var e=this.getMap();if(e&&e.getTargetElement()&&this.get("position")){var i=this.getRect(e.getTargetElement(),e.getSize()),n=this.getElement(),r=this.getRect(n,[dS(n),pS(n)]),s=t||{},o=void 0===s.margin?20:s.margin;if(!ES(i,r)){var a=r[0]-i[0],l=i[2]-r[2],c=r[1]-i[1],h=i[3]-r[3],u=[0,0];if(a<0?u[0]=a-o:l<0&&(u[0]=Math.abs(l)+o),c<0?u[1]=c-o:h<0&&(u[1]=Math.abs(h)+o),0!==u[0]||0!==u[1]){var d=e.getView().getCenterInternal(),p=e.getPixelFromCoordinateInternal(d);if(!p)return;var f=[p[0]+u[0],p[1]+u[1]],m=s.animation||{};e.getView().animateInternal({center:e.getCoordinateFromPixelInternal(f),duration:m.duration,easing:m.easing})}}}},e.prototype.getRect=function(t,e){var i=t.getBoundingClientRect(),n=i.left+window.pageXOffset,r=i.top+window.pageYOffset;return[n,r,n+e[0],r+e[1]]},e.prototype.setPositioning=function(t){this.set("positioning",t)},e.prototype.setVisible=function(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)},e.prototype.updatePixelPosition=function(){var t=this.getMap(),e=this.getPosition();if(t&&t.isRendered()&&e){var i=t.getPixelFromCoordinate(e),n=t.getSize();this.updateRenderedPosition(i,n)}else this.setVisible(!1)},e.prototype.updateRenderedPosition=function(t,e){var i=this.element.style,n=this.getOffset(),r=this.getPositioning();this.setVisible(!0);var s="0%",o="0%";"bottom-right"==r||"center-right"==r||"top-right"==r?s="-100%":"bottom-center"!=r&&"center-center"!=r&&"top-center"!=r||(s="-50%"),"bottom-left"==r||"bottom-center"==r||"bottom-right"==r?o="-100%":"center-left"!=r&&"center-center"!=r&&"center-right"!=r||(o="-50%");var a="translate("+s+", "+o+") translate("+Math.round(t[0]+n[0])+"px, "+Math.round(t[1]+n[1])+"px)";this.rendered.transform_!=a&&(this.rendered.transform_=a,i.transform=a,i.msTransform=a)},e.prototype.getOptions=function(){return this.options},e}(BE);class DX extends pH{constructor(t){super({id:t.mmsi,geometry:new jM(sE(t.position))}),this.positionIndex=0,this.ship=t,this.setStyle(new jZ({image:new Pq({src:"/assets/images/ship.png",rotation:t.course,opacity:t.visible?1:0,color:t.shipType.color})}))}}const IX=["root"],PX=["*"];function OX(t,e){const i=t.getBoundingClientRect(),n=i.left+window.pageXOffset,r=i.top+window.pageYOffset;return[n,r,n+e[0],r+e[1]]}let MX=(()=>{class t{constructor(){this.positioning="bottom-center",this.className="",this.offset=[0,-20],this.stopEvent=!0,this.autoPositioning=!1,this.opacity=1}ngOnInit(){this.overlay=new EX({element:this.rootElement.nativeElement,positioning:this.positioning,offset:this.offset,stopEvent:this.stopEvent,insertFirst:!1,className:`ol-overlay-container ol-selectable ${this.className} ${this.autoPositioning?"overlay-hidden":"overlay-positioning-bottom-center"}`,position:sE([this.longitude,this.latitude])}),this.map.addOverlay(this.overlay),this.autoPositioning&&setTimeout(()=>{this.updatePositioning(),this.overlay.getElement().parentElement.classList.remove("overlay-hidden")})}ngOnChanges(t){this.overlay&&(t.positioning&&this.overlay.setPositioning(this.positioning),t.offset&&this.overlay.setOffset(this.offset),(t.latitude||t.longitude)&&this.overlay.setPosition(sE([this.longitude,this.latitude])))}ngOnDestroy(){this.map.removeOverlay(this.overlay)}updatePositioning(){if(!this.map||!this.map.getTargetElement())return;const t=OX(this.map.getTargetElement(),this.map.getSize()),e=this.overlay.getElement(),i=OX(e,[dS(e),pS(e)]);if(ES(t,i))this.overlay.getElement().parentElement.classList.add("overlay-positioning-bottom-center");else{const e=i[0]-t[0],n=t[2]-i[2],r=i[1]-t[1],s=t[3]-i[3],o=[0,0];e<0?o[0]=e-20:n<0&&(o[0]=Math.abs(n)+20),r<0?o[1]=r-20:s<0&&(o[1]=Math.abs(s)+20);let a="bottom",l="center",c=0,h=0;if(0!==o[0]){if(a="center",0===o[1]){const e=i[3]-i[1];i[3]+e/2+20>=t[3]&&(o[1]=e/2)}o[0]>0?(l="right",h=-20):(l="left",h=20)}0!==o[1]&&(o[1]>0?(a="bottom",c=-20):(a="top",c=20));const u=`${a}-${l}`;this.overlay.setPositioning(u),this.overlay.setOffset([h,c]),this.overlay.getElement().parentElement.classList.add(`overlay-positioning-${u}`)}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-map-tooltip"]],viewQuery:function(t,e){if(1&t&&r.Pc(IX,3),2&t){let t;r.vc(t=r.dc())&&(e.rootElement=t.first)}},inputs:{map:"map",latitude:"latitude",longitude:"longitude",positioning:"positioning",className:"className",offset:"offset",stopEvent:"stopEvent",autoPositioning:"autoPositioning",opacity:"opacity"},features:[r.Bb],ngContentSelectors:PX,decls:3,vars:2,consts:[["root",""]],template:function(t,e){1&t&&(r.mc(),r.Vb(0,"div",null,0),r.lc(2),r.Ub()),2&t&&r.Fc("opacity",e.opacity)},styles:[".overlay-hidden{opacity:0}"],encapsulation:2,changeDetection:0}),t})();const TX=function(t){return{transform:t}};let RX=(()=>{class t extends LT{constructor(t){super(),this.mapConfigService=t,this.hdms=""}ngOnInit(){this.ensureMandatoryInputParams("ship","animationTimestamp")}ngOnChanges(t){this.hdms=Yk(this.ship.position)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-playback-ship-tooltip"]],inputs:{ship:"ship",animationTimestamp:"animationTimestamp"},features:[r.Ab,r.Bb],decls:48,vars:20,consts:[[1,"ship-tooltip"],[1,"ship-tooltip__header"],[1,"ship-tooltip__flag",3,"flag"],[1,"ship-tooltip__title"],[1,"ship-tooltip__name"],[1,"ship-tooltip__type"],[1,"ship-tooltip__row"],[1,"ship-tooltip__info-cell"],[1,"ship-tooltip__info-label"],[3,"vertical"],[1,"d-flex-center"],[1,"ship-tooltip__course-icon",3,"ngStyle"],[1,"ship-tooltip__footer"],[1,"ship-tooltip__signal-label"],[1,"u-flex"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Qb(2,"app-flag",2),r.Vb(3,"div",3),r.Vb(4,"strong",4),r.Kc(5),r.Ub(),r.Vb(6,"small",5),r.Kc(7),r.Ub(),r.Ub(),r.Ub(),r.Vb(8,"div",6),r.Vb(9,"div",7),r.Vb(10,"div",8),r.Kc(11,"MMSI"),r.Ub(),r.Vb(12,"strong"),r.Kc(13),r.Ub(),r.Ub(),r.Qb(14,"mat-divider",9),r.Vb(15,"div",7),r.Vb(16,"div",8),r.Kc(17,"IMO"),r.Ub(),r.Vb(18,"strong"),r.Kc(19),r.Ub(),r.Ub(),r.Qb(20,"mat-divider",9),r.Vb(21,"div",7),r.Vb(22,"div",8),r.Kc(23,"Callsign"),r.Ub(),r.Vb(24,"strong"),r.Kc(25),r.Ub(),r.Ub(),r.Ub(),r.Qb(26,"mat-divider"),r.Vb(27,"div",6),r.Vb(28,"div",7),r.Vb(29,"div",8),r.Kc(30,"Vitesse / Cap"),r.Ub(),r.Vb(31,"strong",10),r.Kc(32),r.Vb(33,"mat-icon",11),r.Kc(34,"arrow_right_alt"),r.Ub(),r.Ub(),r.Ub(),r.Qb(35,"mat-divider",9),r.Vb(36,"div",7),r.Vb(37,"div",8),r.Kc(38,"Position"),r.Ub(),r.Vb(39,"strong"),r.Kc(40),r.Ub(),r.Ub(),r.Ub(),r.Vb(41,"div",12),r.Vb(42,"span",13),r.Kc(43,"R\xe9ception (estim\xe9e) :\xa0"),r.Ub(),r.Vb(44,"strong",14),r.Vb(45,"span"),r.Kc(46),r.hc(47,"date"),r.Ub(),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(2),r.nc("flag",e.ship.country.flag),r.Db(3),r.Lc(e.ship.name||"?"),r.Db(2),r.Lc(e.ship.shipType.label),r.Db(6),r.Lc(e.ship.mmsi),r.Db(1),r.nc("vertical",!0),r.Db(5),r.Lc(e.ship.imo||"?"),r.Db(1),r.nc("vertical",!0),r.Db(5),r.Lc(e.ship.callsign||"?"),r.Db(7),r.Nc(" ",e.ship.speed," kt / ",(180*e.ship.course/3.14159).toFixed(0),"\xb0 "),r.Db(1),r.nc("ngStyle",r.sc(18,TX,"rotate("+(e.ship.course-1.570795)+"rad)")),r.Db(2),r.nc("vertical",!0),r.Db(5),r.Lc(e.hdms),r.Db(6),r.Lc(r.kc(47,14,1e3*e.animationTimestamp,"yyyy-MM-dd HH:mm:ss z",e.mapConfigService.useUTCDates$.value&&"z")))},directives:[GF,GT,Yp,bt],pipes:[kt],styles:['.ship-tooltip[_ngcontent-%COMP%]{min-width:320px;background-color:#e7ecf0;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2);border-radius:2px}.ship-tooltip[_ngcontent-%COMP%]:after{content:" ";position:absolute;border:12px solid transparent;pointer-events:none}.ship-tooltip__header[_ngcontent-%COMP%]{background-color:#cdd1d4;display:flex}.ship-tooltip__move-icon[_ngcontent-%COMP%]{cursor:move}.ship-tooltip__link[_ngcontent-%COMP%]{flex:1;padding:0;line-height:inherit;text-align:inherit;font-size:inherit;font-weight:inherit}.ship-tooltip__link[_ngcontent-%COMP%] .mat-button-wrapper{display:flex}.ship-tooltip__flag[_ngcontent-%COMP%]{margin:5px}.ship-tooltip__title[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:5px 0;flex:1}.ship-tooltip__name[_ngcontent-%COMP%]{font-size:1.2em}.ship-tooltip__type[_ngcontent-%COMP%]{font-size:.9em;color:#555}.ship-tooltip__row[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;font-size:.9em}.ship-tooltip__info-cell[_ngcontent-%COMP%]{padding:.4em;text-align:center}.ship-tooltip__info-label[_ngcontent-%COMP%]{color:grey;font-weight:500;padding-bottom:.2em}.ship-tooltip__course-icon[_ngcontent-%COMP%]{line-height:.7em;height:.7em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ship-tooltip__footer[_ngcontent-%COMP%]{background-color:#cdd1d4;padding-left:.4em;display:flex;align-items:center;font-size:.85em;line-height:36px}.ship-tooltip__signal-label[_ngcontent-%COMP%]{font-weight:500;color:#595959} .overlay-positioning-center-right .ship-tooltip:after{top:50%;left:100%;margin-top:-12px;border-left-color:#cdd1d4} .overlay-positioning-center-left .ship-tooltip:after{top:50%;right:100%;margin-top:-12px;border-right-color:#cdd1d4} .overlay-positioning-bottom-center .ship-tooltip:after{top:100%;left:50%;margin-left:-12px;border-top-color:#cdd1d4} .overlay-positioning-top-center .ship-tooltip:after{bottom:100%;left:50%;margin-left:-12px;border-bottom-color:#cdd1d4}'],changeDetection:0}),t})();function VX(t,e){if(1&t&&(r.Vb(0,"app-map-tooltip",1),r.Qb(1,"app-playback-ship-tooltip",2),r.Ub()),2&t){const t=r.gc();r.nc("map",t.map)("latitude",t.hoveredPosition[1])("longitude",t.hoveredPosition[0])("stopEvent",!1)("autoPositioning",!0),r.Db(1),r.nc("ship",t.hoveredShip)("animationTimestamp",t.animationTimestamp)}}let FX=(()=>{class t extends LT{constructor(t,e,i,n){super(),this.ngZone=t,this.elementRef=e,this.mapService=i,this.playbackService=n,this.hoveredShip=null,this.animationTimestamp=-1,this.hoveredPosition=null,this.featuresByMMSI={},this.layerRenderListener=null}ngOnInit(){this.ensureMandatoryInputParams("map"),this.source=new $q({features:[],useSpatialIndex:!1}),this.layer=new Nq({source:this.source,updateWhileAnimating:!0,updateWhileInteracting:!0}),this.map.addLayer(this.layer),this.overlay=new EX({element:this.elementRef.nativeElement,positioning:"bottom-center",offset:[0,-20],stopEvent:!0,insertFirst:!1,className:"ol-overlay-container ol-selectable hover-tooltip mat-elevation-z16 overlay-positioning-bottom-center"}),this.map.addOverlay(this.overlay),this.subscriptions.push(Hg([this.playbackService.active$,this.playbackService.shipsByMMSI$.pipe(Object(Ge.a)(t=>!!t))]).pipe(Be(16),Object(Ge.a)(([t,e])=>t&&!e),mn()).subscribe(t=>{t?(this.bboxFeature=new pH(new DH([])),this.updateBboxFeatureGeometry(),this.source.addFeature(this.bboxFeature),this.layerRenderListener=this.layer.on("prerender",()=>{this.updateBboxFeatureGeometry()})):this.bboxFeature&&(this.source.removeFeature(this.bboxFeature),this.bboxFeature=null,ME(this.layerRenderListener))}),this.playbackService.shipsByMMSI$.subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){if(!t)return this.featuresByMMSI={},this.source.clear(!0),this.bboxFeature=null,void ME(this.layerRenderListener);this.bboxFeature&&(this.source.removeFeature(this.bboxFeature),this.bboxFeature=null,ME(this.layerRenderListener));const e=Object.values(t).filter(t=>!this.featuresByMMSI[t.mmsi]).map(t=>this.featuresByMMSI[t.mmsi]=new DX(t));this.source.addFeatures(e)})),this.playbackService.animationTimestamp$.subscribe(t=>{this.animationTimestamp=t,this.source.forEachFeature(t=>{t.getGeometry().setCoordinates(sE(t.ship.position)),t.getStyle().getImage().setRotation(t.ship.course),t.getStyle().getImage().setOpacity(t.ship.visible?1:0)}),this.source.changed(),this.hoveredShip&&(this.hoveredPosition=this.hoveredShip.position)}),this.mapService.pointerMove$.subscribe(t=>{this.ngZone.run(()=>{this.handleMoveEvent(t)})}))}ngOnDestroy(){super.ngOnDestroy(),this.hoveredShip=null,this.map.removeOverlay(this.overlay),this.map.removeLayer(this.layer),ME(this.layerRenderListener)}handleMoveEvent(t){this.map.forEachFeatureAtPixel(t.pixel,t=>(this.hoveredShip=t.ship,this.hoveredPosition=oE(t.getGeometry().getCoordinates()),!0),{hitTolerance:3,layerFilter:t=>t===this.layer})||(this.hoveredShip=null)}updateBboxFeatureGeometry(){const t=this.getRestrictedBoundingBox(),e=aT(t.getPolygon()).map(t=>sE(t));(function(t,e){if(t.length!==e.length)return!1;for(let i=0;i<t.length;i++)if(t[i][0]!==e[i][0]||t[i][1]!==e[i][1])return!1;return!0})(this.bboxFeature.getGeometry().getCoordinates()[0]||[],e)||(this.bboxFeature.getGeometry().setCoordinates([e]),this.playbackService.updateViewBox(t.toLatLonExtent()))}getRestrictedBoundingBox(){const t=hZ.fromOLView(this.map.getView()),e=Math.min(t.extent[2]-t.extent[0],sE([20,0])[0])/2,i=t.center[0]-e,n=t.center[0]+e,r=Math.min(t.extent[3]-t.extent[1],function(t){const[,e]=oE(t.center),[,i]=sE([0,e+7.5]),[,n]=sE([0,e-7.5]);return i-n}(t))/2;return qD.fromOLExtent([i,t.center[1]-r,n,t.center[1]+r]).scale(.8)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.B),r.Pb(r.l),r.Pb(pI),r.Pb(tM))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-playback-layer"]],inputs:{map:"map"},features:[r.Ab],decls:1,vars:1,consts:[["className","mat-elevation-z16",3,"map","latitude","longitude","stopEvent","autoPositioning",4,"ngIf"],["className","mat-elevation-z16",3,"map","latitude","longitude","stopEvent","autoPositioning"],[3,"ship","animationTimestamp"]],template:function(t,e){1&t&&r.Ic(0,VX,2,7,"app-map-tooltip",0),2&t&&r.nc("ngIf",e.hoveredShip)},directives:[ut,MX,RX],encapsulation:2}),t})();const LX=Math.floor(10),UX=new jZ({image:new OZ({stroke:new VZ({color:"#010a40",lineDash:[LX+4,16,2*LX+4+1,18,2*LX+4+1,16,2*LX+4+1,18],width:4}),points:4,radius:30,angle:Math.PI/4})});class BX extends pH{constructor(t){super({geometry:new jM(sE([t.lon,t.lat]))}),super.setStyle(UX)}}let NX=(()=>{class t extends LT{constructor(t,e,i){super(),this.fleetsService=t,this.mapStateConfig=e,this.selectionService=i}ngOnInit(){this.ensureMandatoryInputParams("map"),this.source=new $q({features:[]}),this.layer=new Nq({source:this.source,updateWhileAnimating:!0,updateWhileInteracting:!0,zIndex:2}),this.map.addLayer(this.layer),this.subscriptions.push(Hg([this.fleetsService.selectedFleet$,this.selectionService.entities$.pipe(Object(Ge.a)(t=>t.map(t=>t.entity).filter(t=>!!t)))]).subscribe(([t,e])=>{this.layer.getSource().clear(!0);const i=[];t&&i.push(...t.ships.filter(t=>FD(t.lon)&&FD(t.lat)).map(t=>new ZD(t.lon,t.lat))),e.length&&i.push(...e.filter(t=>FD(t.lon)&&FD(t.lat)).map(t=>new ZD(t.lon,t.lat))),this.layer.getSource().addFeatures(i.map(t=>new BX(t)))}),this.mapStateConfig.showSelectionMarkers$.subscribe(t=>{this.layer.setVisible(t)}))}ngOnDestroy(){super.ngOnDestroy(),this.map.removeLayer(this.layer)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(OT),r.Pb(gT),r.Pb(xT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-selection-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();const jX=new jZ({image:new TZ});let zX=(()=>{class t extends LT{constructor(t){super(),this.mapService=t}ngOnInit(){this.ensureMandatoryInputParams("map"),this.source=new $q({features:[],useSpatialIndex:!1}),this.layer=new Nq({source:this.source,updateWhileAnimating:!0,updateWhileInteracting:!0,zIndex:3}),this.map.addLayer(this.layer),this.subscriptions.push(this.mapService.pingLocation$.subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){yield this.animatePing(t)})))}ngOnDestroy(){super.ngOnDestroy(),this.map.removeLayer(this.layer)}animatePing(t){return Object(ue.a)(this,void 0,void 0,function*(){const e=new pH(new jM(sE(t)));e.setStyle(jX),this.source.addFeature(e),this.flash(e),yield PD(3500),this.source.removeFeature(e)})}flash(t){const e=(new Date).getTime();let i=null;const n=n=>{const r=n.frameState.time-e,s=r/3e3;if(r>3e3)return void ME(i);const o=150-145*XC(s),a=2*XC(1-s),l=2*Math.PI*o/8,c=new jZ({image:new TZ({radius:o,stroke:new VZ({color:`rgba(255, 0, 0, ${a})`,lineDash:[1*l/3,2*l/3],lineDashOffset:6*s*o,width:1+a})})}),h=function(t){var e=t.frameState,i=oM(t.inversePixelTransform.slice(),e.coordinateToPixelTransform),n=Tq(e.viewState.resolution,e.pixelRatio);return new Sq(t.context,e.pixelRatio,e.extent,i,e.viewState.rotation,n,undefined)}(n);h.setStyle(c),h.drawGeometry(t.getGeometry().clone()),this.map.render()};i=this.layer.on("postrender",t=>{n(t)})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(pI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-ping-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})(),HX=(()=>{class t extends LT{constructor(t,e){super(),this.mapService=t,this.measureService=e,this.pointerMoveSubscription=new ye.a,this.createdTooltips=[]}ngOnInit(){this.ensureMandatoryInputParams("map"),this.source=new $q({features:[],wrapX:!1}),this.layer=new Nq({source:this.source,updateWhileAnimating:!0,updateWhileInteracting:!0,zIndex:2}),this.map.addLayer(this.layer),this.subscriptions.push(this.measureService.active$.subscribe(t=>{t?(this.drawInteraction=this.createInteraction(),this.map.addInteraction(this.drawInteraction)):this.stopInteraction()}))}ngOnDestroy(){super.ngOnDestroy(),this.clear()}clear(){this.source.clear(!0),this.stopInteraction(),this.createdTooltips.forEach(t=>{this.map.removeOverlay(t)})}stopInteraction(){this.map.getViewport().removeEventListener("mouseout",this.mouseOutListener),this.pointerMoveSubscription.unsubscribe(),ME(this.drawChangeListener),this.map.removeInteraction(this.drawInteraction),this.map.removeOverlay(this.helpTooltipOverlay),this.map.removeOverlay(this.measureTooltipOverlay)}createInteraction(){return this.drawInteraction=new rY({source:this.source,type:"LineString",style:bY,condition:aG}),this.createMeasureTooltip(),this.createHelpTooltip(),this.drawInteraction.on("drawstart",t=>{CC({category:"app",message:"measure: drawstart"}),this.sketchFeature=t.feature,this.sketchFeature.setStyle(this.getSketchFeatureStyle),this.drawChangeListener=this.sketchFeature.getGeometry().on("change",t=>{const e=t.target;this.measureTooltipElement.innerHTML=t$(e),this.measureTooltipOverlay.setPosition(e.getLastCoordinate())})}),this.drawInteraction.on("drawend",()=>{CC({category:"app",message:"measure: drawend"});const t=this.measureTooltipOverlay,e=this.sketchFeature;this.measureTooltipOverlay.setOffset([0,-7]),this.sketchFeature.setStyle(this.getSketchFeatureStyle(this.sketchFeature)),this.sketchFeature=null;const i=function(){const t=document.createElement("button");return t.className="material-icons mat-icon",t.innerText="close",t.title="Supprimer la mesure",t.style.padding="0",t.style.marginRight="-8px",t.style.marginTop="-4px",t.style.marginBottom="-4px",t.style.borderTopRightRadius="4px",t.style.borderBottomRightRadius="4px",t.style.fontSize="1.5em",t.style.marginLeft="4px",t.style.color="inherit",t.style.backgroundColor="rgba(0, 0, 0, 0)",t.addEventListener("mouseover",()=>{t.style.backgroundColor="rgba(0, 0, 0, 0.3)"}),t.addEventListener("mouseout",()=>{t.style.backgroundColor="rgba(0, 0, 0, 0)"}),t}();i.addEventListener("click",()=>{this.map.removeOverlay(t),this.source.removeFeature(e)}),this.measureTooltipElement.appendChild(i),this.createdTooltips.push(this.measureTooltipOverlay),this.measureTooltipElement=null,this.createMeasureTooltip(),ME(this.drawChangeListener)}),this.pointerMoveSubscription=this.mapService.pointerMove$.subscribe(t=>{this.handleMoveEvent(t)}),this.mouseOutListener=()=>{this.helpTooltipElement.classList.add("measure-layer__tooltip--hidden")},this.map.getViewport().addEventListener("mouseout",this.mouseOutListener),this.drawInteraction}createHelpTooltip(){this.helpTooltipElement&&this.helpTooltipElement.parentNode.removeChild(this.helpTooltipElement),this.helpTooltipElement=document.createElement("div"),this.helpTooltipElement.className="measure-layer__tooltip",this.helpTooltipOverlay=new EX({element:this.helpTooltipElement,className:"measure-layer__unselectable",offset:[15,0],positioning:"center-left"}),this.map.addOverlay(this.helpTooltipOverlay)}createMeasureTooltip(){this.measureTooltipElement&&this.measureTooltipElement.parentNode.removeChild(this.measureTooltipElement),this.measureTooltipElement=document.createElement("div"),this.measureTooltipElement.className="measure-layer__tooltip measure-layer__tooltip--measure",this.measureTooltipOverlay=new EX({element:this.measureTooltipElement,offset:[0,-15],positioning:"bottom-center",stopEvent:!0}),this.map.addOverlay(this.measureTooltipOverlay)}handleMoveEvent(t){if(t.dragging)return;let e="Cliquer pour d\xe9marrer la mesure";this.sketchFeature&&(e=this.drawInteraction.atFinish_(t)?"Cliquer pour terminer la mesure":"Cliquer pour ajouter un point"),this.helpTooltipElement.innerHTML=e,this.helpTooltipOverlay.setPosition(t.coordinate),this.helpTooltipElement.classList.remove("measure-layer__tooltip--hidden")}getSketchFeatureStyle(t){const e=t.getGeometry(),i=[new jZ({stroke:new VZ({color:"rgba(0, 0, 0, 0.8)",lineDash:[10,10],width:2})})];return e.forEachSegment((t,e)=>{i.push(new jZ({geometry:new kH([t,e]),text:new cY({text:e$(t,e),font:"12px sans-serif",placement:"line",textBaseline:"bottom",overflow:!0,fill:new RZ({color:"#000000"})})}))}),i}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(pI),r.Pb(WP))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-measure-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},styles:['.measure-layer__tooltip{position:relative;background:rgba(0,0,0,.7);border-radius:4px;color:#fff;padding:4px 8px;opacity:.8;white-space:nowrap;font-size:12px}.measure-layer__tooltip--measure{display:flex;align-items:center}.measure-layer__tooltip--measure:before{border-top:6px solid rgba(0,0,0,.7);border-right:6px solid transparent;border-left:6px solid transparent;content:"";position:absolute;bottom:-6px;margin-left:-7px;left:50%}.measure-layer__tooltip--hidden{display:none}.measure-layer__unselectable{pointer-events:none;touch-action:none}'],encapsulation:2,changeDetection:0}),t})();var KX=class extends Jq{handleFeatureChange_(){}};class $X extends lY{handleEvent(t){const e=[...t.pixel],i=super.handleEvent(t);return t.pixel[0]===e[0]&&t.pixel[1]===e[1]||(t.snapped=!0),i}}const GX=new VZ({color:"rgba(0, 0, 0, 0.8)",lineDash:[10,10],width:2}),WX=new jZ({stroke:GX}),ZX=new RZ({color:"#000000"}),qX=["root"];let YX=(()=>{class t extends LT{constructor(){super(...arguments),this.remove=new r.o}ngOnDestroy(){super.ngOnDestroy(),this.map.removeOverlay(this.overlay)}ngOnChanges(t){if(t.tooltip){t.tooltip.firstChange&&(this.overlay=new EX({element:this.rootElement.nativeElement,offset:[0,-15],positioning:"bottom-center",stopEvent:!0}),this.map.addOverlay(this.overlay));const e=t.tooltip.previousValue,i=t.tooltip.currentValue;e&&i.coordinates[0]===e.coordinates[0]&&i.coordinates[1]===e.coordinates[1]||this.overlay.setPosition(this.tooltip.coordinates)}}}return t.\u0275fac=function(e){return QX(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-waypoint-tooltip"]],viewQuery:function(t,e){if(1&t&&r.Pc(qX,3),2&t){let t;r.vc(t=r.dc())&&(e.rootElement=t.first)}},inputs:{map:"map",tooltip:"tooltip"},outputs:{remove:"remove"},features:[r.Ab,r.Bb],decls:5,vars:1,consts:[[1,"waypoint-tooltip"],["root",""],[1,"waypoint-tooltip__remove-btn","material-icons","mat-icon",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"div",0,1),r.Kc(2),r.Vb(3,"button",2),r.cc("click",function(){return e.remove.next()}),r.Kc(4,"close"),r.Ub(),r.Ub()),2&t&&(r.Db(2),r.Mc(" ",e.tooltip.label," "))},styles:['.waypoint-tooltip{position:relative;background:rgba(0,0,0,.7);border-radius:4px;color:#fff;padding:4px 8px;opacity:.8;white-space:nowrap;font-size:12px;display:flex;align-items:center} .waypoint-tooltip:before{border-top:6px solid rgba(0,0,0,.7);border-right:6px solid transparent;border-left:6px solid transparent;content:"";position:absolute;bottom:-6px;margin-left:-7px;left:50%} .waypoint-tooltip__remove-btn{padding:0;border-top-right-radius:4px;border-bottom-right-radius:4px;font-size:1.5em;margin:-4px -8px -4px 4px;color:inherit;background-color:transparent} .waypoint-tooltip__remove-btn:hover{background-color:rgba(0,0,0,.3)}'],changeDetection:0}),t})();const QX=r.Xb(YX);function XX(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-waypoint-tooltip",1),r.cc("remove",function(){r.Ac(t);const i=e.index;return r.gc().emitRemoveEvent(i)}),r.Ub()}if(2&t){const t=e.$implicit,i=r.gc();r.nc("map",i.map)("tooltip",t)}}let JX=(()=>{class t extends LT{constructor(){super(...arguments),this.remove=new r.o,this.waypointTooltips=[]}ngOnDestroy(){super.ngOnDestroy()}ngOnChanges(t){t.pim&&this.buildWaypointTooltipsAndSegmentsLabels()}buildWaypointTooltipsAndSegmentsLabels(){const t=this.pim.feature.getGeometry().getCoordinates();if(t.length<2)throw new Error("PIM invalide (2 points n\xe9cessaires)");const e=this.pim.waypoints;if(e.length<1)throw new Error("PIM invalide (1 \xe9tape n\xe9cessaire)");let i=this.pim.waypoints[0].timestamp;this.waypointTooltips=[{coordinates:t[0],label:eJ(i)}];const n=[];for(let s=1;s<t.length;s++){const o=t[s-1],a=t[s],l=e[s-1],c=(r=a,Math.round(Uk(oE(o),oE(r))/1852*100)/100),h=Math.round(i+c/l.speed*3600),u=BO(h-i);i=h,this.waypointTooltips.push({coordinates:a,label:`ETA: ${eJ(i)}`}),n.push(`${l.speed} kt - ${u}\n${e$(o,a)}`)}var r;this.pim.feature.setStyle(function(t,e){const i=[WX];let n=0;return t.forEachSegment((t,r)=>{const[s,o]=e[n].split("\n");i.push(new jZ({geometry:new kH([t,r]),text:new cY({text:` ${s}\n`,font:"12px sans-serif",placement:"line",textBaseline:"bottom",overflow:!0,fill:ZX})})),i.push(new jZ({geometry:new kH([t,r]),text:new cY({text:o,font:"12px sans-serif",placement:"line",textBaseline:"bottom",overflow:!0,fill:ZX})}));const a=r[0]-t[0],l=r[1]-t[1];if(0!==a||0!==l){const t=Math.atan2(l,a);i.push(new jZ({geometry:new jM(r),image:new Pq({src:"assets/images/arrow-chevron.png",anchor:[.6,.5],rotateWithView:!0,rotation:-t})}))}n++}),i}(this.pim.feature.getGeometry(),n))}trackByIndex(t){return t}emitRemoveEvent(t){this.remove.next({pim:this.pim,index:t})}}return t.\u0275fac=function(e){return tJ(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-pim"]],inputs:{map:"map",pim:"pim"},outputs:{remove:"remove"},features:[r.Ab,r.Bb],decls:1,vars:2,consts:[[3,"map","tooltip","remove",4,"ngFor","ngForOf","ngForTrackBy"],[3,"map","tooltip","remove"]],template:function(t,e){1&t&&r.Ic(0,XX,1,2,"app-waypoint-tooltip",0),2&t&&r.nc("ngForOf",e.waypointTooltips)("ngForTrackBy",e.trackByIndex)},directives:[ct,YX],styles:[""],changeDetection:0}),t})();const tJ=r.Xb(JX);function eJ(t){return FO(1e3*t,"yyyy-MM-dd HH:mm")}function iJ(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-pim",1),r.cc("remove",function(e){return r.Ac(t),r.gc().handleRemoveEvent(e)}),r.Ub()}if(2&t){const t=e.$implicit,i=r.gc();r.nc("map",i.map)("pim",t)}}var nJ=function(t){return t.Idle="idle",t.Draw="draw",t.Modify="modify",t}({});let rJ=(()=>{class t extends LT{constructor(t,e){super(),this.changeDetectorRef=t,this.pimService=e,this.pims=[],this.pointerMoveSubscription=new ye.a,this.currentMode=nJ.Idle,this.lastFeatureSegmentsCount=1,this.isUpdatingPIMGeometry=!1,this.updatedPIMOriginalGeometryCoordinates=null,this.mouseOutListener=()=>{this.helpTooltipOverlay.setPosition(null)}}ngOnInit(){this.ensureMandatoryInputParams("map"),this.source=new $q({features:[],wrapX:!1}),this.layer=new Nq({source:this.source,updateWhileAnimating:!0,updateWhileInteracting:!0,zIndex:2}),this.map.addLayer(this.layer),this.subscriptions.push(this.pimService.active$.subscribe(t=>{t?this.createInteractions():this.removeInteractions()}),this.pimService.nextStartDate$.subscribe(t=>{if(this.currentMode===nJ.Draw){const e=this.pims[this.pims.length-1];e.waypoints[0].timestamp=t,this.updatePIMReference(e)}}),this.pimService.nextSpeed$.subscribe(t=>{if(this.currentMode===nJ.Draw){const e=this.pims[this.pims.length-1],i=e.waypoints;i[i.length-1].speed=t,this.updatePIMReference(e)}}))}ngOnDestroy(){super.ngOnDestroy(),this.clear()}clear(){this.source.clear(!0),this.removeInteractions()}createInteractions(){this.createModifyInteraction(),this.createDrawInteraction(),this.snapInteraction=new $X({source:this.source,pixelTolerance:20}),this.map.addInteraction(this.snapInteraction),this.createHelpTooltip(),this.map.getViewport().addEventListener("mouseout",this.mouseOutListener)}removeInteractions(){this.map.getViewport().removeEventListener("mouseout",this.mouseOutListener),this.pointerMoveSubscription.unsubscribe(),ME(this.featureGeomChangeListener),this.map.removeInteraction(this.drawInteraction),this.map.removeInteraction(this.modifyInteraction),this.map.removeInteraction(this.snapInteraction),this.map.removeOverlay(this.helpTooltipOverlay)}createDrawInteraction(){this.drawInteraction=new rY({type:"LineString",source:this.source,style:bY,condition:aG}),this.map.addInteraction(this.drawInteraction),this.drawInteraction.on("drawstart",t=>{CC({category:"app",message:"pim: drawstart"}),this.currentMode=nJ.Draw,this.map.removeInteraction(this.snapInteraction),this.modifyInteraction.setActive(!1);const e=t.feature,i={feature:e,waypoints:[{timestamp:this.pimService.nextStartDate$.value,speed:this.pimService.nextSpeed$.value}]};e.pim=i,this.pims.push(i),this.listenForDrawedGeometryChanges(e)}),this.drawInteraction.on("drawend",()=>{CC({category:"app",message:"pim: drawend"}),this.currentMode=nJ.Idle,this.map.addInteraction(this.snapInteraction),this.modifyInteraction.setActive(!0),ME(this.featureGeomChangeListener)}),this.drawInteraction.on("drawabort",()=>{CC({category:"app",message:"pim: drawabort"}),this.currentMode=nJ.Idle,this.map.addInteraction(this.snapInteraction),this.modifyInteraction.setActive(!0),ME(this.featureGeomChangeListener),this.pims.splice(this.pims.length-1,1)}),this.pointerMoveSubscription=en(this.map,"pointermove").pipe(Pe(t=>{this.helpTooltipOverlay.setPosition(t.coordinate)}),fI(0)).subscribe(t=>{this.handleMoveEvent(t),this.changeDetectorRef.detectChanges()})}createModifyInteraction(){this.modifyInteraction=new KX({source:this.source,style:bY,condition:aG}),this.map.addInteraction(this.modifyInteraction),this.modifyInteraction.on("modifystart",t=>{CC({category:"app",message:"pim: modifystart"}),this.currentMode=nJ.Modify,this.map.removeInteraction(this.snapInteraction);const e=t.features.item(0);this.listenForGeometryChanges(e)}),this.modifyInteraction.on("modifyend",t=>{CC({category:"app",message:"pim: modifyend"}),this.currentMode=nJ.Idle,this.map.addInteraction(this.snapInteraction),ME(this.featureGeomChangeListener)})}listenForGeometryChanges(t){this.updatedPIMOriginalGeometryCoordinates=t.getGeometry().getCoordinates(),this.lastFeatureSegmentsCount=this.updatedPIMOriginalGeometryCoordinates.length-1,this.featureGeomChangeListener=t.getGeometry().on("change",()=>{const e=t.pim,i=t.getGeometry().getCoordinates(),n=i.length-1;if(n===this.lastFeatureSegmentsCount+1){for(let t=1;t<n;t++){const[n,r]=i[t],[s,o]=this.updatedPIMOriginalGeometryCoordinates[t];if(n!==s||r!==o){e.waypoints.splice(t,0,{speed:this.pimService.nextSpeed$.value});break}}this.lastFeatureSegmentsCount=n,this.handleMoveEvent(this.lastMoveEvent)}this.updatePIMReference(e)})}listenForDrawedGeometryChanges(t){this.updatedPIMOriginalGeometryCoordinates=t.getGeometry().getCoordinates(),this.lastFeatureSegmentsCount=this.updatedPIMOriginalGeometryCoordinates.length-1,this.featureGeomChangeListener=t.getGeometry().on("change",()=>{const e=t.pim,i=t.getGeometry().getCoordinates().length-1;i!==this.lastFeatureSegmentsCount&&(this.isUpdatingPIMGeometry||(i>this.lastFeatureSegmentsCount?(e.waypoints.push({speed:this.pimService.nextSpeed$.value}),CC({category:"app",message:"pim: add waypoint"})):(e.waypoints.splice(e.waypoints.length-1,1),CC({category:"app",message:"pim: remove waypoint"}))),this.lastFeatureSegmentsCount=i,this.handleMoveEvent(this.lastMoveEvent)),this.isUpdatingPIMGeometry||this.updatePIMReference(e)})}createHelpTooltip(){this.helpTooltipElement&&this.helpTooltipElement.parentNode.removeChild(this.helpTooltipElement),this.helpTooltipElement=document.createElement("div"),this.helpTooltipElement.className="help-tooltip",this.helpTooltipOverlay=new EX({element:this.helpTooltipElement,offset:[15,0],className:"help-tooltip__overlay",stopEvent:!1,positioning:"center-left"}),this.map.addOverlay(this.helpTooltipOverlay)}handleMoveEvent(t){this.lastMoveEvent=t;let e="";if(this.currentMode===nJ.Modify&&t.dragging)e="D\xe9placer pour modifier l'\xe9tape";else if(t.snapped)switch(this.currentMode===nJ.Idle&&this.drawInteraction.getActive()&&this.drawInteraction.setActive(!1),this.currentMode){case nJ.Idle:e="Cliquer et maintenir pour ajouter une \xe9tape";break;case nJ.Modify:e="D\xe9placer pour modifier l'\xe9tape"}else switch(this.currentMode!==nJ.Idle||this.drawInteraction.getActive()||this.drawInteraction.setActive(!0),this.currentMode){case nJ.Idle:e="Cliquer pour d\xe9marrer un PIM";break;case nJ.Draw:e=this.drawInteraction.atFinish_(t.pixel)?"Cliquer pour terminer le PIM":"Cliquer pour ajouter une \xe9tape"}this.helpTooltipElement.innerHTML=e}trackByIndex(t){return t}removePIM(t){this.source.hasFeature(t.feature)?this.source.removeFeature(t.feature):this.drawInteraction.abortDrawing();const e=this.pims.findIndex(e=>e===t);this.pims.splice(e,1)}handleRemoveEvent(t){const e=t.pim,i=t.index;if(0===i||1===e.waypoints.length)return this.removePIM(e),void CC({category:"app",message:"pim: remove pim"});if(this.currentMode===nJ.Draw&&this.pims[this.pims.length-1]===e&&i===e.waypoints.length)return;CC({category:"app",message:"pim: remove waypoint"}),e.waypoints.splice(i===e.waypoints.length?i-1:i,1);const n=e.feature.getGeometry(),r=n.getCoordinates();r.splice(i,1),this.isUpdatingPIMGeometry=!0,n.setCoordinates(r),this.isUpdatingPIMGeometry=!1,this.pims[this.pims.length-1]===e&&this.currentMode===nJ.Draw&&(this.drawInteraction.sketchCoords_=r,this.drawInteraction.finishCoordinate_=r[i-1]),this.updatePIMReference(e),this.pimService.active$.value&&(this.map.removeInteraction(this.modifyInteraction),this.createModifyInteraction())}updatePIMReference(t){const e=this.pims.findIndex(e=>e===t);if(-1===e)throw console.warn("PIM non trouv\xe9",t,this.pims),new Error("PIM non trouv\xe9");const i=Object.assign({},t);t.feature.pim=i,this.pims[e]=i}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(KO))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-pim-layer"]],inputs:{map:"map"},features:[r.Ab],decls:1,vars:2,consts:[[3,"map","pim","remove",4,"ngFor","ngForOf","ngForTrackBy"],[3,"map","pim","remove"]],template:function(t,e){1&t&&r.Ic(0,iJ,1,2,"app-pim",0),2&t&&r.nc("ngForOf",e.pims)("ngForTrackBy",e.trackByIndex)},directives:[ct,JX],styles:[".help-tooltip{position:relative;background:rgba(0,0,0,.7);border-radius:4px;color:#fff;padding:4px 8px;opacity:.8;white-space:nowrap;font-size:12px} .help-tooltip__overlay{pointer-events:none!important;touch-action:none}"]}),t})();function sJ(t,e){var i=[];Object.keys(e).forEach(function(t){null!=e[t]&&i.push(t+"="+encodeURIComponent(e[t]))});var n=i.join("&");return(t=-1===(t=t.replace(/[?&]$/,"")).indexOf("?")?t+"?":t+"&")+n}var oJ=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),aJ=function(t){function e(e){var i=this,n=e||{},r=n.params||{};return(i=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,imageSmoothing:n.imageSmoothing,opaque:!(!("TRANSPARENT"in r)||r.TRANSPARENT),projection:n.projection,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileClass:n.tileClass,tileGrid:n.tileGrid,tileLoadFunction:n.tileLoadFunction,url:n.url,urls:n.urls,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition})||this).gutter_=void 0!==n.gutter?n.gutter:0,i.params_=r,i.v13_=!0,i.serverType_=n.serverType,i.hidpi_=void 0===n.hidpi||n.hidpi,i.tmpExtent_=[1/0,1/0,-1/0,-1/0],i.updateV13_(),i.setKey(i.getKeyForParams_()),i}return oJ(e,t),e.prototype.getFeatureInfoUrl=function(t,e,i,n){var r=eE(i),s=this.getProjection(),o=this.getTileGrid();o||(o=this.getTileGridForProjection(r));var a=o.getZForResolution(e,this.zDirection),l=o.getTileCoordForCoordAndZ(t,a);if(!(o.getResolutions().length<=l[0])){var c=o.getResolution(l[0]),h=o.getTileCoordExtent(l,this.tmpExtent_),u=ZE(o.getTileSize(l[0]),this.tmpSize),d=this.gutter_;0!==d&&(u=GE(u,d,this.tmpSize),h=xS(h,c*d,h)),s&&s!==r&&(c=yE(s,r,t,c),h=uE(h,r,s),t=hE(t,r,s));var p={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};zC(p,this.params_,n);var f=Math.floor((t[0]-h[0])/c),m=Math.floor((h[3]-t[1])/c);return p[this.v13_?"I":"X"]=f,p[this.v13_?"J":"Y"]=m,this.getRequestUrl_(l,u,h,1,s||r,p)}},e.prototype.getLegendUrl=function(t,e){if(void 0!==this.urls[0]){var i={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===e||void 0===e.LAYER){var n=this.params_.LAYERS;if(Array.isArray(n)&&1!==n.length)return;i.LAYER=n}if(void 0!==t){var r=this.getProjection()?this.getProjection().getMetersPerUnit():1;i.SCALE=t*r/28e-5}return zC(i,e),sJ(this.urls[0],i)}},e.prototype.getGutter=function(){return this.gutter_},e.prototype.getParams=function(){return this.params_},e.prototype.getRequestUrl_=function(t,e,i,n,r,s){var o=this.urls;if(o){if(s.WIDTH=e[0],s.HEIGHT=e[1],s[this.v13_?"CRS":"SRS"]=r.getCode(),"STYLES"in this.params_||(s.STYLES=""),1!=n)switch(this.serverType_){case"geoserver":var a=90*n+.5|0;"FORMAT_OPTIONS"in s?s.FORMAT_OPTIONS+=";dpi:"+a:s.FORMAT_OPTIONS="dpi:"+a;break;case"mapserver":s.MAP_RESOLUTION=90*n;break;case"carmentaserver":case"qgis":s.DPI=90*n;break;default:yS(!1,52)}var l=r.getAxisOrientation(),c=i;if(this.v13_&&"ne"==l.substr(0,2)){var h=void 0;h=i[0],c[0]=i[1],c[1]=h,h=i[2],c[2]=i[3],c[3]=h}return s.BBOX=c.join(","),sJ(1==o.length?o[0]:o[bk(DE(t),o.length)],s)}},e.prototype.getTilePixelRatio=function(t){return this.hidpi_&&void 0!==this.serverType_?t:1},e.prototype.getKeyForParams_=function(){var t=0,e=[];for(var i in this.params_)e[t++]=i+"-"+this.params_[i];return e.join("/")},e.prototype.updateParams=function(t){zC(this.params_,t),this.updateV13_(),this.setKey(this.getKeyForParams_())},e.prototype.updateV13_=function(){this.v13_=function(t,e){for(var i=(""+t).split("."),n="1.3".split("."),r=0;r<Math.max(i.length,n.length);r++){var s=parseInt(i[r]||"0",10),o=parseInt(n[r]||"0",10);if(s>o)return 1;if(o>s)return-1}return 0}(this.params_.VERSION||"1.3.0")>=0},e.prototype.tileUrlFunction=function(t,e,i){var n=this.getTileGrid();if(n||(n=this.getTileGridForProjection(i)),!(n.getResolutions().length<=t[0])){1==e||this.hidpi_&&void 0!==this.serverType_||(e=1);var r=n.getResolution(t[0]),s=n.getTileCoordExtent(t,this.tmpExtent_),o=ZE(n.getTileSize(t[0]),this.tmpSize),a=this.gutter_;0!==a&&(o=GE(o,a,this.tmpSize),s=xS(s,r*a,s)),1!=e&&(o=WE(o,e,this.tmpSize));var l={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return zC(l,this.params_),this.getRequestUrl_(t,o,s,e,i,l)}},e}(cD);const lJ={limits36Nq:{assets:[{url:"assets/geo/Limite_3milles_peche_WGS84_EPSG4326.geojson",style:new jZ({stroke:new VZ({width:2,color:"#ed791a"})})},{url:"assets/geo/Limite_6milles_bande_cotiere_peche_WGS84_EPSG4326.geojson",style:new jZ({stroke:new VZ({width:2,color:"#7a7a7a"})})}],formatFeature:t=>t.get("nature")},maritimeBoundaries:{assets:[{url:"assets/geo/Delim_accord_WGS84.geojson",style:new jZ({stroke:new VZ({width:2,color:"#090df6"})})},{url:"assets/geo/Lignes_base_droites_WGS84.geojson",style:new jZ({stroke:new VZ({width:2,color:"#000000"})})},{url:"assets/geo/Lim_ext_MT_WGS84.geojson",style:new jZ({stroke:new VZ({width:2,color:"#e31a1c"})})},{url:"assets/geo/Lim_ext_PC_WGS84.geojson",style:new jZ({stroke:new VZ({width:2,color:"#732d2f"})})},{url:"assets/geo/Lim_ext_ZC_WGS84.geojson",style:new jZ({stroke:new VZ({width:2,color:"#c36812"})})},{url:"assets/geo/Lim_ext_ZEE_WGS84.geojson",style:new jZ({stroke:new VZ({width:2,color:"#d60af5"})})},{url:"assets/geo/Lim_sans_accord_WGS84.geojson",style:new jZ({stroke:new VZ({lineDash:[2,5],width:2,color:"#000000"})})}],formatFeature:t=>t.get("nature")},mrcc:{assets:[{url:"assets/geo/mrcc_2020-08-03.geojson",style:new jZ({image:new Pq({src:"/assets/images/lifeline.png"})})}],formatFeature:t=>t.get("name")},searchAndRescue:{assets:[{url:"assets/geo/sar_2020-08-03.geojson",style:new jZ({stroke:new VZ({width:2,color:"#d9161e"})})}],formatFeature:t=>t.get("name")}};let cJ=(()=>{class t extends LT{constructor(t,e){super(),this.mapConfigService=t,this.mapService=e,this.featuresLoaded$=new _e.a,this.assetsFeaturesByType={}}ngOnInit(){this.ensureMandatoryInputParams("map"),this.geoJSONReader=new FH({featureProjection:this.map.getView().getProjection().getCode()}),this.pointsSource=new $q({features:[]}),this.pointsLayer=new Nq({source:this.pointsSource,updateWhileAnimating:!0,updateWhileInteracting:!0}),this.map.addLayer(this.pointsLayer),this.linesSource=new $q({features:[]}),this.linesLayer=new EY({source:this.linesSource}),this.map.addLayer(this.linesLayer),this.eezLayer=new dW({source:new aJ({url:"https://geo.vliz.be/geoserver/gwc/service/wms",params:{SRS:"EPSG:3857",LAYERS:"MarineRegions:eez_boundaries"}}),visible:!1}),this.map.addLayer(this.eezLayer),this.subscriptions.push(Hg([this.mapConfigService.showMaritimeBoundariesLayer$,this.mapConfigService.show36NqLimitsLayer$,this.mapConfigService.showMRCCLayer$,this.mapConfigService.showSARLayer$]).pipe(He(([t,e,i,n])=>t||e||i||n),Rv()).subscribe(()=>Object(ue.a)(this,void 0,void 0,function*(){yield this.fetchFeatures()})),this.featuresLoaded$.pipe(Rv()).subscribe(()=>{this.subscriptions.push(Hg([this.mapConfigService.showMaritimeBoundariesLayer$,this.mapConfigService.show36NqLimitsLayer$,this.mapConfigService.showMRCCLayer$,this.mapConfigService.showSARLayer$]).subscribe(([t,e,i,n])=>{this.pointsSource.clear(!0),this.linesSource.clear(!0),t&&this.linesSource.addFeatures(this.assetsFeaturesByType.maritimeBoundaries),e&&this.linesSource.addFeatures(this.assetsFeaturesByType.limits36Nq),i&&this.pointsSource.addFeatures(this.assetsFeaturesByType.mrcc),n&&this.linesSource.addFeatures(this.assetsFeaturesByType.searchAndRescue)}))}),this.mapConfigService.showEEZLayer$.subscribe(t=>{this.eezLayer.setVisible(t)}),this.mapService.pointerMove$.subscribe(t=>{(this.pointsSource.getFeatures().length||this.linesSource.getFeatures().length)&&this.handleMoveEvent(t)})),this.createTooltip()}ngOnDestroy(){super.ngOnDestroy(),this.map.removeLayer(this.pointsLayer),this.map.removeLayer(this.linesLayer),this.map.removeOverlay(this.tooltipOverlay)}createTooltip(){this.tooltipElement&&this.tooltipElement.parentNode.removeChild(this.tooltipElement),this.tooltipElement=document.createElement("div"),this.tooltipElement.className="additional-features-layer__tooltip",this.tooltipOverlay=new EX({element:this.tooltipElement,offset:[0,-10],positioning:"bottom-center"}),this.map.addOverlay(this.tooltipOverlay)}handleMoveEvent(t){this.map.forEachFeatureAtPixel(t.pixel,e=>(this.tooltipElement.innerHTML=e.title,this.tooltipOverlay.setPosition(t.coordinate),!0),{hitTolerance:3,layerFilter:t=>t===this.pointsLayer||t===this.linesLayer})?this.tooltipElement.classList.remove("additional-features-layer__tooltip--hidden"):this.tooltipElement.classList.add("additional-features-layer__tooltip--hidden")}fetchFeatures(){return Object(ue.a)(this,void 0,void 0,function*(){yield Promise.all(Object.entries(lJ).map(([t,e])=>Object(ue.a)(this,void 0,void 0,function*(){const i=yield Promise.all(e.assets.map(t=>Object(ue.a)(this,void 0,void 0,function*(){var e;const i=yield fetch(t.url);if("ANAIS-UI"!==(null===(e=i.headers)||void 0===e?void 0:e.get("x-server"))){const t=i.headers.get("content-type");throw new Error(`Le serveur n'a pas bien r\xe9pondu${"application/json"!==t?` (re\xe7u: ${t}, attendu: application/json)`:""}. Votre acc\xe8s \xe0 internet est-il bloqu\xe9 par un proxy ?`)}try{return{collection:yield i.json(),style:t.style}}catch(n){throw new Error(`Donn\xe9es corrompues pour le fichier ${t.url}. JSON probablement malform\xe9 (${n.message})`)}})));this.assetsFeaturesByType[t]=i.flatMap(t=>{const i=this.geoJSONReader.readFeatures(t.collection);return i.forEach(i=>{i.setStyle(t.style),i.title=e.formatFeature(i)}),i})}))),this.featuresLoaded$.next(!0)})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(hI),r.Pb(pI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-additional-features-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},styles:['.additional-features-layer__tooltip{position:relative;background:rgba(0,0,0,.7);border-radius:4px;color:#fff;padding:4px 8px;opacity:.8;white-space:nowrap;font-size:12px;pointer-events:none;touch-action:none}.additional-features-layer__tooltip:before{border-top:6px solid rgba(0,0,0,.7);border-right:6px solid transparent;border-left:6px solid transparent;content:"";position:absolute;bottom:-6px;margin-left:-7px;left:50%}.additional-features-layer__tooltip--hidden{display:none}'],encapsulation:2,changeDetection:0}),t})();const hJ={openSeaMap:new uD({url:fD.a.openSeaMapURL,crossOrigin:"anonymous",attributions:'\xa9 <a href="http://openstreetmap.org">OpenStreetMap</a> contributors'}),subcables:new uD({url:fD.a.subcablesURL,crossOrigin:"anonymous",attributions:"\xa9 SHOM"})};let uJ=(()=>{class t extends LT{constructor(t){super(),this.mapConfigService=t,this.layers=[]}ngOnInit(){this.ensureMandatoryInputParams("map"),Object.values(hJ).forEach(t=>{const e=new dW({source:t,visible:!1});this.map.addLayer(e),this.layers.push(e)}),this.subscriptions.push(this.mapConfigService.showOpenSeaMapLayer$.subscribe(t=>{this.layers.find(t=>t.getSource()===hJ.openSeaMap).setVisible(t)}),this.mapConfigService.showSubcablesLayer$.subscribe(t=>{this.layers.find(t=>t.getSource()===hJ.subcables).setVisible(t)}))}ngOnDestroy(){super.ngOnDestroy(),this.layers.forEach(t=>{this.map.removeLayer(t)})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-tile-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();var dJ="http://www.w3.org/2001/XMLSchema-instance";function pJ(t,e){return RJ().createElementNS(t,e)}function fJ(t,e){return mJ(t,e,[]).join("")}function mJ(t,e,i){if(t.nodeType==Node.CDATA_SECTION_NODE||t.nodeType==Node.TEXT_NODE)i.push(e?String(t.nodeValue).replace(/(\r\n|\r|\n)/g,""):t.nodeValue);else{var n=void 0;for(n=t.firstChild;n;n=n.nextSibling)mJ(n,e,i)}return i}function gJ(t){return"documentElement"in t}function AJ(t){return(new DOMParser).parseFromString(t,"application/xml")}function bJ(t,e){return function(i,n){var r=t.call(void 0!==e?e:this,i,n);void 0!==r&&LC(n[n.length-1],r)}}function vJ(t,e){return function(i,n){var r=t.call(void 0!==e?e:this,i,n);void 0!==r&&n[n.length-1].push(r)}}function _J(t,e){return function(i,n){var r=t.call(void 0!==e?e:this,i,n);void 0!==r&&(n[n.length-1]=r)}}function yJ(t,e,i){return function(n,r){var s=t.call(void 0!==i?i:this,n,r);void 0!==s&&(r[r.length-1][void 0!==e?e:n.localName]=s)}}function wJ(t,e){return function(i,n,r){t.call(void 0!==e?e:this,i,n,r),r[r.length-1].node.appendChild(i)}}function xJ(t,e){var i,n;return function(e,r,s){if(void 0===i){i={};var o={};o[e.localName]=t,i[e.namespaceURI]=o,n=CJ(e.localName)}PJ(i,n,r,s)}}function CJ(t,e){var i=t;return function(t,n,r){var s=i;return void 0===s&&(s=r),pJ(void 0!==e?e:n[n.length-1].node.namespaceURI,s)}}var SJ=CJ();function kJ(t,e){for(var i=e.length,n=new Array(i),r=0;r<i;++r)n[r]=t[e[r]];return n}function EJ(t,e,i){var n,r,s=void 0!==i?i:{};for(n=0,r=t.length;n<r;++n)s[t[n]]=e;return s}function DJ(t,e,i,n){var r;for(r=e.firstElementChild;r;r=r.nextElementSibling){var s=t[r.namespaceURI];if(void 0!==s){var o=s[r.localName];void 0!==o&&o.call(n,r,i)}}}function IJ(t,e,i,n,r){return n.push(t),DJ(e,i,n,r),n.pop()}function PJ(t,e,i,n,r,s){for(var o,a,l=(void 0!==r?r:i).length,c=0;c<l;++c)void 0!==(o=i[c])&&void 0!==(a=e.call(void 0!==s?s:this,o,n,void 0!==r?r[c]:void 0))&&t[a.namespaceURI][a.localName].call(s,a,o,n)}function OJ(t,e,i,n,r,s,o){return r.push(t),PJ(e,i,n,r,s,o),r.pop()}var MJ=void 0,TJ=void 0;function RJ(){return void 0===TJ&&"undefined"!=typeof document&&(TJ=document.implementation.createDocument("","",null)),TJ}var VJ=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),FJ=function(t){function e(){var e=t.call(this)||this;return e.xmlSerializer_=(void 0===MJ&&"undefined"!=typeof XMLSerializer&&(MJ=new XMLSerializer),MJ),e}return VJ(e,t),e.prototype.getType=function(){return"xml"},e.prototype.readFeature=function(t,e){if(t){if("string"==typeof t){var i=AJ(t);return this.readFeatureFromDocument(i,e)}return gJ(t)?this.readFeatureFromDocument(t,e):this.readFeatureFromNode(t,e)}return null},e.prototype.readFeatureFromDocument=function(t,e){var i=this.readFeaturesFromDocument(t,e);return i.length>0?i[0]:null},e.prototype.readFeatureFromNode=function(t,e){return null},e.prototype.readFeatures=function(t,e){if(t){if("string"==typeof t){var i=AJ(t);return this.readFeaturesFromDocument(i,e)}return gJ(t)?this.readFeaturesFromDocument(t,e):this.readFeaturesFromNode(t,e)}return[]},e.prototype.readFeaturesFromDocument=function(t,e){for(var i=[],n=t.firstChild;n;n=n.nextSibling)n.nodeType==Node.ELEMENT_NODE&&LC(i,this.readFeaturesFromNode(n,e));return i},e.prototype.readFeaturesFromNode=function(t,e){return ZC()},e.prototype.readGeometry=function(t,e){if(t){if("string"==typeof t){var i=AJ(t);return this.readGeometryFromDocument(i,e)}return gJ(t)?this.readGeometryFromDocument(t,e):this.readGeometryFromNode(t,e)}return null},e.prototype.readGeometryFromDocument=function(t,e){return null},e.prototype.readGeometryFromNode=function(t,e){return null},e.prototype.readProjection=function(t){if(t){if("string"==typeof t){var e=AJ(t);return this.readProjectionFromDocument(e)}return gJ(t)?this.readProjectionFromDocument(t):this.readProjectionFromNode(t)}return null},e.prototype.readProjectionFromDocument=function(t){return this.dataProjection},e.prototype.readProjectionFromNode=function(t){return this.dataProjection},e.prototype.writeFeature=function(t,e){var i=this.writeFeatureNode(t,e);return this.xmlSerializer_.serializeToString(i)},e.prototype.writeFeatureNode=function(t,e){return null},e.prototype.writeFeatures=function(t,e){var i=this.writeFeaturesNode(t,e);return this.xmlSerializer_.serializeToString(i)},e.prototype.writeFeaturesNode=function(t,e){return null},e.prototype.writeGeometry=function(t,e){var i=this.writeGeometryNode(t,e);return this.xmlSerializer_.serializeToString(i)},e.prototype.writeGeometryNode=function(t,e){return null},e}(AH);function LJ(t){var e,i=fJ(t,!1);return(e=/^\s*(true|1)|(false|0)\s*$/.exec(i))?void 0!==e[1]||!1:void 0}function UJ(t){var e=fJ(t,!1),i=Date.parse(e);return isNaN(i)?void 0:i/1e3}function BJ(t){var e,i=fJ(t,!1);return(e=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(i))?parseFloat(e[1]):void 0}function NJ(t){var e,i=fJ(t,!1);return(e=/^\s*(\d+)\s*$/.exec(i))?parseInt(e[1],10):void 0}function jJ(t){return fJ(t,!1).trim()}function zJ(t,e){$J(t,e?"1":"0")}function HJ(t,e){var i=e.toPrecision();t.appendChild(RJ().createTextNode(i))}function KJ(t,e){var i=e.toString();t.appendChild(RJ().createTextNode(i))}function $J(t,e){t.appendChild(RJ().createTextNode(e))}var GJ=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),WJ=[null,"http://www.topografix.com/GPX/1/0","http://www.topografix.com/GPX/1/1"],ZJ={rte:w0,trk:x0,wpt:C0},qJ=EJ(WJ,{rte:vJ(w0),trk:vJ(x0),wpt:vJ(C0)}),YJ=EJ(WJ,{text:yJ(jJ,"linkText"),type:yJ(jJ,"linkType")}),QJ=EJ(WJ,{rte:wJ(function(t,e,i){var n=i[0],r=e.getProperties(),s={node:t};s.properties=r;var o=e.getGeometry();if("LineString"==o.getType()){var a=bH(o,!0,n);s.geometryLayout=a.getLayout(),r.rtept=a.getCoordinates()}var l=a0[i[i.length-1].node.namespaceURI],c=kJ(r,l);OJ(s,l0,SJ,c,i,l)}),trk:wJ(function(t,e,i){var n=i[0],r=e.getProperties(),s={node:t};s.properties=r;var o=e.getGeometry();if("MultiLineString"==o.getType()){var a=bH(o,!0,n);r.trkseg=a.getLineStrings()}var l=h0[i[i.length-1].node.namespaceURI],c=kJ(r,l);OJ(s,u0,SJ,c,i,l)}),wpt:wJ(function(t,e,i){var n=i[0],r=i[i.length-1];r.properties=e.getProperties();var s=e.getGeometry();if("Point"==s.getType()){var o=bH(s,!0,n);r.geometryLayout=o.getLayout(),k0(t,o.getCoordinates(),i)}})}),XJ=function(t){function e(e){var i=t.call(this)||this,n=e||{};return i.dataProjection=eE("EPSG:4326"),i.readExtensions_=n.readExtensions,i}return GJ(e,t),e.prototype.handleReadExtensions_=function(t){t||(t=[]);for(var e=0,i=t.length;e<i;++e){var n=t[e];if(this.readExtensions_){var r=n.get("extensionsNode_")||null;this.readExtensions_(n,r)}n.set("extensionsNode_",void 0)}},e.prototype.readFeatureFromNode=function(t,e){if(!RC(WJ,t.namespaceURI))return null;var i=ZJ[t.localName];if(!i)return null;var n=i(t,[this.getReadOptions(t,e)]);return n?(this.handleReadExtensions_([n]),n):null},e.prototype.readFeaturesFromNode=function(t,e){if(!RC(WJ,t.namespaceURI))return[];if("gpx"==t.localName){var i=IJ([],qJ,t,[this.getReadOptions(t,e)]);return i?(this.handleReadExtensions_(i),i):[]}return[]},e.prototype.writeFeaturesNode=function(t,e){e=this.adaptOptions(e);var i=pJ("http://www.topografix.com/GPX/1/1","gpx");return i.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xsi",dJ),i.setAttributeNS(dJ,"xsi:schemaLocation","http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"),i.setAttribute("version","1.1"),i.setAttribute("creator","OpenLayers"),OJ({node:i},QJ,A0,t,[e]),i},e}(FJ),JJ=EJ(WJ,{name:yJ(jJ),cmt:yJ(jJ),desc:yJ(jJ),src:yJ(jJ),link:_0,number:yJ(NJ),extensions:y0,type:yJ(jJ),rtept:function(t,e){var i=IJ({},t0,t,e);if(i){var n=e[e.length-1];b0(n.flatCoordinates,n.layoutOptions,t,i)}}}),t0=EJ(WJ,{ele:yJ(BJ),time:yJ(UJ)}),e0=EJ(WJ,{name:yJ(jJ),cmt:yJ(jJ),desc:yJ(jJ),src:yJ(jJ),link:_0,number:yJ(NJ),type:yJ(jJ),extensions:y0,trkseg:function(t,e){var i=e[e.length-1];DJ(i0,t,e),i.ends.push(i.flatCoordinates.length)}}),i0=EJ(WJ,{trkpt:function(t,e){var i=IJ({},n0,t,e);if(i){var n=e[e.length-1];b0(n.flatCoordinates,n.layoutOptions,t,i)}}}),n0=EJ(WJ,{ele:yJ(BJ),time:yJ(UJ)}),r0=EJ(WJ,{ele:yJ(BJ),time:yJ(UJ),magvar:yJ(BJ),geoidheight:yJ(BJ),name:yJ(jJ),cmt:yJ(jJ),desc:yJ(jJ),src:yJ(jJ),link:_0,sym:yJ(jJ),type:yJ(jJ),fix:yJ(jJ),sat:yJ(NJ),hdop:yJ(BJ),vdop:yJ(BJ),pdop:yJ(BJ),ageofdgpsdata:yJ(BJ),dgpsid:yJ(NJ),extensions:y0}),s0=["text","type"],o0=EJ(WJ,{text:wJ($J),type:wJ($J)}),a0=EJ(WJ,["name","cmt","desc","src","link","number","type","rtept"]),l0=EJ(WJ,{name:wJ($J),cmt:wJ($J),desc:wJ($J),src:wJ($J),link:wJ(S0),number:wJ(KJ),type:wJ($J),rtept:xJ(wJ(k0))}),c0=EJ(WJ,["ele","time"]),h0=EJ(WJ,["name","cmt","desc","src","link","number","type","trkseg"]),u0=EJ(WJ,{name:wJ($J),cmt:wJ($J),desc:wJ($J),src:wJ($J),link:wJ(S0),number:wJ(KJ),type:wJ($J),trkseg:xJ(wJ(function(t,e,i){var n={node:t};n.geometryLayout=e.getLayout(),n.properties={},OJ(n,p0,d0,e.getCoordinates(),i)}))}),d0=CJ("trkpt"),p0=EJ(WJ,{trkpt:wJ(k0)}),f0=EJ(WJ,["ele","time","magvar","geoidheight","name","cmt","desc","src","link","sym","type","fix","sat","hdop","vdop","pdop","ageofdgpsdata","dgpsid"]),m0=EJ(WJ,{ele:wJ(HJ),time:wJ(function(t,e){var i=new Date(1e3*e),n=i.getUTCFullYear()+"-"+zk(i.getUTCMonth()+1,2)+"-"+zk(i.getUTCDate(),2)+"T"+zk(i.getUTCHours(),2)+":"+zk(i.getUTCMinutes(),2)+":"+zk(i.getUTCSeconds(),2)+"Z";t.appendChild(RJ().createTextNode(n))}),magvar:wJ(HJ),geoidheight:wJ(HJ),name:wJ($J),cmt:wJ($J),desc:wJ($J),src:wJ($J),link:wJ(S0),sym:wJ($J),type:wJ($J),fix:wJ($J),sat:wJ(KJ),hdop:wJ(HJ),vdop:wJ(HJ),pdop:wJ(HJ),ageofdgpsdata:wJ(HJ),dgpsid:wJ(KJ)}),g0={Point:"wpt",LineString:"rte",MultiLineString:"trk"};function A0(t,e,i){var n=t.getGeometry();if(n){var r=g0[n.getType()];if(r)return pJ(e[e.length-1].node.namespaceURI,r)}}function b0(t,e,i,n){return t.push(parseFloat(i.getAttribute("lon")),parseFloat(i.getAttribute("lat"))),"ele"in n?(t.push(n.ele),delete n.ele,e.hasZ=!0):t.push(0),"time"in n?(t.push(n.time),delete n.time,e.hasM=!0):t.push(0),t}function v0(t,e,i){var n="XY",r=2;if(t.hasZ&&t.hasM?(n="XYZM",r=4):t.hasZ?(n="XYZ",r=3):t.hasM&&(n="XYM",r=3),4!==r){for(var s=0,o=e.length/4;s<o;s++)e[s*r]=e[4*s],e[s*r+1]=e[4*s+1],t.hasZ&&(e[s*r+2]=e[4*s+2]),t.hasM&&(e[s*r+2]=e[4*s+3]);if(e.length=e.length/4*r,i)for(s=0,o=i.length;s<o;s++)i[s]=i[s]/4*r}return n}function _0(t,e){var i=e[e.length-1],n=t.getAttribute("href");null!==n&&(i.link=n),DJ(YJ,t,e)}function y0(t,e){e[e.length-1].extensionsNode_=t}function w0(t,e){var i=e[0],n=IJ({flatCoordinates:[],layoutOptions:{}},JJ,t,e);if(n){var r=n.flatCoordinates;delete n.flatCoordinates;var s=n.layoutOptions;delete n.layoutOptions;var o=v0(s,r),a=new kH(r,o);bH(a,!1,i);var l=new pH(a);return l.setProperties(n,!0),l}}function x0(t,e){var i=e[0],n=IJ({flatCoordinates:[],ends:[],layoutOptions:{}},e0,t,e);if(n){var r=n.flatCoordinates;delete n.flatCoordinates;var s=n.ends;delete n.ends;var o=n.layoutOptions;delete n.layoutOptions;var a=v0(o,r,s),l=new DH(r,a,s);bH(l,!1,i);var c=new pH(l);return c.setProperties(n,!0),c}}function C0(t,e){var i=e[0],n=IJ({},r0,t,e);if(n){var r={},s=b0([],r,t,n),o=v0(r,s),a=new jM(s,o);bH(a,!1,i);var l=new pH(a);return l.setProperties(n,!0),l}}function S0(t,e,i){t.setAttribute("href",e);var n=i[i.length-1].properties;OJ({node:t},o0,SJ,[n.linkText,n.linkType],i,s0)}function k0(t,e,i){var n=i[i.length-1],r=n.node.namespaceURI,s=n.properties;switch(t.setAttributeNS(null,"lat",String(e[1])),t.setAttributeNS(null,"lon",String(e[0])),n.geometryLayout){case"XYZM":0!==e[3]&&(s.time=e[3]);case"XYZ":0!==e[2]&&(s.ele=e[2]);break;case"XYM":0!==e[2]&&(s.time=e[2])}var o="rtept"==t.nodeName?c0[r]:f0[r],a=kJ(s,o);OJ({node:t,properties:s},m0,SJ,a,i,o)}var E0=XJ,D0=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function I0(t){return"string"==typeof t?t:""}var P0,O0,M0,T0,R0,V0,F0,L0,U0,B0,N0=function(t){function e(){return t.call(this)||this}return D0(e,t),e.prototype.getType=function(){return"text"},e.prototype.readFeature=function(t,e){return this.readFeatureFromText(I0(t),this.adaptOptions(e))},e.prototype.readFeatureFromText=function(t,e){return ZC()},e.prototype.readFeatures=function(t,e){return this.readFeaturesFromText(I0(t),this.adaptOptions(e))},e.prototype.readFeaturesFromText=function(t,e){return ZC()},e.prototype.readGeometry=function(t,e){return this.readGeometryFromText(I0(t),this.adaptOptions(e))},e.prototype.readGeometryFromText=function(t,e){return ZC()},e.prototype.readProjection=function(t){return this.readProjectionFromText(I0(t))},e.prototype.readProjectionFromText=function(t){return this.dataProjection},e.prototype.writeFeature=function(t,e){return this.writeFeatureText(t,this.adaptOptions(e))},e.prototype.writeFeatureText=function(t,e){return ZC()},e.prototype.writeFeatures=function(t,e){return this.writeFeaturesText(t,this.adaptOptions(e))},e.prototype.writeFeaturesText=function(t,e){return ZC()},e.prototype.writeGeometry=function(t,e){return this.writeGeometryText(t,this.adaptOptions(e))},e.prototype.writeGeometryText=function(t,e){return ZC()},e}(AH),j0=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),z0=/^B(\d{2})(\d{2})(\d{2})(\d{2})(\d{5})([NS])(\d{3})(\d{5})([EW])([AV])(\d{5})(\d{5})/,H0=/^H.([A-Z]{3}).*?:(.*)/,K0=/^HFDTE(\d{2})(\d{2})(\d{2})/,$0=/\r\n|\r|\n/,G0=function(t){function e(e){var i=t.call(this)||this,n=e||{};return i.dataProjection=eE("EPSG:4326"),i.altitudeMode_=n.altitudeMode?n.altitudeMode:"none",i}return j0(e,t),e.prototype.readFeatureFromText=function(t,e){var i,n,r=this.altitudeMode_,s=t.split($0),o={},a=[],l=2e3,c=0,h=1,u=-1;for(i=0,n=s.length;i<n;++i){var d=s[i],p=void 0;if("B"==d.charAt(0)){if(p=z0.exec(d)){var f=parseInt(p[1],10),m=parseInt(p[2],10),g=parseInt(p[3],10),A=parseInt(p[4],10)+parseInt(p[5],10)/6e4;"S"==p[6]&&(A=-A);var b,v=parseInt(p[7],10)+parseInt(p[8],10)/6e4;if("W"==p[9]&&(v=-v),a.push(v,A),"none"!=r)b="gps"==r?parseInt(p[11],10):"barometric"==r?parseInt(p[12],10):0,a.push(b);var _=Date.UTC(l,c,h,f,m,g);_<u&&(_=Date.UTC(l,c,h+1,f,m,g)),a.push(_/1e3),u=_}}else"H"==d.charAt(0)&&((p=K0.exec(d))?(h=parseInt(p[1],10),c=parseInt(p[2],10)-1,l=2e3+parseInt(p[3],10)):(p=H0.exec(d))&&(o[p[1]]=p[2].trim()))}if(0===a.length)return null;var y=new kH(a,"none"==r?"XYM":"XYZM"),w=new pH(bH(y,!1,e));return w.setProperties(o,!0),w},e.prototype.readFeaturesFromText=function(t,e){var i=this.readFeatureFromText(t,e);return i?[i]:[]},e}(N0),W0=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Z0=["http://www.google.com/kml/ext/2.2"],q0=[null,"http://earth.google.com/kml/2.0","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.2","http://www.opengis.net/kml/2.2"],Y0={fraction:"fraction",pixels:"pixels",insetPixels:"pixels"},Q0=EJ(q0,{ExtendedData:K1,Region:$1,MultiGeometry:yJ(V1,"geometry"),LineString:yJ(M1,"geometry"),LinearRing:yJ(T1,"geometry"),Point:yJ(F1,"geometry"),Polygon:yJ(U1,"geometry"),Style:yJ(N1),StyleMap:function(t,e){var i=b1.call(this,t,e);if(i){var n=e[e.length-1];Array.isArray(i)?n.Style=i:"string"==typeof i?n.styleUrl=i:yS(!1,38)}},address:yJ(jJ),description:yJ(jJ),name:yJ(jJ),open:yJ(LJ),phoneNumber:yJ(jJ),styleUrl:yJ(m1),visibility:yJ(LJ)},EJ(Z0,{MultiTrack:yJ(function(t,e){var i=IJ([],S1,t,e);if(i)return new DH(i)},"geometry"),Track:yJ(E1,"geometry")})),X0=EJ(q0,{ExtendedData:K1,Region:$1,Link:function(t,e){DJ(J0,t,e)},address:yJ(jJ),description:yJ(jJ),name:yJ(jJ),open:yJ(LJ),phoneNumber:yJ(jJ),visibility:yJ(LJ)}),J0=EJ(q0,{href:yJ(f1)}),t1=EJ(q0,{LatLonAltBox:function(t,e){var i=IJ({},Z1,t,e);if(i){var n=e[e.length-1],r=[parseFloat(i.west),parseFloat(i.south),parseFloat(i.east),parseFloat(i.north)];n.extent=r,n.altitudeMode=i.altitudeMode,n.minAltitude=parseFloat(i.minAltitude),n.maxAltitude=parseFloat(i.maxAltitude)}},Lod:function(t,e){var i=IJ({},q1,t,e);if(i){var n=e[e.length-1];n.minLodPixels=parseFloat(i.minLodPixels),n.maxLodPixels=parseFloat(i.maxLodPixels),n.minFadeExtent=parseFloat(i.minFadeExtent),n.maxFadeExtent=parseFloat(i.maxFadeExtent)}}}),e1=EJ(q0,["Document","Placemark"]),i1=EJ(q0,{Document:wJ(function(t,e,i){OJ({node:t},t2,e2,e,i,void 0,this)}),Placemark:wJ(S2)}),n1=null,r1=null,s1=null,o1=null,a1=null,l1=null;function c1(t){return t}var h1=function(t){function e(e){var i=t.call(this)||this,n=e||{};return l1||(n1=new RZ({color:P0=[255,255,255,1]}),r1=new Pq({anchor:O0=[20,2],anchorOrigin:"bottom-left",anchorXUnits:M0="pixels",anchorYUnits:T0="pixels",crossOrigin:"anonymous",rotation:0,scale:F0=.5,size:R0=[64,64],src:V0="https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png"}),L0="NO_IMAGE",s1=new VZ({color:P0,width:1}),U0=new VZ({color:[51,51,51,1],width:2}),o1=new cY({font:"bold 16px Helvetica",fill:n1,stroke:U0,scale:.8}),a1=new jZ({fill:n1,image:r1,text:o1,stroke:s1,zIndex:0}),l1=[a1]),i.dataProjection=eE("EPSG:4326"),i.defaultStyle_=n.defaultStyle?n.defaultStyle:l1,i.extractStyles_=void 0===n.extractStyles||n.extractStyles,i.writeStyles_=void 0===n.writeStyles||n.writeStyles,i.sharedStyles_={},i.showPointNames_=void 0===n.showPointNames||n.showPointNames,i.crossOrigin_=void 0!==n.crossOrigin?n.crossOrigin:"anonymous",i.iconUrlFunction_=n.iconUrlFunction?n.iconUrlFunction:c1,i}return W0(e,t),e.prototype.readDocumentOrFolder_=function(t,e){return IJ([],EJ(q0,{Document:bJ(this.readDocumentOrFolder_,this),Folder:bJ(this.readDocumentOrFolder_,this),Placemark:vJ(this.readPlacemark_,this),Style:this.readSharedStyle_.bind(this),StyleMap:this.readSharedStyleMap_.bind(this)}),t,e,this)||void 0},e.prototype.readPlacemark_=function(t,e){var i,n,r,s,o,a=IJ({geometry:null},Q0,t,e,this);if(a){var l=new pH,c=t.getAttribute("id");null!==c&&l.setId(c);var h=a.geometry;if(h&&bH(h,!1,e[0]),l.setGeometry(h),delete a.geometry,this.extractStyles_){var u=(i=a.Style,n=a.styleUrl,r=this.defaultStyle_,s=this.sharedStyles_,o=this.showPointNames_,function(t,e){var a=o,l="",c=[];if(a){var h=t.getGeometry();if(h){var u=h.getType();a="GeometryCollection"===u?(c=h.getGeometriesArrayRecursive().filter(function(t){var e=t.getType();return"Point"===e||"MultiPoint"===e})).length>0:"Point"===u||"MultiPoint"===u}}a&&(l=t.get("name"),(a=a&&!!l)&&l.search(/&[^&]+;/)>-1&&(B0||(B0=document.createElement("textarea")),B0.innerHTML=l,l=B0.value));var d=r;if(i?d=i:n&&(d=u1(n,r,s)),a){var p=function(t,e){var i=[0,0],n="start",r=t.getImage();if(r){var s=r.getImageSize();if(null===s&&(s=R0),2==s.length){var o=r.getScaleArray();i[0]=o[0]*s[0]/2,i[1]=-o[1]*s[1]/2,n="left"}}var a=t.getText();return a?((a=a.clone()).setFont(a.getFont()||o1.getFont()),a.setScale(a.getScale()||o1.getScale()),a.setFill(a.getFill()||o1.getFill()),a.setStroke(a.getStroke()||U0)):a=o1.clone(),a.setText(e),a.setOffsetX(i[0]),a.setOffsetY(i[1]),a.setTextAlign(n),new jZ({image:r,text:a})}(d[0],l);return c.length>0?(p.setGeometry(new gH(c)),[p,new jZ({geometry:d[0].getGeometry(),image:null,fill:d[0].getFill(),stroke:d[0].getStroke(),text:null})].concat(d.slice(1))):p}return d});l.setStyle(u)}return delete a.Style,l.setProperties(a,!0),l}},e.prototype.readSharedStyle_=function(t,e){var i=t.getAttribute("id");if(null!==i){var n=N1.call(this,t,e);if(n){var r,s=t.baseURI;s&&"about:blank"!=s||(s=window.location.href),r=s?new URL("#"+i,s).href:"#"+i,this.sharedStyles_[r]=n}}},e.prototype.readSharedStyleMap_=function(t,e){var i=t.getAttribute("id");if(null!==i){var n=b1.call(this,t,e);if(n){var r,s=t.baseURI;s&&"about:blank"!=s||(s=window.location.href),r=s?new URL("#"+i,s).href:"#"+i,this.sharedStyles_[r]=n}}},e.prototype.readFeatureFromNode=function(t,e){return RC(q0,t.namespaceURI)&&this.readPlacemark_(t,[this.getReadOptions(t,e)])||null},e.prototype.readFeaturesFromNode=function(t,e){if(!RC(q0,t.namespaceURI))return[];var i,n=t.localName;if("Document"==n||"Folder"==n)return(i=this.readDocumentOrFolder_(t,[this.getReadOptions(t,e)]))||[];if("Placemark"==n){var r=this.readPlacemark_(t,[this.getReadOptions(t,e)]);return r?[r]:[]}if("kml"==n){i=[];for(var s=t.firstElementChild;s;s=s.nextElementSibling){var o=this.readFeaturesFromNode(s,e);o&&LC(i,o)}return i}return[]},e.prototype.readName=function(t){if(t){if("string"==typeof t){var e=AJ(t);return this.readNameFromDocument(e)}return gJ(t)?this.readNameFromDocument(t):this.readNameFromNode(t)}},e.prototype.readNameFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE){var i=this.readNameFromNode(e);if(i)return i}},e.prototype.readNameFromNode=function(t){for(var e=t.firstElementChild;e;e=e.nextElementSibling)if(RC(q0,e.namespaceURI)&&"name"==e.localName)return jJ(e);for(e=t.firstElementChild;e;e=e.nextElementSibling){var i=e.localName;if(RC(q0,e.namespaceURI)&&("Document"==i||"Folder"==i||"Placemark"==i||"kml"==i)){var n=this.readNameFromNode(e);if(n)return n}}},e.prototype.readNetworkLinks=function(t){var e=[];if("string"==typeof t){var i=AJ(t);LC(e,this.readNetworkLinksFromDocument(i))}else gJ(t)?LC(e,this.readNetworkLinksFromDocument(t)):LC(e,this.readNetworkLinksFromNode(t));return e},e.prototype.readNetworkLinksFromDocument=function(t){for(var e=[],i=t.firstChild;i;i=i.nextSibling)i.nodeType==Node.ELEMENT_NODE&&LC(e,this.readNetworkLinksFromNode(i));return e},e.prototype.readNetworkLinksFromNode=function(t){for(var e=[],i=t.firstElementChild;i;i=i.nextElementSibling)if(RC(q0,i.namespaceURI)&&"NetworkLink"==i.localName){var n=IJ({},X0,i,[]);e.push(n)}for(i=t.firstElementChild;i;i=i.nextElementSibling){var r=i.localName;!RC(q0,i.namespaceURI)||"Document"!=r&&"Folder"!=r&&"kml"!=r||LC(e,this.readNetworkLinksFromNode(i))}return e},e.prototype.readRegion=function(t){var e=[];if("string"==typeof t){var i=AJ(t);LC(e,this.readRegionFromDocument(i))}else gJ(t)?LC(e,this.readRegionFromDocument(t)):LC(e,this.readRegionFromNode(t));return e},e.prototype.readRegionFromDocument=function(t){for(var e=[],i=t.firstChild;i;i=i.nextSibling)i.nodeType==Node.ELEMENT_NODE&&LC(e,this.readRegionFromNode(i));return e},e.prototype.readRegionFromNode=function(t){for(var e=[],i=t.firstElementChild;i;i=i.nextElementSibling)if(RC(q0,i.namespaceURI)&&"Region"==i.localName){var n=IJ({},t1,i,[]);e.push(n)}for(i=t.firstElementChild;i;i=i.nextElementSibling){var r=i.localName;!RC(q0,i.namespaceURI)||"Document"!=r&&"Folder"!=r&&"kml"!=r||LC(e,this.readRegionFromNode(i))}return e},e.prototype.writeFeaturesNode=function(t,e){e=this.adaptOptions(e);var i=pJ(q0[4],"kml"),n="http://www.w3.org/2000/xmlns/";i.setAttributeNS(n,"xmlns:gx",Z0[0]),i.setAttributeNS(n,"xmlns:xsi",dJ),i.setAttributeNS(dJ,"xsi:schemaLocation","http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd");var r={node:i},s={};t.length>1?s.Document=t:1==t.length&&(s.Placemark=t[0]);var o=e1[i.namespaceURI],a=kJ(s,o);return OJ(r,i1,SJ,a,[e],o,this),i},e}(FJ);function u1(t,e,i){return Array.isArray(t)?t:"string"==typeof t?u1(i[t],e,i):e}function d1(t){var e=fJ(t,!1),i=/^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(e);if(i){var n=i[1];return[parseInt(n.substr(6,2),16),parseInt(n.substr(4,2),16),parseInt(n.substr(2,2),16),parseInt(n.substr(0,2),16)/255]}}function p1(t){var e=fJ(t,!1),i=[];e=e.replace(/\s*,\s*/g,",");for(var n,r=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?),([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|,|$)(?:([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|$))?\s*/i;n=r.exec(e);){var s=parseFloat(n[1]),o=parseFloat(n[2]),a=n[3]?parseFloat(n[3]):0;i.push(s,o,a),e=e.substr(n[0].length)}if(""===e)return i}function f1(t){var e=fJ(t,!1).trim(),i=t.baseURI;return i&&"about:blank"!=i||(i=window.location.href),i?new URL(e,i).href:e}function m1(t){var e=fJ(t,!1).trim().replace(/^(?!.*#)/,"#"),i=t.baseURI;return i&&"about:blank"!=i||(i=window.location.href),i?new URL(e,i).href:e}function g1(t){return BJ(t)}var A1=EJ(q0,{Pair:function(t,e){var i=IJ({},G1,t,e,this);if(i){var n=i.key;if(n&&"normal"==n){var r=i.styleUrl;r&&(e[e.length-1]=r);var s=i.Style;s&&(e[e.length-1]=s)}}}});function b1(t,e){return IJ(void 0,A1,t,e,this)}var v1=EJ(q0,{Icon:yJ(function(t,e){return IJ({},D1,t,e)||null}),color:yJ(d1),heading:yJ(BJ),hotSpot:yJ(function(t){var e,i=t.getAttribute("xunits"),n=t.getAttribute("yunits");return e="insetPixels"!==i?"insetPixels"!==n?"bottom-left":"top-left":"insetPixels"!==n?"bottom-right":"top-right",{x:parseFloat(t.getAttribute("x")),xunits:Y0[i],y:parseFloat(t.getAttribute("y")),yunits:Y0[n],origin:e}}),scale:yJ(g1)}),_1=EJ(q0,{color:yJ(d1),scale:yJ(g1)}),y1=EJ(q0,{color:yJ(d1),width:yJ(BJ)}),w1=EJ(q0,{color:yJ(d1),fill:yJ(LJ),outline:yJ(LJ)}),x1=EJ(q0,{coordinates:_J(p1)});function C1(t,e){return IJ(null,x1,t,e)}var S1=EJ(Z0,{Track:vJ(E1)}),k1=EJ(q0,{when:function(t,e){var i=e[e.length-1].whens,n=fJ(t,!1),r=Date.parse(n);i.push(isNaN(r)?0:r)}},EJ(Z0,{coord:function(t,e){var i=e[e.length-1].flatCoordinates,n=fJ(t,!1),r=/^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i.exec(n);if(r){var s=parseFloat(r[1]),o=parseFloat(r[2]),a=parseFloat(r[3]);i.push(s,o,a,0)}else i.push(0,0,0,0)}}));function E1(t,e){var i=IJ({flatCoordinates:[],whens:[]},k1,t,e);if(i){for(var n=i.flatCoordinates,r=i.whens,s=0,o=Math.min(n.length,r.length);s<o;++s)n[4*s+3]=r[s];return new kH(n,"XYZM")}}var D1=EJ(q0,{href:yJ(f1)},EJ(Z0,{x:yJ(BJ),y:yJ(BJ),w:yJ(BJ),h:yJ(BJ)})),I1=EJ(q0,{coordinates:_J(p1)});function P1(t,e){return IJ(null,I1,t,e)}var O1=EJ(q0,{extrude:yJ(LJ),tessellate:yJ(LJ),altitudeMode:yJ(jJ)});function M1(t,e){var i=IJ({},O1,t,e),n=P1(t,e);if(n){var r=new kH(n,"XYZ");return r.setProperties(i,!0),r}}function T1(t,e){var i=IJ({},O1,t,e),n=P1(t,e);if(n){var r=new iT(n,"XYZ",[n.length]);return r.setProperties(i,!0),r}}var R1=EJ(q0,{LineString:vJ(M1),LinearRing:vJ(T1),MultiGeometry:vJ(V1),Point:vJ(F1),Polygon:vJ(U1)});function V1(t,e){var i,n=IJ([],R1,t,e);if(!n)return null;if(0===n.length)return new gH(n);for(var r=!0,s=n[0].getType(),o=1,a=n.length;o<a;++o)if(n[o].getType()!=s){r=!1;break}if(r){var l=void 0,c=void 0;if("Point"==s){var h=n[0];for(l=h.getLayout(),c=h.getFlatCoordinates(),o=1,a=n.length;o<a;++o)LC(c,n[o].getFlatCoordinates());j1(i=new PH(c,l),n)}else"LineString"==s?j1(i=new DH(n),n):"Polygon"==s?j1(i=new MH(n),n):"GeometryCollection"==s?i=new gH(n):yS(!1,37)}else i=new gH(n);return i}function F1(t,e){var i=IJ({},O1,t,e),n=P1(t,e);if(n){var r=new jM(n,"XYZ");return r.setProperties(i,!0),r}}var L1=EJ(q0,{innerBoundaryIs:function(t,e){var i=IJ(void 0,Y1,t,e);i&&e[e.length-1].push(i)},outerBoundaryIs:function(t,e){var i=IJ(void 0,Q1,t,e);i&&(e[e.length-1][0]=i)}});function U1(t,e){var i=IJ({},O1,t,e),n=IJ([null],L1,t,e);if(n&&n[0]){for(var r=n[0],s=[r.length],o=1,a=n.length;o<a;++o)LC(r,n[o]),s.push(r.length);var l=new iT(r,"XYZ",s);return l.setProperties(i,!0),l}}var B1=EJ(q0,{IconStyle:function(t,e){var i=IJ({},v1,t,e);if(i){var n,r,s,o,a=e[e.length-1],l="Icon"in i?i.Icon:{},c=!("Icon"in i)||Object.keys(l).length>0,h=l.href;h?n=h:c&&(n=V0);var u,d="bottom-left",p=i.hotSpot;p?(r=[p.x,p.y],s=p.xunits,o=p.yunits,d=p.origin):n===V0?(r=O0,s=M0,o=T0):/^http:\/\/maps\.(?:google|gstatic)\.com\//.test(n)&&(r=[.5,0],s="fraction",o="fraction");var f,m=l.x,g=l.y;void 0!==m&&void 0!==g&&(u=[m,g]);var A,b=l.w,v=l.h;void 0!==b&&void 0!==v&&(f=[b,v]);var _=i.heading;void 0!==_&&(A=Ak(_));var y=i.scale,w=i.color;if(c){n==V0&&(f=R0,void 0===y&&(y=F0));var x=new Pq({anchor:r,anchorOrigin:d,anchorXUnits:s,anchorYUnits:o,crossOrigin:this.crossOrigin_,offset:u,offsetOrigin:"bottom-left",rotation:A,scale:y,size:f,src:this.iconUrlFunction_(n),color:w});a.imageStyle=x}else a.imageStyle=L0}},LabelStyle:function(t,e){var i=IJ({},_1,t,e);if(i){var n=e[e.length-1],r=new cY({fill:new RZ({color:"color"in i?i.color:P0}),scale:i.scale});n.textStyle=r}},LineStyle:function(t,e){var i=IJ({},y1,t,e);if(i){var n=e[e.length-1],r=new VZ({color:"color"in i?i.color:P0,width:"width"in i?i.width:1});n.strokeStyle=r}},PolyStyle:function(t,e){var i=IJ({},w1,t,e);if(i){var n=e[e.length-1],r=new RZ({color:"color"in i?i.color:P0});n.fillStyle=r;var s=i.fill;void 0!==s&&(n.fill=s);var o=i.outline;void 0!==o&&(n.outline=o)}}});function N1(t,e){var i=IJ({},B1,t,e,this);if(!i)return null;var n,r="fillStyle"in i?i.fillStyle:n1,s=i.fill;void 0===s||s||(r=null),"imageStyle"in i?i.imageStyle!=L0&&(n=i.imageStyle):n=r1;var o="textStyle"in i?i.textStyle:o1,a="strokeStyle"in i?i.strokeStyle:s1,l=i.outline;return void 0===l||l?[new jZ({fill:r,image:n,stroke:a,text:o,zIndex:void 0})]:[new jZ({geometry:function(t){var e=t.getGeometry(),i=e.getType();return"GeometryCollection"===i?new gH(e.getGeometriesArrayRecursive().filter(function(t){var e=t.getType();return"Polygon"!==e&&"MultiPolygon"!==e})):"Polygon"!==i&&"MultiPolygon"!==i?e:void 0},fill:r,image:n,stroke:a,text:o,zIndex:void 0}),new jZ({geometry:function(t){var e=t.getGeometry(),i=e.getType();return"GeometryCollection"===i?new gH(e.getGeometriesArrayRecursive().filter(function(t){var e=t.getType();return"Polygon"===e||"MultiPolygon"===e})):"Polygon"===i||"MultiPolygon"===i?e:void 0},fill:r,stroke:null,zIndex:void 0})]}function j1(t,e){var i,n,r,s=e.length,o=new Array(e.length),a=new Array(e.length),l=new Array(e.length);i=!1,n=!1,r=!1;for(var c=0;c<s;++c){var h=e[c];o[c]=h.get("extrude"),a[c]=h.get("tessellate"),l[c]=h.get("altitudeMode"),i=i||void 0!==o[c],n=n||void 0!==a[c],r=r||l[c]}i&&t.set("extrude",o),n&&t.set("tessellate",a),r&&t.set("altitudeMode",l)}var z1=EJ(q0,{displayName:yJ(jJ),value:yJ(jJ)}),H1=EJ(q0,{Data:function(t,e){var i=t.getAttribute("name");DJ(z1,t,e);var n=e[e.length-1];i&&n.displayName?n[i]={value:n.value,displayName:n.displayName,toString:function(){return n.value}}:null!==i?n[i]=n.value:null!==n.displayName&&(n[n.displayName]=n.value),delete n.value},SchemaData:function(t,e){DJ(W1,t,e)}});function K1(t,e){DJ(H1,t,e)}function $1(t,e){DJ(t1,t,e)}var G1=EJ(q0,{Style:yJ(N1),key:yJ(jJ),styleUrl:yJ(m1)}),W1=EJ(q0,{SimpleData:function(t,e){var i=t.getAttribute("name");if(null!==i){var n=jJ(t);e[e.length-1][i]=n}}}),Z1=EJ(q0,{altitudeMode:yJ(jJ),minAltitude:yJ(BJ),maxAltitude:yJ(BJ),north:yJ(BJ),south:yJ(BJ),east:yJ(BJ),west:yJ(BJ)}),q1=EJ(q0,{minLodPixels:yJ(BJ),maxLodPixels:yJ(BJ),minFadeExtent:yJ(BJ),maxFadeExtent:yJ(BJ)}),Y1=EJ(q0,{LinearRing:_J(C1)}),Q1=EJ(q0,{LinearRing:_J(C1)});function X1(t,e){for(var i=_W(e),n=[255*(4==i.length?i[3]:1),i[2],i[1],i[0]],r=0;r<4;++r){var s=Math.floor(n[r]).toString(16);n[r]=1==s.length?"0"+s:s}$J(t,n.join(""))}var J1=EJ(q0,{Data:wJ(function(t,e,i){t.setAttribute("name",e.name);var n={node:t},r=e.value;"object"==typeof r?(null!==r&&r.displayName&&OJ(n,J1,SJ,[r.displayName],i,["displayName"]),null!==r&&r.value&&OJ(n,J1,SJ,[r.value],i,["value"])):OJ(n,J1,SJ,[r],i,["value"])}),value:wJ(function(t,e){$J(t,e)}),displayName:wJ(function(t,e){!function(t,e){t.appendChild(RJ().createCDATASection(e))}(t,e)})}),t2=EJ(q0,{Placemark:wJ(S2)}),e2=function(t,e,i){return pJ(e[e.length-1].node.namespaceURI,"Placemark")},i2=CJ("Data"),n2=EJ(q0,["href"],EJ(Z0,["x","y","w","h"])),r2=EJ(q0,{href:wJ($J)},EJ(Z0,{x:wJ(HJ),y:wJ(HJ),w:wJ(HJ),h:wJ(HJ)})),s2=function(t,e,i){return pJ(Z0[0],"gx:"+i)},o2=EJ(q0,["scale","heading","Icon","color","hotSpot"]),a2=EJ(q0,{Icon:wJ(function(t,e,i){var n={node:t},r=n2[i[i.length-1].node.namespaceURI],s=kJ(e,r);OJ(n,r2,SJ,s,i,r),s=kJ(e,r=n2[Z0[0]]),OJ(n,r2,s2,s,i,r)}),color:wJ(X1),heading:wJ(HJ),hotSpot:wJ(function(t,e){t.setAttribute("x",String(e.x)),t.setAttribute("y",String(e.y)),t.setAttribute("xunits",e.xunits),t.setAttribute("yunits",e.yunits)}),scale:wJ(V2)}),l2=EJ(q0,["color","scale"]),c2=EJ(q0,{color:wJ(X1),scale:wJ(V2)}),h2=EJ(q0,["color","width"]),u2=EJ(q0,{color:wJ(X1),width:wJ(HJ)}),d2={Point:"Point",LineString:"LineString",LinearRing:"LinearRing",Polygon:"Polygon",MultiPoint:"MultiGeometry",MultiLineString:"MultiGeometry",MultiPolygon:"MultiGeometry",GeometryCollection:"MultiGeometry"},p2=function(t,e,i){if(t)return pJ(e[e.length-1].node.namespaceURI,d2[t.getType()])},f2=CJ("Point"),m2=CJ("LineString"),g2=CJ("LinearRing"),A2=CJ("Polygon"),b2=EJ(q0,{LineString:wJ(D2),Point:wJ(D2),Polygon:wJ(T2),GeometryCollection:wJ(v2)});function v2(t,e,i){var n,r={node:t},s=e.getType(),o=[];"GeometryCollection"===s?(e.getGeometriesArrayRecursive().forEach(function(t){var e=t.getType();"MultiPoint"===e?o=o.concat(t.getPoints()):"MultiLineString"===e?o=o.concat(t.getLineStrings()):"MultiPolygon"===e?o=o.concat(t.getPolygons()):"Point"===e||"LineString"===e||"Polygon"===e?o.push(t):yS(!1,39)}),n=p2):"MultiPoint"===s?(o=e.getPoints(),n=f2):"MultiLineString"===s?(o=e.getLineStrings(),n=m2):"MultiPolygon"===s?(o=e.getPolygons(),n=A2):yS(!1,39),OJ(r,b2,n,o,i)}var _2=EJ(q0,{LinearRing:wJ(D2)});function y2(t,e,i){OJ({node:t},_2,g2,[e],i)}var w2=EJ(q0,{ExtendedData:wJ(function(t,e,i){for(var n={node:t},r=e.names,s=e.values,o=r.length,a=0;a<o;a++)OJ(n,J1,i2,[{name:r[a],value:s[a]}],i)}),MultiGeometry:wJ(v2),LineString:wJ(D2),LinearRing:wJ(D2),Point:wJ(D2),Polygon:wJ(T2),Style:wJ(function(t,e,i){var n,r={node:t},s={};if(e.pointStyles.length){var o=e.pointStyles[0].getText();o&&(s.LabelStyle=o);var a=e.pointStyles[0].getImage();a&&"function"==typeof a.getSrc&&(s.IconStyle=a)}e.lineStyles.length&&(n=e.lineStyles[0].getStroke())&&(s.LineStyle=n),e.polyStyles.length&&((n=e.polyStyles[0].getStroke())&&!s.LineStyle&&(s.LineStyle=n),s.PolyStyle=e.polyStyles[0]);var l=F2[i[i.length-1].node.namespaceURI],c=kJ(s,l);OJ(r,L2,SJ,c,i,l)}),address:wJ($J),description:wJ($J),name:wJ($J),open:wJ(zJ),phoneNumber:wJ($J),styleUrl:wJ($J),visibility:wJ(zJ)}),x2=EJ(q0,["name","open","visibility","address","phoneNumber","description","styleUrl","Style"]),C2=CJ("ExtendedData");function S2(t,e,i){var n={node:t};e.getId()&&t.setAttribute("id",e.getId());var r=e.getProperties(),s={address:1,description:1,name:1,open:1,phoneNumber:1,styleUrl:1,visibility:1};s[e.getGeometryName()]=1;var o=Object.keys(r||{}).sort().filter(function(t){return!s[t]}),a=e.getStyleFunction();if(a){var l=a(e,0);if(l){var c=Array.isArray(l)?l:[l],h=c;if(e.getGeometry()&&(h=c.filter(function(t){var i=t.getGeometryFunction()(e);if(i){var n=i.getType();return"GeometryCollection"===n?i.getGeometriesArrayRecursive().filter(function(t){var e=t.getType();return"Point"===e||"MultiPoint"===e}).length:"Point"===n||"MultiPoint"===n}})),this.writeStyles_){var u=c,d=c;e.getGeometry()&&(u=c.filter(function(t){var i=t.getGeometryFunction()(e);if(i){var n=i.getType();return"GeometryCollection"===n?i.getGeometriesArrayRecursive().filter(function(t){var e=t.getType();return"LineString"===e||"MultiLineString"===e}).length:"LineString"===n||"MultiLineString"===n}}),d=c.filter(function(t){var i=t.getGeometryFunction()(e);if(i){var n=i.getType();return"GeometryCollection"===n?i.getGeometriesArrayRecursive().filter(function(t){var e=t.getType();return"Polygon"===e||"MultiPolygon"===e}).length:"Polygon"===n||"MultiPolygon"===n}})),r.Style={pointStyles:h,lineStyles:u,polyStyles:d}}if(h.length&&void 0===r.name){var p=h[0].getText();p&&(r.name=p.getText())}}}var f=x2[i[i.length-1].node.namespaceURI],m=kJ(r,f);if(OJ(n,w2,SJ,m,i,f),o.length>0){var g=kJ(r,o);OJ(n,w2,C2,[{names:o,values:g}],i)}var A=i[0],b=e.getGeometry();b&&(b=bH(b,!0,A)),OJ(n,w2,p2,[b],i)}var k2=EJ(q0,["extrude","tessellate","altitudeMode","coordinates"]),E2=EJ(q0,{extrude:wJ(zJ),tessellate:wJ(zJ),altitudeMode:wJ($J),coordinates:wJ(function(t,e,i){var n,r=i[i.length-1],s=r.layout,o=r.stride;"XY"==s||"XYM"==s?n=2:"XYZ"==s||"XYZM"==s?n=3:yS(!1,34);var a=e.length,l="";if(a>0){l+=e[0];for(var c=1;c<n;++c)l+=","+e[c];for(var h=o;h<a;h+=o)for(l+=" "+e[h],c=1;c<n;++c)l+=","+e[h+c]}$J(t,l)})});function D2(t,e,i){var n=e.getFlatCoordinates(),r={node:t};r.layout=e.getLayout(),r.stride=e.getStride();var s=e.getProperties();s.coordinates=n;var o=k2[i[i.length-1].node.namespaceURI],a=kJ(s,o);OJ(r,E2,SJ,a,i,o)}var I2=EJ(q0,["color","fill","outline"]),P2=EJ(q0,{outerBoundaryIs:wJ(y2),innerBoundaryIs:wJ(y2)}),O2=CJ("innerBoundaryIs"),M2=CJ("outerBoundaryIs");function T2(t,e,i){var n=e.getLinearRings(),r=n.shift(),s={node:t};OJ(s,P2,O2,n,i),OJ(s,P2,M2,[r],i)}var R2=EJ(q0,{color:wJ(X1),fill:wJ(zJ),outline:wJ(zJ)});function V2(t,e){HJ(t,Math.round(1e6*e)/1e6)}var F2=EJ(q0,["IconStyle","LabelStyle","LineStyle","PolyStyle"]),L2=EJ(q0,{IconStyle:wJ(function(t,e,i){var n={node:t},r={},s=e.getSrc(),o=e.getSize(),a=e.getImageSize(),l={href:s};if(o){l.w=o[0],l.h=o[1];var c=e.getAnchor(),h=e.getOrigin();h&&a&&0!==h[0]&&h[1]!==o[1]&&(l.x=h[0],l.y=a[1]-(h[1]+o[1])),!c||c[0]===o[0]/2&&c[1]===o[1]/2||(r.hotSpot={x:c[0],xunits:"pixels",y:o[1]-c[1],yunits:"pixels"})}r.Icon=l;var u=e.getScale();1!==u&&(r.scale=u);var d=e.getRotation();0!==d&&(r.heading=d);var p=e.getColor();p&&(r.color=p);var f=o2[i[i.length-1].node.namespaceURI],m=kJ(r,f);OJ(n,a2,SJ,m,i,f)}),LabelStyle:wJ(function(t,e,i){var n={node:t},r={},s=e.getFill();s&&(r.color=s.getColor());var o=e.getScale();o&&1!==o&&(r.scale=o);var a=l2[i[i.length-1].node.namespaceURI],l=kJ(r,a);OJ(n,c2,SJ,l,i,a)}),LineStyle:wJ(function(t,e,i){var n={node:t},r={color:e.getColor(),width:Number(e.getWidth())||1},s=h2[i[i.length-1].node.namespaceURI],o=kJ(r,s);OJ(n,u2,SJ,o,i,s)}),PolyStyle:wJ(function(t,e,i){var n={node:t},r=e.getFill(),s=e.getStroke(),o={color:r?r.getColor():void 0,fill:!!r&&void 0,outline:!!s&&void 0},a=I2[i[i.length-1].node.namespaceURI],l=kJ(o,a);OJ(n,R2,SJ,l,i,a)})}),U2=h1,B2=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),N2=function(t){function e(e){var i=t.call(this)||this,n=e||{};return i.layerName_=n.layerName,i.layers_=n.layers?n.layers:null,i.dataProjection=eE(n.dataProjection?n.dataProjection:"EPSG:4326"),i}return B2(e,t),e.prototype.readFeaturesFromObject=function(t,e){if("Topology"==t.type){var i=t,n=void 0,r=null,s=null;i.transform&&(r=(n=i.transform).scale,s=n.translate);var o=i.arcs;n&&function(t,e,i){for(var n=0,r=t.length;n<r;++n)$2(t[n],e,i)}(o,r,s);var a=[],l=i.objects,c=this.layerName_;for(var h in l)this.layers_&&-1==this.layers_.indexOf(h)||("GeometryCollection"===l[h].type?a.push.apply(a,H2(l[h],o,r,s,c,h,e)):a.push(K2(l[h],o,r,s,c,h,e)));return a}return[]},e.prototype.readProjectionFromObject=function(t){return this.dataProjection},e}(yH),j2={Point:function(t,e,i){var n=t.coordinates;return e&&i&&G2(n,e,i),new jM(n)},LineString:function(t,e){var i=z2(t.arcs,e);return new kH(i)},Polygon:function(t,e){for(var i=[],n=0,r=t.arcs.length;n<r;++n)i[n]=z2(t.arcs[n],e);return new iT(i)},MultiPoint:function(t,e,i){var n=t.coordinates;if(e&&i)for(var r=0,s=n.length;r<s;++r)G2(n[r],e,i);return new PH(n)},MultiLineString:function(t,e){for(var i=[],n=0,r=t.arcs.length;n<r;++n)i[n]=z2(t.arcs[n],e);return new DH(i)},MultiPolygon:function(t,e){for(var i=[],n=0,r=t.arcs.length;n<r;++n){for(var s=t.arcs[n],o=[],a=0,l=s.length;a<l;++a)o[a]=z2(s[a],e);i[n]=o}return new MH(i)}};function z2(t,e){for(var i,n,r=[],s=0,o=t.length;s<o;++s)i=t[s],s>0&&r.pop(),n=i>=0?e[i]:e[~i].slice().reverse(),r.push.apply(r,n);for(var a=0,l=r.length;a<l;++a)r[a]=r[a].slice();return r}function H2(t,e,i,n,r,s,o){for(var a=t.geometries,l=[],c=0,h=a.length;c<h;++c)l[c]=K2(a[c],e,i,n,r,s,o);return l}function K2(t,e,i,n,r,s,o){var a,l=t.type,c=j2[l];a="Point"===l||"MultiPoint"===l?c(t,i,n):c(t,e);var h=new pH;h.setGeometry(bH(a,!1,o)),void 0!==t.id&&h.setId(t.id);var u=t.properties;return r&&(u||(u={}),u[r]=s),u&&h.setProperties(u,!0),h}function $2(t,e,i){for(var n=0,r=0,s=0,o=t.length;s<o;++s){var a=t[s];r+=a[1],a[0]=n+=a[0],a[1]=r,G2(a,e,i)}}function G2(t,e,i){t[0]=t[0]*e[0]+i[0],t[1]=t[1]*e[1]+i[1]}var W2=N2,Z2=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),q2=function(t){function e(e,i,n,r){var s=t.call(this,e)||this;return s.features=n,s.file=i,s.projection=r,s}return Z2(e,t),e}(MC),Y2=function(t){function e(e){var i=this,n=e||{};(i=t.call(this,{handleEvent:BC})||this).readAsBuffer_=!1,i.formats_=[];for(var r=n.formatConstructors?n.formatConstructors:[],s=0,o=r.length;s<o;++s){var a=r[s];"function"==typeof a&&(a=new a),i.formats_.push(a),i.readAsBuffer_=i.readAsBuffer_||"arraybuffer"===a.getType()}return i.projection_=n.projection?eE(n.projection):null,i.dropListenKeys_=null,i.source_=n.source||null,i.target=n.target?n.target:null,i}return Z2(e,t),e.prototype.handleResult_=function(t,e){var i,n=e.target.result,r=this.getMap(),s=this.projection_;s||(s=r.getView().getProjection());for(var o=this.formats_,a=0,l=o.length;a<l;++a){var c=o[a],h=n;this.readAsBuffer_&&"arraybuffer"!==c.getType()&&(void 0===i&&(i=(new TextDecoder).decode(n)),h=i);var u=this.tryReadFeatures_(c,h,{featureProjection:s});if(u&&u.length>0){this.source_&&(this.source_.clear(),this.source_.addFeatures(u)),this.dispatchEvent(new q2("addfeatures",t,u,s));break}}},e.prototype.registerListeners_=function(){var t=this.getMap();if(t){var e=this.target?this.target:t.getViewport();this.dropListenKeys_=[tk(e,"drop",this.handleDrop,this),tk(e,"dragenter",this.handleStop,this),tk(e,"dragover",this.handleStop,this),tk(e,"drop",this.handleStop,this)]}},e.prototype.setActive=function(e){!this.getActive()&&e&&this.registerListeners_(),this.getActive()&&!e&&this.unregisterListeners_(),t.prototype.setActive.call(this,e)},e.prototype.setMap=function(e){this.unregisterListeners_(),t.prototype.setMap.call(this,e),this.getActive()&&this.registerListeners_()},e.prototype.tryReadFeatures_=function(t,e,i){try{return t.readFeatures(e,i)}catch($nt){return null}},e.prototype.unregisterListeners_=function(){this.dropListenKeys_&&(this.dropListenKeys_.forEach(ik),this.dropListenKeys_=null)},e.prototype.handleDrop=function(t){for(var e=t.dataTransfer.files,i=0,n=e.length;i<n;++i){var r=e.item(i),s=new FileReader;s.addEventListener("load",this.handleResult_.bind(this,r)),this.readAsBuffer_?s.readAsArrayBuffer(r):s.readAsText(r)}},e.prototype.handleStop=function(t){t.stopPropagation(),t.preventDefault(),t.dataTransfer.dropEffect="copy"},e}(K$);let Q2=(()=>{class t{constructor(){this.importEvent$=new _e.a}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function X2(t,e){1&t&&(r.Vb(0,"div",1),r.Vb(1,"mat-icon"),r.Kc(2,"arrow_forward"),r.Ub(),r.Kc(3," D\xe9posez vos fichiers GeoJSON, KML, TopoJSON, GPX, IGC... "),r.Vb(4,"mat-icon"),r.Kc(5,"arrow_back"),r.Ub(),r.Ub()),2&t&&r.nc("@fadeAnimation",void 0)}const J2=new RZ({color:"rgba(255,255,255,0.4)"}),t3=new VZ({color:"#3399CC",width:1.25}),e3=new jZ({image:new TZ({fill:J2,stroke:t3,radius:5}),fill:J2,stroke:t3}),i3=new RZ({color:"rgba(200,200,255,0.2)"}),n3=new VZ({color:"#1155FF",width:1.25}),r3=new jZ({image:new TZ({fill:i3,stroke:n3,radius:5}),fill:i3,stroke:n3}),s3=["ID","latitude_deg","longitude_deg","timestamp_utc"];let o3=(()=>{class t extends LT{constructor(t,e,i){super(),this.historyService=t,this.featureImportService=e,this.mapService=i,this.dragging=!1,this.previousHoveredFeatures=[]}ngOnInit(){this.ensureMandatoryInputParams("map"),this.source=new $q,this.layer=new Nq({source:this.source,updateWhileAnimating:!0,updateWhileInteracting:!0,style:e3}),this.map.addLayer(this.layer),this.dragAndDrop=new Y2({formatConstructors:[E0,FH,G0,U2,W2]}),this.dragAndDrop.on("addfeatures",t=>{const e=new EZ;var i;t.features.forEach(t=>{e.insert(t.getGeometry().getExtent(),t)}),this.mapService.fitOn(e.getExtent(),0),function(t){const e=t.getProperties();return s3.every(t=>void 0!==e[t])}(t.features[0])&&this.historyService.setTimestamp((i=t.features[0].get("timestamp_utc"),NO(new Date(i)))),this.source.addFeatures(t.features)}),this.map.addInteraction(this.dragAndDrop),this.createTooltip(),this.startDraggingListener=()=>{this.dragging=!0},this.stopDraggingListener=()=>{this.dragging=!1},this.map.getViewport().addEventListener("dragenter",this.startDraggingListener),this.map.getViewport().addEventListener("dragleave",this.stopDraggingListener),this.map.getViewport().addEventListener("drop",this.stopDraggingListener),this.subscriptions.push(this.mapService.pointerMove$.subscribe(t=>{this.handleMoveEvent(t)}),this.featureImportService.importEvent$.subscribe(t=>{this.dragAndDrop.handleDrop(t)}))}ngOnDestroy(){super.ngOnDestroy(),this.map.removeLayer(this.layer),this.map.removeInteraction(this.dragAndDrop),this.map.getViewport().removeEventListener("dragenter",this.startDraggingListener),this.map.getViewport().removeEventListener("dragleave",this.stopDraggingListener),this.map.getViewport().removeEventListener("drop",this.stopDraggingListener)}createTooltip(){this.tooltipElement&&this.tooltipElement.parentNode.removeChild(this.tooltipElement),this.tooltipElement=document.createElement("div"),this.tooltipElement.className="feature-import-layer__tooltip",this.tooltipOverlay=new EX({element:this.tooltipElement,offset:[0,-10],positioning:"bottom-center"}),this.map.addOverlay(this.tooltipOverlay)}handleMoveEvent(t){const e=[];this.map.forEachFeatureAtPixel(t.pixel,t=>(e.push(t),!1),{hitTolerance:3,layerFilter:t=>t===this.layer});const i=e.filter(t=>!this.previousHoveredFeatures.includes(t)),n=this.previousHoveredFeatures.filter(t=>!e.includes(t));if(i.filter(t=>!t.getStyle()).forEach(t=>{t.setStyle(r3)}),n.filter(t=>t.getStyle()===r3).forEach(t=>{t.setStyle(null)}),i.length>0||n.length>0){const t=e.map(t=>Object.entries(t.getProperties()).filter(([t,e])=>"geometry"!==t).map(([t,e])=>`${t} : ${e}`).join("<br>")||"<em>G\xe9om\xe9trie import\xe9e</em>");this.tooltipElement.innerHTML=t.join('<hr class="feature-import-layer__separator">'),this.previousHoveredFeatures=e}e.length>0?(this.tooltipOverlay.setPosition(t.coordinate),this.tooltipElement.classList.remove("feature-import-layer__tooltip--hidden")):this.tooltipElement.classList.add("feature-import-layer__tooltip--hidden")}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(bI),r.Pb(Q2),r.Pb(pI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-feature-import-layer"]],inputs:{map:"map"},features:[r.Ab],decls:1,vars:1,consts:[["class","feature-import-layer__dropzone",4,"ngIf"],[1,"feature-import-layer__dropzone"]],template:function(t,e){1&t&&r.Ic(0,X2,6,1,"div",0),2&t&&r.nc("ngIf",e.dragging)},directives:[ut,Yp],styles:['.feature-import-layer__dropzone{position:absolute;top:0;left:0;bottom:0;right:0;z-index:20;display:flex;background-color:rgba(96,216,216,.5019607843137255);justify-content:center;align-items:center;border:4px dashed #20a4a4;font-size:2em;pointer-events:none;touch-action:none;-webkit-animation:fontZoom 1s ease infinite alternate;animation:fontZoom 1s ease infinite alternate}.feature-import-layer__dropzone .mat-icon{font-size:2em;height:1em;width:1em}.feature-import-layer__tooltip{position:relative;background:rgba(0,0,0,.7);border-radius:4px;color:#fff;padding:4px 8px;opacity:.8;white-space:nowrap;font-size:12px;pointer-events:none;touch-action:none}.feature-import-layer__tooltip:before{border-top:6px solid rgba(0,0,0,.7);border-right:6px solid transparent;border-left:6px solid transparent;content:"";position:absolute;bottom:-6px;margin-left:-7px;left:50%}.feature-import-layer__tooltip--hidden{display:none}.feature-import-layer__separator{background-color:#fff}@-webkit-keyframes fontZoom{0%{transform:scale(1)}to{transform:scale(1.2)}}@keyframes fontZoom{0%{transform:scale(1)}to{transform:scale(1.2)}}'],encapsulation:2,data:{animation:[$r("fadeAnimation",[Qr(":enter",[Zr({opacity:0}),Gr(500,Zr({opacity:1}))]),Qr(":leave",[Gr(500,Zr({opacity:0}))])])]}}),t})(),a3=(()=>{class t{constructor(t,e,i,n,r){this.aircraftsService=t,this.mapConfigService=e,this.mapService=i,this.mapStateService=n,this.shipsService=r,this.tooltips$=new Av.a([]),this.aircraftsExcludeList=[],this.shipsExcludeList=[],this.movedAircraftsTooltipsByICAO={},this.movedShipsTooltipsByMMSI={},this.refresh$=new Av.a(null),this.mapConfigService.showPermanentTooltips$.subscribe(t=>{t||(this.aircraftsExcludeList=[],this.shipsExcludeList=[],this.movedAircraftsTooltipsByICAO={},this.movedShipsTooltipsByMMSI={}),this.triggerRefresh()}),Hg([this.mapStateService.showAircraftsLayer$,this.aircraftsService.aircraftsInView$.pipe(mn((t,e)=>t.length===e.length&&t.every((t,i)=>e[i].icao===t.icao&&e[i].timestamp===t.timestamp))),this.mapStateService.showShipsLayer$,this.shipsService.shipsInView$.pipe(mn((t,e)=>t.length===e.length&&t.every((t,i)=>e[i].mmsi===t.mmsi&&e[i].timestamp===t.timestamp))),this.refresh$]).subscribe(([t,e,i,n])=>{const r=t?e.filter(t=>!this.aircraftsExcludeList.includes(t.icao)):[],s=i?n.filter(t=>!this.shipsExcludeList.includes(t.mmsi)):[],o=[].concat(r,s);this.tooltips$.next(o.map(t=>{let e;return e=t.kind===OP.Aircraft?this.movedAircraftsTooltipsByICAO[t.icao]:this.movedShipsTooltipsByMMSI[t.mmsi],e&&(e.entity=t),e||{lon:t.lon,lat:t.lat,positioning:"bottom-left",offset:[12,-12],entity:t}}))})}triggerRefresh(){this.refresh$.next(null)}excludeAircraft(t){this.aircraftsExcludeList.push(t),this.triggerRefresh()}excludeShip(t){this.shipsExcludeList.push(t),this.triggerRefresh()}startEntityTooltipMovement(t,e=[0,0]){var i;const n=this.tooltips$.value.findIndex(e=>e===t);if(-1===n)throw new Error("Impossible de d\xe9placer l'entit\xe9 (inconnue)");t.entity.kind===OP.Aircraft?this.movedAircraftsTooltipsByICAO[t.entity.icao]=t:this.movedShipsTooltipsByMMSI[t.entity.mmsi]=t,this.tooltips$.value[n].positioning="center-center",this.tooltips$.value[n].offset=[0,0],null===(i=this.pointerEventsSubscription)||void 0===i||i.unsubscribe(),this.pointerEventsSubscription=this.mapService.pointerMove$.subscribe(i=>{const r=i.map.getCoordinateFromPixel([i.pixel[0]+e[0],i.pixel[1]+e[1]]);if(!r)return;const s=aT([[t.entity.lon,t.entity.lat],oE(r)]);this.tooltips$.value[n].lon=s[1][0],this.tooltips$.value[n].lat=s[1][1],this.tooltips$.next(this.tooltips$.value)})}endEntityTooltipMovement(){this.pointerEventsSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(fX),r.Zb(hI),r.Zb(pI),r.Zb(gT),r.Zb(wT))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function l3(t,e){if(1&t&&(r.Vb(0,"span"),r.Kc(1),r.hc(2,"date"),r.Ub()),2&t){const t=r.gc(2);r.Db(1),r.Lc(r.kc(2,1,t.aircraft.timestamp,"yyyy-MM-dd HH:mm:ss z",t.mapConfigService.useUTCDates$.value&&"z"))}}function c3(t,e){if(1&t&&(r.Vb(0,"span",22),r.hc(1,"date"),r.Kc(2),r.hc(3,"timeago"),r.Ub()),2&t){const t=r.gc(2);r.oc("title",r.kc(1,2,t.aircraft.timestamp,"yyyy-MM-dd HH:mm:ss z",t.mapConfigService.useUTCDates$.value&&"z")),r.Db(2),r.Lc(r.ic(3,6,t.aircraft.timestamp))}}function h3(t,e){if(1&t&&(r.Vb(0,"div",8),r.Vb(1,"div",9),r.Vb(2,"div",10),r.Kc(3),r.Ub(),r.Qb(4,"mat-divider",11),r.Vb(5,"div",12),r.Kc(6),r.Ub(),r.Qb(7,"mat-divider",11),r.Vb(8,"div",13),r.Kc(9),r.Ub(),r.Ub(),r.Qb(10,"mat-divider"),r.Vb(11,"div",9),r.Vb(12,"div",14),r.Kc(13),r.Ub(),r.Qb(14,"mat-divider",11),r.Vb(15,"div",15),r.Kc(16),r.Ub(),r.Ub(),r.Qb(17,"mat-divider"),r.Vb(18,"div",9),r.Vb(19,"div",16),r.Kc(20),r.Ub(),r.Qb(21,"mat-divider",11),r.Vb(22,"div",17),r.Kc(23),r.Ub(),r.Ub(),r.Qb(24,"mat-divider"),r.Vb(25,"div",18),r.Vb(26,"mat-icon",19),r.Kc(27,"access_time"),r.Ub(),r.Ic(28,l3,3,5,"span",20),r.Ic(29,c3,4,8,"ng-template",null,21,r.Jc),r.Ub(),r.Ub()),2&t){const t=r.wc(30),e=r.gc();r.Db(3),r.Lc(e.aircraft.icao),r.Db(1),r.nc("vertical",!0),r.Db(2),r.Lc(e.aircraft.callsign||"?"),r.Db(1),r.nc("vertical",!0),r.Db(2),r.Lc(e.aircraft.registration||"?"),r.Db(4),r.Lc(e.aircraft.squawk||"?"),r.Db(1),r.nc("vertical",!0),r.Db(2),r.Lc(e.aircraft.altitude?e.aircraft.altitude+" ft":"?"),r.Db(4),r.Nc(" ",e.aircraft.fromIcao||"?"," \u2192 ",e.aircraft.toIcao||"?"," "),r.Db(1),r.nc("vertical",!0),r.Db(2),r.Lc(e.aircraft.speed?e.aircraft.speed+" kt":"?"),r.Db(5),r.nc("ngIf",e.historyModeActive)("ngIfElse",t)}}let u3=(()=>{class t extends LT{constructor(t){super(),this.mapConfigService=t,this.mini=!1,this.remove=new r.o,this.drag=new r.o}ngOnInit(){this.ensureMandatoryInputParams("aircraft","historyModeActive")}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-permanent-aircraft-tooltip"]],inputs:{aircraft:"aircraft",historyModeActive:"historyModeActive",mini:"mini"},outputs:{remove:"remove",drag:"drag"},features:[r.Ab],decls:13,vars:8,consts:[[1,"permanent-tooltip"],[1,"permanent-tooltip__header"],[1,"permanent-tooltip__flag",3,"flag"],[1,"permanent-tooltip__name"],["class","permanent-tooltip__content",4,"ngIf"],[1,"permanent-tooltip__overlay"],["mat-button","","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",1,"u-flex","small-mat-button",2,"cursor","move",3,"pointerdown"],["mat-button","","title","Fermer l'\xe9tiquette",1,"u-flex","small-mat-button",3,"click"],[1,"permanent-tooltip__content"],[1,"permanent-tooltip__row"],["title","ICAO"],[3,"vertical"],["title","Callsign"],["title","Registration"],["title","Squawk"],["title","Altitude"],["title","Destination"],["title","Vitesse"],[1,"permanent-tooltip__contact-row"],["title","R\xe9ception"],[4,"ngIf","ngIfElse"],["liveDisplay",""],[3,"title"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Qb(2,"app-flag",2),r.Vb(3,"strong",3),r.Kc(4),r.Ub(),r.Ub(),r.Ic(5,h3,31,14,"div",4),r.Vb(6,"div",5),r.Vb(7,"button",6),r.cc("pointerdown",function(t){return e.drag.emit(t)}),r.Vb(8,"mat-icon"),r.Kc(9,"control_camera"),r.Ub(),r.Ub(),r.Vb(10,"button",7),r.cc("click",function(){return e.remove.emit()}),r.Vb(11,"mat-icon"),r.Kc(12,"close"),r.Ub(),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(2),r.nc("flag",e.aircraft.country.flag),r.Db(2),r.Nc("",e.aircraft.callsign||"?"," / ",e.aircraft.icao,""),r.Db(1),r.nc("ngIf",!e.mini),r.Db(2),r.Hb("small-mat-button--line",e.mini),r.Db(3),r.Hb("small-mat-button--line",e.mini))},directives:[GF,ut,Dl,Yp,GT],pipes:[kt,Tx],styles:[".permanent-tooltip[_ngcontent-%COMP%]{width:-webkit-max-content;width:-moz-max-content;width:max-content;background-color:#e7ecf0;font-size:.7em;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2);border:1px solid #ccc;display:grid}.permanent-tooltip__overlay[_ngcontent-%COMP%]{visibility:hidden;position:absolute;display:flex;height:100%;width:100%}.permanent-tooltip[_ngcontent-%COMP%]:hover .permanent-tooltip__content[_ngcontent-%COMP%], .permanent-tooltip[_ngcontent-%COMP%]:hover .permanent-tooltip__header[_ngcontent-%COMP%]{opacity:.1}.permanent-tooltip[_ngcontent-%COMP%]:hover .permanent-tooltip__overlay[_ngcontent-%COMP%]{visibility:visible}.permanent-tooltip__header[_ngcontent-%COMP%]{background-color:#cdd1d4;padding:.2em}.permanent-tooltip__flag[_ngcontent-%COMP%]{font-size:1.2em}.permanent-tooltip__name[_ngcontent-%COMP%]{margin-left:.3em}.permanent-tooltip__content[_ngcontent-%COMP%]{padding:.1em .1em 0;font-size:.9em;font-weight:300}.permanent-tooltip__row[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly}.permanent-tooltip__contact-row[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:.9em}.permanent-tooltip__contact-row[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%]{font-size:1em;height:1em;width:1.2em}"],changeDetection:0}),t})();function d3(t,e){if(1&t&&(r.Vb(0,"div",20),r.Kc(1),r.Ub(),r.Qb(2,"mat-divider",11)),2&t){const t=r.gc(2);r.Db(1),r.Lc(t.ship.destination||"?"),r.Db(1),r.nc("vertical",!0)}}function p3(t,e){if(1&t&&(r.Qb(0,"mat-divider"),r.Vb(1,"div",9),r.Vb(2,"div",21),r.Kc(3),r.Ub(),r.Qb(4,"mat-divider",11),r.Qb(5,"div",22),r.Ub()),2&t){const t=r.gc(2);r.Db(3),r.Lc(t.ship.departure||"?"),r.Db(1),r.nc("vertical",!0)}}function f3(t,e){if(1&t&&(r.Vb(0,"span"),r.Kc(1),r.hc(2,"date"),r.Ub()),2&t){const t=r.gc(2);r.Db(1),r.Lc(r.kc(2,1,1e3*t.ship.timestamp,"yyyy-MM-dd HH:mm:ss z",t.mapConfigService.useUTCDates$.value&&"z"))}}function m3(t,e){if(1&t&&(r.Vb(0,"span",23),r.hc(1,"date"),r.Kc(2),r.hc(3,"timeago"),r.Ub()),2&t){const t=r.gc(2);r.oc("title",r.kc(1,2,1e3*t.ship.timestamp,"yyyy-MM-dd HH:mm:ss z",t.mapConfigService.useUTCDates$.value&&"z")),r.Db(2),r.Lc(r.ic(3,6,1e3*t.ship.timestamp))}}function g3(t,e){if(1&t&&(r.Vb(0,"div",8),r.Vb(1,"div",9),r.Vb(2,"div",10),r.Kc(3),r.Ub(),r.Qb(4,"mat-divider",11),r.Vb(5,"div",12),r.Kc(6),r.Ub(),r.Qb(7,"mat-divider",11),r.Vb(8,"div",13),r.Kc(9),r.Ub(),r.Ub(),r.Qb(10,"mat-divider"),r.Vb(11,"div",9),r.Ic(12,d3,3,2,"ng-template",14),r.Vb(13,"div",15),r.Kc(14),r.Ub(),r.Ub(),r.Ic(15,p3,6,2,"ng-template",14),r.Qb(16,"mat-divider"),r.Vb(17,"div",16),r.Vb(18,"mat-icon",17),r.Kc(19,"access_time"),r.Ub(),r.Ic(20,f3,3,5,"span",18),r.Ic(21,m3,4,8,"ng-template",null,19,r.Jc),r.Ub(),r.Ub()),2&t){const t=r.wc(22),e=r.gc();r.Db(3),r.Lc(e.ship.mmsi),r.Db(1),r.nc("vertical",!0),r.Db(2),r.Lc(e.ship.imo||"?"),r.Db(1),r.nc("vertical",!0),r.Db(2),r.Lc(e.ship.callsign||"?"),r.Db(3),r.nc("ngIf",!e.historyModeActive),r.Db(2),r.Lc(e.ship.sog?e.ship.sog+" kt":"?"),r.Db(1),r.nc("ngIf",!e.historyModeActive),r.Db(5),r.nc("ngIf",e.historyModeActive)("ngIfElse",t)}}let A3=(()=>{class t extends LT{constructor(t){super(),this.mapConfigService=t,this.mini=!1,this.remove=new r.o,this.drag=new r.o,this.vesselTypeLabelsByType=ED}ngOnInit(){this.ensureMandatoryInputParams("ship","historyModeActive")}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-permanent-ship-tooltip"]],inputs:{ship:"ship",historyModeActive:"historyModeActive",mini:"mini"},outputs:{remove:"remove",drag:"drag"},features:[r.Ab],decls:13,vars:8,consts:[[1,"permanent-tooltip"],[1,"permanent-tooltip__header"],[1,"permanent-tooltip__flag",3,"flag"],[1,"permanent-tooltip__name"],["class","permanent-tooltip__content",4,"ngIf"],[1,"permanent-tooltip__overlay"],["mat-button","","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",1,"u-flex","small-mat-button",2,"cursor","move",3,"pointerdown"],["mat-button","","title","Fermer l'\xe9tiquette",1,"u-flex","small-mat-button",3,"click"],[1,"permanent-tooltip__content"],[1,"permanent-tooltip__row"],["title","MMSI"],[3,"vertical"],["title","IMO"],["title","Callsign"],[3,"ngIf"],["title","Vitesse"],[1,"permanent-tooltip__contact-row"],["title","R\xe9ception"],[4,"ngIf","ngIfElse"],["liveDisplay",""],["title","Destination"],["title","Provenance"],[2,"flex",".7"],[3,"title"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Qb(2,"app-flag",2),r.Vb(3,"strong",3),r.Kc(4),r.Ub(),r.Ub(),r.Ic(5,g3,23,10,"div",4),r.Vb(6,"div",5),r.Vb(7,"button",6),r.cc("pointerdown",function(t){return e.drag.emit(t)}),r.Vb(8,"mat-icon"),r.Kc(9,"control_camera"),r.Ub(),r.Ub(),r.Vb(10,"button",7),r.cc("click",function(){return e.remove.emit()}),r.Vb(11,"mat-icon"),r.Kc(12,"close"),r.Ub(),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(2),r.nc("flag",e.ship.country.flag),r.Db(2),r.Nc("",e.ship.name||"?"," (",e.ship.cargo?e.vesselTypeLabelsByType[e.ship.cargo]:"?",")"),r.Db(1),r.nc("ngIf",!e.mini),r.Db(2),r.Hb("small-mat-button--line",e.mini),r.Db(3),r.Hb("small-mat-button--line",e.mini))},directives:[GF,ut,Dl,Yp,GT],pipes:[kt,Tx],styles:[".permanent-tooltip[_ngcontent-%COMP%]{width:-webkit-max-content;width:-moz-max-content;width:max-content;background-color:#e7ecf0;font-size:.7em;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2);border:1px solid #ccc;display:grid}.permanent-tooltip__overlay[_ngcontent-%COMP%]{visibility:hidden;position:absolute;display:flex;height:100%;width:100%}.permanent-tooltip[_ngcontent-%COMP%]:hover .permanent-tooltip__content[_ngcontent-%COMP%], .permanent-tooltip[_ngcontent-%COMP%]:hover .permanent-tooltip__header[_ngcontent-%COMP%]{opacity:.1}.permanent-tooltip[_ngcontent-%COMP%]:hover .permanent-tooltip__overlay[_ngcontent-%COMP%]{visibility:visible}.permanent-tooltip__header[_ngcontent-%COMP%]{background-color:#cdd1d4;padding:.2em}.permanent-tooltip__flag[_ngcontent-%COMP%]{font-size:1.2em}.permanent-tooltip__name[_ngcontent-%COMP%]{margin-left:.3em}.permanent-tooltip__content[_ngcontent-%COMP%]{padding:.1em .1em 0;font-size:.9em;font-weight:300}.permanent-tooltip__row[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly}.permanent-tooltip__contact-row[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:.9em}.permanent-tooltip__contact-row[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%]{font-size:1em;height:1em;width:1.2em}"],changeDetection:0}),t})();function b3(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-permanent-aircraft-tooltip",6),r.cc("remove",function(){r.Ac(t);const e=r.gc().$implicit;return r.gc(2).permanentTooltipsService.excludeAircraft(e.entity.icao)})("drag",function(e){r.Ac(t);const i=r.gc().$implicit;return r.gc(2).startDragging(i,e)}),r.Ub()}if(2&t){const t=r.gc().$implicit,e=r.gc(2);r.nc("aircraft",t.entity)("mini",e.showMini)("historyModeActive",e.historyModeActive)}}function v3(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-permanent-ship-tooltip",7),r.cc("remove",function(){r.Ac(t);const e=r.gc().$implicit;return r.gc(2).permanentTooltipsService.excludeShip(e.entity.mmsi)})("drag",function(e){r.Ac(t);const i=r.gc().$implicit;return r.gc(2).startDragging(i,e)}),r.Ub()}if(2&t){const t=r.gc().$implicit,e=r.gc(2);r.nc("ship",t.entity)("mini",e.showMini)("historyModeActive",e.historyModeActive)}}function _3(t,e){if(1&t&&(r.Vb(0,"app-map-tooltip",2),r.Tb(1,3),r.Ic(2,b3,1,3,"app-permanent-aircraft-tooltip",4),r.Ic(3,v3,1,3,"app-permanent-ship-tooltip",5),r.Sb(),r.Ub()),2&t){const t=e.$implicit,i=r.gc(2);r.nc("map",i.map)("latitude",t.lat)("longitude",t.lon)("positioning",t.positioning)("offset",t.offset)("stopEvent",!1)("opacity",i.tooltipsOpacity),r.Db(1),r.nc("ngSwitch",t.entity.kind),r.Db(1),r.nc("ngSwitchCase",i.EntityType.Aircraft),r.Db(1),r.nc("ngSwitchCase",i.EntityType.Ship)}}function y3(t,e){if(1&t&&r.Ic(0,_3,4,10,"app-map-tooltip",1),2&t){const t=r.gc();r.nc("ngForOf",t.tooltips)("ngForTrackBy",t.trackByEntityId)}}const w3=new jZ({stroke:new VZ({color:"#666",lineDash:[10,10],width:2})});let x3=(()=>{class t extends LT{constructor(t,e,i,n,r){super(),this.changeDetectorRef=t,this.mapConfigService=e,this.mapStateService=i,this.historyService=n,this.permanentTooltipsService=r,this.showTooltips=!1,this.showMini=!1,this.historyModeActive=!1,this.tooltips=[],this.EntityType=OP,this.tooltipsOpacity=1,this.permanentTooltipsLimit=200}ngOnInit(){this.changeDetectorRef.detach(),this.ensureMandatoryInputParams("map"),this.source=new $q({features:[],useSpatialIndex:!1,wrapX:!1}),this.layer=new Nq({source:this.source,style:w3,zIndex:5}),this.map.addLayer(this.layer),this.subscriptions.push(this.historyService.timestamp$.subscribe(t=>{this.historyModeActive=0!==t,this.changeDetectorRef.detectChanges()}),this.mapConfigService.tooltipsOpacity$.subscribe(t=>{this.tooltipsOpacity=t,this.changeDetectorRef.detectChanges()}),this.mapConfigService.showPermanentTooltips$.subscribe(t=>{this.showTooltips=t,this.changeDetectorRef.detectChanges()}),this.mapConfigService.showMiniPermanentTooltips$.subscribe(t=>{this.showMini=t,this.changeDetectorRef.detectChanges()}),this.permanentTooltipsService.tooltips$.subscribe(t=>{this.tooltips=t;const e=t.filter(t=>t.lon!==t.entity.lon||t.lat!==t.entity.lat).map(t=>new pH(new kH([[t.lon,t.lat],[t.entity.lon,t.entity.lat]].map(t=>sE(t)))));this.source.clear(!0),this.source.addFeatures(e),this.changeDetectorRef.detectChanges()}))}ngOnDestroy(){super.ngOnDestroy(),this.source.clear(!0)}trackByEntityId(t,e){return e.entity.icao||e.entity.mmsi}startDragging(t,e){var i;e.stopPropagation();const n=null===(i=e.target.closest(".permanent-tooltip"))||void 0===i?void 0:i.getBoundingClientRect();if(!n)throw new Error("Impossible de d\xe9placer l'\xe9tiquette (\xe9l\xe9ment parent introuvable)");this.permanentTooltipsService.startEntityTooltipMovement(t,[n.x+n.width/2-e.clientX,n.y+n.height/2-e.clientY]),document.body.addEventListener("pointerup",()=>{this.permanentTooltipsService.endEntityTooltipMovement()},{capture:!0,once:!0})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(hI),r.Pb(gT),r.Pb(bI),r.Pb(a3))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-permanent-tooltips"]],inputs:{map:"map"},features:[r.Ab],decls:1,vars:1,consts:[[3,"ngIf"],[3,"map","latitude","longitude","positioning","offset","stopEvent","opacity",4,"ngFor","ngForOf","ngForTrackBy"],[3,"map","latitude","longitude","positioning","offset","stopEvent","opacity"],[3,"ngSwitch"],[3,"aircraft","mini","historyModeActive","remove","drag",4,"ngSwitchCase"],[3,"ship","mini","historyModeActive","remove","drag",4,"ngSwitchCase"],[3,"aircraft","mini","historyModeActive","remove","drag"],[3,"ship","mini","historyModeActive","remove","drag"]],template:function(t,e){1&t&&r.Ic(0,y3,1,2,"ng-template",0),2&t&&r.nc("ngIf",e.showTooltips&&e.tooltips.length<=e.permanentTooltipsLimit)},directives:[ut,ct,MX,mt,gt,u3,A3],encapsulation:2}),t})(),C3=(()=>{class t extends LT{constructor(t,e,i){super(),this.exportService=t,this.mapStateService=e,this.selectionService=i}ngOnInit(){this.ensureMandatoryInputParams("map"),this.dragBoxInteraction=new bG({condition:nG}),this.map.addInteraction(this.dragBoxInteraction),this.dragBoxInteraction.on("boxend",()=>{const t=this.dragBoxInteraction.getGeometry().getExtent(),e=this.exportService.getEntitiesInExtent(t);CC({category:"app",message:`box-select: ${e.length} entities`}),e.forEach(t=>{this.selectionService.addToSelection(t.kind,t.icao||t.mmsi)})}),this.subscriptions.push(this.mapStateService.featuresSelectable$.subscribe(t=>{this.dragBoxInteraction.setActive(t)}))}ngOnDestroy(){super.ngOnDestroy(),this.map.removeInteraction(this.dragBoxInteraction)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(hX),r.Pb(gT),r.Pb(xT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-box-selection-interaction"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();const S3=new pH;S3.setStyle(new jZ({image:new TZ({radius:8,fill:new RZ({color:"#3399CC"}),stroke:new VZ({color:"#fff",width:3})})}));let k3=(()=>{class t extends LT{constructor(t){super(),this.geolocationLayerService=t,this.animationListenerKey=null}ngOnInit(){this.ensureMandatoryInputParams("map"),this.source=new $q({features:[S3],useSpatialIndex:!1}),this.layer=new Nq({source:this.source,updateWhileAnimating:!0,updateWhileInteracting:!0,zIndex:1}),this.map.addLayer(this.layer),this.subscriptions.push(this.geolocationLayerService.enable$.subscribe(t=>{this.layer.setVisible(t)})),this.subscriptions.push(this.geolocationLayerService.location$.pipe(mn((t,e)=>!t&&!e||t&&e&&t.lat===e.lat&&t.lon===e.lon)).subscribe(t=>{this.updatePosition(t)}))}ngOnDestroy(){super.ngOnDestroy(),this.map.removeLayer(this.layer)}updatePosition(t){if(this.animationListenerKey&&(ME(this.animationListenerKey),this.animationListenerKey=null),t){const e=S3.getGeometry();if(!e)return void S3.setGeometry(new jM(sE([t.lon,t.lat])));const i=e.getCoordinates(),n=sE([t.lon,t.lat]),r=n[0]-i[0],s=n[1]-i[1],o=(new Date).getTime(),a=t=>{const e=t.frameState.time-o,n=e/2e3;if(e>2e3){ME(this.animationListenerKey),this.animationListenerKey=null;const t=[i[0]+r,i[1]+s];return void S3.getGeometry().setCoordinates(t)}const a=[i[0]+r*n,i[1]+s*n];S3.getGeometry().setCoordinates(a)};this.layer.changed(),this.animationListenerKey=this.layer.on("prerender",t=>{a(t)})}else S3.setGeometry(null)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(n$))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-geolocation-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})(),E3=(()=>{class t{constructor(t,e){this.mapService=t,this.tooltipsService=e}startEntityTooltipMovement(t,e=[0,0]){var i;const n=this.tooltipsService.pinnedEntitiesTooltips$.value.findIndex(e=>e===t);if(-1===n)throw new Error("Impossible de d\xe9placer l'entit\xe9 (inconnue)");null===(i=this.pointerEventsSubscription)||void 0===i||i.unsubscribe(),this.pointerEventsSubscription=this.mapService.pointerMove$.subscribe(i=>{const r=i.map.getCoordinateFromPixel([i.pixel[0]+e[0],i.pixel[1]+e[1]]);if(!r)return;const s=aT([[t.entity.lon,t.entity.lat],oE(r)]);this.tooltipsService.pinnedEntitiesTooltips$.value[n].lon=s[1][0],this.tooltipsService.pinnedEntitiesTooltips$.value[n].lat=s[1][1],this.tooltipsService.pinnedEntitiesTooltips$.next(this.tooltipsService.pinnedEntitiesTooltips$.value)})}endEntityTooltipMovement(){this.pointerEventsSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(pI),r.Zb(kT))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function D3(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",14),r.cc("pointerdown",function(e){return r.Ac(t),r.gc().drag.emit(e)}),r.Vb(1,"mat-icon"),r.Kc(2,"control_camera"),r.Ub(),r.Ub()}}function I3(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",15),r.cc("click",function(){return r.Ac(t),r.gc().close.emit(null)}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function P3(t,e){if(1&t&&(r.Vb(0,"span"),r.Kc(1),r.hc(2,"date"),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Lc(r.kc(2,1,t.aircraft.timestamp,"yyyy-MM-dd HH:mm:ss z",t.mapConfigService.useUTCDates$.value&&"z"))}}function O3(t,e){if(1&t&&(r.Vb(0,"span",16),r.hc(1,"date"),r.Kc(2),r.hc(3,"timeago"),r.Ub()),2&t){const t=r.gc();r.oc("title",r.kc(1,2,t.aircraft.timestamp,"yyyy-MM-dd HH:mm:ss z",t.mapConfigService.useUTCDates$.value&&"z")),r.Db(2),r.Lc(r.ic(3,6,t.aircraft.timestamp))}}let M3=(()=>{class t extends LT{constructor(t,e){super(),this.historyService=t,this.mapConfigService=e,this.pinned=!1,this.close=new r.o,this.drag=new r.o}ngOnInit(){this.ensureMandatoryInputParams("aircraft")}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(bI),r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-aircraft-tooltip"]],inputs:{pinned:"pinned",aircraft:"aircraft"},outputs:{close:"close",drag:"drag"},features:[r.Ab],decls:19,vars:12,consts:[[1,"ship-tooltip"],[1,"ship-tooltip__header"],[1,"ship-tooltip__flag",3,"flag"],[1,"ship-tooltip__title","ml-2"],[1,"ship-tooltip__name"],[1,"ship-tooltip__type"],["mat-button","","class","small-mat-button ship-tooltip__move-icon","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",3,"pointerdown",4,"ngIf"],["mat-button","","class","small-mat-button","title","Fermer l'infobulle",3,"click",4,"ngIf"],[1,"ship-details-panel__infos",3,"aircraft","extensive"],[1,"ship-tooltip__footer"],[1,"ship-tooltip__signal-label"],[1,"u-flex"],[4,"ngIf","ngIfElse"],["liveDisplay",""],["mat-button","","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",1,"small-mat-button","ship-tooltip__move-icon",3,"pointerdown"],["mat-button","","title","Fermer l'infobulle",1,"small-mat-button",3,"click"],[3,"title"]],template:function(t,e){if(1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Qb(2,"app-flag",2),r.Vb(3,"div",3),r.Vb(4,"strong",4),r.Kc(5),r.Ub(),r.Vb(6,"small",5),r.Kc(7),r.Ub(),r.Ub(),r.Ic(8,D3,3,0,"button",6),r.Ic(9,I3,3,0,"button",7),r.Ub(),r.Qb(10,"app-aircraft-infos",8),r.Vb(11,"div",9),r.Vb(12,"span",10),r.Kc(13,"R\xe9ception :\xa0"),r.Ub(),r.Vb(14,"strong",11),r.Ic(15,P3,3,5,"span",12),r.hc(16,"async"),r.Ic(17,O3,4,8,"ng-template",null,13,r.Jc),r.Ub(),r.Ub(),r.Ub()),2&t){const t=r.wc(18);r.Db(2),r.nc("flag",e.aircraft.country.flag),r.Db(3),r.Nc("",e.aircraft.callsign||"?"," / ",e.aircraft.icao,""),r.Db(2),r.Mc("Type code: ",e.aircraft.icaoTypeCode||"?",""),r.Db(1),r.nc("ngIf",e.pinned),r.Db(1),r.nc("ngIf",e.pinned),r.Db(1),r.nc("aircraft",e.aircraft)("extensive",!0),r.Db(5),r.nc("ngIf",r.ic(16,10,e.historyService.timestamp$))("ngIfElse",t)}},directives:[GF,ut,XF,Dl,Yp],pipes:[St,kt,Tx],styles:['.ship-tooltip[_ngcontent-%COMP%]{min-width:320px;background-color:#e7ecf0;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2);border-radius:2px}.ship-tooltip[_ngcontent-%COMP%]:after{content:" ";position:absolute;border:12px solid transparent;pointer-events:none}.ship-tooltip__header[_ngcontent-%COMP%]{background-color:#cdd1d4;display:flex}.ship-tooltip__move-icon[_ngcontent-%COMP%]{cursor:move}.ship-tooltip__link[_ngcontent-%COMP%]{flex:1;padding:0;line-height:inherit;text-align:inherit;font-size:inherit;font-weight:inherit}.ship-tooltip__link[_ngcontent-%COMP%] .mat-button-wrapper{display:flex}.ship-tooltip__flag[_ngcontent-%COMP%]{margin:5px}.ship-tooltip__title[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:5px 0;flex:1}.ship-tooltip__name[_ngcontent-%COMP%]{font-size:1.2em}.ship-tooltip__type[_ngcontent-%COMP%]{font-size:.9em;color:#555}.ship-tooltip__row[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;font-size:.9em}.ship-tooltip__info-cell[_ngcontent-%COMP%]{padding:.4em;text-align:center}.ship-tooltip__info-label[_ngcontent-%COMP%]{color:grey;font-weight:500;padding-bottom:.2em}.ship-tooltip__course-icon[_ngcontent-%COMP%]{line-height:.7em;height:.7em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ship-tooltip__footer[_ngcontent-%COMP%]{background-color:#cdd1d4;padding-left:.4em;display:flex;align-items:center;font-size:.85em;line-height:36px}.ship-tooltip__signal-label[_ngcontent-%COMP%]{font-weight:500;color:#595959} .overlay-positioning-center-right .ship-tooltip:after{top:50%;left:100%;margin-top:-12px;border-left-color:#cdd1d4} .overlay-positioning-center-left .ship-tooltip:after{top:50%;right:100%;margin-top:-12px;border-right-color:#cdd1d4} .overlay-positioning-bottom-center .ship-tooltip:after{top:100%;left:50%;margin-left:-12px;border-top-color:#cdd1d4} .overlay-positioning-top-center .ship-tooltip:after{bottom:100%;left:50%;margin-left:-12px;border-bottom-color:#cdd1d4}'],changeDetection:0}),t})();function T3(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",9),r.cc("pointerdown",function(e){return r.Ac(t),r.gc().drag.emit(e)}),r.Vb(1,"mat-icon"),r.Kc(2,"control_camera"),r.Ub(),r.Ub()}}function R3(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",10),r.cc("click",function(){return r.Ac(t),r.gc().close.emit(null)}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}let V3=(()=>{class t extends LT{constructor(t){super(),this.mapConfigService=t,this.pinned=!1,this.close=new r.o,this.drag=new r.o}ngOnInit(){this.ensureMandatoryInputParams("alert")}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-alert-tooltip"]],inputs:{pinned:"pinned",alert:"alert"},outputs:{close:"close",drag:"drag"},features:[r.Ab],decls:16,vars:8,consts:[[1,"ship-tooltip"],[1,"ship-tooltip__header"],[1,"d-flex-center","u-flex","pa-2"],["title","Alerte",1,"mr-2"],["mat-button","","class","small-mat-button ship-tooltip__move-icon","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",3,"pointerdown",4,"ngIf"],["mat-button","","class","small-mat-button","title","Fermer l'infobulle",3,"click",4,"ngIf"],[1,"ship-tooltip__footer"],[1,"ship-tooltip__signal-label"],[1,"u-flex"],["mat-button","","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",1,"small-mat-button","ship-tooltip__move-icon",3,"pointerdown"],["mat-button","","title","Fermer l'infobulle",1,"small-mat-button",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"div",2),r.Vb(3,"mat-icon",3),r.Kc(4,"warning"),r.Ub(),r.Vb(5,"strong"),r.Kc(6),r.Ub(),r.Ub(),r.Ic(7,T3,3,0,"button",4),r.Ic(8,R3,3,0,"button",5),r.Ub(),r.Qb(9,"mat-divider"),r.Vb(10,"div",6),r.Vb(11,"span",7),r.Kc(12,"R\xe9ception :\xa0"),r.Ub(),r.Vb(13,"strong",8),r.Kc(14),r.hc(15,"date"),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(6),r.Lc(e.alert.rule_name||e.alert.ship_name||"MMSI: "+e.alert.mmsi),r.Db(1),r.nc("ngIf",e.pinned),r.Db(1),r.nc("ngIf",e.pinned),r.Db(6),r.Lc(r.kc(15,4,1e3*e.alert.start,"yyyy-MM-dd HH:mm:ss z",e.mapConfigService.useUTCDates$.value&&"z")))},directives:[Yp,ut,GT,Dl],pipes:[kt],styles:["",'.ship-tooltip[_ngcontent-%COMP%]{min-width:320px;background-color:#e7ecf0;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2);border-radius:2px}.ship-tooltip[_ngcontent-%COMP%]:after{content:" ";position:absolute;border:12px solid transparent;pointer-events:none}.ship-tooltip__header[_ngcontent-%COMP%]{background-color:#cdd1d4;display:flex}.ship-tooltip__move-icon[_ngcontent-%COMP%]{cursor:move}.ship-tooltip__link[_ngcontent-%COMP%]{flex:1;padding:0;line-height:inherit;text-align:inherit;font-size:inherit;font-weight:inherit}.ship-tooltip__link[_ngcontent-%COMP%] .mat-button-wrapper{display:flex}.ship-tooltip__flag[_ngcontent-%COMP%]{margin:5px}.ship-tooltip__title[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:5px 0;flex:1}.ship-tooltip__name[_ngcontent-%COMP%]{font-size:1.2em}.ship-tooltip__type[_ngcontent-%COMP%]{font-size:.9em;color:#555}.ship-tooltip__row[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;font-size:.9em}.ship-tooltip__info-cell[_ngcontent-%COMP%]{padding:.4em;text-align:center}.ship-tooltip__info-label[_ngcontent-%COMP%]{color:grey;font-weight:500;padding-bottom:.2em}.ship-tooltip__course-icon[_ngcontent-%COMP%]{line-height:.7em;height:.7em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ship-tooltip__footer[_ngcontent-%COMP%]{background-color:#cdd1d4;padding-left:.4em;display:flex;align-items:center;font-size:.85em;line-height:36px}.ship-tooltip__signal-label[_ngcontent-%COMP%]{font-weight:500;color:#595959} .overlay-positioning-center-right .ship-tooltip:after{top:50%;left:100%;margin-top:-12px;border-left-color:#cdd1d4} .overlay-positioning-center-left .ship-tooltip:after{top:50%;right:100%;margin-top:-12px;border-right-color:#cdd1d4} .overlay-positioning-bottom-center .ship-tooltip:after{top:100%;left:50%;margin-left:-12px;border-top-color:#cdd1d4} .overlay-positioning-top-center .ship-tooltip:after{bottom:100%;left:50%;margin-left:-12px;border-bottom-color:#cdd1d4}'],changeDetection:0}),t})();function F3(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",11),r.cc("pointerdown",function(e){return r.Ac(t),r.gc().drag.emit(e)}),r.Vb(1,"mat-icon"),r.Kc(2,"control_camera"),r.Ub(),r.Ub()}}function L3(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",12),r.cc("click",function(){return r.Ac(t),r.gc().close.emit(null)}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function U3(t,e){if(1&t&&(r.Qb(0,"mat-divider"),r.Vb(1,"div",13),r.Kc(2),r.Ub()),2&t){const t=r.gc();r.Db(2),r.Mc(" ",t.annotation.description," ")}}function B3(t,e){if(1&t&&(r.Vb(0,"div",14),r.Vb(1,"div",15),r.Kc(2,"Position :\xa0"),r.Ub(),r.Vb(3,"strong"),r.Kc(4),r.Ub(),r.Ub()),2&t){const t=r.gc();r.Db(4),r.Lc(t.annotation.hdms)}}let N3=(()=>{class t extends LT{constructor(t){super(),this.mapConfigService=t,this.pinned=!1,this.close=new r.o,this.drag=new r.o}ngOnInit(){this.ensureMandatoryInputParams("annotation")}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-annotation-tooltip"]],inputs:{pinned:"pinned",annotation:"annotation"},outputs:{close:"close",drag:"drag"},features:[r.Ab],decls:20,vars:15,consts:[[1,"ship-tooltip","annotation"],[1,"ship-tooltip__header"],[1,"d-flex-center","u-flex","pa-2"],["title","Annotation",1,"mr-2"],["mat-button","","class","small-mat-button ship-tooltip__move-icon","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",3,"pointerdown",4,"ngIf"],["mat-button","","class","small-mat-button","title","Fermer l'infobulle",3,"click",4,"ngIf"],[3,"ngIf"],["class","annotation__row",4,"ngIf"],[1,"ship-tooltip__footer",3,"title"],[1,"ship-tooltip__signal-label"],[1,"u-flex"],["mat-button","","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",1,"small-mat-button","ship-tooltip__move-icon",3,"pointerdown"],["mat-button","","title","Fermer l'infobulle",1,"small-mat-button",3,"click"],["title","Description",1,"annotation__description"],[1,"annotation__row"],[1,"annotation__property-label"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"div",2),r.Vb(3,"mat-icon",3),r.Kc(4,"loyalty"),r.Ub(),r.Vb(5,"strong"),r.Kc(6),r.Ub(),r.Ub(),r.Ic(7,F3,3,0,"button",4),r.Ic(8,L3,3,0,"button",5),r.Ub(),r.Ic(9,U3,3,1,"ng-template",6),r.Qb(10,"mat-divider"),r.Ic(11,B3,5,1,"div",7),r.Qb(12,"mat-divider"),r.Vb(13,"div",8),r.hc(14,"date"),r.Vb(15,"span",9),r.Kc(16,"Mise \xe0 jour :\xa0"),r.Ub(),r.Vb(17,"strong",10),r.Kc(18),r.hc(19,"date"),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(6),r.Lc(e.annotation.name),r.Db(1),r.nc("ngIf",e.pinned),r.Db(1),r.nc("ngIf",e.pinned),r.Db(1),r.nc("ngIf",e.annotation.description),r.Db(2),r.nc("ngIf","Point"===e.annotation.geom.type),r.Db(2),r.pc("title","Cr\xe9\xe9 le ",r.kc(14,7,e.annotation.created_at,"yyyy-MM-dd HH:mm:ss z",e.mapConfigService.useUTCDates$.value&&"z"),""),r.Db(5),r.Lc(r.kc(19,11,e.annotation.updated_at,"yyyy-MM-dd HH:mm:ss z",e.mapConfigService.useUTCDates$.value&&"z")))},directives:[Yp,ut,GT,Dl],pipes:[kt],styles:[".annotation[_ngcontent-%COMP%]{max-width:400px}.annotation__description[_ngcontent-%COMP%]{font-size:.8em;padding:8px;white-space:pre-line}.annotation__row[_ngcontent-%COMP%]{display:flex;margin:4px 8px;font-size:.8em}.annotation__property-label[_ngcontent-%COMP%]{color:grey;font-weight:500}",'.ship-tooltip[_ngcontent-%COMP%]{min-width:320px;background-color:#e7ecf0;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2);border-radius:2px}.ship-tooltip[_ngcontent-%COMP%]:after{content:" ";position:absolute;border:12px solid transparent;pointer-events:none}.ship-tooltip__header[_ngcontent-%COMP%]{background-color:#cdd1d4;display:flex}.ship-tooltip__move-icon[_ngcontent-%COMP%]{cursor:move}.ship-tooltip__link[_ngcontent-%COMP%]{flex:1;padding:0;line-height:inherit;text-align:inherit;font-size:inherit;font-weight:inherit}.ship-tooltip__link[_ngcontent-%COMP%] .mat-button-wrapper{display:flex}.ship-tooltip__flag[_ngcontent-%COMP%]{margin:5px}.ship-tooltip__title[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:5px 0;flex:1}.ship-tooltip__name[_ngcontent-%COMP%]{font-size:1.2em}.ship-tooltip__type[_ngcontent-%COMP%]{font-size:.9em;color:#555}.ship-tooltip__row[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;font-size:.9em}.ship-tooltip__info-cell[_ngcontent-%COMP%]{padding:.4em;text-align:center}.ship-tooltip__info-label[_ngcontent-%COMP%]{color:grey;font-weight:500;padding-bottom:.2em}.ship-tooltip__course-icon[_ngcontent-%COMP%]{line-height:.7em;height:.7em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ship-tooltip__footer[_ngcontent-%COMP%]{background-color:#cdd1d4;padding-left:.4em;display:flex;align-items:center;font-size:.85em;line-height:36px}.ship-tooltip__signal-label[_ngcontent-%COMP%]{font-weight:500;color:#595959} .overlay-positioning-center-right .ship-tooltip:after{top:50%;left:100%;margin-top:-12px;border-left-color:#cdd1d4} .overlay-positioning-center-left .ship-tooltip:after{top:50%;right:100%;margin-top:-12px;border-right-color:#cdd1d4} .overlay-positioning-bottom-center .ship-tooltip:after{top:100%;left:50%;margin-left:-12px;border-top-color:#cdd1d4} .overlay-positioning-top-center .ship-tooltip:after{bottom:100%;left:50%;margin-left:-12px;border-bottom-color:#cdd1d4}'],changeDetection:0}),t})();function j3(t,e){var i;t.color=(null===(i=LP[t.type])||void 0===i?void 0:i.color)||"grey",t.additionalInfos=function(t,e){var i;t.color=(null===(i=LP[t.type])||void 0===i?void 0:i.color)||"grey";const n=t.data.old,r=t.data.new;let s="";switch(t.type){case UP.ShipIdChanged:return FD(n.imo)&&(s+=`<div>IMO: ${n.imo} &rarr; ${r.imo}</div>`),FD(n.callsign)&&(s+=`<div>Callsign: ${n.callsign} &rarr; ${r.callsign}</div>`),FD(n.name)&&(s+=`<div>Nom: ${n.name} &rarr; ${r.name}</div>`),FD(n.cargo)&&(s+=`<div>Type: ${ED[n.cargo]} &rarr; ${ED[r.cargo]}</div>`),void 0===n.dimA&&void 0===n.dimB&&void 0===n.dimC&&void 0===n.dimD||(s+=`<div>Dimensions: ${z3(n)} &rarr; ${z3(r)}</div>`),FD(n.draught)&&(s+=`<div>Tirant d'eau: ${n.draught}m &rarr; ${r.draught}m</div>`),s;case UP.InvalidImo:return`<div>IMO usurp\xe9: ${t.data.imo}</div>`;case UP.InvalidCallsign:return`<div>Callsign usurp\xe9: ${t.data.callsign}</div>`;case UP.Spoofing:return`<div>MMSI: ${t.data.mmsi||"?"}<br></div>\n <div>IMO: ${t.data.imo||"?"}<br></div>\n <div>Callsign: ${t.data.callsign||"?"}<br></div>`;case UP.VoyageChanged:if(FD(n.destination)&&(s+=`<div>Destination: ${n.destination} &rarr; ${r.destination}</div>`),FD(r.etaMo)||FD(r.etaDay)||FD(r.etaHr)||FD(r.etaMin))if(FD(r.etaMo)&&FD(r.etaDay)&&FD(r.etaHr)&&FD(r.etaMin)){let t=LD(r.etaMo),e=LD(r.etaDay),i=LD(r.etaHr),o=LD(r.etaMin);FD(n.etaMo)&&(t=`<b>${t}</b>`),FD(n.etaDay)&&(e=`<b>${e}</b>`),FD(n.etaHr)&&(i=`<b>${i}</b>`),FD(n.etaMin)&&(o=`<b>${o}</b>`),s+=`<div>ETA: ${FD(n.etaMo)?LD(n.etaMo):LD(r.etaMo)}-${FD(n.etaDay)?LD(n.etaDay):LD(r.etaDay)} ${FD(n.etaHr)?LD(n.etaHr):LD(r.etaHr)}h${FD(n.etaMin)?LD(n.etaMin):LD(r.etaMin)}m<br>&nbsp;&nbsp;&nbsp;&nbsp;&rarr; ${t}-${e} ${i}h${o}m</div>`}else s+=`<div>ETA: ${FD(n.etaMo)?LD(n.etaMo):"XX"}-${FD(n.etaDay)?LD(n.etaDay):"XX"} ${FD(n.etaHr)?LD(n.etaHr):"XX"}h${FD(n.etaMin)?LD(n.etaMin):"XX"}m<br>&nbsp;&nbsp;&nbsp;&nbsp;&rarr; ${FD(r.etaMo)?LD(r.etaMo):"XX"}-${FD(r.etaDay)?LD(r.etaDay):"XX"} ${FD(r.etaHr)?LD(r.etaHr):"XX"}h${FD(r.etaMin)?LD(r.etaMin):"XX"}m</div>`;return s;case UP.PositionDubious:return`<div>Distance: ${Math.round(t.data.distance)} Nq</div>`;case UP.StatusChanged:return`<div>Statut: ${JH[n]} &rarr; ${JH[r]}</div>`;case UP.MoveZoneEntry:case UP.MoveZoneExit:return e[t.data.zone].name;case UP.MoveErratic:return`R\xe9solution: ${t.data.resolution}`;case UP.MoveMeetingAtSea:return`Autre navire: ${t.data.mmsi}`}return""}(t,e)}function z3(t){const e=`${FD(t.dimA)?t.dimA:"X"}-${FD(t.dimB)?t.dimB:"X"}-${FD(t.dimC)?t.dimC:"X"}-${FD(t.dimD)?t.dimD:"X"}`;return"X-X-X-X"===e?"N\xe9ant":e}function H3(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",13),r.cc("pointerdown",function(e){return r.Ac(t),r.gc().drag.emit(e)}),r.Vb(1,"mat-icon"),r.Kc(2,"control_camera"),r.Ub(),r.Ub()}}function K3(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",14),r.cc("click",function(){return r.Ac(t),r.gc().close.emit(null)}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}let $3=(()=>{class t extends LT{constructor(t,e,i){super(),this.domSanitizer=t,this.mapConfigService=e,this.zonesService=i,this.pinned=!1,this.close=new r.o,this.drag=new r.o,this.eventTypeLabelByKey=FP}ngOnInit(){this.ensureMandatoryInputParams("event"),j3(this.event,this.zonesService.zonesById),this.additionalInfos=this.domSanitizer.bypassSecurityTrustHtml(this.event.additionalInfos)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(ne),r.Pb(hI),r.Pb(kP))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-event-tooltip"]],inputs:{pinned:"pinned",event:"event"},outputs:{close:"close",drag:"drag"},features:[r.Ab],decls:20,vars:11,consts:[[1,"ship-tooltip"],[1,"ship-tooltip__header"],[1,"u-flex","pa-2"],["title","\xc9v\xe9nements",1,"event-icon"],["mat-button","","class","small-mat-button ship-tooltip__move-icon","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",3,"pointerdown",4,"ngIf"],["mat-button","","class","small-mat-button","title","Fermer l'infobulle",3,"click",4,"ngIf"],[1,"ship-tooltip__row"],[1,"ship-tooltip__info-cell"],[1,"ship-tooltip__info-label"],[1,"event-additional-infos",3,"innerHTML"],[1,"ship-tooltip__footer"],[1,"ship-tooltip__signal-label"],[1,"u-flex"],["mat-button","","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",1,"small-mat-button","ship-tooltip__move-icon",3,"pointerdown"],["mat-button","","title","Fermer l'infobulle",1,"small-mat-button",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"div",2),r.Qb(3,"span",3),r.Vb(4,"strong"),r.Kc(5),r.Ub(),r.Ub(),r.Ic(6,H3,3,0,"button",4),r.Ic(7,K3,3,0,"button",5),r.Ub(),r.Vb(8,"div",6),r.Vb(9,"div",7),r.Vb(10,"div",8),r.Kc(11,"Informations"),r.Ub(),r.Qb(12,"div",9),r.Ub(),r.Ub(),r.Qb(13,"mat-divider"),r.Vb(14,"div",10),r.Vb(15,"span",11),r.Kc(16,"R\xe9ception :\xa0"),r.Ub(),r.Vb(17,"strong",12),r.Kc(18),r.hc(19,"date"),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(3),r.Fc("background-color",e.event.color),r.Db(2),r.Lc(e.eventTypeLabelByKey[e.event.type]||"Inconnu"),r.Db(1),r.nc("ngIf",e.pinned),r.Db(1),r.nc("ngIf",e.pinned),r.Db(5),r.nc("innerHTML",e.additionalInfos,r.Bc),r.Db(6),r.Lc(r.kc(19,7,1e3*e.event.timestamp,"yyyy-MM-dd HH:mm:ss z",e.mapConfigService.useUTCDates$.value&&"z")))},directives:[ut,GT,Dl,Yp],pipes:[kt],styles:[".event-icon[_ngcontent-%COMP%]{height:1em;width:1em;border-radius:50%;margin:0 .3em}.event-additional-infos[_ngcontent-%COMP%]{text-align:left;font-size:.9em;line-height:1.5em;font-weight:400;white-space:normal}.event-additional-infos[_ngcontent-%COMP%] b{color:#172db7}",'.ship-tooltip[_ngcontent-%COMP%]{min-width:320px;background-color:#e7ecf0;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2);border-radius:2px}.ship-tooltip[_ngcontent-%COMP%]:after{content:" ";position:absolute;border:12px solid transparent;pointer-events:none}.ship-tooltip__header[_ngcontent-%COMP%]{background-color:#cdd1d4;display:flex}.ship-tooltip__move-icon[_ngcontent-%COMP%]{cursor:move}.ship-tooltip__link[_ngcontent-%COMP%]{flex:1;padding:0;line-height:inherit;text-align:inherit;font-size:inherit;font-weight:inherit}.ship-tooltip__link[_ngcontent-%COMP%] .mat-button-wrapper{display:flex}.ship-tooltip__flag[_ngcontent-%COMP%]{margin:5px}.ship-tooltip__title[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:5px 0;flex:1}.ship-tooltip__name[_ngcontent-%COMP%]{font-size:1.2em}.ship-tooltip__type[_ngcontent-%COMP%]{font-size:.9em;color:#555}.ship-tooltip__row[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;font-size:.9em}.ship-tooltip__info-cell[_ngcontent-%COMP%]{padding:.4em;text-align:center}.ship-tooltip__info-label[_ngcontent-%COMP%]{color:grey;font-weight:500;padding-bottom:.2em}.ship-tooltip__course-icon[_ngcontent-%COMP%]{line-height:.7em;height:.7em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ship-tooltip__footer[_ngcontent-%COMP%]{background-color:#cdd1d4;padding-left:.4em;display:flex;align-items:center;font-size:.85em;line-height:36px}.ship-tooltip__signal-label[_ngcontent-%COMP%]{font-weight:500;color:#595959} .overlay-positioning-center-right .ship-tooltip:after{top:50%;left:100%;margin-top:-12px;border-left-color:#cdd1d4} .overlay-positioning-center-left .ship-tooltip:after{top:50%;right:100%;margin-top:-12px;border-right-color:#cdd1d4} .overlay-positioning-bottom-center .ship-tooltip:after{top:100%;left:50%;margin-left:-12px;border-top-color:#cdd1d4} .overlay-positioning-top-center .ship-tooltip:after{bottom:100%;left:50%;margin-left:-12px;border-bottom-color:#cdd1d4}'],changeDetection:0}),t})();function G3(t,e){if(1&t&&(r.Qb(0,"mat-divider"),r.Vb(1,"div",0),r.Vb(2,"div",1),r.Vb(3,"div",2),r.Kc(4,"Type"),r.Ub(),r.Vb(5,"strong"),r.Kc(6),r.Ub(),r.Ub(),r.Qb(7,"mat-divider",3),r.Vb(8,"div",1),r.Vb(9,"div",2),r.Kc(10,"Information de navigation"),r.Ub(),r.Vb(11,"strong"),r.Kc(12),r.Ub(),r.Ub(),r.Ub(),r.Qb(13,"mat-divider"),r.Vb(14,"div",0),r.Vb(15,"div",1),r.Vb(16,"div",2),r.Kc(17,"Dimensions"),r.Ub(),r.Vb(18,"strong"),r.Kc(19),r.Ub(),r.Ub(),r.Qb(20,"mat-divider",3),r.Vb(21,"div",1),r.Vb(22,"div",2),r.Kc(23,"Tirant d'eau"),r.Ub(),r.Vb(24,"strong"),r.Kc(25),r.Ub(),r.Ub(),r.Ub()),2&t){const t=r.gc();r.Db(6),r.Mc(" ",t.vesselTypeLabelsByType[t.ship.cargo]||"?"," "),r.Db(1),r.nc("vertical",!0),r.Db(5),r.Mc(" ",t.navigationStatusByKey[t.ship.status]||"?"," "),r.Db(7),r.Nc(" ",t.ship.length||"?"," x ",t.ship.width||"?","m "),r.Db(1),r.nc("vertical",!0),r.Db(5),r.Mc(" ",t.ship.draught?t.ship.draught+"m":"?"," ")}}const W3=function(t){return{transform:t}};function Z3(t,e){if(1&t&&(r.Kc(0),r.Vb(1,"mat-icon",8),r.Kc(2,"arrow_right_alt"),r.Ub()),2&t){const t=r.gc();r.Mc(" ",t.position.cog,"\xb0 "),r.Db(1),r.nc("ngStyle",r.sc(2,W3,"rotate("+(t.position.cog-90)+"deg)"))}}function q3(t,e){1&t&&r.Kc(0," ? ")}function Y3(t,e){if(1&t&&(r.Qb(0,"mat-divider"),r.Vb(1,"div",0),r.Vb(2,"div",1),r.Vb(3,"div",2),r.Kc(4,"Destination"),r.Ub(),r.Vb(5,"strong"),r.Kc(6),r.Ub(),r.Ub(),r.Qb(7,"mat-divider",3),r.Vb(8,"div",1),r.Vb(9,"div",2),r.Kc(10,"ETA"),r.Ub(),r.Vb(11,"strong"),r.Kc(12),r.hc(13,"date"),r.Ub(),r.Ub(),r.Ub(),r.Qb(14,"mat-divider"),r.Vb(15,"div",0),r.Vb(16,"div",9),r.Vb(17,"div",10),r.Kc(18,"Provenance"),r.Ub(),r.Vb(19,"strong"),r.Kc(20),r.Ub(),r.Ub(),r.Qb(21,"mat-divider",3),r.Qb(22,"div",11),r.Ub()),2&t){const t=r.gc();r.Db(6),r.Mc(" ",t.ship.destination||"?"," "),r.Db(1),r.nc("vertical",!0),r.Db(5),r.Lc(t.ship.eta?r.jc(13,5,t.ship.eta,"yyyy-MM-dd HH:mm"):"?"),r.Db(8),r.Mc(" ",t.ship.departure||"?"," "),r.Db(1),r.nc("vertical",!0)}}let Q3=(()=>{class t extends LT{constructor(){super(...arguments),this.positionInput=null,this.full=!1,this.historyMode=!1,this.position=null,this.navigationStatusByKey=JH,this.vesselTypeLabelsByType=ED}ngOnInit(){this.ensureMandatoryInputParams("ship")}ngOnChanges(t){t.positionInput&&(this.position=this.positionInput),t.ship&&!this.positionInput&&(this.position=this.ship)}}return t.\u0275fac=function(e){return X3(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-ship-infos"]],inputs:{ship:"ship",positionInput:["position","positionInput"],full:"full",historyMode:"historyMode"},features:[r.Ab,r.Bb],decls:36,vars:12,consts:[[1,"ship-infos__row"],[1,"ship-infos__info-cell"],[1,"ship-infos__info-label"],[3,"vertical"],[3,"ngIf"],[1,"d-flex-center"],[3,"ngIf","ngIfElse"],["unknown",""],[1,"ship-infos__course-icon",3,"ngStyle"],[1,"ship-infos__info-cell",2,"flex","1"],["title","Ancienne destination d\xe9clar\xe9e",1,"ship-infos__info-label"],[2,"flex","1"]],template:function(t,e){if(1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"div",2),r.Kc(3,"MMSI"),r.Ub(),r.Vb(4,"strong"),r.Kc(5),r.Ub(),r.Ub(),r.Qb(6,"mat-divider",3),r.Vb(7,"div",1),r.Vb(8,"div",2),r.Kc(9,"IMO"),r.Ub(),r.Vb(10,"strong"),r.Kc(11),r.Ub(),r.Ub(),r.Qb(12,"mat-divider",3),r.Vb(13,"div",1),r.Vb(14,"div",2),r.Kc(15,"Callsign"),r.Ub(),r.Vb(16,"strong"),r.Kc(17),r.Ub(),r.Ub(),r.Ub(),r.Ic(18,G3,26,7,"ng-template",4),r.Qb(19,"mat-divider"),r.Vb(20,"div",0),r.Vb(21,"div",1),r.Vb(22,"div",2),r.Kc(23,"Vitesse / Cap"),r.Ub(),r.Vb(24,"strong",5),r.Kc(25),r.Ic(26,Z3,3,4,"ng-template",6),r.Ic(27,q3,1,0,"ng-template",null,7,r.Jc),r.Ub(),r.Ub(),r.Qb(29,"mat-divider",3),r.Vb(30,"div",1),r.Vb(31,"div",2),r.Kc(32,"Position"),r.Ub(),r.Vb(33,"strong"),r.Kc(34),r.Ub(),r.Ub(),r.Ub(),r.Ic(35,Y3,23,8,"ng-template",4)),2&t){const t=r.wc(28);r.Db(5),r.Lc(e.ship.mmsi),r.Db(1),r.nc("vertical",!0),r.Db(5),r.Lc(e.ship.imo||"?"),r.Db(1),r.nc("vertical",!0),r.Db(5),r.Lc(e.ship.callsign||"?"),r.Db(1),r.nc("ngIf",e.full),r.Db(7),r.Mc(" ",e.position.sog?e.position.sog+" kt":"?"," / "),r.Db(1),r.nc("ngIf",e.position.cog)("ngIfElse",t),r.Db(3),r.nc("vertical",!0),r.Db(5),r.Lc(e.position.hdms),r.Db(1),r.nc("ngIf",!e.historyMode)}},directives:[GT,ut,Yp,bt],pipes:[kt],styles:['.ship-infos[_ngcontent-%COMP%]{background-color:#e7ecf0;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2);border-radius:2px}.ship-infos[_ngcontent-%COMP%]:after{content:" ";position:absolute;top:100%;left:50%;margin-left:-12px;border:12px solid transparent;border-top-color:#cdd1d4}.ship-infos__header[_ngcontent-%COMP%]{background-color:#cdd1d4;display:flex}.ship-infos__link[_ngcontent-%COMP%]{flex:1;padding:0;line-height:inherit;text-align:inherit;font-size:inherit;font-weight:inherit}.ship-infos__link[_ngcontent-%COMP%] .mat-button-wrapper{display:flex}.ship-infos__flag[_ngcontent-%COMP%]{margin:5px}.ship-infos__title[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:5px 0;flex:1}.ship-infos__name[_ngcontent-%COMP%]{font-size:1.2em}.ship-infos__type[_ngcontent-%COMP%]{font-size:.9em;color:#555}.ship-infos__row[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;font-size:.9em}.ship-infos__info-cell[_ngcontent-%COMP%]{padding:.4em;text-align:center}.ship-infos__info-label[_ngcontent-%COMP%]{color:grey;font-weight:500;padding-bottom:.2em}.ship-infos__course-icon[_ngcontent-%COMP%]{line-height:.7em;height:.7em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ship-infos__footer[_ngcontent-%COMP%]{background-color:#cdd1d4;padding-left:.4em;display:flex;align-items:center;font-size:.85em;line-height:36px}.ship-infos__signal-label[_ngcontent-%COMP%]{font-weight:500;color:#595959}'],changeDetection:0}),t})();const X3=r.Xb(Q3);function J3(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",14),r.cc("pointerdown",function(e){return r.Ac(t),r.gc().drag.emit(e)}),r.Vb(1,"mat-icon"),r.Kc(2,"control_camera"),r.Ub(),r.Ub()}}function t4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",15),r.cc("click",function(){return r.Ac(t),r.gc().close.emit(null)}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function e4(t,e){if(1&t&&(r.Vb(0,"span"),r.Kc(1),r.hc(2,"date"),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Lc(r.kc(2,1,1e3*t.ship.timestamp,"yyyy-MM-dd HH:mm:ss z",t.mapConfigService.useUTCDates$.value&&"z"))}}function i4(t,e){if(1&t&&(r.Vb(0,"span",16),r.hc(1,"date"),r.Kc(2),r.hc(3,"timeago"),r.Ub()),2&t){const t=r.gc();r.oc("title",r.kc(1,2,1e3*t.ship.timestamp,"yyyy-MM-dd HH:mm:ss z",t.mapConfigService.useUTCDates$.value&&"z")),r.Db(2),r.Lc(r.ic(3,6,1e3*t.ship.timestamp))}}let n4=(()=>{class t extends LT{constructor(t,e){super(),this.historyService=t,this.mapConfigService=e,this.pinned=!1,this.close=new r.o,this.drag=new r.o,this.vesselTypeLabelsByType=ED}ngOnInit(){this.ensureMandatoryInputParams("ship")}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(bI),r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-ship-tooltip"]],inputs:{pinned:"pinned",ship:"ship"},outputs:{close:"close",drag:"drag"},features:[r.Ab],decls:20,vars:13,consts:[[1,"ship-tooltip"],[1,"ship-tooltip__header"],[1,"ship-tooltip__flag",3,"mmsi"],[1,"ship-tooltip__title"],[1,"ship-tooltip__name"],[1,"ship-tooltip__type"],["mat-button","","class","small-mat-button ship-tooltip__move-icon","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",3,"pointerdown",4,"ngIf"],["mat-button","","class","small-mat-button","title","Fermer l'infobulle",3,"click",4,"ngIf"],[1,"ship-details-panel__infos",3,"ship","historyMode"],[1,"ship-tooltip__footer"],[1,"ship-tooltip__signal-label"],[1,"u-flex"],[4,"ngIf","ngIfElse"],["liveDisplay",""],["mat-button","","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",1,"small-mat-button","ship-tooltip__move-icon",3,"pointerdown"],["mat-button","","title","Fermer l'infobulle",1,"small-mat-button",3,"click"],[3,"title"]],template:function(t,e){if(1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Qb(2,"app-flag",2),r.Vb(3,"div",3),r.Vb(4,"strong",4),r.Kc(5),r.Ub(),r.Vb(6,"small",5),r.Kc(7),r.Ub(),r.Ub(),r.Ic(8,J3,3,0,"button",6),r.Ic(9,t4,3,0,"button",7),r.Ub(),r.Qb(10,"app-ship-infos",8),r.hc(11,"async"),r.Vb(12,"div",9),r.Vb(13,"span",10),r.Kc(14,"R\xe9ception :\xa0"),r.Ub(),r.Vb(15,"strong",11),r.Ic(16,e4,3,5,"span",12),r.hc(17,"async"),r.Ic(18,i4,4,8,"ng-template",null,13,r.Jc),r.Ub(),r.Ub(),r.Ub()),2&t){const t=r.wc(19);r.Db(2),r.nc("mmsi",e.ship.mmsi),r.Db(3),r.Lc(e.ship.name||"?"),r.Db(2),r.Lc(e.ship.cargo?e.vesselTypeLabelsByType[e.ship.cargo]:"?"),r.Db(1),r.nc("ngIf",e.pinned),r.Db(1),r.nc("ngIf",e.pinned),r.Db(1),r.nc("ship",e.ship)("historyMode",r.ic(11,9,e.historyService.timestamp$)),r.Db(6),r.nc("ngIf",r.ic(17,11,e.historyService.timestamp$))("ngIfElse",t)}},directives:[GF,ut,Q3,Dl,Yp],pipes:[St,kt,Tx],styles:['.ship-tooltip[_ngcontent-%COMP%]{min-width:320px;background-color:#e7ecf0;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2);border-radius:2px}.ship-tooltip[_ngcontent-%COMP%]:after{content:" ";position:absolute;border:12px solid transparent;pointer-events:none}.ship-tooltip__header[_ngcontent-%COMP%]{background-color:#cdd1d4;display:flex}.ship-tooltip__move-icon[_ngcontent-%COMP%]{cursor:move}.ship-tooltip__link[_ngcontent-%COMP%]{flex:1;padding:0;line-height:inherit;text-align:inherit;font-size:inherit;font-weight:inherit}.ship-tooltip__link[_ngcontent-%COMP%] .mat-button-wrapper{display:flex}.ship-tooltip__flag[_ngcontent-%COMP%]{margin:5px}.ship-tooltip__title[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:5px 0;flex:1}.ship-tooltip__name[_ngcontent-%COMP%]{font-size:1.2em}.ship-tooltip__type[_ngcontent-%COMP%]{font-size:.9em;color:#555}.ship-tooltip__row[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;font-size:.9em}.ship-tooltip__info-cell[_ngcontent-%COMP%]{padding:.4em;text-align:center}.ship-tooltip__info-label[_ngcontent-%COMP%]{color:grey;font-weight:500;padding-bottom:.2em}.ship-tooltip__course-icon[_ngcontent-%COMP%]{line-height:.7em;height:.7em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ship-tooltip__footer[_ngcontent-%COMP%]{background-color:#cdd1d4;padding-left:.4em;display:flex;align-items:center;font-size:.85em;line-height:36px}.ship-tooltip__signal-label[_ngcontent-%COMP%]{font-weight:500;color:#595959} .overlay-positioning-center-right .ship-tooltip:after{top:50%;left:100%;margin-top:-12px;border-left-color:#cdd1d4} .overlay-positioning-center-left .ship-tooltip:after{top:50%;right:100%;margin-top:-12px;border-right-color:#cdd1d4} .overlay-positioning-bottom-center .ship-tooltip:after{top:100%;left:50%;margin-left:-12px;border-top-color:#cdd1d4} .overlay-positioning-top-center .ship-tooltip:after{bottom:100%;left:50%;margin-left:-12px;border-bottom-color:#cdd1d4}'],changeDetection:0}),t})();function r4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",14),r.cc("pointerdown",function(e){return r.Ac(t),r.gc().drag.emit(e)}),r.Vb(1,"mat-icon"),r.Kc(2,"control_camera"),r.Ub(),r.Ub()}}function s4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",15),r.cc("click",function(){return r.Ac(t),r.gc().close.emit(null)}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function o4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",16),r.cc("click",function(){r.Ac(t);const e=r.gc();return e.historyService.setTimestamp(e.position.timestamp)}),r.Vb(1,"mat-icon"),r.Kc(2,"history"),r.Ub(),r.Ub()}}const a4=function(t){return["/ships/",t]};let l4=(()=>{class t extends LT{constructor(t,e){super(),this.historyService=t,this.mapConfigService=e,this.pinned=!1,this.close=new r.o,this.drag=new r.o,this.vesselTypeLabelsByType=ED}ngOnInit(){this.ensureMandatoryInputParams("position")}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(bI),r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-position-tooltip"]],inputs:{pinned:"pinned",position:"position"},outputs:{close:"close",drag:"drag"},features:[r.Ab],decls:20,vars:19,consts:[[1,"ship-tooltip"],[1,"ship-tooltip__header"],["mat-button","","title","Ouvrir la fiche du navire",1,"ship-tooltip__link",3,"routerLink"],[1,"ship-tooltip__flag",3,"mmsi"],[1,"ship-tooltip__title"],[1,"ship-tooltip__name"],[1,"ship-tooltip__type"],["mat-button","","class","small-mat-button ship-tooltip__move-icon","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",3,"pointerdown",4,"ngIf"],["mat-button","","class","small-mat-button","title","Fermer l'infobulle",3,"click",4,"ngIf"],[1,"ship-details-panel__infos",3,"ship","position","historyMode"],[1,"ship-tooltip__footer"],[1,"ship-tooltip__signal-label"],[1,"u-flex"],["mat-button","","title","Afficher la situation des navires \xe0 cette date",3,"click",4,"ngIf"],["mat-button","","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",1,"small-mat-button","ship-tooltip__move-icon",3,"pointerdown"],["mat-button","","title","Fermer l'infobulle",1,"small-mat-button",3,"click"],["mat-button","","title","Afficher la situation des navires \xe0 cette date",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"a",2),r.Qb(3,"app-flag",3),r.Vb(4,"div",4),r.Vb(5,"strong",5),r.Kc(6),r.Ub(),r.Vb(7,"small",6),r.Kc(8),r.Ub(),r.Ub(),r.Ub(),r.Ic(9,r4,3,0,"button",7),r.Ic(10,s4,3,0,"button",8),r.Ub(),r.Qb(11,"app-ship-infos",9),r.hc(12,"async"),r.Vb(13,"div",10),r.Vb(14,"span",11),r.Kc(15,"R\xe9ception :\xa0"),r.Ub(),r.Vb(16,"strong",12),r.Kc(17),r.hc(18,"date"),r.Ub(),r.Ic(19,o4,3,0,"button",13),r.Ub(),r.Ub()),2&t&&(r.Db(2),r.nc("routerLink",r.sc(17,a4,e.position.ship.mmsi)),r.Db(1),r.nc("mmsi",e.position.ship.mmsi),r.Db(3),r.Lc(e.position.ship.name||"?"),r.Db(2),r.Lc(e.position.ship.cargo?e.vesselTypeLabelsByType[e.position.ship.cargo]:"?"),r.Db(1),r.nc("ngIf",e.pinned),r.Db(1),r.nc("ngIf",e.pinned),r.Db(1),r.nc("ship",e.position.ship)("position",e.position)("historyMode",r.ic(12,11,e.historyService.timestamp$)),r.Db(6),r.Lc(r.kc(18,13,1e3*e.position.timestamp,"yyyy-MM-dd HH:mm:ss z",e.mapConfigService.useUTCDates$.value&&"z")),r.Db(2),r.nc("ngIf",e.pinned))},directives:[Il,aw,GF,ut,Q3,Dl,Yp],pipes:[St,kt],styles:['.ship-tooltip[_ngcontent-%COMP%]{min-width:320px;background-color:#e7ecf0;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2);border-radius:2px}.ship-tooltip[_ngcontent-%COMP%]:after{content:" ";position:absolute;border:12px solid transparent;pointer-events:none}.ship-tooltip__header[_ngcontent-%COMP%]{background-color:#cdd1d4;display:flex}.ship-tooltip__move-icon[_ngcontent-%COMP%]{cursor:move}.ship-tooltip__link[_ngcontent-%COMP%]{flex:1;padding:0;line-height:inherit;text-align:inherit;font-size:inherit;font-weight:inherit}.ship-tooltip__link[_ngcontent-%COMP%] .mat-button-wrapper{display:flex}.ship-tooltip__flag[_ngcontent-%COMP%]{margin:5px}.ship-tooltip__title[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:5px 0;flex:1}.ship-tooltip__name[_ngcontent-%COMP%]{font-size:1.2em}.ship-tooltip__type[_ngcontent-%COMP%]{font-size:.9em;color:#555}.ship-tooltip__row[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;font-size:.9em}.ship-tooltip__info-cell[_ngcontent-%COMP%]{padding:.4em;text-align:center}.ship-tooltip__info-label[_ngcontent-%COMP%]{color:grey;font-weight:500;padding-bottom:.2em}.ship-tooltip__course-icon[_ngcontent-%COMP%]{line-height:.7em;height:.7em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ship-tooltip__footer[_ngcontent-%COMP%]{background-color:#cdd1d4;padding-left:.4em;display:flex;align-items:center;font-size:.85em;line-height:36px}.ship-tooltip__signal-label[_ngcontent-%COMP%]{font-weight:500;color:#595959} .overlay-positioning-center-right .ship-tooltip:after{top:50%;left:100%;margin-top:-12px;border-left-color:#cdd1d4} .overlay-positioning-center-left .ship-tooltip:after{top:50%;right:100%;margin-top:-12px;border-right-color:#cdd1d4} .overlay-positioning-bottom-center .ship-tooltip:after{top:100%;left:50%;margin-left:-12px;border-top-color:#cdd1d4} .overlay-positioning-top-center .ship-tooltip:after{bottom:100%;left:50%;margin-left:-12px;border-bottom-color:#cdd1d4}'],changeDetection:0}),t})();function c4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",14),r.cc("pointerdown",function(e){return r.Ac(t),r.gc().drag.emit(e)}),r.Vb(1,"mat-icon"),r.Kc(2,"control_camera"),r.Ub(),r.Ub()}}function h4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",15),r.cc("click",function(){return r.Ac(t),r.gc().close.emit(null)}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function u4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",16),r.cc("click",function(){r.Ac(t);const e=r.gc();return e.historyService.setTimestamp(e.position.timestamp)}),r.Vb(1,"mat-icon"),r.Kc(2,"history"),r.Ub(),r.Ub()}}const d4=function(t){return["/aircrafts/",t]};let p4=(()=>{class t extends LT{constructor(t,e){super(),this.historyService=t,this.mapConfigService=e,this.pinned=!1,this.close=new r.o,this.drag=new r.o}ngOnInit(){this.ensureMandatoryInputParams("position")}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(bI),r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-aircraft-position-tooltip"]],inputs:{pinned:"pinned",position:"position"},outputs:{close:"close",drag:"drag"},features:[r.Ab],decls:19,vars:17,consts:[[1,"ship-tooltip"],[1,"ship-tooltip__header"],["mat-button","","title","Ouvrir la fiche de l'a\xe9ronef",1,"ship-tooltip__link",3,"routerLink"],[1,"ship-tooltip__flag",3,"flag"],[1,"ship-tooltip__title","ml-2"],[1,"ship-tooltip__name"],[1,"ship-tooltip__type"],["mat-button","","class","small-mat-button ship-tooltip__move-icon","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",3,"pointerdown",4,"ngIf"],["mat-button","","class","small-mat-button","title","Fermer l'infobulle",3,"click",4,"ngIf"],[1,"ship-details-panel__infos",3,"aircraft","position"],[1,"ship-tooltip__footer"],[1,"ship-tooltip__signal-label"],[1,"u-flex"],["mat-button","","title","Afficher la situation des navires \xe0 cette date",3,"click",4,"ngIf"],["mat-button","","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",1,"small-mat-button","ship-tooltip__move-icon",3,"pointerdown"],["mat-button","","title","Fermer l'infobulle",1,"small-mat-button",3,"click"],["mat-button","","title","Afficher la situation des navires \xe0 cette date",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"a",2),r.Qb(3,"app-flag",3),r.Vb(4,"div",4),r.Vb(5,"strong",5),r.Kc(6),r.Ub(),r.Vb(7,"small",6),r.Kc(8),r.Ub(),r.Ub(),r.Ub(),r.Ic(9,c4,3,0,"button",7),r.Ic(10,h4,3,0,"button",8),r.Ub(),r.Qb(11,"app-aircraft-infos",9),r.Vb(12,"div",10),r.Vb(13,"span",11),r.Kc(14,"R\xe9ception :\xa0"),r.Ub(),r.Vb(15,"strong",12),r.Kc(16),r.hc(17,"date"),r.Ub(),r.Ic(18,u4,3,0,"button",13),r.Ub(),r.Ub()),2&t&&(r.Db(2),r.nc("routerLink",r.sc(15,d4,e.position.aircraft.icao)),r.Db(1),r.nc("flag",e.position.aircraft.country.flag),r.Db(3),r.Nc("",e.position.aircraft.callsign||"?"," / ",e.position.aircraft.icao,""),r.Db(2),r.Mc("Type code: ",e.position.aircraft.icaoTypeCode||"?",""),r.Db(1),r.nc("ngIf",e.pinned),r.Db(1),r.nc("ngIf",e.pinned),r.Db(1),r.nc("aircraft",e.position.aircraft)("position",e.position),r.Db(5),r.Lc(r.kc(17,11,1e3*e.position.timestamp,"yyyy-MM-dd HH:mm:ss z",e.mapConfigService.useUTCDates$.value&&"z")),r.Db(2),r.nc("ngIf",e.pinned))},directives:[Il,aw,GF,ut,XF,Dl,Yp],pipes:[kt],styles:['.ship-tooltip[_ngcontent-%COMP%]{min-width:320px;background-color:#e7ecf0;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2);border-radius:2px}.ship-tooltip[_ngcontent-%COMP%]:after{content:" ";position:absolute;border:12px solid transparent;pointer-events:none}.ship-tooltip__header[_ngcontent-%COMP%]{background-color:#cdd1d4;display:flex}.ship-tooltip__move-icon[_ngcontent-%COMP%]{cursor:move}.ship-tooltip__link[_ngcontent-%COMP%]{flex:1;padding:0;line-height:inherit;text-align:inherit;font-size:inherit;font-weight:inherit}.ship-tooltip__link[_ngcontent-%COMP%] .mat-button-wrapper{display:flex}.ship-tooltip__flag[_ngcontent-%COMP%]{margin:5px}.ship-tooltip__title[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:5px 0;flex:1}.ship-tooltip__name[_ngcontent-%COMP%]{font-size:1.2em}.ship-tooltip__type[_ngcontent-%COMP%]{font-size:.9em;color:#555}.ship-tooltip__row[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;font-size:.9em}.ship-tooltip__info-cell[_ngcontent-%COMP%]{padding:.4em;text-align:center}.ship-tooltip__info-label[_ngcontent-%COMP%]{color:grey;font-weight:500;padding-bottom:.2em}.ship-tooltip__course-icon[_ngcontent-%COMP%]{line-height:.7em;height:.7em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ship-tooltip__footer[_ngcontent-%COMP%]{background-color:#cdd1d4;padding-left:.4em;display:flex;align-items:center;font-size:.85em;line-height:36px}.ship-tooltip__signal-label[_ngcontent-%COMP%]{font-weight:500;color:#595959} .overlay-positioning-center-right .ship-tooltip:after{top:50%;left:100%;margin-top:-12px;border-left-color:#cdd1d4} .overlay-positioning-center-left .ship-tooltip:after{top:50%;right:100%;margin-top:-12px;border-right-color:#cdd1d4} .overlay-positioning-bottom-center .ship-tooltip:after{top:100%;left:50%;margin-left:-12px;border-top-color:#cdd1d4} .overlay-positioning-top-center .ship-tooltip:after{bottom:100%;left:50%;margin-left:-12px;border-bottom-color:#cdd1d4}'],changeDetection:0}),t})();function f4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",17),r.cc("pointerdown",function(e){return r.Ac(t),r.gc().drag.emit(e)}),r.Vb(1,"mat-icon"),r.Kc(2,"control_camera"),r.Ub(),r.Ub()}}function m4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",18),r.cc("click",function(){return r.Ac(t),r.gc().close.emit(null)}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function g4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",19),r.cc("click",function(){r.Ac(t);const e=r.gc();return e.historyService.setTimestamp(e.h3element.timestamp)}),r.Vb(1,"mat-icon"),r.Kc(2,"history"),r.Ub(),r.Ub()}}const A4=function(t){return["/ships/",t]};let b4=(()=>{class t extends LT{constructor(t,e){super(),this.historyService=t,this.mapConfigService=e,this.pinned=!1,this.close=new r.o,this.drag=new r.o,this.vesselTypeLabelsByType=ED}ngOnInit(){this.ensureMandatoryInputParams("h3element")}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(bI),r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-h3element-tooltip"]],inputs:{pinned:"pinned",h3element:"h3element"},outputs:{close:"close",drag:"drag"},features:[r.Ab],decls:39,vars:20,consts:[[1,"ship-tooltip"],[1,"ship-tooltip__header"],["mat-button","","title","Ouvrir la fiche du navire",1,"ship-tooltip__link",3,"routerLink"],[1,"ship-tooltip__flag",3,"mmsi"],[1,"ship-tooltip__title"],[1,"ship-tooltip__name"],[1,"ship-tooltip__type"],["mat-button","","class","small-mat-button ship-tooltip__move-icon","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",3,"pointerdown",4,"ngIf"],["mat-button","","class","small-mat-button","title","Fermer l'infobulle",3,"click",4,"ngIf"],[1,"ship-tooltip__row"],[1,"ship-tooltip__info-cell"],[1,"ship-tooltip__info-label"],[3,"vertical"],[1,"ship-tooltip__footer"],[1,"ship-tooltip__signal-label"],[1,"u-flex"],["mat-button","","title","Afficher la situation des navires \xe0 cette date",3,"click",4,"ngIf"],["mat-button","","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",1,"small-mat-button","ship-tooltip__move-icon",3,"pointerdown"],["mat-button","","title","Fermer l'infobulle",1,"small-mat-button",3,"click"],["mat-button","","title","Afficher la situation des navires \xe0 cette date",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"a",2),r.Qb(3,"app-flag",3),r.Vb(4,"div",4),r.Vb(5,"strong",5),r.Kc(6),r.Ub(),r.Vb(7,"small",6),r.Kc(8),r.Ub(),r.Ub(),r.Ub(),r.Ic(9,f4,3,0,"button",7),r.Ic(10,m4,3,0,"button",8),r.Ub(),r.Vb(11,"div",9),r.Vb(12,"div",10),r.Vb(13,"div",11),r.Kc(14,"Res"),r.Ub(),r.Vb(15,"strong"),r.Kc(16),r.Ub(),r.Ub(),r.Qb(17,"mat-divider",12),r.Vb(18,"div",10),r.Vb(19,"div",11),r.Kc(20,"Literal"),r.Ub(),r.Vb(21,"strong"),r.Kc(22),r.Ub(),r.Ub(),r.Ub(),r.Qb(23,"mat-divider"),r.Vb(24,"div",9),r.Vb(25,"div",10),r.Vb(26,"div",11),r.Kc(27,"H3"),r.Ub(),r.Ub(),r.Qb(28,"mat-divider",12),r.Vb(29,"div",10),r.Vb(30,"strong"),r.Kc(31),r.Ub(),r.Ub(),r.Ub(),r.Vb(32,"div",13),r.Vb(33,"span",14),r.Kc(34,"R\xe9ception :\xa0"),r.Ub(),r.Vb(35,"strong",15),r.Kc(36),r.hc(37,"date"),r.Ub(),r.Ic(38,g4,3,0,"button",16),r.Ub(),r.Ub()),2&t&&(r.Db(2),r.nc("routerLink",r.sc(18,A4,e.h3element.ship.mmsi)),r.Db(1),r.nc("mmsi",e.h3element.ship.mmsi),r.Db(3),r.Lc(e.h3element.ship.name||"?"),r.Db(2),r.Nc("",e.h3element.ship.mmsi," - ",e.h3element.ship.cargo?e.vesselTypeLabelsByType[e.h3element.ship.cargo]:"?",""),r.Db(1),r.nc("ngIf",e.pinned),r.Db(1),r.nc("ngIf",e.pinned),r.Db(6),r.Lc(e.h3element.res||"?"),r.Db(1),r.nc("vertical",!0),r.Db(5),r.Lc(e.h3element.literal),r.Db(6),r.nc("vertical",!0),r.Db(3),r.Lc(e.h3element.h3index||"?"),r.Db(5),r.Lc(r.kc(37,14,1e3*e.h3element.timestamp,"yyyy-MM-dd HH:mm:ss z",e.mapConfigService.useUTCDates$.value&&"z")),r.Db(2),r.nc("ngIf",e.pinned))},directives:[Il,aw,GF,ut,GT,Dl,Yp],pipes:[kt],styles:['.ship-tooltip[_ngcontent-%COMP%]{min-width:320px;background-color:#e7ecf0;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2);border-radius:2px}.ship-tooltip[_ngcontent-%COMP%]:after{content:" ";position:absolute;border:12px solid transparent;pointer-events:none}.ship-tooltip__header[_ngcontent-%COMP%]{background-color:#cdd1d4;display:flex}.ship-tooltip__move-icon[_ngcontent-%COMP%]{cursor:move}.ship-tooltip__link[_ngcontent-%COMP%]{flex:1;padding:0;line-height:inherit;text-align:inherit;font-size:inherit;font-weight:inherit}.ship-tooltip__link[_ngcontent-%COMP%] .mat-button-wrapper{display:flex}.ship-tooltip__flag[_ngcontent-%COMP%]{margin:5px}.ship-tooltip__title[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:5px 0;flex:1}.ship-tooltip__name[_ngcontent-%COMP%]{font-size:1.2em}.ship-tooltip__type[_ngcontent-%COMP%]{font-size:.9em;color:#555}.ship-tooltip__row[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;font-size:.9em}.ship-tooltip__info-cell[_ngcontent-%COMP%]{padding:.4em;text-align:center}.ship-tooltip__info-label[_ngcontent-%COMP%]{color:grey;font-weight:500;padding-bottom:.2em}.ship-tooltip__course-icon[_ngcontent-%COMP%]{line-height:.7em;height:.7em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ship-tooltip__footer[_ngcontent-%COMP%]{background-color:#cdd1d4;padding-left:.4em;display:flex;align-items:center;font-size:.85em;line-height:36px}.ship-tooltip__signal-label[_ngcontent-%COMP%]{font-weight:500;color:#595959} .overlay-positioning-center-right .ship-tooltip:after{top:50%;left:100%;margin-top:-12px;border-left-color:#cdd1d4} .overlay-positioning-center-left .ship-tooltip:after{top:50%;right:100%;margin-top:-12px;border-right-color:#cdd1d4} .overlay-positioning-bottom-center .ship-tooltip:after{top:100%;left:50%;margin-left:-12px;border-top-color:#cdd1d4} .overlay-positioning-top-center .ship-tooltip:after{bottom:100%;left:50%;margin-left:-12px;border-bottom-color:#cdd1d4}']}),t})();function v4(t,e){if(1&t&&r.Qb(0,"app-aircraft-tooltip",11),2&t){const t=r.gc(2);r.nc("aircraft",t.entity)}}function _4(t,e){if(1&t&&r.Qb(0,"app-alert-tooltip",12),2&t){const t=r.gc(2);r.nc("alert",t.entity)}}function y4(t,e){if(1&t&&r.Qb(0,"app-annotation-tooltip",13),2&t){const t=r.gc(2);r.nc("annotation",t.entity)}}function w4(t,e){if(1&t&&r.Qb(0,"app-event-tooltip",14),2&t){const t=r.gc(2);r.nc("event",t.entity)}}function x4(t,e){if(1&t&&r.Qb(0,"app-ship-tooltip",15),2&t){const t=r.gc(2);r.nc("ship",t.entity)}}function C4(t,e){if(1&t&&r.Qb(0,"app-position-tooltip",16),2&t){const t=r.gc(2);r.nc("position",t.entity)}}function S4(t,e){if(1&t&&r.Qb(0,"app-aircraft-position-tooltip",16),2&t){const t=r.gc(2);r.nc("position",t.entity)}}function k4(t,e){if(1&t&&r.Qb(0,"app-h3element-tooltip",17),2&t){const t=r.gc(2);r.nc("h3element",t.entity)}}function E4(t,e){if(1&t&&(r.Vb(0,"app-map-tooltip",2),r.Tb(1,3),r.Ic(2,v4,1,1,"app-aircraft-tooltip",4),r.Ic(3,_4,1,1,"app-alert-tooltip",5),r.Ic(4,y4,1,1,"app-annotation-tooltip",6),r.Ic(5,w4,1,1,"app-event-tooltip",7),r.Ic(6,x4,1,1,"app-ship-tooltip",8),r.Ic(7,C4,1,1,"app-position-tooltip",9),r.Ic(8,S4,1,1,"app-aircraft-position-tooltip",9),r.Ic(9,k4,1,1,"app-h3element-tooltip",10),r.Sb(),r.Ub()),2&t){const t=r.gc();r.nc("map",t.map)("latitude",t.entity.lat)("longitude",t.entity.lon)("stopEvent",!1)("autoPositioning",!0)("opacity",t.tooltipsOpacity),r.Db(1),r.nc("ngSwitch",t.entity.kind),r.Db(1),r.nc("ngSwitchCase",t.EntityType.Aircraft),r.Db(1),r.nc("ngSwitchCase",t.EntityType.Alert),r.Db(1),r.nc("ngSwitchCase",t.EntityType.Annotation),r.Db(1),r.nc("ngSwitchCase",t.EntityType.Event),r.Db(1),r.nc("ngSwitchCase",t.EntityType.Ship),r.Db(1),r.nc("ngSwitchCase",t.EntityType.ShipPosition),r.Db(1),r.nc("ngSwitchCase",t.EntityType.AircraftPosition),r.Db(1),r.nc("ngSwitchCase",t.EntityType.H3Element)}}function D4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-aircraft-tooltip",26),r.cc("close",function(){r.Ac(t);const e=r.gc().$implicit;return r.gc().tooltipsService.unpinTooltip(e)})("drag",function(e){r.Ac(t);const i=r.gc().$implicit;return r.gc().startDragging(i,e)}),r.Ub()}if(2&t){const t=r.gc().$implicit;r.nc("aircraft",t.entity)("pinned",!0)}}function I4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-alert-tooltip",27),r.cc("close",function(){r.Ac(t);const e=r.gc().$implicit;return r.gc().tooltipsService.unpinTooltip(e)})("drag",function(e){r.Ac(t);const i=r.gc().$implicit;return r.gc().startDragging(i,e)}),r.Ub()}if(2&t){const t=r.gc().$implicit;r.nc("alert",t.entity)("pinned",!0)}}function P4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-annotation-tooltip",28),r.cc("close",function(){r.Ac(t);const e=r.gc().$implicit;return r.gc().tooltipsService.unpinTooltip(e)})("drag",function(e){r.Ac(t);const i=r.gc().$implicit;return r.gc().startDragging(i,e)}),r.Ub()}if(2&t){const t=r.gc().$implicit;r.nc("annotation",t.entity)("pinned",!0)}}function O4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-event-tooltip",29),r.cc("close",function(){r.Ac(t);const e=r.gc().$implicit;return r.gc().tooltipsService.unpinTooltip(e)})("drag",function(e){r.Ac(t);const i=r.gc().$implicit;return r.gc().startDragging(i,e)}),r.Ub()}if(2&t){const t=r.gc().$implicit;r.nc("event",t.entity)("pinned",!0)}}function M4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-ship-tooltip",30),r.cc("close",function(){r.Ac(t);const e=r.gc().$implicit;return r.gc().tooltipsService.unpinTooltip(e)})("drag",function(e){r.Ac(t);const i=r.gc().$implicit;return r.gc().startDragging(i,e)}),r.Ub()}if(2&t){const t=r.gc().$implicit;r.nc("ship",t.entity)("pinned",!0)}}function T4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-position-tooltip",31),r.cc("close",function(){r.Ac(t);const e=r.gc().$implicit;return r.gc().tooltipsService.unpinTooltip(e)})("drag",function(e){r.Ac(t);const i=r.gc().$implicit;return r.gc().startDragging(i,e)}),r.Ub()}if(2&t){const t=r.gc().$implicit;r.nc("position",t.entity)("pinned",!0)}}function R4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-aircraft-position-tooltip",31),r.cc("close",function(){r.Ac(t);const e=r.gc().$implicit;return r.gc().tooltipsService.unpinTooltip(e)})("drag",function(e){r.Ac(t);const i=r.gc().$implicit;return r.gc().startDragging(i,e)}),r.Ub()}if(2&t){const t=r.gc().$implicit;r.nc("position",t.entity)("pinned",!0)}}function V4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-h3element-tooltip",32),r.cc("close",function(){r.Ac(t);const e=r.gc().$implicit;return r.gc().tooltipsService.unpinTooltip(e)})("drag",function(e){r.Ac(t);const i=r.gc().$implicit;return r.gc().startDragging(i,e)}),r.Ub()}if(2&t){const t=r.gc().$implicit;r.nc("h3element",t.entity)("pinned",!0)}}function F4(t,e){if(1&t&&(r.Vb(0,"app-map-tooltip",18),r.Tb(1,3),r.Ic(2,D4,1,2,"app-aircraft-tooltip",19),r.Ic(3,I4,1,2,"app-alert-tooltip",20),r.Ic(4,P4,1,2,"app-annotation-tooltip",21),r.Ic(5,O4,1,2,"app-event-tooltip",22),r.Ic(6,M4,1,2,"app-ship-tooltip",23),r.Ic(7,T4,1,2,"app-position-tooltip",24),r.Ic(8,R4,1,2,"app-aircraft-position-tooltip",24),r.Ic(9,V4,1,2,"app-h3element-tooltip",25),r.Sb(),r.Ub()),2&t){const t=e.$implicit,i=r.gc();r.nc("map",i.map)("latitude",t.lat)("longitude",t.lon)("stopEvent",!1)("opacity",i.tooltipsOpacity),r.Db(1),r.nc("ngSwitch",t.entity.kind),r.Db(1),r.nc("ngSwitchCase",i.EntityType.Aircraft),r.Db(1),r.nc("ngSwitchCase",i.EntityType.Alert),r.Db(1),r.nc("ngSwitchCase",i.EntityType.Annotation),r.Db(1),r.nc("ngSwitchCase",i.EntityType.Event),r.Db(1),r.nc("ngSwitchCase",i.EntityType.Ship),r.Db(1),r.nc("ngSwitchCase",i.EntityType.ShipPosition),r.Db(1),r.nc("ngSwitchCase",i.EntityType.AircraftPosition),r.Db(1),r.nc("ngSwitchCase",i.EntityType.H3Element)}}const L4=new jZ({stroke:new VZ({color:"#666",lineDash:[10,10],width:2})});let U4=(()=>{class t extends LT{constructor(t,e,i,n){super(),this.changeDetectorRef=t,this.mapConfigService=e,this.tooltipMoveService=i,this.tooltipsService=n,this.entity=null,this.pinnedEntitiesTooltips=[],this.EntityType=OP,this.tooltipsOpacity=1}ngOnInit(){this.ensureMandatoryInputParams("map"),this.changeDetectorRef.detach(),this.source=new $q({features:[],useSpatialIndex:!1,wrapX:!1}),this.layer=new Nq({source:this.source,style:L4,zIndex:5}),this.map.addLayer(this.layer),this.subscriptions.push(this.tooltipsService.displayedEntity$.subscribe(t=>{this.entity=t,this.changeDetectorRef.detectChanges()}),this.tooltipsService.pinnedEntitiesTooltips$.subscribe(t=>{this.pinnedEntitiesTooltips=t;const e=t.filter(t=>t.lon!==t.entity.lon||t.lat!==t.entity.lat).map(t=>new pH(new kH([[t.lon,t.lat],[t.entity.lon,t.entity.lat]].map(t=>sE(t)))));this.source.clear(!0),this.source.addFeatures(e),this.changeDetectorRef.detectChanges()}),this.mapConfigService.tooltipsOpacity$.subscribe(t=>{this.tooltipsOpacity=t,this.changeDetectorRef.detectChanges()}))}ngOnDestroy(){super.ngOnDestroy(),this.source.clear(!0)}startDragging(t,e){var i;e.stopPropagation();const n=null===(i=e.target.closest(".ship-tooltip"))||void 0===i?void 0:i.getBoundingClientRect();if(!n)throw new Error("Impossible de d\xe9placer l'\xe9tiquette (\xe9l\xe9ment parent introuvable)");this.tooltipMoveService.startEntityTooltipMovement(t,[n.x+n.width/2-e.clientX,n.height-(e.clientY-n.y)+20]),document.body.addEventListener("pointerup",()=>{this.tooltipMoveService.endEntityTooltipMovement()},{capture:!0,once:!0})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(hI),r.Pb(E3),r.Pb(kT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-entity-tooltips"]],inputs:{map:"map"},features:[r.Ab],decls:2,vars:2,consts:[["className","hover-tooltip mat-elevation-z16",3,"map","latitude","longitude","stopEvent","autoPositioning","opacity",4,"ngIf"],["className","pinned-tooltip mat-elevation-z8",3,"map","latitude","longitude","stopEvent","opacity",4,"ngFor","ngForOf"],["className","hover-tooltip mat-elevation-z16",3,"map","latitude","longitude","stopEvent","autoPositioning","opacity"],[3,"ngSwitch"],[3,"aircraft",4,"ngSwitchCase"],[3,"alert",4,"ngSwitchCase"],[3,"annotation",4,"ngSwitchCase"],[3,"event",4,"ngSwitchCase"],[3,"ship",4,"ngSwitchCase"],[3,"position",4,"ngSwitchCase"],[3,"h3element",4,"ngSwitchCase"],[3,"aircraft"],[3,"alert"],[3,"annotation"],[3,"event"],[3,"ship"],[3,"position"],[3,"h3element"],["className","pinned-tooltip mat-elevation-z8",3,"map","latitude","longitude","stopEvent","opacity"],[3,"aircraft","pinned","close","drag",4,"ngSwitchCase"],[3,"alert","pinned","close","drag",4,"ngSwitchCase"],[3,"annotation","pinned","close","drag",4,"ngSwitchCase"],[3,"event","pinned","close","drag",4,"ngSwitchCase"],[3,"ship","pinned","close","drag",4,"ngSwitchCase"],[3,"position","pinned","close","drag",4,"ngSwitchCase"],[3,"h3element","pinned","close","drag",4,"ngSwitchCase"],[3,"aircraft","pinned","close","drag"],[3,"alert","pinned","close","drag"],[3,"annotation","pinned","close","drag"],[3,"event","pinned","close","drag"],[3,"ship","pinned","close","drag"],[3,"position","pinned","close","drag"],[3,"h3element","pinned","close","drag"]],template:function(t,e){1&t&&(r.Ic(0,E4,10,15,"app-map-tooltip",0),r.Ic(1,F4,10,14,"app-map-tooltip",1)),2&t&&(r.nc("ngIf",e.entity),r.Db(1),r.nc("ngForOf",e.pinnedEntitiesTooltips))},directives:[ut,ct,MX,mt,gt,M3,V3,N3,$3,n4,l4,p4,b4],styles:[".hover-tooltip{z-index:2}.pinned-tooltip{z-index:1}"],encapsulation:2}),t})();var B4=function(t){return t.Uninitialized="uninitialized",t.Initializing="initializing",t.Initialized="initialized",t}({});const N4=window;let j4=(()=>{class t{constructor(t){this.authenticationService=t,this.enabled=!"https://chat.anais.beta.gouv.fr".startsWith("{{")&&!"Bjc2UJejiNyuJXPgQpSNdiSV".startsWith("{{"),this.dialogActive=!1,this.state=B4.Uninitialized,this.authenticationService.user$.subscribe(t=>{this.user=t,!this.user&&N4.$chatwoot&&(N4.$chatwoot.reset(),this.dialogActive=!1)})}toggleChat(){return Object(ue.a)(this,void 0,void 0,function*(){this.state!==B4.Initializing&&(this.state===B4.Uninitialized&&(this.state=B4.Initializing,yield this.initialize(),this.state=B4.Initialized),N4.$chatwoot.toggle(),this.dialogActive=!this.dialogActive,setTimeout(()=>{N4.$chatwoot.setUser(this.user.email,{email:this.user.email})},500))})}initialize(){return Object(ue.a)(this,void 0,void 0,function*(){return new Promise(t=>{N4.chatwootSettings={hideMessageBubble:!0,position:"right",locale:"fr"};const e=document.createElement("script"),i=document.getElementsByTagName("script")[0];e.src="https://chat.anais.beta.gouv.fr/packs/js/sdk.js",i.parentNode.insertBefore(e,i),e.onload=()=>{N4.chatwootSDK.run({baseUrl:"https://chat.anais.beta.gouv.fr",websiteToken:"Bjc2UJejiNyuJXPgQpSNdiSV"}),N4.$chatwoot.reset(),window.addEventListener("message",t=>{'chatwoot-widget:{"event":"toggleBubble"}'===t.data&&(this.dialogActive=!1)}),t()}})})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(yI))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),z4=(()=>{class t{constructor(){this.screenshotMode$=new Av.a(!1)}toggleScreenshotMode(){this.screenshotMode$.next(!this.screenshotMode$.value)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),H4=(()=>{class t{constructor(t,e,i,n){this.historyService=t,this.mapConfigService=e,this.mapService=i,this.workerService=n}init(){Hg([this.mapService.view$,this.mapConfigService.manualMapFetch$]).pipe(Gg(1),He(([t,e])=>e)).subscribe(([t])=>{const e=qD.fromOLExtent(t.extent).toLatLonExtent();this.viewExtent(e)})}viewExtent(t){this.lastExtent=t}fetchData(){return Object(ue.a)(this,void 0,void 0,function*(){0!==this.historyService.timestamp$.value?this.mapConfigService.showShipsLayer$.value&&this.workerService.areaShipsFeeds$.next({area:new EC(0,0),data:yield this.workerService.ships.getShipsAtBboxAndTimestamp(this.lastExtent,this.historyService.timestamp$.value)}):yield Promise.all([this.mapConfigService.showShipsLayer$.value&&(()=>Object(ue.a)(this,void 0,void 0,function*(){this.workerService.areaShipsFeeds$.next({area:new EC(0,0),data:yield this.workerService.ships.getShipsAtBbox(this.lastExtent)})}))(),this.mapConfigService.showAircraftsLayer$.value&&(()=>Object(ue.a)(this,void 0,void 0,function*(){this.workerService.areaAircraftsFeeds$.next({area:new EC(0,0),data:yield this.workerService.aircrafts.getAircraftsAtBbox(this.lastExtent)})}))()])})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(bI),r.Zb(hI),r.Zb(pI),r.Zb(_I.a))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function K4(t,e){1&t&&(r.Vb(0,"mat-error",14),r.Kc(1," Le nom est obligatoire. "),r.Ub())}function $4(t,e){if(1&t&&(r.Vb(0,"mat-option",15),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.key),r.Db(1),r.Mc(" ",t.name," ")}}function G4(t,e){1&t&&(r.Vb(0,"mat-error",14),r.Kc(1," La position est obligatoire. "),r.Ub())}function W4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-form-field",7),r.Vb(1,"mat-label"),r.Kc(2,"Position"),r.Ub(),r.Vb(3,"input",16),r.cc("accept",function(){return r.Ac(t),r.gc().onPositionUpdate()})("complete",function(e){return r.Ac(t),r.gc().onPositionComplete(e)}),r.Ub(),r.Ic(4,G4,2,0,"mat-error",4),r.Ub()}if(2&t){const t=r.gc();r.Db(3),r.nc("imask",t.lonLatMask),r.Db(1),r.nc("ngIf",null==t.form.controls.position.errors?null:t.form.controls.position.errors.required)}}let Z4=(()=>{class t extends LT{constructor(t,e){super(),this.formBuilder=t,this.annotationService=e,this.validGeom=!1,this.showColorPicker=!1,this.geometryTypes=PP,this.lonLatMask={mask:"LAT\xb0`MIN'`MIN\"NS LON\xb0`MIN'`MIN\"EW",lazy:!1,blocks:{LON:{mask:ob,from:0,to:180},LAT:{mask:ob,from:0,to:85},NS:{mask:gb,enum:["N","S"]},EW:{mask:gb,enum:["E","W"]},MIN:{mask:ob,from:0,to:59}}},this.updatingGeomFromLayer=!1,this.updatingGeomFromForm=!1,this.saveEditedAnnotation=()=>Object(ue.a)(this,void 0,void 0,function*(){yield this.annotationService.saveEditedAnnotation()})}ngOnInit(){var t,e;const i=this.annotationService.editedAnnotation$.value,n=null!==(e=null===(t=i.geom)||void 0===t?void 0:t.type)&&void 0!==e?e:this.annotationService.editedAnnotationGeomType$.value;this.form=this.formBuilder.group({name:[i.name,pc.required],description:[i.description],color:[i.color],geomType:[n]});const r="Point"===n&&i.geom?rI([i.lon,i.lat]):null;this.updatePositionControl(n,r),this.subscriptions.push(this.form.controls.geomType.valueChanges.subscribe(t=>{this.annotationService.editedAnnotationGeomType$.next(t),this.updatePositionControl(t)}),this.form.valueChanges.pipe(He(()=>!this.updatingGeomFromLayer&&!this.updatingGeomFromForm)).subscribe(t=>{this.annotationService.editedAnnotation$.value.name=t.name,this.annotationService.editedAnnotation$.value.description=t.description,this.annotationService.editedAnnotation$.value.color=t.color,this.annotationService.refreshEditedAnnotation()}),this.annotationService.editedAnnotation$.pipe(ar(t=>!!t),Object(Ge.a)(t=>t.geom),mn(),Pe(t=>{this.validGeom=!!t}),He(()=>!this.updatingGeomFromForm)).subscribe(t=>{if("Point"===(null==t?void 0:t.type)){const e=rI(t.coordinates);this.updatingGeomFromLayer=!0,this.form.get("position").setValue(e,{emitEvent:!1}),this.updatingGeomFromLayer=!1}}))}updatePositionControl(t,e){"Point"===t?(this.form.addControl("position",new eh(null!=e?e:"__\xb0__'__\"_ ___\xb0__'__\"_",pc.required)),this.form.controls.position.valueChanges.pipe(He(()=>!this.updatingGeomFromLayer&&!this.updatingGeomFromForm)).subscribe(()=>{this.updatingGeomFromForm=!0})):this.form.removeControl("position")}onPositionUpdate(){this.form.controls.position.setErrors({required:!0}),this.updatingGeomFromForm=!1}onPositionComplete(t){try{const{lon:e,lat:i}=WK()(t);this.form.controls.position.setErrors(null),this.updatingGeomFromLayer||(this.updatingGeomFromForm=!0,this.annotationService.updateEditedAnnotationGeom({type:"Point",coordinates:[e,i]}),this.updatingGeomFromForm=!1)}catch($nt){}}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Lh),r.Pb(MP))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-annotation-form"]],features:[r.Ab],decls:23,vars:12,consts:[[1,"pa-1","d-flex-column","annotation-form",3,"formGroup"],[1,"d-flex-baseline"],["appearance","outline",1,"pa-1","u-flex"],["matInput","","type","text","name","name","formControlName","name","required",""],["class","input-error",4,"ngIf"],["mat-mini-fab","","title","Changer la couleur du marqueur",1,"annotation-form__color-picker-button",3,"click"],["name","color","formControlName","color",1,"annotation-form__color-picker-attach",3,"colorPicker","cpAlphaChannel","cpOutputFormat","cpToggle","colorPickerChange","cpToggleChange"],["appearance","outline",1,"pa-1"],["matInput","","name","description","formControlName","description","cdkTextareaAutosize","","cdkAutosizeMinRows","3","cdkAutosizeMaxRows","6"],[1,"d-flex"],["name","geomType","formControlName","geomType","required",""],[3,"value",4,"ngFor","ngForOf"],["appearance","outline","class","pa-1",4,"ngIf"],["mat-stroked-button","","color","primary","title","Sauvegarder l'annotation",3,"app-async-action","disabled"],[1,"input-error"],[3,"value"],["matInput","","name","position","formControlName","position","required","",3,"imask","accept","complete"]],template:function(t,e){1&t&&(r.Vb(0,"form",0),r.Vb(1,"div",1),r.Vb(2,"mat-form-field",2),r.Vb(3,"mat-label"),r.Kc(4,"Nom"),r.Ub(),r.Qb(5,"input",3),r.Ic(6,K4,2,0,"mat-error",4),r.Ub(),r.Vb(7,"button",5),r.cc("click",function(){return e.showColorPicker=!e.showColorPicker}),r.Ub(),r.Vb(8,"input",6),r.cc("colorPickerChange",function(t){return e.form.get("color").setValue(t)})("cpToggleChange",function(t){return e.showColorPicker=t}),r.Ub(),r.Ub(),r.Vb(9,"mat-form-field",7),r.Vb(10,"mat-label"),r.Kc(11,"Description"),r.Ub(),r.Vb(12,"textarea",8),r.Kc(13," "),r.Ub(),r.Ub(),r.Vb(14,"div",9),r.Vb(15,"mat-form-field",7),r.Vb(16,"mat-label"),r.Kc(17,"Type"),r.Ub(),r.Vb(18,"mat-select",10),r.Ic(19,$4,2,2,"mat-option",11),r.Ub(),r.Ub(),r.Ic(20,W4,5,2,"mat-form-field",12),r.Ub(),r.Vb(21,"button",13),r.Kc(22,"Sauvegarder"),r.Ub(),r.Ub()),2&t&&(r.nc("formGroup",e.form),r.Db(6),r.nc("ngIf",null==e.form.controls.name.errors?null:e.form.controls.name.errors.required),r.Db(1),r.Fc("background-color",e.form.get("color").value),r.Db(1),r.nc("colorPicker",e.form.get("color").value)("cpAlphaChannel","disabled")("cpOutputFormat","hex")("cpToggle",e.showColorPicker),r.Db(11),r.nc("ngForOf",e.geometryTypes),r.Db(1),r.nc("ngIf","Point"===e.form.controls.geomType.value),r.Db(1),r.nc("app-async-action",e.saveEditedAnnotation)("disabled",e.form.invalid||!e.validGeom))},directives:[dh,Fc,_h,_u,cu,Ou,ac,Vc,Eh,Ih,ut,Dl,mv,Cu,Vg,ct,dR,nu,bl,Cb],styles:[".annotation-form[_ngcontent-%COMP%]{min-width:340px}.annotation-form__color-picker-button[_ngcontent-%COMP%]{margin-left:16px;margin-right:8px;height:30px;width:30px} .annotation-form__color-picker-button.mat-fab:not(.mat-button-disabled):active:not([class*=mat-elevation-z]), .annotation-form__color-picker-button.mat-mini-fab:not(.mat-button-disabled):active:not([class*=mat-elevation-z]){box-shadow:0 5px 7px -2px rgba(0,0,0,.2),0 8px 14px 2px rgba(0,0,0,.14),0 4px 20px 2px rgba(0,0,0,.12)!important}.annotation-form__color-picker-attach[_ngcontent-%COMP%]{opacity:0;width:1px;height:1px;pointer-events:none}"]}),t})();function q4(t){return!["INPUT","TEXTAREA"].includes(t.target.nodeName)}function Y4(t){return t.value instanceof Date?null:{invalid:!0}}function Q4(t,e){1&t&&r.Qb(0,"mat-spinner",19)}let X4=(()=>{class t extends LT{constructor(t,e,i){super(),this.historyService=t,this.mapConfigService=e,this.workerService=i,this.useUTCDates=!1,this.dateControl=new eh(null,[Y4]),this.inflightRequests=!1}ngOnInit(){this.subscriptions.push(this.mapConfigService.useUTCDates$.subscribe(t=>{this.useUTCDates=t}),this.dateControl.valueChanges.subscribe(t=>{this.historyService.setTimestamp(NO(t))}),this.workerService.inflightRequests$.subscribe(t=>{this.inflightRequests=t}))}ngOnDestroy(){super.ngOnDestroy()}updateMapTimestamp(t){this.selectedTimestamp!==t&&(this.selectedTimestamp=t,this.historyService.setTimestamp(this.selectedTimestamp))}formatTimestampAsDate(t){return t?K(1e3*t,"yyyy-MM-dd \xe0 HH:mm:ss","en-US"):""}onGlobalKeyUp(t){if(!this.historyService.timestamp$.value||!q4(t))return;const e=60*(t.shiftKey?30:5);"ArrowLeft"===t.key&&this.historyService.incrementTimestamp(-e),"ArrowRight"===t.key&&this.historyService.incrementTimestamp(e)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(bI),r.Pb(hI),r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-timeline-panel"]],hostBindings:function(t,e){1&t&&r.cc("keyup",function(t){return e.onGlobalKeyUp(t)},!1,r.zc)},features:[r.Ab],decls:36,vars:19,consts:[[1,"timeline-panel"],[1,"timeline-panel__header"],[1,"timeline-panel__title"],["class","mt-2","strokeWidth","3","diameter","30",4,"ngIf"],["matInput","",2,"width","0",3,"ngxMatDatetimePicker","formControl"],[3,"showSeconds"],["picker",""],["gid","history-datepicker","date","2021-06-17"],["mat-button","","title","Choisir une date",2,"height","100%",3,"disabled","click"],["gid","history-extrapolation","date","2021-05-21"],["mat-button","","title","[Exp\xe9rimental] Extrapoler les traces au temps exact (avec cap / vitesse)",2,"height","100%",3,"click"],[3,"color"],["mat-button","","title","Revenir au temps-r\xe9el",3,"click"],[1,"d-flex-center"],["mat-button","","title","Revenir 30 minutes en arri\xe8re",3,"disabled","click"],["mat-button","","title","Revenir 5 minutes en arri\xe8re",3,"disabled","click"],[1,"mx-2","u-flex"],["mat-button","","title","Avancer de 5 minutes",3,"disabled","click"],["mat-button","","title","Avancer de 30 minutes",3,"disabled","click"],["strokeWidth","3","diameter","30",1,"mt-2"]],template:function(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"div",2),r.Kc(3," Situation maritime instantan\xe9e "),r.Ub(),r.Ic(4,Q4,1,0,"mat-spinner",3),r.Qb(5,"input",4),r.Qb(6,"ngx-mat-datetime-picker",5,6),r.Vb(8,"app-glitter",7),r.Vb(9,"button",8),r.cc("click",function(){return r.Ac(t),r.wc(7).open()}),r.Vb(10,"mat-icon"),r.Kc(11,"today"),r.Ub(),r.Ub(),r.Ub(),r.Vb(12,"app-glitter",9),r.Vb(13,"button",10),r.cc("click",function(){return e.mapConfigService.toggleEnableHistoryModeExtrapolation()}),r.Vb(14,"mat-icon",11),r.Kc(15,"insights"),r.Ub(),r.Ub(),r.Ub(),r.Vb(16,"button",12),r.cc("click",function(){return e.historyService.resetTimestamp()}),r.Vb(17,"mat-icon"),r.Kc(18,"close"),r.Ub(),r.Ub(),r.Ub(),r.Vb(19,"div",13),r.Vb(20,"button",14),r.cc("click",function(){return e.historyService.incrementTimestamp(-1800)}),r.Vb(21,"mat-icon"),r.Kc(22,"replay_30"),r.Ub(),r.Ub(),r.Vb(23,"button",15),r.cc("click",function(){return e.historyService.incrementTimestamp(-300)}),r.Vb(24,"mat-icon"),r.Kc(25,"replay_5"),r.Ub(),r.Ub(),r.Vb(26,"div",16),r.Kc(27),r.hc(28,"date"),r.hc(29,"async"),r.Ub(),r.Vb(30,"button",17),r.cc("click",function(){return e.historyService.incrementTimestamp(300)}),r.Vb(31,"mat-icon"),r.Kc(32,"forward_5"),r.Ub(),r.Ub(),r.Vb(33,"button",18),r.cc("click",function(){return e.historyService.incrementTimestamp(1800)}),r.Vb(34,"mat-icon"),r.Kc(35,"forward_30"),r.Ub(),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=r.wc(7);r.Db(4),r.nc("ngIf",e.inflightRequests),r.Db(1),r.nc("ngxMatDatetimePicker",t)("formControl",e.dateControl),r.Db(1),r.nc("showSeconds",!0),r.Db(3),r.nc("disabled",e.inflightRequests),r.Db(5),r.Fc("font-weight",e.mapConfigService.enableHistoryModeExtrapolation$.value?"bold":"400"),r.nc("color",e.mapConfigService.enableHistoryModeExtrapolation$.value?"primary":"default"),r.Db(6),r.nc("disabled",e.inflightRequests),r.Db(3),r.nc("disabled",e.inflightRequests),r.Db(4),r.Lc(r.kc(28,13,1e3*r.ic(29,17,e.historyService.timestamp$),"yyyy-MM-dd \xe0 HH:mm:ss z",e.useUTCDates&&"z")),r.Db(3),r.nc("disabled",e.inflightRequests),r.Db(3),r.nc("disabled",e.inflightRequests)}},directives:[ut,Ou,am,ac,Vc,bh,im,DL,Dl,Yp,fF],pipes:[kt,St],styles:[".timeline-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:stretch}.timeline-panel__header[_ngcontent-%COMP%]{display:flex;background-color:#e6e6e6;min-height:50px}.timeline-panel__title[_ngcontent-%COMP%]{padding:.5em;font-size:1.1em;align-self:center;flex:1}"]}),t})(),J4=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-chip-experimental"]],decls:2,vars:0,consts:[["title","Cette fonctionnalit\xe9 est exp\xe9rimentale et peut rendre l'application instable.",1,"chip"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Kc(1,"Exp\xe9rimental"),r.Ub())},styles:[".chip[_ngcontent-%COMP%] {\n display: inline-block;\n padding: 3px 6px;\n border-radius: 8px;\n font-size: .7rem;\n line-height: 1rem;\n background-color: #df7132;\n color: #ffffff;\n}"],changeDetection:0}),t})();function t5(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",9),r.cc("click",function(){return r.Ac(t),r.gc().resetPlayback()}),r.Vb(1,"mat-icon"),r.Kc(2,"chevron_left"),r.Ub(),r.Ub()}}function e5(t,e){if(1&t&&(r.Vb(0,"div",10),r.Vb(1,"mat-form-field",11),r.Qb(2,"input",12),r.Qb(3,"mat-datepicker-toggle",13),r.Qb(4,"ngx-mat-datetime-picker",14,15),r.Ub(),r.Vb(6,"button",16),r.Kc(7," Charger le rejeu ! "),r.Ub(),r.Ub()),2&t){const t=r.wc(5),e=r.gc();r.Db(2),r.nc("ngxMatDatetimePicker",t)("formControl",e.dateControl),r.Db(1),r.nc("for",t),r.Db(1),r.nc("showSeconds",!1),r.Db(2),r.nc("app-async-action",e.loadPlayback)("disabled",e.dateControl.invalid)}}function i5(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",17),r.Vb(1,"button",18),r.cc("click",function(){return r.Ac(t),r.gc().playbackService.reinitiate()}),r.Vb(2,"mat-icon"),r.Kc(3,"restore"),r.Ub(),r.Ub(),r.Vb(4,"button",19),r.cc("click",function(){return r.Ac(t),r.gc().playbackService.togglePause()}),r.Vb(5,"mat-icon"),r.Kc(6),r.Ub(),r.Ub(),r.Vb(7,"div",20),r.Kc(8),r.hc(9,"date"),r.hc(10,"async"),r.Ub(),r.Vb(11,"button",21),r.cc("click",function(){return r.Ac(t),r.gc().playbackService.updateSpeed("-")}),r.Kc(12,"-"),r.Ub(),r.Vb(13,"div",22),r.Kc(14),r.hc(15,"async"),r.Ub(),r.Vb(16,"button",23),r.cc("click",function(){return r.Ac(t),r.gc().playbackService.updateSpeed("+")}),r.Kc(17,"+"),r.Ub(),r.Vb(18,"button",24),r.cc("click",function(){return r.Ac(t),r.gc().playbackService.toggleReverseMode()}),r.Vb(19,"mat-icon"),r.Kc(20),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.Db(4),r.nc("title",t.playbackService.paused$.value?"D\xe9marrer la lecture":"Mettre en pause la lecture"),r.Db(2),r.Lc(t.playbackService.paused$.value?"play_arrow":"pause"),r.Db(2),r.Lc(r.kc(9,5,1e3*r.ic(10,9,t.playbackService.animationTimestamp$),"yyyy-MM-dd \xe0 HH:mm z",t.useUTCDates&&"z")),r.Db(6),r.Mc("x",r.ic(15,11,t.playbackService.animationSpeed$)," "),r.Db(6),r.Lc(t.playbackService.reverseMode$.value?"west":"east")}}let n5=(()=>{class t extends LT{constructor(t,e){super(),this.playbackService=t,this.mapConfigService=e,this.experimentalText="Cette fonctionnalit\xe9 est exp\xe9rimentale et n'est pas compl\xe8tement adapt\xe9e au reste des fonctionnalit\xe9s ANAIS. Ne fonctionnent pas :\n- les filtres sur les navires ;\n- les \xe9tiquettes permanentes ;\n- le clic sur les navires pour ouvrir la fiche navire ou visualiser les traces.\nLes donn\xe9es sont charg\xe9es par heure avec 1 seule position prise toutes les 6 minutes.\nIl se peut que la trajectoire affich\xe9e ne repr\xe9sente pas la r\xe9alit\xe9 si leur trajectoire n'est pas stable (contrairement \xe0 un cargo par exemple).",this.useUTCDates=!1,this.dateControl=new eh(null,[Y4]),this.playbackLoaded=!1,this.loadingPlayback=!1,this.duration=3600,this.loadPlayback=()=>Object(ue.a)(this,void 0,void 0,function*(){this.loadingPlayback=!0;try{yield this.playbackService.loadPlayback(NO(this.dateControl.value),this.duration)}finally{this.loadingPlayback=!1}this.playbackLoaded=!0})}ngOnInit(){this.subscriptions.push(this.mapConfigService.useUTCDates$.subscribe(t=>{this.useUTCDates=t}))}resetPlayback(){this.playbackLoaded=!1,this.playbackService.exitPlaybackMode(),this.playbackService.enterPlaybackMode()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(tM),r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-playback-panel"]],features:[r.Ab],decls:13,vars:4,consts:[[1,"playback-panel"],[1,"playback-panel__header"],[1,"playback-panel__title","d-flex-center"],[1,"ml-1"],["matTooltipPosition","above",1,"ml-1",2,"cursor","help",3,"matTooltip"],["mat-button","","title","Revenir au choix de la date",3,"click",4,"ngIf"],["mat-button","","title","Fermer le panneau","routerLink","/"],["class","d-flex pa-2",4,"ngIf"],["class","d-flex-center",4,"ngIf"],["mat-button","","title","Revenir au choix de la date",3,"click"],[1,"d-flex","pa-2"],["appearance","outline",1,"mr-2","playback-panel__date-input"],["matInput","","placeholder","S\xe9lectionnez une date",3,"ngxMatDatetimePicker","formControl"],["matSuffix","",3,"for"],[3,"showSeconds"],["picker",""],["mat-stroked-button","","title","Charger les donn\xe9es du rejeu",3,"app-async-action","disabled"],[1,"d-flex-center"],["mat-button","","title","Revenir \xe0 l'heure de d\xe9part",3,"click"],["mat-button","",3,"title","click"],[1,"mx-2"],["mat-button","","title","Diminuer la vitesse de lecture",3,"click"],["title","Vitesse de lecture (x1 = 1 seconde de lecture \xe9quivaut \xe0 6 secondes r\xe9elles)",1,"mx-2"],["mat-button","","title","Augmenter la vitesse de lecture",3,"click"],["mat-button","","title","Changer le sens de lecture",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"div",2),r.Kc(3," Rejeu de situation "),r.Qb(4,"app-chip-experimental",3),r.Vb(5,"mat-icon",4),r.Kc(6,"help"),r.Ub(),r.Ub(),r.Ic(7,t5,3,0,"button",5),r.Vb(8,"button",6),r.Vb(9,"mat-icon"),r.Kc(10,"close"),r.Ub(),r.Ub(),r.Ub(),r.Ic(11,e5,8,6,"div",7),r.Ic(12,i5,21,13,"div",8),r.Ub()),2&t&&(r.Db(5),r.nc("matTooltip",e.experimentalText),r.Db(2),r.nc("ngIf",e.playbackLoaded),r.Db(4),r.nc("ngIf",!e.playbackLoaded),r.Db(1),r.nc("ngIf",e.playbackLoaded))},directives:[J4,Yp,oA,ut,Dl,ow,_u,Ou,am,ac,Vc,bh,Bd,fu,im,dR],pipes:[kt,St],styles:[".playback-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:stretch}.playback-panel__header[_ngcontent-%COMP%]{display:flex;background-color:#e6e6e6;min-height:50px}.playback-panel__title[_ngcontent-%COMP%]{padding:.5em;font-size:1.1em;align-self:center;flex:1}.playback-panel__date-input[_ngcontent-%COMP%] .mat-form-field-wrapper{padding-bottom:0!important;margin:0!important}"]}),t})();function r5(t,e){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var i in e=e||{})e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function s5(t,e,i){ZP(2,arguments);var n=i||{},r=n.locale,s=r&&r.options&&r.options.weekStartsOn,o=null==s?0:sO(s),a=null==n.weekStartsOn?o:sO(n.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var l=qP(t),c=sO(e),h=l.getUTCDay(),u=c%7,d=(u+7)%7,p=(d<a?7:0)+c-h;return l.setUTCDate(l.getUTCDate()+p),l}var o5=/^(1[0-2]|0?\d)/,a5=/^(3[0-1]|[0-2]?\d)/,l5=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,c5=/^(5[0-3]|[0-4]?\d)/,h5=/^(2[0-3]|[0-1]?\d)/,u5=/^(2[0-4]|[0-1]?\d)/,d5=/^(1[0-1]|0?\d)/,p5=/^(1[0-2]|0?\d)/,f5=/^[0-5]?\d/,m5=/^[0-5]?\d/,g5=/^\d/,A5=/^\d{1,2}/,b5=/^\d{1,3}/,v5=/^\d{1,4}/,_5=/^-?\d+/,y5=/^-?\d/,w5=/^-?\d{1,2}/,x5=/^-?\d{1,3}/,C5=/^-?\d{1,4}/,S5=/^([+-])(\d{2})(\d{2})?|Z/,k5=/^([+-])(\d{2})(\d{2})|Z/,E5=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,D5=/^([+-])(\d{2}):(\d{2})|Z/,I5=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function P5(t,e,i){var n=e.match(t);if(!n)return null;var r=parseInt(n[0],10);return{value:i?i(r):r,rest:e.slice(n[0].length)}}function O5(t,e){var i=e.match(t);return i?"Z"===i[0]?{value:0,rest:e.slice(1)}:{value:("+"===i[1]?1:-1)*(36e5*(i[2]?parseInt(i[2],10):0)+6e4*(i[3]?parseInt(i[3],10):0)+1e3*(i[5]?parseInt(i[5],10):0)),rest:e.slice(i[0].length)}:null}function M5(t,e){return P5(_5,t,e)}function T5(t,e,i){switch(t){case 1:return P5(g5,e,i);case 2:return P5(A5,e,i);case 3:return P5(b5,e,i);case 4:return P5(v5,e,i);default:return P5(new RegExp("^\\d{1,"+t+"}"),e,i)}}function R5(t,e,i){switch(t){case 1:return P5(y5,e,i);case 2:return P5(w5,e,i);case 3:return P5(x5,e,i);case 4:return P5(C5,e,i);default:return P5(new RegExp("^-?\\d{1,"+t+"}"),e,i)}}function V5(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function F5(t,e){var i,n=e>0,r=n?e:1-e;if(r<=50)i=t||100;else{var s=r+50;i=t+100*Math.floor(s/100)-(t>=s%100?100:0)}return n?i:1-i}var L5=[31,28,31,30,31,30,31,31,30,31,30,31],U5=[31,29,31,30,31,30,31,31,30,31,30,31];function B5(t){return t%400==0||t%4==0&&t%100!=0}var N5={G:{priority:140,parse:function(t,e,i,n){switch(e){case"G":case"GG":case"GGG":return i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"});case"GGGGG":return i.era(t,{width:"narrow"});case"GGGG":default:return i.era(t,{width:"wide"})||i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"})}},set:function(t,e,i,n){return e.era=i,t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["R","u","t","T"]},y:{priority:130,parse:function(t,e,i,n){var r=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return T5(4,t,r);case"yo":return i.ordinalNumber(t,{unit:"year",valueCallback:r});default:return T5(e.length,t,r)}},validate:function(t,e,i){return e.isTwoDigitYear||e.year>0},set:function(t,e,i,n){var r=t.getUTCFullYear();if(i.isTwoDigitYear){var s=F5(i.year,r);return t.setUTCFullYear(s,0,1),t.setUTCHours(0,0,0,0),t}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","u","w","I","i","e","c","t","T"]},Y:{priority:130,parse:function(t,e,i,n){var r=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return T5(4,t,r);case"Yo":return i.ordinalNumber(t,{unit:"year",valueCallback:r});default:return T5(e.length,t,r)}},validate:function(t,e,i){return e.isTwoDigitYear||e.year>0},set:function(t,e,i,n){var r=fO(t,n);if(i.isTwoDigitYear){var s=F5(i.year,r);return t.setUTCFullYear(s,0,n.firstWeekContainsDate),t.setUTCHours(0,0,0,0),pO(t,n)}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,n.firstWeekContainsDate),t.setUTCHours(0,0,0,0),pO(t,n)},incompatibleTokens:["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:{priority:130,parse:function(t,e,i,n){return R5("R"===e?4:e.length,t)},set:function(t,e,i,n){var r=new Date(0);return r.setUTCFullYear(i,0,4),r.setUTCHours(0,0,0,0),cO(r)},incompatibleTokens:["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:{priority:130,parse:function(t,e,i,n){return R5("u"===e?4:e.length,t)},set:function(t,e,i,n){return t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["G","y","Y","R","w","I","i","e","c","t","T"]},Q:{priority:120,parse:function(t,e,i,n){switch(e){case"Q":case"QQ":return T5(e.length,t);case"Qo":return i.ordinalNumber(t,{unit:"quarter"});case"QQQ":return i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(t,{width:"wide",context:"formatting"})||i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,i){return e>=1&&e<=4},set:function(t,e,i,n){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:{priority:120,parse:function(t,e,i,n){switch(e){case"q":case"qq":return T5(e.length,t);case"qo":return i.ordinalNumber(t,{unit:"quarter"});case"qqq":return i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(t,{width:"wide",context:"standalone"})||i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"})}},validate:function(t,e,i){return e>=1&&e<=4},set:function(t,e,i,n){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:{priority:110,parse:function(t,e,i,n){var r=function(t){return t-1};switch(e){case"M":return P5(o5,t,r);case"MM":return T5(2,t,r);case"Mo":return i.ordinalNumber(t,{unit:"month",valueCallback:r});case"MMM":return i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(t,{width:"wide",context:"formatting"})||i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,i){return e>=0&&e<=11},set:function(t,e,i,n){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]},L:{priority:110,parse:function(t,e,i,n){var r=function(t){return t-1};switch(e){case"L":return P5(o5,t,r);case"LL":return T5(2,t,r);case"Lo":return i.ordinalNumber(t,{unit:"month",valueCallback:r});case"LLL":return i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(t,{width:"wide",context:"standalone"})||i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"})}},validate:function(t,e,i){return e>=0&&e<=11},set:function(t,e,i,n){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:{priority:100,parse:function(t,e,i,n){switch(e){case"w":return P5(c5,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return T5(e.length,t)}},validate:function(t,e,i){return e>=1&&e<=53},set:function(t,e,i,n){return pO(function(t,e,i){ZP(2,arguments);var n=qP(t),r=sO(e),s=gO(n,i)-r;return n.setUTCDate(n.getUTCDate()-7*s),n}(t,i,n),n)},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:{priority:100,parse:function(t,e,i,n){switch(e){case"I":return P5(c5,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return T5(e.length,t)}},validate:function(t,e,i){return e>=1&&e<=53},set:function(t,e,i,n){return cO(function(t,e){ZP(2,arguments);var i=qP(t),n=sO(e),r=dO(i)-n;return i.setUTCDate(i.getUTCDate()-7*r),i}(t,i,n),n)},incompatibleTokens:["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:{priority:90,subPriority:1,parse:function(t,e,i,n){switch(e){case"d":return P5(a5,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return T5(e.length,t)}},validate:function(t,e,i){var n=B5(t.getUTCFullYear()),r=t.getUTCMonth();return n?e>=1&&e<=U5[r]:e>=1&&e<=L5[r]},set:function(t,e,i,n){return t.setUTCDate(i),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:{priority:90,subPriority:1,parse:function(t,e,i,n){switch(e){case"D":case"DD":return P5(l5,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return T5(e.length,t)}},validate:function(t,e,i){return B5(t.getUTCFullYear())?e>=1&&e<=366:e>=1&&e<=365},set:function(t,e,i,n){return t.setUTCMonth(0,i),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:{priority:90,parse:function(t,e,i,n){switch(e){case"E":case"EE":case"EEE":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,i){return e>=0&&e<=6},set:function(t,e,i,n){return(t=s5(t,i,n)).setUTCHours(0,0,0,0),t},incompatibleTokens:["D","i","e","c","t","T"]},e:{priority:90,parse:function(t,e,i,n){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+n.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return T5(e.length,t,r);case"eo":return i.ordinalNumber(t,{unit:"day",valueCallback:r});case"eee":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeeee":return i.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,i){return e>=0&&e<=6},set:function(t,e,i,n){return(t=s5(t,i,n)).setUTCHours(0,0,0,0),t},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:{priority:90,parse:function(t,e,i,n){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+n.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return T5(e.length,t,r);case"co":return i.ordinalNumber(t,{unit:"day",valueCallback:r});case"ccc":return i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"ccccc":return i.day(t,{width:"narrow",context:"standalone"});case"cccccc":return i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return i.day(t,{width:"wide",context:"standalone"})||i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"})}},validate:function(t,e,i){return e>=0&&e<=6},set:function(t,e,i,n){return(t=s5(t,i,n)).setUTCHours(0,0,0,0),t},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:{priority:90,parse:function(t,e,i,n){var r=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return T5(e.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return i.day(t,{width:"abbreviated",context:"formatting",valueCallback:r})||i.day(t,{width:"short",context:"formatting",valueCallback:r})||i.day(t,{width:"narrow",context:"formatting",valueCallback:r});case"iiiii":return i.day(t,{width:"narrow",context:"formatting",valueCallback:r});case"iiiiii":return i.day(t,{width:"short",context:"formatting",valueCallback:r})||i.day(t,{width:"narrow",context:"formatting",valueCallback:r});case"iiii":default:return i.day(t,{width:"wide",context:"formatting",valueCallback:r})||i.day(t,{width:"abbreviated",context:"formatting",valueCallback:r})||i.day(t,{width:"short",context:"formatting",valueCallback:r})||i.day(t,{width:"narrow",context:"formatting",valueCallback:r})}},validate:function(t,e,i){return e>=1&&e<=7},set:function(t,e,i,n){return(t=function(t,e){ZP(2,arguments);var i=sO(e);i%7==0&&(i-=7);var n=1,r=qP(t),s=r.getUTCDay(),o=((i%7+7)%7<n?7:0)+i-s;return r.setUTCDate(r.getUTCDate()+o),r}(t,i,n)).setUTCHours(0,0,0,0),t},incompatibleTokens:["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:{priority:80,parse:function(t,e,i,n){switch(e){case"a":case"aa":case"aaa":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}},set:function(t,e,i,n){return t.setUTCHours(V5(i),0,0,0),t},incompatibleTokens:["b","B","H","K","k","t","T"]},b:{priority:80,parse:function(t,e,i,n){switch(e){case"b":case"bb":case"bbb":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}},set:function(t,e,i,n){return t.setUTCHours(V5(i),0,0,0),t},incompatibleTokens:["a","B","H","K","k","t","T"]},B:{priority:80,parse:function(t,e,i,n){switch(e){case"B":case"BB":case"BBB":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}},set:function(t,e,i,n){return t.setUTCHours(V5(i),0,0,0),t},incompatibleTokens:["a","b","t","T"]},h:{priority:70,parse:function(t,e,i,n){switch(e){case"h":return P5(p5,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return T5(e.length,t)}},validate:function(t,e,i){return e>=1&&e<=12},set:function(t,e,i,n){var r=t.getUTCHours()>=12;return t.setUTCHours(r&&i<12?i+12:r||12!==i?i:0,0,0,0),t},incompatibleTokens:["H","K","k","t","T"]},H:{priority:70,parse:function(t,e,i,n){switch(e){case"H":return P5(h5,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return T5(e.length,t)}},validate:function(t,e,i){return e>=0&&e<=23},set:function(t,e,i,n){return t.setUTCHours(i,0,0,0),t},incompatibleTokens:["a","b","h","K","k","t","T"]},K:{priority:70,parse:function(t,e,i,n){switch(e){case"K":return P5(d5,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return T5(e.length,t)}},validate:function(t,e,i){return e>=0&&e<=11},set:function(t,e,i,n){var r=t.getUTCHours()>=12;return t.setUTCHours(r&&i<12?i+12:i,0,0,0),t},incompatibleTokens:["a","b","h","H","k","t","T"]},k:{priority:70,parse:function(t,e,i,n){switch(e){case"k":return P5(u5,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return T5(e.length,t)}},validate:function(t,e,i){return e>=1&&e<=24},set:function(t,e,i,n){return t.setUTCHours(i<=24?i%24:i,0,0,0),t},incompatibleTokens:["a","b","h","H","K","t","T"]},m:{priority:60,parse:function(t,e,i,n){switch(e){case"m":return P5(f5,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return T5(e.length,t)}},validate:function(t,e,i){return e>=0&&e<=59},set:function(t,e,i,n){return t.setUTCMinutes(i,0,0),t},incompatibleTokens:["t","T"]},s:{priority:50,parse:function(t,e,i,n){switch(e){case"s":return P5(m5,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return T5(e.length,t)}},validate:function(t,e,i){return e>=0&&e<=59},set:function(t,e,i,n){return t.setUTCSeconds(i,0),t},incompatibleTokens:["t","T"]},S:{priority:30,parse:function(t,e,i,n){return T5(e.length,t,function(t){return Math.floor(t*Math.pow(10,3-e.length))})},set:function(t,e,i,n){return t.setUTCMilliseconds(i),t},incompatibleTokens:["t","T"]},X:{priority:10,parse:function(t,e,i,n){switch(e){case"X":return O5(S5,t);case"XX":return O5(k5,t);case"XXXX":return O5(E5,t);case"XXXXX":return O5(I5,t);case"XXX":default:return O5(D5,t)}},set:function(t,e,i,n){return e.timestampIsSet?t:new Date(t.getTime()-i)},incompatibleTokens:["t","T","x"]},x:{priority:10,parse:function(t,e,i,n){switch(e){case"x":return O5(S5,t);case"xx":return O5(k5,t);case"xxxx":return O5(E5,t);case"xxxxx":return O5(I5,t);case"xxx":default:return O5(D5,t)}},set:function(t,e,i,n){return e.timestampIsSet?t:new Date(t.getTime()-i)},incompatibleTokens:["t","T","X"]},t:{priority:40,parse:function(t,e,i,n){return M5(t)},set:function(t,e,i,n){return[new Date(1e3*i),{timestampIsSet:!0}]},incompatibleTokens:"*"},T:{priority:20,parse:function(t,e,i,n){return M5(t)},set:function(t,e,i,n){return[new Date(i),{timestampIsSet:!0}]},incompatibleTokens:"*"}},j5=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,z5=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,H5=/^'([^]*?)'?$/,K5=/''/g,$5=/\S/,G5=/[a-zA-Z]/;function W5(t,e,i,n){ZP(3,arguments);var r=String(t),s=String(e),o=n||{},a=o.locale||rO;if(!a.match)throw new RangeError("locale must contain match property");var l=a.options&&a.options.firstWeekContainsDate,c=null==l?1:sO(l),h=null==o.firstWeekContainsDate?c:sO(o.firstWeekContainsDate);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=a.options&&a.options.weekStartsOn,d=null==u?0:sO(u),p=null==o.weekStartsOn?d:sO(o.weekStartsOn);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===s)return""===r?qP(i):new Date(NaN);var f,m={firstWeekContainsDate:h,weekStartsOn:p,locale:a},g=[{priority:10,subPriority:-1,set:Z5,index:0}],A=s.match(z5).map(function(t){var e=t[0];return"p"===e||"P"===e?(0,xO[e])(t,a.formatLong,m):t}).join("").match(j5),b=[];for(f=0;f<A.length;f++){var v=A[f];!o.useAdditionalWeekYearTokens&&IO(v)&&PO(v,s,t),!o.useAdditionalDayOfYearTokens&&DO(v)&&PO(v,s,t);var _=v[0],y=N5[_];if(y){var w=y.incompatibleTokens;if(Array.isArray(w)){for(var x=void 0,C=0;C<b.length;C++){var S=b[C].token;if(-1!==w.indexOf(S)||S===_){x=b[C];break}}if(x)throw new RangeError("The format string mustn't contain `".concat(x.fullToken,"` and `").concat(v,"` at the same time"))}else if("*"===y.incompatibleTokens&&b.length)throw new RangeError("The format string mustn't contain `".concat(v,"` and any other token at the same time"));b.push({token:_,fullToken:v});var k=y.parse(r,v,a.match,m);if(!k)return new Date(NaN);g.push({priority:y.priority,subPriority:y.subPriority||0,set:y.set,validate:y.validate,value:k.value,index:g.length}),r=k.rest}else{if(_.match(G5))throw new RangeError("Format string contains an unescaped latin alphabet character `"+_+"`");if("''"===v?v="'":"'"===_&&(v=q5(v)),0!==r.indexOf(v))return new Date(NaN);r=r.slice(v.length)}}if(r.length>0&&$5.test(r))return new Date(NaN);var E=g.map(function(t){return t.priority}).sort(function(t,e){return e-t}).filter(function(t,e,i){return i.indexOf(t)===e}).map(function(t){return g.filter(function(e){return e.priority===t}).sort(function(t,e){return e.subPriority-t.subPriority})}).map(function(t){return t[0]}),D=qP(i);if(isNaN(D))return new Date(NaN);var I=aO(D,SO(D)),P={};for(f=0;f<E.length;f++){var O=E[f];if(O.validate&&!O.validate(I,O.value,m))return new Date(NaN);var M=O.set(I,P,O.value,m);M[0]?(I=M[0],r5(P,M[1])):I=M}return I}function Z5(t,e){if(e.timestampIsSet)return t;var i=new Date(0);return i.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),i.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),i}function q5(t){return t.match(H5)[1].replace(K5,"'")}function Y5(t,e){1&t&&(r.Vb(0,"mat-error",6),r.Kc(1," Ce champ ne peut \xeatre vide. "),r.Ub())}function Q5(t,e){1&t&&(r.Vb(0,"mat-error",6),r.Kc(1," Ce champ ne peut \xeatre vide. "),r.Ub())}function X5(t,e){1&t&&(r.Vb(0,"mat-error",6),r.Kc(1," La vitesse doit \xeatre sup\xe9rieure \xe0 0 kt. "),r.Ub())}let J5=(()=>{class t extends LT{constructor(t,e){super(),this.formBuilder=t,this.pimService=e,this.startDateMask={mask:Date,pattern:"YYYY-`MM-`DD `HH:`mm",lazy:!1,min:new Date(2018,0,1),max:new Date(2025,0,1),format:t=>FO(t,"yyyy-MM-dd HH:mm"),parse:t=>W5(t,"yyyy-MM-dd HH:mm",new Date),blocks:{YYYY:{mask:ob,from:2018,to:2025},MM:{mask:ob,from:1,to:12},DD:{mask:ob,from:1,to:31},HH:{mask:ob,from:0,to:23},mm:{mask:ob,from:0,to:59}}}}ngOnInit(){this.form=this.formBuilder.group({startDate:[FO(new Date(1e3*this.pimService.nextStartDate$.value),"yyyy-MM-dd HH:mm"),[pc.required]],speed:[this.pimService.nextSpeed$.value,[pc.required,pc.min(.1)]]}),this.subscriptions.push(this.form.controls.speed.valueChanges.subscribe(t=>{t>0&&this.pimService.nextSpeed$.next(t)}))}resetStartDate(){this.form.controls.startDate.setValue(FO(new Date,"yyyy-MM-dd HH:mm"))}onStartDateComplete(t){this.pimService.nextStartDate$.next(NO(W5(t,"yyyy-MM-dd HH:mm",new Date)))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Lh),r.Pb(KO))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-pim-form"]],features:[r.Ab],decls:13,vars:5,consts:[[1,"pa-3","d-flex-column",3,"formGroup"],[1,"mat-small","mb-2"],["matInput","","placeholder","Date et heure de d\xe9part du PIM","name","startDate","formControlName","startDate","required","",3,"imask","complete"],["class","input-error",4,"ngIf"],["mat-button","","matSuffix","","mat-icon-button","","title","R\xe9initialiser \xe0 la date actuelle",3,"click"],["matInput","","type","number","placeholder","Vitesse (en n\u0153uds) du tron\xe7on en cours de trac\xe9 ","name","speed","formControlName","speed","required","","min","0","max","50"],[1,"input-error"]],template:function(t,e){1&t&&(r.Vb(0,"form",0),r.Vb(1,"div",1),r.Kc(2,"Ces informations ci-dessous permettent de modifier les informations du PIM en cours de trac\xe9."),r.Ub(),r.Vb(3,"mat-form-field"),r.Vb(4,"input",2),r.cc("complete",function(t){return e.onStartDateComplete(t)}),r.Ub(),r.Ic(5,Y5,2,0,"mat-error",3),r.Vb(6,"button",4),r.cc("click",function(){return e.resetStartDate()}),r.Vb(7,"mat-icon"),r.Kc(8,"restore"),r.Ub(),r.Ub(),r.Ub(),r.Vb(9,"mat-form-field"),r.Qb(10,"input",5),r.Ic(11,Q5,2,0,"mat-error",3),r.Ic(12,X5,2,0,"mat-error",3),r.Ub(),r.Ub()),2&t&&(r.nc("formGroup",e.form),r.Db(4),r.nc("imask",e.startDateMask),r.Db(1),r.nc("ngIf",null==e.form.controls.startDate.errors?null:e.form.controls.startDate.errors.required),r.Db(6),r.nc("ngIf",null==e.form.controls.speed.errors?null:e.form.controls.speed.errors.required),r.Db(1),r.nc("ngIf",null==e.form.controls.speed.errors?null:e.form.controls.speed.errors.min))},directives:[dh,Fc,_h,_u,Ou,ac,Vc,Eh,Ih,Cb,ut,Dl,fu,Yp,fh,nu],styles:[""]}),t})();function t8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",5),r.Vb(1,"div",6),r.Vb(2,"div",7),r.Kc(3),r.Ub(),r.Vb(4,"button",8),r.cc("click",function(){return r.Ac(t),r.gc().annotationsService.cancelEditing()}),r.Vb(5,"mat-icon"),r.Kc(6,"close"),r.Ub(),r.Ub(),r.Ub(),r.Qb(7,"app-annotation-form"),r.Ub()}if(2&t){const t=r.gc();r.Db(3),r.Mc(" ",t.isNewAnnotation?"Nouvelle annotation":"\xc9dition d'une annotation"," ")}}function e8(t,e){1&t&&(r.Vb(0,"div",13),r.Vb(1,"mat-icon",11),r.Kc(2,"warning"),r.Ub(),r.Kc(3," La zone utilise trop d'hexagones. Veuillez r\xe9duire leur nombre. "),r.Ub())}function i8(t,e){if(1&t&&(r.Vb(0,"div",9),r.Vb(1,"div",10),r.Vb(2,"mat-icon",11),r.Kc(3,"warning"),r.Ub(),r.Kc(4," Attention, la modification d'une zone est effective imm\xe9diatement et impacte toutes les r\xe8gles l'utilisant. "),r.Ub(),r.Ic(5,e8,4,0,"div",12),r.Ub()),2&t){const t=r.gc();r.Db(5),r.nc("ngIf",t.tooManyHexagons)}}function n8(t,e){1&t&&r.Qb(0,"app-timeline-panel")}function r8(t,e){1&t&&r.Qb(0,"app-playback-panel")}function s8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div"),r.Vb(1,"button",14),r.cc("click",function(){return r.Ac(t),r.gc().mapRestrictionService.cancelSelectingArea()}),r.Kc(2," Annuler "),r.Ub(),r.Vb(3,"button",15),r.cc("click",function(){return r.Ac(t),r.gc().mapRestrictionService.finishSelectingArea()}),r.Kc(4," Restreindre \xe0 cette vue "),r.Ub(),r.Ub()}}function o8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",16),r.Vb(1,"div",17),r.Kc(2," Mode mesure "),r.Ub(),r.Vb(3,"button",18),r.cc("click",function(){return r.Ac(t),r.gc().measureService.toggleMeasureMode()}),r.Vb(4,"mat-icon"),r.Kc(5,"close"),r.Ub(),r.Ub(),r.Ub()}}function a8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",5),r.Vb(1,"div",6),r.Vb(2,"div",7),r.Kc(3," Mode PIM "),r.Ub(),r.Vb(4,"button",19),r.cc("click",function(){return r.Ac(t),r.gc().pimService.togglePIMMode()}),r.Vb(5,"mat-icon"),r.Kc(6,"close"),r.Ub(),r.Ub(),r.Ub(),r.Qb(7,"app-pim-form"),r.Ub()}}let l8=(()=>{class t extends LT{constructor(t,e,i,n,r,s,o){super(),this.annotationsService=t,this.editZoneService=e,this.historyService=i,this.mapRestrictionService=n,this.measureService=r,this.pimService=s,this.playbackService=o,this.show=!1,this.isEditingAnnotation=!1,this.isNewAnnotation=!0,this.isEditingZone=!1,this.tooManyHexagons=!1,this.isSelectingArea=!1,this.isHistoryModeActive=!1,this.isMeasureModeActive=!1,this.isPIMModeActive=!1,this.isPlaybackModeActive=!1}ngOnInit(){this.subscriptions.push(this.annotationsService.editedAnnotation$.pipe(Object(Ge.a)(t=>!!t),mn()).subscribe(t=>{this.isEditingAnnotation=t}),this.annotationsService.editedAnnotation$.pipe(Object(Ge.a)(t=>!(null==t?void 0:t.id)),mn()).subscribe(t=>{this.isNewAnnotation=t}),this.editZoneService.editedZone$.pipe(Object(Ge.a)(t=>!!t),mn()).subscribe(t=>{this.isEditingZone=t}),this.editZoneService.tooManyHexagons$.pipe(mn()).subscribe(t=>{this.tooManyHexagons=t}),this.mapRestrictionService.isSelectingArea$.pipe(mn()).subscribe(t=>{this.isSelectingArea=t}),this.historyService.timestamp$.pipe(Object(Ge.a)(t=>!!t),mn()).subscribe(t=>{this.isHistoryModeActive=t}),this.measureService.active$.pipe(mn()).subscribe(t=>{this.isMeasureModeActive=t}),this.pimService.active$.pipe(mn()).subscribe(t=>{this.isPIMModeActive=t}),this.playbackService.active$.pipe(mn()).subscribe(t=>{this.isPlaybackModeActive=t}),Hg([this.annotationsService.editedAnnotation$.pipe(Object(Ge.a)(t=>!!t)),this.editZoneService.editedZone$.pipe(Object(Ge.a)(t=>!!t)),this.mapRestrictionService.isSelectingArea$,this.historyService.timestamp$.pipe(Object(Ge.a)(t=>!!t)),this.measureService.active$,this.pimService.active$,this.playbackService.active$]).pipe(mn()).subscribe(([t,e,i,n,r,s,o])=>{this.show=t||e||i||n||r||s||o}))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(MP),r.Pb(sL),r.Pb(bI),r.Pb(RK),r.Pb(WP),r.Pb(KO),r.Pb(tM))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-context-info-bar"]],features:[r.Ab],decls:8,vars:9,consts:[[1,"context-info-bar"],["class","bar d-flex-column",4,"ngIf"],["class","pa-2",4,"ngIf"],[4,"ngIf"],["class","bar",4,"ngIf"],[1,"bar","d-flex-column"],[1,"d-flex",2,"background-color","#ededed"],[1,"u-flex","pa-3",2,"align-self","center"],["mat-button","","title","Quitter le mode annotation",3,"click"],[1,"pa-2"],[1,"d-flex-center"],[1,"mr-2"],["class","d-flex-center error-message",4,"ngIf"],[1,"d-flex-center","error-message"],["mat-button","",3,"click"],["mat-button","","color","primary",3,"click"],[1,"bar"],[1,"pa-3",2,"align-self","center"],["mat-button","","title","Quitter le mode mesure",3,"click"],["mat-button","","title","Quitter le mode PIM",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Ic(1,t8,8,1,"div",1),r.Ic(2,i8,6,1,"div",2),r.Ic(3,n8,1,0,"app-timeline-panel",3),r.Ic(4,r8,1,0,"app-playback-panel",3),r.Ic(5,s8,5,0,"div",3),r.Ic(6,o8,6,0,"div",4),r.Ic(7,a8,8,0,"div",1),r.Ub()),2&t&&(r.Hb("context-info-bar--visible",e.show),r.Db(1),r.nc("ngIf",e.isEditingAnnotation),r.Db(1),r.nc("ngIf",e.isEditingZone),r.Db(1),r.nc("ngIf",e.isHistoryModeActive),r.Db(1),r.nc("ngIf",e.isPlaybackModeActive),r.Db(1),r.nc("ngIf",e.isSelectingArea),r.Db(1),r.nc("ngIf",e.isMeasureModeActive),r.Db(1),r.nc("ngIf",e.isPIMModeActive))},directives:[ut,Dl,Yp,Z4,X4,n5,J5],styles:[".context-info-bar[_ngcontent-%COMP%]{position:fixed;z-index:10;bottom:2em;left:50%;transform:translateX(-50%) translateY(200%);transition:all .5s;opacity:0;background-color:#fff;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2)}@media (max-width:1366px){.context-info-bar[_ngcontent-%COMP%]{bottom:3em}}.context-info-bar--visible[_ngcontent-%COMP%]{opacity:1;transform:translateX(-50%) translateY(0)}.bar[_ngcontent-%COMP%]{display:flex;min-height:50px}"]}),t})(),c8=(()=>{class t{constructor(t){if(this.httpClient=t,this.appVersion=fD.a.applicationVersion,this.appDate=fD.a.applicationDate,this.needsReload$=new _e.a,!fD.a.production)return;this.checkVersion();const e=setInterval(()=>Object(ue.a)(this,void 0,void 0,function*(){(yield this.checkVersion())&&clearInterval(e)}),6e4)}checkVersion(){return Object(ue.a)(this,void 0,void 0,function*(){try{if((yield this.httpClient.get(`/assets/version.json?time=${Date.now()}`).toPromise()).version!==this.appVersion)return this.needsReload$.next(),!0}catch($nt){}return!1})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(_p))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function h8(t,e){if(1&t&&(r.Vb(0,"mat-list-item",2),r.Vb(1,"mat-radio-button",3),r.Kc(2),r.Ub(),r.Ub()),2&t){const t=e.$implicit;r.Db(1),r.nc("value",t),r.Db(1),r.Mc(" ",t.label," ")}}let u8=(()=>{class t{constructor(t){this.mapConfigService=t,this.availableBaseLayers=gD}ngOnInit(){this.activeLayer=this.mapConfigService.baseLayer$.value}changeLayer(t){this.mapConfigService.updateBaseLayer(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-base-layer-switcher"]],decls:2,vars:2,consts:[[3,"ngModel","ngModelChange","change"],["class","base-layer-switcher__list-item",4,"ngFor","ngForOf"],[1,"base-layer-switcher__list-item"],["color","primary",3,"value"]],template:function(t,e){1&t&&(r.Vb(0,"mat-radio-group",0),r.cc("ngModelChange",function(t){return e.activeLayer=t})("change",function(t){return e.changeLayer(t.value)}),r.Ic(1,h8,3,2,"mat-list-item",1),r.Ub()),2&t&&(r.nc("ngModel",e.activeLayer),r.Db(1),r.nc("ngForOf",e.availableBaseLayers))},directives:[sR,Vc,uh,ct,SU,hR],styles:[".base-layer-switcher__list-item[_ngcontent-%COMP%]{height:30px}.base-layer-switcher__list-item[_ngcontent-%COMP%] .mat-radio-label-content{white-space:pre-line}"],changeDetection:0}),t})(),d8=1;const p8=document.createElement("style");document.head.appendChild(p8);const f8=p8.sheet;let m8=(()=>{class t extends LT{constructor(t){super(),this.changeDetectorRef=t,this.change=new r.o,this.componentId="dual-slider-"+d8++,this.sliderRefresh=new r.o}ngOnInit(){this.ensureMandatoryInputParams("steps","colors","value","highValue"),this.stepLabelsByValue=this.steps.reduce((t,e)=>(t[e.value]=e.label,t),{}),this.thresholdsValues={value:this.value,highValue:this.highValue},this.sliderOptions={stepsArray:this.steps,showTicks:!0,hideLimitLabels:!0,animate:!1,showSelectionBar:!0,disabled:!1,showOuterSelectionBars:!0,getTickColor:t=>{const e=this.steps[t].value;return e<this.thresholdsValues.highValue?this.colors.right:e<this.thresholdsValues.value?this.colors.middle:this.colors.left},combineLabels:(t,e)=>t===e?t:`${t} - ${e}`,translate:(t,e)=>this.stepLabelsByValue[t]},[`.${this.componentId} .ngx-slider-left-out-selection .ngx-slider-bar { background-color: ${this.colors.left} !important; }`,`.${this.componentId} .ngx-slider-right-out-selection .ngx-slider-bar, .${this.componentId} .ngx-slider-pointer-max { background-color: ${this.colors.right} !important; }`,`.${this.componentId} .ngx-slider-selection, .${this.componentId} .ngx-slider-pointer-min, .${this.componentId} .ngx-slider-tick.ngx-slider-selected { background-color: ${this.colors.middle} !important;}`].forEach(t=>{f8.insertRule(t,0)}),this.disabled$&&this.subscriptions.push(this.disabled$.pipe(mn()).subscribe(t=>{this.sliderOptions=Object.assign(Object.assign({},this.sliderOptions),{disabled:t}),this.changeDetectorRef.detectChanges()})),this.refresh$&&this.subscriptions.push(this.refresh$.subscribe(()=>{this.sliderRefresh.emit()}))}ngOnDestroy(){super.ngOnDestroy();let t=0;for(;t<f8.cssRules.length;)f8.cssRules[t].cssText.includes(this.componentId)?f8.deleteRule(t):t++}emitChange(t){this.change.next(t)}updateThresholdsValues(t){this.thresholdsValues=t,this.sliderRefresh.emit()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-dual-slider"]],inputs:{steps:"steps",colors:"colors",value:"value",highValue:"highValue",disabled$:"disabled$",refresh$:"refresh$"},outputs:{change:"change"},features:[r.Ab],decls:2,vars:6,consts:[[3,"options","manualRefresh","value","highValue","userChange","userChangeEnd"]],template:function(t,e){1&t&&(r.Vb(0,"div"),r.Vb(1,"ngx-slider",0),r.cc("userChange",function(t){return e.updateThresholdsValues(t)})("userChangeEnd",function(t){return e.emitChange(t)}),r.Ub(),r.Ub()),2&t&&(r.Fb("dual-slider "+e.componentId),r.Db(1),r.nc("options",e.sliderOptions)("manualRefresh",e.sliderRefresh)("value",e.value)("highValue",e.highValue))},directives:[pg],styles:[".dual-slider{margin-right:8px} .dual-slider .ngx-slider .ngx-slider-pointer{background-color:#3f51b5;width:20px;height:20px;top:-8px;border-radius:10px;transform:translateX(50%)} .dual-slider .ngx-slider .ngx-slider-pointer:after{display:none}"],changeDetection:0}),t})();function g8(t,e){if(1&t&&(r.Vb(0,"mat-list-item",24),r.Vb(1,"mat-radio-button",25),r.Kc(2),r.Ub(),r.Ub()),2&t){const t=e.$implicit;r.Db(1),r.nc("value",t.key),r.Db(1),r.Mc(" ",t.label," ")}}function A8(t,e){1&t&&(r.Vb(0,"div",26),r.Kc(1,"Les navires qui correspondent \xe0 au moins un des crit\xe8res s\xe9lectionn\xe9s seront color\xe9s."),r.Ub())}function b8(t,e){if(1&t&&(r.Vb(0,"mat-option",34),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.id),r.Db(1),r.Mc(" ",t.name," ")}}function v8(t,e){if(1&t&&(r.Vb(0,"mat-option",34),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.key),r.Db(1),r.Mc(" ",t.label," ")}}function _8(t,e){1&t&&(r.Vb(0,"div",35),r.Vb(1,"mat-icon",36),r.Kc(2,"warning"),r.Ub(),r.Kc(3," Aucun filtre n'a \xe9t\xe9 s\xe9lectionn\xe9. "),r.Ub())}function y8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"h3",7),r.Kc(1,"Recherche"),r.Ub(),r.Vb(2,"div",6),r.Vb(3,"mat-form-field",27),r.Vb(4,"mat-label"),r.Kc(5,"R\xe8gles"),r.Ub(),r.Vb(6,"mat-select",28),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc().alertRulesService.updateAlertRulesFilter(e)}),r.Ic(7,b8,2,2,"mat-option",29),r.Ub(),r.Ub(),r.Vb(8,"mat-form-field",27),r.Vb(9,"mat-label"),r.Kc(10,"\xc9v\xe9nements"),r.Ub(),r.Vb(11,"mat-select",28),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc().mapConfigService.updateEventTypesFilter(e)}),r.Ic(12,v8,2,2,"mat-option",29),r.Ub(),r.Ub(),r.Ub(),r.Ic(13,_8,4,0,"div",30),r.Vb(14,"h3",7),r.Kc(15,"Seuils de coloration"),r.Ub(),r.Vb(16,"div",31),r.Kc(17,"Les navires sont affich\xe9s en rouge et jaune, en fonction de la date de l'alerte ou de l'\xe9v\xe9nement depuis l'instant pr\xe9sent."),r.Ub(),r.Vb(18,"div",32),r.Vb(19,"app-dual-slider",33),r.cc("change",function(e){return r.Ac(t),r.gc().updateHighlightThresholds(e)}),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.Db(6),r.nc("ngModel",t.mapConfigService.shipFilter$.value.alertRules)("disabled",t.mapConfigService.shipFilter$.value.colorModeShipType),r.Db(1),r.nc("ngForOf",t.alertRules),r.Db(4),r.nc("ngModel",t.mapConfigService.shipFilter$.value.eventTypes)("disabled",t.mapConfigService.shipFilter$.value.colorModeShipType),r.Db(1),r.nc("ngForOf",t.eventTypes),r.Db(1),r.nc("ngIf",t.mapConfigService.shipFilter$.value.isMissingColorFilterConfiguration),r.Db(6),r.nc("steps",t.highlightThresholdsSteps)("colors",t.highlightThresholdsColors)("value",t.mapConfigService.shipFilter$.value.minimumTimestampThreshold)("highValue",t.mapConfigService.shipFilter$.value.importantTimestampThreshold)("disabled$",t.highlightThesholdsDisabled$)("refresh$",t.slidersRefresh$)}}function w8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-checkbox",17),r.cc("ngModelChange",function(){return r.Ac(t),r.gc().mapConfigService.togglePortsLayer()}),r.Kc(1,"Zones de ports"),r.Ub()}if(2&t){const t=r.gc();r.nc("ngModel",t.mapConfigService.showPortsLayer$.value)}}let x8=(()=>{class t extends LT{constructor(t,e,i){super(),this.configService=t,this.alertRulesService=e,this.mapConfigService=i,this.colorModes=GD,this.alertRules=[],this.eventTypes=VP,this.highlightThresholdsSteps=bD,this.highlightThresholdsColors=_D,this.highlightThesholdsDisabled$=new Av.a(!1),this.slidersRefresh$=new _e.a}ngOnInit(){this.subscriptions.push(this.alertRulesService.alertRules$.subscribe(t=>{this.alertRules=t}),this.mapConfigService.shipFilter$.subscribe(t=>{this.highlightThesholdsDisabled$.next(t.colorModeShipType)}))}onMenuOpen(){setTimeout(()=>{this.slidersRefresh$.next(null)},200)}updateHighlightThresholds(t){this.mapConfigService.updateTimestampThresholds(t.value,t.highValue)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(cI),r.Pb(DP),r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-layers-control"]],features:[r.Ab],decls:53,vars:24,consts:[["mat-button","","title","Configurer les informations affich\xe9es","joyrideStep","layers-button","text","Ce menu permet de configurer les couches de donn\xe9es affich\xe9es et aussi g\xe9rer les modes d'affichage.",1,"toolbar__button",3,"matMenuTriggerFor","click"],["svgIcon","layers"],[1,"large-menu"],["menu","matMenu"],[1,"pt-0",3,"click"],[1,"mat-title","layers-control__section-title"],[1,"d-flex"],[1,"mat-subheader","layers-control__subsection-title"],[3,"ngModel","ngModelChange"],["class","layers-control__list-item",4,"ngFor","ngForOf"],[3,"vertical"],["class","d-flex-center pa-2 mat-body",4,"ngIf"],[3,"ngIf"],[1,"d-flex","my-2"],["color","primary",1,"layers-control__list-item","mx-3",3,"ngModel","ngModelChange"],[1,"u-flex"],[1,"u-flex","mr-3",2,"margin-bottom","5px"],["color","primary",1,"d-block","layers-control__list-item",3,"ngModel","ngModelChange"],["gid","36nqlimits-layer","date","2021-02-16",3,"width","height"],["gid","eez-layer","date","2020-12-10",3,"width","height"],["color","primary","title","Search And Rescue",1,"d-block","layers-control__list-item",3,"ngModel","ngModelChange"],["color","primary","title","Maritime Rescue Coordination Centres",1,"d-block","layers-control__list-item",3,"ngModel","ngModelChange"],["class","d-block layers-control__list-item","color","primary",3,"ngModel","ngModelChange",4,"ngIf"],["gid","subcables-layer","date","2021-07-06",3,"width","height"],[1,"layers-control__list-item"],["color","primary",3,"value"],[1,"d-flex-center","pa-2","mat-body"],[1,"d-block","px-3"],["multiple","",3,"ngModel","disabled","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["class","no-filter-selected-warning px-3",4,"ngIf"],[1,"px-3","mat-body"],[1,"px-3"],[3,"steps","colors","value","highValue","disabled$","refresh$","change"],[3,"value"],[1,"no-filter-selected-warning","px-3"],[1,"mr-2"]],template:function(t,e){if(1&t&&(r.Vb(0,"button",0),r.cc("click",function(){return e.onMenuOpen()}),r.Qb(1,"mat-icon",1),r.Ub(),r.Vb(2,"mat-menu",2,3),r.Vb(4,"mat-list",4),r.cc("click",function(t){return t.stopPropagation()}),r.Vb(5,"div",5),r.Kc(6,"Alertes et \xe9v\xe9nements"),r.Ub(),r.Vb(7,"div",6),r.Vb(8,"div"),r.Vb(9,"h3",7),r.Kc(10,"Modes d'affichage"),r.Ub(),r.Vb(11,"mat-radio-group",8),r.cc("ngModelChange",function(t){return e.mapConfigService.updateColorMode(t)}),r.Ic(12,g8,3,2,"mat-list-item",9),r.Ub(),r.Ub(),r.Qb(13,"mat-divider",10),r.Ic(14,A8,2,0,"div",11),r.Ub(),r.Ic(15,y8,20,13,"ng-template",12),r.Vb(16,"div",5),r.Kc(17,"Donn\xe9es"),r.Ub(),r.Vb(18,"div",13),r.Vb(19,"mat-checkbox",14),r.cc("ngModelChange",function(){return e.mapConfigService.toggleShipsLayer()}),r.Kc(20,"Navires"),r.Ub(),r.Vb(21,"mat-checkbox",14),r.cc("ngModelChange",function(){return e.mapConfigService.toggleAircraftsLayer()}),r.Kc(22,"A\xe9ronefs"),r.Ub(),r.Vb(23,"mat-checkbox",14),r.cc("ngModelChange",function(){return e.mapConfigService.toggleAnnotationsLayer()}),r.Kc(24,"Annotations"),r.Ub(),r.Ub(),r.Vb(25,"div",6),r.Vb(26,"div",15),r.Vb(27,"h3",7),r.Kc(28,"Fond de carte"),r.Ub(),r.Qb(29,"app-base-layer-switcher"),r.Ub(),r.Vb(30,"div",16),r.Vb(31,"h3",7),r.Kc(32,"Autres informations"),r.Ub(),r.Vb(33,"mat-checkbox",17),r.cc("ngModelChange",function(){return e.mapConfigService.toggleMaritimeBoundariesLayer()}),r.Kc(34,"D\xe9limitations maritimes FR"),r.Ub(),r.Vb(35,"app-glitter",18),r.Vb(36,"mat-checkbox",17),r.cc("ngModelChange",function(){return e.mapConfigService.toggle36NqLimitsLayer()}),r.Kc(37,"Limites 3 et 6 nautiques FR"),r.Ub(),r.Ub(),r.Vb(38,"app-glitter",19),r.Vb(39,"mat-checkbox",17),r.cc("ngModelChange",function(){return e.mapConfigService.toggleEEZLayer()}),r.Kc(40," Zones \xe9conomiques exclusives "),r.Ub(),r.Ub(),r.Vb(41,"mat-checkbox",20),r.cc("ngModelChange",function(){return e.mapConfigService.toggleSARLayer()}),r.Kc(42,"Zones SAR"),r.Ub(),r.Vb(43,"mat-checkbox",21),r.cc("ngModelChange",function(){return e.mapConfigService.toggleMRCCLayer()}),r.Kc(44,"MRCC"),r.Ub(),r.Ic(45,w8,2,1,"mat-checkbox",22),r.Vb(46,"mat-checkbox",17),r.cc("ngModelChange",function(){return e.mapConfigService.toggleHexagonsLayer()}),r.Kc(47,"Hexagones"),r.Ub(),r.Vb(48,"mat-checkbox",17),r.cc("ngModelChange",function(){return e.mapConfigService.toggleOpenSeaMapLayer()}),r.Kc(49,"OpenSeaMap"),r.Ub(),r.Vb(50,"app-glitter",23),r.Vb(51,"mat-checkbox",17),r.cc("ngModelChange",function(){return e.mapConfigService.toggleSubcablesLayer()}),r.Kc(52,"C\xe2bles sous-marins et pipelines"),r.Ub(),r.Ub(),r.Ub(),r.Ub(),r.Ub(),r.Ub()),2&t){const t=r.wc(3);r.nc("matMenuTriggerFor",t),r.Db(11),r.nc("ngModel",e.mapConfigService.shipFilter$.value.colorMode),r.Db(1),r.nc("ngForOf",e.colorModes),r.Db(1),r.nc("vertical",!0),r.Db(1),r.nc("ngIf",!e.mapConfigService.shipFilter$.value.colorModeShipType),r.Db(1),r.nc("ngIf",!e.mapConfigService.shipFilter$.value.colorModeShipType),r.Db(4),r.nc("ngModel",e.mapConfigService.showShipsLayer$.value),r.Db(2),r.nc("ngModel",e.mapConfigService.showAircraftsLayer$.value),r.Db(2),r.nc("ngModel",e.mapConfigService.showAnnotationsLayer$.value),r.Db(10),r.nc("ngModel",e.mapConfigService.showMaritimeBoundariesLayer$.value),r.Db(2),r.nc("width",240)("height",30),r.Db(1),r.nc("ngModel",e.mapConfigService.show36NqLimitsLayer$.value),r.Db(2),r.nc("width",240)("height",30),r.Db(1),r.nc("ngModel",e.mapConfigService.showEEZLayer$.value),r.Db(2),r.nc("ngModel",e.mapConfigService.showSARLayer$.value),r.Db(2),r.nc("ngModel",e.mapConfigService.showMRCCLayer$.value),r.Db(2),r.nc("ngIf",e.configService.devMode),r.Db(1),r.nc("ngModel",e.mapConfigService.showHexagonsLayer$.value),r.Db(2),r.nc("ngModel",e.mapConfigService.showOpenSeaMapLayer$.value),r.Db(2),r.nc("width",240)("height",30),r.Db(1),r.nc("ngModel",e.mapConfigService.showSubcablesLayer$.value)}},directives:[Dl,ax,sU,Yp,eU,yU,sR,Vc,uh,ct,GT,ut,tF,u8,DL,SU,hR,_u,cu,Vg,m8,bl],styles:[".layers-control__section-title[_ngcontent-%COMP%]{background-color:hsla(0,0%,91.8%,.5686274509803921);padding-top:8px;padding-left:16px;padding-bottom:8px;margin-bottom:8px}.layers-control__subsection-title[_ngcontent-%COMP%]{height:32px!important}.layers-control__list-item[_ngcontent-%COMP%]{height:30px!important}.no-filter-selected-warning[_ngcontent-%COMP%]{color:#e41010;display:flex;justify-content:center;line-height:1.5em} .large-menu{max-width:500px!important} .large-menu .mat-menu-content{padding:0!important}"],changeDetection:0}),t})();class C8{constructor(t,e){this.count=t,this.source=e}call(t,e){return e.subscribe(new S8(t,this.count,this.source))}}class S8 extends Ee.a{constructor(t,e,i){super(t),this.count=e,this.source=i}complete(){if(!this.isStopped){const{source:t,count:e}=this;if(0===e)return super.complete();e>-1&&(this.count=e-1),t.subscribe(this._unsubscribeAndRecycle())}}}function k8(t,e){1&t&&(r.Vb(0,"mat-error"),r.Kc(1,"Ce champ est obligatoire"),r.Ub())}function E8(t,e){1&t&&(r.Vb(0,"mat-error"),r.Kc(1,"Ce nom est d\xe9j\xe0 utilis\xe9"),r.Ub())}let D8=(()=>{class t extends LT{constructor(t){super(),this.filterConfigurationsService=t,this.cancel=new r.o,this.save=new r.o,this.otherConfigurationsNames=[]}ngOnInit(){this.subscriptions.push(this.filterConfigurationsService.configurations$.subscribe(t=>{this.otherConfigurationsNames=t.map(t=>t.name).filter(t=>t!==this.name)})),this.form=new eh(this.name,[pc.required,t=>this.otherConfigurationsNames.includes(t.value)?{nameConflict:!0}:null]),this.name&&this.form.markAsTouched()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(PT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-filter-configuration-form"]],inputs:{name:"name"},outputs:{cancel:"cancel",save:"save"},features:[r.Ab],decls:12,vars:4,consts:[["matInput","",3,"formControl"],[4,"ngIf"],["mat-button","","title","Annuler",3,"click"],["mat-button","","type","submit","color","primary","title","Sauvegarder",3,"disabled","click"]],template:function(t,e){1&t&&(r.Vb(0,"mat-form-field"),r.Vb(1,"mat-label"),r.Kc(2,"Nom"),r.Ub(),r.Qb(3,"input",0),r.Ic(4,k8,2,0,"mat-error",1),r.Ic(5,E8,2,0,"mat-error",1),r.Ub(),r.Vb(6,"button",2),r.cc("click",function(){return e.cancel.emit()}),r.Vb(7,"mat-icon"),r.Kc(8,"clear"),r.Ub(),r.Ub(),r.Vb(9,"button",3),r.cc("click",function(){return e.save.emit(e.form.value)}),r.Vb(10,"mat-icon"),r.Kc(11,"check"),r.Ub(),r.Ub()),2&t&&(r.Db(3),r.nc("formControl",e.form),r.Db(1),r.nc("ngIf",null==e.form.errors?null:e.form.errors.required),r.Db(1),r.nc("ngIf",null==e.form.errors?null:e.form.errors.nameConflict),r.Db(4),r.nc("disabled",e.form.invalid))},directives:[_u,cu,Ou,ac,Vc,bh,ut,Dl,Yp,nu],styles:["[_nghost-%COMP%]{display:flex}"]}),t})();const I8=["importFileInput"];function P8(t,e){if(1&t&&(r.Vb(0,"mat-option",7),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.name),r.Db(1),r.Mc(" ",t.name," ")}}function O8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",9),r.Vb(1,"mat-icon"),r.Kc(2,"more_vert"),r.Ub(),r.Ub(),r.Vb(3,"mat-menu",null,10),r.Vb(5,"div",11),r.Vb(6,"button",12),r.cc("click",function(){return r.Ac(t),r.gc(2).showRenameForm()}),r.Vb(7,"mat-icon"),r.Kc(8,"create"),r.Ub(),r.Vb(9,"span"),r.Kc(10,"Renommer"),r.Ub(),r.Ub(),r.Vb(11,"button",13),r.cc("click",function(){return r.Ac(t),r.gc(2).exportConfiguration()}),r.Vb(12,"mat-icon"),r.Kc(13,"cloud_download"),r.Ub(),r.Vb(14,"span"),r.Kc(15,"Exporter"),r.Ub(),r.Ub(),r.Vb(16,"button",14),r.cc("click",function(){return r.Ac(t),r.gc(2).deleteConfiguration()}),r.Vb(17,"mat-icon"),r.Kc(18,"delete"),r.Ub(),r.Vb(19,"span"),r.Kc(20,"Supprimer"),r.Ub(),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=r.wc(4);r.nc("matMenuTriggerFor",t)}}function M8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",15),r.cc("click",function(){return r.Ac(t),r.gc(2).updateActiveConfigurationFilters()}),r.Vb(1,"mat-icon"),r.Kc(2,"save"),r.Ub(),r.Ub()}}function T8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-form-field"),r.Vb(1,"mat-label"),r.Kc(2,"Configuration active"),r.Ub(),r.Vb(3,"mat-select",4),r.cc("selectionChange",function(e){return r.Ac(t),r.gc().selectConfiguration(e.value)}),r.Vb(4,"mat-option"),r.Kc(5,"-- Aucun --"),r.Ub(),r.Ic(6,P8,2,2,"mat-option",5),r.Vb(7,"mat-optgroup",6),r.Vb(8,"mat-option",7),r.Vb(9,"mat-icon"),r.Kc(10,"restore"),r.Ub(),r.Kc(11," R\xe9initialiser les filtres "),r.Ub(),r.Vb(12,"mat-option",7),r.Vb(13,"mat-icon"),r.Kc(14,"cloud_upload"),r.Ub(),r.Kc(15," Importer "),r.Ub(),r.Vb(16,"mat-option",7),r.Vb(17,"mat-icon"),r.Kc(18,"add"),r.Ub(),r.Kc(19," Nouvelle configuration "),r.Ub(),r.Ub(),r.Ub(),r.Ub(),r.Ic(20,O8,21,1,"ng-template",2),r.Ic(21,M8,3,0,"button",8)}if(2&t){const t=r.gc();r.Db(3),r.nc("value",t.activeConfigurationName)("disableOptionCentering",!0),r.Db(3),r.nc("ngForOf",t.configurations)("ngForTrackBy",t.trackByName),r.Db(2),r.nc("value",t.clearConfigurationKey),r.Db(4),r.nc("value",t.importConfigurationKey),r.Db(4),r.nc("value",t.createNewConfigurationKey),r.Db(4),r.nc("ngIf",t.activeConfigurationName),r.Db(1),r.nc("ngIf",t.dirtyFilters)}}function R8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-filter-configuration-form",16),r.cc("cancel",function(){return r.Ac(t),r.gc().cancelRename()})("save",function(e){return r.Ac(t),r.gc().saveRename(e)}),r.Ub()}if(2&t){const t=r.gc();r.nc("name",t.activeConfigurationName)}}let V8=(()=>{class t extends LT{constructor(t,e){super(),this.filterConfigurationsService=t,this.uiService=e,this.configurations=[],this.activeConfigurationName=null,this.activeConfiguration=null,this.isRenamingConfiguration=!1,this.dirtyFilters=!1,this.clearConfigurationKey="@@@@clear-configuration@@@@",this.createNewConfigurationKey="@@@@new-configuration@@@@",this.importConfigurationKey="@@@@import-configuration@@@@"}ngOnInit(){this.subscriptions.push(this.filterConfigurationsService.configurations$.subscribe(t=>{this.configurations=t}),this.filterConfigurationsService.activeConfigurationName$.subscribe(t=>{this.activeConfigurationName=t}),this.filterConfigurationsService.activeConfiguration$.subscribe(t=>{this.activeConfiguration=t}),this.filterConfigurationsService.dirtyActiveConfiguration$.subscribe(t=>{this.dirtyFilters=t}))}selectConfiguration(t){t===this.clearConfigurationKey?(this.select.value=this.activeConfigurationName,this.filterConfigurationsService.clearMapFilters()):t===this.createNewConfigurationKey?(this.filterConfigurationsService.selectConfiguration(""),this.showRenameForm()):t===this.importConfigurationKey?(this.select.value=this.activeConfigurationName,this.triggerImportConfigurationDialog()):this.filterConfigurationsService.selectConfiguration(t)}showRenameForm(){this.isRenamingConfiguration=!0}triggerImportConfigurationDialog(){this.importFileInput.nativeElement.click()}onFilesChange(t){return Object(ue.a)(this,void 0,void 0,function*(){const e=t.target.files||t.dataTransfer.files;if(e.length)try{const i=yield Promise.all(Array.from(e).map(t=>Object(ue.a)(this,void 0,void 0,function*(){try{const e=JSON.parse(yield XH(t));if("string"==typeof e.name&&"object"==typeof e.filters)return e;throw new Error("Structure JSON incorrecte")}catch(e){throw new Error(`Import du fichier \`${t.name}\` \xe9chou\xe9: ${e.message}`)}}))),n=this.configurations.map(t=>t.name),r=i.filter(t=>n.includes(t.name)),s=i.filter(t=>!n.includes(t.name));if(r.length>0){const t=r.map(t=>t.name).join(", ");if(!(yield this.uiService.confirmAsync({title:"Conflits",message:1===r.length?`La configuration ${t} existe d\xe9j\xe0 et sera mise \xe0 jour. Confirmez-vous la mise \xe0 jour de cette configuration ?`:`Les configurations ${t} existent d\xe9j\xe0 et seront mises \xe0 jour. Confirmez-vous la mise \xe0 jour de ces configurations ?`})))return!0}yield Promise.all([...s.map(t=>Object(ue.a)(this,void 0,void 0,function*(){yield this.filterConfigurationsService.importConfiguration(t)})),...r.map(t=>Object(ue.a)(this,void 0,void 0,function*(){yield this.filterConfigurationsService.updateConfiguration(t)}))]),this.uiService.success(1===i.length?"La configuration a \xe9t\xe9 import\xe9e":"Les configurations ont \xe9t\xe9 import\xe9es")}finally{t.target.value=""}})}cancelRename(){this.isRenamingConfiguration=!1}saveRename(t){this.activeConfigurationName?this.filterConfigurationsService.renameConfiguration(this.activeConfigurationName,t):(this.filterConfigurationsService.createConfiguration(t),this.filterConfigurationsService.selectConfiguration(t)),this.cancelRename()}deleteConfiguration(){this.uiService.confirm({title:"Suppression",message:"Une fois supprim\xe9e, cette configuration de filtres ne sera plus accessible. Confirmez-vous la suppression ?",action:t=>Object(ue.a)(this,void 0,void 0,function*(){t&&(yield this.filterConfigurationsService.deleteConfiguration(this.activeConfigurationName))})})}exportConfiguration(){const t=this.filterConfigurationsService.activeConfiguration$.value,e=(new Date).toISOString().substr(0,19).replace(/:/g,"-");qH(t,`ANAIS-configuration-filtre-${t.name}-${e}.json`)}trackByName(t,e){return e.name}updateActiveConfigurationFilters(){this.filterConfigurationsService.updateActiveConfigurationFilters()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(PT),r.Pb(VI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-filter-configuration-switcher"]],viewQuery:function(t,e){if(1&t&&(r.Pc(I8,3),r.Pc(Vg,1)),2&t){let t;r.vc(t=r.dc())&&(e.importFileInput=t.first),r.vc(t=r.dc())&&(e.select=t.first)}},features:[r.Ab],decls:4,vars:2,consts:[["type","file","accept","application/json","multiple","","hidden","",3,"change"],["importFileInput",""],[3,"ngIf"],[3,"name","cancel","save",4,"ngIf"],[3,"value","disableOptionCentering","selectionChange"],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],["label","Actions"],[3,"value"],["mat-button","","color","primary","title","Des filtres ont \xe9t\xe9 modifi\xe9s. Cliquer pour enregistrer les modifications",3,"click",4,"ngIf"],["mat-button","","title","Voir les actions",3,"matMenuTriggerFor"],["actionsMenu","matMenu"],[1,"py-0"],["mat-menu-item","","title","Renommer la configuration",3,"click"],["mat-menu-item","","title","Exporter la configuration au format JSON",3,"click"],["mat-menu-item","","title","Supprimer la configuration",1,"warn-menu-item",3,"click"],["mat-button","","color","primary","title","Des filtres ont \xe9t\xe9 modifi\xe9s. Cliquer pour enregistrer les modifications",3,"click"],[3,"name","cancel","save"]],template:function(t,e){1&t&&(r.Vb(0,"input",0,1),r.cc("change",function(t){return e.onFilesChange(t)}),r.Ub(),r.Ic(2,T8,22,9,"ng-template",2),r.Ic(3,R8,1,1,"app-filter-configuration-form",3)),2&t&&(r.Db(2),r.nc("ngIf",!e.isRenamingConfiguration),r.Db(1),r.nc("ngIf",e.isRenamingConfiguration))},directives:[ut,_u,cu,Vg,bl,ct,pl,Yp,Dl,sU,eU,QL,D8],styles:["[_nghost-%COMP%]{display:flex}.warn-menu-item[_ngcontent-%COMP%], .warn-menu-item[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{color:rgba(244,67,54,.87)!important}"]}),t})();function F8(t,e){if(1&t&&(r.Vb(0,"mat-option",40),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.key),r.Db(1),r.Mc(" ",t.name," ")}}function L8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",41),r.cc("click",function(e){r.Ac(t);const i=r.gc();return e.stopPropagation(),i.mapConfigService.updateShipTypesFilter([])}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function U8(t,e){if(1&t&&(r.Vb(0,"mat-option",40),r.Qb(1,"app-flag",42),r.Kc(2),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.flag),r.Db(1),r.nc("flag",t.flag),r.Db(1),r.Mc(" ",t.name," ")}}function B8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",41),r.cc("click",function(e){r.Ac(t);const i=r.gc();return e.stopPropagation(),i.mapConfigService.updateShipFlagsFilter([])}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function N8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",41),r.cc("click",function(){return r.Ac(t),r.gc().mapConfigService.updateShipIdentifierFilter("")}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function j8(t,e){if(1&t&&(r.Vb(0,"mat-option",40),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.id),r.Db(1),r.Mc(" ",t.name," ")}}function z8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",41),r.cc("click",function(e){r.Ac(t);const i=r.gc();return e.stopPropagation(),i.fleetsService.updateFleetsFilter([])}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function H8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",41),r.cc("click",function(){return r.Ac(t),r.gc().mapConfigService.updateShipDepartureFilter("")}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function K8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",41),r.cc("click",function(){return r.Ac(t),r.gc().mapConfigService.updateShipDestinationFilter("")}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function $8(t,e){if(1&t&&(r.Vb(0,"mat-option",40),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.key),r.Db(1),r.Mc(" ",t.label," ")}}function G8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",41),r.cc("click",function(e){r.Ac(t);const i=r.gc();return e.stopPropagation(),i.mapConfigService.updateShipStatusFilter([])}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}const W8={floor:0,animate:!1,inputEventsInterval:166,mouseEventsInterval:166,touchEventsInterval:166};let Z8=(()=>{class t extends LT{constructor(t,e,i){super(),this.changeDetectorRef=t,this.fleetsService=e,this.mapConfigService=i,this.configurations=[],this.activeConfiguration=null,this.shipFilter=null,this.vesselTypes=kD,this.countries=jI,this.eventTypes=VP,this.navigationStatus=tK,this.visibilityThresholdsSteps=yD,this.visibilityThresholdsColors=xD,this.slidersRefresh$=new r.o,this.speedSliderOptions=Object.assign({ceil:100,translate:t=>`${t} kt`},W8),this.lengthSliderOptions=Object.assign({ceil:500,translate:t=>`${t} m`},W8),this.widthSliderOptions=Object.assign({ceil:100,translate:t=>`${t} m`},W8),this.draughtSliderOptions=Object.assign({ceil:30,translate:t=>`${t} m`},W8),this.yearofbuildSliderOptions=Object.assign(Object.assign({},W8),{floor:1874,ceil:ID}),this.speedForm=new eh([this.speedSliderOptions.floor,this.speedSliderOptions.ceil]),this.lengthForm=new eh([this.lengthSliderOptions.floor,this.lengthSliderOptions.ceil]),this.widthForm=new eh([this.widthSliderOptions.floor,this.widthSliderOptions.ceil]),this.draughtForm=new eh([this.widthSliderOptions.floor,this.widthSliderOptions.ceil]),this.yearofbuildForm=new eh([this.yearofbuildSliderOptions.floor,this.yearofbuildSliderOptions.ceil]),this.speedFilterActive=!1,this.lengthFilterActive=!1,this.widthFilterActive=!1,this.draughtFilterActive=!1,this.yearofbuildFilterActive=!1,this.courseFilterActive=!1,this.hasActiveShipFilters=!1,this.MaximumShipCourse=360,this.updatingFilter=!1}ngOnInit(){this.subscriptions.push(this.mapConfigService.shipFilter$.pipe(wm(300)).subscribe(t=>{this.shipFilter=t,this.updatingFilter=!0,this.speedForm.setValue([t.shipSpeed.min,t.shipSpeed.max],{emitEvent:!1}),this.lengthForm.setValue([t.shipLength.min,t.shipLength.max],{emitEvent:!1}),this.widthForm.setValue([t.shipWidth.min,t.shipWidth.max],{emitEvent:!1}),this.draughtForm.setValue([t.shipDraught.min,t.shipDraught.max],{emitEvent:!1}),this.yearofbuildForm.setValue([t.shipYearofbuild.min,t.shipYearofbuild.max],{emitEvent:!1}),this.speedFilterActive=0!==t.shipSpeed.min||100!==t.shipSpeed.max,this.lengthFilterActive=0!==t.shipLength.min||500!==t.shipLength.max,this.widthFilterActive=0!==t.shipWidth.min||100!==t.shipWidth.max,this.draughtFilterActive=0!==t.shipDraught.min||30!==t.shipDraught.max,this.yearofbuildFilterActive=1874!==t.shipYearofbuild.min||t.shipYearofbuild.max!==ID||!t.shipYearofbuildIncludeNulls,this.courseFilterActive=0!==t.shipCourse.min||360!==t.shipCourse.max,this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.updatingFilter=!1})}),this.mapConfigService.hasActiveShipFilters$.subscribe(t=>{this.hasActiveShipFilters=t,this.changeDetectorRef.markForCheck()}),this.fleetsService.fleets$.subscribe(t=>{this.fleets=t,this.changeDetectorRef.markForCheck()}),this.speedForm.valueChanges.pipe(He(()=>!this.updatingFilter),Pe(()=>{this.changeDetectorRef.markForCheck()}),Be(500)).subscribe(([t,e])=>{this.mapConfigService.updateShipSpeedFilter({min:t,max:e})}),this.lengthForm.valueChanges.pipe(He(()=>!this.updatingFilter),Pe(()=>{this.changeDetectorRef.markForCheck()}),Be(500)).subscribe(([t,e])=>{this.mapConfigService.updateShipLengthFilter({min:t,max:e})}),this.widthForm.valueChanges.pipe(He(()=>!this.updatingFilter),Pe(()=>{this.changeDetectorRef.markForCheck()}),Be(500)).subscribe(([t,e])=>{this.mapConfigService.updateShipWidthFilter({min:t,max:e})}),this.draughtForm.valueChanges.pipe(He(()=>!this.updatingFilter),Pe(()=>{this.changeDetectorRef.markForCheck()}),Be(500)).subscribe(([t,e])=>{this.mapConfigService.updateShipDraughtFilter({min:t,max:e})}),this.yearofbuildForm.valueChanges.pipe(He(()=>!this.updatingFilter),Pe(()=>{this.changeDetectorRef.markForCheck()}),Be(500)).subscribe(([t,e])=>{this.mapConfigService.updateShipYearofbuildFilter({min:t,max:e})}))}onMenuOpen(){AT(0,on).pipe(function(t=-1){return e=>0===t?Ye():e.lift(new C8(t<0?-1:t-1,e))}(),Sn(wn(200))).subscribe(()=>{this.slidersRefresh$.next(null)})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(OT),r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-filters-control"]],features:[r.Ab],decls:127,vars:62,consts:[["gid","filter-menu","date","2020-11-04"],["mat-button","","title","Configurer les filtres","joyrideStep","filters-button","title","Configuration des filtres de carte","text","Ce menu permet de configurer les filtres appliqu\xe9s, notamment l'anciennet\xe9 des pistes affich\xe9es.",1,"toolbar__button",3,"matMenuTriggerFor","click"],["svgIcon","filter"],[1,"large-menu"],["menu","matMenu"],[1,"pt-0",3,"click"],[1,"d-flex-center","filters-control__section-title"],[1,"mat-title","mr-3"],[1,"d-flex"],[1,"d-block","px-3"],["multiple","",3,"ngModel","ngModelChange"],["typeSelection","ngModel"],[3,"model","values","key"],[3,"value",4,"ngFor","ngForOf"],["mat-button","","matSuffix","","mat-icon-button","","title","R\xe9initialiser le filtre",3,"click",4,"ngIf"],["countrySelection","ngModel"],["matInput","",3,"ngModel","ngModelChange"],["align","start"],[1,"d-flex-center","px-3"],[1,"filters-control__slider-label"],["mat-icon-button","","title","R\xe9initialiser le filtre",1,"filters-control__reset-button",3,"click"],[1,"app-slider","u-flex"],["name","speed",3,"formControl","options","manualRefresh"],["name","length",3,"formControl","options","manualRefresh"],["name","width",3,"formControl","options","manualRefresh"],["name","draught",3,"formControl","options","manualRefresh"],["name","yearofbuild",3,"formControl","options","manualRefresh"],["title","Inclure les navires pour lesquels l'ann\xe9e de construction n'est pas d\xe9finie",1,"u-center","ml-1"],[1,"mat-small"],["color","primary",3,"ngModel","ngModelChange"],[1,"d-flex-center","px-3","mb-2"],[1,"u-flex","d-flex-center"],[1,"mat-body","mr-2"],["type","number","min","0","step","1","max","360","title","Angle minimum (0 - 360)",2,"width","60px",3,"ngModel","ngModelChange"],[1,"mat-body","mx-2"],["type","number","min","0","step","1","max","360","title","Angle maximum (0 - 360)",2,"width","60px",3,"ngModel","ngModelChange"],[1,"mat-title","filters-control__section-title"],[1,"px-3","mat-body"],[1,"px-3","mb-2"],[3,"steps","colors","value","highValue","refresh$","change"],[3,"value"],["mat-button","","matSuffix","","mat-icon-button","","title","R\xe9initialiser le filtre",3,"click"],[3,"flag"]],template:function(t,e){if(1&t&&(r.Vb(0,"app-glitter",0),r.Vb(1,"button",1),r.cc("click",function(){return e.onMenuOpen()}),r.Qb(2,"mat-icon",2),r.Ub(),r.Ub(),r.Vb(3,"mat-menu",3,4),r.Vb(5,"mat-list",5),r.cc("click",function(t){return t.stopPropagation()}),r.Vb(6,"div",6),r.Vb(7,"div",7),r.Kc(8,"Filtres"),r.Ub(),r.Qb(9,"app-filter-configuration-switcher"),r.Ub(),r.Vb(10,"div",8),r.Vb(11,"mat-form-field",9),r.Vb(12,"mat-label"),r.Kc(13,"Type de navire"),r.Ub(),r.Vb(14,"mat-select",10,11),r.cc("ngModelChange",function(t){return e.mapConfigService.updateShipTypesFilter(t)}),r.Qb(16,"app-select-check-all",12),r.Ic(17,F8,2,2,"mat-option",13),r.Ub(),r.Ic(18,L8,3,0,"button",14),r.Ub(),r.Vb(19,"mat-form-field",9),r.Vb(20,"mat-label"),r.Kc(21,"Pavillon"),r.Ub(),r.Vb(22,"mat-select",10,15),r.cc("ngModelChange",function(t){return e.mapConfigService.updateShipFlagsFilter(t)}),r.Qb(24,"app-select-check-all",12),r.Ic(25,U8,3,3,"mat-option",13),r.Ub(),r.Ic(26,B8,3,0,"button",14),r.Ub(),r.Ub(),r.Vb(27,"div",8),r.Vb(28,"mat-form-field",9),r.Vb(29,"mat-label"),r.Kc(30,"Nom / IMO / MMSI"),r.Ub(),r.Vb(31,"input",16),r.cc("ngModelChange",function(t){return e.mapConfigService.updateShipIdentifierFilter(t)}),r.Ub(),r.Ic(32,N8,3,0,"button",14),r.Ub(),r.Vb(33,"mat-form-field",9),r.Vb(34,"mat-label"),r.Kc(35,"Flotte"),r.Ub(),r.Vb(36,"mat-select",10),r.cc("ngModelChange",function(t){return e.fleetsService.updateFleetsFilter(t)}),r.Ic(37,j8,2,2,"mat-option",13),r.Ub(),r.Ic(38,z8,3,0,"button",14),r.Ub(),r.Ub(),r.Vb(39,"div",8),r.Vb(40,"mat-form-field",9),r.Vb(41,"mat-label"),r.Kc(42,"Provenance"),r.Ub(),r.Vb(43,"input",16),r.cc("ngModelChange",function(t){return e.mapConfigService.updateShipDepartureFilter(t)}),r.Ub(),r.Ic(44,H8,3,0,"button",14),r.Vb(45,"mat-hint",17),r.Kc(46,"S\xe9parer par des virgules pour plusieurs valeurs"),r.Ub(),r.Ub(),r.Vb(47,"mat-form-field",9),r.Vb(48,"mat-label"),r.Kc(49,"Destination"),r.Ub(),r.Vb(50,"input",16),r.cc("ngModelChange",function(t){return e.mapConfigService.updateShipDestinationFilter(t)}),r.Ub(),r.Ic(51,K8,3,0,"button",14),r.Vb(52,"mat-hint",17),r.Kc(53,"S\xe9parer par des virgules pour plusieurs valeurs"),r.Ub(),r.Ub(),r.Ub(),r.Vb(54,"div",8),r.Vb(55,"mat-form-field",9),r.Vb(56,"mat-label"),r.Kc(57,"Status"),r.Ub(),r.Vb(58,"mat-select",10),r.cc("ngModelChange",function(t){return e.mapConfigService.updateShipStatusFilter(t)}),r.Ic(59,$8,2,2,"mat-option",13),r.Ub(),r.Ic(60,G8,3,0,"button",14),r.Ub(),r.Ub(),r.Vb(61,"div",18),r.Vb(62,"label",19),r.Kc(63,"Vitesse"),r.Ub(),r.Vb(64,"button",20),r.cc("click",function(){return e.speedForm.reset([e.speedSliderOptions.floor,e.speedSliderOptions.ceil])}),r.Vb(65,"mat-icon"),r.Kc(66,"clear"),r.Ub(),r.Ub(),r.Vb(67,"div",21),r.Qb(68,"ngx-slider",22),r.Ub(),r.Ub(),r.Vb(69,"div",18),r.Vb(70,"label",19),r.Kc(71,"Longueur"),r.Ub(),r.Vb(72,"button",20),r.cc("click",function(){return e.lengthForm.reset([e.lengthSliderOptions.floor,e.lengthSliderOptions.ceil])}),r.Vb(73,"mat-icon"),r.Kc(74,"clear"),r.Ub(),r.Ub(),r.Vb(75,"div",21),r.Qb(76,"ngx-slider",23),r.Ub(),r.Ub(),r.Vb(77,"div",18),r.Vb(78,"label",19),r.Kc(79,"Largeur"),r.Ub(),r.Vb(80,"button",20),r.cc("click",function(){return e.widthForm.reset([e.widthSliderOptions.floor,e.widthSliderOptions.ceil])}),r.Vb(81,"mat-icon"),r.Kc(82,"clear"),r.Ub(),r.Ub(),r.Vb(83,"div",21),r.Qb(84,"ngx-slider",24),r.Ub(),r.Ub(),r.Vb(85,"div",18),r.Vb(86,"label",19),r.Kc(87,"Tirant d'eau"),r.Ub(),r.Vb(88,"button",20),r.cc("click",function(){return e.draughtForm.reset([e.draughtSliderOptions.floor,e.draughtSliderOptions.ceil])}),r.Vb(89,"mat-icon"),r.Kc(90,"clear"),r.Ub(),r.Ub(),r.Vb(91,"div",21),r.Qb(92,"ngx-slider",25),r.Ub(),r.Ub(),r.Vb(93,"div",18),r.Vb(94,"label",19),r.Kc(95,"Ann\xe9e de construction"),r.Ub(),r.Vb(96,"button",20),r.cc("click",function(){return e.yearofbuildForm.reset([e.yearofbuildSliderOptions.floor,e.yearofbuildSliderOptions.ceil]),e.mapConfigService.updateShipYearofbuildIncludeNullsFilter(!0)}),r.Vb(97,"mat-icon"),r.Kc(98,"clear"),r.Ub(),r.Ub(),r.Vb(99,"div",21),r.Qb(100,"ngx-slider",26),r.Ub(),r.Vb(101,"div",27),r.Vb(102,"div",28),r.Kc(103,"Valeurs"),r.Qb(104,"br"),r.Kc(105,"manquantes"),r.Ub(),r.Vb(106,"mat-checkbox",29),r.cc("ngModelChange",function(t){return e.mapConfigService.updateShipYearofbuildIncludeNullsFilter(t)}),r.Ub(),r.Ub(),r.Ub(),r.Vb(107,"div",30),r.Vb(108,"label",19),r.Kc(109,"Cap"),r.Ub(),r.Vb(110,"button",20),r.cc("click",function(){return e.mapConfigService.updateShipCourseFilter({min:0,max:e.MaximumShipCourse})}),r.Vb(111,"mat-icon"),r.Kc(112,"clear"),r.Ub(),r.Ub(),r.Vb(113,"div",31),r.Vb(114,"div",32),r.Kc(115,"du"),r.Ub(),r.Vb(116,"input",33),r.cc("ngModelChange",function(t){return e.mapConfigService.updateShipCourseFilter({min:t,max:e.shipFilter.shipCourse.max})}),r.Ub(),r.Vb(117,"div",34),r.Kc(118,"au"),r.Ub(),r.Vb(119,"input",35),r.cc("ngModelChange",function(t){return e.mapConfigService.updateShipCourseFilter({min:e.shipFilter.shipCourse.min,max:t})}),r.Ub(),r.Ub(),r.Ub(),r.Qb(120,"mat-divider"),r.Vb(121,"div",36),r.Kc(122,"Pistes"),r.Ub(),r.Vb(123,"div",37),r.Kc(124,"Les seuils ci-dessous permettent de masquer les pistes ou et de les rendre l\xe9g\xe8rement transparentes."),r.Ub(),r.Vb(125,"div",38),r.Vb(126,"app-dual-slider",39),r.cc("change",function(t){return e.mapConfigService.updateVisibilityThresholds(t.value,t.highValue)}),r.Ub(),r.Ub(),r.Ub(),r.Ub()),2&t){const t=r.wc(4),i=r.wc(15),n=r.wc(23);r.Db(1),r.Hb("filters-control__active-button",e.hasActiveShipFilters),r.nc("matMenuTriggerFor",t),r.Db(13),r.nc("ngModel",e.shipFilter.shipTypes),r.Db(2),r.nc("model",i)("values",e.vesselTypes)("key","key"),r.Db(1),r.nc("ngForOf",e.vesselTypes),r.Db(1),r.nc("ngIf",e.shipFilter.shipTypes.length>0),r.Db(4),r.nc("ngModel",e.shipFilter.shipFlags),r.Db(2),r.nc("model",n)("values",e.countries)("key","flag"),r.Db(1),r.nc("ngForOf",e.countries),r.Db(1),r.nc("ngIf",e.shipFilter.shipFlags.length>0),r.Db(5),r.nc("ngModel",e.shipFilter.shipIdentifier),r.Db(1),r.nc("ngIf",e.shipFilter.shipIdentifier),r.Db(4),r.nc("ngModel",e.shipFilter.fleets),r.Db(1),r.nc("ngForOf",e.fleets),r.Db(1),r.nc("ngIf",e.shipFilter.fleets.length>0),r.Db(5),r.nc("ngModel",e.shipFilter.shipDeparture),r.Db(1),r.nc("ngIf",e.shipFilter.shipDeparture),r.Db(6),r.nc("ngModel",e.shipFilter.shipDestination),r.Db(1),r.nc("ngIf",e.shipFilter.shipDestination),r.Db(7),r.nc("ngModel",e.shipFilter.shipStatus),r.Db(1),r.nc("ngForOf",e.navigationStatus),r.Db(1),r.nc("ngIf",e.shipFilter.shipStatus.length>0),r.Db(4),r.Fc("opacity",e.speedFilterActive?1:0),r.Db(4),r.nc("formControl",e.speedForm)("options",e.speedSliderOptions)("manualRefresh",e.slidersRefresh$),r.Db(4),r.Fc("opacity",e.lengthFilterActive?1:0),r.Db(4),r.nc("formControl",e.lengthForm)("options",e.lengthSliderOptions)("manualRefresh",e.slidersRefresh$),r.Db(4),r.Fc("opacity",e.widthFilterActive?1:0),r.Db(4),r.nc("formControl",e.widthForm)("options",e.widthSliderOptions)("manualRefresh",e.slidersRefresh$),r.Db(4),r.Fc("opacity",e.draughtFilterActive?1:0),r.Db(4),r.nc("formControl",e.draughtForm)("options",e.draughtSliderOptions)("manualRefresh",e.slidersRefresh$),r.Db(4),r.Fc("opacity",e.yearofbuildFilterActive?1:0),r.Db(4),r.nc("formControl",e.yearofbuildForm)("options",e.yearofbuildSliderOptions)("manualRefresh",e.slidersRefresh$),r.Db(6),r.nc("ngModel",e.shipFilter.shipYearofbuildIncludeNulls),r.Db(4),r.Fc("opacity",e.courseFilterActive?1:0),r.Db(6),r.nc("ngModel",e.shipFilter.shipCourse.min),r.Db(3),r.nc("ngModel",e.shipFilter.shipCourse.max),r.Db(7),r.nc("steps",e.visibilityThresholdsSteps)("colors",e.visibilityThresholdsColors)("value",e.shipFilter.shipLastPositionTimestampThreshold)("highValue",e.shipFilter.transparencyThreshold)("refresh$",e.slidersRefresh$)}},directives:[DL,Dl,ax,sU,Yp,eU,yU,V8,_u,cu,Vg,Vc,uh,tj,ct,ut,Ou,ac,lu,pg,bh,tF,fh,GT,m8,bl,fu,GF],styles:[".filters-control__active-button[_ngcontent-%COMP%]{color:#005cee}.filters-control__active-button[_ngcontent-%COMP%] ellipse{stroke:#005cee}.filters-control__active-button[_ngcontent-%COMP%] path{stroke:#005cee;fill:#005cee}.filters-control__section-title[_ngcontent-%COMP%]{background-color:hsla(0,0%,91.8%,.5686274509803921);padding-top:8px;padding-left:16px;padding-bottom:8px;margin-bottom:8px}.filters-control__list-item[_ngcontent-%COMP%]{height:30px!important}.filters-control__slider-label[_ngcontent-%COMP%]{width:90px;color:#777}.filters-control__reset-button[_ngcontent-%COMP%]{width:24px!important;height:24px!important;line-height:24px!important;margin:0 4px} .large-menu{max-width:500px!important} .large-menu .mat-menu-content{padding:0!important}"],changeDetection:0}),t})();const q8=["searchInput"];function Y8(t,e){1&t&&(r.Vb(0,"mat-icon",12),r.Kc(1,"cached"),r.Ub())}function Q8(t,e){1&t&&(r.Vb(0,"mat-icon"),r.Kc(1,"search"),r.Ub())}function X8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",13),r.cc("click",function(){return r.Ac(t),r.gc().searchFormControl.setValue("")}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function J8(t,e){1&t&&(r.Vb(0,"mat-option",14),r.Kc(1," Aucun r\xe9sultat "),r.Ub())}function t6(t,e){if(1&t&&(r.Vb(0,"mat-option",15),r.Vb(1,"div",16),r.Vb(2,"div",17),r.Vb(3,"div",18),r.Qb(4,"app-flag",19),r.Vb(5,"div",20),r.Vb(6,"div",21),r.Kc(7),r.Ub(),r.Vb(8,"small",22),r.Kc(9),r.Ub(),r.Ub(),r.Ub(),r.Vb(10,"div",23),r.Vb(11,"mat-icon",24),r.Kc(12,"access_time"),r.Ub(),r.Vb(13,"div",25),r.hc(14,"timeago"),r.Kc(15),r.hc(16,"date"),r.Ub(),r.Ub(),r.Ub(),r.Vb(17,"div",26),r.Vb(18,"div"),r.Kc(19),r.Ub(),r.Vb(20,"div"),r.Kc(21),r.Ub(),r.Vb(22,"div"),r.Kc(23),r.Ub(),r.Ub(),r.Ub(),r.Ub()),2&t){const t=e.$implicit,i=r.gc();r.nc("value",t),r.Db(4),r.nc("flag",t.country.flag),r.Db(3),r.Lc(t.name||"?"),r.Db(2),r.Lc(t.cargo?i.vesselTypeLabelsByType[t.cargo]:"?"),r.Db(4),r.oc("title",r.ic(14,9,1e3*t.timestamp)),r.Db(2),r.Lc(r.kc(16,11,1e3*t.timestamp,"yyyy-MM-dd HH:mm:ss z",i.mapConfigService.useUTCDates$.value&&"z")),r.Db(4),r.Mc("MMSI ",t.mmsi,""),r.Db(2),r.Mc("IMO ",t.imo||"?",""),r.Db(2),r.Mc("Callsign ",t.callsign||"?","")}}let e6=(()=>{class t extends LT{constructor(t,e,i){super(),this.errorHandler=t,this.mapConfigService=e,this.workerService=i,this.selectItem=new r.o,this.searchFormControl=new eh,this.loadingResults=!1,this.noResults=!1,this.vesselTypeLabelsByType=ED}ngOnInit(){this.subscriptions.push(this.searchFormControl.valueChanges.pipe(Be(300),Object(Ge.a)(t=>"string"==typeof t?t:void 0===t?"":"object"==typeof t&&(null==t?void 0:t.name)||""),Object(Ge.a)(t=>t.trim()),mn(),Pe(()=>{this.loadingResults=!0,this.noResults=!1}),Mn(t=>""===t?Se(null):Ol(()=>Object(ue.a)(this,void 0,void 0,function*(){try{return yield this.workerService.ships.findShips(t)}catch($nt){return $nt.name===kC.Unauthorized&&this.errorHandler.handleError($nt),[]}})))).subscribe(t=>{this.loadingResults=!1,this.noResults=0===(null==t?void 0:t.length),this.searchResults=t}))}ngAfterViewInit(){this.inputElement.nativeElement.addEventListener("blur",()=>{this.noResults=!1})}selectShip(t){t&&(this.selectItem.emit(t),this.searchFormControl.reset(""),this.inputElement.nativeElement.blur())}focusInputOnShift(t){q4(t)&&"/"===t.key&&this.inputElement.nativeElement.focus()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.n),r.Pb(hI),r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-ship-search"]],viewQuery:function(t,e){if(1&t&&r.Pc(q8,3,r.l),2&t){let t;r.vc(t=r.dc())&&(e.inputElement=t.first)}},hostBindings:function(t,e){1&t&&r.cc("keyup",function(t){return e.focusInputOnShift(t)},!1,r.zc)},outputs:{selectItem:"selectItem"},features:[r.Ab],decls:12,vars:8,consts:[["matAutocompleteOrigin","",1,"shipsearch"],["origin","matAutocompleteOrigin"],[1,"shipsearch__label"],["class","spin",4,"ngIf"],[4,"ngIf"],["type","search","placeholder","Nom, MMSI, IMO, Callsign...","matInput","",1,"shipsearch__input",3,"formControl","matAutocomplete","matAutocompleteConnectedTo"],["searchInput",""],["mat-button","","class","shipsearch__clear-btn","matSuffix","","mat-icon-button","","aria-label","R\xe9initialiser",3,"click",4,"ngIf"],["autoActiveFirstOption","",3,"optionSelected"],["autocomplete","matAutocomplete"],["class","shipsearch__no-results",4,"ngIf"],["class","shipsearch__result-item-wrapper","title","Ouvrir la fiche navire et localiser le navire",3,"value",4,"ngFor","ngForOf"],[1,"spin"],["mat-button","","matSuffix","","mat-icon-button","","aria-label","R\xe9initialiser",1,"shipsearch__clear-btn",3,"click"],[1,"shipsearch__no-results"],["title","Ouvrir la fiche navire et localiser le navire",1,"shipsearch__result-item-wrapper",3,"value"],[1,"result-item"],[1,"result-item__col1"],[1,"u-flex","d-flex-center"],[1,"result-item__flag",3,"flag"],[1,"d-flex-column"],[1,"result-item__name"],[1,"result-item__type"],[1,"result-item__timestamp"],["title","R\xe9ception"],[3,"title"],[1,"result-item__col2"]],template:function(t,e){if(1&t&&(r.Vb(0,"div",0,1),r.Vb(2,"label",2),r.Ic(3,Y8,2,0,"mat-icon",3),r.Ic(4,Q8,2,0,"mat-icon",4),r.Qb(5,"input",5,6),r.Ic(7,X8,3,0,"button",7),r.Ub(),r.Vb(8,"mat-autocomplete",8,9),r.cc("optionSelected",function(){return e.selectShip(e.searchFormControl.value)}),r.Ic(10,J8,2,0,"mat-option",10),r.Ic(11,t6,24,15,"mat-option",11),r.Ub(),r.Ub()),2&t){const t=r.wc(1),i=r.wc(9);r.Db(3),r.nc("ngIf",e.loadingResults),r.Db(1),r.nc("ngIf",!e.loadingResults),r.Db(1),r.nc("formControl",e.searchFormControl)("matAutocomplete",i)("matAutocompleteConnectedTo",t),r.Db(2),r.nc("ngIf",e.searchFormControl.value),r.Db(3),r.nc("ngIf",e.noResults),r.Db(1),r.nc("ngForOf",e.searchResults)}},directives:[FN,ut,Ou,ac,zN,Vc,bh,TN,ct,Yp,Dl,fu,bl,GF],pipes:[Tx,kt],styles:[".shipsearch[_ngcontent-%COMP%]{padding:2px 8px;flex:1;display:flex;color:#50647f}.shipsearch__label[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center;width:300px}.shipsearch__input[_ngcontent-%COMP%]{border:0;outline:0;padding:8px;height:1.5em}.shipsearch__result-item-wrapper[_ngcontent-%COMP%]{line-height:16px;padding:0;height:56px}.shipsearch__no-results[_ngcontent-%COMP%]{pointer-events:none}.shipsearch__clear-btn[_ngcontent-%COMP%]{width:24px;height:24px;line-height:24px}.result-item[_ngcontent-%COMP%]{padding:0 4px;font-size:12px;display:flex}.result-item__col1[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column}.result-item__col2[_ngcontent-%COMP%]{display:flex;flex-direction:column;text-align:right}.result-item__flag[_ngcontent-%COMP%]{margin-right:4px}.result-item__name[_ngcontent-%COMP%]{font-size:14px}.result-item__type[_ngcontent-%COMP%]{line-height:1em;font-size:11px}.result-item__timestamp[_ngcontent-%COMP%]{display:flex;align-items:center;color:grey}.result-item__timestamp[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%]{font-size:1em;height:1em;width:1em;margin-right:.3em;margin-left:.3em}"]}),t})();const i6=[{id:1,type:"new",title:"Liste des mises \xe0 jour",content:"Les changements majeurs (nouveaut\xe9s et am\xe9liorations) sont maintenant list\xe9s via ce menu. Ainsi vous ne manquerez pas les nouvelles fonctionnalit\xe9s d'ANAIS !"},{id:2,type:"improvement",title:"Optimisation des flux",content:"Les flux entre l'interface et le serveur ont \xe9t\xe9 r\xe9duits (x4) afin de fournir une plus grande r\xe9activit\xe9 et une consommation du r\xe9seau moindre."},{id:3,type:"new",title:"Ajout d'un filtre par nom / MMSI / IMO",content:"Il est maintenant possible de filtrer les navires affich\xe9s par identifiant (nom / MMSI / IMO)."},{id:4,type:"improvement",title:"Enregistrement automatique de la configuration",content:"La configuration de l'application, les param\xe8tres et les filtres de la carte sont maintenant enregistr\xe9s et restaur\xe9s lorsque l'application est r\xe9ouverte.\n

A noter que la sauvegarde de cette configuration se fait en local uniquement (dans le navigateur), et sera donc \xe0 refaire si vous vous utilisez un autre navigateur.

"},{id:5,type:"new",title:"Plein de param\xe8tres pour am\xe9liorer les performances",content:"Un nouveau menu permet de configurer des param\xe8tres g\xe9n\xe9raux d'ANAIS. Voici les nouveaut\xe9s majeures :\n <ul>\n <li>Il est maintenant possible de restreindre les navires charg\xe9s \xe0 une zone afin de gagner en fluidit\xe9 quand la bande passante est contrainte.\n Combin\xe9 \xe0 l'<em>\xe9conomiseur de bande passante</em>, cela permet de ne rafraichir qu'une seule zone, peu importe les d\xe9placements de carte.</li>\n <li>La fr\xe9quence de rafraichissement du mode temps r\xe9el est maintenant configurable et a \xe9t\xe9 augment\xe9e \xe0 30 secondes par d\xe9faut.</li>\n <li>La limite d'historique lorsque l'on s\xe9lectionne un navire a \xe9t\xe9 abaiss\xe9e \xe0 1 jour par d\xe9faut.</li>\n <li>Les hexagones sont maintenant plus grands afin de s\xe9lectionner plus rapidement les zones pour l'\xe9dition de r\xe8gles. Il est possible de revenir \xe0 l'ancienne taille via le param\xe8tre <em>Utiliser des hexagones de haute r\xe9solution</em></li>\n </ul>"},{id:6,type:"new",title:"Navigation dans l'historique des traces",content:"L'historique des traces visibles des navires est maintenant r\xe9glable plus facilement et plus finement qu'auparavant.\n <br><br>\n Il est par exemple possible de remonter dans le temps pour n'afficher qu'une semaine d'historique, il y a 6 mois.\n "},{id:7,type:"improvement",title:"Infobulles de position au survol et \xe9pingles",content:"Le fonctionnement li\xe9e aux infobulles des positions a chang\xe9 pour qu'elles apparaissent lorsque l'on survole la position avec le curseur.\n <br><br>\n Cliquer sur une position va \xe9pingler l'infobulle de cette derni\xe8re qui restera alors affich\xe9e tant que le navire courant sera s\xe9lectionn\xe9.\n Cette fonctionnalit\xe9 est notamment utile pour construire la cin\xe9matique d'un navire.\n "},{id:8,type:"new",title:"Mesure de distances",content:"Un outil de mesure de distances est maintenant disponible pour calculer les distances de trajectoires.\n <br><br>\n Il est possible de mesurer la distance entre 2 points, ainsi que la distance totale pour une trajectoire comprenant plusieurs segments."},{id:9,type:"new",title:"Flottes de navires",content:"Il est maintenant possible de g\xe9rer des flottes de navires afin de suivre plus facilement plusieurs navires d'un seul coup et visualiser simultan\xe9ment plusieurs traces.\n <br><br>\n Les flottes cr\xe9\xe9es sont utilisables en tant que filtre de visualisation mais aussi en tant que filtre de r\xe8gle."},{id:10,type:"improvement",title:"Infobulles au survol des navires",content:"Le survol d'un navire avec le curseur fait maintenant appara\xeetre une infobulle avec les informations principales du navire."},{id:11,type:"new",title:"Emails de bienvenue et r\xe9initialisation de mot de passe",content:"Les utilisateurs avec le profil administrateur peuvent maintenant acc\xe9der \xe0 un \xe9cran de gestion des utilisateurs. C'est \xe0 partir de l\xe0 que les nouveaux utilisateurs sont ajout\xe9s \xe0 ANAIS.\n <br><br>\n Il est maintenant possible de r\xe9initialiser et changer son mot de passe via l'\xe9cran de connexion. Un mail vous est envoy\xe9 avec un lien pour saisir le nouveau mot de passe.\n "},{id:12,type:"improvement",title:"Couleurs diff\xe9rentes pour les traces de flottes",content:"Jusqu'\xe0 pr\xe9sent, les traces des navires au sein d'une flotte \xe9taient affich\xe9es de la m\xeame couleur, ce qui rendait difficile leur distinction quand elles \xe9taient proches.\n <br><br>\n Dor\xe9navant, les traces des navires utilisent une palette de couleur et se distinguent plus facilement. Les couleurs ne sont pas d\xe9finitives et toute suggestion ou remarque sera fortement appr\xe9ci\xe9e.\n "},{id:13,type:"new",title:"D\xe9limitations maritimes et zones de recherches et secours",content:"Les d\xe9limitations maritimes et les zones de recherches et secours (SAR) peuvent maintenant \xeatre affich\xe9es via le menu Configuration de la carte > Donn\xe9es affich\xe9es. Les donn\xe9es proviennent du SHOM.\n "},{id:14,type:"new",title:"Import / Export de flottes",content:"Un nouveau bouton permet d'exporter les flottes de navires au format JSON en vue de les partager \xe0 quelqu'un d'autre qui pourra alors les importer dans son compte ANAIS.\n Cela peut aussi permettre d'\xe9diter les flottes \xe0 l'ext\xe9rieur d'ANAIS, si on dispose d'une grande liste de MMSI de navires \xe0 suivre.\n "},{id:15,type:"improvement",title:"Destination et ETA dans les infobulles",content:"Les infobulles des navires affich\xe9es au survol contiennent maintenant une ligne avec la destination et l'ETA annonc\xe9s du navire.\n "},{id:16,type:"improvement",title:"Icones de navires stationnaires",content:"Les navires consid\xe9r\xe9s comme stationnaires (vitesse inf\xe9rieure \xe0 1 noeud) sont maintenant repr\xe9sent\xe9s par un point sur la carte. Il sera ainsi plus facile de voir les navires naviguant dans une zone de mouillage.\n "},{id:17,type:"improvement",title:"Tailles d'icones adapative",content:"Toujours pour gagner en lisibilit\xe9, un nouveau param\xe8tre (activ\xe9 par d\xe9faut) permet d'adapter la taille des icones de la carte en fonction du niveau de zoom.\n <ul>\n <li>Lorsque le zoom est bas, c'est que l'on veut une vision d'ensemble. La taille des icones est donc r\xe9duite.</li>\n <li>Lorsque le zoom est haut, c'est que l'on s'int\xe9resse plus pr\xe9cis\xe9ment \xe0 une situation et on doit pouvoir s\xe9lectionner plus facilement les navires. La taille des icones augmente donc.</li>\n </ul>\n <br>\n Il est toujours possible de revenir au fonctionnement ant\xe9rieur. Pour cela, il suffit de d\xe9sactiver le param\xe8tre via le menu Param\xe8tres > Affichage > Adapter la taille des icones en fonction du niveau de zoom.\n "},{id:18,type:"new",title:"Coloration par type de navires",content:"Un mode d'affichage de coloration des navires par type remplace maintenant le mode sans coloration qui n'\xe9tait pas utile.\n <br>\n Une fois ce mode actif, les couleurs des icones repr\xe9sentent le type des navires. Ainsi, le vert repr\xe9sente les navires transportant des marchandises (cargo).\n "},{id:19,type:"new",title:"Coloration des \xe9v\xe9nements sur la carte",content:"Lorsque l'on s\xe9lectionne un navire, les \xe9v\xe9nements du journal de bord sont maintenant color\xe9s afin d'\xeatre distinguables plus facilement. Une l\xe9gende est \xe9galement affich\xe9e pour indiquer les couleurs associ\xe9e \xe0 chaque cat\xe9gorie.\n "},{id:20,type:"improvement",title:"Am\xe9lioration des performances et fluidit\xe9",content:"Des gros travaux ont \xe9t\xe9 entrepris pour am\xe9liorer les performances de la carte en temps r\xe9el mais aussi en mode historique. Le chargement se fait maintenant par tuiles. Ainsi, il n'y a pas besoin de rafraichir les navires tant que l'on reste dans la m\xeame tuile. Idem en mode historique.\n <br>\n Le tuilage permet de mettre en cache les navires c\xf4t\xe9 serveur afin d'avoir les temps de r\xe9ponse les plus courts possibles en temps r\xe9el.\n "},{id:21,type:"new",title:"Affichage d'une position GPS en temps r\xe9el",content:"La nouvelle fonctionnalit\xe9 de g\xe9olocalisation permet d'afficher une position en temps-r\xe9el sur la carte \xe0 partir d'une position ext\xe9rieure \xe0 ANAIS.\n <br>\n C'est utile si vous \xeates en mission dans un avion ou navire, et que vous souhaitez afficher votre position sur la carte ANAIS afin de faire correspondre plus facilement la situation r\xe9elle avec celle sur la carte.\n <br>\n <br>\n Pour la mise en oeuvre, il faut cr\xe9er un serveur HTTP en local qui expose la position mise \xe0 jour. Pour plus de d\xe9tails, voir la page Param\xe8tres > G\xe9olocalisation.\n <br>\n <br>\n Concernant la s\xe9curit\xe9 de cette fonctionnalit\xe9, notez bien que cette position n'est <strong>jamais</strong> envoy\xe9e sur internet (serveur ANAIS ou autre).\n <br>\n Si avez encore des doutes \xe0 ce sujet, vous pouvez \xe0 tout instant couper le serveur HTTP pour arr\xeater la mise \xe0 jour de la position.\n "},{id:22,type:"new",title:"Affichage des a\xe9ronefs",content:"Les a\xe9ronefs sont maintenant visibles en m\xeame temps que les navires gr\xe2ce \xe0 notre partenaire <a href=\"https://beta.gouv.fr/startups/sepia.html\">SEPIA</a>.\n <br>\n Derri\xe8re SEPIA, les donn\xe9es proviennent principalement de ADS-B Exchange et Flightradar24.\n <br>\n <br>\n L'int\xe9gration est pour le moment minimale. Il n'est pas encore possible de visualiser la fiche de l'a\xe9ronef et ni visualiser sa trace, de rechercher ou d'utiliser les filtres.\n <br>\n En fonction des retours utilisateurs, nous pourront prioriser le d\xe9veloppement de nouvelles fonctionnalit\xe9s.\n "},{id:23,type:"new",title:"Int\xe9gration d'un tchat",content:"Un tchat a \xe9t\xe9 int\xe9gr\xe9 \xe0 ANAIS afin que vous puissiez plus facilement discuter avec les membres de l'\xe9quipe.\n <br>\n <br>\n Le tchat utilise le logiciel open-source <a href=\"https://www.chatwoot.com/\">Chatwoot</a> et est h\xe9berg\xe9 sur les serveurs ANAIS.\n <br>\n <br>\n Pour y acc\xe9der, il faut cliquer sur l'icone <b>?</b> en bas \xe0 droite.\n "},{id:24,type:"new",title:"Zones SAR et MRCC mondiaux",content:"Les zones SAR et MRCC du monde entier peuvent maintenant \xeatre affich\xe9s via le menu <em>Configuration de la carte</em>."},{id:25,type:"new",title:"D\xe9calage coupure antim\xe9ridien",content:"ANAIS utilise des coordonn\xe9es du syst\xe8me g\xe9od\xe9sique mondial (WGS 84). C'est-\xe0-dire que les donn\xe9es affich\xe9es voient leur longitude varier de -180\xb0 \xe0 +180\xb0.\n Actuellement, notre moteur de rendu ne g\xe8re pas bien dans l'affichage au niveau de l'antim\xe9ridien (au milieu du pacifique) et cela occasionne donc une coupure nette des donn\xe9es affich\xe9es.\n <br>\n <br>\n En attendant que cette gestion soit automatique, nous avons ajout\xe9 un param\xe8tre pour d\xe9caler le centre de longitude afin de d\xe9caler cette coupure.\n Si vous travaillez sur une zone du pacifique par exemple, cela vous sera utile afin de voir la zone en entier.\n <br>\n <br>\n Vous trouverez ce nouveau param\xe8tre via le menu Param\xe8tres > Affichage > D\xe9calage de longitude."},{id:26,type:"new",title:"Ajout de la provenance",content:"La provenance des navires est maintenant affich\xe9e dans les infobulles et dans la fiche navire. La valeur correspond \xe0 l'avant derni\xe8re destination d\xe9clar\xe9e.\n <br>\n <br>\n Il est \xe9galement possible de filtrer les navires par provenance, comme pour destination."},{id:27,type:"new",title:"Ajout de la fiche avion",content:"Il est maintenant possible de consulter la fiche d'un avion et de visualiser sa trace.\n <br>\n La trace est color\xe9e selon l'altitude de l'avion avec la m\xeame \xe9chelle que Flightradar24."},{id:28,type:"new",title:"Ajout de la page statistiques (beta)",content:"Une nouvelle page exp\xe9rimentale permet d'effectuer des recherches de passage de navires pour une transition entre deux hexagones.\n <br>\n C'est utile par exemple si l'on veut connaitre les navires ayant pass\xe9 un d\xe9troit au cours d'une p\xe9riode de temps (6 mois maximum pour l'instant) et pouvoir faire des statistiques par pavillon ou type de navire.\n <br>\n Les r\xe9sultats de la recherche sont exportables au format CSV et peuvent ainsi \xeatre travaill\xe9s dans un tableau externe.\n <br>\n <br>\n La s\xe9lection des transitions est sujette \xe0 des limitations au-del\xe0 du niveau de zoom minimal : seules les transitions au sein d'hexagones ayant le m\xeame hexagone p\xe8re sont utilisables.\n Nous allons essayer de supprimer cette limitation dans le futur pour que la recherche soit pleinement utilisable.\n <br>\n <br>\n Pour utiliser cette fonctionnalit\xe9, il faut <em>activer le panneau des statistiques</em> dans les param\xe8tres."},{id:29,type:"new",title:"Configurations de filtre",content:"Les filtres de carte ont \xe9t\xe9 extraits dans un nouveau menu <em>Filtres</em> (ils \xe9taient auparavant dans le menu <em>Configuration de la carte</em>).\n Dans ce nouveau menu, en plus de trouver de nouveaux filtres (status, vitesse, longueur, largeur, tirant d'eau), vous allez pouvoir g\xe9rer vos configurations de filtre.\n <br>\n <br>\n Les configurations de filtre vont vous permettre de basculer rapidement entre plusieurs ensembles de filtres que vous aurez enregistr\xe9s au pr\xe9alable.\n <br>\n <br>\n Vous pouvez partager vos configurations en les exportant et les r\xe9important dans un autre compte."},{id:30,type:"improvement",title:"Masquage des \xe9tiquettes",content:"Les \xe9tiquettes peuvent d\xe9sormais \xeatre masqu\xe9es afin d'am\xe9liorer temporairement la lisibilit\xe9 d'une situation.\n <br>\n Pour ce faire, il suffit simplement de cliquer sur les \xe9tiquettes \xe0 masquer. Ces derni\xe8res vont alors disparaitre.\n <br>\n <br>\n Pour r\xe9afficher les \xe9tiquettes masqu\xe9es, il suffit de d\xe9sactiver puis r\xe9activer l'affichage des \xe9tiquettes."},{id:31,type:"new",title:"Am\xe9liorations de bande passante",content:"Deux nouveaut\xe9s permettent de limiter la bande passante utilis\xe9e par ANAIS :\n <ul>\n <li>le chargement manuel : Plut\xf4t que de rafraichir les donn\xe9es affich\xe9es automatiquement et les r\xe9cup\xe9rer par tuiles, vous pouvez maintenant opter pour d\xe9clencher manuellement la r\xe9cup\xe9ration des donn\xe9es pour la vue courante. Ce mode est activable dans les param\xe8tres.</<li>\n <li>les traces simplifi\xe9es : Ce mode est activ\xe9 par d\xe9faut et indique au serveur de simplifier la trace avant de la renvoyer au navigateur, \xe9conomisant ainsi de la bande passante. Il est possible de changer de mode via la fiche navire.</li>\n </ul>\n N'h\xe9sitez pas \xe0 tester ces fonctionnalit\xe9s et nous faire des retours d'utilisation. &#128521;"},{id:32,type:"new",title:"Transparence des \xe9tiquettes",content:"Un nouveau param\xe8tre vient de faire son entr\xe9e dans le menu Param\xe8tres et permet d'ajuster la transparence des \xe9tiquettes permanentes et infobulles (au survol et \xe9pingl\xe9es)."},{id:33,type:"new",title:"Format des dates",content:"Jusqu'\xe0 pr\xe9sent, la plupart des dates affich\xe9es dans ANAIS \xe9taient affich\xe9es de fa\xe7on relative \xe0 l'instant courant (par exemple, il y a 2h). Cela posait des probl\xe8mes \xe0 certains utilisateurs au moment de faire des captures d'\xe9cran car la date devait \xeatre ajout\xe9e manuellement.\n <br><br>\n D\xe9sormais, seuls les infobulles (au survol) des navires / a\xe9ronefs contiennt la date en relatif. Tous les autres endroits (fiche navire, liste d'alertes et \xe9v\xe9nements, etc) utilisent un format classique de date.\n <br><br>\n \xc0 noter \xe9galement qu'un nouveau param\xe8tre permettant d'afficher la date en UTC plut\xf4t qu'en temps local a \xe9t\xe9 ajout\xe9. Il contr\xf4le le format de toutes les dates affich\xe9es."},{id:34,type:"new",title:"Filtrage par cap",content:"Le filtre <em>Cap</em> permet de filtrer les navires affich\xe9s en fonction de leur cap en degr\xe9s (0\xb0 - 360\xb0).\n <br><br>\n Comme les autres filtres, c'est uniquement le cap de la derni\xe8re position qui est utilis\xe9 et le filtrage est r\xe9alis\xe9 en local dans votre navigateur."},{id:35,type:"new",title:"Zones \xe9conomiques exclusives",content:'Il est d\xe9sormais possible d\'afficher une couche de tuiles contenant les zones \xe9conomiques exclusives via le menu de configuration de la carte.\n <br><br>\n Les tuiles sont charg\xe9es directement \xe0 partir du site <a href="https://www.marineregions.org/eezmapper.php">Marineregions.org</a>.'},{id:36,type:"new",title:"Export des traces en CSV",content:"Les traces des navires sont maintenant exportables au format CSV. Cela vous permettra de conduire des analyses de ces traces en les important dans d'autres applications.\n <br><br>\n Les boutons sont pr\xe9sents dans les panneaux de d\xe9tail d'un navire et d'une flotte."},{id:37,type:"new",title:"PIM pistes",content:"\xc0 la mani\xe8re de l'outil de mesure de distances, un outil d'\xe9valuation de PIM piste est d\xe9sormais disponible dans le menu contextuel (disponible via clic droit sur la carte).\n <br><br>\n Gr\xe2ce \xe0 cet outil, vous pourrez, \xe0 partir d'une heure de d\xe9part et d'une vitesse, obtenir l'heure d'arriv\xe9e estim\xe9e d'un ou plusieurs navires \xe0 un point donn\xe9."},{id:38,type:"new",title:"Raccourcis clavier PIM et mesure",content:"En plus du menu contextuel pour acc\xe9der au mode PIM et mesure, des raccourcis clavier ont \xe9t\xe9 ajout\xe9s. La touche <strong>P</strong> permet d'acc\xe9der au mode PIM, la touche <strong>M</strong> au mode mesure.\n <br><br>\n Ces raccourcis s'ajoutent \xe0 la touche <strong>/</strong> (slash) qui permet de s\xe9lectionner le champ de recherche en haut \xe0 droite."},{id:39,type:"new",title:"Mode capture d'\xe9cran",content:"Un nouveau bouton en bas \xe0 droite de l'\xe9cran permet d'entrer en mode capture d'\xe9cran. Ce mode permet de masquer la plupart des \xe9l\xe9ments de l'interface afin de laisser le plus de place possible pour la carte et le panneau de gauche."},{id:40,type:"new",title:"Tableau de bord des alertes",content:"Un nouveau panneau contenant le tableau de bord des alertes est accessible via le bouton Alerte de la barre d'outils. Ce tableau de bord vous permet d'afficher les alertes de toutes vos r\xe8gles en fonction de la p\xe9riode s\xe9lectionn\xe9e.\n <br><br>\n Aussi, des indicateurs du nombre d'alertes lev\xe9es au cours des derni\xe8res 24 heures et des 7 derniers jours sont maintenant visibles dans le tableau de bord et dans la liste des r\xe8gles. Vous pourrez ainsi avoir une id\xe9e plus pr\xe9cise du nombre d'alerte lev\xe9es avec vos r\xe8gles et mieux les ajuster si trop d'alertes sont lev\xe9es.\n "},{id:41,type:"new",title:"Multi-s\xe9lection des navires / a\xe9ronefs",content:"Il est d\xe9sormais possible de visualiser simultan\xe9ment les traces de plusieurs navires et a\xe9ronefs sans devoir cr\xe9er une flotte.\n <br><br>\n Pour ce faire, il faut commencer par activer le mode multi-s\xe9lection via l'icone de la barre d'outils. Puis, chaque clic sur la carte ajoutera l'entit\xe9 s\xe9lectionn\xe9e \xe0 la s\xe9lection. Pour retirer l'entit\xe9 de la s\xe9lection, il faut soit effectuer un nouveau clic sur la carte, soit utiliser la croix correspondante en haut \xe0 gauche de l'\xe9cran.\n "},{id:42,type:"new",title:"Informations Lloyd's",content:"Une nouvelle section est disponible dans la fiche navire avec les informations Lloyd's provenant de notre fournisseur de donn\xe9es CLS.\n <br><br>\n Vous pourrez y voir des informations d\xe9taill\xe9es comme le propri\xe9taire du navire, ou encore sa capacit\xe9.\n "},{id:43,type:"new",title:"Notes de fiche navire",content:"Il est maintenant possible de cr\xe9er des notes dans les fiches navires. Une note est un emplacement textuel libre d\xe9di\xe9 dans lequel vous pouvez renseigner des informations sur un navire, afin de les retrouver plus tard.\n <br><br>\n Chaque note est sp\xe9cifique \xe0 un navire et \xe0 un utilisateur. Vos notes ne sont donc visibles que par vous-m\xeame.\n "},{id:44,type:"new",title:"Limites \xe0 3 et 6 nautiques",content:"Les limites fran\xe7aises des 3 et 6 milles marins relatives \xe0 la p\xeache sont dor\xe9navant affichables. Vous les trouverez dans le menu de configuration de la carte."},{id:45,type:"new",title:"Annotations g\xe9ographiques",content:"Un nouveau menu (encore un !) vient d'appara\xeetre pour vous permettre de cr\xe9er des annotations g\xe9ographiques.\n <br><br>\n Les annotations sont de simples marqueurs apparaissant sur la carte sous forme de points, de ligne ou de zones (polygone) et poss\xe9dant un titre, une description et une couleur.\n Le menu contextuel (accessible via clic droit) contient \xe9galement un nouveau raccourci pour la cr\xe9ation d'une annotation.\n <br><br>\n Ces annotations seront tr\xe8s probablement partageables entre utilisateurs dans le futur lorsque les groupes utilisateurs seront impl\xe9ment\xe9s.\n "},{id:46,type:"new",title:"Salon Tchap",content:"ANAIS est maintenant pr\xe9sent sur la messagerie instantan\xe9e Tchap via un salon de discussion !\n <br><br>\n Pour le rejoindre, utilisez ce <a href=\"https://tchap.gouv.fr/#/room/#ANAIS96Clw3VeN7q:agent.dinum.tchap.gouv.fr\">lien d'invitation au salon ANAIS</a>\n <br><br>\n Vous pourrez utiliser ce salon de discussion pour dialoguer fonctionnalit\xe9s avec d'autres utilisateurs et l'\xe9quipe ANAIS.\n "},{id:48,type:"new",title:"\xc9tiquettes d\xe9pla\xe7ables",content:"Cette fonctionnalit\xe9 \xe9tait demand\xe9e depuis longtemps par un bon nombre d'utilisateurs pour faciliter la constitution de rapports... les \xe9tiquettes sont d\xe9sormais d\xe9pla\xe7ables !\n <br><br>\n Pour les \xe9tiquettes \xe9pingl\xe9es (sur les traces, \xe9v\xe9nements, etc), un bouton en haut \xe0 droite s'affiche maintenant et vous permet de d\xe9placer l'\xe9tiquette via un glisser-d\xe9poser.\n Pour les \xe9tiquettes permanentes, le survol du curseur permet maintenant de faire apparaitre un bouton d\xe9placer et un bouton supprimer.\n Une ligne en pointill\xe9 est dessin\xe9e pour associer visuellement chaque \xe9tiquette \xe0 son point d'origine.\n "},{id:49,type:"new",title:"Mode \xe9tiquettes mini",content:"Le bouton d'affichage des \xe9tiquettes bascule maintenant entre 3 modes : aucune \xe9tiquettes, \xe9tiquettes sur une ligne, et \xe9tiquettes compl\xe8tes."},{id:50,type:"new",title:"Recherche de mouvements",content:"Un nouveau panneau intitul\xe9 <i>Recherche de mouvements</i> vous permet de rechercher des passages de navires dans diff\xe9rentes zones.\n <br><br>\n Cette recherche se base sur les mouvements des navires qu'on enregistre sous la forme de transitions entre hexagones dans notre grille hexagonale multi-niveaux. Trois niveaux de la grille hexagonale sont affich\xe9s.\n <br>\n La recherche utilise le concept de portes, une porte est un groupe de transitions adjacentes. Ainsi, pour trouver les navires ayant travers\xe9 la Manche pour une semaine donn\xe9e, on pourra cr\xe9er une porte en entr\xe9e et une autre en sortie de Manche.\n <br><br>\n Les r\xe9sultats de la recherche sont exportables au format CSV et peuvent ainsi \xeatre travaill\xe9s dans un tableau externe.\n <br><br>\n \xc0 noter que ce panneau am\xe9liore remplace l'ancien panneau <i>Statistiques</i> qui permettait seulement de rechercher des transitions entre deux hexagones de la grille hexagonale.\n "},{id:51,type:"new",title:"Extrapolation des positions en mode historique",content:"Une nouvelle fonction exp\xe9rimentale permet maintenant d'extrapoler les positions des navires en mode historique, pour faire appara\xeetre le navire \xe0 sa position estim\xe9e par son cap et sa vitesse.\n <br><br>\n Cette fonction est notamment tr\xe8s utile pour faire le rapprochement avec des relev\xe9s de positions ajout\xe9s via <i>drag'n'drop</i> ou bien par <i>clic droit > Importer des objets g\xe9ographiques</i>.\n "},{id:52,type:"new",title:"Couleurs personnalis\xe9es des alertes",content:"Les r\xe8gles d'alertes permettent maintenant de d\xe9finir une couleur qui sera utilis\xe9e pour colorer le marqueur des alertes sur la carte.\n <br><br>\n Par d\xe9faut, les alertes restent violettes.\n "},{id:53,type:"new",title:"Rapport quotidien des alertes par email",content:"Un nouveau param\xe8tre est disponible sur chaque r\xe8gle d'alertes et vous permet de recevoir quotidiennement par email un rapport sur les alertes lev\xe9es par vos r\xe8gles au cours de la journ\xe9e pass\xe9e.\n <br>\n Cet email contient, pour l'ensemble de vos r\xe8gles actives et choisies, le nombre d'alertes lev\xe9es au cours de la derni\xe8re journ\xe9e, ainsi qu'un aper\xe7u de quelques alertes.\n <br><br>\n La fonctionnalit\xe9 est volontairement simple et ne permet pas de configurer le plus de choses pour l'instant mais c'est une premi\xe8re \xe9tape vers les notifications.\n <br><br>\n N'h\xe9sitez pas \xe0 nous faire vos retours via le chat.\n "},{id:54,type:"new",title:"C\xe2bles sous-marins et pipelines",content:"Une nouvelle couche de donn\xe9es vient de faire son apparition et permet d'afficher avec les c\xe2bles sous-marins et pipelines.\n "}].reverse();function n6(t,e){1&t&&(r.Vb(0,"span",2),r.Kc(1,"Am\xe9lioration"),r.Ub())}function r6(t,e){1&t&&(r.Vb(0,"span",3),r.Kc(1,"Nouveaut\xe9"),r.Ub())}let s6=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-change-type"]],inputs:{type:"type"},decls:2,vars:2,consts:[["class","change-type change-type--improvement",4,"ngIf"],["class","change-type change-type--new",4,"ngIf"],[1,"change-type","change-type--improvement"],[1,"change-type","change-type--new"]],template:function(t,e){1&t&&(r.Ic(0,n6,2,0,"span",0),r.Ic(1,r6,2,0,"span",1)),2&t&&(r.nc("ngIf","improvement"===e.type),r.Db(1),r.nc("ngIf","new"===e.type))},directives:[ut],styles:[".change-type[_ngcontent-%COMP%]{border-radius:10px;padding:2px 6px;font-size:11px;margin-right:8px}.change-type--improvement[_ngcontent-%COMP%]{background-color:#b26cee;color:#fff}.change-type--new[_ngcontent-%COMP%]{background-color:#3778ff;color:#fff}"],changeDetection:0}),t})();function o6(t,e){if(1&t){const t=r.Wb();r.Vb(0,"a",13),r.cc("click",function(){r.Ac(t);const i=e.$implicit;return r.gc().viewItem(i)}),r.Vb(1,"div",14),r.Qb(2,"app-change-type",15),r.Vb(3,"div",16),r.Kc(4),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=e.$implicit;r.Hb("changelog__item--unread",!t.read),r.Db(2),r.nc("type",t.type),r.Db(2),r.Lc(t.title)}}function a6(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",5),r.Vb(1,"div",6),r.Vb(2,"button",17),r.cc("click",function(){return r.Ac(t),r.gc().unselectItem()}),r.Vb(3,"mat-icon"),r.Kc(4,"chevron_left"),r.Ub(),r.Ub(),r.Vb(5,"div",7),r.Kc(6),r.Ub(),r.Ub(),r.Qb(7,"mat-divider"),r.Vb(8,"div",18),r.Vb(9,"div",19),r.Vb(10,"div",20),r.Qb(11,"app-change-type",21),r.Ub(),r.Qb(12,"div",22),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.Db(6),r.Mc(" ",t.selectedItem.title," "),r.Db(3),r.Hb("changelog__item-content--scrollable",t.selectedItem),r.Db(2),r.nc("type",t.selectedItem.type),r.Db(1),r.nc("innerHTML",t.selectedItem.content,r.Bc)}}let l6=(()=>{class t{constructor(){this.selectedItem=null,this.changelog=i6,this.readItems=[];try{this.readItems=JSON.parse(localStorage.getItem("anais-read-items"))||[]}catch($nt){}this.changelog.forEach(t=>{t.read=this.readItems.includes(t.id)}),this.refreshNewItems()}viewItem(t){this.selectedItem=t,this.readItems.includes(t.id)||(t.read=!0,this.readItems.push(t.id),localStorage.setItem("anais-read-items",JSON.stringify(this.readItems)),this.refreshNewItems())}unselectItem(){this.selectedItem=null}open(){this.trigger.openMenu()}refreshNewItems(){this.hasNewItems=this.changelog.some(t=>!this.readItems.includes(t.id))}onMenuClose(){setTimeout(()=>{this.unselectItem()},400)}readAllItems(){this.readItems=this.changelog.map(t=>(t.read=!0,t.id)),localStorage.setItem("anais-read-items",JSON.stringify(this.readItems)),this.hasNewItems=!1}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-changelog"]],viewQuery:function(t,e){if(1&t&&r.Pc(sU,1),2&t){let t;r.vc(t=r.dc())&&(e.trigger=t.first)}},decls:18,vars:8,consts:[["mat-button","","title","Voir les mises \xe0 jour","joyrideStep","changelog-button","title","Mises \xe0 jour","text","Ce bouton ouvre le menu des mises \xe0 jour de l'application. Tous les changements majeurs de l'application feront l'objet d'une note dans ce menu afin que vous puissiez suivre les \xe9volutions d'ANAIS.",1,"toolbar__button",3,"color","matMenuTriggerFor"],["xPosition","before",1,"changelog",3,"closed"],["menu","matMenu"],[1,"changelog__outer",3,"click"],[1,"changelog__inner"],[1,"changelog__body"],[1,"d-flex"],[1,"changelog__title"],["mat-button","","title","Tout marquer comme lu",3,"click"],[1,"changelog__read-all-icon"],[1,"changelog__list"],["matRipple","","class","changelog__item","title","Voir le d\xe9tail de cette mise \xe0 jour",3,"changelog__item--unread","click",4,"ngFor","ngForOf"],["class","changelog__body",4,"ngIf"],["matRipple","","title","Voir le d\xe9tail de cette mise \xe0 jour",1,"changelog__item",3,"click"],[1,"u-flex"],[2,"float","left",3,"type"],[1,"changelog__item-title"],["mat-button","","title","Revenir \xe0 la liste",2,"float","left",3,"click"],[1,"changelog__list","changelog__list--mini"],[1,"changelog__item-content"],[1,"mb-2"],[3,"type"],[3,"innerHTML"]],template:function(t,e){if(1&t&&(r.Vb(0,"button",0),r.Vb(1,"mat-icon"),r.Kc(2,"info"),r.Ub(),r.Ub(),r.Vb(3,"mat-menu",1,2),r.cc("closed",function(){return e.onMenuClose()}),r.Vb(5,"div",3),r.cc("click",function(t){return t.stopPropagation()}),r.Vb(6,"div",4),r.Vb(7,"div",5),r.Vb(8,"div",6),r.Vb(9,"div",7),r.Kc(10,"Mise(s) \xe0 jour"),r.Ub(),r.Vb(11,"button",8),r.cc("click",function(){return e.readAllItems()}),r.Vb(12,"mat-icon",9),r.Kc(13,"check_circle"),r.Ub(),r.Ub(),r.Ub(),r.Qb(14,"mat-divider"),r.Vb(15,"div",10),r.Ic(16,o6,5,4,"a",11),r.Ub(),r.Ub(),r.Ic(17,a6,13,5,"div",12),r.Ub(),r.Ub(),r.Ub()),2&t){const t=r.wc(4);r.nc("color",e.hasNewItems?"primary":"default")("matMenuTriggerFor",t),r.Db(1),r.Hb("newinfos",e.hasNewItems),r.Db(5),r.Hb("changelog__inner--shifted",!!e.selectedItem),r.Db(10),r.nc("ngForOf",e.changelog),r.Db(1),r.nc("ngIf",e.selectedItem)}},directives:[Dl,ax,sU,Yp,eU,GT,ct,ut,il,s6],styles:[".newinfos{-webkit-animation:swing 2s ease-in-out infinite;animation:swing 2s ease-in-out infinite}@-webkit-keyframes swing{70%{transform:rotate(0deg)}75%{transform:rotate(45deg)}80%{transform:rotate(-35deg)}85%{transform:rotate(25deg)}90%{transform:rotate(-15deg)}95%{transform:rotate(5deg)}to{transform:rotate(0deg)}}@keyframes swing{70%{transform:rotate(0deg)}75%{transform:rotate(45deg)}80%{transform:rotate(-35deg)}85%{transform:rotate(25deg)}90%{transform:rotate(-15deg)}95%{transform:rotate(5deg)}to{transform:rotate(0deg)}}.changelog{min-width:340px!important;max-width:340px!important}.changelog>.mat-menu-content:not(:empty){padding-top:0!important;padding-bottom:0!important}.changelog__outer{overflow-x:hidden;width:340px}.changelog__inner{width:680px;transform:translate(0);overflow:hidden;position:relative;transition:all .3s ease-out;height:450px}.changelog__inner--shifted{transform:translateX(-50%);height:250px}.changelog__body{display:flex;flex-direction:column;width:340px;float:left;height:100%}.changelog__title{padding:.8em;font-weight:600;flex:1;text-align:center}.changelog__read-all-icon{font-size:1.2em}.changelog__item{display:flex;cursor:pointer;font-size:13px;line-height:19px;padding:.6em .8em}.changelog__item:hover{background:rgba(0,0,0,.04)}.changelog__item:first-of-type{padding-top:.8em}.changelog__item:last-of-type{padding-bottom:.6em}.changelog__item--unread{border-left:3px solid #3778ff;padding-left:.6em;letter-spacing:.2px;font-weight:600}.changelog__item-title{color:#000}.changelog__item-content{padding:.6em .8em;font-size:13px}.changelog__list{overflow-y:auto}"],encapsulation:2}),t})();function c6(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",39),r.cc("click",function(){return r.Ac(t),r.gc().mapConfigService.toggleHexagonsLayer()}),r.Qb(1,"mat-icon",40),r.Ub(),r.Qb(2,"mat-divider",3),r.Vb(3,"button",41),r.Qb(4,"mat-icon",42),r.Ub(),r.Qb(5,"mat-divider",3)}if(2&t){const t=r.gc();r.Hb("toolbar__button--active",t.mapConfigService.showHexagonsLayer$.value),r.Db(2),r.nc("vertical",!0),r.Db(3),r.nc("vertical",!0)}}function h6(t,e){1&t&&(r.Qb(0,"mat-divider",3),r.Vb(1,"button",43),r.Vb(2,"mat-icon"),r.Kc(3,"not_started"),r.Ub(),r.Ub()),2&t&&r.nc("vertical",!0)}function u6(t,e){1&t&&r.Qb(0,"mat-icon",44)}function d6(t,e){1&t&&r.Qb(0,"mat-icon",45)}function p6(t,e){if(1&t&&(r.Vb(0,"p",46),r.Vb(1,"mat-icon",47),r.Kc(2,"account_circle"),r.Ub(),r.Kc(3),r.Ub()),2&t){const t=e.ngIf;r.Db(3),r.Mc(" ",t.email," ")}}function f6(t,e){if(1&t){const t=r.Wb();r.Qb(0,"mat-divider"),r.Vb(1,"mat-list"),r.Vb(2,"mat-list-item"),r.Vb(3,"mat-checkbox",48),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc().configService.set("devMode",e)}),r.Kc(4,"Mode d\xe9veloppeur"),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.Db(3),r.nc("ngModel",t.configService.devMode)}}function m6(t,e){1&t&&(r.Qb(0,"mat-divider"),r.Vb(1,"button",49),r.Vb(2,"mat-icon"),r.Kc(3,"build"),r.Ub(),r.Vb(4,"span"),r.Kc(5,"Administration"),r.Ub(),r.Ub())}function g6(t,e){1&t&&(r.Vb(0,"button",50),r.Kc(1,"Pr\xe9c\xe9dent"),r.Ub())}function A6(t,e){1&t&&(r.Vb(0,"button",51),r.Kc(1,"Suivant"),r.Ub())}function b6(t,e){1&t&&(r.Vb(0,"button",52),r.Kc(1,"Terminer"),r.Ub())}let v6=(()=>{class t extends LT{constructor(t,e,i,n,r,s,o,a,l,c,h,u,d){super(),this.router=t,this.authenticationService=e,this.configService=i,this.initializationService=n,this.mapService=r,this.mapConfigService=s,this.measureService=o,this.selectionService=a,this.shipsService=l,this.uiService=c,this.appVersionService=h,this.joyrideService=u,this.workerService=d,this.permanentTooltipsLimit=200,this.devModeAttempts=0}ngOnInit(){this.authenticationService.user$.value.preferences.tourLaunched||setTimeout(()=>Object(ue.a)(this,void 0,void 0,function*(){this.startJoyride(),yield this.workerService.authentication.setUserTourLaunched(!0)}),2e3)}tryEnableDevMode(){this.devModeAttempts++,5===this.devModeAttempts&&(this.configService.set("devMode",!0),this.uiService.success("Mode d\xe9veloppeur activ\xe9")),setTimeout(()=>{this.devModeAttempts=0},5e3)}onShipSearchSelection(t){return Object(ue.a)(this,void 0,void 0,function*(){FD(t.lon)&&FD(t.lat)&&this.mapService.locateFit([t.lon,t.lat]),yield this.selectionService.selectShip(t.mmsi)})}logout(){return Object(ue.a)(this,void 0,void 0,function*(){yield this.authenticationService.logout(),this.initializationService.destroy(),yield this.router.navigateByUrl("/login")})}toggleMeasureModeOnKeyM(t){q4(t)&&"m"===t.key&&this.measureService.toggleMeasureMode()}startJoyrideOnKeyH(t){q4(t)&&"h"===t.key&&this.startJoyride()}startJoyride(){this.joyrideService.startTour({waitingTime:300,steps:["welcome","alerts-panel-button@/","alerts-panel@/alerts/dashboard","rules-panel@/alerts/rules","fleets-panel-button@/","fleets-panel@fleets","create-fleet-button","import-fleet-button","zones-panel-button@/","annotations-panel-button@/","search-panel-button","moves-panel-button","moves-panel@moves","ships-toggle-button@/","aircrafts-toggle-button","ship-tooltips-button","ship-color-mode-button","layers-button","filters-button","search-input","joyride-button","changelog-button","settings-button","pause-button","history-button","zoom-buttons","geolocation-buttons","chat-button","scaleline-control","mouse-position-control","ships-legend","map-end"]})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(sw),r.Pb(yI),r.Pb(cI),r.Pb(RT),r.Pb(pI),r.Pb(hI),r.Pb(WP),r.Pb(xT),r.Pb(wT),r.Pb(VI),r.Pb(c8),r.Pb(_x),r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-topbar-control"]],hostBindings:function(t,e){1&t&&r.cc("keyup",function(t){return e.startJoyrideOnKeyH(t)},!1,r.zc)},features:[r.Ab],decls:112,vars:46,consts:[[3,"ngIf"],["mat-button","","joyrideStep","alerts-panel-button","title","Ouvrir le panneau des alertes","text","Ce bouton ouvre le tableau de bord des alertes. Les r\xe8gles d'alerte servent \xe0 lever des alertes en fonction de crit\xe8res choisis.","routerLink","/alerts","routerLinkActive","toolbar__button--active",1,"toolbar__button",3,"prevTemplate","nextTemplate","doneTemplate"],["svgIcon","danger"],[1,"toolbar__h-divider",3,"vertical"],["mat-button","","joyrideStep","fleets-panel-button","title","Ouvrir le panneau des flottes de navires","text","Ce bouton ouvre le panneau des flottes de navires. Une flotte de navire est un groupe de navires, cela permet de suivre plus facilement l'\xe9volution de plusieurs navires simultan\xe9ment (alertes, traces...)","routerLink","/fleets","routerLinkActive","toolbar__button--active",1,"toolbar__button"],["svgIcon","fleets"],["mat-button","","joyrideStep","zones-panel-button","title","Ouvrir le panneau de gestion des zones","text","Ce bouton ouvre le panneau de gestion des zones. Les zones sont utilis\xe9es dans les r\xe8gles d'alerte pour filtrer les r\xe9sultats g\xe9ographiquement.","routerLink","/zones","routerLinkActive","toolbar__button--active",1,"toolbar__button"],["svgIcon","zones"],["gid","annotations","date","2021-03-20"],["mat-button","","joyrideStep","annotations-panel-button","title","Ouvrir le panneau de gestion des annotations","text","Ce bouton ouvre le panneau de gestion des annotations. Les annotations vous permettent de cr\xe9er des points g\xe9ographiques sur la carte ou encore de dessiner des zones.","routerLink","/annotations","routerLinkActive","toolbar__button--active",1,"toolbar__button"],["mat-button","","joyrideStep","search-panel-button","title","Ouvrir le panneau de recherche","text","Ce bouton ouvre le panneau de recherche dans lequel vous pouvez rechercher des navires ou bien des conteneurs.","routerLink","/search","routerLinkActive","toolbar__button--active",1,"toolbar__button"],["mat-button","","joyrideStep","moves-panel-button","title","Ouvrir le panneau de recherche de mouvements","text","Ce bouton ouvre le panneau de recherche de mouvements.","routerLink","/moves","routerLinkActive","toolbar__button--active",1,"toolbar__button"],["mat-button","","joyrideStep","ships-toggle-button","title","Basculer l'affichage des navires","text","Ce bouton permet de basculer l'affichage des navires pour par exemple se concentrer sur des traces.",1,"toolbar__button",3,"click"],["mat-button","","joyrideStep","aircrafts-toggle-button","title","Basculer l'affichage des a\xe9ronefs","text","Ce bouton permet de basculer l'affichage des a\xe9ronefs.",1,"toolbar__button",3,"click"],["gid","multi-selection","date","2021-02-08"],["mat-button","","joyrideStep","multiselection-toggle-button","title","Basculer le mode multi-s\xe9lection","text","Ce bouton permet de basculer le mode multi-s\xe9lection. Dans ce mode, le clic sur un navire n'ouvre pas directement la fiche navire mais le s\xe9lectionne, et on peut ainsi voir la trace de plusieurs navires simultan\xe9ment.",1,"toolbar__button",3,"click"],["mat-button","","joyrideStep","ship-tooltips-button","title","Basculer l'affichage des \xe9tiquettes permanentes","text","Ce bouton permet de basculer l'affichage des \xe9tiquettes permanentes. Les \xe9tiquettes contiennent des informations basiques comme le nom, le MMSI, la date de r\xe9ception et permettent d'obtenir une vision rapide d'une situation maritime. A noter que les \xe9tiquettes sont masqu\xe9es lorsque trop de navires ou avions sont affich\xe9s.",1,"toolbar__button",3,"disabled","click"],["svgIcon","tooltips",4,"ngIf"],["svgIcon","tooltips-mini",4,"ngIf"],["mat-button","","joyrideStep","ship-color-mode-button","title","Basculer vers le mode de coloration par alertes/\xe9v\xe9nements","text","Ce bouton permet de basculer la coloration par type de navires par d\xe9faut vers la coloration par alertes et \xe9v\xe9nements recherch\xe9s.",1,"toolbar__button",3,"click"],["joyrideStep","search-input","title","Recherche de navires","text","Ce champ texte permet de rechercher des navires via leur nom, MMSI ou encore IMO.",1,"topbar-control__search",3,"selectItem"],["mat-button","","title","Lancer l'animation d'introduction","joyrideStep","joyride-button","title","Animation d'introduction","text","Ce bouton permet de rejouer l'animation d'introduction.",1,"toolbar__button",3,"click"],["mat-button","","title","Afficher les param\xe8tres","joyrideStep","settings-button","title","Param\xe8tres","text","Ce bouton ouvre le menu des param\xe8tres. C'est utile pour changer des param\xe8tres globaux, optimiser le d\xe9bit (restriction de zone, fr\xe9quence de rafraichissement...), ou encore se d\xe9connecter de l'application.",1,"toolbar__button",3,"matMenuTriggerFor"],["xPosition","before",1,"large-menu"],["settingsMenu","matMenu"],[3,"click"],[1,"topbar-control__menuitem","topbar-control__app-title",3,"click"],[3,"matTooltip"],["class","topbar-control__menuitem d-flex-center",4,"ngIf"],["mat-menu-item","","routerLink","/settings"],["mat-menu-item","","href","mailto:equipe@anais.beta.gouv.fr?subject=A propos d'ANAIS","target","_blank"],["gid","tchap-link","date","2021-04-09",3,"width","height"],["mat-menu-item","","href","https://tchap.gouv.fr/#/room/#ANAIS96Clw3VeN7q:agent.dinum.tchap.gouv.fr","target","_blank"],["src","assets/images/tchap-logo.png","alt","tchap-logo"],["mat-menu-item","","routerLink","/about"],["mat-menu-item","","title","Se d\xe9connecter",3,"click"],["prevJoyrideButton",""],["nextJoyrideButton",""],["doneJoyrideButton",""],["mat-button","","title","Basculer l'affichage des hexagones",1,"toolbar__button",3,"click"],["svgIcon","hexagon"],["mat-button","","routerLink","/ports","routerLinkActive","toolbar__button--active",1,"toolbar__button"],["svgIcon","anchor"],["mat-button","","joyrideStep","playback-panel-button","title","Ouvrir le mode rejeu","text","Ce bouton active le mode rejeu qui permet de rejouer une situation maritime pass\xe9e.","routerLink","/playback","routerLinkActive","toolbar__button--active",1,"toolbar__button"],["svgIcon","tooltips"],["svgIcon","tooltips-mini"],[1,"topbar-control__menuitem","d-flex-center"],[1,"mr-2"],["color","primary",3,"ngModel","ngModelChange"],["mat-menu-item","","color","accent","routerLink","/admin/users"],["mat-flat-button","","color","primary","title","Aller \xe0 la page pr\xe9c\xe9dente",1,"joyride-button"],["mat-flat-button","","color","primary","title","Aller \xe0 la page suivante",1,"joyride-button"],["mat-flat-button","","color","primary","title","Terminer l'introduction",1,"joyride-button"]],template:function(t,e){if(1&t&&(r.Ic(0,c6,6,4,"ng-template",0),r.Vb(1,"button",1),r.Qb(2,"mat-icon",2),r.Ub(),r.Qb(3,"mat-divider",3),r.Vb(4,"button",4),r.Qb(5,"mat-icon",5),r.Ub(),r.Qb(6,"mat-divider",3),r.Vb(7,"button",6),r.Qb(8,"mat-icon",7),r.Ub(),r.Ic(9,h6,4,1,"ng-template",0),r.Qb(10,"mat-divider",3),r.Vb(11,"app-glitter",8),r.Vb(12,"button",9),r.Vb(13,"mat-icon"),r.Kc(14,"loyalty"),r.Ub(),r.Ub(),r.Ub(),r.Qb(15,"mat-divider",3),r.Vb(16,"button",10),r.Vb(17,"mat-icon"),r.Kc(18,"search"),r.Ub(),r.Ub(),r.Qb(19,"mat-divider",3),r.Vb(20,"button",11),r.Vb(21,"mat-icon"),r.Kc(22,"insert_chart_outlined"),r.Ub(),r.Ub(),r.Qb(23,"mat-divider",3),r.Vb(24,"button",12),r.cc("click",function(){return e.mapConfigService.toggleShipsLayer()}),r.Vb(25,"mat-icon"),r.Kc(26,"directions_boat"),r.Ub(),r.Ub(),r.Qb(27,"mat-divider",3),r.Vb(28,"button",13),r.cc("click",function(){return e.mapConfigService.toggleAircraftsLayer()}),r.Vb(29,"mat-icon"),r.Kc(30,"flight"),r.Ub(),r.Ub(),r.Qb(31,"mat-divider",3),r.Vb(32,"app-glitter",14),r.Vb(33,"button",15),r.cc("click",function(){return e.mapConfigService.toggleMultiSelectionMode()}),r.Vb(34,"mat-icon"),r.Kc(35,"dynamic_feed"),r.Ub(),r.Ub(),r.Ub(),r.Qb(36,"mat-divider",3),r.Vb(37,"button",16),r.cc("click",function(){return e.mapConfigService.toggleShipTooltips()}),r.hc(38,"async"),r.Ic(39,u6,1,0,"mat-icon",17),r.Ic(40,d6,1,0,"mat-icon",18),r.Ub(),r.Qb(41,"mat-divider",3),r.Vb(42,"button",19),r.cc("click",function(){return e.mapConfigService.toggleShipsColorMode()}),r.Vb(43,"mat-icon"),r.Kc(44,"palette"),r.Ub(),r.Ub(),r.Qb(45,"mat-divider",3),r.Qb(46,"app-layers-control"),r.Qb(47,"mat-divider",3),r.Qb(48,"app-filters-control"),r.Qb(49,"mat-divider",3),r.Vb(50,"app-ship-search",20),r.cc("selectItem",function(t){return e.onShipSearchSelection(t)}),r.Ub(),r.Qb(51,"mat-divider",3),r.Vb(52,"button",21),r.cc("click",function(){return e.startJoyride()}),r.Vb(53,"mat-icon"),r.Kc(54,"help"),r.Ub(),r.Ub(),r.Qb(55,"mat-divider",3),r.Qb(56,"app-changelog"),r.Qb(57,"mat-divider",3),r.Vb(58,"button",22),r.Vb(59,"mat-icon"),r.Kc(60,"settings"),r.Ub(),r.Ub(),r.Vb(61,"mat-menu",23,24),r.Vb(63,"div",25),r.cc("click",function(t){return t.stopPropagation()}),r.Vb(64,"p",26),r.cc("click",function(){return e.tryEnableDevMode()}),r.Kc(65," ANAIS - "),r.Vb(66,"small"),r.Kc(67,"Derni\xe8re mise \xe0 jour le "),r.Vb(68,"span",27),r.Kc(69),r.Ub(),r.Ub(),r.Ub(),r.Qb(70,"mat-divider"),r.Ic(71,p6,4,1,"p",28),r.hc(72,"async"),r.Ic(73,f6,5,1,"ng-template",0),r.Ub(),r.Qb(74,"mat-divider"),r.Vb(75,"button",29),r.Vb(76,"mat-icon"),r.Kc(77,"settings"),r.Ub(),r.Vb(78,"span"),r.Kc(79,"Param\xe8tres"),r.Ub(),r.Ub(),r.Ic(80,m6,6,0,"ng-template",0),r.Qb(81,"mat-divider"),r.Vb(82,"a",30),r.Vb(83,"mat-icon"),r.Kc(84,"contact_support"),r.Ub(),r.Vb(85,"span"),r.Kc(86,"Contacter l'\xe9quipe"),r.Ub(),r.Ub(),r.Qb(87,"mat-divider"),r.Vb(88,"app-glitter",31),r.Vb(89,"a",32),r.Vb(90,"mat-icon"),r.Qb(91,"img",33),r.Ub(),r.Vb(92,"span"),r.Kc(93,"Salon ANAIS sur Tchap"),r.Ub(),r.Ub(),r.Ub(),r.Qb(94,"mat-divider"),r.Vb(95,"button",34),r.Vb(96,"mat-icon"),r.Kc(97,"info"),r.Ub(),r.Vb(98,"span"),r.Kc(99,"\xc0 propos"),r.Ub(),r.Ub(),r.Qb(100,"mat-divider"),r.Vb(101,"button",35),r.cc("click",function(){return e.logout()}),r.Vb(102,"mat-icon"),r.Kc(103,"logout"),r.Ub(),r.Vb(104,"span"),r.Kc(105,"D\xe9connexion"),r.Ub(),r.Ub(),r.Ub(),r.Ic(106,g6,2,0,"ng-template",null,36,r.Jc),r.Ic(108,A6,2,0,"ng-template",null,37,r.Jc),r.Ic(110,b6,2,0,"ng-template",null,38,r.Jc)),2&t){const t=r.wc(62),i=r.wc(107),n=r.wc(109),s=r.wc(111);r.nc("ngIf",e.configService.devMode),r.Db(1),r.nc("prevTemplate",i)("nextTemplate",n)("doneTemplate",s),r.Db(2),r.nc("vertical",!0),r.Db(3),r.nc("vertical",!0),r.Db(3),r.nc("ngIf",e.configService.devMode),r.Db(1),r.nc("vertical",!0),r.Db(5),r.nc("vertical",!0),r.Db(4),r.nc("vertical",!0),r.Db(4),r.nc("vertical",!0),r.Db(1),r.Hb("toolbar__button--active",e.mapConfigService.showShipsLayer$.value),r.Db(3),r.nc("vertical",!0),r.Db(1),r.Hb("toolbar__button--active",e.mapConfigService.showAircraftsLayer$.value),r.Db(3),r.nc("vertical",!0),r.Db(2),r.Hb("toolbar__button--active",e.mapConfigService.enableMultiSelectionMode$.value),r.Db(3),r.nc("vertical",!0),r.Db(1),r.Hb("toolbar__button--active",e.mapConfigService.showPermanentTooltips$.value),r.nc("disabled",r.ic(38,42,e.shipsService.shipsInView$).length>e.permanentTooltipsLimit),r.Db(2),r.nc("ngIf",!e.mapConfigService.showMiniPermanentTooltips$.value),r.Db(1),r.nc("ngIf",e.mapConfigService.showMiniPermanentTooltips$.value),r.Db(1),r.nc("vertical",!0),r.Db(1),r.Hb("toolbar__button--active",!e.mapConfigService.shipFilter$.value.colorModeShipType),r.Db(3),r.nc("vertical",!0),r.Db(2),r.nc("vertical",!0),r.Db(2),r.nc("vertical",!0),r.Db(2),r.nc("vertical",!0),r.Db(4),r.nc("vertical",!0),r.Db(2),r.nc("vertical",!0),r.Db(1),r.nc("matMenuTriggerFor",t),r.Db(10),r.nc("matTooltip","#"+e.appVersionService.appVersion),r.Db(1),r.Lc(e.appVersionService.appDate),r.Db(2),r.nc("ngIf",r.ic(72,44,e.authenticationService.user$)),r.Db(2),r.nc("ngIf",e.configService.devMode),r.Db(7),r.nc("ngIf",e.authenticationService.isAdmin()),r.Db(8),r.nc("width",272)("height",48)}},directives:[ut,Dl,ax,ow,cw,Yp,GT,DL,x8,Z8,e6,l6,sU,eU,oA,QL,yU,SU,tF,Vc,uh],pipes:[St],styles:[".topbar-control__search[_ngcontent-%COMP%], [_nghost-%COMP%]{display:flex}.topbar-control__app-title[_ngcontent-%COMP%]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.topbar-control__menuitem[_ngcontent-%COMP%]{padding:0 16px}.topbar-control__section-title[_ngcontent-%COMP%]{background-color:hsla(0,0%,91.8%,.5686274509803921);padding-top:8px;padding-left:16px;padding-bottom:8px;margin-bottom:8px}.topbar-control__subsection-title[_ngcontent-%COMP%]{height:32px!important}.topbar-control__list-item[_ngcontent-%COMP%]{height:30px!important}.no-filter-selected-warning[_ngcontent-%COMP%]{color:#e41010;display:flex;justify-content:center;line-height:1.5em}.joyride-button[_ngcontent-%COMP%]{font-size:14px!important;line-height:1.6em;padding:0 8px} .large-menu{max-width:500px!important} .large-menu .mat-menu-content{padding:0!important}"]}),t})();function _6(t,e){if(1&t&&(r.Vb(0,"div",1),r.Vb(1,"mat-icon",2),r.Kc(2,"warning"),r.Ub(),r.Vb(3,"span"),r.Kc(4),r.Ub(),r.Vb(5,"span",3),r.Kc(6,"Plus d'informations"),r.Ub(),r.Ub()),2&t){const t=r.gc();r.Db(4),r.Lc(t.message),r.Db(1),r.nc("title",t.details)}}let y6=(()=>{class t{constructor(t,e){this.changeDetectorRef=t,this.workerService=e,this.show=!1}ngOnInit(){this.changeDetectorRef.detach(),this.workerService.applicationHealth$.pipe(He(t=>!!t)).subscribe(t=>{this.show="enabled"===t.status&&(t.anais_aircrafts_feed_drift_seconds>600||t.anais_ships_feed_drift_seconds>600),this.details="";const e=[];t.anais_aircrafts_feed_drift_seconds>600&&(this.details+=`Le flux des avions est en retard de ${UO(t.anais_aircrafts_feed_drift_seconds)}.\n`,e.push("a\xe9ronefs")),t.anais_ships_feed_drift_seconds>600&&(this.details+=`Le flux des navires est en retard de ${UO(t.anais_ships_feed_drift_seconds)}.\n`,e.push("navires")),this.details+="\nExplications : Le retard des flux est en g\xe9n\xe9ral caus\xe9 par une maintenance temporaire qui arr\xeate le programme d'ingestion. Dans les cas plus rares, le probl\xe8me peut \xe9galement survenir au niveau des sources de donn\xe9es que nous utilisons.",this.message=`Attention, le${e.length>1?"s":""} flux des ${e.join(" et des ")} pr\xe9sente${e.length>1?"nt":""} un retard !`,this.changeDetectorRef.detectChanges()})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-health-banner"]],decls:1,vars:1,consts:[["class","health-banner mat-elevation-z4 mt05em",4,"ngIf"],[1,"health-banner","mat-elevation-z4","mt05em"],[1,"health-banner__icon"],[1,"health-banner__more-infos",3,"title"]],template:function(t,e){1&t&&r.Ic(0,_6,7,2,"div",0),2&t&&r.nc("ngIf",e.show)},directives:[ut,Yp],styles:[".health-banner[_ngcontent-%COMP%]{display:flex;background:#fff;padding:.5em;font-size:.9em;align-items:center;pointer-events:all;touch-action:all}.health-banner__icon[_ngcontent-%COMP%]{font-size:1.5em;line-height:1em;height:1em;color:#e12f2f;margin-right:4px}.health-banner__more-infos[_ngcontent-%COMP%]{margin-left:8px;font-size:.9em;font-weight:500;color:#5b5b5b;cursor:help}"]}),t})(),w6=(()=>{class t{transform(t){return e=t,Math.floor(e/86400)>=1?`${VD(e/86400)}j`:Math.floor(e%86400/3600)>=1?`${VD(e%86400/3600)}h`:`${VD(e%86400/60)}min`;var e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=r.Ob({name:"timePeriod",type:t,pure:!0}),t})();function x6(t,e){if(1&t&&(r.Kc(0),r.hc(1,"date"),r.Vb(2,"mat-icon"),r.Kc(3,"arrow_right_alt"),r.Ub(),r.Kc(4),r.hc(5,"date")),2&t){const t=r.gc();r.Mc(" ",r.kc(1,2,1e3*t.displayedTimeRange.start,"yyyy-MM-dd HH:mm:ss z",t.mapConfigService.useUTCDates$.value&&"z")," "),r.Db(4),r.Mc(" ",r.kc(5,6,1e3*t.displayedTimeRange.end,"yyyy-MM-dd HH:mm:ss z",t.mapConfigService.useUTCDates$.value&&"z")," ")}}function C6(t,e){if(1&t&&r.Kc(0),2&t){const t=r.gc();r.Mc(" ",t.displayedTimeRange.label," ")}}function S6(t,e){if(1&t&&(r.Vb(0,"mat-option",21),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.oc("title",t.label),r.nc("value",t),r.Db(1),r.Mc(" ",t.label," ")}}let k6=(()=>{class t extends LT{constructor(t,e){super(),this.mapConfigService=t,this.timeRangeService=e,this.selectedTimeRange$=new _e.a,this.minDate=new Date(2019,5,1),this.maxDate=new Date,this.availableTimeRanges=tI}ngOnInit(){this.subscriptions.push(this.timeRangeService.timeRange$.subscribe(t=>{this.displayedTimeRange=t})),this.maxDateRefresherTimer=window.setInterval(()=>{this.maxDate=new Date},6e4)}ngOnDestroy(){super.ngOnDestroy(),clearInterval(this.maxDateRefresherTimer)}selectTimeRange(t){t.isCustom?(this.customRangeStart=new Date(1e3*this.displayedTimeRange.start),this.customRangeEnd=new Date(1e3*this.displayedTimeRange.end),this.calendarMenu.openMenu()):this.timeRangeService.updateTimeRange(t),this.select.writeValue(null)}openSelect(){this.select.open()}applyCustomTimeRange(t,e){this.timeRangeService.setCustom(Math.floor(t.getTime()/1e3),Math.floor(e.getTime()/1e3)),this.calendarMenu.closeMenu()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(hI),r.Pb(yT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-timerange-control"]],viewQuery:function(t,e){if(1&t&&(r.Pc(Vg,3),r.Pc(sU,3)),2&t){let t;r.vc(t=r.dc())&&(e.select=t.first),r.vc(t=r.dc())&&(e.calendarMenu=t.first)}},features:[r.Ab],decls:44,vars:31,consts:[["mat-button","","title","Remonter dans le temps",3,"click"],["mat-button","","title","\xc9tendre la p\xe9riode",3,"click"],["mat-button","",3,"title","click"],[1,"timerange-control__time-icon"],[3,"ngIf"],[1,"hidden",3,"selectionChange"],["select",""],[3,"value","title",4,"ngFor","ngForOf"],[1,"u-wide-menu"],["calendarMenu","matMenu"],[1,"d-flex-column-center","pa-2",3,"click"],["customRangeForm","ngForm"],[1,"mr-2"],["matInput","","name","start","placeholder","D\xe9but",3,"matDatepicker","ngModel","min","max","ngModelChange"],["matSuffix","",3,"for"],["picker1",""],["matInput","","name","end","placeholder","Fin",3,"matDatepicker","ngModel","min","max","ngModelChange"],["picker2",""],["mat-raised-button","","color","primary","title","Appliquer cette p\xe9riode",3,"disabled","click"],[1,"hidden",3,"matMenuTriggerFor"],["mat-button","","title","Avancer dans le temps",3,"click"],[3,"value","title"]],template:function(t,e){if(1&t&&(r.Vb(0,"button",0),r.cc("click",function(){return e.timeRangeService.goBackward()}),r.Vb(1,"mat-icon"),r.Kc(2,"chevron_left"),r.Ub(),r.Kc(3),r.hc(4,"timePeriod"),r.Ub(),r.Vb(5,"button",1),r.cc("click",function(){return e.timeRangeService.extendBackward()}),r.Vb(6,"mat-icon"),r.Kc(7,"skip_previous"),r.Ub(),r.Ub(),r.Vb(8,"button",2),r.cc("click",function(){return e.openSelect()}),r.hc(9,"date"),r.hc(10,"date"),r.Vb(11,"mat-icon",3),r.Kc(12,"timelapse"),r.Ub(),r.Ic(13,x6,6,10,"ng-template",4),r.Ic(14,C6,1,1,"ng-template",4),r.Ub(),r.Vb(15,"mat-select",5,6),r.cc("selectionChange",function(t){return e.selectTimeRange(t.value)}),r.Ic(17,S6,2,3,"mat-option",7),r.Ub(),r.Vb(18,"mat-menu",8,9),r.Vb(20,"div",10),r.cc("click",function(t){return t.stopPropagation()}),r.Vb(21,"ng-form",null,11),r.Vb(23,"mat-form-field",12),r.Vb(24,"input",13),r.cc("ngModelChange",function(t){return e.customRangeStart=t}),r.Ub(),r.Qb(25,"mat-datepicker-toggle",14),r.Qb(26,"mat-datepicker",null,15),r.Ub(),r.Vb(28,"mat-form-field"),r.Vb(29,"input",16),r.cc("ngModelChange",function(t){return e.customRangeEnd=t}),r.Ub(),r.Qb(30,"mat-datepicker-toggle",14),r.Qb(31,"mat-datepicker",null,17),r.Ub(),r.Ub(),r.Vb(33,"button",18),r.cc("click",function(){return e.applyCustomTimeRange(e.customRangeStart,e.customRangeEnd)}),r.Kc(34," Appliquer "),r.Ub(),r.Ub(),r.Ub(),r.Qb(35,"div",19),r.Vb(36,"button",1),r.cc("click",function(){return e.timeRangeService.extendForward()}),r.Vb(37,"mat-icon"),r.Kc(38,"skip_next"),r.Ub(),r.Ub(),r.Vb(39,"button",20),r.cc("click",function(){return e.timeRangeService.goForward()}),r.Kc(40),r.hc(41,"timePeriod"),r.Vb(42,"mat-icon"),r.Kc(43,"chevron_right"),r.Ub(),r.Ub()),2&t){const t=r.wc(19),i=r.wc(22),n=r.wc(27),s=r.wc(32);r.Db(3),r.Mc(" - ",r.ic(4,19,e.displayedTimeRange.value/2),"\n"),r.Db(5),r.qc("title","",r.kc(9,21,1e3*e.displayedTimeRange.start,"yyyy-MM-dd HH:mm:ss z",e.mapConfigService.useUTCDates$.value&&"z")," -> ",r.kc(10,25,1e3*e.displayedTimeRange.end,"yyyy-MM-dd HH:mm:ss z",e.mapConfigService.useUTCDates$.value&&"z"),""),r.Db(5),r.nc("ngIf",e.displayedTimeRange.isCustom),r.Db(1),r.nc("ngIf",!e.displayedTimeRange.isCustom),r.Db(3),r.nc("ngForOf",e.availableTimeRanges),r.Db(7),r.nc("matDatepicker",n)("ngModel",e.customRangeStart)("min",e.minDate)("max",e.maxDate),r.Db(1),r.nc("for",n),r.Db(4),r.nc("matDatepicker",s)("ngModel",e.customRangeEnd)("min",e.minDate)("max",e.maxDate),r.Db(1),r.nc("for",s),r.Db(3),r.nc("disabled",!i.form.valid),r.Db(2),r.nc("matMenuTriggerFor",t),r.Db(5),r.Mc(" + ",r.ic(41,29,e.displayedTimeRange.value/2)," ")}},directives:[Dl,Yp,ut,Vg,ct,eU,oh,_u,Ou,Ld,ac,Vc,uh,Bd,fu,Pd,sU,bl],pipes:[w6,kt],styles:[".timerange-control__time-icon[_ngcontent-%COMP%]{font-size:18px;height:18px;line-height:16px}.hidden[_ngcontent-%COMP%]{display:inline-block;width:0;visibility:hidden}"]}),t})(),E6=(()=>{class t extends LT{constructor(t,e,i){super(),this.mapService=t,this.shipsService=e,this.zonesLayerService=i,this.shipsInViewCount=0,this.shipsCount=0,this.h3indexes=""}ngOnInit(){this.subscriptions.push(Hg([this.shipsService.shipsInView$,this.shipsService.shipsCount$]).pipe(wm(500)).subscribe(([t,e])=>{this.shipsInViewCount=t.length,this.shipsCount=e}))}importZone(){const t=this.h3indexes.split(",");this.zonesLayerService.updateZones([...this.zonesLayerService.zones$.value,{name:`DEBUG ${this.zonesLayerService.zones$.value.length+1}`,h3indexes:t}]),this.mapService.fitOn(wP(t)),this.h3indexes=""}clearZones(){this.zonesLayerService.clear()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(pI),r.Pb(wT),r.Pb(DT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-debug-infos"]],features:[r.Ab],decls:10,vars:3,consts:[[1,"pa-2","mt05em"],["type","text","placeholder","h3index,h3index...","title","Saisir une liste d'hexagones s\xe9par\xe9s par des virgules",3,"ngModel","ngModelChange"],["mat-button","","title","Importer une liste d'hexagones",3,"disabled","click"],["mat-button","","title","Nettoyer les zones affich\xe9es",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div"),r.Kc(2),r.Ub(),r.Vb(3,"div"),r.Vb(4,"input",1),r.cc("ngModelChange",function(t){return e.h3indexes=t}),r.Ub(),r.Vb(5,"button",2),r.cc("click",function(){return e.importZone()}),r.Kc(6," Importer "),r.Ub(),r.Vb(7,"button",3),r.cc("click",function(){return e.clearZones()}),r.Vb(8,"mat-icon"),r.Kc(9,"clear"),r.Ub(),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(2),r.Mc("# ships : ",e.shipsCount,""),r.Db(2),r.nc("ngModel",e.h3indexes),r.Db(1),r.nc("disabled",""===e.h3indexes))},directives:[ac,Vc,uh,Dl,Yp],styles:[""]}),t})(),D6=(()=>{class t{constructor(t){this.mapService=t}zoomIn(){this.mapService.zoomByDelta(1)}zoomOut(){this.mapService.zoomByDelta(-1)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(pI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-zoom-control"]],decls:5,vars:0,consts:[["mat-button","","title","Zoomer",1,"zoom-control-button","toolbar__button",3,"click"],[1,"toolbar__v-divider"],["mat-button","","title","D\xe9zoomer",1,"zoom-control-button","toolbar__button",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"button",0),r.cc("click",function(){return e.zoomIn()}),r.Kc(1,"+"),r.Ub(),r.Qb(2,"mat-divider",1),r.Vb(3,"button",2),r.cc("click",function(){return e.zoomOut()}),r.Kc(4,"\u2212"),r.Ub())},directives:[Dl,GT],styles:[".zoom-control-button[_ngcontent-%COMP%]{font-size:32px;font-weight:300}"],changeDetection:0}),t})();function I6(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",4),r.cc("click",function(){return r.Ac(t),r.gc().locatePosition()}),r.Vb(1,"mat-icon"),r.Kc(2,"center_focus_strong"),r.Ub(),r.Ub(),r.Qb(3,"mat-divider",5)}if(2&t){const t=r.gc();r.nc("disabled",!!t.retrievalError)}}function P6(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",6),r.cc("click",function(){return r.Ac(t),r.gc().toggleGeolocation()}),r.Vb(1,"mat-icon"),r.Kc(2,"gps_fixed"),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.nc("color",t.retrievalError?"warn":"primary")("title","server"!==t.source||t.serverURL?"Localisation active. Cliquer pour d\xe9sactiver la g\xe9olocalisation.":"L'URL de r\xe9cup\xe9ration n'a pas \xe9t\xe9 configur\xe9e. Allez dans `Param\xe8tres > G\xe9olocalisation` pour la configurer.")("disabled","server"===t.source&&!t.serverURL)}}function O6(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",7),r.cc("click",function(){return r.Ac(t),r.gc().toggleGeolocation()}),r.Vb(1,"mat-icon"),r.Kc(2,"gps_off"),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.nc("title","server"!==t.source||t.serverURL?"Localisation d\xe9sactiv\xe9e. Cliquer pour activer la g\xe9olocalisation.":"L'URL de r\xe9cup\xe9ration n'a pas \xe9t\xe9 configur\xe9e. Allez dans `Param\xe8tres > G\xe9olocalisation` pour la configurer.")("disabled","server"===t.source&&!t.serverURL)}}function M6(t,e){if(1&t&&(r.Vb(0,"div",8),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Mc(" ",t.retrievalError,"\n")}}let T6=(()=>{class t extends LT{constructor(t,e){super(),this.geolocationService=t,this.mapService=e}ngOnInit(){this.subscriptions.push(this.geolocationService.enable$.subscribe(t=>{this.enable=t}),this.geolocationService.fixedLocation$.subscribe(t=>{this.fixedLocation=t}),this.geolocationService.serverURL$.subscribe(t=>{this.serverURL=t}),this.geolocationService.source$.subscribe(t=>{this.source=t}),this.geolocationService.retrievalError$.subscribe(t=>{this.retrievalError=t}))}toggleGeolocation(){this.geolocationService.updateEnable(!this.geolocationService.enable$.value),this.geolocationService.validConfiguration$.value&&this.geolocationService.location$.pipe(Gg(1),He(t=>!!t),Rv()).subscribe(t=>{this.mapService.locate([t.lon,t.lat])})}locatePosition(){const t=this.geolocationService.location$.value;t&&this.mapService.locate([t.lon,t.lat])}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(n$),r.Pb(pI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-geolocation-control"]],features:[r.Ab],decls:4,vars:4,consts:[[3,"ngIf"],["mat-button","","class","toolbar__button",3,"color","title","disabled","click",4,"ngIf"],["mat-button","","class","toolbar__button",3,"title","disabled","click",4,"ngIf"],["class","geolocation-error",4,"ngIf"],["mat-button","","title","Centrer la carte sur la position",1,"toolbar__button",3,"disabled","click"],[1,"toolbar__v-divider"],["mat-button","",1,"toolbar__button",3,"color","title","disabled","click"],["mat-button","",1,"toolbar__button",3,"title","disabled","click"],[1,"geolocation-error"]],template:function(t,e){1&t&&(r.Ic(0,I6,4,1,"ng-template",0),r.Ic(1,P6,3,3,"button",1),r.Ic(2,O6,3,2,"button",2),r.Ic(3,M6,2,1,"div",3)),2&t&&(r.nc("ngIf",e.enable&&("browser"===e.source||"server"===e.source&&e.serverURL||"fixed_location"===e.source&&e.fixedLocation)),r.Db(1),r.nc("ngIf",e.enable),r.Db(1),r.nc("ngIf",!e.enable),r.Db(1),r.nc("ngIf",e.retrievalError))},directives:[ut,Dl,Yp,GT],styles:["[_nghost-%COMP%]{position:relative}.geolocation-error[_ngcontent-%COMP%]{position:absolute;right:48px;bottom:0;width:-webkit-max-content;width:-moz-max-content;width:max-content;font-size:.8em;color:#dc1818}"]}),t})();function R6(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",3),r.cc("click",function(){return r.Ac(t),r.gc().toggleBearing()}),r.Vb(1,"mat-icon",4),r.Kc(2),r.Ub(),r.Kc(3),r.Ub(),r.Vb(4,"span",2),r.Kc(5,"-"),r.Ub()}if(2&t){const t=r.gc();r.nc("title",t.usingBearingCoordinates?"Affichage en gisements (cliquer pour basculer l'affichage en azimuts)":"Affichage en azimuts (cliquer pour basculer l'affichage en gisements)")("disabled",!t.validBearingConfiguration),r.Db(2),r.Lc(t.usingBearingCoordinates?"near_me":"navigation"),r.Db(1),r.Mc(" ",t.azimuthCoordinates," ")}}let V6=(()=>{class t extends LT{constructor(t,e,i){super(),this.ngZone=t,this.changeDetectionRef=e,this.geolocationLayerService=i,this.lonLatCoordinates="0\xb0 0' 0\" N 0\xb0 0' 0\" W",this.azimuthCoordinates="",this.gpsLocation=null,this.validBearingConfiguration=!1,this.showBearing=!1,this.usingBearingCoordinates=!1}ngOnInit(){this.ensureMandatoryInputParams("map"),this.changeDetectionRef.detach(),this.subscriptions.push(Hg([this.geolocationLayerService.validConfiguration$,this.geolocationLayerService.showBearing$,this.geolocationLayerService.location$]).subscribe(([t,e,i])=>{i&&(this.gpsLocation=t?sE([i.lon,i.lat]):null,this.showBearing=e,this.refreshAzimuth(),this.changeDetectionRef.detectChanges())}));const t=this.map.getViewport();this.ngZone.runOutsideAngular(()=>{this.subscriptions.push(Object(or.a)(en(t,"mousemove"),en(t,"touchstart")).pipe(He(t=>!t.grabbing),wm(66,Le,{leading:!1,trailing:!0})).subscribe(t=>{this.handleMouseMove(t)}))}),this.changeDetectionRef.detectChanges()}handleMouseMove(t){const e=this.map.getEventCoordinate(t);e&&(this.cursorCoordinates=e,this.lonLatCoordinates=Yk(oE(this.cursorCoordinates)),this.refreshAzimuth(),this.changeDetectionRef.detectChanges())}refreshAzimuth(){this.gpsLocation&&this.cursorCoordinates&&(this.validBearingConfiguration=-1!==this.geolocationLayerService.headingAngle$.value,this.usingBearingCoordinates=this.showBearing&&this.validBearingConfiguration,this.azimuthCoordinates=this.usingBearingCoordinates?function(t,e,i){let n=(i$(e[0]-t[0],e[1]-t[1])-i)%360;return n>180&&(n-=360),n<=-180&&(n+=360),`${n}\xb0 ${t$(new kH([t,e]))}`}(this.gpsLocation,this.cursorCoordinates,this.geolocationLayerService.headingAngle$.value):e$(this.gpsLocation,this.cursorCoordinates))}toggleBearing(){this.geolocationLayerService.toggleShowBearing()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.B),r.Pb(r.h),r.Pb(n$))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-mouse-position-control"]],inputs:{map:"map"},features:[r.Ab],decls:5,vars:2,consts:[[3,"ngIf"],[1,"mouse-position-control"],[1,"mx-1"],["mat-button","",1,"mouse-position-control","mouse-position-control--button",3,"title","disabled","click"],[1,"icon-button"]],template:function(t,e){1&t&&(r.Ic(0,R6,6,4,"ng-template",0),r.Vb(1,"span",1),r.Kc(2),r.Ub(),r.Vb(3,"span",2),r.Kc(4,"-"),r.Ub()),2&t&&(r.nc("ngIf",e.gpsLocation),r.Db(2),r.Mc(" ",e.lonLatCoordinates,"\n"))},directives:[ut,Dl,Yp],styles:["[_nghost-%COMP%]{display:inline-flex;align-items:center}.mouse-position-control[_ngcontent-%COMP%]{display:inline-block;font-size:14px;padding-left:4px;padding-right:4px}.mouse-position-control--button[_ngcontent-%COMP%]{line-height:normal;font-weight:400;padding-left:0}.mouse-position-control--button[disabled][_ngcontent-%COMP%]{color:inherit}.icon-button[_ngcontent-%COMP%]{font-size:1.4em;line-height:1.4em}"]}),t})();const F6=["scale"],L6=[1,2,5];let U6=(()=>{class t extends LT{constructor(t,e,i){super(),this.changeDetectorRef=t,this.mapService=e,this.mapConfigService=i,this.show=!1,this.hexagonsResolution=0}ngOnInit(){this.changeDetectorRef.detach(),this.subscriptions.push(this.mapService.view$.pipe(Gg(1),Be(300)).subscribe(t=>{this.updateScale(t),this.hexagonsResolution=(this.mapConfigService.highHexagonsResolution$.value?OY:MY)[Math.round(t.zoom)],this.changeDetectorRef.detectChanges()}))}updateScale(t){let e=iE(t.projection,t.resolution,t.center,ck.METERS),i="";64*e<1e3?i="m":(i="Nq",e/=1852);let n,r,s=3*Math.floor(Math.log(64*e)/Math.log(10));for(;;){if(n=L6[(s%3+3)%3]*Math.pow(10,Math.floor(s/3)),r=Math.round(n/e),isNaN(r))return void(this.show=!1);if(r>=64)break;++s}this.scaleElement.nativeElement.style.width=`${r}px`,this.scaleValue=`${n} ${i}`,this.show=!0}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(pI),r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-scaleline-control"]],viewQuery:function(t,e){if(1&t&&r.Pc(F6,3),2&t){let t;r.vc(t=r.dc())&&(e.scaleElement=t.first)}},features:[r.Ab],decls:7,vars:4,consts:[[1,"scaleline-control"],[1,"scaleline-control__infos"],[1,"scaleline-control__scale"],[1,"scaleline-control__scale-inner"],["scale",""]],template:function(t,e){1&t&&(r.Vb(0,"span",0),r.Vb(1,"span",1),r.Kc(2),r.Ub(),r.Vb(3,"span",2),r.Vb(4,"div",3,4),r.Kc(6),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Hb("scaleline-control--hide",!e.show),r.Db(2),r.Mc(" H3 (Res ",e.hexagonsResolution,") "),r.Db(4),r.Lc(e.scaleValue))},styles:[".scaleline-control{display:inline-block;font-size:.75em;padding-left:4px;padding-right:4px}.scaleline-control__scale{display:inline-block;margin:4px;border:2px solid grey;border-top:0}.scaleline-control__scale-inner{display:inline-block;text-align:center;will-change:contents,width}"],encapsulation:2}),t})(),B6=(()=>{class t extends LT{constructor(t,e,i){super(),this.changeDetectorRef=t,this.domSanitizer=e,this.mapConfigService=i}ngOnInit(){this.changeDetectorRef.detach(),this.subscriptions.push(this.mapConfigService.baseLayer$.subscribe(t=>{this.attributions=this.domSanitizer.bypassSecurityTrustHtml(t.source.getAttributions()()),this.changeDetectorRef.detectChanges()}))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(ne),r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-attributions-control"]],features:[r.Ab],decls:1,vars:1,consts:[[1,"attributions-control",3,"innerHTML"]],template:function(t,e){1&t&&r.Qb(0,"span",0),2&t&&r.nc("innerHTML",e.attributions,r.Bc)},styles:[".attributions-control[_ngcontent-%COMP%]{display:inline-block;font-size:.75em;padding:4px}"]}),t})();function N6(t,e){if(1&t&&(r.Vb(0,"span",3),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.Fc("color",t.textColor),r.nc("title","AIS : "+t.aisTypes.join(" | ")),r.Db(1),r.Lc(t.label)}}function j6(t,e){if(1&t&&r.Ic(0,N6,2,4,"span",2),2&t){const t=r.gc();r.nc("ngForOf",t.shipTypes)}}function z6(t,e){if(1&t&&(r.Vb(0,"span"),r.Kc(1),r.Ub()),2&t){const t=r.gc(2);r.Fc("color",t.highlightThresholdsColors.middle),r.Db(1),r.Mc("",t.highlightThresholdsStepLabelByValue[t.mapConfigService.shipFilter$.value.minimumTimestampThreshold]," \u21d2\xa0")}}function H6(t,e){1&t&&(r.Vb(0,"div",8),r.Vb(1,"mat-icon",9),r.Kc(2,"warning"),r.Ub(),r.Kc(3," Aucun filtre n'a \xe9t\xe9 s\xe9lectionn\xe9. "),r.Ub())}function K6(t,e){if(1&t&&(r.Vb(0,"span",3),r.Vb(1,"b"),r.Kc(2,"R\xe8gles :"),r.Ub(),r.Kc(3),r.Ub()),2&t){const t=r.gc(2);r.nc("title",t.searchedAlertRulesNames.join(", ")),r.Db(3),r.Mc(" ",t.searchedAlertRulesNames.length>3?t.searchedAlertRulesNames.length+" r\xe8gles":t.searchedAlertRulesNames.join(", "),"")}}function $6(t,e){if(1&t&&(r.Vb(0,"span",3),r.Vb(1,"b"),r.Kc(2,"\xc9v\xe9nements :"),r.Ub(),r.Kc(3),r.Ub()),2&t){const t=r.gc(2);r.nc("title",t.searchedEventTypesNames.join(", ")),r.Db(3),r.Mc(" ",t.searchedEventTypesNames.length>3?t.searchedEventTypesNames.length+" \xe9v\xe9nements":t.searchedEventTypesNames.join(", "),"")}}function G6(t,e){if(1&t&&(r.Vb(0,"div",4),r.Vb(1,"span"),r.Kc(2,"6 mois \u21d2\xa0"),r.Ub(),r.Ic(3,z6,2,3,"span",5),r.Vb(4,"span"),r.Kc(5),r.Ub(),r.Ub(),r.Vb(6,"div"),r.Ic(7,H6,4,0,"div",6),r.Ic(8,K6,4,2,"span",7),r.Ic(9,$6,4,2,"span",7),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Fc("color",t.highlightThresholdsColors.left),r.Db(2),r.nc("ngIf",t.mapConfigService.shipFilter$.value.minimumTimestampThreshold!==t.mapConfigService.shipFilter$.value.importantTimestampThreshold),r.Db(1),r.Fc("color",t.highlightThresholdsColors.right),r.Db(1),r.Mc("",t.highlightThresholdsStepLabelByValue[t.mapConfigService.shipFilter$.value.importantTimestampThreshold]," \u21d2 Pr\xe9sent"),r.Db(2),r.nc("ngIf",t.mapConfigService.shipFilter$.value.isMissingColorFilterConfiguration),r.Db(1),r.nc("ngIf",t.searchedAlertRulesNames.length>0),r.Db(1),r.nc("ngIf",t.searchedEventTypesNames.length>0)}}let W6=(()=>{class t extends LT{constructor(t,e,i){super(),this.changeDetectorRef=t,this.alertRulesService=e,this.mapConfigService=i,this.alertRules=[],this.shipTypes=qO,this.searchedAlertRulesNames=[],this.searchedEventTypesNames=[],this.highlightThresholdsStepLabelByValue=vD,this.highlightThresholdsColors=_D,this.visibilityThresholdsStepLabelByValue=wD,this.visibilityThresholdsColors=xD}ngOnInit(){this.changeDetectorRef.detach(),this.subscriptions.push(this.alertRulesService.alertRules$.subscribe(t=>{this.alertRules=t,this.changeDetectorRef.detectChanges()})),this.subscriptions.push(this.mapConfigService.shipFilter$.subscribe(t=>{this.searchedAlertRulesNames=t.alertRules.map(t=>{var e;return null===(e=this.alertRules.find(e=>e.id===t))||void 0===e?void 0:e.name}).filter(t=>!!t),this.searchedEventTypesNames=t.eventTypes.map(t=>FP[t]),this.changeDetectorRef.detectChanges()}))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(DP),r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-ships-legend"]],features:[r.Ab],decls:3,vars:2,consts:[["src","/assets/images/ship.png","alt","Navire","title","Navires",1,"ships-legend__ship-icon"],[3,"ngIf"],["class","ships-legend",3,"color","title",4,"ngFor","ngForOf"],[1,"ships-legend",3,"title"],[1,"ships-legend"],[3,"color",4,"ngIf"],["class","ships-legend d-flex-center ships-legend__warning-icon",4,"ngIf"],["class","ships-legend",3,"title",4,"ngIf"],[1,"ships-legend","d-flex-center","ships-legend__warning-icon"],[1,"mr-1"]],template:function(t,e){1&t&&(r.Qb(0,"img",0),r.Ic(1,j6,1,1,"ng-template",1),r.Ic(2,G6,10,9,"ng-template",1)),2&t&&(r.Db(1),r.nc("ngIf",e.mapConfigService.shipFilter$.value.colorModeShipType),r.Db(1),r.nc("ngIf",!e.mapConfigService.shipFilter$.value.colorModeShipType))},directives:[ut,ct,Yp],styles:["[_nghost-%COMP%]{display:flex;align-items:center}.ships-legend[_ngcontent-%COMP%]{display:inline-block;font-size:.7em;margin:0 .5em;line-height:2em}.ships-legend__warning-icon[_ngcontent-%COMP%]{color:#e41010}.ships-legend__warning-icon[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{height:1em;font-size:1.5em}.ships-legend__ship-icon[_ngcontent-%COMP%]{height:1em}"]}),t})();function Z6(t,e){1&t&&r.Qb(0,"mat-spinner",14)}function q6(t,e){1&t&&r.Qb(0,"app-debug-infos",15)}function Y6(t,e){if(1&t&&(r.Vb(0,"div",9),r.Vb(1,"div",10),r.Ic(2,Z6,1,0,"mat-spinner",11),r.Qb(3,"app-topbar-control"),r.Ub(),r.Qb(4,"app-health-banner"),r.Vb(5,"div",12),r.hc(6,"async"),r.Qb(7,"app-timerange-control"),r.Ub(),r.Ic(8,q6,1,0,"app-debug-infos",13),r.Ub()),2&t){const t=r.gc();r.Db(2),r.nc("ngIf",t.showRequestSpinner),r.Db(3),r.Hb("map-controls__topsubbar--visible",r.ic(6,4,t.showTimeRangeControl$)),r.Db(3),r.nc("ngIf",t.configService.devMode)}}function Q6(t,e){if(1&t&&(r.Vb(0,"app-glitter",20),r.Vb(1,"button",21),r.Vb(2,"mat-icon"),r.Kc(3,"refresh"),r.Ub(),r.Ub(),r.Ub()),2&t){const t=r.gc(3);r.Db(1),r.nc("app-async-action",t.fetchData)("disabled",!t.mapConfigService.showShipsLayer$.value&&!t.mapConfigService.showAircraftsLayer$.value)}}function X6(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",22),r.cc("click",function(){return r.Ac(t),r.gc(3).refreshTimerService.togglePause()}),r.Vb(1,"mat-icon"),r.Kc(2),r.Ub(),r.Ub()}if(2&t){const t=r.gc(3);r.oc("title",t.refreshTimerService.pause$.value?"Reprendre le flux":"Mettre en pause le flux"),r.Db(2),r.Lc(t.refreshTimerService.pause$.value?"play_arrow":"pause")}}function J6(t,e){if(1&t){const t=r.Wb();r.Qb(0,"mat-divider",23),r.Vb(1,"button",24),r.cc("click",function(){return r.Ac(t),r.gc(3).historyService.setTimestampToNow()}),r.Vb(2,"mat-icon"),r.Kc(3,"history"),r.Ub(),r.Ub()}}function t7(t,e){if(1&t&&(r.Vb(0,"div",10),r.Ic(1,Q6,4,2,"ng-template",4),r.hc(2,"async"),r.Ic(3,X6,3,2,"ng-template",4),r.hc(4,"async"),r.Ic(5,J6,4,0,"ng-template",4),r.hc(6,"async"),r.Ub()),2&t){const t=r.gc(2);r.Db(1),r.nc("ngIf",!0===r.ic(2,3,t.mapConfigService.manualMapFetch$)),r.Db(2),r.nc("ngIf",!1===r.ic(4,5,t.mapConfigService.manualMapFetch$)),r.Db(2),r.nc("ngIf",0===r.ic(6,7,t.historyService.timestamp$))}}function e7(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",25),r.Vb(1,"button",7),r.cc("click",function(){return r.Ac(t),r.gc(3).toggleChatwootDialog()}),r.Vb(2,"mat-icon",26),r.Kc(3,"contact_support"),r.Ub(),r.Ub(),r.Ub(),r.Qb(4,"div",8)}if(2&t){const t=r.gc(3);r.Db(1),r.nc("title",t.chatService.dialogActive?"Fermer le chat":"Ouvrir le chat"),r.Db(1),r.nc("color",t.chatService.dialogActive?"primary":"grey")}}function i7(t,e){if(1&t&&r.Ic(0,e7,5,2,"ng-template",4),2&t){const t=r.gc(2);r.nc("ngIf",t.chatService.enabled)}}function n7(t,e){if(1&t&&(r.Ic(0,t7,7,9,"div",16),r.hc(1,"async"),r.Qb(2,"div",8),r.Vb(3,"div",17),r.Qb(4,"app-zoom-control"),r.Ub(),r.Qb(5,"div",8),r.Vb(6,"div",18),r.Qb(7,"app-geolocation-control"),r.Ub(),r.Qb(8,"div",8),r.Ic(9,i7,1,1,void 0,19),r.hc(10,"async")),2&t){const t=r.gc();r.nc("ngIf",!1===r.ic(1,2,t.uiService.drawingMode$)),r.Db(9),r.nc("ngIf",!1===r.ic(10,4,t.screenshotService.screenshotMode$))}}function r7(t,e){if(1&t&&(r.Vb(0,"span",34),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.Fc("color",t.color),r.Db(1),r.Lc(t.label)}}function s7(t,e){if(1&t&&(r.Vb(0,"div",31),r.Qb(1,"span",32),r.Ic(2,r7,2,3,"span",33),r.Ub()),2&t){const t=r.gc(2);r.Db(2),r.nc("ngForOf",t.eventCategories)}}function o7(t,e){if(1&t&&(r.Vb(0,"div",10),r.Qb(1,"app-mouse-position-control",27),r.Qb(2,"app-scaleline-control",28),r.Qb(3,"app-attributions-control"),r.Ub(),r.Vb(4,"div",29),r.Qb(5,"app-ships-legend"),r.Ub(),r.Ic(6,s7,3,1,"div",30),r.hc(7,"async")),2&t){const t=r.gc();r.Db(1),r.nc("map",t.map),r.Db(5),r.nc("ngIf",r.ic(7,2,t.showEventsLegend$))}}let a7=(()=>{class t extends LT{constructor(t,e,i,n,r,s,o,a,l,c,h,u,d,p,f,m){super(),this.ngZone=t,this.alertRulesService=e,this.chatService=i,this.configService=n,this.fleetsService=r,this.historyService=s,this.mapConfigService=o,this.mapRestrictionService=a,this.measureService=l,this.refreshTimerService=c,this.routeService=h,this.selectionService=u,this.screenshotService=d,this.simpleViewService=p,this.uiService=f,this.workerService=m,this.showRequestSpinner=!1,this.eventCategories=RP,this.fetchData=()=>Object(ue.a)(this,void 0,void 0,function*(){yield this.simpleViewService.fetchData()})}ngOnInit(){this.subscriptions.push(this.workerService.inflightRequests$.pipe(wm(1e3,Le,{leading:!1,trailing:!0})).subscribe(t=>{this.ngZone.run(()=>{this.showRequestSpinner=t})})),this.showEventsLegend$=this.selectionService.entities$.pipe(Object(Ge.a)(t=>t.length>0)),this.showTimeRangeControl$=Hg([this.alertRulesService.selectedAlertRule$,this.fleetsService.selectedFleet$,this.selectionService.entities$.pipe(Object(Ge.a)(t=>t.some(t=>t.type===OP.Ship))),this.routeService.route$]).pipe(Object(Ge.a)(([t,e,i,n])=>(null!==t||null!==e||i||"/alerts/dashboard"===n)&&!["/statistics","/zones"].includes(n)),mn())}toggleChatwootDialog(){return Object(ue.a)(this,void 0,void 0,function*(){yield this.chatService.toggleChat()})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.B),r.Pb(DP),r.Pb(j4),r.Pb(cI),r.Pb(OT),r.Pb(bI),r.Pb(hI),r.Pb(RK),r.Pb(WP),r.Pb(_T),r.Pb(vI),r.Pb(xT),r.Pb(z4),r.Pb(H4),r.Pb(VI),r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-map-controls"]],inputs:{map:"map"},features:[r.Ab],decls:19,vars:17,consts:[[1,"map-controls"],["class","map-controls__top-controls",4,"ngIf"],[1,"map-controls__right-controls"],[1,"map-controls__right-bars"],[3,"ngIf"],["joyrideStep","screenshot-button","title","Prendre des captures d'\xe9cran","text","Ce bouton permet de masquer la plupart des \xe9l\xe9ments de la page afin de r\xe9aliser des captures d'\xe9cran.","stepPosition","left",1,"map-controls__bar"],["gid","button-screenshot","date","2021-01-22"],["mat-button","",1,"toolbar__button",3,"title","click"],[1,"map-controls__spacer"],[1,"map-controls__top-controls"],[1,"map-controls__bar"],["class","map-controls__request-spinner","strokeWidth","3","diameter","30",4,"ngIf"],[1,"map-controls__bar","mt05em","map-controls__topsubbar"],["class","map-controls__bar mt05em",4,"ngIf"],["strokeWidth","3","diameter","30",1,"map-controls__request-spinner"],[1,"map-controls__bar","mt05em"],["class","map-controls__bar",4,"ngIf"],["joyrideStep","zoom-buttons","title","Zoom","text","Ces boutons servent \xe0 zoomer ou d\xe9zoomer la carte, en plus de la molette de la souris.","stepPosition","left",1,"map-controls__bar"],["joyrideStep","geolocation-buttons","title","G\xe9olocalisation","text","Ce bouton permet d'afficher une position temps-r\xe9el \xe0 partir d'une source de donn\xe9e locale. Voir la page Param\xe8tres pour la configuration.","stepPosition","left",1,"map-controls__bar"],[4,"ngIf"],["gid","button-manualmapfetch","date","2020-11-17"],["mat-button","","title","Rafra\xeechir les pistes pour cette vue",1,"toolbar__button",3,"app-async-action","disabled"],["mat-button","","joyrideStep","pause-button","title","Pause","text","Ce bouton permet de d\xe9sactiver le rafraichissement automatique des navires.","stepPosition","left",1,"toolbar__button",3,"title","click"],[1,"toolbar__v-divider"],["mat-button","","title","Entrer dans le mode historique","joyrideStep","history-button","title","Mode historique","text","Ce bouton permet de basculer en mode historique afin de visualiser une situation maritime pass\xe9e.","stepPosition","left",1,"toolbar__button",3,"click"],["joyrideStep","chat-button","title","Dialoguer avec l'\xe9quipe ANAIS","text","Ce bouton permet de dialoguer avec les membres de l'\xe9quipe ANAIS par tchat. Vous pouvez utiliser ce tchat quand bon vous semble, si vous rencontrez des erreurs, ou si vous avez des suggestions d'am\xe9lioration.","stepPosition","left",1,"map-controls__bar"],[3,"color"],["joyrideStep","mouse-position-control","title","Position du curseur","text","La position du curseur est indiqu\xe9e ici.","stepPosition","top",3,"map"],["joyrideStep","scaleline-control","title","Echelle de carte","text","L'\xe9chelle de la carte se trouve ici (en nautiques).","stepPosition","top"],["joyrideStep","ships-legend","title","L\xe9gende","text","La l\xe9gende de la carte est indiqu\xe9e ici. Elle est mise \xe0 jour automatiquement en fonction du mode de coloration choisi.","stepPosition","top",1,"map-controls__bar","d-flex-center"],["class","map-controls__bar d-flex-center",4,"ngIf"],[1,"map-controls__bar","d-flex-center"],["title","\xc9v\xe9nements",1,"map-controls__legend-event-icon"],["class","map-controls__map-legend",3,"color",4,"ngFor","ngForOf"],[1,"map-controls__map-legend"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Ic(1,Y6,9,6,"div",1),r.hc(2,"async"),r.hc(3,"async"),r.Vb(4,"div",2),r.Vb(5,"div",3),r.Ic(6,n7,11,6,"ng-template",4),r.hc(7,"async"),r.Vb(8,"div",5),r.Vb(9,"app-glitter",6),r.Vb(10,"button",7),r.cc("click",function(){return e.screenshotService.toggleScreenshotMode()}),r.hc(11,"async"),r.Vb(12,"mat-icon"),r.Kc(13),r.hc(14,"async"),r.Ub(),r.Ub(),r.Ub(),r.Ub(),r.Qb(15,"div",8),r.Ub(),r.Ic(16,o7,8,4,"ng-template",4),r.hc(17,"async"),r.Ub(),r.Qb(18,"app-context-info-bar"),r.Ub()),2&t&&(r.Db(1),r.nc("ngIf",!1===r.ic(2,5,e.uiService.drawingMode$)&&!1===r.ic(3,7,e.screenshotService.screenshotMode$)),r.Db(5),r.nc("ngIf",!1===r.ic(7,9,e.screenshotService.screenshotMode$)),r.Db(4),r.nc("title",!0===r.ic(11,11,e.screenshotService.screenshotMode$)?"Quitter le mode capture d'\xe9cran":"Passer en mode capture d'\xe9cran"),r.Db(3),r.Lc(!0===r.ic(14,13,e.screenshotService.screenshotMode$)?"fullscreen_exit":"fullscreen"),r.Db(3),r.nc("ngIf",!1===r.ic(17,15,e.screenshotService.screenshotMode$)))},directives:[ut,ax,DL,Dl,Yp,l8,v6,y6,k6,fF,E6,D6,T6,dR,GT,V6,U6,B6,W6,ct],pipes:[St],styles:[".map-bar[_ngcontent-%COMP%], .map-controls__bottombar[_ngcontent-%COMP%]{position:absolute;z-index:10;background-color:#fff;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2)}.map-controls[_ngcontent-%COMP%]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.map-controls__request-spinner[_ngcontent-%COMP%]{position:absolute!important;margin-top:5px;left:-50px}.map-controls__top-controls[_ngcontent-%COMP%]{position:absolute;top:.5em;right:.5em;z-index:2;display:flex;flex-direction:column;align-items:flex-end;pointer-events:none;touch-action:none}.map-controls__topsubbar[_ngcontent-%COMP%]{display:flex;transition:all .5s;transform:translateY(-400%);opacity:0;z-index:1}.map-controls__topsubbar--visible[_ngcontent-%COMP%]{transform:translateY(0);opacity:1}.map-controls__bar[_ngcontent-%COMP%]{background-color:#fff;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2);pointer-events:all;touch-action:all}.map-controls__spacer[_ngcontent-%COMP%]{height:.5em;width:.5em}.map-controls__right-controls[_ngcontent-%COMP%]{position:absolute;bottom:0;right:0;z-index:2;display:flex;flex-direction:column;align-items:flex-end;pointer-events:none;touch-action:none}.map-controls__right-bars[_ngcontent-%COMP%]{margin-right:.5em}.map-controls__bottombar[_ngcontent-%COMP%]{position:fixed;bottom:1.5em;left:50%;transform:translateX(-50%) translateY(200%);transition:all .5s;opacity:0}@media (max-width:1820px){.map-controls__bottombar[_ngcontent-%COMP%]{bottom:3.2em}}.map-controls__bottombar--visible[_ngcontent-%COMP%]{opacity:1;transform:translateX(-50%) translateY(0)}.map-controls__map-legend[_ngcontent-%COMP%]{display:inline-block;font-size:.7em;margin:0 .5em;line-height:2em}.map-controls__legend-event-icon[_ngcontent-%COMP%]{height:.7em;width:.7em;border-radius:50%;background-color:#d3d3d3;margin:0 .3em}"]}),t})();const l7=["trigger"],c7=["menu"],h7=["featuresImportInput"];function u7(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",9),r.cc("click",function(){return r.Ac(t),r.gc().annotationsService.cancelEditing()}),r.Kc(1,"Quitter le mode annotation"),r.Ub()}}function d7(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",10),r.cc("click",function(){return r.Ac(t),r.gc().pimService.togglePIMMode()}),r.Kc(1,"Quitter le mode PIM"),r.Ub()}}function p7(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",11),r.cc("click",function(){return r.Ac(t),r.gc().measureService.toggleMeasureMode()}),r.Kc(1,"Quitter le mode mesure"),r.Ub()}}function f7(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",12),r.cc("click",function(){return r.Ac(t),r.gc().pimService.togglePIMMode()}),r.Kc(1,"\xc9valuer PIM piste "),r.Vb(2,"span",13),r.Kc(3,"(p)"),r.Ub(),r.Ub(),r.Vb(4,"button",14),r.cc("click",function(){return r.Ac(t),r.gc().measureService.toggleMeasureMode()}),r.Kc(5,"Mesurer une distance "),r.Vb(6,"span",13),r.Kc(7,"(m)"),r.Ub(),r.Ub(),r.Vb(8,"button",15),r.cc("click",function(){return r.Ac(t),r.gc().setFixedLocation()}),r.Kc(9,"D\xe9finir comme point de r\xe9f\xe9rence"),r.Ub(),r.Vb(10,"button",16),r.cc("click",function(){return r.Ac(t),r.gc().createNewAnnotation()}),r.Kc(11,"Cr\xe9er une annotation ici"),r.Ub(),r.Vb(12,"input",17,18),r.cc("change",function(e){return r.Ac(t),r.gc().onFeaturesImport(e)}),r.Ub(),r.Vb(14,"button",19),r.cc("click",function(){return r.Ac(t),r.gc().triggerImportFeaturesDialog()}),r.Kc(15,"Importer des objets g\xe9ographiques"),r.Ub(),r.Vb(16,"button",20),r.cc("click",function(){return r.Ac(t),r.gc().exportService.exportVisiblePositions()}),r.Kc(17,"Exporter la vue courante en CSV"),r.Ub()}if(2&t){const t=r.gc();r.Db(16),r.nc("disabled",!t.canExportVisiblePositions)}}let m7=(()=>{class t extends LT{constructor(t,e,i,n,r,s,o,a){super(),this.ngZone=t,this.annotationsService=e,this.exportService=i,this.featureImportService=n,this.geolocationService=r,this.mapConfigService=s,this.measureService=o,this.pimService=a,this.isEditingAnnotation=!1,this.isMeasureModeActive=!1,this.isPIMModeActive=!1,this.canExportVisiblePositions=!1,this.onPressEvent=t=>{"touch"===t.pointerType&&this.openMenu(t.srcEvent)},this.openMenu=t=>{const e=t.target;if(("ol-layer"===e.className||"CANVAS"===e.tagName||function(t,e){let i=t;for(;null!==i;){if(e.some(t=>i.classList.contains(t)))return!0;i=i.parentElement}return!1}(e,["cdk-overlay-container","ol-overlaycontainer"]))&&t.preventDefault(),this.trigger.menuOpen){const e=this.menuElement.nativeElement.parentNode.parentNode.parentNode.parentNode;e.style.top=`${t.clientY}px`,"flex-end"===e.style.alignItems?e.style.right=window.innerWidth-t.clientX+"px":e.style.left=`${t.clientX}px`}else{const e=t.target;if("CANVAS"!==e.tagName&&!e.classList.contains("ol-layer"))return;this.triggerElement.nativeElement.style.left=`${t.clientX}px`,this.triggerElement.nativeElement.style.top=`${t.clientY}px`,this.trigger.openMenu()}this.openEvent=t}}ngOnInit(){this.ensureMandatoryInputParams("map"),window.addEventListener("contextmenu",this.openMenu),this.ngZone.runOutsideAngular(()=>{this.hammer=new window.Hammer(this.map.getViewport(),{})}),this.hammer.on("press",this.onPressEvent),this.subscriptions.push(this.annotationsService.editedAnnotation$.pipe(fI(300),Object(Ge.a)(t=>!!t)).subscribe(t=>{this.isEditingAnnotation=t}),this.measureService.active$.pipe(fI(300)).subscribe(t=>{this.isMeasureModeActive=t}),this.pimService.active$.pipe(fI(300)).subscribe(t=>{this.isPIMModeActive=t}),Hg([this.mapConfigService.showShipsLayer$,this.mapConfigService.showAircraftsLayer$]).subscribe(([t,e])=>{this.canExportVisiblePositions=t||e}))}ngOnDestroy(){window.removeEventListener("contextmenu",this.openMenu),this.hammer.off("press",this.onPressEvent),this.hammer.destroy()}setFixedLocation(){const t=this.map.getEventCoordinate(this.openEvent);if(!t)return;const e=rI(oE(t));this.geolocationService.updateFixedLocation(e),this.geolocationService.updateSource(XK.FixedLocation),this.geolocationService.updateEnable(!0)}createNewAnnotation(){const t=this.map.getEventCoordinate(this.openEvent);t&&this.annotationsService.createNewAnnotation({type:"Point",coordinates:oE(t)})}triggerImportFeaturesDialog(){this.featuresImportInput.nativeElement.click()}onFeaturesImport(t){return Object(ue.a)(this,void 0,void 0,function*(){const e=t.target.files||t.dataTransfer.files;e.length&&(this.featureImportService.importEvent$.next({dataTransfer:{files:e}}),t.target.value="")})}onKeyboardEvents(t){if(q4(t))switch(t.key){case"p":this.measureService.active$.value&&this.measureService.toggleMeasureMode(),this.pimService.togglePIMMode();break;case"m":this.pimService.active$.value&&this.pimService.togglePIMMode(),this.measureService.toggleMeasureMode()}}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.B),r.Pb(MP),r.Pb(hX),r.Pb(Q2),r.Pb(n$),r.Pb(hI),r.Pb(WP),r.Pb(KO))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-context-menu"]],viewQuery:function(t,e){if(1&t&&(r.Pc(sU,3),r.Pc(l7,3),r.Pc(c7,3),r.Pc(h7,1)),2&t){let t;r.vc(t=r.dc())&&(e.trigger=t.first),r.vc(t=r.dc())&&(e.triggerElement=t.first),r.vc(t=r.dc())&&(e.menuElement=t.first),r.vc(t=r.dc())&&(e.featuresImportInput=t.first)}},hostBindings:function(t,e){1&t&&r.cc("keyup",function(t){return e.onKeyboardEvents(t)},!1,r.zc)},inputs:{map:"map"},features:[r.Ab],decls:10,vars:5,consts:[[1,"trigger",3,"matMenuTriggerFor"],["trigger",""],[1,"context-menu"],["contextMenu","matMenu"],["menu",""],["mat-menu-item","","title","Quitter le mode annotation",3,"click",4,"ngIf"],["mat-menu-item","","title","Quitter le mode PIM",3,"click",4,"ngIf"],["mat-menu-item","","title","Quitter le mode mesure",3,"click",4,"ngIf"],[3,"ngIf"],["mat-menu-item","","title","Quitter le mode annotation",3,"click"],["mat-menu-item","","title","Quitter le mode PIM",3,"click"],["mat-menu-item","","title","Quitter le mode mesure",3,"click"],["mat-menu-item","","title","\xc9valuer PIM piste",3,"click"],[1,"shortcut"],["mat-menu-item","","title","Mesurer une distance",3,"click"],["mat-menu-item","","title","D\xe9finir comme point de r\xe9f\xe9rence",3,"click"],["mat-menu-item","","title","Cr\xe9er une annotation ici",3,"click"],["type","file","multiple","","accept",".geojson, .kml, .json, .gpx, .igc","hidden","",3,"change"],["featuresImportInput",""],["mat-menu-item","","title","Importer des objets g\xe9ographiques (GeoJSON, KML, TopoJSON, etc)",3,"click"],["mat-menu-item","","title","Exporter les navires et a\xe9ronefs de la vue courante en CSV",3,"disabled","click"]],template:function(t,e){if(1&t&&(r.Qb(0,"span",0,1),r.Vb(2,"mat-menu",2,3),r.Qb(4,"span",null,4),r.Ic(6,u7,2,0,"button",5),r.Ic(7,d7,2,0,"button",6),r.Ic(8,p7,2,0,"button",7),r.Ic(9,f7,18,1,"ng-template",8),r.Ub()),2&t){const t=r.wc(3);r.nc("matMenuTriggerFor",t),r.Db(6),r.nc("ngIf",e.isEditingAnnotation),r.Db(1),r.nc("ngIf",e.isPIMModeActive),r.Db(1),r.nc("ngIf",e.isMeasureModeActive),r.Db(1),r.nc("ngIf",!e.isEditingAnnotation&&!e.isMeasureModeActive&&!e.isPIMModeActive)}},directives:[sU,eU,ut,QL],styles:[".trigger[_ngcontent-%COMP%]{position:fixed}.shortcut[_ngcontent-%COMP%]{color:#919090;margin-left:.5em}"]}),t})();const g7=["drawer"];function A7(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",15),r.Vb(1,"button",16),r.cc("click",function(){return r.Ac(t),r.gc(2).exportTrails()}),r.Kc(2," Exporter les traces "),r.Ub(),r.Ub()}2&t&&r.nc("@fadeAnimation",void 0)}function b7(t,e){if(1&t&&r.Qb(0,"app-entity-selection",17),2&t){const t=e.$implicit;r.nc("@fadeAnimation",void 0)("entitySelection",t)}}function v7(t,e){if(1&t&&(r.Vb(0,"div",12),r.Ic(1,A7,3,1,"div",13),r.hc(2,"async"),r.Ic(3,b7,1,2,"app-entity-selection",14),r.hc(4,"async"),r.Ub()),2&t){const t=r.gc();r.Hb("page__entity-selections--shifted",t.showDrawer),r.Db(1),r.nc("ngIf",r.ic(2,5,t.selectionService.entities$).length>0),r.Db(2),r.nc("ngForOf",r.ic(4,7,t.selectionService.entities$))("ngForTrackBy",t.trackById)}}function _7(t,e){1&t&&(r.Kc(0," Cette introduction va vous pr\xe9senter les principales fonctionnalit\xe9s disponibles sur l'interface d'ANAIS. Vous pouvez l'arr\xeater \xe0 tout moment en cliquant sur la croix en haut \xe0 droite de la fen\xeatre. "),r.Qb(1,"br"),r.Qb(2,"br"),r.Kc(3," Pensez \xe0 rejoindre le "),r.Vb(4,"a",18),r.Kc(5,"salon ANAIS sur Tchap"),r.Ub(),r.Kc(6," afin de discuter avec l'\xe9quipe et d'autres utilisateurs ! "))}function y7(t,e){if(1&t&&(r.Qb(0,"app-annotations-layer",19),r.Qb(1,"app-hexagons-layer",19),r.Qb(2,"app-edges-layer",19),r.Qb(3,"app-zones-layer",19),r.Qb(4,"app-trails-layer",19),r.Qb(5,"app-h3traces-layer",19),r.Qb(6,"app-ships-layer",19),r.Qb(7,"app-aircrafts-layer",19),r.Qb(8,"app-alerts-layer",19),r.Qb(9,"app-events-layer",19),r.Qb(10,"app-ports-layer",19),r.Qb(11,"app-playback-layer",19),r.Qb(12,"app-selection-layer",19),r.Qb(13,"app-ping-layer",19),r.Qb(14,"app-measure-layer",19),r.Qb(15,"app-pim-layer",19),r.Qb(16,"app-additional-features-layer",19),r.Qb(17,"app-tile-layer",19),r.Qb(18,"app-feature-import-layer",19),r.Qb(19,"app-permanent-tooltips",19),r.Qb(20,"app-box-selection-interaction",19),r.Qb(21,"app-geolocation-layer",19),r.Qb(22,"app-entity-tooltips",19),r.Qb(23,"app-map-controls",19),r.Qb(24,"app-context-menu",19)),2&t){r.gc();const t=r.wc(11);r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map)}}let w7=(()=>{class t{constructor(t,e,i,n,r,s,o){this.changeDetectorRef=t,this.router=e,this.activatedRoute=i,this.mapStateService=n,this.mapService=r,this.selectionService=s,this.timeRangeService=o,this.showDrawer=!0,this.drawerWidth=0,this.exportTrails=()=>Object(ue.a)(this,void 0,void 0,function*(){const t=this.timeRangeService.timeRange$.value,e=FO(1e3*t.start,"yyyy-MM-dd'T'HH-mm-ss"),i=FO(1e3*t.end,"yyyy-MM-dd'T'HH-mm-ss"),n=[],r=[];var s;this.selectionService.trails$.value.forEach(t=>{var e;(null===(e=t[0])||void 0===e?void 0:e.ship)?n.push(t):r.push(t)}),n.length&&YH(WH(n.flat()),`anais-traces-ships-${e}-${i}.csv`,"text/csv"),r.length&&YH((s=r.flat(),[["icao","callsign","squawk","type","timestamp","lon","lat","hdms","altitude"].join(","),...s.map(t=>function(t){return[t.aircraft.icao,t.aircraft.callsign,t.aircraft.squawk,t.aircraft.type,HO(1e3*t.timestamp),t.lon,t.lat,Yk([t.lon,t.lat]),t.altitude]}(t).join(","))].join("\n")),`anais-traces-aircrafts-${e}-${i}.csv`,"text/csv")})}onRouteChange(t){this.showDrawer=!(t instanceof $H||t instanceof TK||t instanceof x$||t instanceof UT),setTimeout(()=>{this.drawerWidth=this.showDrawer?this.drawer.nativeElement.clientWidth:0,this.changeDetectorRef.markForCheck()},50)}closeDrawerIfEscape(t){return Object(ue.a)(this,void 0,void 0,function*(){"Escape"===t.code&&(yield this.closeDrawer())})}closeDrawer(){return Object(ue.a)(this,void 0,void 0,function*(){this.mapService.view$.value&&(yield this.router.navigateByUrl(`/${this.mapService.view$.value.toURL()}`))})}trackById(t,e){return e.id}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(sw),r.Pb(N_),r.Pb(gT),r.Pb(pI),r.Pb(xT),r.Pb(yT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-map-page"]],viewQuery:function(t,e){if(1&t&&r.Pc(g7,3,r.l),2&t){let t;r.vc(t=r.dc())&&(e.drawer=t.first)}},hostBindings:function(t,e){1&t&&r.cc("keyup",function(t){return e.closeDrawerIfEscape(t)},!1,r.zc)},decls:16,vars:9,consts:[["hasBackdrop","false",1,"page"],["mode","over","autoFocus","false",1,"page__drawer",3,"opened"],["drawer",""],[3,"activate"],["mat-button","","title","Fermer le panneau",1,"page__close-button",3,"click"],["src","./assets/images/logo_anais.svg","alt","Logo ANAIS",1,"page__anais-logo"],["class","page__entity-selections",3,"page__entity-selections--shifted",4,"ngIf"],["joyrideStep","map-end","text","Cette introduction \xe0 l'interface ANAIS est termin\xe9e. N'h\xe9sitez-pas \xe0 tester plus en d\xe9tail chaque fonctionnalit\xe9 et chaque menu. Si vous avez des remarques, suggestions, conseils ou juste besoin d'aide, l'\xe9quipe derri\xe8re ANAIS est \xe0 votre disposition et sera enchant\xe9e de vous aider.","stepPosition","center",1,"page__map",3,"horizontalCenterShiftPixels","title"],["mapComponent","map"],["joyrideStep","welcome","stepPosition","center",3,"title","stepContent"],["welcomeStepContent",""],[3,"ngIf"],[1,"page__entity-selections"],["class","page__entity-selections-toolbar mat-elevation-z8","title","Exporter les traces de la s\xe9lection en CSV",4,"ngIf"],["class","page__entity-selection",3,"entitySelection",4,"ngFor","ngForOf","ngForTrackBy"],["title","Exporter les traces de la s\xe9lection en CSV",1,"page__entity-selections-toolbar","mat-elevation-z8"],["mat-button","",3,"click"],[1,"page__entity-selection",3,"entitySelection"],["href","https://tchap.gouv.fr/#/room/#ANAIS96Clw3VeN7q:agent.dinum.tchap.gouv.fr","target","_blank"],[3,"map"]],template:function(t,e){if(1&t&&(r.Vb(0,"mat-drawer-container",0),r.Vb(1,"mat-drawer",1,2),r.Vb(3,"router-outlet",3),r.cc("activate",function(t){return e.onRouteChange(t)}),r.Ub(),r.Vb(4,"button",4),r.cc("click",function(){return e.closeDrawer()}),r.Vb(5,"mat-icon"),r.Kc(6,"close"),r.Ub(),r.Ub(),r.Qb(7,"img",5),r.Ic(8,v7,5,9,"div",6),r.hc(9,"async"),r.Ub(),r.Vb(10,"app-map",7,8),r.Qb(12,"div",9),r.Ic(13,_7,7,0,"ng-template",null,10,r.Jc),r.Ic(15,y7,25,25,"ng-template",11),r.Ub(),r.Ub()),2&t){const t=r.wc(11),i=r.wc(14);r.Db(1),r.nc("opened",e.showDrawer),r.Db(7),r.nc("ngIf",r.ic(9,7,e.mapStateService.showEntitiesSelections$)),r.Db(2),r.nc("horizontalCenterShiftPixels",e.drawerWidth)("title","Fin de l'introduction"),r.Db(2),r.nc("title","Bienvenue sur ANAIS")("stepContent",i),r.Db(3),r.nc("ngIf",t.map)}},directives:[L$,F$,hw,Dl,Yp,ut,pZ,ax,ct,CZ,vY,RY,UY,zY,$Q,YQ,dX,mX,bX,wX,SX,FX,NX,zX,HX,rJ,cJ,uJ,o3,x3,C3,k3,U4,a7,m7],pipes:[St],styles:["[_nghost-%COMP%]{flex:1}.page[_ngcontent-%COMP%]{height:100%}.page__drawer[_ngcontent-%COMP%]{min-width:300px;overflow-y:visible} .page__drawer>.mat-drawer-inner-container{overflow:hidden!important} .page>.mat-drawer-content{z-index:auto!important}.page__map[_ngcontent-%COMP%]{height:100%}.page__close-button[_ngcontent-%COMP%]{position:absolute;left:100%;top:12px;min-width:40px;height:40px;padding:0!important;border-radius:0;color:#50647f;background-color:#fff;border-radius:0 10px 10px 0;box-shadow:2px 2px 8px 4px rgba(0,0,0,.2);z-index:-1}.page__entity-selections-toolbar[_ngcontent-%COMP%]{background-color:#fff;margin-left:8px;margin-bottom:8px;display:inline-block}.page__entity-selections[_ngcontent-%COMP%]{position:absolute;left:calc(100%);top:8px;z-index:2;visibility:visible;transition:top .3s ease-out;overflow:auto;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:calc(100% - 44px)}.page__entity-selections--shifted[_ngcontent-%COMP%]{top:60px;max-height:calc(100% - 96px)}.page__entity-selection[_ngcontent-%COMP%]{padding-left:8px;padding-right:14px}@supports (-moz-appearance:none){.page__entity-selection[_ngcontent-%COMP%]{padding-right:34px}}.page__entity-selection[_ngcontent-%COMP%]:last-child{padding-bottom:8px}.page__anais-logo[_ngcontent-%COMP%]{position:absolute;left:calc(100% + 6px);bottom:6px;width:88px;z-index:2;pointer-events:none;touch-action:none;visibility:visible}"],data:{animation:[$r("fadeAnimation",[Qr(":enter",[Zr({opacity:0}),Gr(500,Zr({opacity:1}))]),Qr(":leave",[Zr({pointerEvents:"none"}),Gr(500,Zr({opacity:0,height:0}))])])]}}),t})();function x7(t){ZP(1,arguments);var e=qP(t);return e.setHours(0,0,0,0),e}function C7(t,e){ZP(2,arguments);var i=x7(t),n=x7(e),r=i.getTime()-SO(i),s=n.getTime()-SO(n);return Math.round((r-s)/864e5)}function S7(t,e){var i=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return i<0?-1:i>0?1:i}function k7(t,e){ZP(2,arguments);var i=qP(t),n=sO(e);return isNaN(n)?new Date(NaN):n?(i.setDate(i.getDate()+n),i):i}function E7(t,e){ZP(2,arguments);var i=sO(e);return k7(t,-i)}function D7(t){return["mmsi","imo","callsign","name","flag","cargo","type","length","width","draught","groupsCount",...Array(t).fill(null).map((t,e)=>`timestamp${e+1}`)]}function I7(t,e){YH(function(t,e){return[D7(e).join(","),...t.map(t=>function(t,e){return t.passages.map(i=>[t.mmsi,t.imo,t.callsign,BD(t.name),t.country.flag,t.cargo,t.shipType.key,t.length,t.width,t.draught,t.groupsCount,...i.reduce((t,e)=>(t[e.edgeGroupIndex]=HO(1e3*e.timestamp),t),Array(e).fill(null))].join(","))}(t,e)).flat()].join("\n")}(t,e),`anais-moves-results-${FO(new Date,"yyyy-MM-dd'T'HH-mm-ss")}.csv`,"text/csv")}function P7(t,e){1&t&&(r.Vb(0,"th",23),r.Kc(1,"MMSI"),r.Ub())}function O7(t,e){if(1&t&&(r.Vb(0,"td",24),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.Db(1),r.Lc(t.mmsi)}}function M7(t,e){1&t&&(r.Vb(0,"th",23),r.Kc(1,"IMO"),r.Ub())}function T7(t,e){if(1&t&&(r.Vb(0,"td",24),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.Db(1),r.Lc(t.imo)}}function R7(t,e){1&t&&(r.Vb(0,"th",23),r.Kc(1,"Pavillon"),r.Ub())}function V7(t,e){if(1&t&&(r.Vb(0,"td",24),r.Qb(1,"app-flag",25),r.Ub()),2&t){const t=e.$implicit;r.Db(1),r.nc("flag",t.country.flag)}}function F7(t,e){1&t&&(r.Vb(0,"th",23),r.Kc(1,"Nom"),r.Ub())}function L7(t,e){if(1&t&&(r.Vb(0,"td",24),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.Db(1),r.Lc(t.name)}}function U7(t,e){1&t&&(r.Vb(0,"th",23),r.Kc(1,"Type"),r.Ub())}function B7(t,e){if(1&t&&(r.Vb(0,"td",24),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.Db(1),r.Lc(t.shipType.label)}}function N7(t,e){1&t&&(r.Vb(0,"th",23),r.Kc(1,"# Portes"),r.Ub())}function j7(t,e){if(1&t&&(r.Vb(0,"td",24),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.Db(1),r.Lc(t.groupsCount)}}function z7(t,e){1&t&&(r.Vb(0,"th",26),r.Kc(1,"Passages"),r.Ub())}function H7(t,e){if(1&t&&(r.Vb(0,"div",29),r.hc(1,"date"),r.Kc(2),r.Ub()),2&t){const t=e.$implicit,i=r.gc(3);r.Fc("background-color",i.searchResult.query.edgeGroups[t.edgeGroupIndex].color),r.oc("title",r.kc(1,4,1e3*t.timestamp,"yyyy-MM-dd HH:mm:ss z",i.mapConfigService.useUTCDates$.value&&"z")),r.Db(2),r.Mc(" ",t.edgeGroupIndex+1," ")}}function K7(t,e){if(1&t&&(r.Vb(0,"div"),r.Ic(1,H7,3,8,"div",28),r.Ub()),2&t){const t=e.$implicit;r.Db(1),r.nc("ngForOf",t)}}function $7(t,e){if(1&t&&(r.Vb(0,"td",24),r.Ic(1,K7,2,1,"div",27),r.Ub()),2&t){const t=e.$implicit;r.Db(1),r.nc("ngForOf",t.passages)}}function G7(t,e){1&t&&r.Qb(0,"tr",30)}function W7(t,e){1&t&&r.Qb(0,"tr",31)}const Z7=function(){return[10,20,100]};let q7=(()=>{class t extends LT{constructor(t,e){super(),this.mapConfigService=t,this.movesService=e,this.displayedColumns=["country","name","mmsi","imo","type","groupsCount","passages"]}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.searchResult=this.movesService.searchResult$.value;const t=this.searchResult.query.edgeGroups.length;this.tableDataSource=new NV(this.mapConfigService.movesSearchIncludeIncompletePassages$.value?this.searchResult.results:this.searchResult.results.filter(e=>e.groupsCount===t)),this.tableDataSource.sortingDataAccessor=(t,e)=>{switch(e){case"country":return t.country.flag;case"type":return t.shipType.label;default:return t[e]}},setTimeout(()=>{this.paginator.pageSize=50,this.tableDataSource.paginator=this.paginator,this.tableDataSource.sort=this.sort}),this.subscriptions.push(this.mapConfigService.movesSearchIncludeIncompletePassages$.subscribe(t=>{const e=this.searchResult.query.edgeGroups.length;this.tableDataSource.data=t?this.searchResult.results:this.searchResult.results.filter(t=>t.groupsCount===e)}))})}downloadCSVFile(){I7(this.tableDataSource.data,this.searchResult.query.edgeGroups.length)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(hI),r.Pb(mT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-moves-table-dialog"]],viewQuery:function(t,e){if(1&t&&(r.Pc(CR,1),r.Pc(yA,1)),2&t){let t;r.vc(t=r.dc())&&(e.sort=t.first),r.vc(t=r.dc())&&(e.paginator=t.first)}},features:[r.Ab],decls:41,vars:8,consts:[[1,"d-flex"],[1,"dialog-title"],[1,"u-flex"],["mat-button","","title","Fermer le panneau",3,"mat-dialog-close"],[1,"dialog-content"],[1,"px-3","pb-2","mat-body"],[1,"d-flex-center"],["color","primary",1,"mr-2",3,"ngModel","ngModelChange"],["mat-stroked-button","","title","T\xe9l\xe9charger les r\xe9sultats au format CSV",3,"click"],["mat-table","","matSort","","matSortActive","groupsCount","matSortDirection","desc",1,"table",3,"dataSource"],["matColumnDef","mmsi"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","imo"],["matColumnDef","country"],["matColumnDef","name"],["matColumnDef","type"],["matColumnDef","groupsCount"],["matColumnDef","passages"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[3,"flag"],["mat-header-cell",""],[4,"ngFor","ngForOf"],["class","edge-group-bullet",3,"backgroundColor","title",4,"ngFor","ngForOf"],[1,"edge-group-bullet",3,"title"],["mat-header-row",""],["mat-row",""]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"h1",1),r.Kc(2," Liste des mouvements "),r.Ub(),r.Qb(3,"div",2),r.Vb(4,"button",3),r.Vb(5,"mat-icon"),r.Kc(6,"close"),r.Ub(),r.Ub(),r.Ub(),r.Vb(7,"div",4),r.Vb(8,"div",5),r.Vb(9,"div",6),r.Vb(10,"div",2),r.Kc(11),r.Ub(),r.Vb(12,"mat-slide-toggle",7),r.cc("ngModelChange",function(){return e.mapConfigService.toggleMovesSearchIncludeIncompletePassages()}),r.Kc(13," Inclure les passages incomplets "),r.Ub(),r.Vb(14,"button",8),r.cc("click",function(){return e.downloadCSVFile()}),r.Kc(15,"CSV"),r.Ub(),r.Ub(),r.Ub(),r.Vb(16,"table",9),r.Tb(17,10),r.Ic(18,P7,2,0,"th",11),r.Ic(19,O7,2,1,"td",12),r.Sb(),r.Tb(20,13),r.Ic(21,M7,2,0,"th",11),r.Ic(22,T7,2,1,"td",12),r.Sb(),r.Tb(23,14),r.Ic(24,R7,2,0,"th",11),r.Ic(25,V7,2,1,"td",12),r.Sb(),r.Tb(26,15),r.Ic(27,F7,2,0,"th",11),r.Ic(28,L7,2,1,"td",12),r.Sb(),r.Tb(29,16),r.Ic(30,U7,2,0,"th",11),r.Ic(31,B7,2,1,"td",12),r.Sb(),r.Tb(32,17),r.Ic(33,N7,2,0,"th",11),r.Ic(34,j7,2,1,"td",12),r.Sb(),r.Tb(35,18),r.Ic(36,z7,2,0,"th",19),r.Ic(37,$7,2,1,"td",12),r.Sb(),r.Ic(38,G7,1,0,"tr",20),r.Ic(39,W7,1,0,"tr",21),r.Ub(),r.Qb(40,"mat-paginator",22),r.Ub()),2&t&&(r.Db(11),r.Nc(" ",e.tableDataSource.data.length," r\xe9sultat",e.tableDataSource.data.length>1?"s":""," "),r.Db(1),r.nc("ngModel",e.mapConfigService.movesSearchIncludeIncompletePassages$.value),r.Db(4),r.nc("dataSource",e.tableDataSource),r.Db(22),r.nc("matHeaderRowDef",e.displayedColumns),r.Db(1),r.nc("matRowDefColumns",e.displayedColumns),r.Db(1),r.nc("pageSizeOptions",r.rc(7,Z7)))},directives:[Dl,Zl,Yp,NL,Vc,uh,vV,CR,SV,xV,yV,OV,TV,yA,EV,OR,IV,GF,ct,VV,LV],pipes:[kt],styles:[".dialog-title[_ngcontent-%COMP%]{margin:0;padding:16px}.dialog-content[_ngcontent-%COMP%]{padding:16px}.table[_ngcontent-%COMP%]{width:100%}.table[_ngcontent-%COMP%] tr.mat-row, .table[_ngcontent-%COMP%] tr.mat-header-row[_ngcontent-%COMP%]{height:40px}.table[_ngcontent-%COMP%] td.mat-cell{padding:0 4px!important;font-size:13px}.table[_ngcontent-%COMP%] td.mat-cell:first-of-type{padding-left:24px!important}.table[_ngcontent-%COMP%] td.mat-cell:last-of-type{padding-right:24px!important}.edge-group-bullet[_ngcontent-%COMP%]{display:inline-block;width:16px;height:16px;line-height:18px;text-align:center;border-radius:50%;margin:4px 4px 4px 0;cursor:help;color:#fff;text-shadow:rgba(0,0,0,.3686274509803922) 1px 1px 0;font-size:12px}"]}),t})();function Y7(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",7),r.cc("click",function(){return r.Ac(t),r.gc().locateShip()}),r.Qb(1,"app-flag",8),r.Vb(2,"div",9),r.Vb(3,"strong",10),r.Kc(4),r.Ub(),r.Vb(5,"small",11),r.Kc(6),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.nc("title",t.hasPosition?"Localiser le navire":"Ce navire n'a pas de position")("disabled",!t.hasPosition),r.Db(1),r.nc("mmsi",t.ship.mmsi),r.Db(3),r.Lc(t.ship.name||"?"),r.Db(2),r.Lc(t.ship.cargo?t.vesselTypeLabelsByType[t.ship.cargo]:"?")}}function Q7(t,e){if(1&t&&(r.Vb(0,"div",12),r.Qb(1,"app-flag",8),r.Vb(2,"div",9),r.Vb(3,"strong",10),r.Kc(4),r.Ub(),r.Vb(5,"small",11),r.Kc(6),r.Ub(),r.Ub(),r.Ub()),2&t){const t=r.gc();r.Db(1),r.nc("mmsi",t.ship.mmsi),r.Db(3),r.Lc(t.ship.name||"?"),r.Db(2),r.Lc(t.ship.cargo?t.vesselTypeLabelsByType[t.ship.cargo]:"?")}}const X7=function(t){return["/ships/",t]},J7=["*"];let t9=(()=>{class t extends LT{constructor(t){super(),this.mapService=t,this.showLink=!0,this.vesselTypeLabelsByType=ED,this.hasPosition=!0}ngOnInit(){this.ensureMandatoryInputParams("ship")}ngOnChanges(t){var e,i;t.ship&&(this.hasPosition=FD(null===(e=t.ship.currentValue)||void 0===e?void 0:e.lon)&&FD(null===(i=t.ship.currentValue)||void 0===i?void 0:i.lat))}locateShip(){this.mapService.pingLocation([this.ship.lon,this.ship.lat]),this.mapService.locate([this.ship.lon,this.ship.lat])}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(pI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-ship-item"]],inputs:{ship:"ship",showLink:"showLink"},features:[r.Ab,r.Bb],ngContentSelectors:J7,decls:15,vars:8,consts:[[1,"ship-item__header"],["mat-button","","class","ship-item__link",3,"title","disabled","click",4,"ngIf"],["class","d-flex u-flex",4,"ngIf"],["mat-button","","title","Ouvrir la fiche du navire",1,"d-center",3,"routerLink"],[1,"ship-item__row"],[1,"px-2"],[1,"ship-item__row","ship-item__slot-row"],["mat-button","",1,"ship-item__link",3,"title","disabled","click"],[1,"ship-item__flag",3,"mmsi"],[1,"ship-item__title"],[1,"ship-item__name"],[1,"ship-item__type"],[1,"d-flex","u-flex"]],template:function(t,e){1&t&&(r.mc(),r.Vb(0,"div",0),r.Ic(1,Y7,7,5,"button",1),r.Ic(2,Q7,7,3,"div",2),r.Vb(3,"a",3),r.Vb(4,"mat-icon"),r.Kc(5,"info"),r.Ub(),r.Ub(),r.Ub(),r.Vb(6,"div",4),r.Vb(7,"span"),r.Kc(8),r.Ub(),r.Vb(9,"span",5),r.Kc(10),r.Ub(),r.Vb(11,"span"),r.Kc(12),r.Ub(),r.Ub(),r.Vb(13,"div",6),r.lc(14),r.Ub()),2&t&&(r.Db(1),r.nc("ngIf",e.showLink),r.Db(1),r.nc("ngIf",!e.showLink),r.Db(1),r.nc("routerLink",r.sc(6,X7,e.ship.mmsi)),r.Db(5),r.Mc("MMSI ",e.ship.mmsi,""),r.Db(2),r.Mc("IMO ",e.ship.imo||"?",""),r.Db(2),r.Mc("Callsign ",e.ship.callsign||"?",""))},directives:[ut,Il,aw,Yp,Dl,GF],styles:[".ship-item__header[_ngcontent-%COMP%]{display:flex;padding:4px 4px 0}.ship-item__link[_ngcontent-%COMP%]{flex:1;padding:0;line-height:inherit;text-align:inherit;font-size:inherit;font-weight:inherit}.ship-item__link[_ngcontent-%COMP%] .mat-button-wrapper{display:flex}.ship-item__flag[_ngcontent-%COMP%]{margin:5px}.ship-item__title[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:5px 0;flex:1}.ship-item__type[_ngcontent-%COMP%]{font-size:.9em;color:#555}.ship-item__row[_ngcontent-%COMP%]{padding:0 8px 4px;display:flex;justify-content:space-between;font-size:.9em;flex-wrap:wrap}.ship-item__slot-row[_ngcontent-%COMP%]:empty{display:none}"],changeDetection:0}),t})();function e9(t,e){if(1&t&&(r.Vb(0,"div",23),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Nc("Du ",t.dateRange.start," au ",t.dateRange.end,"")}}function i9(t,e){if(1&t&&(r.Vb(0,"div",24),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Mc(" ",t.searchForm.controls.interval.errors.maxRange," ")}}function n9(t,e){1&t&&(r.Vb(0,"div",25),r.Kc(1," S\xe9lectionnez des transitions sur la carte "),r.Ub())}function r9(t,e){1&t&&(r.Vb(0,"mat-icon"),r.Kc(1,"chevron_right"),r.Ub())}function s9(t,e){if(1&t&&(r.Ic(0,r9,2,0,"mat-icon",26),r.Vb(1,"div",27),r.Kc(2),r.Ub()),2&t){const t=e.index+1,i=e.$implicit;r.nc("ngIf",t>1),r.Db(1),r.Fc("background-color",i.color),r.pc("title","Porte ",t,""),r.Db(1),r.Mc(" ",t," ")}}function o9(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",28),r.cc("click",function(){return r.Ac(t),r.gc().resetEdgeGroups()}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function a9(t,e){if(1&t&&(r.Vb(0,"div",29),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Mc(" ",t.searchForm.controls.edgeGroups.errors.maxEdgeGroups," ")}}function l9(t,e){if(1&t&&(r.Vb(0,"div",29),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Mc(" ",t.searchForm.controls.edgeGroups.errors.maxTransitions," ")}}function c9(t,e){1&t&&(r.Vb(0,"div",30),r.Kc(1," Faites une recherche pour afficher les r\xe9sultats. "),r.Ub())}function h9(t,e){1&t&&(r.Vb(0,"div",30),r.Kc(1," Aucun r\xe9sultat "),r.Ub())}function u9(t,e){1&t&&r.Qb(0,"app-ship-item",39),2&t&&r.nc("ship",e.$implicit)("showLink",!1)}function d9(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",31),r.Vb(1,"mat-slide-toggle",32),r.cc("ngModelChange",function(){return r.Ac(t),r.gc(2).mapConfigService.toggleMovesSearchIncludeIncompletePassages()}),r.Kc(2," Inclure les passages incomplets "),r.Ub(),r.Vb(3,"div",5),r.Vb(4,"div",33),r.Kc(5),r.Ub(),r.Vb(6,"button",34),r.cc("click",function(){return r.Ac(t),r.gc(2).downloadCSVFile()}),r.Kc(7,"CSV"),r.Ub(),r.Vb(8,"button",35),r.cc("click",function(){return r.Ac(t),r.gc(2).openTableDialog()}),r.Kc(9,"Liste d\xe9taill\xe9e"),r.Ub(),r.Ub(),r.Ub(),r.Vb(10,"div",36),r.Ic(11,u9,1,2,"app-ship-item",37),r.Ub(),r.Vb(12,"mat-paginator",38),r.cc("page",function(e){return r.Ac(t),r.gc(2).showResultsPage(e.pageIndex)}),r.Ub()}if(2&t){const t=r.gc(2);r.Db(1),r.nc("ngModel",t.mapConfigService.movesSearchIncludeIncompletePassages$.value),r.Db(4),r.Nc(" ",t.filteredSearchResults$.value.length," r\xe9sultat",t.filteredSearchResults$.value.length>1?"s":""," "),r.Db(6),r.nc("ngForOf",t.displayedSearchResults)("ngForTrackBy",t.trackByIndex),r.Db(1),r.nc("pageIndex",t.currentResultsPageIndex)("length",t.filteredSearchResults$.value.length)("pageSize",t.resultsPageSize)}}function p9(t,e){if(1&t&&(r.Ic(0,h9,2,0,"div",21),r.Ic(1,d9,13,8,"ng-template",22)),2&t){const t=r.gc();r.nc("ngIf",0===t.searchResult.results.length),r.Db(1),r.nc("ngIf",t.searchResult.results.length>0)}}function f9(t){const e={};t.value.length>8&&(e.maxEdgeGroups="Vous ne pouvez pas cr\xe9er plus de 8 groupes de porte.");const i=t.value.reduce((t,e,i)=>(e.edges.length>8&&t.push(i+1),t),[]);if(i.length>0){const t=i.length>1;e.maxTransitions=`Le${t?"s":""} groupe${t?"s":""} ${i.join(", ")} d\xe9passe${t?"nt":""} la limite de 8 transitions par groupe.`}return e}let m9=(()=>{class t extends LT{constructor(t,e,i,n,r,s,o){super(),this.ngZone=t,this.formBuilder=e,this.titleService=i,this.dialog=n,this.mapConfigService=r,this.mapService=s,this.movesService=o,this.minDate=new Date(2020,0,1),this.maxDate=new Date,this.dateRange=null,this.searchResult=null,this.maxIntervalRangeDays=61,this.displayedSearchResults=null,this.currentResultsPageIndex=0,this.resultsPageSize=50,this.currentResultsPageIndex$=new Av.a(0),this.filteredSearchResults$=new Av.a([]),this.search=()=>Object(ue.a)(this,void 0,void 0,function*(){this.searchForm.valid&&(yield this.movesService.search(this.searchForm.value))})}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.titleService.setTitle("Recherche de mouvements - ANAIS"),this.mapService.hasBooted||this.mapService.resetToDefaultView(),this.searchForm=this.formBuilder.group({edgeGroups:[[],[pc.required,f9]],interval:this.formBuilder.group({start:[null,[pc.required]],end:[null,[pc.required]]})}),this.subscriptions.push(this.searchForm.controls.interval.valueChanges.subscribe(t=>{t.start&&t.end&&(function(t,e){ZP(2,arguments);var i=qP(t),n=qP(e),r=S7(i,n),s=Math.abs(C7(i,n));i.setDate(i.getDate()-r*s);var o=S7(i,n)===-r,a=r*(s-o);return 0===a?0:a}(t.end,t.start)>this.maxIntervalRangeDays?this.searchForm.controls.interval.setErrors({maxRange:`La p\xe9riode doit \xeatre au maximum de ${this.maxIntervalRangeDays} jours.`}):this.dateRange={start:jO(t.start),end:jO(t.end)})})),this.movesService.searchQuery$.value?(this.searchForm.setValue(this.movesService.searchQuery$.value),this.searchForm.value.edgeGroups&&this.movesService.selectedEdgeGroups$.next(this.searchForm.value.edgeGroups)):this.searchForm.controls.interval.setValue({start:x7(E7(new Date,7)),end:new Date}),this.subscriptions.push(this.searchForm.valueChanges.subscribe(t=>{this.movesService.searchQuery$.next(t)}),this.movesService.selectedEdgeGroups$.subscribe(t=>{this.ngZone.run(()=>{this.searchForm.controls.edgeGroups.setValue(t)})}),this.movesService.searchResult$.subscribe(t=>{this.searchResult=t}),Hg([this.movesService.searchResult$,this.mapConfigService.movesSearchIncludeIncompletePassages$]).pipe(Object(Ge.a)(([t,e])=>{if(null===t)return[];const i=t.query.edgeGroups.length;return e?t.results:t.results.filter(t=>t.groupsCount===i)})).subscribe(t=>{this.filteredSearchResults$.next(t)}),Hg([this.filteredSearchResults$,this.currentResultsPageIndex$]).pipe(He(([t,e])=>{if(0===t.length&&0!==e)return this.showResultsPage(0),!1;const i=e*this.resultsPageSize;if(0===t.slice(i,i+this.resultsPageSize).length&&t.length>0){const e=Math.ceil(t.length/this.resultsPageSize)-1;return this.showResultsPage(-1===e?0:e),!1}return!0}),Object(Ge.a)(([t,e])=>{const i=e*this.resultsPageSize;return t.slice(i,i+this.resultsPageSize)})).subscribe(t=>{this.displayedSearchResults=t}))})}ngOnDestroy(){super.ngOnDestroy(),this.movesService.resetEdgeGroups()}resetForm(){this.searchForm.reset()}resetEdgeGroups(){this.movesService.resetEdgeGroups(),dT.fill(!0)}downloadCSVFile(){I7(this.filteredSearchResults$.value,this.searchResult.query.edgeGroups.length)}showResultsPage(t){this.currentResultsPageIndex$.next(t),this.currentResultsPageIndex=t}trackByIndex(t){return t}openTableDialog(){this.dialog.open(q7,{maxHeight:"90vh",maxWidth:"90vw",panelClass:"moves-table-dialog",closeOnNavigation:!0})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.B),r.Pb(Lh),r.Pb(he),r.Pb(Gl),r.Pb(hI),r.Pb(pI),r.Pb(mT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-moves-panel"]],features:[r.Ab],decls:31,vars:16,consts:[["joyrideStep","moves-panel","title","Recherche de mouvements","text","C'est ici que vous pouvez rechercher des navires \xe9tant pass\xe9 par plusieurs endroits pour une p\xe9riode de temps donn\xe9e. Cela se fait en s\xe9lectionnant des transitions dans notre indexation hexagonale.",1,"panel","panel--medium"],[1,"panel__header","panel__header--blue"],[1,"panel__title","u-flex"],[1,"pa-3","d-flex-column",3,"formGroup"],[1,"mb-2","mat-body"],[1,"d-flex-center"],[1,"mr-1"],["class","mx-3",4,"ngIf"],["formGroupName","interval",2,"display","none",3,"rangePicker","min","max"],["matStartDate","","formControlName","start"],["matEndDate","","formControlName","end"],["picker",""],["title","Choisir une p\xe9riode",2,"align-self","center",3,"for"],["class","error-message mb-2",4,"ngIf"],[1,"edge-groups-form"],["class","edge-groups-form__placeholder",4,"ngIf"],["ngFor","",3,"ngForOf"],["mat-button","","mat-icon-button","","class","ml-2","title","R\xe9initialiser les portes",3,"click",4,"ngIf"],["class","error-message mat-body mb-2",4,"ngIf"],["mat-stroked-button","","type","submit","title","Lancer la recherche",1,"mt-3",3,"app-async-action","disabled"],[1,"mt-3"],["class","pa-3",4,"ngIf"],[3,"ngIf"],[1,"mx-3"],[1,"error-message","mb-2"],[1,"edge-groups-form__placeholder"],[4,"ngIf"],[1,"edge-groups-form__bullet",3,"title"],["mat-button","","mat-icon-button","","title","R\xe9initialiser les portes",1,"ml-2",3,"click"],[1,"error-message","mat-body","mb-2"],[1,"pa-3"],[1,"px-3","pb-2","mat-body"],["color","primary",1,"mb-2",3,"ngModel","ngModelChange"],[1,"u-flex"],["mat-stroked-button","","title","T\xe9l\xe9charger les r\xe9sultats au format CSV",3,"click"],["mat-stroked-button","","title","Ouvrir la fen\xeatre avec la liste d\xe9taill\xe9e",3,"click"],[1,"scrollable"],[3,"ship","showLink",4,"ngFor","ngForOf","ngForTrackBy"],["showFirstLastButtons","","hidePageSize","",3,"pageIndex","length","pageSize","page"],[3,"ship","showLink"]],template:function(t,e){if(1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"h2",2),r.Kc(3,"Recherche de mouvements"),r.Ub(),r.Ub(),r.Vb(4,"form",3),r.Vb(5,"div",4),r.Kc(6,"Ce module vous permet de rechercher des navires \xe9tant pass\xe9 par plusieurs endroits pour une p\xe9riode de temps."),r.Ub(),r.Vb(7,"div",5),r.Vb(8,"label",6),r.Kc(9,"P\xe9riode :"),r.Ub(),r.Ic(10,e9,2,2,"div",7),r.Vb(11,"mat-date-range-input",8),r.Qb(12,"input",9),r.Qb(13,"input",10),r.Ub(),r.Qb(14,"mat-date-range-picker",null,11),r.Qb(16,"mat-datepicker-toggle",12),r.Ub(),r.Ic(17,i9,2,1,"div",13),r.Vb(18,"div",14),r.Vb(19,"label",6),r.Kc(20,"Passages :"),r.Ub(),r.Ic(21,n9,2,0,"div",15),r.Ic(22,s9,3,5,"ng-template",16),r.Ic(23,o9,3,0,"button",17),r.Ub(),r.Ic(24,a9,2,1,"div",18),r.Ic(25,l9,2,1,"div",18),r.Vb(26,"button",19),r.Kc(27,"Rechercher"),r.Ub(),r.Qb(28,"mat-divider",20),r.Ub(),r.Ic(29,c9,2,0,"div",21),r.Ic(30,p9,2,2,"ng-template",22),r.Ub()),2&t){const t=r.wc(15);r.Db(4),r.nc("formGroup",e.searchForm),r.Db(6),r.nc("ngIf",e.dateRange),r.Db(1),r.nc("rangePicker",t)("min",e.minDate)("max",e.maxDate),r.Db(5),r.nc("for",t),r.Db(1),r.nc("ngIf",null==e.searchForm.controls.interval.errors?null:e.searchForm.controls.interval.errors.maxRange),r.Db(4),r.nc("ngIf",null==e.searchForm.controls.edgeGroups.errors?null:e.searchForm.controls.edgeGroups.errors.required),r.Db(1),r.nc("ngForOf",e.searchForm.controls.edgeGroups.value),r.Db(1),r.nc("ngIf",e.searchForm.controls.edgeGroups.value.length>0),r.Db(1),r.nc("ngIf",null==e.searchForm.controls.edgeGroups.errors?null:e.searchForm.controls.edgeGroups.errors.maxEdgeGroups),r.Db(1),r.nc("ngIf",null==e.searchForm.controls.edgeGroups.errors?null:e.searchForm.controls.edgeGroups.errors.maxTransitions),r.Db(1),r.nc("app-async-action",e.search)("disabled",!e.searchForm.valid),r.Db(3),r.nc("ngIf",null===e.searchResult),r.Db(1),r.nc("ngIf",null!==e.searchResult)}},directives:[ax,dh,Fc,_h,ut,$d,wh,zd,ac,Vc,Eh,Hd,Gd,Bd,ct,Dl,dR,GT,Yp,NL,uh,yA,t9],styles:[".edge-groups-form[_ngcontent-%COMP%]{display:flex;align-items:center;min-height:40px;flex-wrap:wrap}.edge-groups-form__placeholder[_ngcontent-%COMP%]{color:#828282}.edge-groups-form__bullet[_ngcontent-%COMP%]{display:inline-block;width:24px;height:24px;line-height:26px;text-align:center;border-radius:50%;margin:8px 0;color:#fff;text-shadow:rgba(0,0,0,.3686274509803922) 1px 1px 0}.result-passage[_ngcontent-%COMP%]{font-size:12px} .moves-table-dialog .mat-dialog-container{padding:0!important}"]}),t})(),g9=(()=>{class t extends LT{constructor(t,e){super(),this.titleService=t,this.mapService=e}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.titleService.setTitle("Gestion des ports - ANAIS"),this.mapService.hasBooted||this.mapService.resetToDefaultView()})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(he),r.Pb(pI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-ports-panel"]],features:[r.Ab],decls:6,vars:0,consts:[[1,"panel"],[1,"panel__header","panel__header--blue"],[1,"panel__title","u-flex"],[1,"pa-2"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"h2",2),r.Kc(3,"Gestion des ports"),r.Ub(),r.Ub(),r.Vb(4,"p",3),r.Kc(5,"Les ports sont uniquement visualisables sur la carte."),r.Ub(),r.Ub())},encapsulation:2}),t})();var A9=i("gllA"),b9=i.n(A9);let v9=(()=>{class t{constructor(t){this.data=t}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(jl))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-raw-data-dialog"]],decls:9,vars:3,consts:[["mat-dialog-title",""],["mat-dialog-content",""],[1,"mat-small"],["mat-dialog-actions",""],[1,"u-flex"],["mat-button","",3,"mat-dialog-close"]],template:function(t,e){1&t&&(r.Vb(0,"h1",0),r.Kc(1),r.Ub(),r.Vb(2,"div",1),r.Vb(3,"pre",2),r.Kc(4),r.Ub(),r.Ub(),r.Vb(5,"div",3),r.Qb(6,"div",4),r.Vb(7,"button",5),r.Kc(8," Fermer "),r.Ub(),r.Ub()),2&t&&(r.Db(1),r.Lc(e.data.title),r.Db(3),r.Lc(e.data.content),r.Db(3),r.nc("mat-dialog-close",null))},directives:[ql,Yl,Ql,Dl,Zl],encapsulation:2}),t})();function _9(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",13),r.cc("click",function(){r.Ac(t);const e=r.gc(2);return e.locate(e.voyage.arrival.place.geo)}),r.Qb(1,"app-flag",14),r.Vb(2,"span"),r.Kc(3),r.Ub(),r.Ub()}if(2&t){const t=r.gc(2);r.Db(1),r.nc("flag",t.voyage.arrival.place.countryCode.toLowerCase()),r.Db(2),r.Nc("",t.voyage.arrival.place.name," (",t.voyage.arrival.place.unlocode,")")}}function y9(t,e){if(1&t&&(r.Vb(0,"div",15),r.Qb(1,"app-flag",14),r.Vb(2,"span"),r.Kc(3),r.Ub(),r.Ub()),2&t){const t=r.gc(2);r.Db(1),r.nc("flag",t.voyage.arrival.place.countryCode.toLowerCase()),r.Db(2),r.Nc("",t.voyage.arrival.place.name," (",t.voyage.arrival.place.unlocode,")")}}function w9(t,e){1&t&&(r.Vb(0,"div",16),r.Kc(1,"(Estim\xe9)"),r.Ub())}function x9(t,e){if(1&t&&(r.Vb(0,"div",10),r.Ic(1,_9,4,3,"button",6),r.Ic(2,y9,4,3,"div",11),r.Ub(),r.Vb(3,"div",12),r.Vb(4,"div"),r.Kc(5),r.hc(6,"date"),r.Ub(),r.Ic(7,w9,2,0,"div",9),r.Ub()),2&t){const t=r.gc();r.Db(1),r.nc("ngIf",t.voyage.arrival.place.geo),r.Db(1),r.nc("ngIf",!t.voyage.arrival.place.geo),r.Db(3),r.Lc(r.jc(6,4,t.voyage.arrival.date.value,"yyyy-MM-dd HH:mm")),r.Db(2),r.nc("ngIf","Estimated"===t.voyage.arrival.date.type)}}function C9(t,e){1&t&&(r.Vb(0,"div",10),r.Kc(1,"?"),r.Ub(),r.Vb(2,"div",12),r.Kc(3,"?"),r.Ub())}function S9(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",13),r.cc("click",function(){r.Ac(t);const e=r.gc();return e.locate(e.voyage.departure.place.geo)}),r.Qb(1,"app-flag",14),r.Vb(2,"span"),r.Kc(3),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.Db(1),r.nc("flag",t.voyage.departure.place.countryCode.toLowerCase()),r.Db(2),r.Nc("",t.voyage.departure.place.name," (",t.voyage.departure.place.unlocode,")")}}function k9(t,e){if(1&t&&(r.Vb(0,"div",17),r.Qb(1,"app-flag",14),r.Vb(2,"span"),r.Kc(3),r.Ub(),r.Ub()),2&t){const t=r.gc();r.Db(1),r.nc("flag",t.voyage.departure.place.countryCode.toLowerCase()),r.Db(2),r.Nc("",t.voyage.departure.place.name," (",t.voyage.departure.place.unlocode,")")}}function E9(t,e){1&t&&(r.Vb(0,"div",16),r.Kc(1,"(Estim\xe9)"),r.Ub())}let D9=(()=>{class t extends LT{constructor(t){super(),this.mapService=t}locate(t){const[e,i]=t.split(",").map(t=>+t);this.mapService.pingLocation([i,e]),this.mapService.locate([i,e])}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(pI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-shipment-voyage"]],inputs:{voyage:"voyage"},features:[r.Ab],decls:16,vars:10,consts:[[3,"ngIf"],[1,"transporter","mr-3"],[1,"mr-1"],[1,"arrow-wrapper"],[1,"arrow"],[1,"departure-place","pa-1","u-right"],["mat-button","","title","Localiser",3,"click",4,"ngIf"],["class","mt-2 mr-2",4,"ngIf"],[1,"departure-date","pa-1","mt-2"],["class","estimated-date-label",4,"ngIf"],[1,"arrival-place","pa-1","u-right"],["class","mr-2",4,"ngIf"],[1,"arrival-date","pa-1"],["mat-button","","title","Localiser",3,"click"],[1,"mr-1",3,"flag"],[1,"mr-2"],[1,"estimated-date-label"],[1,"mt-2","mr-2"]],template:function(t,e){1&t&&(r.Ic(0,x9,8,7,"ng-template",0),r.Ic(1,C9,4,0,"ng-template",0),r.Vb(2,"div",1),r.Vb(3,"mat-icon",2),r.Kc(4,"directions_boat"),r.Ub(),r.Kc(5),r.Ub(),r.Vb(6,"div",3),r.Qb(7,"div",4),r.Ub(),r.Vb(8,"div",5),r.Ic(9,S9,4,3,"button",6),r.Ic(10,k9,4,3,"div",7),r.Ub(),r.Vb(11,"div",8),r.Vb(12,"div"),r.Kc(13),r.hc(14,"date"),r.Ub(),r.Ic(15,E9,2,0,"div",9),r.Ub()),2&t&&(r.nc("ngIf",e.voyage.arrival),r.Db(1),r.nc("ngIf",!e.voyage.arrival),r.Db(4),r.Mc(" ",e.voyage.transport.name,"\n"),r.Db(4),r.nc("ngIf",e.voyage.departure.place.geo),r.Db(1),r.nc("ngIf",!e.voyage.departure.place.geo),r.Db(3),r.Lc(r.jc(14,7,e.voyage.departure.date.value,"yyyy-MM-dd HH:mm")),r.Db(2),r.nc("ngIf","Estimated"===e.voyage.departure.date.type))},directives:[ut,Yp,Dl,GF],pipes:[kt],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"arrival-place arrow-wrapper arrival-date" "transporter arrow-wrapper ." "departure-place arrow-wrapper departure-date";grid-template-rows:50px 100px 50px;grid-template-columns:auto 38px 140px}.departure-place[_ngcontent-%COMP%]{grid-area:departure-place}.departure-date[_ngcontent-%COMP%]{grid-area:departure-date}.arrival-place[_ngcontent-%COMP%]{grid-area:arrival-place}.arrival-date[_ngcontent-%COMP%]{grid-area:arrival-date}.transporter[_ngcontent-%COMP%]{grid-area:transporter;display:flex;align-items:center;justify-content:flex-end}.arrow-wrapper[_ngcontent-%COMP%]{grid-area:arrow-wrapper;padding:1.5em 1em 2.5em}.arrow[_ngcontent-%COMP%]{background:#012486;width:6px;height:100%;position:relative}.arrow[_ngcontent-%COMP%]:before{top:-8px}.arrow[_ngcontent-%COMP%]:after, .arrow[_ngcontent-%COMP%]:before{content:"";position:absolute;width:16px;height:16px;background-color:#012486;border-radius:50%;left:-5px}.arrow[_ngcontent-%COMP%]:after{bottom:-8px}.estimated-date-label[_ngcontent-%COMP%]{margin-left:1.8em} .mat-button{font-weight:400;white-space:normal}'],changeDetection:0}),t})();function I9(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",11),r.cc("click",function(){return r.Ac(t),r.gc().f.containerId.reset()}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function P9(t,e){if(1&t&&(r.Vb(0,"mat-error"),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Lc(t.f.containerId.errors.invalid)}}function O9(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",11),r.cc("click",function(){return r.Ac(t),r.gc().f.billOfLading.reset()}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function M9(t,e){1&t&&(r.Vb(0,"div",12),r.Kc(1," Faites une recherche pour afficher les r\xe9sultats.\n"),r.Ub())}function T9(t,e){1&t&&(r.Vb(0,"div",12),r.Kc(1," Aucun r\xe9sultat "),r.Ub())}function R9(t,e){1&t&&r.Qb(0,"app-shipment-voyage",19),2&t&&r.nc("voyage",e.$implicit)}function V9(t,e){if(1&t&&(r.Vb(0,"div"),r.Vb(1,"div",17),r.Kc(2),r.Ub(),r.Ic(3,R9,1,1,"app-shipment-voyage",18),r.Ub()),2&t){const t=e.$implicit;r.Db(2),r.Mc("Transporteur : ",t.carrierId,""),r.Db(1),r.nc("ngForOf",t.voyages)}}function F9(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",14),r.Ic(1,V9,4,2,"div",15),r.Vb(2,"button",16),r.cc("click",function(){return r.Ac(t),r.gc(2).showRawResponse()}),r.Kc(3,"Afficher la r\xe9ponse brute"),r.Ub(),r.Ub()}if(2&t){const t=r.gc(2);r.Db(1),r.nc("ngForOf",t.searchResults)}}function L9(t,e){if(1&t&&(r.Ic(0,T9,2,0,"div",9),r.Ic(1,F9,4,1,"div",13)),2&t){const t=r.gc();r.nc("ngIf",0===t.searchResults.length),r.Db(1),r.nc("ngIf",t.searchResults.length>0)}}function U9(t){return!t.value||t.dirty&&b9()(t.value)?null:{invalid:"Le num\xe9ro doit \xeatre au format ISO 6346 (ex: TEXU3070079)."}}let B9=(()=>{class t extends LT{constructor(t,e,i,n,r,s){super(),this.formBuilder=t,this.router=e,this.uiService=i,this.titleService=n,this.dialog=r,this.workerService=s,this.searchResults=null,this.search=()=>Object(ue.a)(this,void 0,void 0,function*(){this.searchResults=null,this.searchForm.valid&&(this.searchResults=this.searchForm.controls.containerId.value?yield this.workerService.containers.findContainerTraceByContainerId(this.searchForm.controls.containerId.value):yield this.workerService.containers.findContainerTraceByBillOfLading(this.searchForm.controls.billOfLading.value),this.searchResults.length>0&&this.searchResults.forEach(t=>{t.voyages=t.voyages.sort((t,e)=>t.departure.date.value>=e.departure.date.value?-1:1)}))})}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.titleService.setTitle("Recherche de conteneur - ANAIS"),this.searchForm=this.formBuilder.group({containerId:["",[U9]],billOfLading:[""]},{validator:t=>t.controls.containerId.value||t.controls.billOfLading.value?null:{needOneField:!0}}),this.searchForm.controls.containerId.valueChanges.subscribe(t=>{t?this.f.billOfLading.disable({emitEvent:!1}):this.f.billOfLading.enable({emitEvent:!1})}),this.searchForm.controls.billOfLading.valueChanges.subscribe(t=>{t?this.f.containerId.disable({emitEvent:!1}):this.f.containerId.enable({emitEvent:!1})}),this.uiService.error("La recherche de conteneurs est suspendue car notre exp\xe9rimentation avec Semsoft est arriv\xe9e \xe0 terme."),yield this.router.navigateByUrl("/search/ships")})}get f(){return this.searchForm.controls}showRawResponse(){this.searchResults&&this.dialog.open(v9,{maxWidth:"90vw",maxHeight:"90vh",closeOnNavigation:!0,data:{title:"R\xe9ponse brute de l'API Lestr",content:JSON.stringify(this.searchResults,null,2)}})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Lh),r.Pb(sw),r.Pb(VI),r.Pb(he),r.Pb(Gl),r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-container-search-form"]],features:[r.Ab],decls:19,vars:8,consts:[[1,"pa-3","d-flex-column",3,"formGroup"],["matInput","","formControlName","containerId","minlength","11","maxlength","11"],["type","button","mat-button","","matSuffix","","mat-icon-button","","aria-label","R\xe9initialiser le champ",3,"click",4,"ngIf"],[4,"ngIf"],[1,"u-center"],["title","Bill of lading"],["matInput","","formControlName","billOfLading"],["mat-stroked-button","","type","submit","title","Lancer la rechercher",3,"app-async-action","disabled"],[1,"mt-3"],["class","pa-3",4,"ngIf"],[3,"ngIf"],["type","button","mat-button","","matSuffix","","mat-icon-button","","aria-label","R\xe9initialiser le champ",3,"click"],[1,"pa-3"],["class","d-flex-column mat-body scrollable",4,"ngIf"],[1,"d-flex-column","mat-body","scrollable"],[4,"ngFor","ngForOf"],["mat-button","","title","Afficher la r\xe9ponse brute",1,"mt-3",3,"click"],[1,"pa-2"],[3,"voyage",4,"ngFor","ngForOf"],[3,"voyage"]],template:function(t,e){1&t&&(r.Vb(0,"form",0),r.Vb(1,"mat-form-field"),r.Vb(2,"mat-label"),r.Kc(3,"Num\xe9ro de conteneur"),r.Ub(),r.Qb(4,"input",1),r.Ic(5,I9,3,0,"button",2),r.Ic(6,P9,2,1,"mat-error",3),r.Ub(),r.Vb(7,"div",4),r.Kc(8,"Ou"),r.Ub(),r.Vb(9,"mat-form-field"),r.Vb(10,"mat-label",5),r.Kc(11,"Connaissement"),r.Ub(),r.Qb(12,"input",6),r.Ic(13,O9,3,0,"button",2),r.Ub(),r.Vb(14,"button",7),r.Kc(15,"Rechercher"),r.Ub(),r.Qb(16,"mat-divider",8),r.Ub(),r.Ic(17,M9,2,0,"div",9),r.Ic(18,L9,2,2,"ng-template",10)),2&t&&(r.nc("formGroup",e.searchForm),r.Db(5),r.nc("ngIf",e.f.containerId.value),r.Db(1),r.nc("ngIf",null==e.f.containerId.errors?null:e.f.containerId.errors.invalid),r.Db(7),r.nc("ngIf",e.f.billOfLading.value),r.Db(1),r.nc("app-async-action",e.search)("disabled",!e.searchForm.valid),r.Db(3),r.nc("ngIf",null===e.searchResults),r.Db(1),r.nc("ngIf",null!==e.searchResults))},directives:[dh,Fc,_h,_u,cu,Ou,ac,Vc,Eh,Oh,Th,ut,Dl,dR,GT,fu,Yp,nu,ct,D9],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;overflow:hidden}"]}),t})();function N9(t,e){if(1&t&&(r.Vb(0,"a",5,6),r.Kc(2),r.Ub()),2&t){const t=e.$implicit,i=r.wc(1);r.pc("title","Onglet ",t.label,""),r.nc("routerLink",t.link)("active",i.isActive)("disabled",t.disabled),r.Db(2),r.Mc(" ",t.label," ")}}let j9=(()=>{class t extends LT{constructor(t,e){super(),this.titleService=t,this.mapService=e,this.tabs=[{label:"Navires",link:"ships"},{label:"Conteneurs",link:"containers",disabled:!0}]}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.titleService.setTitle("Recherche - ANAIS"),this.mapService.hasBooted||this.mapService.resetToDefaultView()})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(he),r.Pb(pI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-search-panel"]],features:[r.Ab],decls:7,vars:1,consts:[["joyrideStep","search-panel","title","Recherche","text","C'est ici que vous pouvez rechercher des navires ou conteneurs.",1,"panel","panel--medium"],[1,"panel__header","panel__header--blue"],[1,"panel__title"],["mat-tab-nav-bar","","mat-align-tabs","center"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active","disabled","title",4,"ngFor","ngForOf"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active","disabled","title"],["rla","routerLinkActive"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"h2",2),r.Kc(3,"Recherche"),r.Ub(),r.Ub(),r.Vb(4,"nav",3),r.Ic(5,N9,3,5,"a",4),r.Ub(),r.Qb(6,"router-outlet"),r.Ub()),2&t&&(r.Db(5),r.nc("ngForOf",e.tabs))},directives:[ax,rH,ct,hw,aw,lH,cw],encapsulation:2}),t})();function z9(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",8),r.cc("click",function(){return r.Ac(t),r.gc().f.shipId.reset()}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function H9(t,e){1&t&&(r.Vb(0,"mat-error"),r.Kc(1,"Ce champ est obligatoire"),r.Ub())}function K9(t,e){1&t&&(r.Vb(0,"div",9),r.Kc(1," Faites une recherche pour afficher les r\xe9sultats.\n"),r.Ub())}function $9(t,e){1&t&&(r.Vb(0,"div",9),r.Kc(1," Aucun r\xe9sultat "),r.Ub())}function G9(t,e){if(1&t&&(r.Vb(0,"app-ship-item",13),r.Vb(1,"div"),r.Kc(2,"R\xe9ception : "),r.Vb(3,"span",14),r.hc(4,"timeago"),r.Kc(5),r.hc(6,"date"),r.Ub(),r.Ub(),r.Ub()),2&t){const t=e.$implicit,i=r.gc(3);r.nc("ship",t),r.Db(3),r.oc("title",r.ic(4,3,1e3*t.timestamp)),r.Db(2),r.Lc(r.kc(6,5,1e3*t.timestamp,"yyyy-MM-dd HH:mm:ss z",i.mapConfigService.useUTCDates$.value&&"z"))}}function W9(t,e){if(1&t&&(r.Vb(0,"div",11),r.Ic(1,G9,7,9,"app-ship-item",12),r.Ub()),2&t){const t=r.gc(2);r.Db(1),r.nc("ngForOf",t.searchResults)}}function Z9(t,e){if(1&t&&(r.Ic(0,$9,2,0,"div",6),r.Ic(1,W9,2,1,"div",10)),2&t){const t=r.gc();r.nc("ngIf",0===t.searchResults.length),r.Db(1),r.nc("ngIf",t.searchResults.length>0)}}let q9=(()=>{class t extends LT{constructor(t,e,i,n){super(),this.formBuilder=t,this.titleService=e,this.mapConfigService=i,this.workerService=n,this.searchResults=null,this.search=()=>Object(ue.a)(this,void 0,void 0,function*(){this.searchForm.valid&&(this.searchResults=yield this.workerService.ships.findShips(this.searchForm.controls.shipId.value))})}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.titleService.setTitle("Recherche de navire - ANAIS"),this.searchForm=this.formBuilder.group({shipId:["",[pc.required,pc.minLength(1)]]})})}get f(){return this.searchForm.controls}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Lh),r.Pb(he),r.Pb(hI),r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-ship-search-form"]],features:[r.Ab],decls:12,vars:7,consts:[[1,"pa-3","d-flex-column",3,"formGroup"],["matInput","","formControlName","shipId","placeholder","Nom, MMSI, IMO...","minlength","1"],["type","button","mat-button","","matSuffix","","mat-icon-button","","aria-label","R\xe9initialiser le champ",3,"click",4,"ngIf"],[4,"ngIf"],["mat-stroked-button","","type","submit","title","Lancer la rechercher",3,"app-async-action","disabled"],[1,"mt-3"],["class","pa-3",4,"ngIf"],[3,"ngIf"],["type","button","mat-button","","matSuffix","","mat-icon-button","","aria-label","R\xe9initialiser le champ",3,"click"],[1,"pa-3"],["class","scrollable",4,"ngIf"],[1,"scrollable"],[3,"ship",4,"ngFor","ngForOf"],[3,"ship"],[3,"title"]],template:function(t,e){1&t&&(r.Vb(0,"form",0),r.Vb(1,"mat-form-field"),r.Vb(2,"mat-label"),r.Kc(3,"Identifiant"),r.Ub(),r.Qb(4,"input",1),r.Ic(5,z9,3,0,"button",2),r.Ic(6,H9,2,0,"mat-error",3),r.Ub(),r.Vb(7,"button",4),r.Kc(8,"Rechercher"),r.Ub(),r.Qb(9,"mat-divider",5),r.Ub(),r.Ic(10,K9,2,0,"div",6),r.Ic(11,Z9,2,2,"ng-template",7)),2&t&&(r.nc("formGroup",e.searchForm),r.Db(5),r.nc("ngIf",e.f.shipId.value),r.Db(1),r.nc("ngIf",null==e.f.shipId.errors?null:e.f.shipId.errors.required),r.Db(1),r.nc("app-async-action",e.search)("disabled",!e.searchForm.valid),r.Db(3),r.nc("ngIf",null===e.searchResults),r.Db(1),r.nc("ngIf",null!==e.searchResults))},directives:[dh,Fc,_h,_u,cu,Ou,ac,Vc,Eh,Oh,ut,Dl,dR,GT,fu,Yp,nu,ct,t9],pipes:[Tx,kt],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;overflow:hidden}"]}),t})();function Y9(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",7),r.cc("click",function(){r.Ac(t);const i=e.$implicit;return r.gc().addShipToFleet(i.id)}),r.Kc(1),r.Ub()}if(2&t){const t=e.$implicit;r.Db(1),r.Mc(" ",t.name," ")}}function Q9(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",8),r.cc("click",function(){return r.Ac(t),r.gc().showCreateFleetForm=!0}),r.Vb(1,"mat-icon"),r.Kc(2,"add"),r.Ub(),r.Kc(3," Cr\xe9er une flotte "),r.Ub()}}function X9(t,e){if(1&t){const t=r.Wb();r.Vb(0,"ng-form",null,9),r.Vb(2,"mat-form-field"),r.Vb(3,"input",10),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc().newFleetName=e}),r.Ub(),r.Ub(),r.Ub(),r.Vb(4,"button",11),r.cc("click",function(){return r.Ac(t),r.gc().createFleet()}),r.Kc(5," Cr\xe9er "),r.Ub()}if(2&t){const t=r.wc(1),e=r.gc();r.Db(3),r.nc("ngModel",e.newFleetName),r.Db(1),r.nc("disabled",!t.form.valid)}}let J9=(()=>{class t{constructor(t,e,i,n){this.data=t,this.fleetsService=e,this.workerService=i,this.dialogRef=n,this.showCreateFleetForm=!1,this.newFleetName=""}addShipToFleet(t){return Object(ue.a)(this,void 0,void 0,function*(){const e=GH(yield this.workerService.fleets.get(t));e.ships.includes(this.data.mmsi)||(e.ships.push(this.data.mmsi),yield this.fleetsService.updateFleet(e)),this.dialogRef.close()})}createFleet(){return Object(ue.a)(this,void 0,void 0,function*(){yield this.fleetsService.createFleet({name:this.newFleetName,ships:[this.data.mmsi]}),this.dialogRef.close()})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(jl),r.Pb(OT),r.Pb(_I.a),r.Pb(Bl))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-add-to-fleet-dialog"]],decls:14,vars:5,consts:[["mat-dialog-title","",1,"d-flex"],[1,"u-flex"],["mat-button","","title","Fermer le panneau",3,"mat-dialog-close"],[1,"d-flex-column"],["mat-button","","title","Ajouter \xe0 la flotte",3,"click",4,"ngFor","ngForOf"],["mat-button","",3,"click",4,"ngIf"],[3,"ngIf"],["mat-button","","title","Ajouter \xe0 la flotte",3,"click"],["mat-button","",3,"click"],["form","ngForm"],["matInput","","name","name","placeholder","Nom de la flotte","required","","maxlength","64",3,"ngModel","ngModelChange"],["mat-button","","color","primary","title","Cr\xe9er la flotte","data-test","create-fleet",1,"create-button",3,"disabled","click"]],template:function(t,e){1&t&&(r.Vb(0,"h1",0),r.Kc(1," Ajouter \xe0 la flotte ... "),r.Qb(2,"div",1),r.Vb(3,"button",2),r.Vb(4,"mat-icon"),r.Kc(5,"close"),r.Ub(),r.Ub(),r.Ub(),r.Qb(6,"mat-divider"),r.Vb(7,"div",3),r.Ic(8,Y9,2,1,"button",4),r.hc(9,"async"),r.Ub(),r.Qb(10,"mat-divider"),r.Vb(11,"div",3),r.Ic(12,Q9,4,0,"button",5),r.Ic(13,X9,6,2,"ng-template",6),r.Ub()),2&t&&(r.Db(8),r.nc("ngForOf",r.ic(9,3,e.fleetsService.fleets$)),r.Db(4),r.nc("ngIf",!e.showCreateFleetForm),r.Db(1),r.nc("ngIf",e.showCreateFleetForm))},directives:[ql,Dl,Zl,Yp,GT,ct,ut,oh,_u,Ou,ac,Ih,Th,Vc,uh],pipes:[St],styles:[".add-to-fleet-dialog .mat-dialog-container{padding:12px} .add-to-fleet-dialog .mat-dialog-content{margin:0 12px;padding:0 12px}.create-button[_ngcontent-%COMP%]{align-self:flex-end}"],changeDetection:0}),t})(),ttt=(()=>{class t extends LT{constructor(){super(...arguments),this.cancel=new r.o,this.save=new r.o}ngOnInit(){this.ensureMandatoryInputParams("initialValue"),this.value=this.initialValue}}return t.\u0275fac=function(e){return ett(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-ship-note-form"]],inputs:{initialValue:"initialValue"},outputs:{cancel:"cancel",save:"save"},features:[r.Ab],decls:15,vars:1,consts:[[1,"header","d-flex-center"],[1,"u-flex","pa-2"],["matTooltip","Cette note n'est accessible que par vous et ne concerne que ce navire.","matTooltipPosition","above",1,"help-icon"],["mat-button","","color","primary","title","Enregistrer les modifications",3,"click"],["mat-button","","color","warn","title","Annuler les modifications",3,"click"],["appearance","outline",1,"note","d-block","pa-2"],["matInput","","rows","5",3,"ngModel","ngModelChange"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Kc(2," Note "),r.Vb(3,"mat-icon",2),r.Kc(4,"help"),r.Ub(),r.Ub(),r.Vb(5,"button",3),r.cc("click",function(){return e.save.emit(e.value)}),r.Vb(6,"mat-icon"),r.Kc(7,"save"),r.Ub(),r.Ub(),r.Vb(8,"button",4),r.cc("click",function(){return e.cancel.emit(null)}),r.Vb(9,"mat-icon"),r.Kc(10,"clear"),r.Ub(),r.Ub(),r.Ub(),r.Vb(11,"mat-form-field",5),r.Vb(12,"mat-label"),r.Kc(13,"Contenu"),r.Ub(),r.Vb(14,"textarea",6),r.cc("ngModelChange",function(t){return e.value=t}),r.Ub(),r.Ub()),2&t&&(r.Db(14),r.nc("ngModel",e.value))},directives:[Yp,oA,Dl,_u,cu,Ou,ac,Vc,uh],styles:[".header[_ngcontent-%COMP%]{background-color:#abb8cb}.note[_ngcontent-%COMP%]{font-size:12px}.note[_ngcontent-%COMP%] .mat-form-field-wrapper{padding-bottom:0!important}"],changeDetection:0}),t})();const ett=r.Xb(ttt);function itt(t,e){1&t&&r.Qb(0,"mat-spinner",2)}function ntt(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-glitter",5),r.Vb(1,"button",6),r.cc("click",function(){return r.Ac(t),r.gc(2).showForm()}),r.Vb(2,"mat-icon"),r.Kc(3,"note_add"),r.Ub(),r.Kc(4," Ajouter une note "),r.Ub(),r.Ub()}}function rtt(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",7),r.Vb(1,"div",8),r.Kc(2," Note "),r.Vb(3,"mat-icon",9),r.Kc(4,"help"),r.Ub(),r.Ub(),r.Vb(5,"button",10),r.cc("click",function(){return r.Ac(t),r.gc(2).showForm()}),r.Vb(6,"mat-icon"),r.Kc(7,"edit"),r.Ub(),r.Ub(),r.Vb(8,"button",11),r.cc("click",function(){return r.Ac(t),r.gc(2).deleteNote()}),r.Vb(9,"mat-icon"),r.Kc(10,"delete"),r.Ub(),r.Ub(),r.Ub(),r.Vb(11,"div",12),r.Kc(12),r.Ub()}if(2&t){const t=r.gc(2);r.Db(12),r.Mc(" ",t.note," ")}}function stt(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-ship-note-form",13),r.cc("save",function(e){return r.Ac(t),r.gc(2).updateNote(e)})("cancel",function(){return r.Ac(t),r.gc(2).cancelEdition()}),r.Ub()}if(2&t){const t=r.gc(2);r.nc("initialValue",t.note)}}function ott(t,e){if(1&t&&(r.Ic(0,ntt,5,0,"app-glitter",3),r.Ic(1,rtt,13,1,"ng-template",1),r.Ic(2,stt,1,1,"app-ship-note-form",4)),2&t){const t=r.gc();r.nc("ngIf",!t.note&&!t.isEditing),r.Db(1),r.nc("ngIf",t.note&&!t.isEditing),r.Db(1),r.nc("ngIf",t.isEditing)}}let att=(()=>{class t extends LT{constructor(t){super(),this.workerService=t,this.update=new r.o,this.loading=!0,this.isEditing=!1,this.note=""}ngOnInit(){this.ensureMandatoryInputParams("mmsi")}ngOnChanges(t){return Object(ue.a)(this,void 0,void 0,function*(){t.mmsi&&(this.loading=!0,this.note=yield this.workerService.ships.getShipNote(this.mmsi),this.loading=!1)})}showForm(){this.isEditing=!0}deleteNote(){return Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.ships.updateShipNote(this.mmsi,""),this.note=""})}updateNote(t){return Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.ships.updateShipNote(this.mmsi,t),this.note=t,this.cancelEdition()})}cancelEdition(){this.isEditing=!1}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-ship-note"]],inputs:{mmsi:"mmsi"},outputs:{update:"update"},features:[r.Ab,r.Bb],decls:2,vars:2,consts:[["class","small-spinner","strokeWidth","4","diameter","60",4,"ngIf"],[3,"ngIf"],["strokeWidth","4","diameter","60",1,"small-spinner"],["gid","ship-note","date","2021-02-15",4,"ngIf"],[3,"initialValue","save","cancel",4,"ngIf"],["gid","ship-note","date","2021-02-15"],["mat-button","","title","Ajouter une note",1,"d-block",3,"click"],[1,"header","d-flex-center"],[1,"u-flex","pa-2"],["matTooltip","Cette note n'est accessible que par vous et ne concerne que ce navire.","matTooltipPosition","above",1,"help-icon"],["mat-button","","color","primary","title","\xc9diter la note",3,"click"],["mat-button","","color","warn","title","Supprimer la note",3,"click"],[1,"note","pa-2"],[3,"initialValue","save","cancel"]],template:function(t,e){1&t&&(r.Ic(0,itt,1,0,"mat-spinner",0),r.Ic(1,ott,3,3,"ng-template",1)),2&t&&(r.nc("ngIf",e.loading),r.Db(1),r.nc("ngIf",!e.loading))},directives:[ut,fF,DL,Dl,Yp,oA,ttt],styles:[".header[_ngcontent-%COMP%]{background-color:#abb8cb}.note[_ngcontent-%COMP%]{white-space:pre-line;font-size:12px;max-height:117px;overflow-y:auto}"]}),t})(),ltt=0;const ctt=new r.s("CdkAccordion");let htt=(()=>{class t{constructor(){this._stateChanges=new _e.a,this._openCloseAllActions=new _e.a,this.id="cdk-accordion-"+ltt++,this._multi=!1}get multi(){return this._multi}set multi(t){this._multi=ti(t)}openAll(){this._multi&&this._openCloseAllActions.next(!0)}closeAll(){this._openCloseAllActions.next(!1)}ngOnChanges(t){this._stateChanges.next(t)}ngOnDestroy(){this._stateChanges.complete(),this._openCloseAllActions.complete()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["cdk-accordion"],["","cdkAccordion",""]],inputs:{multi:"multi"},exportAs:["cdkAccordion"],features:[r.Cb([{provide:ctt,useExisting:t}]),r.Bb]}),t})(),utt=0,dtt=(()=>{class t{constructor(t,e,i){this.accordion=t,this._changeDetectorRef=e,this._expansionDispatcher=i,this._openCloseAllSubscription=ye.a.EMPTY,this.closed=new r.o,this.opened=new r.o,this.destroyed=new r.o,this.expandedChange=new r.o,this.id="cdk-accordion-child-"+utt++,this._expanded=!1,this._disabled=!1,this._removeUniqueSelectionListener=()=>{},this._removeUniqueSelectionListener=i.listen((t,e)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===e&&this.id!==t&&(this.expanded=!1)}),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}get expanded(){return this._expanded}set expanded(t){t=ti(t),this._expanded!==t&&(this._expanded=t,this.expandedChange.emit(t),t?(this.opened.emit(),this._expansionDispatcher.notify(this.id,this.accordion?this.accordion.id:this.id)):this.closed.emit(),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(t){this._disabled=ti(t)}ngOnDestroy(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()}toggle(){this.disabled||(this.expanded=!this.expanded)}close(){this.disabled||(this.expanded=!1)}open(){this.disabled||(this.expanded=!0)}_subscribeToOpenCloseAllActions(){return this.accordion._openCloseAllActions.subscribe(t=>{this.disabled||(this.expanded=t)})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(ctt,12),r.Pb(r.h),r.Pb(Jn))},t.\u0275dir=r.Kb({type:t,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:"expanded",disabled:"disabled"},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[r.Cb([{provide:ctt,useValue:void 0}])]}),t})(),ptt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({}),t})();const ftt=["body"];function mtt(t,e){}const gtt=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],Att=["mat-expansion-panel-header","*","mat-action-row"];function btt(t,e){if(1&t&&r.Qb(0,"span",2),2&t){const t=r.gc();r.nc("@indicatorRotate",t._getExpandedState())}}const vtt=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],_tt=["mat-panel-title","mat-panel-description","*"],ytt=new r.s("MAT_ACCORDION"),wtt={indicatorRotate:$r("indicatorRotate",[qr("collapsed, void",Zr({transform:"rotate(0deg)"})),qr("expanded",Zr({transform:"rotate(180deg)"})),Qr("expanded <=> collapsed, void => collapsed",Gr("225ms cubic-bezier(0.4,0.0,0.2,1)"))]),bodyExpansion:$r("bodyExpansion",[qr("collapsed, void",Zr({height:"0px",visibility:"hidden"})),qr("expanded",Zr({height:"*",visibility:"visible"})),Qr("expanded <=> collapsed, void => collapsed",Gr("225ms cubic-bezier(0.4,0.0,0.2,1)"))])};let xtt=(()=>{class t{constructor(t){this._template=t}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.O))},t.\u0275dir=r.Kb({type:t,selectors:[["ng-template","matExpansionPanelContent",""]]}),t})(),Ctt=0;const Stt=new r.s("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let ktt=(()=>{class t extends dtt{constructor(t,e,i,n,s,o,a){super(t,e,i),this._viewContainerRef=n,this._animationMode=o,this._hideToggle=!1,this.afterExpand=new r.o,this.afterCollapse=new r.o,this._inputChanges=new _e.a,this._headerId="mat-expansion-panel-header-"+Ctt++,this._bodyAnimationDone=new _e.a,this.accordion=t,this._document=s,this._bodyAnimationDone.pipe(mn((t,e)=>t.fromState===e.fromState&&t.toState===e.toState)).subscribe(t=>{"void"!==t.fromState&&("expanded"===t.toState?this.afterExpand.emit():"collapsed"===t.toState&&this.afterCollapse.emit())}),a&&(this.hideToggle=a.hideToggle)}get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(t){this._hideToggle=ti(t)}get togglePosition(){return this._togglePosition||this.accordion&&this.accordion.togglePosition}set togglePosition(t){this._togglePosition=t}_hasSpacing(){return!!this.accordion&&this.expanded&&"default"===this.accordion.displayMode}_getExpandedState(){return this.expanded?"expanded":"collapsed"}toggle(){this.expanded=!this.expanded}close(){this.expanded=!1}open(){this.expanded=!0}ngAfterContentInit(){this._lazyContent&&this.opened.pipe(Pn(null),He(()=>this.expanded&&!this._portal),Qe(1)).subscribe(()=>{this._portal=new fe(this._lazyContent._template,this._viewContainerRef)})}ngOnChanges(t){this._inputChanges.next(t)}ngOnDestroy(){super.ngOnDestroy(),this._bodyAnimationDone.complete(),this._inputChanges.complete()}_containsFocus(){if(this._body){const t=this._document.activeElement,e=this._body.nativeElement;return t===e||e.contains(t)}return!1}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(ytt,12),r.Pb(r.h),r.Pb(Jn),r.Pb(r.S),r.Pb(a),r.Pb(pa,8),r.Pb(Stt,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-expansion-panel"]],contentQueries:function(t,e,i){if(1&t&&r.Ib(i,xtt,1),2&t){let t;r.vc(t=r.dc())&&(e._lazyContent=t.first)}},viewQuery:function(t,e){if(1&t&&r.Pc(ftt,1),2&t){let t;r.vc(t=r.dc())&&(e._body=t.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(t,e){2&t&&r.Hb("mat-expanded",e.expanded)("_mat-animation-noopable","NoopAnimations"===e._animationMode)("mat-expansion-panel-spacing",e._hasSpacing())},inputs:{disabled:"disabled",expanded:"expanded",hideToggle:"hideToggle",togglePosition:"togglePosition"},outputs:{opened:"opened",closed:"closed",expandedChange:"expandedChange",afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],features:[r.Cb([{provide:ytt,useValue:void 0}]),r.Ab,r.Bb],ngContentSelectors:Att,decls:7,vars:4,consts:[["role","region",1,"mat-expansion-panel-content",3,"id"],["body",""],[1,"mat-expansion-panel-body"],[3,"cdkPortalOutlet"]],template:function(t,e){1&t&&(r.mc(gtt),r.lc(0),r.Vb(1,"div",0,1),r.cc("@bodyExpansion.done",function(t){return e._bodyAnimationDone.next(t)}),r.Vb(3,"div",2),r.lc(4,1),r.Ic(5,mtt,0,0,"ng-template",3),r.Ub(),r.lc(6,2),r.Ub()),2&t&&(r.Db(1),r.nc("@bodyExpansion",e._getExpandedState())("id",e.id),r.Eb("aria-labelledby",e._headerId),r.Db(4),r.nc("cdkPortalOutlet",e._portal))},directives:[be],styles:[".mat-expansion-panel{box-sizing:content-box;display:block;margin:0;border-radius:4px;overflow:hidden;transition:margin 225ms cubic-bezier(0.4, 0, 0.2, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);position:relative}.mat-accordion .mat-expansion-panel:not(.mat-expanded),.mat-accordion .mat-expansion-panel:not(.mat-expansion-panel-spacing){border-radius:0}.mat-accordion .mat-expansion-panel:first-of-type{border-top-right-radius:4px;border-top-left-radius:4px}.mat-accordion .mat-expansion-panel:last-of-type{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.cdk-high-contrast-active .mat-expansion-panel{outline:solid 1px}.mat-expansion-panel.ng-animate-disabled,.ng-animate-disabled .mat-expansion-panel,.mat-expansion-panel._mat-animation-noopable{transition:none}.mat-expansion-panel-content{display:flex;flex-direction:column;overflow:visible}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>*:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>*:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px}.mat-action-row button.mat-button-base,.mat-action-row button.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-action-row button.mat-button-base,[dir=rtl] .mat-action-row button.mat-mdc-button-base{margin-left:0;margin-right:8px}\n"],encapsulation:2,data:{animation:[wtt.bodyExpansion]},changeDetection:0}),t})(),Ett=(()=>{class t{constructor(t,e,i,n,r,s){this.panel=t,this._element=e,this._focusMonitor=i,this._changeDetectorRef=n,this._animationMode=s,this._parentChangeSubscription=ye.a.EMPTY;const o=t.accordion?t.accordion._stateChanges.pipe(He(t=>!(!t.hideToggle&&!t.togglePosition))):qe;this._parentChangeSubscription=Object(or.a)(t.opened,t.closed,o,t._inputChanges.pipe(He(t=>!!(t.hideToggle||t.disabled||t.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),t.closed.pipe(He(()=>t._containsFocus())).subscribe(()=>i.focusVia(e,"program")),r&&(this.expandedHeight=r.expandedHeight,this.collapsedHeight=r.collapsedHeight)}get disabled(){return this.panel.disabled}_toggle(){this.disabled||this.panel.toggle()}_isExpanded(){return this.panel.expanded}_getExpandedState(){return this.panel._getExpandedState()}_getPanelId(){return this.panel.id}_getTogglePosition(){return this.panel.togglePosition}_showToggle(){return!this.panel.hideToggle&&!this.panel.disabled}_getHeaderHeight(){const t=this._isExpanded();return t&&this.expandedHeight?this.expandedHeight:!t&&this.collapsedHeight?this.collapsedHeight:null}_keydown(t){switch(t.keyCode){case 32:case 13:ke(t)||(t.preventDefault(),this._toggle());break;default:return void(this.panel.accordion&&this.panel.accordion._handleHeaderKeydown(t))}}focus(t,e){t?this._focusMonitor.focusVia(this._element,t,e):this._element.nativeElement.focus(e)}ngAfterViewInit(){this._focusMonitor.monitor(this._element).subscribe(t=>{t&&this.panel.accordion&&this.panel.accordion._handleHeaderFocus(this)})}ngOnDestroy(){this._parentChangeSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(ktt,1),r.Pb(r.l),r.Pb(qi),r.Pb(r.h),r.Pb(Stt,8),r.Pb(pa,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-expansion-panel-header"]],hostAttrs:["role","button",1,"mat-expansion-panel-header","mat-focus-indicator"],hostVars:15,hostBindings:function(t,e){1&t&&r.cc("click",function(){return e._toggle()})("keydown",function(t){return e._keydown(t)}),2&t&&(r.Eb("id",e.panel._headerId)("tabindex",e.disabled?-1:0)("aria-controls",e._getPanelId())("aria-expanded",e._isExpanded())("aria-disabled",e.panel.disabled),r.Fc("height",e._getHeaderHeight()),r.Hb("mat-expanded",e._isExpanded())("mat-expansion-toggle-indicator-after","after"===e._getTogglePosition())("mat-expansion-toggle-indicator-before","before"===e._getTogglePosition())("_mat-animation-noopable","NoopAnimations"===e._animationMode))},inputs:{expandedHeight:"expandedHeight",collapsedHeight:"collapsedHeight"},ngContentSelectors:_tt,decls:5,vars:1,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(t,e){1&t&&(r.mc(vtt),r.Vb(0,"span",0),r.lc(1),r.lc(2,1),r.lc(3,2),r.Ub(),r.Ic(4,btt,1,1,"span",1)),2&t&&(r.Db(4),r.nc("ngIf",e._showToggle()))},directives:[ut],styles:['.mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px;border-radius:inherit;transition:height 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel-header._mat-animation-noopable{transition:none}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:none}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before{flex-direction:row-reverse}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 16px 0 0}[dir=rtl] .mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 0 0 16px}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-expansion-panel-header-title,.mat-expansion-panel-header-description{display:flex;flex-grow:1;margin-right:16px}[dir=rtl] .mat-expansion-panel-header-title,[dir=rtl] .mat-expansion-panel-header-description{margin-right:0;margin-left:16px}.mat-expansion-panel-header-description{flex-grow:2}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:"";display:inline-block;padding:3px;transform:rotate(45deg);vertical-align:middle}.cdk-high-contrast-active .mat-expansion-panel .mat-expansion-panel-header.cdk-keyboard-focused:not([aria-disabled=true])::before,.cdk-high-contrast-active .mat-expansion-panel .mat-expansion-panel-header.cdk-program-focused:not([aria-disabled=true])::before,.cdk-high-contrast-active .mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:hover:not([aria-disabled=true])::before{top:0;left:0;right:0;bottom:0;position:absolute;box-sizing:border-box;pointer-events:none;border:3px solid;border-radius:4px;content:""}\n'],encapsulation:2,data:{animation:[wtt.indicatorRotate]},changeDetection:0}),t})(),Dtt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),t})(),Itt=(()=>{class t extends htt{constructor(){super(...arguments),this._ownHeaders=new r.F,this._hideToggle=!1,this.displayMode="default",this.togglePosition="after"}get hideToggle(){return this._hideToggle}set hideToggle(t){this._hideToggle=ti(t)}ngAfterContentInit(){this._headers.changes.pipe(Pn(this._headers)).subscribe(t=>{this._ownHeaders.reset(t.filter(t=>t.panel.accordion===this)),this._ownHeaders.notifyOnChanges()}),this._keyManager=new Ri(this._ownHeaders).withWrap().withHomeAndEnd()}_handleHeaderKeydown(t){this._keyManager.onKeydown(t)}_handleHeaderFocus(t){this._keyManager.updateActiveItem(t)}ngOnDestroy(){super.ngOnDestroy(),this._ownHeaders.destroy()}}return t.\u0275fac=function(e){return Ptt(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["mat-accordion"]],contentQueries:function(t,e,i){if(1&t&&r.Ib(i,Ett,1),2&t){let t;r.vc(t=r.dc())&&(e._headers=t)}},hostAttrs:[1,"mat-accordion"],hostVars:2,hostBindings:function(t,e){2&t&&r.Hb("mat-accordion-multi",e.multi)},inputs:{multi:"multi",displayMode:"displayMode",togglePosition:"togglePosition",hideToggle:"hideToggle"},exportAs:["matAccordion"],features:[r.Cb([{provide:ytt,useExisting:t}]),r.Ab]}),t})();const Ptt=r.Xb(Itt);let Ott=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Et,Sa,ptt,ve]]}),t})();const Mtt=function(t){return["/ships/",t]};function Ttt(t,e){if(1&t&&(r.Vb(0,"button",12),r.Vb(1,"mat-icon"),r.Kc(2,"info"),r.Ub(),r.Kc(3," Voir d\xe9tail Navire "),r.Ub()),2&t){const t=r.gc();r.nc("routerLink",r.sc(1,Mtt,t.event.data.mmsi))}}let Rtt=(()=>{class t extends LT{constructor(t,e,i,n,r,s,o){super(),this.domSanitizer=t,this.mapService=e,this.configService=i,this.historyService=n,this.interactionsService=r,this.mapConfigService=s,this.zonesService=o,this.highlight=!1,this.eventTypeLabelByKey=FP,this.EventType=UP}ngOnInit(){this.ensureMandatoryInputParams("event")}ngOnChanges(t){t.event&&(j3(this.event,this.zonesService.zonesById),this.additionalInfos=this.domSanitizer.bypassSecurityTrustHtml(this.event.additionalInfos))}locate(t){this.configService.devMode&&console.log("locate-event",JSON.stringify(t,null,2)),this.interactionsService.selectEventItem$.next(t)}locateAndZoom(t){this.mapService.locate([t.lon,t.lat])}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(ne),r.Pb(pI),r.Pb(cI),r.Pb(bI),r.Pb(ET),r.Pb(hI),r.Pb(kP))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-event-item"]],inputs:{event:"event",highlight:"highlight"},features:[r.Ab,r.Bb],decls:21,vars:16,consts:[[1,"event-item"],["mat-button","","title","Localiser l'\xe9v\xe9nement (double-clic = zoom)",1,"event-item__locate-button",3,"click","dblclick"],[1,"event-item__locate-button-content"],[1,"event-item__content"],[1,"event-item__title"],[1,"event-item__additional-infos",3,"innerHTML"],[1,"event-item__timestamp",3,"title"],["mat-button","","title","Actions",3,"matMenuTriggerFor"],[1,"event-item__actions-menu"],["eventActionsMenu","matMenu"],["mat-menu-item","","title","Ouvrir la fiche navire",3,"routerLink",4,"ngIf"],["mat-menu-item","","title","Visualiser la situation des navires",3,"click"],["mat-menu-item","","title","Ouvrir la fiche navire",3,"routerLink"]],template:function(t,e){if(1&t&&(r.Vb(0,"div",0),r.Vb(1,"button",1),r.cc("click",function(){return e.locate(e.event)})("dblclick",function(){return e.locateAndZoom(e.event)}),r.Vb(2,"div",2),r.Vb(3,"div",3),r.Vb(4,"div",4),r.Kc(5),r.Ub(),r.Qb(6,"div",5),r.Vb(7,"div",6),r.hc(8,"timeago"),r.Kc(9),r.hc(10,"date"),r.Ub(),r.Ub(),r.Ub(),r.Ub(),r.Vb(11,"button",7),r.Vb(12,"mat-icon"),r.Kc(13,"more_vert"),r.Ub(),r.Ub(),r.Vb(14,"mat-menu",8,9),r.Ic(16,Ttt,4,3,"button",10),r.Vb(17,"button",11),r.cc("click",function(){return e.historyService.setTimestamp(e.event.timestamp)}),r.Vb(18,"mat-icon"),r.Kc(19,"history"),r.Ub(),r.Kc(20," Visualiser la situation des navires "),r.Ub(),r.Ub(),r.Ub()),2&t){const t=r.wc(15);r.Fc("border-left-color",e.event.color),r.Hb("event-item--highlighted",e.highlight),r.Db(5),r.Mc(" ",e.eventTypeLabelByKey[e.event.type]||"Inconnu"," "),r.Db(1),r.nc("innerHTML",e.additionalInfos,r.Bc),r.Db(1),r.oc("title",r.ic(8,10,1e3*e.event.timestamp)),r.Db(2),r.Mc(" ",r.kc(10,12,1e3*e.event.timestamp,"yyyy-MM-dd HH:mm:ss z",e.mapConfigService.useUTCDates$.value&&"z")," "),r.Db(2),r.nc("matMenuTriggerFor",t),r.Db(5),r.nc("ngIf",e.event.type===e.EventType.MoveMeetingAtSea)}},directives:[Dl,sU,Yp,eU,ut,QL,ow],pipes:[Tx,kt],styles:[".event-item{display:flex;align-items:stretch;justify-content:stretch;transition:background-color 2s ease-out;min-height:82px;border-left:10px solid}.event-item--highlighted{background-color:#f32121;transition:0s}.event-item__locate-button{flex:1;font-weight:inherit!important;padding:0}.event-item__locate-button-content{display:flex;align-items:center}.event-item__icon{line-height:0;padding:1em}.event-item__content{flex:1;display:flex;flex-direction:column;align-items:flex-start;line-height:24px;padding:8px}.event-item__title{width:100%;display:flex;justify-content:space-between;align-items:center;font-size:1.1em;font-weight:600}.event-item__additional-infos{text-align:left;font-size:.9em;line-height:1.5em;font-weight:400;white-space:normal}.event-item__additional-infos b{color:#172db7}.event-item__timestamp{color:#424242;font-weight:500}.event-item__actions-menu{max-width:inherit}"],encapsulation:2,changeDetection:0}),t})();const Vtt=["eventElements"];function Ftt(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-list-item"),r.Vb(1,"mat-checkbox",10),r.cc("ngModelChange",function(){r.Ac(t);const i=e.$implicit;return r.gc().toggleEventFilter(i.key)}),r.Kc(2),r.Ub(),r.Ub()}if(2&t){const t=e.$implicit,i=r.gc();r.Db(1),r.Fc("color",t.textColor),r.nc("ngModel",i.eventsFilter[t.key]),r.Db(1),r.Lc(t.label)}}function Ltt(t,e){if(1&t&&r.Qb(0,"app-event-item",11,12),2&t){const t=e.$implicit,i=r.gc();r.nc("event",t)("highlight",t.id===i.highlightedEventId),r.Eb("data-id",t.id)}}function Utt(t,e){1&t&&(r.Vb(0,"div",13),r.Kc(1," Aucun \xe9v\xe9nement ne correspond aux filtres\n"),r.Ub())}function Btt(t,e){1&t&&(r.Vb(0,"div",13),r.Kc(1," Aucun \xe9v\xe9nement pour cette p\xe9riode\n"),r.Ub())}let Ntt=(()=>{class t extends LT{constructor(t,e,i,n){super(),this.changeDetectorRef=t,this.ngZone=e,this.configService=i,this.interactionsService=n,this.filteredEvents=[],this.displayedEvents=[],this.currentEventsPageIndex=0,this.eventsPageSize=30,this.highlightedEventId=null,this.eventTypes=VP,this.eventsFilter$=new Av.a(null),this.currentEventsPageIndex$=new Av.a(0),this.filteredEvents$=new Av.a([])}ngOnInit(){this.ensureMandatoryInputParams("events$"),this.configService.eventsFilter?this.eventsFilter$.next(this.configService.eventsFilter):this.resetEventsFilter(),this.subscriptions.push(this.events$.subscribe(t=>{this.events=t})),this.subscriptions.push(Hg([this.events$,this.eventsFilter$]).pipe(Object(Ge.a)(([t,e])=>{if(!t.length)return[];const i=Object.entries(e).filter(([,t])=>t).map(([t])=>t);return t.filter(t=>0===i.length||i.includes(`${t.type}`))})).subscribe(t=>{this.filteredEvents=t,this.filteredEvents$.next(t)})),this.subscriptions.push(Hg([this.filteredEvents$,this.currentEventsPageIndex$]).pipe(He(([t,e])=>{if(0===t.length&&0!==e)return this.showEventsPage(0),!1;const i=e*this.eventsPageSize;if(0===t.slice(i,i+this.eventsPageSize).length&&t.length>0){const e=Math.ceil(t.length/this.eventsPageSize)-1;return this.showEventsPage(-1===e?0:e),!1}return!0}),Object(Ge.a)(([t,e])=>{const i=e*this.eventsPageSize;return t.slice(i,i+this.eventsPageSize)})).subscribe(t=>{this.displayedEvents=t,this.changeDetectorRef.markForCheck()})),this.subscriptions.push(this.eventsFilter$.subscribe(t=>{this.eventsFilter=t,this.configService.set("eventsFilter",t),this.showEventsPage(0)})),this.subscriptions.push(this.interactionsService.selectEventFeature$.subscribe(t=>{const e=this.getPageIndexForEventId(t.id);-1!==e&&this.currentEventsPageIndex!==e&&this.showEventsPage(e),setTimeout(()=>{const e=this.eventElements.find(e=>e.nativeElement.dataset.id===t.id);e&&e.nativeElement.scrollIntoView({behavior:"smooth"})},225),this.highlightedEventId=t.id,this.ngZone.run(()=>{setTimeout(()=>{this.highlightedEventId=null,this.changeDetectorRef.markForCheck()},16),this.changeDetectorRef.markForCheck()})}))}get activeEventsFiltersCount(){const t=Object.values(this.eventsFilter).filter(t=>t).length;return t===VP.length?0:t}toggleEventFilter(t){this.eventsFilter[t]=!this.eventsFilter[t],this.eventsFilter$.next(this.eventsFilter),this.triggerEventsFilterUpdate()}updateEventRulesFilter(t){this.eventsFilter=t,this.triggerEventsFilterUpdate()}resetEventsFilter(){const t=VP.map(t=>t.label).reduce((t,[e])=>(t[e]=!1,t),{});this.updateEventRulesFilter(t)}triggerEventsFilterUpdate(){this.eventsFilter$.next(this.eventsFilter)}showEventsPage(t){this.currentEventsPageIndex$.next(t),this.currentEventsPageIndex=t}trackByIndex(t){return t}getPageIndexForEventId(t){const e=this.filteredEvents.findIndex(e=>e.id===t);if(-1===e)return-1;const i=Math.ceil((e+1)/this.eventsPageSize)-1;return-1===i?0:i}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(r.B),r.Pb(cI),r.Pb(ET))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-events-list"]],viewQuery:function(t,e){if(1&t&&r.Pc(Vtt,1,r.l),2&t){let t;r.vc(t=r.dc())&&(e.eventElements=t)}},inputs:{events$:"events$"},features:[r.Ab],decls:16,vars:11,consts:[["mat-button","","title","Filtrer les \xe9v\xe9nements",1,"events-list__filters",3,"color","matMenuTriggerFor"],[1,"u-wide-menu"],["eventsFilterMenu","matMenu"],[3,"click"],["mat-subheader",""],["mat-button","","title","R\xe9initialiser les filtres",1,"events-list__reset-filters-btn",3,"click"],[4,"ngFor","ngForOf"],[3,"event","highlight",4,"ngFor","ngForOf","ngForTrackBy"],["class","panel__content u-center",4,"ngIf"],["showFirstLastButtons","","hidePageSize","",3,"pageIndex","length","pageSize","page"],[3,"ngModel","ngModelChange"],[3,"event","highlight"],["eventElements",""],[1,"panel__content","u-center"]],template:function(t,e){if(1&t&&(r.Vb(0,"button",0),r.Vb(1,"mat-icon"),r.Kc(2,"filter_list"),r.Ub(),r.Kc(3),r.Ub(),r.Vb(4,"mat-menu",1,2),r.Vb(6,"mat-list",3),r.cc("click",function(t){return t.stopPropagation()}),r.Vb(7,"h3",4),r.Kc(8," Filtres d'\xe9v\xe9n\xe9ment "),r.Vb(9,"button",5),r.cc("click",function(){return e.resetEventsFilter()}),r.Kc(10," R\xe9initialiser "),r.Ub(),r.Ub(),r.Ic(11,Ftt,3,4,"mat-list-item",6),r.Ub(),r.Ub(),r.Ic(12,Ltt,2,3,"app-event-item",7),r.Ic(13,Utt,2,0,"div",8),r.Ic(14,Btt,2,0,"div",8),r.Vb(15,"mat-paginator",9),r.cc("page",function(t){return e.showEventsPage(t.pageIndex)}),r.Ub()),2&t){const t=r.wc(5);r.nc("color",e.activeEventsFiltersCount?"primary":"default")("matMenuTriggerFor",t),r.Db(3),r.Mc(" ",e.activeEventsFiltersCount>0?e.activeEventsFiltersCount+" filtre(s) d'\xe9v\xe9nement actif(s)":"Aucun filtre d'\xe9v\xe9nement actif","\n"),r.Db(8),r.nc("ngForOf",e.eventTypes),r.Db(1),r.nc("ngForOf",e.displayedEvents)("ngForTrackBy",e.trackByIndex),r.Db(1),r.nc("ngIf",!e.filteredEvents.length&&e.events.length),r.Db(1),r.nc("ngIf",!e.events.length),r.Db(1),r.nc("pageIndex",e.currentEventsPageIndex)("length",e.filteredEvents.length)("pageSize",e.eventsPageSize)}},directives:[Dl,sU,Yp,eU,yU,CU,ct,ut,yA,SU,tF,Vc,uh,Rtt],styles:[".events-list__filters[_ngcontent-%COMP%]{background-color:#e4e7ec;width:100%}.events-list__reset-filters-btn[_ngcontent-%COMP%]{margin-left:2em}"],changeDetection:0}),t})();const jtt=["button"],ztt=["*"],Htt=new r.s("MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS"),Ktt=new r.s("MatButtonToggleGroup"),$tt={provide:rc,useExisting:Object(r.W)(()=>Ztt),multi:!0};let Gtt=0;class Wtt{constructor(t,e){this.source=t,this.value=e}}let Ztt=(()=>{class t{constructor(t,e){this._changeDetector=t,this._vertical=!1,this._multiple=!1,this._disabled=!1,this._controlValueAccessorChangeFn=()=>{},this._onTouched=()=>{},this._name="mat-button-toggle-group-"+Gtt++,this.valueChange=new r.o,this.change=new r.o,this.appearance=e&&e.appearance?e.appearance:"standard"}get name(){return this._name}set name(t){this._name=t,this._buttonToggles&&this._buttonToggles.forEach(t=>{t.name=this._name,t._markForCheck()})}get vertical(){return this._vertical}set vertical(t){this._vertical=ti(t)}get value(){const t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t.map(t=>t.value):t[0]?t[0].value:void 0}set value(t){this._setSelectionByValue(t),this.valueChange.emit(this.value)}get selected(){const t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t:t[0]||null}get multiple(){return this._multiple}set multiple(t){this._multiple=ti(t)}get disabled(){return this._disabled}set disabled(t){this._disabled=ti(t),this._buttonToggles&&this._buttonToggles.forEach(t=>t._markForCheck())}ngOnInit(){this._selectionModel=new Xn(this.multiple,void 0,!1)}ngAfterContentInit(){this._selectionModel.select(...this._buttonToggles.filter(t=>t.checked))}writeValue(t){this.value=t,this._changeDetector.markForCheck()}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t}_emitChangeEvent(){const t=this.selected,e=Array.isArray(t)?t[t.length-1]:t,i=new Wtt(e,this.value);this._controlValueAccessorChangeFn(i.value),this.change.emit(i)}_syncButtonToggle(t,e,i=!1,n=!1){this.multiple||!this.selected||t.checked||(this.selected.checked=!1),this._selectionModel?e?this._selectionModel.select(t):this._selectionModel.deselect(t):n=!0,n?Promise.resolve().then(()=>this._updateModelValue(i)):this._updateModelValue(i)}_isSelected(t){return this._selectionModel&&this._selectionModel.isSelected(t)}_isPrechecked(t){return void 0!==this._rawValue&&(this.multiple&&Array.isArray(this._rawValue)?this._rawValue.some(e=>null!=t.value&&e===t.value):t.value===this._rawValue)}_setSelectionByValue(t){this._rawValue=t,this._buttonToggles&&(this.multiple&&t?(Array.isArray(t),this._clearSelection(),t.forEach(t=>this._selectValue(t))):(this._clearSelection(),this._selectValue(t)))}_clearSelection(){this._selectionModel.clear(),this._buttonToggles.forEach(t=>t.checked=!1)}_selectValue(t){const e=this._buttonToggles.find(e=>null!=e.value&&e.value===t);e&&(e.checked=!0,this._selectionModel.select(e))}_updateModelValue(t){t&&this._emitChangeEvent(),this.valueChange.emit(this.value)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(Htt,8))},t.\u0275dir=r.Kb({type:t,selectors:[["mat-button-toggle-group"]],contentQueries:function(t,e,i){if(1&t&&r.Ib(i,Qtt,1),2&t){let t;r.vc(t=r.dc())&&(e._buttonToggles=t)}},hostAttrs:["role","group",1,"mat-button-toggle-group"],hostVars:5,hostBindings:function(t,e){2&t&&(r.Eb("aria-disabled",e.disabled),r.Hb("mat-button-toggle-vertical",e.vertical)("mat-button-toggle-group-appearance-standard","standard"===e.appearance))},inputs:{appearance:"appearance",name:"name",vertical:"vertical",value:"value",multiple:"multiple",disabled:"disabled"},outputs:{valueChange:"valueChange",change:"change"},exportAs:["matButtonToggleGroup"],features:[r.Cb([$tt,{provide:Ktt,useExisting:t}])]}),t})();class qtt{}const Ytt=Da(qtt);let Qtt=(()=>{class t extends Ytt{constructor(t,e,i,n,s,o){super(),this._changeDetectorRef=e,this._elementRef=i,this._focusMonitor=n,this._isSingleSelector=!1,this._checked=!1,this.ariaLabelledby=null,this._disabled=!1,this.change=new r.o;const a=Number(s);this.tabIndex=a||0===a?a:null,this.buttonToggleGroup=t,this.appearance=o&&o.appearance?o.appearance:"standard"}get buttonId(){return`${this.id}-button`}get appearance(){return this.buttonToggleGroup?this.buttonToggleGroup.appearance:this._appearance}set appearance(t){this._appearance=t}get checked(){return this.buttonToggleGroup?this.buttonToggleGroup._isSelected(this):this._checked}set checked(t){const e=ti(t);e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&this.buttonToggleGroup._syncButtonToggle(this,this._checked),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled}set disabled(t){this._disabled=ti(t)}ngOnInit(){const t=this.buttonToggleGroup;this._isSingleSelector=t&&!t.multiple,this.id=this.id||"mat-button-toggle-"+Gtt++,this._isSingleSelector&&(this.name=t.name),t&&(t._isPrechecked(this)?this.checked=!0:t._isSelected(this)!==this._checked&&t._syncButtonToggle(this,this._checked))}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){const t=this.buttonToggleGroup;this._focusMonitor.stopMonitoring(this._elementRef),t&&t._isSelected(this)&&t._syncButtonToggle(this,!1,!1,!0)}focus(t){this._buttonElement.nativeElement.focus(t)}_onButtonClick(){const t=!!this._isSingleSelector||!this._checked;t!==this._checked&&(this._checked=t,this.buttonToggleGroup&&(this.buttonToggleGroup._syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup._onTouched())),this.change.emit(new Wtt(this,this.value))}_markForCheck(){this._changeDetectorRef.markForCheck()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Ktt,8),r.Pb(r.h),r.Pb(r.l),r.Pb(qi),r.ac("tabindex"),r.Pb(Htt,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-button-toggle"]],viewQuery:function(t,e){if(1&t&&r.Pc(jtt,1),2&t){let t;r.vc(t=r.dc())&&(e._buttonElement=t.first)}},hostAttrs:["role","presentation",1,"mat-button-toggle"],hostVars:12,hostBindings:function(t,e){1&t&&r.cc("focus",function(){return e.focus()}),2&t&&(r.Eb("aria-label",null)("aria-labelledby",null)("id",e.id)("name",null),r.Hb("mat-button-toggle-standalone",!e.buttonToggleGroup)("mat-button-toggle-checked",e.checked)("mat-button-toggle-disabled",e.disabled)("mat-button-toggle-appearance-standard","standard"===e.appearance))},inputs:{disableRipple:"disableRipple",ariaLabelledby:["aria-labelledby","ariaLabelledby"],tabIndex:"tabIndex",appearance:"appearance",checked:"checked",disabled:"disabled",id:"id",name:"name",ariaLabel:["aria-label","ariaLabel"],value:"value"},outputs:{change:"change"},exportAs:["matButtonToggle"],features:[r.Ab],ngContentSelectors:ztt,decls:6,vars:9,consts:[["type","button",1,"mat-button-toggle-button","mat-focus-indicator",3,"id","disabled","click"],["button",""],[1,"mat-button-toggle-label-content"],[1,"mat-button-toggle-focus-overlay"],["matRipple","",1,"mat-button-toggle-ripple",3,"matRippleTrigger","matRippleDisabled"]],template:function(t,e){if(1&t&&(r.mc(),r.Vb(0,"button",0,1),r.cc("click",function(){return e._onButtonClick()}),r.Vb(2,"span",2),r.lc(3),r.Ub(),r.Ub(),r.Qb(4,"span",3),r.Qb(5,"span",4)),2&t){const t=r.wc(1);r.nc("id",e.buttonId)("disabled",e.disabled||null),r.Eb("tabindex",e.disabled?-1:e.tabIndex)("aria-pressed",e.checked)("name",e.name||null)("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby),r.Db(5),r.nc("matRippleTrigger",t)("matRippleDisabled",e.disableRipple||e.disabled)}},directives:[il],styles:[".mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;border-radius:2px;-webkit-tap-highlight-color:transparent}.cdk-high-contrast-active .mat-button-toggle-standalone,.cdk-high-contrast-active .mat-button-toggle-group{outline:solid 1px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:4px}.cdk-high-contrast-active .mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.cdk-high-contrast-active .mat-button-toggle-group-appearance-standard{outline:0}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:1}.cdk-high-contrast-active .mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:.5}.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{opacity:.04}.mat-button-toggle-appearance-standard.cdk-keyboard-focused:not(.mat-button-toggle-disabled) .mat-button-toggle-focus-overlay{opacity:.12}.cdk-high-contrast-active .mat-button-toggle-appearance-standard.cdk-keyboard-focused:not(.mat-button-toggle-disabled) .mat-button-toggle-focus-overlay{opacity:.5}@media(hover: none){.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-block;line-height:36px;padding:0 16px;position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{border-radius:inherit;pointer-events:none;opacity:0;top:0;left:0;right:0;bottom:0;position:absolute}.mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 36px}.cdk-high-contrast-active .mat-button-toggle-checked .mat-button-toggle-focus-overlay{opacity:.5;height:0}.cdk-high-contrast-active .mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}\n"],encapsulation:2,changeDetection:0}),t})(),Xtt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Sa,nl],Sa]}),t})(),Jtt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-vertical-arrow"]],decls:3,vars:0,consts:[[1,"head"],[1,"shaft"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Kc(1,"\xa0"),r.Ub(),r.Qb(2,"div",1))},styles:["[_nghost-%COMP%]{margin:6px;width:20px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-direction:column;align-items:center}.head[_ngcontent-%COMP%]{height:16px;width:16px;border-bottom:4px solid;transform:rotate(-135deg)}.head[_ngcontent-%COMP%], .shaft[_ngcontent-%COMP%]{border-right:4px solid;color:#595959}.shaft[_ngcontent-%COMP%]{height:100%;margin-top:-16px}"],changeDetection:0}),t})();function tet(t,e){if(1&t&&(r.Vb(0,"div",6),r.hc(1,"timeago"),r.Kc(2),r.hc(3,"date"),r.Ub()),2&t){const t=r.gc();r.pc("title","Heure de d\xe9part : ",r.ic(1,2,1e3*t.portCall.stop),""),r.Db(2),r.Mc(" ",r.kc(3,4,1e3*t.portCall.stop,"yyyy-MM-dd HH:mm:ss z",t.mapConfigService.useUTCDates$.value&&"z")," ")}}function eet(t,e){if(1&t&&(r.Vb(0,"div",7),r.Vb(1,"mat-icon",8),r.Kc(2,"timelapse"),r.Ub(),r.Kc(3),r.Ub()),2&t){const t=r.gc();r.Db(3),r.Mc("",t.portCall.duration," ")}}let iet=(()=>{class t extends LT{constructor(t,e,i){super(),this.configService=t,this.mapConfigService=e,this.mapService=i}ngOnInit(){this.ensureMandatoryInputParams("portCall")}locate(){this.configService.devMode&&console.log("locate-port",JSON.stringify(this.portCall,null,2)),this.mapService.pingLocation([this.portCall.lon,this.portCall.lat]),this.mapService.centerOnLonLat([this.portCall.lon,this.portCall.lat])}locateAndZoom(){}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(cI),r.Pb(hI),r.Pb(pI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-portcall-item"]],inputs:{portCall:"portCall"},features:[r.Ab],decls:13,vars:13,consts:[[1,"portcall-item"],["class","portcall-item__timestamp",3,"title",4,"ngIf"],[1,"d-flex"],["mat-button","",1,"portcall-item__port",3,"title","click"],["svgIcon","anchor",1,"portcall-item__port-icon"],["class","portcall-item__duration","title","Dur\xe9e de l'escale",4,"ngIf"],[1,"portcall-item__timestamp",3,"title"],["title","Dur\xe9e de l'escale",1,"portcall-item__duration"],[1,"mr-1","mini-icon"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Ic(1,tet,4,8,"div",1),r.Vb(2,"div",2),r.Qb(3,"app-vertical-arrow"),r.Vb(4,"div"),r.Vb(5,"button",3),r.cc("click",function(){return e.locate()}),r.Qb(6,"mat-icon",4),r.Kc(7),r.Ub(),r.Ic(8,eet,4,1,"div",5),r.Ub(),r.Ub(),r.Vb(9,"div",6),r.hc(10,"timeago"),r.Kc(11),r.hc(12,"date"),r.Ub(),r.Ub()),2&t&&(r.Db(1),r.nc("ngIf",e.portCall.stop),r.Db(4),r.nc("title","Destination annonc\xe9e \xe0 l'arriv\xe9e: "+e.portCall.destination+". Cliquer pour localiser."),r.Db(2),r.Nc(" ",e.portCall.label," (",e.portCall.iso3,") "),r.Db(1),r.nc("ngIf",e.portCall.duration),r.Db(1),r.pc("title","Heure d'arriv\xe9e : ",r.ic(10,7,1e3*e.portCall.start),""),r.Db(2),r.Mc(" ",r.kc(12,9,1e3*e.portCall.start,"yyyy-MM-dd HH:mm:ss z",e.mapConfigService.useUTCDates$.value&&"z")," "))},directives:[ut,Jtt,Dl,Yp],pipes:[Tx,kt],styles:[".portcall-item[_ngcontent-%COMP%]{font-size:12px;padding:.5em}.portcall-item[_ngcontent-%COMP%]:hover{background-color:#efefef}.portcall-item__port-icon[_ngcontent-%COMP%]{width:16px}.portcall-item__port[_ngcontent-%COMP%]{font-weight:500;padding:0 8px!important}.portcall-item__duration[_ngcontent-%COMP%]{display:flex;align-items:center;margin:4px 0 4px 8px;line-height:1}.portcall-item__timestamp[_ngcontent-%COMP%]{color:#595959;padding:2px}"],changeDetection:0}),t})();function net(t,e){1&t&&r.Qb(0,"app-portcall-item",3),2&t&&r.nc("portCall",e.$implicit)}function ret(t,e){1&t&&(r.Vb(0,"div",4),r.Kc(1," Aucune escale\n"),r.Ub())}let set=(()=>{class t extends LT{constructor(t){super(),this.changeDetectorRef=t,this.portCallsCount=0,this.displayedPortCalls=[],this.currentPageIndex=0,this.pageSize=20,this.currentPageIndex$=new Av.a(0)}ngOnInit(){this.ensureMandatoryInputParams("portCalls$"),this.subscriptions.push(Hg([this.portCalls$,this.currentPageIndex$]).pipe(Pe(([t])=>{this.portCallsCount=t.length}),He(([t,e])=>{if(0===t.length&&0!==e)return this.showPage(0),!1;const i=e*this.pageSize;if(0===t.slice(i,i+this.pageSize).length&&t.length>0){const e=Math.ceil(t.length/this.pageSize)-1;return this.showPage(-1===e?0:e),!1}return!0}),Object(Ge.a)(([t,e])=>{const i=e*this.pageSize;return t.slice(i,i+this.pageSize)})).subscribe(t=>{this.displayedPortCalls=t,this.changeDetectorRef.markForCheck()}))}showPage(t){this.currentPageIndex$.next(t),this.currentPageIndex=t}trackByIndex(t){return t}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-portcalls-list"]],inputs:{portCalls$:"portCalls$"},features:[r.Ab],decls:3,vars:5,consts:[[3,"portCall",4,"ngFor","ngForOf"],["class","panel__content u-center",4,"ngIf"],["showFirstLastButtons","","hidePageSize","",3,"pageIndex","length","pageSize","page"],[3,"portCall"],[1,"panel__content","u-center"]],template:function(t,e){1&t&&(r.Ic(0,net,1,1,"app-portcall-item",0),r.Ic(1,ret,2,0,"div",1),r.Vb(2,"mat-paginator",2),r.cc("page",function(t){return e.showPage(t.pageIndex)}),r.Ub()),2&t&&(r.nc("ngForOf",e.displayedPortCalls),r.Db(1),r.nc("ngIf",!e.displayedPortCalls.length),r.Db(1),r.nc("pageIndex",e.currentPageIndex)("length",e.portCallsCount)("pageSize",e.pageSize))},directives:[ct,ut,yA,iet],styles:[""],changeDetection:0}),t})();function oet(t,e){if(1&t&&(r.Vb(0,"div",9),r.hc(1,"timeago"),r.Kc(2),r.hc(3,"date"),r.Ub()),2&t){const t=r.gc();r.pc("title","Heure d'arriv\xe9e : ",r.ic(1,2,1e3*t.voyage.destination.timestamp),""),r.Db(2),r.Mc(" ",r.kc(3,4,1e3*t.voyage.destination.timestamp,"yyyy-MM-dd HH:mm:ss z",t.mapConfigService.useUTCDates$.value&&"z")," ")}}function aet(t,e){if(1&t&&(r.Vb(0,"div",10),r.Vb(1,"strong",11),r.Kc(2),r.Ub(),r.Kc(3," voyages "),r.Ub()),2&t){const t=r.gc();r.Db(2),r.Lc(t.voyage.voyages.length)}}let cet=(()=>{class t extends LT{constructor(t,e,i){super(),this.configService=t,this.mapConfigService=e,this.mapService=i}ngOnInit(){this.ensureMandatoryInputParams("voyage")}locate(t){this.configService.devMode&&console.log("locate-port",JSON.stringify(t,null,2)),this.mapService.pingLocation([t.lon,t.lat]),this.mapService.centerOnLonLat([t.lon,t.lat])}locateAndZoom(){}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(cI),r.Pb(hI),r.Pb(pI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-voyage-item"]],inputs:{voyage:"voyage"},features:[r.Ab],decls:20,vars:15,consts:[[1,"voyage-item"],["class","voyage-item__timestamp",3,"title",4,"ngIf"],[1,"d-flex"],["mat-button","","title","Port de destination. Cliquer pour localiser",1,"voyage-item__port",3,"click"],["svgIcon","anchor",1,"voyage-item__port-icon"],["title","Dur\xe9e du voyage",1,"voyage-item__duration"],[1,"mr-1","mini-icon"],["class","voyage-item__duration","title","Nombre de voyages du voyage",4,"ngIf"],["mat-button","","title","Port d'origine. Cliquer pour localiser",1,"voyage-item__port",3,"click"],[1,"voyage-item__timestamp",3,"title"],["title","Nombre de voyages du voyage",1,"voyage-item__duration"],[1,"mx-1"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Ic(1,oet,4,8,"div",1),r.Vb(2,"div",2),r.Qb(3,"app-vertical-arrow"),r.Vb(4,"div"),r.Vb(5,"button",3),r.cc("click",function(){return e.locate(e.voyage.destination.port)}),r.Qb(6,"mat-icon",4),r.Kc(7),r.Ub(),r.Vb(8,"div",5),r.Vb(9,"mat-icon",6),r.Kc(10,"timelapse"),r.Ub(),r.Kc(11),r.Ub(),r.Ic(12,aet,4,1,"div",7),r.Vb(13,"button",8),r.cc("click",function(){return e.locate(e.voyage.origin.port)}),r.Qb(14,"mat-icon",4),r.Kc(15),r.Ub(),r.Ub(),r.Ub(),r.Vb(16,"div",9),r.hc(17,"timeago"),r.Kc(18),r.hc(19,"date"),r.Ub(),r.Ub()),2&t&&(r.Db(1),r.nc("ngIf",e.voyage.destination.port),r.Db(6),r.Nc(" ",e.voyage.destination.port.label," (",e.voyage.destination.port.iso3,") "),r.Db(4),r.Mc("",e.voyage.duration," "),r.Db(1),r.nc("ngIf",e.voyage.voyages),r.Db(3),r.Nc(" ",e.voyage.origin.port.label," (",e.voyage.origin.port.iso3,") "),r.Db(1),r.pc("title","Heure de d\xe9part : ",r.ic(17,9,1e3*e.voyage.origin.timestamp),""),r.Db(2),r.Mc(" ",r.kc(19,11,1e3*e.voyage.origin.timestamp,"yyyy-MM-dd HH:mm:ss z",e.mapConfigService.useUTCDates$.value&&"z")," "))},directives:[ut,Jtt,Dl,Yp],pipes:[Tx,kt],styles:[".voyage-item[_ngcontent-%COMP%]{font-size:12px;padding:.5em}.voyage-item[_ngcontent-%COMP%]:hover{background-color:#efefef}.voyage-item__port-icon[_ngcontent-%COMP%]{width:16px}.voyage-item__port[_ngcontent-%COMP%]{font-weight:500;padding:0 8px!important}.voyage-item__duration[_ngcontent-%COMP%]{display:flex;align-items:center;margin:4px 0 4px 8px;line-height:1}.voyage-item__timestamp[_ngcontent-%COMP%]{color:#595959;padding:2px}"],changeDetection:0}),t})();function het(t,e){1&t&&r.Qb(0,"app-voyage-item",3),2&t&&r.nc("voyage",e.$implicit)}function uet(t,e){1&t&&(r.Vb(0,"div",4),r.Kc(1," Aucun voyage\n"),r.Ub())}let det=(()=>{class t extends LT{constructor(t){super(),this.changeDetectorRef=t,this.voyagesCount=0,this.displayedVoyages=[],this.currentPageIndex=0,this.pageSize=20,this.currentPageIndex$=new Av.a(0)}ngOnInit(){this.ensureMandatoryInputParams("voyages$"),this.subscriptions.push(Hg([this.voyages$,this.currentPageIndex$]).pipe(Pe(([t])=>{this.voyagesCount=t.length}),He(([t,e])=>{if(0===t.length&&0!==e)return this.showPage(0),!1;const i=e*this.pageSize;if(0===t.slice(i,i+this.pageSize).length&&t.length>0){const e=Math.ceil(t.length/this.pageSize)-1;return this.showPage(-1===e?0:e),!1}return!0}),Object(Ge.a)(([t,e])=>{const i=e*this.pageSize;return t.slice(i,i+this.pageSize)})).subscribe(t=>{this.displayedVoyages=t,this.changeDetectorRef.markForCheck()}))}showPage(t){this.currentPageIndex$.next(t),this.currentPageIndex=t}trackByIndex(t){return t}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-voyages-list"]],inputs:{voyages$:"voyages$"},features:[r.Ab],decls:3,vars:5,consts:[[3,"voyage",4,"ngFor","ngForOf"],["class","panel__content u-center",4,"ngIf"],["showFirstLastButtons","","hidePageSize","",3,"pageIndex","length","pageSize","page"],[3,"voyage"],[1,"panel__content","u-center"]],template:function(t,e){1&t&&(r.Ic(0,het,1,1,"app-voyage-item",0),r.Ic(1,uet,2,0,"div",1),r.Vb(2,"mat-paginator",2),r.cc("page",function(t){return e.showPage(t.pageIndex)}),r.Ub()),2&t&&(r.nc("ngForOf",e.displayedVoyages),r.Db(1),r.nc("ngIf",!e.displayedVoyages.length),r.Db(1),r.nc("pageIndex",e.currentPageIndex)("length",e.voyagesCount)("pageSize",e.pageSize))},directives:[ct,ut,yA,cet],styles:[""],changeDetection:0}),t})();const pet=["events"];function fet(t,e){1&t&&r.Qb(0,"div",3)}function met(t,e){if(1&t&&r.Kc(0),2&t){const t=r.gc(2);r.Mc("(",null==t.ship.lloydsInfos?null:t.ship.lloydsInfos.generaltype,")")}}function get(t,e){if(1&t&&(r.Vb(0,"img",39),r.cc("load",function(t){return t.target.style.display="block"})("error",function(t){return t.target.remove()}),r.Ub()),2&t){const t=r.gc(2);r.nc("src",t.photoURL,r.Dc)}}function Aet(t,e){if(1&t&&(r.Vb(0,"a",40),r.Qb(1,"img",41),r.Ub()),2&t){const t=r.gc(2);r.pc("href","https://www.seasearcher.com/vessels/?term=",t.ship.imo,"",r.Dc)}}function bet(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",44),r.cc("click",function(){return r.Ac(t),r.gc(3).showMarineTrafficDeparture=!0}),r.Kc(1,"Provenance Marine Traffic"),r.Ub()}}function vet(t,e){if(1&t&&(r.Vb(0,"div",45),r.Qb(1,"iframe",46),r.Ub()),2&t){const t=r.gc(3);r.Db(1),r.nc("src",t.marineTrafficUrl,r.Cc)}}function _et(t,e){if(1&t&&(r.Qb(0,"mat-divider"),r.Ic(1,bet,2,0,"button",42),r.Ic(2,vet,2,1,"div",43)),2&t){const t=r.gc(2);r.Db(1),r.nc("ngIf",!t.showMarineTrafficDeparture),r.Db(1),r.nc("ngIf",t.showMarineTrafficDeparture)}}function yet(t,e){1&t&&(r.Vb(0,"div",47),r.Kc(1," Aucune information Lloyd's "),r.Ub())}function wet(t,e){if(1&t&&(r.Vb(0,"div",48),r.Vb(1,"div",5),r.Vb(2,"div",49),r.Vb(3,"div",50),r.Kc(4,"Cat\xe9gorie"),r.Ub(),r.Vb(5,"div",51),r.Kc(6),r.Ub(),r.Ub(),r.Vb(7,"div",52),r.Vb(8,"div",50),r.Kc(9,"Type"),r.Ub(),r.Vb(10,"div",51),r.Kc(11),r.Ub(),r.Ub(),r.Ub(),r.Vb(12,"div",5),r.Vb(13,"div",53),r.Vb(14,"div",49),r.Vb(15,"span",54),r.Kc(16,"Tonnage :"),r.Ub(),r.Vb(17,"span",51),r.Kc(18),r.Ub(),r.Ub(),r.Vb(19,"div",49),r.Vb(20,"span",54),r.Kc(21,"Port en lourd :"),r.Ub(),r.Vb(22,"span",51),r.Kc(23),r.Ub(),r.Ub(),r.Vb(24,"div",49),r.Vb(25,"span",55),r.Kc(26,"Capacit\xe9 :"),r.Ub(),r.Vb(27,"span",51),r.Kc(28),r.Ub(),r.Ub(),r.Ub(),r.Vb(29,"div",56),r.Vb(30,"div",50),r.Kc(31,"Longueur"),r.Ub(),r.Vb(32,"div",51),r.Kc(33),r.Ub(),r.Vb(34,"div",51),r.Kc(35),r.Ub(),r.Ub(),r.Ub(),r.Vb(36,"div",5),r.Vb(37,"div",52),r.Vb(38,"div",50),r.Kc(39,"Soci\xe9t\xe9 de classification"),r.Ub(),r.Vb(40,"div",51),r.Kc(41),r.Ub(),r.Ub(),r.Vb(42,"div",49),r.Vb(43,"div",50),r.Kc(44,"Mise en service"),r.Ub(),r.Vb(45,"div",51),r.Kc(46),r.Ub(),r.Ub(),r.Ub(),r.Vb(47,"div",57),r.Vb(48,"div",58),r.Vb(49,"div",50),r.Kc(50,"Registered owner"),r.Ub(),r.Vb(51,"div",51),r.Kc(52),r.Ub(),r.Ub(),r.Vb(53,"div",59),r.Vb(54,"div"),r.Vb(55,"span",54),r.Kc(56,"All\xe9geance :"),r.Ub(),r.Vb(57,"span",51),r.Kc(58),r.Ub(),r.Ub(),r.Vb(59,"div"),r.Vb(60,"span",54),r.Kc(61,"Si\xe8ge social :"),r.Ub(),r.Vb(62,"span",51),r.Kc(63),r.Ub(),r.Ub(),r.Ub(),r.Ub(),r.Vb(64,"div",57),r.Vb(65,"div",58),r.Vb(66,"div",50),r.Kc(67,"Beneficial owner"),r.Ub(),r.Vb(68,"div",51),r.Kc(69),r.Ub(),r.Ub(),r.Vb(70,"div",59),r.Vb(71,"div"),r.Vb(72,"span",54),r.Kc(73,"All\xe9geance :"),r.Ub(),r.Vb(74,"span",51),r.Kc(75),r.Ub(),r.Ub(),r.Vb(76,"div"),r.Vb(77,"span",54),r.Kc(78,"Si\xe8ge social :"),r.Ub(),r.Vb(79,"span",51),r.Kc(80),r.Ub(),r.Ub(),r.Ub(),r.Ub(),r.Vb(81,"div",57),r.Vb(82,"div",58),r.Vb(83,"div",50),r.Kc(84,"Commercial operator"),r.Ub(),r.Vb(85,"div",51),r.Kc(86),r.Ub(),r.Ub(),r.Vb(87,"div",59),r.Vb(88,"div"),r.Vb(89,"span",54),r.Kc(90,"All\xe9geance :"),r.Ub(),r.Vb(91,"span",51),r.Kc(92),r.Ub(),r.Ub(),r.Vb(93,"div"),r.Vb(94,"span",54),r.Kc(95,"Si\xe8ge social :"),r.Ub(),r.Vb(96,"span",51),r.Kc(97),r.Ub(),r.Ub(),r.Ub(),r.Ub(),r.Vb(98,"div",57),r.Vb(99,"div",58),r.Vb(100,"div",50),r.Kc(101,"Third party operator"),r.Ub(),r.Vb(102,"div",51),r.Kc(103),r.Ub(),r.Ub(),r.Vb(104,"div",59),r.Vb(105,"div"),r.Vb(106,"span",54),r.Kc(107,"All\xe9geance :"),r.Ub(),r.Vb(108,"span",51),r.Kc(109),r.Ub(),r.Ub(),r.Vb(110,"div"),r.Vb(111,"span",54),r.Kc(112,"Si\xe8ge social :"),r.Ub(),r.Vb(113,"span",51),r.Kc(114),r.Ub(),r.Ub(),r.Ub(),r.Ub(),r.Vb(115,"div",57),r.Vb(116,"div",58),r.Vb(117,"div",50),r.Kc(118,"Technical manager"),r.Ub(),r.Vb(119,"div",51),r.Kc(120),r.Ub(),r.Ub(),r.Vb(121,"div",59),r.Vb(122,"div"),r.Vb(123,"span",54),r.Kc(124,"All\xe9geance :"),r.Ub(),r.Vb(125,"span",51),r.Kc(126),r.Ub(),r.Ub(),r.Vb(127,"div"),r.Vb(128,"span",54),r.Kc(129,"Si\xe8ge social :"),r.Ub(),r.Vb(130,"span",51),r.Kc(131),r.Ub(),r.Ub(),r.Ub(),r.Ub(),r.Ub()),2&t){const t=r.gc(2);r.Db(6),r.Lc(t.ship.lloydsInfos.category||"?"),r.Db(5),r.Lc(t.ship.lloydsInfos.generaltype||"?"),r.Db(7),r.Lc(t.ship.lloydsInfos.gross?t.ship.lloydsInfos.gross:"?"),r.Db(5),r.Lc(t.ship.lloydsInfos.dwt?t.ship.lloydsInfos.dwt+" tpl":"?"),r.Db(5),r.Lc(t.ship.lloydsInfos.teu?t.ship.lloydsInfos.teu+" EVP":"?"),r.Db(5),r.Mc("",t.ship.lloydsInfos.loa?t.ship.lloydsInfos.loa+" m":"?"," (hors-tout)"),r.Db(2),r.Mc("",t.ship.lloydsInfos.lbp?t.ship.lloydsInfos.lbp+" m":"?"," (flottaison)"),r.Db(6),r.Lc(t.ship.lloydsInfos.vesselclasssocietyname||"?"),r.Db(5),r.Lc(t.ship.lloydsInfos.yearofbuild||"?"),r.Db(6),r.Lc(t.ship.lloydsInfos.registeredownerid||"?"),r.Db(6),r.Lc(t.ship.lloydsInfos.registeredownerallegiancecountry||"?"),r.Db(5),r.Lc(t.ship.lloydsInfos.registeredownerheadofficecountry||"?"),r.Db(6),r.Lc(t.ship.lloydsInfos.beneficialownerid||"?"),r.Db(6),r.Lc(t.ship.lloydsInfos.beneficialownerallegiancecountry||"?"),r.Db(5),r.Lc(t.ship.lloydsInfos.beneficialownerheadofficecountry||"?"),r.Db(6),r.Lc(t.ship.lloydsInfos.commercialoperatorid||"?"),r.Db(6),r.Lc(t.ship.lloydsInfos.commercialoperatorallegiancecountry||"?"),r.Db(5),r.Lc(t.ship.lloydsInfos.commercialoperatorheadofficecountry||"?"),r.Db(6),r.Lc(t.ship.lloydsInfos.thirdpartoperatorid||"?"),r.Db(6),r.Lc(t.ship.lloydsInfos.thirdpartoperatorallegiancecountry||"?"),r.Db(5),r.Lc(t.ship.lloydsInfos.thirdpartoperatorheadofficecountry||"?"),r.Db(6),r.Lc(t.ship.lloydsInfos.technicalmanagerid||"?"),r.Db(6),r.Lc(t.ship.lloydsInfos.technicalmanagerallegiancecountry||"?"),r.Db(5),r.Lc(t.ship.lloydsInfos.technicalmanagerheadofficecountry||"?")}}function xet(t,e){if(1&t&&(r.Vb(0,"mat-button-toggle",65),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.key),r.Db(1),r.Lc(t.label)}}function Cet(t,e){if(1&t&&r.Qb(0,"app-portcalls-list",66),2&t){const t=r.gc(3);r.nc("portCalls$",t.portCalls$)}}function ket(t,e){if(1&t&&r.Qb(0,"app-voyages-list",67),2&t){const t=r.gc(3);r.nc("voyages$",t.voyages$)}}function Eet(t,e){if(1&t&&r.Qb(0,"app-voyages-list",67),2&t){const t=r.gc(3);r.nc("voyages$",t.voyageGroups$)}}function Det(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-expansion-panel",32),r.Vb(1,"mat-expansion-panel-header",28),r.Vb(2,"mat-panel-title"),r.Kc(3,"Derni\xe8res escales (1 mois)"),r.Ub(),r.Ub(),r.Vb(4,"mat-button-toggle-group",60),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).portsOfCallDisplayMode=e})("ngModelChange",function(e){return r.Ac(t),r.gc(2).updatePortsOfCallDisplayMode(e)}),r.Ic(5,xet,2,2,"mat-button-toggle",61),r.Ub(),r.Tb(6,62),r.Ic(7,Cet,1,1,"app-portcalls-list",63),r.Ic(8,ket,1,1,"app-voyages-list",64),r.Ic(9,Eet,1,1,"app-voyages-list",64),r.Sb(),r.Ub()}if(2&t){const t=r.gc(2);r.nc("expanded",t.logbookPanelExpanded),r.Db(4),r.nc("ngModel",t.portsOfCallDisplayMode),r.Db(1),r.nc("ngForOf",t.portsOfCallDisplayModes),r.Db(1),r.nc("ngSwitch",t.portsOfCallDisplayMode),r.Db(1),r.nc("ngSwitchCase","portsOfCall"),r.Db(1),r.nc("ngSwitchCase","voyages"),r.Db(1),r.nc("ngSwitchCase","voyageGroups")}}function Iet(t,e){if(1&t&&(r.Vb(0,"span",68),r.Kc(1),r.Ub()),2&t){const t=r.gc(2);r.nc("title",t.getUnreadAlertsCount()+" nouvelle(s) alerte(s)"),r.Db(1),r.Mc(" ",t.getUnreadAlertsCount()," ")}}function Pet(t,e){if(1&t&&(r.Vb(0,"span"),r.Kc(1),r.Ub()),2&t){const t=e.alert;r.Db(1),r.Lc(t.rule_name)}}const Oet=function(t){return["/alerts/rules/",t]};function Met(t,e){1&t&&(r.Vb(0,"button",69),r.Vb(1,"mat-icon"),r.Kc(2,"info"),r.Ub(),r.Kc(3," Voir la r\xe8gle "),r.Ub()),2&t&&r.nc("routerLink",r.sc(1,Oet,e.alert.rule_id))}function Tet(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",4),r.Vb(1,"div",5),r.Qb(2,"app-flag",6),r.Vb(3,"div",7),r.Vb(4,"div",8),r.Kc(5),r.Ub(),r.Vb(6,"div",9),r.Kc(7),r.Ic(8,met,1,1,"ng-template",2),r.Ub(),r.Ub(),r.Ub(),r.Vb(9,"div",10),r.Kc(10,"R\xe9ception : "),r.Vb(11,"span",11),r.hc(12,"timeago"),r.Kc(13),r.hc(14,"date"),r.Ub(),r.Ub(),r.Ub(),r.Ic(15,get,1,1,"img",12),r.hc(16,"async"),r.Vb(17,"div",5),r.Vb(18,"button",13),r.cc("click",function(){return r.Ac(t),r.gc().locateShip()})("dblclick",function(){return r.Ac(t),r.gc().locateAndZoomToShip()}),r.Vb(19,"mat-icon"),r.Kc(20,"center_focus_strong"),r.Ub(),r.Ub(),r.Vb(21,"a",14),r.Qb(22,"img",15),r.Ub(),r.Ic(23,Aet,2,1,"a",16),r.Vb(24,"button",17),r.cc("click",function(){return r.Ac(t),r.gc().mapConfigService.toggleTrailsLayer()}),r.Vb(25,"mat-icon"),r.Kc(26,"gesture"),r.Ub(),r.Ub(),r.Vb(27,"app-glitter",18),r.Vb(28,"button",17),r.cc("click",function(){return r.Ac(t),r.gc().mapConfigService.toggleDetailedShipTraces()}),r.Qb(29,"mat-icon",19),r.Ub(),r.Ub(),r.Vb(30,"button",17),r.cc("click",function(){return r.Ac(t),r.gc().mapConfigService.toggleOtherShips()}),r.Vb(31,"mat-icon"),r.Kc(32,"directions_boat"),r.Ub(),r.Ub(),r.Vb(33,"button",20),r.cc("click",function(){return r.Ac(t),r.gc().openAddToFleetDialog()}),r.Vb(34,"mat-icon"),r.Kc(35,"playlist_add"),r.Ub(),r.Ub(),r.Ub(),r.Vb(36,"app-glitter",21),r.Vb(37,"button",22),r.cc("click",function(){return r.Ac(t),r.gc().exportShipPositions()}),r.Kc(38,"Exporter la trace"),r.Ub(),r.Ub(),r.Qb(39,"mat-divider"),r.Vb(40,"div",23),r.Qb(41,"app-ship-infos",24),r.Ic(42,_et,3,2,"ng-template",2),r.Qb(43,"mat-divider"),r.Qb(44,"app-ship-note",25),r.Vb(45,"mat-accordion",26),r.Vb(46,"mat-expansion-panel",27),r.cc("afterCollapse",function(){return r.Ac(t),r.gc().mapConfigService.toggleExpandLloydsPanel()})("afterExpand",function(){return r.Ac(t),r.gc().mapConfigService.toggleExpandLloydsPanel()}),r.Vb(47,"mat-expansion-panel-header",28),r.Vb(48,"mat-panel-title"),r.Kc(49,"Informations Lloyd's"),r.Ub(),r.Ub(),r.Ic(50,yet,2,0,"div",29),r.Ic(51,wet,132,24,"div",30),r.Ub(),r.Ic(52,Det,10,7,"mat-expansion-panel",31),r.Vb(53,"mat-expansion-panel",32),r.Vb(54,"mat-expansion-panel-header",28),r.Vb(55,"mat-panel-title"),r.Kc(56," Alertes "),r.Ic(57,Iet,2,2,"span",33),r.Ub(),r.Ub(),r.Qb(58,"app-alerts-list",34),r.Ic(59,Pet,2,1,"ng-template",null,35,r.Jc),r.Ic(61,Met,4,3,"ng-template",null,36,r.Jc),r.Ub(),r.Vb(63,"mat-expansion-panel",37),r.Vb(64,"mat-expansion-panel-header",28),r.Vb(65,"mat-panel-title"),r.Kc(66," Journal de bord "),r.Ub(),r.Ub(),r.Qb(67,"app-events-list",38),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=r.wc(60),e=r.wc(62),i=r.gc();r.Db(2),r.nc("mmsi",i.ship.mmsi),r.Db(2),r.Hb("ship-details-panel__name--small",(null==i.ship.name?null:i.ship.name.length)>=14)("ship-details-panel__name--mini",(null==i.ship.name?null:i.ship.name.length)>=16)("ship-details-panel__name--tiny",(null==i.ship.name?null:i.ship.name.length)>=20),r.Db(1),r.Lc(i.ship.name||"?"),r.Db(2),r.Mc(" ",i.ship.cargo?i.vesselTypeLabelsByType[i.ship.cargo]:"?"," "),r.Db(1),r.nc("ngIf",null==i.ship.lloydsInfos?null:i.ship.lloydsInfos.generaltype),r.Db(3),r.oc("title",r.ic(12,40,1e3*i.ship.timestamp)),r.Db(2),r.Lc(r.kc(14,42,1e3*i.ship.timestamp,"yyyy-MM-dd HH:mm:ss z",i.mapConfigService.useUTCDates$.value&&"z")),r.Db(2),r.nc("ngIf",r.ic(16,46,i.mapConfigService.showMarineTrafficPhotos$)),r.Db(6),r.pc("href","https://www.marinetraffic.com/en/ais/details/ships/mmsi:",i.ship.mmsi,"",r.Dc),r.Db(2),r.nc("ngIf",i.ship.imo),r.Db(1),r.Hb("button-active",i.mapConfigService.showTrailsLayer$.value),r.pc("title","",i.mapConfigService.showTrailsLayer$.value?"Masquer":"Afficher"," la trace du navire"),r.Db(4),r.nc("title",i.mapConfigService.detailedShipTraces$.value?"Les traces d\xe9taill\xe9es sont affich\xe9es. Cliquer pour afficher les traces simplifi\xe9es.":"Les traces simplifi\xe9es sont affich\xe9es. Cliquer pour afficher les traces d\xe9taill\xe9es (Note: ~10x plus de donn\xe9es \xe0 t\xe9l\xe9charger)"),r.Db(1),r.nc("svgIcon",i.mapConfigService.detailedShipTraces$.value?"trail-detailed":"trail-simple"),r.Db(1),r.Hb("button-active",i.mapConfigService.showOtherShips$.value),r.pc("title","",i.mapConfigService.showOtherShips$.value?"Masquer":"Afficher"," les autres navires"),r.Db(11),r.nc("ship",i.ship)("full",!0),r.Db(1),r.nc("ngIf",i.mapConfigService.showMarineTrafficDeparture$.value),r.Db(2),r.nc("mmsi",i.ship.mmsi),r.Db(1),r.nc("multi",!0),r.Db(1),r.nc("expanded",i.expandLloydsPanel),r.Db(4),r.nc("ngIf",!i.ship.lloydsInfos),r.Db(1),r.nc("ngIf",i.ship.lloydsInfos),r.Db(1),r.nc("ngIf",i.portCallsEnable),r.Db(1),r.nc("expanded",i.alertsPanelExpanded),r.Db(4),r.nc("ngIf",i.getUnreadAlertsCount()>0),r.Db(1),r.nc("alerts$",i.alerts$)("enableRuleFilters",!0)("alertTitleRef",t)("alertMenuItemsRef",e),r.Db(5),r.nc("expanded",i.logbookPanelExpanded),r.Db(4),r.nc("events$",i.events$)}}let Ret=(()=>{class t extends LT{constructor(t,e,i,n,r,s,o,a,l,c,h,u,d,p,f,m){super(),this.changeDetectorRef=t,this.activatedRoute=e,this.domSanitizer=i,this.titleService=n,this.router=r,this.dialog=s,this.configService=o,this.eventsService=a,this.interactionsService=l,this.mapService=c,this.mapConfigService=h,this.selectionService=u,this.timeRangeService=d,this.uiService=p,this.workerService=f,this.zonesLayerService=m,this.loading=!1,this.ship=null,this.vesselTypeLabelsByType=ED,this.alertsPanelExpanded=!0,this.logbookPanelExpanded=!0,this.expandLloydsPanel=!1,this.portCalls$=new Av.a([]),this.voyages$=new Av.a([]),this.voyageGroups$=new Av.a([]),this.alerts$=new Av.a([]),this.events$=new Av.a([]),this.showMarineTrafficDeparture=!1,this.portsOfCallDisplayMode=SD,this.portsOfCallDisplayModes=CD,this.portCallsEnable=fD.a.portCallsEnable,this.getRiskAssessment=()=>Object(ue.a)(this,void 0,void 0,function*(){this.riskAssessment=yield this.workerService.ships.getShipRiskAssessment(this.mmsi)}),this.exportShipPositions=()=>Object(ue.a)(this,void 0,void 0,function*(){const t=this.timeRangeService.timeRange$.value,e=FO(1e3*t.start,"yyyy-MM-dd'T'HH-mm-ss"),i=FO(1e3*t.end,"yyyy-MM-dd'T'HH-mm-ss");YH(WH(this.ship.trail),`anais-traces-${this.ship.name}-${e}-${i}.csv`,"text/csv")}),this.portCalls$.subscribe(t=>{const e=function(t){if((t=t.filter((e,i)=>e.stop||i===t.length-1)).length<2)return[];const e=[];for(let i=1;i<t.length;i++){const n=t[i-1],r=t[i];e.push({origin:{port:{id:n.id,label:n.label,iso3:n.iso3,lon:n.lon,lat:n.lat},timestamp:n.stop,duration:UO(n.stop-n.start)},destination:{port:{id:r.id,label:r.label,iso3:r.iso3,lon:r.lon,lat:r.lat},timestamp:r.start,duration:UO(r.stop-r.start)},duration:UO(r.start-n.stop)})}return e}(t.slice().reverse());this.voyages$.next(e.slice().reverse()),this.voyageGroups$.next(function(t){if(t.length<2)return t;const e=[MD(t[0])];return t.splice(1).forEach(t=>{const i=e[e.length-1];if((t.destination.port.id===i.origin.port.id||t.destination.port.id===i.destination.port.id)&&t.origin.timestamp-i.destination.timestamp<14400){let n;n=void 0===i.voyages?e[e.length-1]=Object.assign(Object.assign({},MD(i)),{voyages:[]}):i,n.destination.timestamp=t.destination.timestamp,n.duration=UO(n.destination.timestamp-n.origin.timestamp),n.voyages.push(t)}else e.push(t)}),e}(e).reverse())})}ngOnInit(){this.subscriptions.push(this.selectionService.openEntity$.pipe(Gg(1),He(t=>t.type===OP.Ship&&t.id===this.mmsi)).subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){if(t.error)return this.loading=!1,this.uiService.error(`Le navire ${this.mmsi} est inconnu.`),void(this.mapService.hasBooted?yield this.router.navigateByUrl(`/${this.mapService.view$.value.toURL()}`):yield this.router.navigateByUrl("/"));if(!t.entity)return;this.loading=!1;const e=t.entity;this.mapService.hasBooted||this.mapService.locate([e.lon,e.lat]),this.titleService.setTitle(`Navire ${e.name||e.mmsi} - ANAIS`),this.ship=e,this.photoURL=this.domSanitizer.bypassSecurityTrustResourceUrl(fD.a.shipPhotoURL.replace("{{mmsi}}",e.mmsi).replace("{{imo}}",e.imo).replace("{{callsign}}",e.callsign)),this.portCalls$.next(e.portCalls),this.alerts$.next(e.alerts),this.events$.next(e.events)})),this.activatedRoute.paramMap.subscribe(t=>{this.loading=!0,this.mmsi!==t.get("mmsi")&&(this.mmsi=t.get("mmsi"),this.riskAssessment=null,this.eventsService.hideTranshipment(),this.zonesLayerService.clear()),this.showMarineTrafficDeparture=!1,this.expandLloydsPanel=this.mapConfigService.expandLloydsPanel$.value,this.marineTrafficUrl=this.domSanitizer.bypassSecurityTrustResourceUrl(`https://www.marinetraffic.com/en/ais/details/ships/mmsi:${this.mmsi}`),this.selectionService.openEntity(OP.Ship,this.mmsi)}),this.interactionsService.selectAlertFeature$.subscribe(()=>{this.alertsPanelExpanded=!0,this.changeDetectorRef.markForCheck()}),this.interactionsService.selectEventFeature$.subscribe(()=>{this.logbookPanelExpanded=!0,this.changeDetectorRef.markForCheck()}),this.mapConfigService.portsOfCallDisplayMode$.subscribe(t=>{this.portsOfCallDisplayMode=t,this.changeDetectorRef.markForCheck()}))}ngOnDestroy(){super.ngOnDestroy(),this.selectionService.closeOpenEntity(),this.eventsService.hideTranshipment(),this.zonesLayerService.clear()}locateShip(){this.mapService.centerOnLonLat([this.ship.lon,this.ship.lat])}locateAndZoomToShip(){this.mapService.locate([this.ship.lon,this.ship.lat])}getUnreadAlertsCount(){return this.ship.alerts.filter(t=>!t.read).length}openAddToFleetDialog(){this.dialog.open(J9,{panelClass:"add-to-fleet-dialog",autoFocus:!1,closeOnNavigation:!0,hasBackdrop:!0,data:{mmsi:this.ship.mmsi}})}updatePortsOfCallDisplayMode(t){this.mapConfigService.updatePortsOfCallDisplayMode(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(N_),r.Pb(ne),r.Pb(he),r.Pb(sw),r.Pb(Gl),r.Pb(cI),r.Pb(IT),r.Pb(ET),r.Pb(pI),r.Pb(hI),r.Pb(xT),r.Pb(yT),r.Pb(VI),r.Pb(_I.a),r.Pb(DT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-ship-details-panel"]],viewQuery:function(t,e){if(1&t&&r.Pc(pet,1,r.l),2&t){let t;r.vc(t=r.dc())&&(e.eventElements=t)}},features:[r.Ab],decls:3,vars:2,consts:[[1,"panel","ship-details-panel"],["class","loader",4,"ngIf"],[3,"ngIf"],[1,"loader"],[1,"panel__header","d-flex-column"],[1,"d-flex"],[1,"ma-1",3,"mmsi"],[1,"ma-1","u-flex"],[1,"ship-details-panel__name"],[1,"ship-details-panel__type"],[1,"ship-details-panel__reception"],[3,"title"],["referrerpolicy","no-referrer","title","Photo du navire","class","d-block","style","display: none",3,"src","load","error",4,"ngIf"],["mat-button","","title","Centrer la vue sur le navire",1,"ship-details-panel__action",3,"click","dblclick"],["mat-button","","title","Ouvrir la page MarineTraffic","target","_blank","rel","noopener","referrerpolicy","no-referrer",1,"ship-details-panel__action",3,"href"],["src","/assets/images/marinetraffic-icon.png","width","20","alt","MarineTraffic"],["mat-button","","class","ship-details-panel__action","title","Ouvrir la page Lloyd's List Intelligence","target","_blank","rel","noopener","referrerpolicy","no-referrer",3,"href",4,"ngIf"],["mat-button","",1,"ship-details-panel__action",3,"title","click"],["gid","button-detailedshiptraces","date","2020-11-16",1,"u-flex","d-flex"],[3,"svgIcon"],["mat-button","","title","Ajouter \xe0 une flotte",1,"ship-details-panel__action",3,"click"],["gid","export-trace-ship","date","2020-12-14"],["mat-button","","title","Exporter la trace au format CSV",1,"d-block",3,"click"],[1,"scrollable"],[1,"ship-details-panel__infos",3,"ship","full"],[3,"mmsi"],["displayMode","flat",3,"multi"],[1,"ship-details-panel__section",3,"expanded","afterCollapse","afterExpand"],[1,"ship-details-panel__subheader"],["class","panel__content u-center",4,"ngIf"],["class","ship-details-panel__lloyds-infos",4,"ngIf"],["class","ship-details-panel__section",3,"expanded",4,"ngIf"],[1,"ship-details-panel__section",3,"expanded"],["style","color: red; padding-left: 1em",3,"title",4,"ngIf"],[3,"alerts$","enableRuleFilters","alertTitleRef","alertMenuItemsRef"],["alertTitleRef",""],["alertMenuItemsRef",""],[1,"ship-details-panel__section","mat-elevation-z0",3,"expanded"],[3,"events$"],["referrerpolicy","no-referrer","title","Photo du navire",1,"d-block",2,"display","none",3,"src","load","error"],["mat-button","","title","Ouvrir la page Lloyd's List Intelligence","target","_blank","rel","noopener","referrerpolicy","no-referrer",1,"ship-details-panel__action",3,"href"],["src","/assets/images/lloyds-icon.png","width","20","alt","Lloyd's List Intelligence"],["mat-button","","class","d-block","title","Affiche la provenance telle que d\xe9finie sur la fiche navire Marine Traffic (va charger la page MT)",3,"click",4,"ngIf"],["style","width: 250px; height: 60px; position: relative; overflow: hidden","title","Provenance (donn\xe9e Marine Traffic)",4,"ngIf"],["mat-button","","title","Affiche la provenance telle que d\xe9finie sur la fiche navire Marine Traffic (va charger la page MT)",1,"d-block",3,"click"],["title","Provenance (donn\xe9e Marine Traffic)",2,"width","250px","height","60px","position","relative","overflow","hidden"],["scrolling","no","referrerpolicy","no-referrer",2,"position","absolute","width","1400px","height","1100px","top","-370px","left","-90px","pointer-events","none",3,"src"],[1,"panel__content","u-center"],[1,"ship-details-panel__lloyds-infos"],[1,"property"],[1,"property-label"],[1,"property-value"],[1,"property","u-flex"],[1,"d-flex-column","u-flex"],[1,"property-label","mr-1"],["title","en \xe9quivalents vingt pieds",1,"property-label","mr-1"],[1,"property",2,"flex","0.8"],[1,"property","property--large"],[1,"u-flex"],[1,"countries-column"],["title","Mode d'affichage",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[3,"ngSwitch"],[3,"portCalls$",4,"ngSwitchCase"],[3,"voyages$",4,"ngSwitchCase"],[3,"value"],[3,"portCalls$"],[3,"voyages$"],[2,"color","red","padding-left","1em",3,"title"],["mat-menu-item","",3,"routerLink"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Ic(1,fet,1,0,"div",1),r.Ic(2,Tet,68,48,"ng-template",2),r.Ub()),2&t&&(r.Db(1),r.nc("ngIf",e.loading),r.Db(1),r.nc("ngIf",!e.loading&&e.ship))},directives:[ut,GF,Dl,Yp,Il,DL,GT,Q3,att,Itt,ktt,Ett,Dtt,Nj,Ntt,Ztt,Vc,uh,ct,mt,gt,Qtt,set,det,QL,ow],pipes:[Tx,kt,St],styles:[".ship-details-panel__name{font-size:1.4em;font-weight:500}.ship-details-panel__name--small{font-size:1.1em}.ship-details-panel__name--mini{font-size:1em}.ship-details-panel__name--tiny{font-size:.9em}.ship-details-panel__type{font-size:13px;color:#432e2e}.ship-details-panel__reception{font-size:14px;padding-left:.5em;padding-right:.5em;padding-bottom:.5em}.ship-details-panel__action{flex:1;min-width:inherit;padding:inherit}.ship-details-panel__infos{font-size:.9em}.ship-details-panel__section{margin-top:.4em}.ship-details-panel__section .mat-expansion-panel-body{padding:0}.ship-details-panel__section .mat-expansion-panel-header.mat-expanded{height:48px!important}.ship-details-panel__section-row{display:flex}.ship-details-panel__subheader{background-color:#abb8cb}.ship-details-panel__subheader:focus,.ship-details-panel__subheader:hover{background-color:#bbc5d5!important}.ship-details-panel__label{font-weight:300}.ship-details-panel__lloyds-infos{font-size:12px}.property{padding:4px;border:1px solid rgba(0,0,0,.12);text-align:center;min-width:100px}.property--large{flex-basis:100%;display:flex;align-items:center}.property-label{color:grey;font-weight:500}.property-value{font-weight:700}.countries-column{flex:1;max-width:140px}"],encapsulation:2}),t})();function Vet(t,e){1&t&&r.Qb(0,"mat-spinner",8)}function Fet(t,e){1&t&&(r.Vb(0,"p",11),r.Kc(1,"Vous n'avez pas encore cr\xe9\xe9 de zone."),r.Ub())}function Let(t,e){if(1&t&&r.Qb(0,"app-zone-item",14),2&t){const t=e.$implicit,i=r.gc(3);r.nc("zone",t)("editable",i.zonesEditable)("trueDeletion",!0)}}function Uet(t,e){if(1&t&&(r.Vb(0,"div",12),r.Ic(1,Let,1,3,"app-zone-item",13),r.Ub()),2&t){const t=r.gc(2);r.Db(1),r.nc("ngForOf",t.zones)("ngForTrackBy",t.trackById)}}function Bet(t,e){if(1&t&&(r.Ic(0,Fet,2,0,"p",9),r.Ic(1,Uet,2,2,"div",10)),2&t){const t=r.gc();r.nc("ngIf",0===t.zones.length),r.Db(1),r.nc("ngIf",t.zones.length>0)}}function Net(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",15),r.cc("click",function(){return r.Ac(t),r.gc().displayCreateZoneForm()}),r.Kc(1," Nouvelle zone "),r.Ub()}if(2&t){const t=r.gc();r.nc("disabled",!t.zonesEditable)}}function jet(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div"),r.Vb(1,"app-zone-form",16),r.cc("save",function(){return r.Ac(t),r.gc().hideCreateZoneForm()})("cancel",function(){return r.Ac(t),r.gc().hideCreateZoneForm()}),r.Ub(),r.Ub()}}let zet=(()=>{class t extends LT{constructor(t,e,i,n,r){super(),this.titleService=t,this.editZoneService=e,this.zonesLayerService=i,this.zonesService=n,this.mapService=r,this.showCreateZoneForm=!1,this.zonesEditable=!0}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.titleService.setTitle("Liste des zones - ANAIS"),this.mapService.hasBooted||this.mapService.resetToDefaultView(),this.zonesService.zones$.subscribe(t=>{this.zones=t,this.zonesLayerService.updateZones(this.zones)}),yield this.zonesService.refreshZones(),this.subscriptions.push(this.editZoneService.editedZone$.pipe(mn(),fI(0)).subscribe(t=>{this.zonesEditable=!t,t||this.zonesLayerService.updateZones(this.zonesService.zones$.value)}))})}ngOnDestroy(){super.ngOnDestroy(),this.editZoneService.cancelEditing(),this.zonesLayerService.clear()}displayCreateZoneForm(){this.showCreateZoneForm=!0}hideCreateZoneForm(){this.showCreateZoneForm=!1}trackById(t,e){return e.id}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(he),r.Pb(sL),r.Pb(DT),r.Pb(kP),r.Pb(pI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-zones-panel"]],features:[r.Ab],decls:9,vars:4,consts:[["joyrideStep","zones-panel","title","Gestion des zones","text","C'est ici que vous pouvez g\xe9rer les zones que vous utilisez dans les r\xe8gles.",1,"panel"],[1,"panel__header","panel__header--blue"],[1,"panel__title","u-flex"],[1,"scrollable","d-flex-column"],["class","spinner","strokeWidth","4","diameter","80",4,"ngIf"],[3,"ngIf"],["mat-stroked-button","","color","primary","class","ma-2","title","Cr\xe9er une zone",3,"disabled","click",4,"ngIf"],[4,"ngIf"],["strokeWidth","4","diameter","80",1,"spinner"],["class","panel__content",4,"ngIf"],["class","d-flex-column",4,"ngIf"],[1,"panel__content"],[1,"d-flex-column"],[3,"zone","editable","trueDeletion",4,"ngFor","ngForOf","ngForTrackBy"],[3,"zone","editable","trueDeletion"],["mat-stroked-button","","color","primary","title","Cr\xe9er une zone",1,"ma-2",3,"disabled","click"],[3,"save","cancel"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"h2",2),r.Kc(3,"Zones"),r.Ub(),r.Ub(),r.Vb(4,"div",3),r.Ic(5,Vet,1,0,"mat-spinner",4),r.Ic(6,Bet,2,2,"ng-template",5),r.Ic(7,Net,2,1,"button",6),r.Ic(8,jet,2,0,"div",7),r.Ub(),r.Ub()),2&t&&(r.Db(5),r.nc("ngIf",!e.zones),r.Db(1),r.nc("ngIf",e.zones),r.Db(1),r.nc("ngIf",!e.showCreateZoneForm),r.Db(1),r.nc("ngIf",e.showCreateZoneForm))},directives:[ax,ut,fF,ct,uU,Dl,lU],encapsulation:2}),t})();function Het(t,e){1&t&&(r.Vb(0,"mat-error"),r.Kc(1,"L'email est obligatoire"),r.Ub())}function Ket(t,e){1&t&&(r.Vb(0,"mat-error"),r.Kc(1,"L'email doit \xeatre valide"),r.Ub())}const $et=function(){return["/login"]};let Get=(()=>{class t{constructor(t,e,i,n,r){this.formBuilder=t,this.router=e,this.workerService=i,this.authenticationService=n,this.uiService=r,this.askPasswordReset=()=>Object(ue.a)(this,void 0,void 0,function*(){this.form.valid&&(yield this.workerService.authentication.askPasswordReset(this.form.controls.email.value),this.uiService.success("Vous allez bient\xf4t recevoir un email contenant les instructions pour r\xe9initialiser votre mot de passe."),yield this.router.navigateByUrl("/login"))})}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.form=this.formBuilder.group({email:["",[pc.required,pc.email]]}),this.authenticationService.user$.value&&(yield this.router.navigateByUrl("/"))})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Lh),r.Pb(sw),r.Pb(_I.a),r.Pb(yI),r.Pb(VI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-reset-password-page"]],decls:18,vars:6,consts:[[1,"unauthenticated-page","mat-typography"],[1,"unauthenticated-page__form",3,"formGroup"],["mat-button","",1,"reset-password__back-button",3,"routerLink"],[1,"reset-password__title"],["type","email","matInput","","placeholder","vous@exemple.com","formControlName","email","required",""],[4,"ngIf"],["mat-raised-button","","color","primary",1,"mt-2",3,"app-async-action"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"form",1),r.Vb(2,"button",2),r.Vb(3,"mat-icon"),r.Kc(4,"chevron_left"),r.Ub(),r.Kc(5," Retour "),r.Ub(),r.Vb(6,"h3",3),r.Kc(7,"R\xe9initialisation de votre mot de passe"),r.Ub(),r.Vb(8,"p"),r.Kc(9,"Pour r\xe9initialiser votre mot de passe, saisissez l'adresse e-mail de votre compte ANAIS."),r.Ub(),r.Vb(10,"mat-form-field"),r.Vb(11,"mat-label"),r.Kc(12,"Email"),r.Ub(),r.Qb(13,"input",4),r.Ic(14,Het,2,0,"mat-error",5),r.Ic(15,Ket,2,0,"mat-error",5),r.Ub(),r.Vb(16,"button",6),r.Kc(17,"Obtenir le lien de r\xe9initialisation"),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(1),r.nc("formGroup",e.form),r.Db(1),r.nc("routerLink",r.rc(5,$et)),r.Db(12),r.nc("ngIf",e.form.get("email").hasError("required")),r.Db(1),r.nc("ngIf",e.form.get("email").hasError("email")),r.Db(1),r.nc("app-async-action",e.askPasswordReset))},directives:[dh,Fc,_h,Dl,ow,Yp,_u,cu,Ou,ac,Vc,Eh,Ih,ut,dR,nu],styles:[".reset-password__back-button[_ngcontent-%COMP%]{color:#fff;font-weight:300;line-height:2em;height:2em;align-self:flex-start;margin-bottom:12px;padding:0}.reset-password__title[_ngcontent-%COMP%]{font-weight:700;font-size:1.5em}","[_nghost-%COMP%]{flex:1}.unauthenticated-page[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:auto;background-image:url(/assets/images/login_background.jpg);background-size:cover;background-position:70% 50%}.unauthenticated-page__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:300px;color:#fff;background-color:rgba(0,55,146,.9490196078431372);padding:2.5em 2.5em 1em;border-radius:2em;box-shadow:0 16px 24px 2px rgba(0,55,146,.64),0 6px 30px 5px rgba(0,55,146,.62)}.unauthenticated-page__form[_ngcontent-%COMP%] .mat-form-field-label{color:#fff}"]}),t})();function Wet(t,e){1&t&&(r.Vb(0,"mat-error"),r.Kc(1,"Le mot de passe est obligatoire"),r.Ub())}function Zet(t,e){1&t&&(r.Vb(0,"mat-error"),r.Kc(1,"Le mot de passe doit contenir 10 caract\xe8res minimum"),r.Ub())}function qet(t,e){1&t&&(r.Vb(0,"mat-error"),r.Kc(1,"La confirmation du mot de passe est obligatoire"),r.Ub())}function Yet(t,e){1&t&&(r.Vb(0,"mat-error"),r.Kc(1,"Les deux mots de passe doivent \xeatre identiques"),r.Ub())}let Qet=(()=>{class t{constructor(t,e,i,n,r){this.activatedRoute=t,this.formBuilder=e,this.router=i,this.workerService=n,this.uiService=r}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.form=this.formBuilder.group({password:["",[pc.required,pc.minLength(10)]],confirmPassword:["",pc.required]},{validator:t=>{const e=t.controls.confirmPassword;e.errors&&!e.errors.mustMatch||e.setErrors(t.controls.password.value!==e.value?{mustMatch:!0}:null)}}),this.activatedRoute.paramMap.subscribe(t=>{this.token=t.get("token")}),(yield this.workerService.authentication.isTokenValid(this.token))||(this.uiService.error("Le jeton n'est pas ou plus valide"),yield this.router.navigateByUrl("/login"))})}setPassword(){return Object(ue.a)(this,void 0,void 0,function*(){this.form.valid&&(yield this.workerService.authentication.setPassword(this.token,this.form.controls.password.value),this.uiService.success("Le mot de passe a \xe9t\xe9 chang\xe9."),yield this.router.navigateByUrl("/login"))})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(N_),r.Pb(Lh),r.Pb(sw),r.Pb(_I.a),r.Pb(VI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-set-password-page"]],decls:16,vars:6,consts:[[1,"unauthenticated-page","mat-typography"],[1,"unauthenticated-page__form",3,"formGroup","ngSubmit"],[1,"set-password-page__title"],["type","password","matInput","","placeholder","Mot de passe","formControlName","password","required",""],[4,"ngIf"],["type","password","matInput","","placeholder","Confirmation","formControlName","confirmPassword","required",""],["mat-raised-button","","type","submit","color","primary",1,"mt-2",3,"disabled"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"form",1),r.cc("ngSubmit",function(){return e.setPassword()}),r.Vb(2,"h3",2),r.Kc(3,"Mise \xe0 jour de votre mot de passe"),r.Ub(),r.Vb(4,"p"),r.Kc(5,"Veuillez saisir votre nouveau mot de passe."),r.Ub(),r.Vb(6,"mat-form-field"),r.Qb(7,"input",3),r.Ic(8,Wet,2,0,"mat-error",4),r.Ic(9,Zet,2,0,"mat-error",4),r.Ub(),r.Vb(10,"mat-form-field"),r.Qb(11,"input",5),r.Ic(12,qet,2,0,"mat-error",4),r.Ic(13,Yet,2,0,"mat-error",4),r.Ub(),r.Vb(14,"button",6),r.Kc(15,"D\xe9finir le mot de passe"),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(1),r.nc("formGroup",e.form),r.Db(7),r.nc("ngIf",e.form.get("password").hasError("required")),r.Db(1),r.nc("ngIf",e.form.get("password").hasError("minlength")),r.Db(3),r.nc("ngIf",e.form.get("confirmPassword").hasError("required")),r.Db(1),r.nc("ngIf",e.form.get("confirmPassword").hasError("mustMatch")),r.Db(1),r.nc("disabled",!e.form.valid))},directives:[dh,Fc,_h,_u,Ou,ac,Vc,Eh,Ih,ut,Dl,nu],styles:[".set-password-page__title[_ngcontent-%COMP%]{font-weight:700;font-size:1.5em}","[_nghost-%COMP%]{flex:1}.unauthenticated-page[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:auto;background-image:url(/assets/images/login_background.jpg);background-size:cover;background-position:70% 50%}.unauthenticated-page__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:300px;color:#fff;background-color:rgba(0,55,146,.9490196078431372);padding:2.5em 2.5em 1em;border-radius:2em;box-shadow:0 16px 24px 2px rgba(0,55,146,.64),0 6px 30px 5px rgba(0,55,146,.62)}.unauthenticated-page__form[_ngcontent-%COMP%] .mat-form-field-label{color:#fff}"]}),t})();const Xet=[{path:"test",component:(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-test-page"]],decls:2,vars:0,template:function(t,e){1&t&&(r.Vb(0,"div"),r.Kc(1,"Test"),r.Ub())},styles:[""]}),t})()},{path:"maintenance",component:$F},{path:"login",component:KF},{path:"reset-password",component:Get},{path:"set-password/:token",component:Qet},{path:"",canActivateChild:[VT],children:[{path:"admin",canActivateChild:[FI],component:ZT,children:[{path:"",pathMatch:"prefix",redirectTo:"users"},{path:"users",component:BF},{path:"maintenance",component:AR}]},{path:"",component:w7,children:[{path:"alerts",component:uH,children:[{path:"",pathMatch:"prefix",redirectTo:"dashboard"},{path:"dashboard",component:Gz},{path:"rules",component:Vz},{path:"rules/new",component:uz,data:{edit:!0,new:!0}},{path:"rules/:alertRuleId",component:uz},{path:"rules/:alertRuleId/edit",component:uz,data:{edit:!0}}]},{path:"annotations",component:HH},{path:"fleets",component:MK},{path:"fleets/new",component:vK,data:{edit:!0,new:!0}},{path:"fleets/:fleetId",component:vK},{path:"fleets/:fleetId/edit",component:vK,data:{edit:!0}},{path:"ports",component:g9},{path:"search",component:j9,children:[{path:"",pathMatch:"prefix",redirectTo:"ships"},{path:"ships",component:q9},{path:"containers",component:B9}]},{path:"moves",component:m9},{path:"playback",component:TK},{path:"zones",component:zet},{path:"ships/:mmsi",component:Ret},{path:"aircrafts/:icao",component:rL},{path:"settings",component:x$},{path:"about",component:UT},{path:"statistics",redirectTo:"moves"},{path:"rules",redirectTo:"alerts/rules"},{path:"rules/new",redirectTo:"alerts/rules/new"},{path:"rules/:alertRuleId",redirectTo:"alerts/rules/:alertRuleId"},{path:"rules/:alertRuleId/edit",redirectTo:"alerts/rules/:alertRuleId/edit"},{path:"**",component:$H}]}]}];let Jet=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[yw.forRoot(Xet,{preloadingStrategy:pw})],yw]}),t})();function tit(t,e){if(1&t&&(r.Vb(0,"div",1),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Hb("maintenance-banner--inprogress",t.maintenance.type===t.AppMaintenanceType.InProgress),r.Db(1),r.Mc(" ",t.maintenance.message,"\n")}}let eit=(()=>{class t{constructor(t,e){this.changeDetectorRef=t,this.workerService=e,this.AppMaintenanceType=qT}ngOnInit(){this.changeDetectorRef.detach(),this.workerService.applicationHealth$.subscribe(t=>{this.maintenance=null==t?void 0:t.maintenance,this.changeDetectorRef.detectChanges()})}reload(){location.reload()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-maintenance-banner"]],decls:1,vars:1,consts:[["class","maintenance-banner",3,"maintenance-banner--inprogress",4,"ngIf"],[1,"maintenance-banner"]],template:function(t,e){1&t&&r.Ic(0,tit,2,3,"div",0),2&t&&r.nc("ngIf",e.maintenance)},directives:[ut],styles:[".maintenance-banner[_ngcontent-%COMP%]{width:100%;padding:.5em;background-color:#58b9eb;text-align:center}.maintenance-banner--inprogress[_ngcontent-%COMP%]{background-color:#ff5353}"]}),t})();function iit(t,e){if(1&t){const t=r.Wb();r.Kc(0," \xc0 partir du 30 novembre 2020, ANAIS va changer d'URL pour passer vers\xa0"),r.Vb(1,"em"),r.Kc(2,"anais.beta.gouv.fr"),r.Ub(),r.Kc(3,". "),r.Vb(4,"button",4),r.cc("click",function(){return r.Ac(t),r.gc(2).migrate()}),r.Kc(5," Cliquez ici pour migrer vos param\xe8tres "),r.Ub()}}function nit(t,e){if(1&t){const t=r.Wb();r.Kc(0," Attention, vous avez d\xe9j\xe0 migr\xe9 vos param\xe8tres vers\xa0"),r.Vb(1,"em"),r.Kc(2,"anais.beta.gouv.fr"),r.Ub(),r.Kc(3,". "),r.Vb(4,"button",4),r.cc("click",function(){return r.Ac(t),r.gc(2).redirect()}),r.Kc(5," Retourner sur le nouveau serveur "),r.Ub()}}function rit(t,e){if(1&t&&(r.Vb(0,"div",1),r.Vb(1,"mat-icon",2),r.Kc(2,"warning"),r.Ub(),r.Ic(3,iit,6,0,"ng-template",3),r.Ic(4,nit,6,0,"ng-template",3),r.Ub()),2&t){const t=r.gc();r.Db(3),r.nc("ngIf",!t.migrated),r.Db(1),r.nc("ngIf",t.migrated)}}const sit=["anais-read-items","anais-seen-glitters","anais-config"];let oit=(()=>{class t{constructor(){this.show=fD.a.migrationEnable,this.migrated=!1}ngOnInit(){localStorage.getItem("anais-migrated-to-betagouv")&&(this.migrated=!0)}migrate(){const t=ND(JSON.stringify(sit.reduce((t,e)=>(t[e]=ND(localStorage.getItem(e)),t),{})));localStorage.setItem("anais-migrated-to-betagouv","1"),location.assign(`https://anais.beta.gouv.fr${location.pathname}#import-settings=${t}`)}redirect(){location.assign(`https://anais.beta.gouv.fr${location.pathname}`)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-server-migration-banner"]],decls:1,vars:1,consts:[["class","banner",4,"ngIf"],[1,"banner"],[1,"mr-2"],[3,"ngIf"],["mat-stroked-button","",1,"ml-2",3,"click"]],template:function(t,e){1&t&&r.Ic(0,rit,5,2,"div",0),2&t&&r.nc("ngIf",e.show)},directives:[ut,Yp,Dl],styles:[".banner[_ngcontent-%COMP%]{width:100%;padding:.5em;background-color:#ff5353;display:flex;justify-content:center;align-items:center}"]}),t})(),ait=(()=>{class t{constructor(t,e){this.changeDetectorRef=t,this.appVersionService=e,this.show=!1}ngOnInit(){this.changeDetectorRef.detach(),this.appVersionService.needsReload$.subscribe(()=>{this.show=!0,this.changeDetectorRef.detectChanges()})}reload(){location.reload()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(c8))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-update-notification"]],decls:6,vars:2,consts:[[1,"update-notification","mat-elevation-z8"],[1,"update-notification__message"],["mat-button","","color","primary","title","Recharger la page",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Kc(2," Une mise \xe0 jour de l'application a \xe9t\xe9 d\xe9tect\xe9e. Veuillez rafraichir la page afin de b\xe9n\xe9ficier des derni\xe8res fonctionnalit\xe9s. "),r.Ub(),r.Vb(3,"button",2),r.cc("click",function(){return e.reload()}),r.Vb(4,"mat-icon"),r.Kc(5,"refresh"),r.Ub(),r.Ub(),r.Ub()),2&t&&r.Hb("update-notification--visible",e.show)},directives:[Dl,Yp],styles:[".update-notification[_ngcontent-%COMP%]{position:absolute;z-index:11;display:flex;bottom:3em;left:50%;height:60px;background:#fff;transition:all .5s;transform:translateX(-50%) translateY(200%);opacity:0}.update-notification--visible[_ngcontent-%COMP%]{transform:translateX(-50%) translateY(0);opacity:1}.update-notification__message[_ngcontent-%COMP%]{padding:1em;align-self:center;color:#383838}"]}),t})(),lit=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-root"]],decls:4,vars:0,template:function(t,e){1&t&&(r.Qb(0,"app-maintenance-banner"),r.Qb(1,"app-server-migration-banner"),r.Vb(2,"router-outlet"),r.Qb(3,"app-update-notification"),r.Ub())},directives:[eit,oit,hw,ait],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}"]}),t})();var cit,hit=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(){cit=Function.prototype.toString,Function.prototype.toString=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var i=this.__sentry_original__||this;return cit.apply(i,t)}},t.id="FunctionToString",t}(),uit=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],dit=function(){function t(e){void 0===e&&(e={}),this._options=e,this.name=t.id}return t.prototype.setupOnce=function(){tC(function(e){var i=bC();if(!i)return e;var n=i.getIntegration(t);if(n){var r=i.getClient(),s=r?r.getOptions():{},o=n._mergeOptions(s);if(n._shouldDropEvent(e,o))return null}return e})},t.prototype._shouldDropEvent=function(t,e){return this._isSentryError(t,e)?(Zx.warn("Event dropped due to being internal Sentry Error.\nEvent: "+Object(zx.d)(t)),!0):this._isIgnoredError(t,e)?(Zx.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: "+Object(zx.d)(t)),!0):this._isDeniedUrl(t,e)?(Zx.warn("Event dropped due to being matched by `denyUrls` option.\nEvent: "+Object(zx.d)(t)+".\nUrl: "+this._getEventFilterUrl(t)),!0):!this._isAllowedUrl(t,e)&&(Zx.warn("Event dropped due to not being matched by `allowUrls` option.\nEvent: "+Object(zx.d)(t)+".\nUrl: "+this._getEventFilterUrl(t)),!0)},t.prototype._isSentryError=function(t,e){if(!e.ignoreInternal)return!1;try{return t&&t.exception&&t.exception.values&&t.exception.values[0]&&"SentryError"===t.exception.values[0].type||!1}catch(i){return!1}},t.prototype._isIgnoredError=function(t,e){return!(!e.ignoreErrors||!e.ignoreErrors.length)&&this._getPossibleEventMessages(t).some(function(t){return e.ignoreErrors.some(function(e){return Object(sC.a)(t,e)})})},t.prototype._isDeniedUrl=function(t,e){if(!e.denyUrls||!e.denyUrls.length)return!1;var i=this._getEventFilterUrl(t);return!!i&&e.denyUrls.some(function(t){return Object(sC.a)(i,t)})},t.prototype._isAllowedUrl=function(t,e){if(!e.allowUrls||!e.allowUrls.length)return!0;var i=this._getEventFilterUrl(t);return!i||e.allowUrls.some(function(t){return Object(sC.a)(i,t)})},t.prototype._mergeOptions=function(t){return void 0===t&&(t={}),{allowUrls:jx(this._options.whitelistUrls||[],this._options.allowUrls||[],t.whitelistUrls||[],t.allowUrls||[]),denyUrls:jx(this._options.blacklistUrls||[],this._options.denyUrls||[],t.blacklistUrls||[],t.denyUrls||[]),ignoreErrors:jx(this._options.ignoreErrors||[],t.ignoreErrors||[],uit),ignoreInternal:void 0===this._options.ignoreInternal||this._options.ignoreInternal}},t.prototype._getPossibleEventMessages=function(t){if(t.message)return[t.message];if(t.exception)try{var e=t.exception.values&&t.exception.values[0]||{},i=e.type,n=e.value,r=void 0===n?"":n;return[""+r,(void 0===i?"":i)+": "+r]}catch(s){return Zx.error("Cannot extract message for event "+Object(zx.d)(t)),[]}return[]},t.prototype._getEventFilterUrl=function(t){try{if(t.stacktrace){var e=t.stacktrace.frames;return e&&e[e.length-1].filename||null}if(t.exception){var i=t.exception.values&&t.exception.values[0].stacktrace&&t.exception.values[0].stacktrace.frames;return i&&i[i.length-1].filename||null}return null}catch(n){return Zx.error("Cannot extract url for event "+Object(zx.d)(t)),null}},t.id="InboundFilters",t}();function pit(){if(!("fetch"in Object(zx.e)()))return!1;try{return new Headers,new Request(""),new Response,!0}catch($nt){return!1}}function fit(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function mit(){if(!pit())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch($nt){return!1}}var git,Ait,bit,vit=Object(zx.e)(),_it={},yit={};function wit(t){t&&"string"==typeof t.type&&"function"==typeof t.callback&&(_it[t.type]=_it[t.type]||[],_it[t.type].push(t.callback),function(t){if(!yit[t])switch(yit[t]=!0,t){case"console":"console"in vit&&["debug","info","warn","error","log","assert"].forEach(function(t){t in vit.console&&oC(vit.console,t,function(e){return function(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];xit("console",{args:i,level:t}),e&&Function.prototype.apply.call(e,vit.console,i)}})});break;case"dom":!function(){if("document"in vit){var t=xit.bind(null,"dom"),e=kit(t,!0);vit.document.addEventListener("click",e,!1),vit.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(function(e){var i=vit[e]&&vit[e].prototype;i&&i.hasOwnProperty&&i.hasOwnProperty("addEventListener")&&(oC(i,"addEventListener",function(e){return function(i,n,r){if("click"===i||"keypress"==i)try{var s=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},o=s[i]=s[i]||{refCount:0};if(!o.handler){var a=kit(t);o.handler=a,e.call(this,i,a,r)}o.refCount+=1}catch($nt){}return e.call(this,i,n,r)}}),oC(i,"removeEventListener",function(t){return function(e,i,n){if("click"===e||"keypress"==e)try{var r=this.__sentry_instrumentation_handlers__||{},s=r[e];s&&(s.refCount-=1,s.refCount<=0&&(t.call(this,e,s.handler,n),s.handler=void 0,delete r[e]),0===Object.keys(r).length&&delete this.__sentry_instrumentation_handlers__)}catch($nt){}return t.call(this,e,i,n)}}))})}}();break;case"xhr":!function(){if("XMLHttpRequest"in vit){var t=[],e=[],i=XMLHttpRequest.prototype;oC(i,"open",function(i){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var s=this,o=n[1];s.__sentry_xhr__={method:Object(Yx.k)(n[0])?n[0].toUpperCase():n[0],url:n[1]},Object(Yx.k)(o)&&"POST"===s.__sentry_xhr__.method&&o.match(/sentry_key/)&&(s.__sentry_own_request__=!0);var a=function(){if(4===s.readyState){try{s.__sentry_xhr__&&(s.__sentry_xhr__.status_code=s.status)}catch($nt){}try{var i=t.indexOf(s);if(-1!==i){t.splice(i);var r=e.splice(i)[0];s.__sentry_xhr__&&void 0!==r[0]&&(s.__sentry_xhr__.body=r[0])}}catch($nt){}xit("xhr",{args:n,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:s})}};return"onreadystatechange"in s&&"function"==typeof s.onreadystatechange?oC(s,"onreadystatechange",function(t){return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return a(),t.apply(s,e)}}):s.addEventListener("readystatechange",a),i.apply(s,n)}}),oC(i,"send",function(i){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t.push(this),e.push(n),xit("xhr",{args:n,startTimestamp:Date.now(),xhr:this}),i.apply(this,n)}})}}();break;case"fetch":(function(){if(!pit())return!1;var t=Object(zx.e)();if(fit(t.fetch))return!0;var e=!1,i=t.document;if(i&&"function"==typeof i.createElement)try{var n=i.createElement("iframe");n.hidden=!0,i.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=fit(n.contentWindow.fetch)),i.head.removeChild(n)}catch(r){Zx.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e})()&&oC(vit,"fetch",function(t){return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var n={args:e,fetchData:{method:Cit(e),url:Sit(e)},startTimestamp:Date.now()};return xit("fetch",Ux({},n)),t.apply(vit,e).then(function(t){return xit("fetch",Ux(Ux({},n),{endTimestamp:Date.now(),response:t})),t},function(t){throw xit("fetch",Ux(Ux({},n),{endTimestamp:Date.now(),error:t})),t})}});break;case"history":!function(){if(function(){var t=Object(zx.e)(),e=t.chrome;return!(e&&e.app&&e.app.runtime||!("history"in t)||!t.history.pushState||!t.history.replaceState)}()){var t=vit.onpopstate;vit.onpopstate=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var n=vit.location.href,r=git;if(git=n,xit("history",{from:r,to:n}),t)return t.apply(this,e)},oC(vit.history,"pushState",e),oC(vit.history,"replaceState",e)}function e(t){return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var n=e.length>2?e[2]:void 0;if(n){var r=git,s=String(n);git=s,xit("history",{from:r,to:s})}return t.apply(this,e)}}}();break;case"error":Dit=vit.onerror,vit.onerror=function(t,e,i,n,r){return xit("error",{column:n,error:r,line:i,msg:t,url:e}),!!Dit&&Dit.apply(this,arguments)};break;case"unhandledrejection":Iit=vit.onunhandledrejection,vit.onunhandledrejection=function(t){return xit("unhandledrejection",t),!Iit||Iit.apply(this,arguments)};break;default:Zx.warn("unknown instrumentation type:",t)}}(t.type))}function xit(t,e){var i,n;if(t&&_it[t])try{for(var r=Bx(_it[t]||[]),s=r.next();!s.done;s=r.next()){var o=s.value;try{o(e)}catch($nt){Zx.error("Error while triggering instrumentation handler.\nType: "+t+"\nName: "+rC(o)+"\nError: "+$nt)}}}catch(a){i={error:a}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}}function Cit(t){return void 0===t&&(t=[]),"Request"in vit&&Object(Yx.g)(t[0],Request)&&t[0].method?String(t[0].method).toUpperCase():t[1]&&t[1].method?String(t[1].method).toUpperCase():"GET"}function Sit(t){return void 0===t&&(t=[]),"string"==typeof t[0]?t[0]:"Request"in vit&&Object(Yx.g)(t[0],Request)?t[0].url:String(t[0])}function kit(t,e){return void 0===e&&(e=!1),function(i){if(i&&bit!==i&&!function(t){if("keypress"!==t.type)return!1;try{var e=t.target;if(!e||!e.tagName)return!0;if("INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable)return!1}catch($nt){}return!0}(i)){var n="keypress"===i.type?"input":i.type;(void 0===Ait||function(t,e){if(!t)return!0;if(t.type!==e.type)return!0;try{if(t.target!==e.target)return!0}catch($nt){}return!1}(bit,i))&&(t({event:i,name:n,global:e}),bit=i),clearTimeout(Ait),Ait=vit.setTimeout(function(){Ait=void 0},1e3)}}}var Eit,Dit=null,Iit=null,Pit=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){return t.__proto__=e,t}:function(t,e){for(var i in e)t.hasOwnProperty(i)||(t[i]=e[i]);return t}),Oit=function(t){function e(e){var i=this.constructor,n=t.call(this,e)||this;return n.message=e,n.name=i.prototype.constructor.name,Pit(n,i.prototype),n}return Fx(e,t),e}(Error),Mit=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,Tit=function(){function t(t){"string"==typeof t?this._fromString(t):this._fromComponents(t),this._validate()}return t.prototype.toString=function(t){void 0===t&&(t=!1);var e=this,i=e.path,n=e.pass,r=e.port;return e.protocol+"://"+e.publicKey+(t&&n?":"+n:"")+"@"+e.host+(r?":"+r:"")+"/"+(i?i+"/":i)+e.projectId},t.prototype._fromString=function(t){var e=Mit.exec(t);if(!e)throw new Oit("Invalid Dsn");var i=Nx(e.slice(1),6),n=i[0],r=i[1],s=i[2],o=void 0===s?"":s,a=i[3],l=i[4],c=void 0===l?"":l,h="",u=i[5],d=u.split("/");if(d.length>1&&(h=d.slice(0,-1).join("/"),u=d.pop()),u){var p=u.match(/^\d+/);p&&(u=p[0])}this._fromComponents({host:a,pass:o,path:h,projectId:u,port:c,protocol:n,publicKey:r})},t.prototype._fromComponents=function(t){"user"in t&&!("publicKey"in t)&&(t.publicKey=t.user),this.user=t.publicKey||"",this.protocol=t.protocol,this.publicKey=t.publicKey||"",this.pass=t.pass||"",this.host=t.host,this.port=t.port||"",this.path=t.path||"",this.projectId=t.projectId},t.prototype._validate=function(){var t=this;if(["protocol","publicKey","host","projectId"].forEach(function(e){if(!t[e])throw new Oit("Invalid Dsn: "+e+" missing")}),!this.projectId.match(/^\d+$/))throw new Oit("Invalid Dsn: Invalid projectId "+this.projectId);if("http"!==this.protocol&&"https"!==this.protocol)throw new Oit("Invalid Dsn: Invalid protocol "+this.protocol);if(this.port&&isNaN(parseInt(this.port,10)))throw new Oit("Invalid Dsn: Invalid port "+this.port)},t}(),Rit=[],Vit=function(){function t(t,e){this._integrations={},this._processing=0,this._backend=new t(e),this._options=e,e.dsn&&(this._dsn=new Tit(e.dsn))}return t.prototype.captureException=function(t,e,i){var n=this,r=e&&e.event_id;return this._process(this._getBackend().eventFromException(t,e).then(function(t){return n._captureEvent(t,e,i)}).then(function(t){r=t})),r},t.prototype.captureMessage=function(t,e,i,n){var r=this,s=i&&i.event_id,o=Object(Yx.i)(t)?this._getBackend().eventFromMessage(String(t),e,i):this._getBackend().eventFromException(t,i);return this._process(o.then(function(t){return r._captureEvent(t,i,n)}).then(function(t){s=t})),s},t.prototype.captureEvent=function(t,e,i){var n=e&&e.event_id;return this._process(this._captureEvent(t,e,i).then(function(t){n=t})),n},t.prototype.captureSession=function(t){t.release?(this._sendSession(t),t.update({init:!1})):Zx.warn("Discarded session because of missing release")},t.prototype.getDsn=function(){return this._dsn},t.prototype.getOptions=function(){return this._options},t.prototype.flush=function(t){var e=this;return this._isClientProcessing(t).then(function(i){return e._getBackend().getTransport().close(t).then(function(t){return i&&t})})},t.prototype.close=function(t){var e=this;return this.flush(t).then(function(t){return e.getOptions().enabled=!1,t})},t.prototype.setupIntegrations=function(){var t;this._isEnabled()&&(this._integrations=(t={},function(t){var e=t.defaultIntegrations&&jx(t.defaultIntegrations)||[],i=t.integrations,n=[];if(Array.isArray(i)){var r=i.map(function(t){return t.name}),s=[];e.forEach(function(t){-1===r.indexOf(t.name)&&-1===s.indexOf(t.name)&&(n.push(t),s.push(t.name))}),i.forEach(function(t){-1===s.indexOf(t.name)&&(n.push(t),s.push(t.name))})}else"function"==typeof i?(n=i(e),n=Array.isArray(n)?n:[n]):n=jx(e);var o=n.map(function(t){return t.name});return-1!==o.indexOf("Debug")&&n.push.apply(n,jx(n.splice(o.indexOf("Debug"),1))),n}(this._options).forEach(function(e){t[e.name]=e,function(t){-1===Rit.indexOf(t.name)&&(t.setupOnce(tC,bC),Rit.push(t.name),Zx.log("Integration installed: "+t.name))}(e)}),t))},t.prototype.getIntegration=function(t){try{return this._integrations[t.id]||null}catch(e){return Zx.warn("Cannot retrieve integration "+t.id+" from the current Client"),null}},t.prototype._updateSessionFromEvent=function(t,e){var i,n,r,s=!1,o=!1,a=e.exception&&e.exception.values;if(a){o=!0;try{for(var l=Bx(a),c=l.next();!c.done;c=l.next()){var h=c.value.mechanism;if(h&&!1===h.handled){s=!0;break}}}catch(f){i={error:f}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}var u=e.user;if(!t.userAgent){var d=e.request?e.request.headers:{};for(var p in d)if("user-agent"===p.toLowerCase()){r=d[p];break}}t.update(Ux(Ux({},s&&{status:Lx.Crashed}),{user:u,userAgent:r,errors:t.errors+Number(o||s)})),this.captureSession(t)},t.prototype._sendSession=function(t){this._getBackend().sendSession(t)},t.prototype._isClientProcessing=function(t){var e=this;return new Qx(function(i){var n=0,r=setInterval(function(){0==e._processing?(clearInterval(r),i(!0)):(n+=1,t&&n>=t&&(clearInterval(r),i(!1)))},1)})},t.prototype._getBackend=function(){return this._backend},t.prototype._isEnabled=function(){return!1!==this.getOptions().enabled&&void 0!==this._dsn},t.prototype._prepareEvent=function(t,e,i){var n=this,r=this.getOptions().normalizeDepth,s=void 0===r?3:r,o=Ux(Ux({},t),{event_id:t.event_id||(i&&i.event_id?i.event_id:Object(zx.i)()),timestamp:t.timestamp||Object(Hx.a)()});this._applyClientOptions(o),this._applyIntegrationsMetadata(o);var a=e;i&&i.captureContext&&(a=Xx.clone(a).update(i.captureContext));var l=Qx.resolve(o);return a&&(l=a.applyToEvent(o,i)),l.then(function(t){return"number"==typeof s&&s>0?n._normalizeEvent(t,s):t})},t.prototype._normalizeEvent=function(t,e){if(!t)return null;var i=Ux(Ux(Ux(Ux(Ux({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(function(t){return Ux(Ux({},t),t.data&&{data:uC(t.data,e)})})}),t.user&&{user:uC(t.user,e)}),t.contexts&&{contexts:uC(t.contexts,e)}),t.extra&&{extra:uC(t.extra,e)});return t.contexts&&t.contexts.trace&&(i.contexts.trace=t.contexts.trace),i},t.prototype._applyClientOptions=function(t){var e=this.getOptions(),i=e.release,n=e.dist,r=e.maxValueLength,s=void 0===r?250:r;"environment"in t||(t.environment="environment"in e?e.environment:"production"),void 0===t.release&&void 0!==i&&(t.release=i),void 0===t.dist&&void 0!==n&&(t.dist=n),t.message&&(t.message=Object(sC.d)(t.message,s));var o=t.exception&&t.exception.values&&t.exception.values[0];o&&o.value&&(o.value=Object(sC.d)(o.value,s));var a=t.request;a&&a.url&&(a.url=Object(sC.d)(a.url,s))},t.prototype._applyIntegrationsMetadata=function(t){var e=t.sdk,i=Object.keys(this._integrations);e&&i.length>0&&(e.integrations=i)},t.prototype._sendEvent=function(t){this._getBackend().sendEvent(t)},t.prototype._captureEvent=function(t,e,i){return this._processEvent(t,e,i).then(function(t){return t.event_id},function(t){Zx.error(t)})},t.prototype._processEvent=function(t,e,i){var n=this,r=this.getOptions(),s=r.beforeSend,o=r.sampleRate;if(!this._isEnabled())return Qx.reject(new Oit("SDK not enabled, will not send event."));var a="transaction"===t.type;return!a&&"number"==typeof o&&Math.random()>o?Qx.reject(new Oit("Discarding event because it's not included in the random sample (sampling rate = "+o+")")):this._prepareEvent(t,i,e).then(function(t){if(null===t)throw new Oit("An event processor returned null, will not send event.");if(e&&e.data&&!0===e.data.__sentry__||a||!s)return t;var i=s(t,e);if(void 0===i)throw new Oit("`beforeSend` method has to return `null` or a valid event.");return Object(Yx.m)(i)?i.then(function(t){return t},function(t){throw new Oit("beforeSend rejected with "+t)}):i}).then(function(t){if(null===t)throw new Oit("`beforeSend` returned `null`, will not send event.");var e=i&&i.getSession&&i.getSession();return!a&&e&&n._updateSessionFromEvent(e,t),n._sendEvent(t),t}).then(null,function(t){if(t instanceof Oit)throw t;throw n.captureException(t,{data:{__sentry__:!0},originalException:t}),new Oit("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: "+t)})},t.prototype._process=function(t){var e=this;this._processing+=1,t.then(function(t){return e._processing-=1,t},function(t){return e._processing-=1,t})},t}();!function(t){t.Unknown="unknown",t.Skipped="skipped",t.Success="success",t.RateLimit="rate_limit",t.Invalid="invalid",t.Failed="failed"}(Eit||(Eit={})),function(t){t.fromHttpCode=function(e){return e>=200&&e<300?t.Success:429===e?t.RateLimit:e>=400&&e<500?t.Invalid:e>=500?t.Failed:t.Unknown}}(Eit||(Eit={}));var Fit,Lit=function(){function t(){}return t.prototype.sendEvent=function(t){return Qx.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:Eit.Skipped})},t.prototype.close=function(t){return Qx.resolve(!0)},t}(),Uit=function(){function t(t){this._options=t,this._options.dsn||Zx.warn("No DSN provided, backend will not do anything."),this._transport=this._setupTransport()}return t.prototype.eventFromException=function(t,e){throw new Oit("Backend has to implement `eventFromException` method")},t.prototype.eventFromMessage=function(t,e,i){throw new Oit("Backend has to implement `eventFromMessage` method")},t.prototype.sendEvent=function(t){this._transport.sendEvent(t).then(null,function(t){Zx.error("Error while sending event: "+t)})},t.prototype.sendSession=function(t){this._transport.sendSession?this._transport.sendSession(t).then(null,function(t){Zx.error("Error while sending session: "+t)}):Zx.warn("Dropping session because custom transport doesn't implement sendSession")},t.prototype.getTransport=function(){return this._transport},t.prototype._setupTransport=function(){return new Lit},t}();!function(t){t.Fatal="fatal",t.Error="error",t.Warning="warning",t.Log="log",t.Info="info",t.Debug="debug",t.Critical="critical"}(Fit||(Fit={})),function(t){t.fromString=function(e){switch(e){case"debug":return t.Debug;case"info":return t.Info;case"warn":case"warning":return t.Warning;case"error":return t.Error;case"fatal":return t.Fatal;case"critical":return t.Critical;case"log":default:return t.Log}}}(Fit||(Fit={}));var Bit=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Nit=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,jit=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,zit=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Hit=/\((\S*)(?::(\d+))(?::(\d+))\)/,Kit=/Minified React error #\d+;/i;function $it(t){var e=null,i=0;t&&("number"==typeof t.framesToPop?i=t.framesToPop:Kit.test(t.message)&&(i=1));try{if(e=function(t){if(!t||!t.stacktrace)return null;for(var e,i=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,n=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\((.*)\))? in (.*):\s*$/i,r=t.stacktrace.split("\n"),s=[],o=0;o<r.length;o+=2){var a=null;(e=i.exec(r[o]))?a={url:e[2],func:e[3],args:[],line:+e[1],column:null}:(e=n.exec(r[o]))&&(a={url:e[6],func:e[3]||e[4],args:e[5]?e[5].split(","):[],line:+e[1],column:+e[2]}),a&&(!a.func&&a.line&&(a.func="?"),s.push(a))}return s.length?{message:Wit(t),name:t.name,stack:s}:null}(t))return Git(e,i)}catch($nt){}try{if(e=function(t){if(!t||!t.stack)return null;for(var e,i,n,r=[],s=t.stack.split("\n"),o=0;o<s.length;++o){if(i=Bit.exec(s[o])){var a=i[2]&&0===i[2].indexOf("native");i[2]&&0===i[2].indexOf("eval")&&(e=Hit.exec(i[2]))&&(i[2]=e[1],i[3]=e[2],i[4]=e[3]),n={url:i[2]&&0===i[2].indexOf("address at ")?i[2].substr("address at ".length):i[2],func:i[1]||"?",args:a?[i[2]]:[],line:i[3]?+i[3]:null,column:i[4]?+i[4]:null}}else if(i=jit.exec(s[o]))n={url:i[2],func:i[1]||"?",args:[],line:+i[3],column:i[4]?+i[4]:null};else{if(!(i=Nit.exec(s[o])))continue;i[3]&&i[3].indexOf(" > eval")>-1&&(e=zit.exec(i[3]))?(i[1]=i[1]||"eval",i[3]=e[1],i[4]=e[2],i[5]=""):0!==o||i[5]||void 0===t.columnNumber||(r[0].column=t.columnNumber+1),n={url:i[3],func:i[1]||"?",args:i[2]?i[2].split(","):[],line:i[4]?+i[4]:null,column:i[5]?+i[5]:null}}!n.func&&n.line&&(n.func="?"),r.push(n)}return r.length?{message:Wit(t),name:t.name,stack:r}:null}(t))return Git(e,i)}catch($nt){}return{message:Wit(t),name:t&&t.name,stack:[],failed:!0}}function Git(t,e){try{return Ux(Ux({},t),{stack:t.stack.slice(e)})}catch($nt){return t}}function Wit(t){var e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}function Zit(t){var e=Yit(t.stack),i={type:t.name,value:t.message};return e&&e.length&&(i.stacktrace={frames:e}),void 0===i.type&&""===i.value&&(i.value="Unrecoverable error caught"),i}function qit(t){return{exception:{values:[Zit(t)]}}}function Yit(t){if(!t||!t.length)return[];var e=t,i=e[0].func||"",n=e[e.length-1].func||"";return-1===i.indexOf("captureMessage")&&-1===i.indexOf("captureException")||(e=e.slice(1)),-1!==n.indexOf("sentryWrapped")&&(e=e.slice(0,-1)),e.slice(0,50).map(function(t){return{colno:null===t.column?void 0:t.column,filename:t.url||e[0].url,function:t.func||"?",in_app:!0,lineno:null===t.line?void 0:t.line}}).reverse()}function Qit(t,e,i){var n;if(void 0===i&&(i={}),Object(Yx.e)(t)&&t.error)return qit($it(t=t.error));if(Object(Yx.a)(t)||Object(Yx.b)(t)){var r=t,s=r.name||(Object(Yx.a)(r)?"DOMError":"DOMException"),o=r.message?s+": "+r.message:s;return n=Xit(o,e,i),Object(zx.b)(n,o),"code"in r&&(n.tags=Ux(Ux({},n.tags),{"DOMException.code":""+r.code})),n}return Object(Yx.d)(t)?n=qit($it(t)):Object(Yx.h)(t)||Object(Yx.f)(t)?(n=function(t,e,i){var n={exception:{values:[{type:Object(Yx.f)(t)?t.constructor.name:i?"UnhandledRejection":"Error",value:"Non-Error "+(i?"promise rejection":"exception")+" captured with keys: "+dC(t)}]},extra:{__serialized__:lC(t)}};if(e){var r=Yit($it(e).stack);n.stacktrace={frames:r}}return n}(t,e,i.rejection),Object(zx.a)(n,{synthetic:!0}),n):(n=Xit(t,e,i),Object(zx.b)(n,""+t,void 0),Object(zx.a)(n,{synthetic:!0}),n)}function Xit(t,e,i){void 0===i&&(i={});var n={message:t};if(i.attachStacktrace&&e){var r=Yit($it(e).stack);n.stacktrace={frames:r}}return n}function Jit(t){if(t.metadata&&t.metadata.sdk){var e=t.metadata.sdk;return{name:e.name,version:e.version}}}function tnt(t,e){return e?(t.sdk=t.sdk||{name:e.name,version:e.version},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=jx(t.sdk.integrations||[],e.integrations||[]),t.sdk.packages=jx(t.sdk.packages||[],e.packages||[]),t):t}function ent(t,e){var i=Jit(e);return{body:JSON.stringify(Ux({sent_at:(new Date).toISOString()},i&&{sdk:i}))+"\n"+JSON.stringify({type:"session"})+"\n"+JSON.stringify(t),type:"session",url:e.getEnvelopeEndpointWithUrlEncodedAuth()}}function int(t,e){var i=Jit(e),n=t.type||"event",r="transaction"===n,s=t.debug_meta||{},o=s.transactionSampling,a=function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(i[n[r]]=t[n[r]])}return i}(s,["transactionSampling"]),l=o||{},c=l.method,h=l.rate;0===Object.keys(a).length?delete t.debug_meta:t.debug_meta=a;var u={body:JSON.stringify(i?tnt(t,e.metadata.sdk):t),type:n,url:r?e.getEnvelopeEndpointWithUrlEncodedAuth():e.getStoreEndpointWithUrlEncodedAuth()};if(r){var d=JSON.stringify(Ux({event_id:t.event_id,sent_at:(new Date).toISOString()},i&&{sdk:i})),p=JSON.stringify({type:t.type,sample_rates:[{id:c,rate:h}]});u.body=d+"\n"+p+"\n"+u.body}return u}var nnt=function(){function t(t,e){void 0===e&&(e={}),this.dsn=t,this._dsnObject=new Tit(t),this.metadata=e}return t.prototype.getDsn=function(){return this._dsnObject},t.prototype.getBaseApiEndpoint=function(){var t=this._dsnObject;return(t.protocol?t.protocol+":":"")+"//"+t.host+(t.port?":"+t.port:"")+(t.path?"/"+t.path:"")+"/api/"},t.prototype.getStoreEndpoint=function(){return this._getIngestEndpoint("store")},t.prototype.getStoreEndpointWithUrlEncodedAuth=function(){return this.getStoreEndpoint()+"?"+this._encodedAuth()},t.prototype.getEnvelopeEndpointWithUrlEncodedAuth=function(){return this._getEnvelopeEndpoint()+"?"+this._encodedAuth()},t.prototype.getStoreEndpointPath=function(){var t=this._dsnObject;return(t.path?"/"+t.path:"")+"/api/"+t.projectId+"/store/"},t.prototype.getRequestHeaders=function(t,e){var i=this._dsnObject,n=["Sentry sentry_version=7"];return n.push("sentry_client="+t+"/"+e),n.push("sentry_key="+i.publicKey),i.pass&&n.push("sentry_secret="+i.pass),{"Content-Type":"application/json","X-Sentry-Auth":n.join(", ")}},t.prototype.getReportDialogEndpoint=function(t){void 0===t&&(t={});var e=this._dsnObject,i=this.getBaseApiEndpoint()+"embed/error-page/",n=[];for(var r in n.push("dsn="+e.toString()),t)if("dsn"!==r)if("user"===r){if(!t.user)continue;t.user.name&&n.push("name="+encodeURIComponent(t.user.name)),t.user.email&&n.push("email="+encodeURIComponent(t.user.email))}else n.push(encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return n.length?i+"?"+n.join("&"):i},t.prototype._getEnvelopeEndpoint=function(){return this._getIngestEndpoint("envelope")},t.prototype._getIngestEndpoint=function(t){return""+this.getBaseApiEndpoint()+this._dsnObject.projectId+"/"+t+"/"},t.prototype._encodedAuth=function(){var t;return t={sentry_key:this._dsnObject.publicKey,sentry_version:"7"},Object.keys(t).map(function(e){return encodeURIComponent(e)+"="+encodeURIComponent(t[e])}).join("&")},t}(),rnt=function(){function t(t){this._limit=t,this._buffer=[]}return t.prototype.isReady=function(){return void 0===this._limit||this.length()<this._limit},t.prototype.add=function(t){var e=this;return this.isReady()?(-1===this._buffer.indexOf(t)&&this._buffer.push(t),t.then(function(){return e.remove(t)}).then(null,function(){return e.remove(t).then(null,function(){})}),t):Qx.reject(new Oit("Not adding Promise due to buffer limit reached."))},t.prototype.remove=function(t){return this._buffer.splice(this._buffer.indexOf(t),1)[0]},t.prototype.length=function(){return this._buffer.length},t.prototype.drain=function(t){var e=this;return new Qx(function(i){var n=setTimeout(function(){t&&t>0&&i(!1)},t);Qx.all(e._buffer).then(function(){clearTimeout(n),i(!0)}).then(null,function(){i(!0)})})},t}(),snt=function(){function t(t){this.options=t,this._buffer=new rnt(30),this._rateLimits={},this._api=new nnt(t.dsn,t._metadata),this.url=this._api.getStoreEndpointWithUrlEncodedAuth()}return t.prototype.sendEvent=function(t){throw new Oit("Transport Class has to implement `sendEvent` method")},t.prototype.close=function(t){return this._buffer.drain(t)},t.prototype._handleResponse=function(t){var e=t.requestType,i=t.response,n=t.headers,r=t.resolve,s=t.reject,o=Eit.fromHttpCode(i.status);this._handleRateLimit(n)&&Zx.warn("Too many requests, backing off until: "+this._disabledUntil(e)),o!==Eit.Success?s(i):r({status:o})},t.prototype._disabledUntil=function(t){return this._rateLimits[t]||this._rateLimits.all},t.prototype._isRateLimited=function(t){return this._disabledUntil(t)>new Date(Date.now())},t.prototype._handleRateLimit=function(t){var e,i,n,r,s=Date.now(),o=t["x-sentry-rate-limits"],a=t["retry-after"];if(o){try{for(var l=Bx(o.trim().split(",")),c=l.next();!c.done;c=l.next()){var h=c.value.split(":",2),u=parseInt(h[0],10),d=1e3*(isNaN(u)?60:u);try{for(var p=(n=void 0,Bx(h[1].split(";"))),f=p.next();!f.done;f=p.next())this._rateLimits[f.value||"all"]=new Date(s+d)}catch(m){n={error:m}}finally{try{f&&!f.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}}}catch(g){e={error:g}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(e)throw e.error}}return!0}return!!a&&(this._rateLimits.all=new Date(s+Object(zx.g)(s,a)),!0)},t}(),ont=function(t){function e(e,i){void 0===i&&(i=function(){var t,e,i=Object(zx.e)(),n=i.document;if("function"==typeof(null===(t=n)||void 0===t?void 0:t.createElement))try{var r=n.createElement("iframe");if(r.hidden=!0,n.head.appendChild(r),null===(e=r.contentWindow)||void 0===e?void 0:e.fetch)return r.contentWindow.fetch.bind(i);n.head.removeChild(r)}catch($nt){Zx.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",$nt)}return i.fetch.bind(i)}());var n=t.call(this,e)||this;return n._fetch=i,n}return Fx(e,t),e.prototype.sendEvent=function(t){return this._sendRequest(int(t,this._api),t)},e.prototype.sendSession=function(t){return this._sendRequest(ent(t,this._api),t)},e.prototype._sendRequest=function(t,e){var i=this;if(this._isRateLimited(t.type))return Promise.reject({event:e,type:t.type,reason:"Transport locked till "+this._disabledUntil(t.type)+" due to too many requests.",status:429});var n={body:t.body,method:"POST",referrerPolicy:mit()?"origin":""};return void 0!==this.options.fetchParameters&&Object.assign(n,this.options.fetchParameters),void 0!==this.options.headers&&(n.headers=this.options.headers),this._buffer.add(new Qx(function(e,r){i._fetch(t.url,n).then(function(n){var s={"x-sentry-rate-limits":n.headers.get("X-Sentry-Rate-Limits"),"retry-after":n.headers.get("Retry-After")};i._handleResponse({requestType:t.type,response:n,headers:s,resolve:e,reject:r})}).catch(r)}))},e}(snt),ant=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Fx(e,t),e.prototype.sendEvent=function(t){return this._sendRequest(int(t,this._api),t)},e.prototype.sendSession=function(t){return this._sendRequest(ent(t,this._api),t)},e.prototype._sendRequest=function(t,e){var i=this;return this._isRateLimited(t.type)?Promise.reject({event:e,type:t.type,reason:"Transport locked till "+this._disabledUntil(t.type)+" due to too many requests.",status:429}):this._buffer.add(new Qx(function(e,n){var r=new XMLHttpRequest;for(var s in r.onreadystatechange=function(){if(4===r.readyState){var s={"x-sentry-rate-limits":r.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":r.getResponseHeader("Retry-After")};i._handleResponse({requestType:t.type,response:r,headers:s,resolve:e,reject:n})}},r.open("POST",t.url),i.options.headers)i.options.headers.hasOwnProperty(s)&&r.setRequestHeader(s,i.options.headers[s]);r.send(t.body)}))},e}(snt),lnt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Fx(e,t),e.prototype.eventFromException=function(t,e){return function(t,e,i){var n=Qit(e,i&&i.syntheticException||void 0,{attachStacktrace:t.attachStacktrace});return Object(zx.a)(n,{handled:!0,type:"generic"}),n.level=Fit.Error,i&&i.event_id&&(n.event_id=i.event_id),Qx.resolve(n)}(this._options,t,e)},e.prototype.eventFromMessage=function(t,e,i){return void 0===e&&(e=Fit.Info),function(t,e,i,n){void 0===i&&(i=Fit.Info);var r=Xit(e,n&&n.syntheticException||void 0,{attachStacktrace:t.attachStacktrace});return r.level=i,n&&n.event_id&&(r.event_id=n.event_id),Qx.resolve(r)}(this._options,t,e,i)},e.prototype._setupTransport=function(){if(!this._options.dsn)return t.prototype._setupTransport.call(this);var e=Ux(Ux({},this._options.transportOptions),{dsn:this._options.dsn,_metadata:this._options._metadata});return this._options.transport?new this._options.transport(e):pit()?new ont(e):new ant(e)},e}(Uit),cnt=0;function hnt(){return cnt>0}function unt(){cnt+=1,setTimeout(function(){cnt-=1})}function dnt(t,e,i){if(void 0===e&&(e={}),"function"!=typeof t)return t;try{if(t.__sentry__)return t;if(t.__sentry_wrapped__)return t.__sentry_wrapped__}catch($nt){return t}var n=function(){var n=Array.prototype.slice.call(arguments);try{i&&"function"==typeof i&&i.apply(this,arguments);var r=n.map(function(t){return dnt(t,e)});return t.handleEvent?t.handleEvent.apply(this,r):t.apply(this,r)}catch(s){throw unt(),SC(function(t){t.addEventProcessor(function(t){var i=Ux({},t);return e.mechanism&&(Object(zx.b)(i,void 0,void 0),Object(zx.a)(i,e.mechanism)),i.extra=Ux(Ux({},i.extra),{arguments:n}),i}),xC(s)}),s}};try{for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}catch(s){}t.prototype=t.prototype||{},n.prototype=t.prototype,Object.defineProperty(t,"__sentry_wrapped__",{enumerable:!1,value:n}),Object.defineProperties(n,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:t}});try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:function(){return t.name}})}catch(s){}return n}var pnt=function(){function t(e){this.name=t.id,this._options=Ux({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},e)}return t.prototype.addSentryBreadcrumb=function(t){this._options.sentry&&bC().addBreadcrumb({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:Object(zx.d)(t)},{event:t})},t.prototype.setupOnce=function(){var t=this;this._options.console&&wit({callback:function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];t._consoleBreadcrumb.apply(t,jx(e))},type:"console"}),this._options.dom&&wit({callback:function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];t._domBreadcrumb.apply(t,jx(e))},type:"dom"}),this._options.xhr&&wit({callback:function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];t._xhrBreadcrumb.apply(t,jx(e))},type:"xhr"}),this._options.fetch&&wit({callback:function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];t._fetchBreadcrumb.apply(t,jx(e))},type:"fetch"}),this._options.history&&wit({callback:function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];t._historyBreadcrumb.apply(t,jx(e))},type:"history"})},t.prototype._consoleBreadcrumb=function(t){var e={category:"console",data:{arguments:t.args,logger:"console"},level:Fit.fromString(t.level),message:Object(sC.b)(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;e.message="Assertion failed: "+(Object(sC.b)(t.args.slice(1)," ")||"console.assert"),e.data.arguments=t.args.slice(1)}bC().addBreadcrumb(e,{input:t.args,level:t.level})},t.prototype._domBreadcrumb=function(t){var e;try{e=eC(t.event.target?t.event.target:t.event)}catch($nt){e="<unknown>"}0!==e.length&&bC().addBreadcrumb({category:"ui."+t.name,message:e},{event:t.event,name:t.name,global:t.global})},t.prototype._xhrBreadcrumb=function(t){if(t.endTimestamp){if(t.xhr.__sentry_own_request__)return;var e=t.xhr.__sentry_xhr__||{},i=e.method,n=e.url,r=e.status_code,s=e.body;bC().addBreadcrumb({category:"xhr",data:{method:i,url:n,status_code:r},type:"http"},{xhr:t.xhr,input:s})}},t.prototype._fetchBreadcrumb=function(t){t.endTimestamp&&(t.fetchData.url.match(/sentry_key/)&&"POST"===t.fetchData.method||(t.error?bC().addBreadcrumb({category:"fetch",data:t.fetchData,level:Fit.Error,type:"http"},{data:t.error,input:t.args}):bC().addBreadcrumb({category:"fetch",data:Ux(Ux({},t.fetchData),{status_code:t.response.status}),type:"http"},{input:t.args,response:t.response})))},t.prototype._historyBreadcrumb=function(t){var e=Object(zx.e)(),i=t.from,n=t.to,r=Object(zx.h)(e.location.href),s=Object(zx.h)(i),o=Object(zx.h)(n);s.path||(s=r),r.protocol===o.protocol&&r.host===o.host&&(n=o.relative),r.protocol===s.protocol&&r.host===s.host&&(i=s.relative),bC().addBreadcrumb({category:"navigation",data:{from:i,to:n}})},t.id="Breadcrumbs",t}(),fnt=function(t){function e(e){return void 0===e&&(e={}),e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:"6.2.2"}],version:"6.2.2"},t.call(this,lnt,e)||this}return Fx(e,t),e.prototype.showReportDialog=function(t){void 0===t&&(t={}),Object(zx.e)().document&&(this._isEnabled()?function(t){if(void 0===t&&(t={}),t.eventId)if(t.dsn){var e=document.createElement("script");e.async=!0,e.src=new nnt(t.dsn).getReportDialogEndpoint(t),t.onLoad&&(e.onload=t.onLoad),(document.head||document.body).appendChild(e)}else Zx.error("Missing dsn option in showReportDialog call");else Zx.error("Missing eventId option in showReportDialog call")}(Ux(Ux({},t),{dsn:t.dsn||this.getDsn()})):Zx.error("Trying to call showReportDialog with Sentry Client disabled"))},e.prototype._prepareEvent=function(e,i,n){return e.platform=e.platform||"javascript",t.prototype._prepareEvent.call(this,e,i,n)},e.prototype._sendEvent=function(e){var i=this.getIntegration(pnt);i&&i.addSentryBreadcrumb(e),t.prototype._sendEvent.call(this,e)},e}(Vit),mnt=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],gnt=function(){function t(e){this.name=t.id,this._options=Ux({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},e)}return t.prototype.setupOnce=function(){var t=Object(zx.e)();this._options.setTimeout&&oC(t,"setTimeout",this._wrapTimeFunction.bind(this)),this._options.setInterval&&oC(t,"setInterval",this._wrapTimeFunction.bind(this)),this._options.requestAnimationFrame&&oC(t,"requestAnimationFrame",this._wrapRAF.bind(this)),this._options.XMLHttpRequest&&"XMLHttpRequest"in t&&oC(XMLHttpRequest.prototype,"send",this._wrapXHR.bind(this)),this._options.eventTarget&&(Array.isArray(this._options.eventTarget)?this._options.eventTarget:mnt).forEach(this._wrapEventTarget.bind(this))},t.prototype._wrapTimeFunction=function(t){return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var n=e[0];return e[0]=dnt(n,{mechanism:{data:{function:rC(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}},t.prototype._wrapRAF=function(t){return function(e){return t.call(this,dnt(e,{mechanism:{data:{function:"requestAnimationFrame",handler:rC(t)},handled:!0,type:"instrument"}}))}},t.prototype._wrapEventTarget=function(t){var e=Object(zx.e)(),i=e[t]&&e[t].prototype;i&&i.hasOwnProperty&&i.hasOwnProperty("addEventListener")&&(oC(i,"addEventListener",function(e){return function(i,n,r){try{"function"==typeof n.handleEvent&&(n.handleEvent=dnt(n.handleEvent.bind(n),{mechanism:{data:{function:"handleEvent",handler:rC(n),target:t},handled:!0,type:"instrument"}}))}catch(s){}return e.call(this,i,dnt(n,{mechanism:{data:{function:"addEventListener",handler:rC(n),target:t},handled:!0,type:"instrument"}}),r)}}),oC(i,"removeEventListener",function(t){return function(e,i,n){var r,s=i;try{var o=null===(r=s)||void 0===r?void 0:r.__sentry_wrapped__;o&&t.call(this,e,o,n)}catch($nt){}return t.call(this,e,s,n)}}))},t.prototype._wrapXHR=function(t){return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var n=this,r=["onload","onerror","onprogress","onreadystatechange"];return r.forEach(function(t){t in n&&"function"==typeof n[t]&&oC(n,t,function(e){var i={mechanism:{data:{function:t,handler:rC(e)},handled:!0,type:"instrument"}};return e.__sentry_original__&&(i.mechanism.data.handler=rC(e.__sentry_original__)),dnt(e,i)})}),t.apply(this,e)}},t.id="TryCatch",t}(),Ant=function(){function t(e){this.name=t.id,this._onErrorHandlerInstalled=!1,this._onUnhandledRejectionHandlerInstalled=!1,this._options=Ux({onerror:!0,onunhandledrejection:!0},e)}return t.prototype.setupOnce=function(){Error.stackTraceLimit=50,this._options.onerror&&(Zx.log("Global Handler attached: onerror"),this._installGlobalOnErrorHandler()),this._options.onunhandledrejection&&(Zx.log("Global Handler attached: onunhandledrejection"),this._installGlobalOnUnhandledRejectionHandler())},t.prototype._installGlobalOnErrorHandler=function(){var e=this;this._onErrorHandlerInstalled||(wit({callback:function(i){var n=i.error,r=bC(),s=r.getIntegration(t),o=n&&!0===n.__sentry_own_request__;if(s&&!hnt()&&!o){var a=r.getClient(),l=Object(Yx.i)(n)?e._eventFromIncompleteOnError(i.msg,i.url,i.line,i.column):e._enhanceEventWithInitialFrame(Qit(n,void 0,{attachStacktrace:a&&a.getOptions().attachStacktrace,rejection:!1}),i.url,i.line,i.column);Object(zx.a)(l,{handled:!1,type:"onerror"}),r.captureEvent(l,{originalException:n})}},type:"error"}),this._onErrorHandlerInstalled=!0)},t.prototype._installGlobalOnUnhandledRejectionHandler=function(){var e=this;this._onUnhandledRejectionHandlerInstalled||(wit({callback:function(i){var n=i;try{"reason"in i?n=i.reason:"detail"in i&&"reason"in i.detail&&(n=i.detail.reason)}catch(c){}var r=bC(),s=r.getIntegration(t),o=n&&!0===n.__sentry_own_request__;if(!s||hnt()||o)return!0;var a=r.getClient(),l=Object(Yx.i)(n)?e._eventFromRejectionWithPrimitive(n):Qit(n,void 0,{attachStacktrace:a&&a.getOptions().attachStacktrace,rejection:!0});l.level=Fit.Error,Object(zx.a)(l,{handled:!1,type:"onunhandledrejection"}),r.captureEvent(l,{originalException:n})},type:"unhandledrejection"}),this._onUnhandledRejectionHandlerInstalled=!0)},t.prototype._eventFromIncompleteOnError=function(t,e,i,n){var r,s=Object(Yx.e)(t)?t.message:t;if(Object(Yx.k)(s)){var o=s.match(/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i);o&&(r=o[1],s=o[2])}return this._enhanceEventWithInitialFrame({exception:{values:[{type:r||"Error",value:s}]}},e,i,n)},t.prototype._eventFromRejectionWithPrimitive=function(t){return{exception:{values:[{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(t)}]}}},t.prototype._enhanceEventWithInitialFrame=function(t,e,i,n){t.exception=t.exception||{},t.exception.values=t.exception.values||[],t.exception.values[0]=t.exception.values[0]||{},t.exception.values[0].stacktrace=t.exception.values[0].stacktrace||{},t.exception.values[0].stacktrace.frames=t.exception.values[0].stacktrace.frames||[];var r=isNaN(parseInt(n,10))?void 0:n,s=isNaN(parseInt(i,10))?void 0:i,o=Object(Yx.k)(e)&&e.length>0?e:Object(zx.f)();return 0===t.exception.values[0].stacktrace.frames.length&&t.exception.values[0].stacktrace.frames.push({colno:r,filename:o,function:"?",in_app:!0,lineno:s}),t},t.id="GlobalHandlers",t}(),bnt=function(){function t(e){void 0===e&&(e={}),this.name=t.id,this._key=e.key||"cause",this._limit=e.limit||5}return t.prototype.setupOnce=function(){tC(function(e,i){var n=bC().getIntegration(t);return n?n._handler(e,i):e})},t.prototype._handler=function(t,e){if(!(t.exception&&t.exception.values&&e&&Object(Yx.g)(e.originalException,Error)))return t;var i=this._walkErrorTree(e.originalException,this._key);return t.exception.values=jx(i,t.exception.values),t},t.prototype._walkErrorTree=function(t,e,i){if(void 0===i&&(i=[]),!Object(Yx.g)(t[e],Error)||i.length+1>=this._limit)return i;var n=Zit($it(t[e]));return this._walkErrorTree(t[e],e,jx([n],i))},t.id="LinkedErrors",t}(),vnt=Object(zx.e)(),_nt=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(){tC(function(e){var i,n,r;if(bC().getIntegration(t)){if(!vnt.navigator&&!vnt.location&&!vnt.document)return e;var s=(null===(i=e.request)||void 0===i?void 0:i.url)||(null===(n=vnt.location)||void 0===n?void 0:n.href),o=(vnt.document||{}).referrer,a=(vnt.navigator||{}).userAgent,l=Ux(Ux(Ux({},null===(r=e.request)||void 0===r?void 0:r.headers),o&&{Referer:o}),a&&{"User-Agent":a}),c=Ux(Ux({},s&&{url:s}),{headers:l});return Ux(Ux({},e),{request:c})}return e})},t.id="UserAgent",t}(),ynt=[new n.InboundFilters,new n.FunctionToString,new gnt,new pnt,new Ant,new bnt,new _nt];fD.a.sentryURL&&function(t){if(void 0===t&&(t={}),void 0===t.defaultIntegrations&&(t.defaultIntegrations=ynt),void 0===t.release){var e=Object(zx.e)();e.SENTRY_RELEASE&&e.SENTRY_RELEASE.id&&(t.release=e.SENTRY_RELEASE.id)}void 0===t.autoSessionTracking&&(t.autoSessionTracking=!0),function(t,e){!0===e.debug&&Zx.enable();var i=bC(),n=new t(e);i.bindClient(n)}(fnt,t),t.autoSessionTracking&&function(){if(void 0!==Object(zx.e)().document){var t=bC();"startSession"in t&&(t.startSession(),t.captureSession(),wit({callback:function(){t.startSession(),t.captureSession()},type:"history"}))}else Zx.warn("Session tracking in non-browser environment with @sentry/browser is not supported.")}()}({dsn:fD.a.sentryURL});let wnt=(()=>{class t{constructor(t,e,i){this.router=t,this.ngZone=e,this.uiService=i,this.pendingErrors=[],this.unauthorizedError$=new _e.a,this.ngZone.runOutsideAngular(()=>{setInterval(()=>{var t,e;if(this.pendingErrors.length>0){const i=this.pendingErrors.shift();let n="";n="HttpErrorResponse"!==i.name||(null===(e=null===(t=i.headers)||void 0===t?void 0:t.get("x-server"))||void 0===e?void 0:e.startsWith("ANAIS-"))?i.rejection?i.rejection.message:i.message:"Le serveur n'a pas bien r\xe9pondu. Votre acc\xe8s \xe0 internet est-il bloqu\xe9 par un proxy ?",console.error(i),this.uiService.error(n);let r=i.originalError||i;"HttpErrorResponse"===r.name&&(r=Object.assign(new Error,i)),xC(r)}},2e3)})}handleError(t){var e,i;t&&(t.name===kC.Maintenance||(null===(e=t.message)||void 0===e?void 0:e.includes(kC.Maintenance))?this.ngZone.run(()=>{this.router.navigateByUrl("/maintenance").catch(()=>{})}):(t.name!==kC.Unauthorized&&(null===(i=t.rejection)||void 0===i?void 0:i.name)!==kC.Unauthorized||this.ngZone.run(()=>{this.unauthorizedError$.next(null)}),this.pendingErrors.push(t)))}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(sw),r.Zb(r.B),r.Zb(VI))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),xnt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Ji,Sa],Sa]}),t})(),Cnt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[zr,Sa,ve],Sa]}),t})(),Snt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Sa],Sa]}),t})(),knt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Za,Sa],Za,Sa]}),t})(),Ent=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Et,Sa],Sa]}),t})(),Dnt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[qn]]}),t})(),Int=(()=>{class t{constructor(){this.changes=new _e.a,this.optionalLabel="Optional"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(r.Lb)({factory:function(){return new t},token:t,providedIn:"root"}),t})();const Pnt={provide:Int,deps:[[new r.C,new r.M,Int]],useFactory:function(t){return t||new Int}};let Ont=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[Pnt,$a],imports:[[Sa,Et,ve,Pl,Dnt,Qp,nl],Sa]}),t})(),Mnt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[aN,KN,xnt,Cnt,Pl,Xtt,Snt,iF,wL,Zd,Jl,WT,Ott,yu,knt,Qp,Mu,kU,aU,Ka,wA,Ent,mF,uR,nl,Lg,U$,zL,KK,MI,MR,Ont,BV,cH,$T,lA]}),t})(),Tnt=(()=>{class t{constructor(t,e,i,n,r,s,o,a,l,c,h,u,d,p,f,m,g,A,b,v,_,y,w,x,C,S,k,E,D,I,P,O,M,T,R,V,F,L,U,B,N,j,z,H){this.aircraftsService=t,this.alertRulesService=e,this.alertsService=i,this.annotationService=n,this.appVersionService=r,this.assetsService=s,this.authenticationService=o,this.configService=a,this.drawingService=l,this.editZoneService=c,this.errorHandler=h,this.eventsService=u,this.filterConfigurationsService=d,this.fleetsService=p,this.historyService=f,this.geolocationLayerService=m,this.initializationService=g,this.interactionsService=A,this.mapConfigService=b,this.mapRestrictionService=v,this.mapStateService=_,this.mapService=y,this.measureService=w,this.selectionService=x,this.permanentTooltipsService=C,this.playbackService=S,this.portsService=k,this.refreshTimerService=E,this.routeService=D,this.selectedShipsService=I,this.shipsService=P,this.timeRangeService=O,this.screenshotService=M,this.movesService=T,this.tooltipsService=R,this.uiService=V,this.visibilityService=F,this.workerService=L,this.zonesService=U,this.alertsLayerService=B,this.eventsLayerService=N,this.trailsLayerService=j,this.h3TracesLayerService=z,this.zonesLayerService=H}init(){fD.a.production||(window.app=this)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(fX),r.Zb(DP),r.Zb(IP),r.Zb(MP),r.Zb(c8),r.Zb(iX),r.Zb(yI),r.Zb(cI),r.Zb(TP),r.Zb(sL),r.Zb(r.n),r.Zb(IT),r.Zb(PT),r.Zb(OT),r.Zb(bI),r.Zb(n$),r.Zb(RT),r.Zb(ET),r.Zb(hI),r.Zb(RK),r.Zb(gT),r.Zb(pI),r.Zb(WP),r.Zb(xT),r.Zb(a3),r.Zb(tM),r.Zb(TT),r.Zb(_T),r.Zb(vI),r.Zb(uX),r.Zb(wT),r.Zb(yT),r.Zb(z4),r.Zb(mT),r.Zb(kT),r.Zb(VI),r.Zb(vT),r.Zb(_I.a),r.Zb(kP),r.Zb(AX),r.Zb($P),r.Zb(KQ),r.Zb(GP),r.Zb(DT))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Rnt=(()=>{class t{constructor(t,e,i,n,r,s,o){this.historyService=t,this.mapService=e,this.mapConfigService=i,this.mapStateService=n,this.refreshTimerService=r,this.visibilityService=s,this.workerService=o}init(){Hg([this.mapStateService.showAircraftsLayer$,this.mapConfigService.manualMapFetch$]).pipe(Object(Ge.a)(([t,e])=>t&&!e),mn()).subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.aircraftsFeed.enable(t)})),Hg([this.mapStateService.showShipsLayer$,this.mapConfigService.manualMapFetch$]).pipe(Object(Ge.a)(([t,e])=>t&&!e),mn()).subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.shipsFeed.enable(t)})),this.mapConfigService.shipRefreshInterval$.subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.view.setRefreshInterval(t)})),this.mapConfigService.restrictedAreas$.subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.view.setRestrictedAreas(t)})),this.mapConfigService.longitudeCenter$.subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.viewport.setLongitudeCenter(t)})),Hg([this.refreshTimerService.pause$,this.visibilityService.userAFK$]).pipe(Object(Ge.a)(([t,e])=>t||e),mn()).subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.view.pauseRefresh(t)})),this.historyService.timestamp$.subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){this.mapConfigService.manualMapFetch$.value||(yield this.workerService.view.setHistoryTimestamp(t))})),this.mapService.view$.pipe(Gg(1),He(()=>!this.mapConfigService.manualMapFetch$.value)).subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){const e=qD.fromOLExtent(t.extent).toLatLonExtent();yield this.workerService.view.viewExtent(e)}))}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(bI),r.Zb(pI),r.Zb(hI),r.Zb(gT),r.Zb(_T),r.Zb(vT),r.Zb(_I.a))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Vnt=(()=>{class t extends kx{tick(){return AT(2e4)}}return t.\u0275fac=function(e){return Fnt(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();const Fnt=r.Xb(Vnt);let Lnt=(()=>{class t extends ja{parse(t){return W5(t,"dd/MM/yyyy",new Date)}}return t.\u0275fac=function(e){return Unt(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();const Unt=r.Xb(Lnt);let Bnt=(()=>{class t{constructor(){this.changes=new _e.a,this.itemsPerPageLabel="\xc9l\xe9ments par page:",this.nextPageLabel="Page suivante",this.previousPageLabel="Page pr\xe9c\xe9dente",this.firstPageLabel="Premi\xe8re page",this.lastPageLabel="Derni\xe8re page",this.getRangeLabel=(t,e,i)=>{if(0===i||0===e)return`0 sur ${i}`;const n=t*e;return`${n+1} \u2013 ${n<(i=Math.max(i,0))?Math.min(n+e,i):n+e} sur ${i}`}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Nnt=(()=>{class t extends Px{format(t){return`il y a ${UO(Math.round(Math.abs(Date.now()-t)/1e3))}`}}return t.\u0275fac=function(e){return jnt(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();const jnt=r.Xb(Nnt);let znt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t,bootstrap:[lit]}),t.\u0275inj=r.Mb({providers:[{provide:r.n,useClass:wnt},{provide:r.d,useFactory:(t,e)=>()=>Object(ue.a)(void 0,void 0,void 0,function*(){yield Promise.all(["anchor","danger","filter","fleets","hexagon","layers","tooltips","tooltips-mini","trail-detailed","trail-simple","zones"].map(i=>Object(ue.a)(void 0,void 0,void 0,function*(){t.addSvgIcon(i,e.bypassSecurityTrustResourceUrl(`../assets/images/${i}.svg`)),yield t.getNamedSvgIcon(i).toPromise()})))}),deps:[jp,ne],multi:!0},{provide:r.d,useFactory:(t,e,i,n,r,s,o)=>()=>Object(ue.a)(void 0,void 0,void 0,function*(){yield Promise.all([e.init(),Object(ue.a)(void 0,void 0,void 0,function*(){yield s.init(),o.init(),r.init()})]),yield i.init(),fD.a.production||n.init(),t.initialized$.next(!0)}),deps:[MT,iX,yI,Tnt,H4,_I.a,Rnt],multi:!0},{provide:Ta,useClass:Lnt},{provide:mm,useClass:Lnt},{provide:Ma,useValue:"fr"},{provide:mA,useClass:Bnt}],imports:[[Eb,xx.forRoot(),le,Rx.forRoot({clock:{provide:kx,useClass:Vnt},formatter:{provide:Px,useClass:Nnt}}),Jet,Et,Vh,Fh,Vp,Mnt,gv,mg,Ka,ma,cm,_m]]}),t})();fD.a.production&&Object(r.V)();let Hnt=!0;if(location.hash){const t="#import-settings=";if(location.hash.startsWith(t)){const e=location.hash.slice(t.length);console.log("Extract imported settings from hash:",e),history.pushState("",document.title,location.pathname+location.search);try{Object.entries(JSON.parse(jD(e))).forEach(([t,e])=>{localStorage.setItem(t,jD(e))})}catch($nt){document.body.innerHTML=`L'import de la configuration a \xe9chou\xe9 (raison : ${$nt.message}). Veuillez contacter un administrateur de la plateforme pour vous assister.<br><br>\n Donn\xe9es d'import : ${e}`,Hnt=!1}}}var Knt;Hnt&&(null!==(Knt=ZH.getParser(window.navigator.userAgent).satisfies({chrome:">=56",chromium:">=56",firefox:">=52"}))&&void 0!==Knt&&Knt||localStorage.getItem("bypass_browser")?oe().bootstrapModule(znt).catch(t=>console.log(t)):(document.querySelector(".loader").remove(),document.querySelector(".wrongbrowser").style.display="block"))},zn8P:function(t,e){function i(t){return Promise.resolve().then(function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e})}i.keys=function(){return[]},i.resolve=i,t.exports=i,i.id="zn8P"},zx2A:function(t,e,i){"use strict";i.d(e,"a",function(){return o}),i.d(e,"b",function(){return a}),i.d(e,"c",function(){return l});var n=i("7o/Q"),r=i("HDdC"),s=i("SeVD");class o extends n.a{constructor(t){super(),this.parent=t}_next(t){this.parent.notifyNext(t)}_error(t){this.parent.notifyError(t),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class a extends n.a{notifyNext(t){this.destination.next(t)}notifyError(t){this.destination.error(t)}notifyComplete(){this.destination.complete()}}function l(t,e){if(!e.closed)return t instanceof r.a?t.subscribe(e):Object(s.a)(t)(e)}}}
URLhttps://anais.beta.gouv.fr/polyfills-es2015.9c6b185d9749aeb5fdb2.js
MethodGET
Evidenceclass a{constructor(e,t){this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new l(this,this._parent&&this._parent._zoneDelegate,t)}static assertZonePatched(){if(e.Promise!==P.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let e=a.current;for(;e.parent;)e=e.parent;return e}static get current(){return C.zone}static get currentTask(){return j}static __load_patch(t,o){if(P.hasOwnProperty(t)){if(s)throw Error("Already loaded patch: "+t)}else if(!e["__Zone_disable_"+t]){const i="Zone:"+t;n(i),P[t]=o(e,a,x),r(i,i)}}get parent(){return this._parent}get name(){return this._name}get(e){const t=this.getZoneWith(e);if(t)return t._properties[e]}getZoneWith(e){let t=this;for(;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null}fork(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)}wrap(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);const n=this._zoneDelegate.intercept(this,e,t),r=this;return function(){return r.runGuarded(n,this,arguments,t)}}run(e,t,n,r){C={parent:C,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{C=C.parent}}runGuarded(e,t=null,n,r){C={parent:C,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(o){if(this._zoneDelegate.handleError(this,o))throw o}}finally{C=C.parent}}runTask(e,t,n){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||k).name+"; Execution: "+this.name+")");if(e.state===_&&(e.type===O||e.type===D))return;const r=e.state!=w;r&&e._transitionTo(w,T),e.runCount++;const o=j;j=e,C={parent:C,zone:this};try{e.type==D&&e.data&&!e.data.isPeriodic&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(i){if(this._zoneDelegate.handleError(this,i))throw i}}finally{e.state!==_&&e.state!==S&&(e.type==O||e.data&&e.data.isPeriodic?r&&e._transitionTo(T,w):(e.runCount=0,this._updateTaskCount(e,-1),r&&e._transitionTo(_,w,_))),C=C.parent,j=o}}scheduleTask(e){if(e.zone&&e.zone!==this){let t=this;for(;t;){if(t===e.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${e.zone.name}`);t=t.parent}}e._transitionTo(b,_);const t=[];e._zoneDelegates=t,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(n){throw e._transitionTo(S,b,_),this._zoneDelegate.handleError(this,n),n}return e._zoneDelegates===t&&this._updateTaskCount(e,1),e.state==b&&e._transitionTo(T,b),e}scheduleMicroTask(e,t,n,r){return this.scheduleTask(new u(Z,e,t,n,r,void 0))}scheduleMacroTask(e,t,n,r,o){return this.scheduleTask(new u(D,e,t,n,r,o))}scheduleEventTask(e,t,n,r,o){return this.scheduleTask(new u(O,e,t,n,r,o))}cancelTask(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||k).name+"; Execution: "+this.name+")");e._transitionTo(E,T,w);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(S,E),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(_,E),e.runCount=0,e}_updateTaskCount(e,t){const n=e._zoneDelegates;-1==t&&(e._zoneDelegates=null);for(let r=0;r<n.length;r++)n[r]._updateTaskCount(e.type,t)}}a.__symbol__=i;const c={name:"",onHasTask:(e,t,n,r)=>e.hasTask(n,r),onScheduleTask:(e,t,n,r)=>e.scheduleTask(n,r),onInvokeTask:(e,t,n,r,o,i)=>e.invokeTask(n,r,o,i),onCancelTask:(e,t,n,r)=>e.cancelTask(n,r)};class l{constructor(e,t,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=e,this._parentDelegate=t,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._forkCurrZone=n&&(n.onFork?this.zone:t._forkCurrZone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this.zone:t._interceptCurrZone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this.zone:t._invokeCurrZone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this.zone:t._handleErrorCurrZone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this.zone:t._scheduleTaskCurrZone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this.zone:t._invokeTaskCurrZone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this.zone:t._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const r=n&&n.onHasTask;(r||t&&t._hasTaskZS)&&(this._hasTaskZS=r?n:c,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=e,n.onScheduleTask||(this._scheduleTaskZS=c,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this.zone),n.onInvokeTask||(this._invokeTaskZS=c,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this.zone),n.onCancelTask||(this._cancelTaskZS=c,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this.zone))}fork(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new a(e,t)}intercept(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t}invoke(e,t,n,r,o){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,r,o):t.apply(n,r)}handleError(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)}scheduleTask(e,t){let n=t;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t),n||(n=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=Z)throw new Error("Task is missing scheduleFn.");v(t)}return n}invokeTask(e,t,n,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,e,t,n,r):t.callback.apply(n,r)}cancelTask(e,t){let n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,e,t);else{if(!t.cancelFn)throw Error("Task is not cancelable");n=t.cancelFn(t)}return n}hasTask(e,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,e,t)}catch(n){this.handleError(e,n)}}_updateTaskCount(e,t){const n=this._taskCounts,r=n[e],o=n[e]=r+t;if(o<0)throw new Error("More tasks executed then were scheduled.");0!=r&&0!=o||this.hasTask(this.zone,{microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e})}}class u{constructor(t,n,r,o,i,s){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=t,this.source=n,this.data=o,this.scheduleFn=i,this.cancelFn=s,!r)throw new Error("callback is not defined");this.callback=r;const a=this;this.invoke=t===O&&o&&o.useG?u.invokeTask:function(){return u.invokeTask.call(e,a,this,arguments)}}static invokeTask(e,t,n){e||(e=this),z++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==z&&m(),z--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(_,b)}_transitionTo(e,t,n){if(this._state!==t&&this._state!==n)throw new Error(`${this.type} '${this.source}': can not transition to '${e}', expecting state '${t}'${n?" or '"+n+"'":""}, was '${this._state}'.`);this._state=e,e==_&&(this._zoneDelegates=null)}toString(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const f=i("setTimeout"),p=i("Promise"),h=i("then");let d,g=[],y=!1;function v(t){if(0===z&&0===g.length)if(d||e[p]&&(d=e[p].resolve(0)),d){let e=d[h];e||(e=d.then),e.call(d,m)}else e[f](m,0);t&&g.push(t)}function m(){if(!y){for(y=!0;g.length;){const t=g;g=[];for(let n=0;n<t.length;n++){const r=t[n];try{r.zone.runTask(r,null,null)}catch(e){x.onUnhandledError(e)}}}x.microtaskDrainDone(),y=!1}}const k={name:"NO ZONE"},_="notScheduled",b="scheduling",T="scheduled",w="running",E="canceling",S="unknown",Z="microTask",D="macroTask",O="eventTask",P={},x={symbol:i,currentZoneFrame:()=>C,onUnhandledError:I,microtaskDrainDone:I,scheduleMicroTask:v,showUncaughtError:()=>!a[i("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:I,patchMethod:()=>I,bindArguments:()=>[],patchThen:()=>I,patchMacroTask:()=>I,setNativePromise:e=>{e&&"function"==typeof e.resolve&&(d=e.resolve(0))},patchEventPrototype:()=>I,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>I,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>I,wrapWithCurrentZone:()=>I,filterProperties:()=>[],attachOriginToPatched:()=>I,_redefineProperty:()=>I,patchCallbacks:()=>I};let C={parent:null,zone:new a(null,null)},j=null,z=0;function I(){}r("Zone","Zone"),e.Zone=a}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global),Zone.__load_patch("ZoneAwarePromise",(e,t,n)=>{const r=Object.getOwnPropertyDescriptor,o=Object.defineProperty,i=n.symbol,s=[],a=!0===e[i("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],c=i("Promise"),l=i("then");n.onUnhandledError=e=>{if(n.showUncaughtError()){const t=e&&e.rejection;t?console.error("Unhandled Promise rejection:",t instanceof Error?t.message:t,"; Zone:",e.zone.name,"; Task:",e.task&&e.task.source,"; Value:",t,t instanceof Error?t.stack:void 0):console.error(e)}},n.microtaskDrainDone=()=>{for(;s.length;){const t=s.shift();try{t.zone.runGuarded(()=>{throw t})}catch(e){f(e)}}};const u=i("unhandledPromiseRejectionHandler");function f(e){n.onUnhandledError(e);try{const n=t[u];"function"==typeof n&&n.call(this,e)}catch(r){}}function p(e){return e&&e.then}function h(e){return e}function d(e){return D.reject(e)}const g=i("state"),y=i("value"),v=i("finally"),m=i("parentPromiseValue"),k=i("parentPromiseState");function _(e,t){return n=>{try{T(e,t,n)}catch(r){T(e,!1,r)}}}const b=i("currentTaskTrace");function T(e,r,i){const c=function(){let e=!1;return function(t){return function(){e||(e=!0,t.apply(null,arguments))}}}();if(e===i)throw new TypeError("Promise resolved with itself");if(null===e[g]){let f=null;try{"object"!=typeof i&&"function"!=typeof i||(f=i&&i.then)}catch(u){return c(()=>{T(e,!1,u)})(),e}if(!1!==r&&i instanceof D&&i.hasOwnProperty(g)&&i.hasOwnProperty(y)&&null!==i[g])E(i),T(e,i[g],i[y]);else if(!1!==r&&"function"==typeof f)try{f.call(i,c(_(e,r)),c(_(e,!1)))}catch(u){c(()=>{T(e,!1,u)})()}else{e[g]=r;const c=e[y];if(e[y]=i,e[v]===v&&!0===r&&(e[g]=e[k],e[y]=e[m]),!1===r&&i instanceof Error){const e=t.currentTask&&t.currentTask.data&&t.currentTask.data.__creationTrace__;e&&o(i,b,{configurable:!0,enumerable:!1,writable:!0,value:e})}for(let t=0;t<c.length;)S(e,c[t++],c[t++],c[t++],c[t++]);if(0==c.length&&0==r){e[g]=0;let r=i;if(!a)try{throw new Error("Uncaught (in promise): "+((l=i)&&l.toString===Object.prototype.toString?(l.constructor&&l.constructor.name||"")+": "+JSON.stringify(l):l?l.toString():Object.prototype.toString.call(l))+(i&&i.stack?"\n"+i.stack:""))}catch(u){r=u}r.rejection=i,r.promise=e,r.zone=t.current,r.task=t.currentTask,s.push(r),n.scheduleMicroTask()}}}var l;return e}const w=i("rejectionHandledHandler");function E(e){if(0===e[g]){try{const n=t[w];n&&"function"==typeof n&&n.call(this,{rejection:e[y],promise:e})}catch(n){}e[g]=!1;for(let t=0;t<s.length;t++)e===s[t].promise&&s.splice(t,1)}}function S(e,t,n,r,o){E(e);const i=e[g],s=i?"function"==typeof r?r:h:"function"==typeof o?o:d;t.scheduleMicroTask("Promise.then",()=>{try{const r=e[y],o=!!n&&v===n[v];o&&(n[m]=r,n[k]=i);const a=t.run(s,void 0,o&&s!==d&&s!==h?[]:[r]);T(n,!0,a)}catch(r){T(n,!1,r)}},n)}const Z=function(){};class D{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(e){return T(new this(null),!0,e)}static reject(e){return T(new this(null),!1,e)}static race(e){let t,n,r=new this((e,r)=>{t=e,n=r});function o(e){t(e)}function i(e){n(e)}for(let s of e)p(s)||(s=this.resolve(s)),s.then(o,i);return r}static all(e){return D.allWithCallback(e)}static allSettled(e){return(this&&this.prototype instanceof D?this:D).allWithCallback(e,{thenCallback:e=>({status:"fulfilled",value:e}),errorCallback:e=>({status:"rejected",reason:e})})}static allWithCallback(e,t){let n,r,o=new this((e,t)=>{n=e,r=t}),i=2,s=0;const a=[];for(let l of e){p(l)||(l=this.resolve(l));const e=s;try{l.then(r=>{a[e]=t?t.thenCallback(r):r,i--,0===i&&n(a)},o=>{t?(a[e]=t.errorCallback(o),i--,0===i&&n(a)):r(o)})}catch(c){r(c)}i++,s++}return i-=2,0===i&&n(a),o}constructor(e){const t=this;if(!(t instanceof D))throw new Error("Must be an instanceof Promise.");t[g]=null,t[y]=[];try{e&&e(_(t,!0),_(t,!1))}catch(n){T(t,!1,n)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return D}then(e,n){let r=this.constructor[Symbol.species];r&&"function"==typeof r||(r=this.constructor||D);const o=new r(Z),i=t.current;return null==this[g]?this[y].push(i,o,e,n):S(this,i,o,e,n),o}catch(e){return this.then(null,e)}finally(e){let n=this.constructor[Symbol.species];n&&"function"==typeof n||(n=D);const r=new n(Z);r[v]=v;const o=t.current;return null==this[g]?this[y].push(o,r,e,e):S(this,o,r,e,e),r}}D.resolve=D.resolve,D.reject=D.reject,D.race=D.race,D.all=D.all;const O=e[c]=e.Promise,P=t.__symbol__("ZoneAwarePromise");let x=r(e,"Promise");x&&!x.configurable||(x&&delete x.writable,x&&delete x.value,x||(x={configurable:!0,enumerable:!0}),x.get=function(){return e[P]?e[P]:e[c]},x.set=function(t){t===D?e[P]=t:(e[c]=t,t.prototype[l]||j(t),n.setNativePromise(t))},o(e,"Promise",x)),e.Promise=D;const C=i("thenPatched");function j(e){const t=e.prototype,n=r(t,"then");if(n&&(!1===n.writable||!n.configurable))return;const o=t.then;t[l]=o,e.prototype.then=function(e,t){return new D((e,t)=>{o.call(this,e,t)}).then(e,t)},e[C]=!0}if(n.patchThen=j,O){j(O);const t=e.fetch;"function"==typeof t&&(e[n.symbol("fetch")]=t,e.fetch=(z=t,function(){let e=z.apply(this,arguments);if(e instanceof D)return e;let t=e.constructor;return t[C]||j(t),e}))}var z;return Promise[t.__symbol__("uncaughtPromiseErrors")]=s,D});const e=Object.getOwnPropertyDescriptor,t=Object.defineProperty,n=Object.getPrototypeOf,r=Object.create,o=Array.prototype.slice,i=Zone.__symbol__("addEventListener"),s=Zone.__symbol__("removeEventListener"),a=Zone.__symbol__("");function c(e,t){return Zone.current.wrap(e,t)}function l(e,t,n,r,o){return Zone.current.scheduleMacroTask(e,t,n,r,o)}const u=Zone.__symbol__,f="undefined"!=typeof window,p=f?window:void 0,h=f&&p||"object"==typeof self&&self||global,d=[null];function g(e,t){for(let n=e.length-1;n>=0;n--)"function"==typeof e[n]&&(e[n]=c(e[n],t+"_"+n));return e}function y(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&void 0===e.set)}const v="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,m=!("nw"in h)&&void 0!==h.process&&"[object process]"==={}.toString.call(h.process),k=!m&&!v&&!(!f||!p.HTMLElement),_=void 0!==h.process&&"[object process]"==={}.toString.call(h.process)&&!v&&!(!f||!p.HTMLElement),b={},T=function(e){if(!(e=e||h.event))return;let t=b[e.type];t||(t=b[e.type]=u("ON_PROPERTY"+e.type));const n=this||e.target||h,r=n[t];let o;if(k&&n===p&&"error"===e.type){const t=e;o=r&&r.call(this,t.message,t.filename,t.lineno,t.colno,t.error),!0===o&&e.preventDefault()}else o=r&&r.apply(this,arguments),null==o||o||e.preventDefault();return o};function w(n,r,o){let i=e(n,r);if(!i&&o&&e(o,r)&&(i={enumerable:!0,configurable:!0}),!i||!i.configurable)return;const s=u("on"+r+"patched");if(n.hasOwnProperty(s)&&n[s])return;delete i.writable,delete i.value;const a=i.get,c=i.set,l=r.substr(2);let f=b[l];f||(f=b[l]=u("ON_PROPERTY"+l)),i.set=function(e){let t=this;t||n!==h||(t=h),t&&(t[f]&&t.removeEventListener(l,T),c&&c.apply(t,d),"function"==typeof e?(t[f]=e,t.addEventListener(l,T,!1)):t[f]=null)},i.get=function(){let e=this;if(e||n!==h||(e=h),!e)return null;const t=e[f];if(t)return t;if(a){let t=a&&a.call(this);if(t)return i.set.call(this,t),"function"==typeof e.removeAttribute&&e.removeAttribute(r),t}return null},t(n,r,i),n[s]=!0}function E(e,t,n){if(t)for(let r=0;r<t.length;r++)w(e,"on"+t[r],n);else{const t=[];for(const n in e)"on"==n.substr(0,2)&&t.push(n);for(let r=0;r<t.length;r++)w(e,t[r],n)}}const S=u("originalInstance");function Z(e){const n=h[e];if(!n)return;h[u(e)]=n,h[e]=function(){const t=g(arguments,e);switch(t.length){case 0:this[S]=new n;break;case 1:this[S]=new n(t[0]);break;case 2:this[S]=new n(t[0],t[1]);break;case 3:this[S]=new n(t[0],t[1],t[2]);break;case 4:this[S]=new n(t[0],t[1],t[2],t[3]);break;default:throw new Error("Arg list too long.")}},P(h[e],n);const r=new n(function(){});let o;for(o in r)"XMLHttpRequest"===e&&"responseBlob"===o||function(n){"function"==typeof r[n]?h[e].prototype[n]=function(){return this[S][n].apply(this[S],arguments)}:t(h[e].prototype,n,{set:function(t){"function"==typeof t?(this[S][n]=c(t,e+"."+n),P(this[S][n],t)):this[S][n]=t},get:function(){return this[S][n]}})}(o);for(o in n)"prototype"!==o&&n.hasOwnProperty(o)&&(h[e][o]=n[o])}function D(t,r,o){let i=t;for(;i&&!i.hasOwnProperty(r);)i=n(i);!i&&t[r]&&(i=t);const s=u(r);let a=null;if(i&&!(a=i[s])&&(a=i[s]=i[r],y(i&&e(i,r)))){const e=o(a,s,r);i[r]=function(){return e(this,arguments)},P(i[r],a)}return a}function O(e,t,n){let r=null;function o(e){const t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},r.apply(t.target,t.args),e}r=D(e,t,e=>function(t,r){const i=n(t,r);return i.cbIdx>=0&&"function"==typeof r[i.cbIdx]?l(i.name,r[i.cbIdx],i,o):e.apply(t,r)})}function P(e,t){e[u("OriginalDelegate")]=t}let x=!1,C=!1;function j(){try{const e=p.navigator.userAgent;if(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/"))return!0}catch(e){}return!1}function z(){if(x)return C;x=!0;try{const e=p.navigator.userAgent;-1===e.indexOf("MSIE ")&&-1===e.indexOf("Trident/")&&-1===e.indexOf("Edge/")||(C=!0)}catch(e){}return C}Zone.__load_patch("toString",e=>{const t=Function.prototype.toString,n=u("OriginalDelegate"),r=u("Promise"),o=u("Error"),i=function(){if("function"==typeof this){const i=this[n];if(i)return"function"==typeof i?t.call(i):Object.prototype.toString.call(i);if(this===Promise){const n=e[r];if(n)return t.call(n)}if(this===Error){const n=e[o];if(n)return t.call(n)}}return t.call(this)};i[n]=t,Function.prototype.toString=i;const s=Object.prototype.toString;Object.prototype.toString=function(){return this instanceof Promise?"[object Promise]":s.call(this)}});let I=!1;if("undefined"!=typeof window)try{const e=Object.defineProperty({},"passive",{get:function(){I=!0}});window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(ae){I=!1}const R={useG:!0},M={},A={},N=new RegExp("^"+a+"(\\w+)(true|false)$"),L=u("propagationStopped");function B(e,t){const n=(t?t(e):e)+"false",r=(t?t(e):e)+"true",o=a+n,i=a+r;M[e]={},M[e].false=o,M[e].true=i}function H(e,t,r){const o=r&&r.add||"addEventListener",i=r&&r.rm||"removeEventListener",s=r&&r.listeners||"eventListeners",c=r&&r.rmAll||"removeAllListeners",l=u(o),f="."+o+":",p=function(e,t,n){if(e.isRemoved)return;const r=e.callback;"object"==typeof r&&r.handleEvent&&(e.callback=e=>r.handleEvent(e),e.originalDelegate=r),e.invoke(e,t,[n]);const o=e.options;o&&"object"==typeof o&&o.once&&t[i].call(t,n.type,e.originalDelegate?e.originalDelegate:e.callback,o)},h=function(t){if(!(t=t||e.event))return;const n=this||t.target||e,r=n[M[t.type].false];if(r)if(1===r.length)p(r[0],n,t);else{const e=r.slice();for(let r=0;r<e.length&&(!t||!0!==t[L]);r++)p(e[r],n,t)}},d=function(t){if(!(t=t||e.event))return;const n=this||t.target||e,r=n[M[t.type].true];if(r)if(1===r.length)p(r[0],n,t);else{const e=r.slice();for(let r=0;r<e.length&&(!t||!0!==t[L]);r++)p(e[r],n,t)}};function g(t,r){if(!t)return!1;let p=!0;r&&void 0!==r.useG&&(p=r.useG);const g=r&&r.vh;let y=!0;r&&void 0!==r.chkDup&&(y=r.chkDup);let v=!1;r&&void 0!==r.rt&&(v=r.rt);let k=t;for(;k&&!k.hasOwnProperty(o);)k=n(k);if(!k&&t[o]&&(k=t),!k)return!1;if(k[l])return!1;const _=r&&r.eventNameToString,b={},T=k[l]=k[o],w=k[u(i)]=k[i],E=k[u(s)]=k[s],S=k[u(c)]=k[c];let Z;function D(e,t){return!I&&"object"==typeof e&&e?!!e.capture:I&&t?"boolean"==typeof e?{capture:e,passive:!0}:e?"object"==typeof e&&!1!==e.passive?Object.assign(Object.assign({},e),{passive:!0}):e:{passive:!0}:e}r&&r.prepend&&(Z=k[u(r.prepend)]=k[r.prepend]);const O=p?function(e){if(!b.isExisting)return T.call(b.target,b.eventName,b.capture?d:h,b.options)}:function(e){return T.call(b.target,b.eventName,e.invoke,b.options)},x=p?function(e){if(!e.isRemoved){const t=M[e.eventName];let n;t&&(n=t[e.capture?"true":"false"]);const r=n&&e.target[n];if(r)for(let o=0;o<r.length;o++)if(r[o]===e){r.splice(o,1),e.isRemoved=!0,0===r.length&&(e.allRemoved=!0,e.target[n]=null);break}}if(e.allRemoved)return w.call(e.target,e.eventName,e.capture?d:h,e.options)}:function(e){return w.call(e.target,e.eventName,e.invoke,e.options)},C=r&&r.diff?r.diff:function(e,t){const n=typeof t;return"function"===n&&e.callback===t||"object"===n&&e.originalDelegate===t},j=Zone[u("BLACK_LISTED_EVENTS")],z=e[u("PASSIVE_EVENTS")],L=function(t,n,o,i,s=!1,a=!1){return function(){const c=this||e;let l=arguments[0];r&&r.transferEventName&&(l=r.transferEventName(l));let u=arguments[1];if(!u)return t.apply(this,arguments);if(m&&"uncaughtException"===l)return t.apply(this,arguments);let f=!1;if("function"!=typeof u){if(!u.handleEvent)return t.apply(this,arguments);f=!0}if(g&&!g(t,u,c,arguments))return;const h=I&&!!z&&-1!==z.indexOf(l),d=D(arguments[2],h);if(j)for(let e=0;e<j.length;e++)if(l===j[e])return h?t.call(c,l,u,d):t.apply(this,arguments);const v=!!d&&("boolean"==typeof d||d.capture),k=!(!d||"object"!=typeof d)&&d.once,T=Zone.current;let w=M[l];w||(B(l,_),w=M[l]);const E=w[v?"true":"false"];let S,Z=c[E],O=!1;if(Z){if(O=!0,y)for(let e=0;e<Z.length;e++)if(C(Z[e],u))return}else Z=c[E]=[];const P=c.constructor.name,x=A[P];x&&(S=x[l]),S||(S=P+n+(_?_(l):l)),b.options=d,k&&(b.options.once=!1),b.target=c,b.capture=v,b.eventName=l,b.isExisting=O;const N=p?R:void 0;N&&(N.taskData=b);const L=T.scheduleEventTask(S,u,N,o,i);return b.target=null,N&&(N.taskData=null),k&&(d.once=!0),(I||"boolean"!=typeof L.options)&&(L.options=d),L.target=c,L.capture=v,L.eventName=l,f&&(L.originalDelegate=u),a?Z.unshift(L):Z.push(L),s?c:void 0}};return k[o]=L(T,f,O,x,v),Z&&(k.prependListener=L(Z,".prependListener:",function(e){return Z.call(b.target,b.eventName,e.invoke,b.options)},x,v,!0)),k[i]=function(){const t=this||e;let n=arguments[0];r&&r.transferEventName&&(n=r.transferEventName(n));const o=arguments[2],i=!!o&&("boolean"==typeof o||o.capture),s=arguments[1];if(!s)return w.apply(this,arguments);if(g&&!g(w,s,t,arguments))return;const c=M[n];let l;c&&(l=c[i?"true":"false"]);const u=l&&t[l];if(u)for(let e=0;e<u.length;e++){const r=u[e];if(C(r,s))return u.splice(e,1),r.isRemoved=!0,0===u.length&&(r.allRemoved=!0,t[l]=null,"string"==typeof n)&&(t[a+"ON_PROPERTY"+n]=null),r.zone.cancelTask(r),v?t:void 0}return w.apply(this,arguments)},k[s]=function(){const t=this||e;let n=arguments[0];r&&r.transferEventName&&(n=r.transferEventName(n));const o=[],i=F(t,_?_(n):n);for(let e=0;e<i.length;e++){const t=i[e];o.push(t.originalDelegate?t.originalDelegate:t.callback)}return o},k[c]=function(){const t=this||e;let n=arguments[0];if(n){r&&r.transferEventName&&(n=r.transferEventName(n));const e=M[n];if(e){const r=t[e.false],o=t[e.true];if(r){const e=r.slice();for(let t=0;t<e.length;t++){const r=e[t];this[i].call(this,n,r.originalDelegate?r.originalDelegate:r.callback,r.options)}}if(o){const e=o.slice();for(let t=0;t<e.length;t++){const r=e[t];this[i].call(this,n,r.originalDelegate?r.originalDelegate:r.callback,r.options)}}}}else{const e=Object.keys(t);for(let t=0;t<e.length;t++){const n=N.exec(e[t]);let r=n&&n[1];r&&"removeListener"!==r&&this[c].call(this,r)}this[c].call(this,"removeListener")}if(v)return this},P(k[o],T),P(k[i],w),S&&P(k[c],S),E&&P(k[s],E),!0}let y=[];for(let n=0;n<t.length;n++)y[n]=g(t[n],r);return y}function F(e,t){if(!t){const n=[];for(let r in e){const o=N.exec(r);let i=o&&o[1];if(i&&(!t||i===t)){const t=e[r];if(t)for(let e=0;e<t.length;e++)n.push(t[e])}}return n}let n=M[t];n||(B(t),n=M[t]);const r=e[n.false],o=e[n.true];return r?o?r.concat(o):r.slice():o?o.slice():[]}function G(e,t){const n=e.Event;n&&n.prototype&&t.patchMethod(n.prototype,"stopImmediatePropagation",e=>function(t,n){t[L]=!0,e&&e.apply(t,n)})}function U(e,t,n,r,o){const i=Zone.__symbol__(r);if(t[i])return;const s=t[i]=t[r];t[r]=function(i,a,c){return a&&a.prototype&&o.forEach(function(t){const o=`${n}.${r}::`+t,i=a.prototype;if(i.hasOwnProperty(t)){const n=e.ObjectGetOwnPropertyDescriptor(i,t);n&&n.value?(n.value=e.wrapWithCurrentZone(n.value,o),e._redefineProperty(a.prototype,t,n)):i[t]&&(i[t]=e.wrapWithCurrentZone(i[t],o))}else i[t]&&(i[t]=e.wrapWithCurrentZone(i[t],o))}),s.call(t,i,a,c)},e.attachOriginToPatched(t[r],s)}const V=["absolutedeviceorientation","afterinput","afterprint","appinstalled","beforeinstallprompt","beforeprint","beforeunload","devicelight","devicemotion","deviceorientation","deviceorientationabsolute","deviceproximity","hashchange","languagechange","message","mozbeforepaint","offline","online","paint","pageshow","pagehide","popstate","rejectionhandled","storage","unhandledrejection","unload","userproximity","vrdisplayconnected","vrdisplaydisconnected","vrdisplaypresentchange"],W=["encrypted","waitingforkey","msneedkey","mozinterruptbegin","mozinterruptend"],Y=["load"],X=["blur","error","focus","load","resize","scroll","messageerror"],q=["bounce","finish","start"],K=["loadstart","progress","abort","error","load","progress","timeout","loadend","readystatechange"],J=["upgradeneeded","complete","abort","success","error","blocked","versionchange","close"],Q=["close","error","open","message"],$=["error","message"],ee=["abort","animationcancel","animationend","animationiteration","auxclick","beforeinput","blur","cancel","canplay","canplaythrough","change","compositionstart","compositionupdate","compositionend","cuechange","click","close","contextmenu","curechange","dblclick","drag","dragend","dragenter","dragexit","dragleave","dragover","drop","durationchange","emptied","ended","error","focus","focusin","focusout","gotpointercapture","input","invalid","keydown","keypress","keyup","load","loadstart","loadeddata","loadedmetadata","lostpointercapture","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","mousewheel","orientationchange","pause","play","playing","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","mozpointerlockchange","webkitpointerlockerchange","pointerlockerror","mozpointerlockerror","webkitpointerlockerror","pointermove","pointout","pointerover","pointerup","progress","ratechange","reset","resize","scroll","seeked","seeking","select","selectionchange","selectstart","show","sort","stalled","submit","suspend","timeupdate","volumechange","touchcancel","touchmove","touchstart","touchend","transitioncancel","transitionend","waiting","wheel"].concat(["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],["autocomplete","autocompleteerror"],["toggle"],["afterscriptexecute","beforescriptexecute","DOMContentLoaded","freeze","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange","visibilitychange","resume"],V,["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],["activate","afterupdate","ariarequest","beforeactivate","beforedeactivate","beforeeditfocus","beforeupdate","cellchange","controlselect","dataavailable","datasetchanged","datasetcomplete","errorupdate","filterchange","layoutcomplete","losecapture","move","moveend","movestart","propertychange","resizeend","resizestart","rowenter","rowexit","rowsdelete","rowsinserted","command","compassneedscalibration","deactivate","help","mscontentzoom","msmanipulationstatechanged","msgesturechange","msgesturedoubletap","msgestureend","msgesturehold","msgesturestart","msgesturetap","msgotpointercapture","msinertiastart","mslostpointercapture","mspointercancel","mspointerdown","mspointerenter","mspointerhover","mspointerleave","mspointermove","mspointerout","mspointerover","mspointerup","pointerout","mssitemodejumplistitemremoved","msthumbnailclick","stop","storagecommit"]);function te(e,t,n){if(!n||0===n.length)return t;const r=n.filter(t=>t.target===e);if(!r||0===r.length)return t;const o=r[0].ignoreProperties;return t.filter(e=>-1===o.indexOf(e))}function ne(e,t,n,r){e&&E(e,te(e,t,n),r)}function re(e,t){if(m&&!_)return;if(Zone[e.symbol("patchEvents")])return;const r="undefined"!=typeof WebSocket,o=t.__Zone_ignore_on_properties;if(k){const e=window,t=j?[{target:e,ignoreProperties:["error"]}]:[];ne(e,ee.concat(["messageerror"]),o?o.concat(t):o,n(e)),ne(Document.prototype,ee,o),void 0!==e.SVGElement&&ne(e.SVGElement.prototype,ee,o),ne(Element.prototype,ee,o),ne(HTMLElement.prototype,ee,o),ne(HTMLMediaElement.prototype,W,o),ne(HTMLFrameSetElement.prototype,V.concat(X),o),ne(HTMLBodyElement.prototype,V.concat(X),o),ne(HTMLFrameElement.prototype,Y,o),ne(HTMLIFrameElement.prototype,Y,o);const r=e.HTMLMarqueeElement;r&&ne(r.prototype,q,o);const i=e.Worker;i&&ne(i.prototype,$,o)}const i=t.XMLHttpRequest;i&&ne(i.prototype,K,o);const s=t.XMLHttpRequestEventTarget;s&&ne(s&&s.prototype,K,o),"undefined"!=typeof IDBIndex&&(ne(IDBIndex.prototype,J,o),ne(IDBRequest.prototype,J,o),ne(IDBOpenDBRequest.prototype,J,o),ne(IDBDatabase.prototype,J,o),ne(IDBTransaction.prototype,J,o),ne(IDBCursor.prototype,J,o)),r&&ne(WebSocket.prototype,Q,o)}Zone.__load_patch("util",(n,i,s)=>{s.patchOnProperties=E,s.patchMethod=D,s.bindArguments=g,s.patchMacroTask=O;const l=i.__symbol__("BLACK_LISTED_EVENTS"),u=i.__symbol__("UNPATCHED_EVENTS");n[u]&&(n[l]=n[u]),n[l]&&(i[l]=i[u]=n[l]),s.patchEventPrototype=G,s.patchEventTarget=H,s.isIEOrEdge=z,s.ObjectDefineProperty=t,s.ObjectGetOwnPropertyDescriptor=e,s.ObjectCreate=r,s.ArraySlice=o,s.patchClass=Z,s.wrapWithCurrentZone=c,s.filterProperties=te,s.attachOriginToPatched=P,s._redefineProperty=Object.defineProperty,s.patchCallbacks=U,s.getGlobalObjects=()=>({globalSources:A,zoneSymbolEventNames:M,eventNames:ee,isBrowser:k,isMix:_,isNode:m,TRUE_STR:"true",FALSE_STR:"false",ZONE_SYMBOL_PREFIX:a,ADD_EVENT_LISTENER_STR:"addEventListener",REMOVE_EVENT_LISTENER_STR:"removeEventListener"})});const oe=u("zoneTask");function ie(e,t,n,r){let o=null,i=null;n+=r;const s={};function a(t){const n=t.data;return n.args[0]=function(){try{t.invoke.apply(this,arguments)}finally{t.data&&t.data.isPeriodic||("number"==typeof n.handleId?delete s[n.handleId]:n.handleId&&(n.handleId[oe]=null))}},n.handleId=o.apply(e,n.args),t}function c(e){return i(e.data.handleId)}o=D(e,t+=r,n=>function(o,i){if("function"==typeof i[0]){const e=l(t,i[0],{isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?i[1]||0:void 0,args:i},a,c);if(!e)return e;const n=e.data.handleId;return"number"==typeof n?s[n]=e:n&&(n[oe]=e),n&&n.ref&&n.unref&&"function"==typeof n.ref&&"function"==typeof n.unref&&(e.ref=n.ref.bind(n),e.unref=n.unref.bind(n)),"number"==typeof n||n?n:e}return n.apply(e,i)}),i=D(e,n,t=>function(n,r){const o=r[0];let i;"number"==typeof o?i=s[o]:(i=o&&o[oe],i||(i=o)),i&&"string"==typeof i.type?"notScheduled"!==i.state&&(i.cancelFn&&i.data.isPeriodic||0===i.runCount)&&("number"==typeof o?delete s[o]:o&&(o[oe]=null),i.zone.cancelTask(i)):t.apply(e,r)})}function se(e,t){if(Zone[t.symbol("patchEventTarget")])return;const{eventNames:n,zoneSymbolEventNames:r,TRUE_STR:o,FALSE_STR:i,ZONE_SYMBOL_PREFIX:s}=t.getGlobalObjects();for(let c=0;c<n.length;c++){const e=n[c],t=s+(e+i),a=s+(e+o);r[e]={},r[e][i]=t,r[e][o]=a}const a=e.EventTarget;return a&&a.prototype?(t.patchEventTarget(e,[a&&a.prototype]),!0):void 0}Zone.__load_patch("legacy",e=>{const t=e[Zone.__symbol__("legacyPatch")];t&&t()}),Zone.__load_patch("timers",e=>{ie(e,"set","clear","Timeout"),ie(e,"set","clear","Interval"),ie(e,"set","clear","Immediate")}),Zone.__load_patch("requestAnimationFrame",e=>{ie(e,"request","cancel","AnimationFrame"),ie(e,"mozRequest","mozCancel","AnimationFrame"),ie(e,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",(e,t)=>{const n=["alert","prompt","confirm"];for(let r=0;r<n.length;r++)D(e,n[r],(n,r,o)=>function(r,i){return t.current.run(n,e,i,o)})}),Zone.__load_patch("EventTarget",(e,t,n)=>{(function(e,t){t.patchEventPrototype(e,t)})(e,n),se(e,n);const r=e.XMLHttpRequestEventTarget;r&&r.prototype&&n.patchEventTarget(e,[r.prototype]),Z("MutationObserver"),Z("WebKitMutationObserver"),Z("IntersectionObserver"),Z("FileReader")}),Zone.__load_patch("on_property",(e,t,n)=>{re(n,e)}),Zone.__load_patch("customElements",(e,t,n)=>{!function(e,t){const{isBrowser:n,isMix:r}=t.getGlobalObjects();(n||r)&&e.customElements&&"customElements"in e&&t.patchCallbacks(t,e.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback"])}(e,n)}),Zone.__load_patch("XHR",(e,t)=>{!function(e){const p=e.XMLHttpRequest;if(!p)return;const h=p.prototype;let d=h[i],g=h[s];if(!d){const t=e.XMLHttpRequestEventTarget;if(t){const e=t.prototype;d=e[i],g=e[s]}}function y(e){const r=e.data,c=r.target;c[a]=!1,c[f]=!1;const l=c[o];d||(d=c[i],g=c[s]),l&&g.call(c,"readystatechange",l);const u=c[o]=()=>{if(c.readyState===c.DONE)if(!r.aborted&&c[a]&&"scheduled"===e.state){const n=c[t.__symbol__("loadfalse")];if(n&&n.length>0){const o=e.invoke;e.invoke=function(){const n=c[t.__symbol__("loadfalse")];for(let t=0;t<n.length;t++)n[t]===e&&n.splice(t,1);r.aborted||"scheduled"!==e.state||o.call(e)},n.push(e)}else e.invoke()}else r.aborted||!1!==c[a]||(c[f]=!0)};return d.call(c,"readystatechange",u),c[n]||(c[n]=e),T.apply(c,r.args),c[a]=!0,e}function v(){}function m(e){const t=e.data;return t.aborted=!0,w.apply(t.target,t.args)}const k=D(h,"open",()=>function(e,t){return e[r]=0==t[2],e[c]=t[1],k.apply(e,t)}),_=u("fetchTaskAborting"),b=u("fetchTaskScheduling"),T=D(h,"send",()=>function(e,n){if(!0===t.current[b])return T.apply(e,n);if(e[r])return T.apply(e,n);{const t={target:e,url:e[c],isPeriodic:!1,args:n,aborted:!1},r=l("XMLHttpRequest.send",v,t,y,m);e&&!0===e[f]&&!t.aborted&&"scheduled"===r.state&&r.invoke()}}),w=D(h,"abort",()=>function(e,r){const o=e[n];if(o&&"string"==typeof o.type){if(null==o.cancelFn||o.data&&o.data.aborted)return;o.zone.cancelTask(o)}else if(!0===t.current[_])return w.apply(e,r)})}(e);const n=u("xhrTask"),r=u("xhrSync"),o=u("xhrListener"),a=u("xhrScheduled"),c=u("xhrURL"),f=u("xhrErrorBeforeScheduled")}),Zone.__load_patch("geolocation",t=>{t.navigator&&t.navigator.geolocation&&function(t,n){const r=t.constructor.name;for(let o=0;o<n.length;o++){const i=n[o],s=t[i];if(s){if(!y(e(t,i)))continue;t[i]=(e=>{const t=function(){return e.apply(this,g(arguments,r+"."+i))};return P(t,e),t})(s)}}}(t.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",(e,t)=>{function n(t){return function(n){F(e,t).forEach(r=>{const o=e.PromiseRejectionEvent;if(o){const e=new o(t,{promise:n.promise,reason:n.rejection});r.invoke(e)}})}}e.PromiseRejectionEvent&&(t[u("unhandledPromiseRejectionHandler")]=n("unhandledrejection"),t[u("rejectionHandledHandler")]=n("rejectionhandled"))})})?r.call(t,n,t,e):r)||(e.exports=o)},pg82:function(e,t){var n=null,r=null;function o(e,t,n){e.addEventListener(t,function(e){var o=new MouseEvent(n,e);o.pointerId=1,o.isPrimary=!0,o.pointerType="mouse",o.width=1,o.height=1,o.tiltX=0,o.tiltY=0,o.pressure="buttons"in e&&0!==e.buttons?.5:0;var i=e.target;null!==r&&(i=r,"mouseup"===t&&(r=null)),i.dispatchEvent(o),o.defaultPrevented&&e.preventDefault()})}function i(e,t,r){e.addEventListener(t,function(e){for(var o=e.changedTouches,i=o.length,s=0;s<i;s++){var a=new CustomEvent(r,{bubbles:!0,cancelable:!0});a.ctrlKey=e.ctrlKey,a.shiftKey=e.shiftKey,a.altKey=e.altKey,a.metaKey=e.metaKey;var c=o.item(s);a.clientX=c.clientX,a.clientY=c.clientY,a.screenX=c.screenX,a.screenY=c.screenY,a.pageX=c.pageX,a.pageY=c.pageY;var l=c.target.getBoundingClientRect();a.offsetX=c.clientX-l.left,a.offsetY=c.clientY-l.top,a.pointerId=1+c.identifier,a.button=0,a.buttons=1,a.movementX=0,a.movementY=0,a.region=null,a.relatedTarget=null,a.x=a.clientX,a.y=a.clientY,a.pointerType="touch",a.width=1,a.height=1,a.tiltX=0,a.tiltY=0,a.pressure=1,"touchstart"===t&&null===n&&(n=c.identifier),a.isPrimary=c.identifier===n,"touchend"===t&&a.isPrimary&&(n=null),e.target.dispatchEvent(a),a.defaultPrevented&&e.preventDefault()}})}"PointerEvent"in window||(Element.prototype.setPointerCapture=Element.prototype.setCapture,Element.prototype.releasePointerCapture=Element.prototype.releaseCapture,"TouchEvent"in window||(o(document,"mousedown","pointerdown"),o(document,"mousemove","pointermove"),o(document,"mouseup","pointerup")),i(document,"touchstart","pointerdown"),i(document,"touchmove","pointermove"),i(document,"touchend","pointerup"))},ppGB:function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},rmf8:function(e,t,n){var r=n("KPYQ");e.exports=r},sQkB:function(e,t,n){var r=n("2oRo"),o=n("A2ZE"),i=Function.call;e.exports=function(e,t,n){return o(i,r[e].prototype[t],n)}},tiKp:function(e,t,n){var r=n("2oRo"),o=n("VpIT"),i=n("UTVS"),s=n("kOOl"),a=n("STAE"),c=n("/b8u"),l=o("wks"),u=r.Symbol,f=c?u:u&&u.withoutSetter||s;e.exports=function(e){return i(l,e)||(l[e]=a&&i(u,e)?u[e]:f("Symbol."+e)),l[e]}},wE6v:function(e,t,n){var r=n("hh1v");e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},xDBR:function(e,t){e.exports=!1},xrYK:function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},xs3f:function(e,t,n){var r=n("2oRo"),o=n("zk60"),i=r["__core-js_shared__"]||o("__core-js_shared__",{});e.exports=i},yoRg:function(e,t,n){var r=n("UTVS"),o=n("/GqU"),i=n("TWQb").indexOf,s=n("0BK2");e.exports=function(e,t){var n,a=o(e),c=0,l=[];for(n in a)!r(s,n)&&r(a,n)&&l.push(n);for(;t.length>c;)r(a,n=t[c++])&&(~i(l,n)||l.push(n));return l}},zBJ4:function(e,t,n){var r=n("2oRo"),o=n("hh1v"),i=r.document,s=o(i)&&o(i.createElement);e.exports=function(e){return s?i.createElement(e):{}}},zk60:function(e,t,n){var r=n("2oRo"),o=n("kRJp");e.exports=function(e,t){try{o(r,e,t)}catch(n){r[e]=t}return t}}}
Instances2
Solution

Ensure that application Source Code is not available with alternative extensions, and ensure that source code is not present within other files or data deployed to the web server, or served by the web server.

Other information

class a{constructor(t,e=Number.POSITIVE_INFINITY){this.project=t,this.concurrent=e}call(t,e){return e.subscribe(new l(t,this.project,this.concurrent))}}class l extends s.b{constructor(t,e,i=Number.POSITIVE_INFINITY){super(t),this.project=e,this.concurrent=i,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)}_tryNext(t){let e;const i=this.index++;try{e=this.project(t,i)}catch(n){return void this.destination.error(n)}this.active++,this._innerSub(e)}_innerSub(t){const e=new s.a(this),i=this.destination;i.add(e);const n=Object(s.c)(t,e);n!==e&&i.add(n)}_complete(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()}notifyNext(t){this.destination.next(t)}notifyComplete(){const t=this.buffer;this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}},"7o/Q":function(t,e,i){"use strict";i.d(e,"a",function(){return c});var n=i("n6bG"),r=i("gRHU"),s=i("quSY"),o=i("2QA8"),a=i("2fFW"),l=i("NJ4a");class c extends s.a{constructor(t,e,i){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=r.a;break;case 1:if(!t){this.destination=r.a;break}if("object"==typeof t){t instanceof c?(this.syncErrorThrowable=t.syncErrorThrowable,this.destination=t,t.add(this)):(this.syncErrorThrowable=!0,this.destination=new h(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new h(this,t,e,i)}}[o.a](){return this}static create(t,e,i){const n=new c(t,e,i);return n.syncErrorThrowable=!1,n}next(t){this.isStopped||this._next(t)}error(t){this.isStopped||(this.isStopped=!0,this._error(t))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(t){this.destination.next(t)}_error(t){this.destination.error(t),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:t}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this}}class h extends c{constructor(t,e,i,s){let o;super(),this._parentSubscriber=t;let a=this;Object(n.a)(e)?o=e:e&&(o=e.next,i=e.error,s=e.complete,e!==r.a&&(a=Object.create(e),Object(n.a)(a.unsubscribe)&&this.add(a.unsubscribe.bind(a)),a.unsubscribe=this.unsubscribe.bind(this))),this._context=a,this._next=o,this._error=i,this._complete=s}next(t){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;a.a.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}}error(t){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:i}=a.a;if(this._error)i&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)i?(e.syncErrorValue=t,e.syncErrorThrown=!0):Object(l.a)(t),this.unsubscribe();else{if(this.unsubscribe(),i)throw t;Object(l.a)(t)}}}complete(){if(!this.isStopped){const{_parentSubscriber:t}=this;if(this._complete){const e=()=>this._complete.call(this._context);a.a.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(t,e){try{t.call(this._context,e)}catch(i){if(this.unsubscribe(),a.a.useDeprecatedSynchronousErrorHandling)throw i;Object(l.a)(i)}}__tryOrSetError(t,e,i){if(!a.a.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,i)}catch(n){return a.a.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=n,t.syncErrorThrown=!0,!0):(Object(l.a)(n),!0)}return!1}_unsubscribe(){const{_parentSubscriber:t}=this;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}},"9/Zf":function(t,e,i){"use strict";i.d(e,"e",function(){return s}),i.d(e,"i",function(){return o}),i.d(e,"h",function(){return a}),i.d(e,"d",function(){return l}),i.d(e,"c",function(){return c}),i.d(e,"b",function(){return h}),i.d(e,"a",function(){return u}),i.d(e,"f",function(){return d}),i.d(e,"g",function(){return p});var n=i("+A1k"),r=(i("+924"),{});function s(){return Object(n.b)()?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:r}function o(){var t=s(),e=t.crypto||t.msCrypto;if(void 0!==e&&e.getRandomValues){var i=new Uint16Array(8);e.getRandomValues(i),i[3]=4095&i[3]|16384,i[4]=16383&i[4]|32768;var n=function(t){for(var e=t.toString(16);e.length<4;)e="0"+e;return e};return n(i[0])+n(i[1])+n(i[2])+n(i[3])+n(i[4])+n(i[5])+n(i[6])+n(i[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})}function a(t){if(!t)return{};var e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);return e?{host:e[4],path:e[5],protocol:e[2],relative:e[5]+(e[6]||"")+(e[8]||"")}:{}}function l(t){if(t.message)return t.message;if(t.exception&&t.exception.values&&t.exception.values[0]){var e=t.exception.values[0];return e.type&&e.value?e.type+": "+e.value:e.type||e.value||t.event_id||"<unknown>"}return t.event_id||"<unknown>"}function c(t){var e=s();if(!("console"in e))return t();var i=e.console,n={};["debug","info","warn","error","log","assert"].forEach(function(t){t in e.console&&i[t].__sentry_original__&&(n[t]=i[t],i[t]=i[t].__sentry_original__)});var r=t();return Object.keys(n).forEach(function(t){i[t]=n[t]}),r}function h(t,e,i){t.exception=t.exception||{},t.exception.values=t.exception.values||[],t.exception.values[0]=t.exception.values[0]||{},t.exception.values[0].value=t.exception.values[0].value||e||"",t.exception.values[0].type=t.exception.values[0].type||i||"Error"}function u(t,e){void 0===e&&(e={});try{t.exception.values[0].mechanism=t.exception.values[0].mechanism||{},Object.keys(e).forEach(function(i){t.exception.values[0].mechanism[i]=e[i]})}catch(i){}}function d(){try{return document.location.href}catch(t){return""}}function p(t,e){if(!e)return 6e4;var i=parseInt(""+e,10);if(!isNaN(i))return 1e3*i;var n=Date.parse(""+e);return isNaN(n)?6e4:n-t}},"9AQC":function(t,e,i){"use strict";function n(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return m(t,Error)}}function r(t){return"[object ErrorEvent]"===Object.prototype.toString.call(t)}function s(t){return"[object DOMError]"===Object.prototype.toString.call(t)}function o(t){return"[object DOMException]"===Object.prototype.toString.call(t)}function a(t){return"[object String]"===Object.prototype.toString.call(t)}function l(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function c(t){return"[object Object]"===Object.prototype.toString.call(t)}function h(t){return"undefined"!=typeof Event&&m(t,Event)}function u(t){return"undefined"!=typeof Element&&m(t,Element)}function d(t){return"[object RegExp]"===Object.prototype.toString.call(t)}function p(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function f(t){return c(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function m(t,e){try{return t instanceof e}catch(i){return!1}}i.d(e,"d",function(){return n}),i.d(e,"e",function(){return r}),i.d(e,"a",function(){return s}),i.d(e,"b",function(){return o}),i.d(e,"k",function(){return a}),i.d(e,"i",function(){return l}),i.d(e,"h",function(){return c}),i.d(e,"f",function(){return h}),i.d(e,"c",function(){return u}),i.d(e,"j",function(){return d}),i.d(e,"m",function(){return p}),i.d(e,"l",function(){return f}),i.d(e,"g",function(){return m})},"9ppp":function(t,e,i){"use strict";i.d(e,"a",function(){return n});const n=(()=>{function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t})()},"A/ap":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={update:function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}}),i=function(){};window.addEventListener("testPassiveEventSupport",i,e),window.removeEventListener("testPassiveEventSupport",i,e),n.hasSupport=t}}};n.update(),e.default=n},AytR:function(t,e,i){"use strict";i.d(e,"a",function(){return n});const n={production:!0,applicationVersion:"2f11f73f",applicationDate:"2021-07-16",anaisServerURL:r("https://api.anais.beta.gouv.fr/","https://api.anais.fabnum.fr/"),sentryURL:r("https://1b980e78cdd641da8e250c85863eb958@sentry.anais.beta.gouv.fr/2",""),shipPhotoURL:r("{{SHIP_PHOTO_URL}}","https://photos.marinetraffic.com/ais/showphoto.aspx?mmsi={{mmsi}}&size=thumb300"),migrationEnable:r("{{MIGRATION_ENABLE}}",!1),portCallsEnable:r("{{PORTCALLS_ENABLE}}",!1),osmURL:r("{{OSM_URL}}","https://{a-c}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png"),shomURL:r("{{SHOM_URL}}","https://maps.anais.beta.gouv.fr/tile-alt/shom/gray1/{z}/{x}/{y}"),grayURL:r("{{GRAY_URL}}","https://maps.anais.beta.gouv.fr/tile/gray1/{z}/{x}/{y}"),darkURL:r("{{DARK_URL}}","https://maps.anais.beta.gouv.fr/tile/dark1/{z}/{x}/{y}"),terrainURL:r("{{TERRAIN_URL}}","https://maps.anais.beta.gouv.fr/tile/terrain1/{z}/{x}/{y}"),topoimageryURL:r("{{TOPOIMAGERY_URL}}","https://maps.anais.beta.gouv.fr/tile/topoimagery2/{z}/{x}/{y}"),openSeaMapURL:r("{{OPENSEAMAP_URL}}","https://maps.anais.beta.gouv.fr/tile/openseamap/{z}/{x}/{y}"),subcablesURL:r("{{SUBCABLES_URL}}","https://maps.anais.beta.gouv.fr/tile/subcables/{z}/{x}/{y}")};function r(t,e){return t.startsWith("{{")?e:t}},C3FG:function(t,e,i){"use strict";(function(t){i.d(e,"a",function(){return u});var n=i("mrSG"),r=i("PRU4"),s=i("XNiG"),o=i("2Vo4"),a=i("AytR"),l=i("fXoL");const c=new Worker(t,void 0),h=r.b(c);let u=(()=>{class t{constructor(t,e){this.ngZone=t,this.errorHandler=e,this.areaShipsFeeds$=new s.a,this.areaAircraftsFeeds$=new s.a,this.inflightRequests$=new o.a(!1),this.applicationHealth$=new o.a(null),c.addEventListener("message",t=>{"error"!==t.data.type&&"unhandledrejection"!==t.data.type||this.errorHandler.handleError(Object.assign(new Error,t.data))})}init(){return Object(n.a)(this,void 0,void 0,function*(){yield new Promise((t,e)=>{this.ngZone.runOutsideAngular(()=>Object(n.a)(this,void 0,void 0,function*(){try{this.worker=yield new h(a.a.anaisServerURL,r.a({areaShipsFeed:t=>Object(n.a)(this,void 0,void 0,function*(){this.areaShipsFeeds$.next(t)}),areaAircraftsFeed:t=>{this.areaAircraftsFeeds$.next(t)},inflightRequests:t=>{this.inflightRequests$.next(t)},applicationHealth:t=>{this.applicationHealth$.next(t)}})),t()}catch(i){e(i)}}))})})}get(){return this.worker}get aircrafts(){return this.worker.aircrafts}get alerts(){return this.worker.alerts}get alertRules(){return this.worker.alertRules}get annotations(){return this.worker.annotations}get application(){return this.worker.application}get authentication(){return this.worker.authentication}get containers(){return this.worker.containers}get fleets(){return this.worker.fleets}get ports(){return this.worker.ports}get ships(){return this.worker.ships}get users(){return this.worker.users}get zones(){return this.worker.zones}get view(){return this.worker.view}get viewport(){return this.worker.viewport}get aircraftsFeed(){return this.worker.aircraftsFeed}get shipsFeed(){return this.worker.shipsFeed}}return t.\u0275fac=function(e){return new(e||t)(l.Zb(l.B),l.Zb(l.n))},t.\u0275prov=l.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()}).call(this,i("gKCj"))},Cfvw:function(t,e,i){"use strict";i.d(e,"a",function(){return u});var n=i("HDdC"),r=i("SeVD"),s=i("quSY"),o=i("kJWO"),a=i("jZKg"),l=i("Lhse"),c=i("c2HN"),h=i("I55L");function u(t,e){return e?function(t,e){if(null!=t){if(function(t){return t&&"function"==typeof t[o.a]}(t))return function(t,e){return new n.a(i=>{const n=new s.a;return n.add(e.schedule(()=>{const r=t[o.a]();n.add(r.subscribe({next(t){n.add(e.schedule(()=>i.next(t)))},error(t){n.add(e.schedule(()=>i.error(t)))},complete(){n.add(e.schedule(()=>i.complete()))}}))})),n})}(t,e);if(Object(c.a)(t))return function(t,e){return new n.a(i=>{const n=new s.a;return n.add(e.schedule(()=>t.then(t=>{n.add(e.schedule(()=>{i.next(t),n.add(e.schedule(()=>i.complete()))}))},t=>{n.add(e.schedule(()=>i.error(t)))}))),n})}(t,e);if(Object(h.a)(t))return Object(a.a)(t,e);if(function(t){return t&&"function"==typeof t[l.a]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new n.a(i=>{const n=new s.a;let r;return n.add(()=>{r&&"function"==typeof r.return&&r.return()}),n.add(e.schedule(()=>{r=t[l.a](),n.add(e.schedule(function(){if(i.closed)return;let t,e;try{const i=r.next();t=i.value,e=i.done}catch(n){return void i.error(n)}e?i.complete():(i.next(t),this.schedule())}))})),n})}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}(t,e):t instanceof n.a?t:new n.a(Object(r.a)(t))}},DH7j:function(t,e,i){"use strict";i.d(e,"a",function(){return n});const n=(()=>Array.isArray||(t=>t&&"number"==typeof t.length))()},EQ5u:function(t,e,i){"use strict";i.d(e,"a",function(){return a}),i.d(e,"b",function(){return l});var n=i("XNiG"),r=i("HDdC"),s=(i("7o/Q"),i("quSY")),o=i("x+ZX");class a extends r.a{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject}connect(){let t=this._connection;return t||(this._isComplete=!1,t=this._connection=new s.a,t.add(this.source.subscribe(new c(this.getSubject(),this))),t.closed&&(this._connection=null,t=s.a.EMPTY)),t}refCount(){return Object(o.a)()(this)}}const l=(()=>{const t=a.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}})();class c extends n.b{constructor(t,e){super(t),this.connectable=e}_error(t){this._unsubscribe(),super._error(t)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const t=this.connectable;if(t){this.connectable=null;const e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}}}},FRV3:function(t,e,i){"use strict";function n(t){var e,i,n,s,o,a={"-":-1,N:1,S:-1,E:1,W:-1},l={N:"lat",S:"lat",E:"lon",W:"lon"};if(s=a[t[2]]||a[t[1]]||a[t[6]]||1,e=Number(t[3]),i=t[4]?Number(t[4]):0,n=t[5]?Number(t[5]):0,o=l[t[1]]||l[t[6]],!r(e,0,180))throw"Degrees out of range";if(!r(i,0,60))throw"Minutes out of range";if(!r(n,0,60))throw"Seconds out of range";return{decDeg:s*(e+i/60+n/3600),latLon:o}}function r(t,e,i){return t>=e&&t<=i}t.exports=function(t){var e,i,r,s,o,a=/([NSEW])?\s?(-)?(\d+(?:\.\d+)?)[\xb0\xba:d\s]?\s?(?:(\d+(?:\.\d+)?)['\u2019\u2018\u2032:]?\s?(?:(\d{1,2}(?:\.\d+)?)(?:"|\u2033|\u2019\u2019|'')?)?)?\s?([NSEW])?/i,l={};if(!(e=(t=t.trim()).match(a)))throw"Could not parse string";if(e[1]?(e[6]=void 0,o=t.substr(e[0].length-1).trim()):o=t.substr(e[0].length).trim(),r=n(e),s=(i=o.match(a))?n(i):{},void 0===r.latLon){if(!isNaN(r.decDeg)&&isNaN(s.decDeg))return r.decDeg;if(isNaN(r.decDeg)||isNaN(s.decDeg))throw"Could not parse string";r.latLon="lat",s.latLon="lon"}return void 0===s.latLon&&(s.latLon="lat"===r.latLon?"lon":"lat"),l[r.latLon]=r.decDeg,l[s.latLon]=s.decDeg,l}},HDdC:function(t,e,i){"use strict";i.d(e,"a",function(){return c});var n=i("7o/Q"),r=i("2QA8"),s=i("gRHU"),o=i("kJWO"),a=i("SpAZ"),l=i("2fFW");let c=(()=>{class t{constructor(t){this._isScalar=!1,t&&(this._subscribe=t)}lift(e){const i=new t;return i.source=this,i.operator=e,i}subscribe(t,e,i){const{operator:o}=this,a=function(t,e,i){if(t){if(t instanceof n.a)return t;if(t[r.a])return t[r.a]()}return t||e||i?new n.a(t,e,i):new n.a(s.a)}(t,e,i);if(a.add(o?o.call(a,this.source):this.source||l.a.useDeprecatedSynchronousErrorHandling&&!a.syncErrorThrowable?this._subscribe(a):this._trySubscribe(a)),l.a.useDeprecatedSynchronousErrorHandling&&a.syncErrorThrowable&&(a.syncErrorThrowable=!1,a.syncErrorThrown))throw a.syncErrorValue;return a}_trySubscribe(t){try{return this._subscribe(t)}catch(e){l.a.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function(t){for(;t;){const{closed:e,destination:i,isStopped:r}=t;if(e||r)return!1;t=i&&i instanceof n.a?i:null}return!0}(t)?t.error(e):console.warn(e)}}forEach(t,e){return new(e=h(e))((e,i)=>{let n;n=this.subscribe(e=>{try{t(e)}catch(r){i(r),n&&n.unsubscribe()}},i,e)})}_subscribe(t){const{source:e}=this;return e&&e.subscribe(t)}[o.a](){return this}pipe(...t){return 0===t.length?this:(0===(e=t).length?a.a:1===e.length?e[0]:function(t){return e.reduce((t,e)=>e(t),t)})(this);var e}toPromise(t){return new(t=h(t))((t,e)=>{let i;this.subscribe(t=>i=t,t=>e(t),()=>t(i))})}}return t.create=e=>new t(e),t})();function h(t){if(t||(t=l.a.Promise||Promise),!t)throw new Error("no Promise impl found");return t}},I55L:function(t,e,i){"use strict";i.d(e,"a",function(){return n});const n=t=>t&&"number"==typeof t.length&&"function"!=typeof t},JaUx:function(t,e,i){t.exports=function(){"use strict";function t(t,n,r,s,o){!function t(i,n,r,s,o){for(;s>r;){if(s-r>600){var a=s-r+1,l=n-r+1,c=Math.log(a),h=.5*Math.exp(2*c/3),u=.5*Math.sqrt(c*h*(a-h)/a)*(l-a/2<0?-1:1);t(i,n,Math.max(r,Math.floor(n-l*h/a+u)),Math.min(s,Math.floor(n+(a-l)*h/a+u)),o)}var d=i[n],p=r,f=s;for(e(i,r,n),o(i[s],d)>0&&e(i,r,s);p<f;){for(e(i,p,f),p++,f--;o(i[p],d)<0;)p++;for(;o(i[f],d)>0;)f--}0===o(i[r],d)?e(i,r,f):e(i,++f,s),f<=n&&(r=f+1),n<=f&&(s=f-1)}}(t,n,r||0,s||t.length-1,o||i)}function e(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function i(t,e){return t<e?-1:t>e?1:0}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function r(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n<e.length;n++)if(i(t,e[n]))return n;return-1}function s(t,e){o(t,0,t.children.length,e,t)}function o(t,e,i,n,r){r||(r=f(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var s=e;s<i;s++){var o=t.children[s];a(r,t.leaf?n(o):o)}return r}function a(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function l(t,e){return t.minX-e.minX}function c(t,e){return t.minY-e.minY}function h(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function u(t){return t.maxX-t.minX+(t.maxY-t.minY)}function d(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function p(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function f(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function m(e,i,n,r,s){for(var o=[i,n];o.length;)if(!((n=o.pop())-(i=o.pop())<=r)){var a=i+Math.ceil((n-i)/r/2)*r;t(e,a,i,n,s),o.push(i,a,a,n)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,i=[];if(!p(t,e))return i;for(var n=this.toBBox,r=[];e;){for(var s=0;s<e.children.length;s++){var o=e.children[s],a=e.leaf?n(o):o;p(t,a)&&(e.leaf?i.push(o):d(t,a)?this._all(o,i):r.push(o))}e=r.pop()}return i},n.prototype.collides=function(t){var e=this.data;if(!p(t,e))return!1;for(var i=[];e;){for(var n=0;n<e.children.length;n++){var r=e.children[n],s=e.leaf?this.toBBox(r):r;if(p(t,s)){if(e.leaf||d(t,s))return!0;i.push(r)}}e=i.pop()}return!1},n.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var i=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===i.height)this._splitRoot(this.data,i);else{if(this.data.height<i.height){var n=this.data;this.data=i,i=n}this._insert(i,this.data.height-i.height-1,!0)}else this.data=i;return this},n.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},n.prototype.clear=function(){return this.data=f([]),this},n.prototype.remove=function(t,e){if(!t)return this;for(var i,n,s,o=this.data,a=this.toBBox(t),l=[],c=[];o||l.length;){if(o||(o=l.pop(),n=l[l.length-1],i=c.pop(),s=!0),o.leaf){var h=r(t,o.children,e);if(-1!==h)return o.children.splice(h,1),l.push(o),this._condense(l),this}s||o.leaf||!d(o,a)?n?(i++,o=n.children[i],s=!1):o=null:(l.push(o),c.push(i),i=0,n=o,o=o.children[0])}return this},n.prototype.toBBox=function(t){return t},n.prototype.compareMinX=function(t,e){return t.minX-e.minX},n.prototype.compareMinY=function(t,e){return t.minY-e.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(t){return this.data=t,this},n.prototype._all=function(t,e){for(var i=[];t;)t.leaf?e.push.apply(e,t.children):i.push.apply(i,t.children),t=i.pop();return e},n.prototype._build=function(t,e,i,n){var r,o=i-e+1,a=this._maxEntries;if(o<=a)return s(r=f(t.slice(e,i+1)),this.toBBox),r;n||(n=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,n-1))),(r=f([])).leaf=!1,r.height=n;var l=Math.ceil(o/a),c=l*Math.ceil(Math.sqrt(a));m(t,e,i,c,this.compareMinX);for(var h=e;h<=i;h+=c){var u=Math.min(h+c-1,i);m(t,h,u,l,this.compareMinY);for(var d=h;d<=u;d+=l){var p=Math.min(d+l-1,u);r.children.push(this._build(t,d,p,n-1))}}return s(r,this.toBBox),r},n.prototype._chooseSubtree=function(t,e,i,n){for(;n.push(e),!e.leaf&&n.length-1!==i;){for(var r=1/0,s=1/0,o=void 0,a=0;a<e.children.length;a++){var l=e.children[a],c=h(l),u=(d=t,p=l,(Math.max(p.maxX,d.maxX)-Math.min(p.minX,d.minX))*(Math.max(p.maxY,d.maxY)-Math.min(p.minY,d.minY))-c);u<s?(s=u,r=c<r?c:r,o=l):u===s&&c<r&&(r=c,o=l)}e=o||e.children[0]}var d,p;return e},n.prototype._insert=function(t,e,i){var n=i?t:this.toBBox(t),r=[],s=this._chooseSubtree(n,this.data,e,r);for(s.children.push(t),a(s,n);e>=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},n.prototype._split=function(t,e){var i=t[e],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);var o=this._chooseSplitIndex(i,r,n),a=f(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,s(i,this.toBBox),s(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},n.prototype._splitRoot=function(t,e){this.data=f([t,e]),this.data.height=t.height+1,this.data.leaf=!1,s(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,e,i){for(var n,r,s,a,l,c,u,d=1/0,p=1/0,f=e;f<=i-e;f++){var m=o(t,0,f,this.toBBox),g=o(t,f,i,this.toBBox),A=(r=m,s=g,a=Math.max(r.minX,s.minX),l=Math.max(r.minY,s.minY),c=Math.min(r.maxX,s.maxX),u=Math.min(r.maxY,s.maxY),Math.max(0,c-a)*Math.max(0,u-l)),b=h(m)+h(g);A<d?(d=A,n=f,p=b<p?b:p):A===d&&b<p&&(p=b,n=f)}return n||i-e},n.prototype._chooseSplitAxis=function(t,e,i){var n=t.leaf?this.compareMinX:l,r=t.leaf?this.compareMinY:c;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,r)&&t.children.sort(n)},n.prototype._allDistMargin=function(t,e,i,n){t.children.sort(n);for(var r=this.toBBox,s=o(t,0,e,r),l=o(t,i-e,i,r),c=u(s)+u(l),h=e;h<i-e;h++){var d=t.children[h];a(s,t.leaf?r(d):d),c+=u(s)}for(var p=i-e-1;p>=e;p--){var f=t.children[p];a(l,t.leaf?r(f):f),c+=u(l)}return c},n.prototype._adjustParentBBoxes=function(t,e,i){for(var n=i;n>=0;n--)a(e[n],t)},n.prototype._condense=function(t){for(var e=t.length-1,i=void 0;e>=0;e--)0===t[e].children.length?e>0?(i=t[e-1].children).splice(i.indexOf(t[e]),1):this.clear():s(t[e],this.toBBox)},n}()},Lhse:function(t,e,i){"use strict";function n(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}i.d(e,"a",function(){return r});const r=n()},M39V:function(t,e,i){t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,(function(e){return t[e]}).bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=90)}({17:function(t,e,i){"use strict";e.__esModule=!0,e.default=void 0;var n=i(18),r=function(){function t(){}return t.getFirstMatch=function(t,e){var i=e.match(t);return i&&i.length>0&&i[1]||""},t.getSecondMatch=function(t,e){var i=e.match(t);return i&&i.length>1&&i[2]||""},t.matchAndReturnConst=function(t,e,i){if(t.test(e))return i},t.getWindowsVersionName=function(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},t.getMacOSVersionName=function(t){var e=t.split(".").splice(0,2).map(function(t){return parseInt(t,10)||0});if(e.push(0),10===e[0])switch(e[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},t.getAndroidVersionName=function(t){var e=t.split(".").splice(0,2).map(function(t){return parseInt(t,10)||0});if(e.push(0),!(1===e[0]&&e[1]<5))return 1===e[0]&&e[1]<6?"Cupcake":1===e[0]&&e[1]>=6?"Donut":2===e[0]&&e[1]<2?"Eclair":2===e[0]&&2===e[1]?"Froyo":2===e[0]&&e[1]>2?"Gingerbread":3===e[0]?"Honeycomb":4===e[0]&&e[1]<1?"Ice Cream Sandwich":4===e[0]&&e[1]<4?"Jelly Bean":4===e[0]&&e[1]>=4?"KitKat":5===e[0]?"Lollipop":6===e[0]?"Marshmallow":7===e[0]?"Nougat":8===e[0]?"Oreo":9===e[0]?"Pie":void 0},t.getVersionPrecision=function(t){return t.split(".").length},t.compareVersions=function(e,i,n){void 0===n&&(n=!1);var r=t.getVersionPrecision(e),s=t.getVersionPrecision(i),o=Math.max(r,s),a=0,l=t.map([e,i],function(e){var i=o-t.getVersionPrecision(e),n=e+new Array(i+1).join(".0");return t.map(n.split("."),function(t){return new Array(20-t.length).join("0")+t}).reverse()});for(n&&(a=o-Math.min(r,s)),o-=1;o>=a;){if(l[0][o]>l[1][o])return 1;if(l[0][o]===l[1][o]){if(o===a)return 0;o-=1}else if(l[0][o]<l[1][o])return-1}},t.map=function(t,e){var i,n=[];if(Array.prototype.map)return Array.prototype.map.call(t,e);for(i=0;i<t.length;i+=1)n.push(e(t[i]));return n},t.find=function(t,e){var i,n;if(Array.prototype.find)return Array.prototype.find.call(t,e);for(i=0,n=t.length;i<n;i+=1){var r=t[i];if(e(r,i))return r}},t.assign=function(t){for(var e,i,n=t,r=arguments.length,s=new Array(r>1?r-1:0),o=1;o<r;o++)s[o-1]=arguments[o];if(Object.assign)return Object.assign.apply(Object,[t].concat(s));var a=function(){var t=s[e];"object"==typeof t&&null!==t&&Object.keys(t).forEach(function(e){n[e]=t[e]})};for(e=0,i=s.length;e<i;e+=1)a();return t},t.getBrowserAlias=function(t){return n.BROWSER_ALIASES_MAP[t]},t.getBrowserTypeByAlias=function(t){return n.BROWSER_MAP[t]||""},t}();e.default=r,t.exports=e.default},18:function(t,e,i){"use strict";e.__esModule=!0,e.ENGINE_MAP=e.OS_MAP=e.PLATFORMS_MAP=e.BROWSER_MAP=e.BROWSER_ALIASES_MAP=void 0,e.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},e.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},e.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},e.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},e.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(t,e,i){"use strict";e.__esModule=!0,e.default=void 0;var n,r=(n=i(91))&&n.__esModule?n:{default:n},s=i(18);function o(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var a=function(){function t(){}var e,i;return t.getParser=function(t,e){if(void 0===e&&(e=!1),"string"!=typeof t)throw new Error("UserAgent should be a string");return new r.default(t,e)},t.parse=function(t){return new r.default(t).getResult()},e=t,(i=[{key:"BROWSER_MAP",get:function(){return s.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return s.ENGINE_MAP}},{key:"OS_MAP",get:function(){return s.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return s.PLATFORMS_MAP}}])&&o(e,i),t}();e.default=a,t.exports=e.default},91:function(t,e,i){"use strict";e.__esModule=!0,e.default=void 0;var n=l(i(92)),r=l(i(93)),s=l(i(94)),o=l(i(95)),a=l(i(17));function l(t){return t&&t.__esModule?t:{default:t}}var c=function(){function t(t,e){if(void 0===e&&(e=!1),null==t||""===t)throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},!0!==e&&this.parse()}var e=t.prototype;return e.getUA=function(){return this._ua},e.test=function(t){return t.test(this._ua)},e.parseBrowser=function(){var t=this;this.parsedResult.browser={};var e=a.default.find(n.default,function(e){if("function"==typeof e.test)return e.test(t);if(e.test instanceof Array)return e.test.some(function(e){return t.test(e)});throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser},e.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},e.getBrowserName=function(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},e.getBrowserVersion=function(){return this.getBrowser().version},e.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},e.parseOS=function(){var t=this;this.parsedResult.os={};var e=a.default.find(r.default,function(e){if("function"==typeof e.test)return e.test(t);if(e.test instanceof Array)return e.test.some(function(e){return t.test(e)});throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os},e.getOSName=function(t){var e=this.getOS().name;return t?String(e).toLowerCase()||"":e||""},e.getOSVersion=function(){return this.getOS().version},e.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},e.getPlatformType=function(t){void 0===t&&(t=!1);var e=this.getPlatform().type;return t?String(e).toLowerCase()||"":e||""},e.parsePlatform=function(){var t=this;this.parsedResult.platform={};var e=a.default.find(s.default,function(e){if("function"==typeof e.test)return e.test(t);if(e.test instanceof Array)return e.test.some(function(e){return t.test(e)});throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform},e.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},e.getEngineName=function(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},e.parseEngine=function(){var t=this;this.parsedResult.engine={};var e=a.default.find(o.default,function(e){if("function"==typeof e.test)return e.test(t);if(e.test instanceof Array)return e.test.some(function(e){return t.test(e)});throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine},e.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},e.getResult=function(){return a.default.assign({},this.parsedResult)},e.satisfies=function(t){var e=this,i={},n=0,r={},s=0;if(Object.keys(t).forEach(function(e){var o=t[e];"string"==typeof o?(r[e]=o,s+=1):"object"==typeof o&&(i[e]=o,n+=1)}),n>0){var o=Object.keys(i),l=a.default.find(o,function(t){return e.isOS(t)});if(l){var c=this.satisfies(i[l]);if(void 0!==c)return c}var h=a.default.find(o,function(t){return e.isPlatform(t)});if(h){var u=this.satisfies(i[h]);if(void 0!==u)return u}}if(s>0){var d=Object.keys(r),p=a.default.find(d,function(t){return e.isBrowser(t,!0)});if(void 0!==p)return this.compareVersion(r[p])}},e.isBrowser=function(t,e){void 0===e&&(e=!1);var i=this.getBrowserName().toLowerCase(),n=t.toLowerCase(),r=a.default.getBrowserTypeByAlias(n);return e&&r&&(n=r.toLowerCase()),n===i},e.compareVersion=function(t){var e=[0],i=t,n=!1,r=this.getBrowserVersion();if("string"==typeof r)return">"===t[0]||"<"===t[0]?(i=t.substr(1),"="===t[1]?(n=!0,i=t.substr(2)):e=[],e.push(">"===t[0]?1:-1)):"="===t[0]?i=t.substr(1):"~"===t[0]&&(n=!0,i=t.substr(1)),e.indexOf(a.default.compareVersions(r,i,n))>-1},e.isOS=function(t){return this.getOSName(!0)===String(t).toLowerCase()},e.isPlatform=function(t){return this.getPlatformType(!0)===String(t).toLowerCase()},e.isEngine=function(t){return this.getEngineName(!0)===String(t).toLowerCase()},e.is=function(t,e){return void 0===e&&(e=!1),this.isBrowser(t,e)||this.isOS(t)||this.isPlatform(t)},e.some=function(t){var e=this;return void 0===t&&(t=[]),t.some(function(t){return e.is(t)})},t}();e.default=c,t.exports=e.default},92:function(t,e,i){"use strict";e.__esModule=!0,e.default=void 0;var n,r=(n=i(17))&&n.__esModule?n:{default:n},s=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(t){var e={name:"Googlebot"},i=r.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||r.default.getFirstMatch(s,t);return i&&(e.version=i),e}},{test:[/opera/i],describe:function(t){var e={name:"Opera"},i=r.default.getFirstMatch(s,t)||r.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/opr\/|opios/i],describe:function(t){var e={name:"Opera"},i=r.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||r.default.getFirstMatch(s,t);return i&&(e.version=i),e}},{test:[/SamsungBrowser/i],describe:function(t){var e={name:"Samsung Internet for Android"},i=r.default.getFirstMatch(s,t)||r.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/Whale/i],describe:function(t){var e={name:"NAVER Whale Browser"},i=r.default.getFirstMatch(s,t)||r.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/MZBrowser/i],describe:function(t){var e={name:"MZ Browser"},i=r.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||r.default.getFirstMatch(s,t);return i&&(e.version=i),e}},{test:[/focus/i],describe:function(t){var e={name:"Focus"},i=r.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||r.default.getFirstMatch(s,t);return i&&(e.version=i),e}},{test:[/swing/i],describe:function(t){var e={name:"Swing"},i=r.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||r.default.getFirstMatch(s,t);return i&&(e.version=i),e}},{test:[/coast/i],describe:function(t){var e={name:"Opera Coast"},i=r.default.getFirstMatch(s,t)||r.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(t){var e={name:"Opera Touch"},i=r.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||r.default.getFirstMatch(s,t);return i&&(e.version=i),e}},{test:[/yabrowser/i],describe:function(t){var e={name:"Yandex Browser"},i=r.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||r.default.getFirstMatch(s,t);return i&&(e.version=i),e}},{test:[/ucbrowser/i],describe:function(t){var e={name:"UC Browser"},i=r.default.getFirstMatch(s,t)||r.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/Maxthon|mxios/i],describe:function(t){var e={name:"Maxthon"},i=r.default.getFirstMatch(s,t)||r.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/epiphany/i],describe:function(t){var e={name:"Epiphany"},i=r.default.getFirstMatch(s,t)||r.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/puffin/i],describe:function(t){var e={name:"Puffin"},i=r.default.getFirstMatch(s,t)||r.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/sleipnir/i],describe:function(t){var e={name:"Sleipnir"},i=r.default.getFirstMatch(s,t)||r.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/k-meleon/i],describe:function(t){var e={name:"K-Meleon"},i=r.default.getFirstMatch(s,t)||r.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/micromessenger/i],describe:function(t){var e={name:"WeChat"},i=r.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||r.default.getFirstMatch(s,t);return i&&(e.version=i),e}},{test:[/qqbrowser/i],describe:function(t){var e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},i=r.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||r.default.getFirstMatch(s,t);return i&&(e.version=i),e}},{test:[/msie|trident/i],describe:function(t){var e={name:"Internet Explorer"},i=r.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/\sedg\//i],describe:function(t){var e={name:"Microsoft Edge"},i=r.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/edg([ea]|ios)/i],describe:function(t){var e={name:"Microsoft Edge"},i=r.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/vivaldi/i],describe:function(t){var e={name:"Vivaldi"},i=r.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/seamonkey/i],describe:function(t){var e={name:"SeaMonkey"},i=r.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/sailfish/i],describe:function(t){var e={name:"Sailfish"},i=r.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return i&&(e.version=i),e}},{test:[/silk/i],describe:function(t){var e={name:"Amazon Silk"},i=r.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/phantom/i],describe:function(t){var e={name:"PhantomJS"},i=r.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/slimerjs/i],describe:function(t){var e={name:"SlimerJS"},i=r.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e={name:"BlackBerry"},i=r.default.getFirstMatch(s,t)||r.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e={name:"WebOS Browser"},i=r.default.getFirstMatch(s,t)||r.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/bada/i],describe:function(t){var e={name:"Bada"},i=r.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/tizen/i],describe:function(t){var e={name:"Tizen"},i=r.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||r.default.getFirstMatch(s,t);return i&&(e.version=i),e}},{test:[/qupzilla/i],describe:function(t){var e={name:"QupZilla"},i=r.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||r.default.getFirstMatch(s,t);return i&&(e.version=i),e}},{test:[/firefox|iceweasel|fxios/i],describe:function(t){var e={name:"Firefox"},i=r.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/electron/i],describe:function(t){var e={name:"Electron"},i=r.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/MiuiBrowser/i],describe:function(t){var e={name:"Miui"},i=r.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/chromium/i],describe:function(t){var e={name:"Chromium"},i=r.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||r.default.getFirstMatch(s,t);return i&&(e.version=i),e}},{test:[/chrome|crios|crmo/i],describe:function(t){var e={name:"Chrome"},i=r.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/GSA/i],describe:function(t){var e={name:"Google Search"},i=r.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:function(t){var e=!t.test(/like android/i),i=t.test(/android/i);return e&&i},describe:function(t){var e={name:"Android Browser"},i=r.default.getFirstMatch(s,t);return i&&(e.version=i),e}},{test:[/playstation 4/i],describe:function(t){var e={name:"PlayStation 4"},i=r.default.getFirstMatch(s,t);return i&&(e.version=i),e}},{test:[/safari|applewebkit/i],describe:function(t){var e={name:"Safari"},i=r.default.getFirstMatch(s,t);return i&&(e.version=i),e}},{test:[/.*/i],describe:function(t){var e=-1!==t.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:r.default.getFirstMatch(e,t),version:r.default.getSecondMatch(e,t)}}}];e.default=o,t.exports=e.default},93:function(t,e,i){"use strict";e.__esModule=!0,e.default=void 0;var n,r=(n=i(17))&&n.__esModule?n:{default:n},s=i(18),o=[{test:[/Roku\/DVP/],describe:function(t){var e=r.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:s.OS_MAP.Roku,version:e}}},{test:[/windows phone/i],describe:function(t){var e=r.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:s.OS_MAP.WindowsPhone,version:e}}},{test:[/windows /i],describe:function(t){var e=r.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),i=r.default.getWindowsVersionName(e);return{name:s.OS_MAP.Windows,version:e,versionName:i}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(t){var e={name:s.OS_MAP.iOS},i=r.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return i&&(e.version=i),e}},{test:[/macintosh/i],describe:function(t){var e=r.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),i=r.default.getMacOSVersionName(e),n={name:s.OS_MAP.MacOS,version:e};return i&&(n.versionName=i),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(t){var e=r.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:s.OS_MAP.iOS,version:e}}},{test:function(t){var e=!t.test(/like android/i),i=t.test(/android/i);return e&&i},describe:function(t){var e=r.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),i=r.default.getAndroidVersionName(e),n={name:s.OS_MAP.Android,version:e};return i&&(n.versionName=i),n}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e=r.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),i={name:s.OS_MAP.WebOS};return e&&e.length&&(i.version=e),i}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e=r.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||r.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||r.default.getFirstMatch(/\bbb(\d+)/i,t);return{name:s.OS_MAP.BlackBerry,version:e}}},{test:[/bada/i],describe:function(t){var e=r.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:s.OS_MAP.Bada,version:e}}},{test:[/tizen/i],describe:function(t){var e=r.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:s.OS_MAP.Tizen,version:e}}},{test:[/linux/i],describe:function(){return{name:s.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:s.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(t){var e=r.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:s.OS_MAP.PlayStation4,version:e}}}];e.default=o,t.exports=e.default},94:function(t,e,i){"use strict";e.__esModule=!0,e.default=void 0;var n,r=(n=i(17))&&n.__esModule?n:{default:n},s=i(18);e.default=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(t){var e=r.default.getFirstMatch(/(can-l01)/i,t)&&"Nova",i={type:s.PLATFORMS_MAP.mobile,vendor:"Huawei"};return e&&(i.model=e),i}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(t){var e=t.test(/ipod|iphone/i),i=t.test(/like (ipod|iphone)/i);return e&&!i},describe:function(t){var e=r.default.getFirstMatch(/(ipod|iphone)/i,t);return{type:s.PLATFORMS_MAP.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(t){return"blackberry"===t.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(t){return"bada"===t.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(t){return"windows phone"===t.getBrowserName()},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(t){var e=Number(String(t.getOSVersion()).split(".")[0]);return"android"===t.getOSName(!0)&&e>=3},describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(t){return"android"===t.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(t){return"macos"===t.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(t){return"windows"===t.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(t){return"linux"===t.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(t){return"playstation 4"===t.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}},{test:function(t){return"roku"===t.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}}],t.exports=e.default},95:function(t,e,i){"use strict";e.__esModule=!0,e.default=void 0;var n,r=(n=i(17))&&n.__esModule?n:{default:n},s=i(18),o=[{test:function(t){return"microsoft edge"===t.getBrowserName(!0)},describe:function(t){if(/\sedg\//i.test(t))return{name:s.ENGINE_MAP.Blink};var e=r.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:s.ENGINE_MAP.EdgeHTML,version:e}}},{test:[/trident/i],describe:function(t){var e={name:s.ENGINE_MAP.Trident},i=r.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:function(t){return t.test(/presto/i)},describe:function(t){var e={name:s.ENGINE_MAP.Presto},i=r.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:function(t){var e=t.test(/gecko/i),i=t.test(/like gecko/i);return e&&!i},describe:function(t){var e={name:s.ENGINE_MAP.Gecko},i=r.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:s.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(t){var e={name:s.ENGINE_MAP.WebKit},i=r.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return i&&(e.version=i),e}}];e.default=o,t.exports=e.default}})},NJ4a:function(t,e,i){"use strict";function n(t){setTimeout(()=>{throw t},0)}i.d(e,"a",function(){return n})},PRU4:function(t,e,i){"use strict";i.d(e,"a",function(){return g}),i.d(e,"b",function(){return u});const n=Symbol("Comlink.proxy"),r=Symbol("Comlink.endpoint"),s=Symbol("Comlink.releaseProxy"),o=Symbol("Comlink.thrown"),a=t=>"object"==typeof t&&null!==t||"function"==typeof t,l=new Map([["proxy",{canHandle:t=>a(t)&&t[n],serialize(t){const{port1:e,port2:i}=new MessageChannel;return c(t,e),[i,[i]]},deserialize:t=>(t.start(),u(t))}],["throw",{canHandle:t=>a(t)&&o in t,serialize({value:t}){let e;return e=t instanceof Error?{isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:{isError:!1,value:t},[e,[]]},deserialize(t){if(t.isError)throw Object.assign(new Error(t.value.message),t.value);throw t.value}}]]);function c(t,e=self){e.addEventListener("message",function i(n){if(!n||!n.data)return;const{id:r,type:s,path:a}=Object.assign({path:[]},n.data),l=(n.data.argumentList||[]).map(b);let u;try{const e=a.slice(0,-1).reduce((t,e)=>t[e],t),i=a.reduce((t,e)=>t[e],t);switch(s){case 0:u=i;break;case 1:e[a.slice(-1)[0]]=b(n.data.value),u=!0;break;case 2:u=i.apply(e,l);break;case 3:u=g(new i(...l));break;case 4:{const{port1:e,port2:i}=new MessageChannel;c(t,i),u=function(t,e){return m.set(t,e),t}(e,[e])}break;case 5:u=void 0}}catch(d){u={value:d,[o]:0}}Promise.resolve(u).catch(t=>({value:t,[o]:0})).then(t=>{const[n,o]=A(t);e.postMessage(Object.assign(Object.assign({},n),{id:r}),o),5===s&&(e.removeEventListener("message",i),h(e))})}),e.start&&e.start()}function h(t){(function(t){return"MessagePort"===t.constructor.name})(t)&&t.close()}function u(t,e){return p(t,[],e)}function d(t){if(t)throw new Error("Proxy has been released and is not useable")}function p(t,e=[],i=function(){}){let n=!1;const o=new Proxy(i,{get(i,r){if(d(n),r===s)return()=>v(t,{type:5,path:e.map(t=>t.toString())}).then(()=>{h(t),n=!0});if("then"===r){if(0===e.length)return{then:()=>o};const i=v(t,{type:0,path:e.map(t=>t.toString())}).then(b);return i.then.bind(i)}return p(t,[...e,r])},set(i,r,s){d(n);const[o,a]=A(s);return v(t,{type:1,path:[...e,r].map(t=>t.toString()),value:o},a).then(b)},apply(i,s,o){d(n);const a=e[e.length-1];if(a===r)return v(t,{type:4}).then(b);if("bind"===a)return p(t,e.slice(0,-1));const[l,c]=f(o);return v(t,{type:2,path:e.map(t=>t.toString()),argumentList:l},c).then(b)},construct(i,r){d(n);const[s,o]=f(r);return v(t,{type:3,path:e.map(t=>t.toString()),argumentList:s},o).then(b)}});return o}function f(t){const e=t.map(A);return[e.map(t=>t[0]),(i=e.map(t=>t[1]),Array.prototype.concat.apply([],i))];var i}const m=new WeakMap;function g(t){return Object.assign(t,{[n]:!0})}function A(t){for(const[e,i]of l)if(i.canHandle(t)){const[n,r]=i.serialize(t);return[{type:3,name:e,value:n},r]}return[{type:0,value:t},m.get(t)||[]]}function b(t){switch(t.type){case 3:return l.get(t.name).deserialize(t.value);case 0:return t.value}}function v(t,e,i){return new Promise(n=>{const r=new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-");t.addEventListener("message",function e(i){i.data&&i.data.id&&i.data.id===r&&(t.removeEventListener("message",e),n(i.data))}),t.start&&t.start(),t.postMessage(Object.assign({id:r},e),i)})}},SeVD:function(t,e,i){"use strict";i.d(e,"a",function(){return h});var n=i("ngJS"),r=i("NJ4a"),s=i("Lhse"),o=i("kJWO"),a=i("I55L"),l=i("c2HN"),c=i("XoHu");const h=t=>{if(t&&"function"==typeof t[o.a])return h=t,t=>{const e=h[o.a]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if(Object(a.a)(t))return Object(n.a)(t);if(Object(l.a)(t))return i=t,t=>(i.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,r.a),t);if(t&&"function"==typeof t[s.a])return e=t,t=>{const i=e[s.a]();for(;;){let e;try{e=i.next()}catch(n){return t.error(n),t}if(e.done){t.complete();break}if(t.next(e.value),t.closed)break}return"function"==typeof i.return&&t.add(()=>{i.return&&i.return()}),t};{const e=Object(c.a)(t)?"an invalid object":`'${t}'`;throw new TypeError(`You provided ${e} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`)}var e,i,h}},SpAZ:function(t,e,i){"use strict";function n(t){return t}i.d(e,"a",function(){return n})},VRyK:function(t,e,i){"use strict";i.d(e,"a",function(){return a});var n=i("HDdC"),r=i("z+Ro"),s=i("bHdf"),o=i("yCtX");function a(...t){let e=Number.POSITIVE_INFINITY,i=null,a=t[t.length-1];return Object(r.a)(a)?(i=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(e=t.pop())):"number"==typeof a&&(e=t.pop()),null===i&&1===t.length&&t[0]instanceof n.a?t[0]:Object(s.a)(e)(Object(o.a)(t,i))}},XNiG:function(t,e,i){"use strict";i.d(e,"b",function(){return c}),i.d(e,"a",function(){return h});var n=i("HDdC"),r=i("7o/Q"),s=i("quSY"),o=i("9ppp"),a=i("Ylt2"),l=i("2QA8");class c extends r.a{constructor(t){super(t),this.destination=t}}let h=(()=>{class t extends n.a{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[l.a](){return new c(this)}lift(t){const e=new u(this,this);return e.operator=t,e}next(t){if(this.closed)throw new o.a;if(!this.isStopped){const{observers:e}=this,i=e.length,n=e.slice();for(let r=0;r<i;r++)n[r].next(t)}}error(t){if(this.closed)throw new o.a;this.hasError=!0,this.thrownError=t,this.isStopped=!0;const{observers:e}=this,i=e.length,n=e.slice();for(let r=0;r<i;r++)n[r].error(t);this.observers.length=0}complete(){if(this.closed)throw new o.a;this.isStopped=!0;const{observers:t}=this,e=t.length,i=t.slice();for(let n=0;n<e;n++)i[n].complete();this.observers.length=0}unsubscribe(){this.isStopped=!0,this.closed=!0,this.observers=null}_trySubscribe(t){if(this.closed)throw new o.a;return super._trySubscribe(t)}_subscribe(t){if(this.closed)throw new o.a;return this.hasError?(t.error(this.thrownError),s.a.EMPTY):this.isStopped?(t.complete(),s.a.EMPTY):(this.observers.push(t),new a.a(this,t))}asObservable(){const t=new n.a;return t.source=this,t}}return t.create=(t,e)=>new u(t,e),t})();class u extends h{constructor(t,e){super(),this.destination=t,this.source=e}next(t){const{destination:e}=this;e&&e.next&&e.next(t)}error(t){const{destination:e}=this;e&&e.error&&this.destination.error(t)}complete(){const{destination:t}=this;t&&t.complete&&this.destination.complete()}_subscribe(t){const{source:e}=this;return e?this.source.subscribe(t):s.a.EMPTY}}},XoHu:function(t,e,i){"use strict";function n(t){return null!==t&&"object"==typeof t}i.d(e,"a",function(){return n})},Ylt2:function(t,e,i){"use strict";i.d(e,"a",function(){return r});var n=i("quSY");class r extends n.a{constructor(t,e){super(),this.subject=t,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const t=this.subject,e=t.observers;if(this.subject=null,!e||0===e.length||t.isStopped||t.closed)return;const i=e.indexOf(this.subscriber);-1!==i&&e.splice(i,1)}}},bHdf:function(t,e,i){"use strict";i.d(e,"a",function(){return s});var n=i("5+tZ"),r=i("SpAZ");function s(t=Number.POSITIVE_INFINITY){return Object(n.a)(r.a,t)}},c2HN:function(t,e,i){"use strict";function n(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}i.d(e,"a",function(){return n})},fXoL:function(t,e,i){"use strict";i.d(e,"a",function(){return si}),i.d(e,"b",function(){return Kc}),i.d(e,"c",function(){return Bc}),i.d(e,"d",function(){return Lc}),i.d(e,"e",function(){return Uc}),i.d(e,"f",function(){return Bh}),i.d(e,"g",function(){return Eh}),i.d(e,"h",function(){return Dl}),i.d(e,"i",function(){return eh}),i.d(e,"j",function(){return Xa}),i.d(e,"k",function(){return Wc}),i.d(e,"l",function(){return il}),i.d(e,"m",function(){return Vh}),i.d(e,"n",function(){return Vn}),i.d(e,"o",function(){return gc}),i.d(e,"p",function(){return Ss}),i.d(e,"q",function(){return Ti}),i.d(e,"r",function(){return I}),i.d(e,"s",function(){return ri}),i.d(e,"t",function(){return js}),i.d(e,"u",function(){return yl}),i.d(e,"v",function(){return xl}),i.d(e,"w",function(){return Gc}),i.d(e,"x",function(){return Bl}),i.d(e,"y",function(){return Ih}),i.d(e,"z",function(){return Ul}),i.d(e,"A",function(){return wh}),i.d(e,"B",function(){return rh}),i.d(e,"C",function(){return Ri}),i.d(e,"D",function(){return Hc}),i.d(e,"E",function(){return zc}),i.d(e,"F",function(){return bc}),i.d(e,"G",function(){return Po}),i.d(e,"H",function(){return sl}),i.d(e,"I",function(){return rl}),i.d(e,"J",function(){return zn}),i.d(e,"K",function(){return al}),i.d(e,"L",function(){return En}),i.d(e,"M",function(){return Fi}),i.d(e,"N",function(){return Mh}),i.d(e,"O",function(){return Rl}),i.d(e,"P",function(){return uh}),i.d(e,"Q",function(){return oi}),i.d(e,"R",function(){return ll}),i.d(e,"S",function(){return jl}),i.d(e,"T",function(){return V}),i.d(e,"U",function(){return xh}),i.d(e,"V",function(){return _h}),i.d(e,"W",function(){return p}),i.d(e,"X",function(){return Pi}),i.d(e,"Y",function(){return vh}),i.d(e,"Z",function(){return Lh}),i.d(e,"ab",function(){return fh}),i.d(e,"bb",function(){return $c}),i.d(e,"cb",function(){return Es}),i.d(e,"db",function(){return Ba}),i.d(e,"eb",function(){return Sn}),i.d(e,"fb",function(){return ln}),i.d(e,"gb",function(){return Yi}),i.d(e,"hb",function(){return Xi}),i.d(e,"ib",function(){return nn}),i.d(e,"jb",function(){return tn}),i.d(e,"kb",function(){return Ji}),i.d(e,"lb",function(){return en}),i.d(e,"mb",function(){return Va}),i.d(e,"nb",function(){return Fh}),i.d(e,"ob",function(){return Fa}),i.d(e,"pb",function(){return La}),i.d(e,"qb",function(){return Qi}),i.d(e,"rb",function(){return N}),i.d(e,"sb",function(){return Qs}),i.d(e,"tb",function(){return Ko}),i.d(e,"ub",function(){return zo}),i.d(e,"vb",function(){return Ho}),i.d(e,"wb",function(){return Ra}),i.d(e,"xb",function(){return xt}),i.d(e,"yb",function(){return h}),i.d(e,"zb",function(){return qi}),i.d(e,"Ab",function(){return Hs}),i.d(e,"Bb",function(){return At}),i.d(e,"Cb",function(){return qa}),i.d(e,"Db",function(){return Dr}),i.d(e,"Eb",function(){return no}),i.d(e,"Fb",function(){return ua}),i.d(e,"Gb",function(){return Da}),i.d(e,"Hb",function(){return ha}),i.d(e,"Ib",function(){return Pc}),i.d(e,"Jb",function(){return X}),i.d(e,"Kb",function(){return st}),i.d(e,"Lb",function(){return _}),i.d(e,"Mb",function(){return y}),i.d(e,"Nb",function(){return it}),i.d(e,"Ob",function(){return ot}),i.d(e,"Pb",function(){return Mo}),i.d(e,"Qb",function(){return Lo}),i.d(e,"Rb",function(){return No}),i.d(e,"Sb",function(){return Bo}),i.d(e,"Tb",function(){return Uo}),i.d(e,"Ub",function(){return Fo}),i.d(e,"Vb",function(){return Vo}),i.d(e,"Wb",function(){return jo}),i.d(e,"Xb",function(){return Je}),i.d(e,"Yb",function(){return Ia}),i.d(e,"Zb",function(){return Ii}),i.d(e,"ac",function(){return ei}),i.d(e,"bc",function(){return Fc}),i.d(e,"cc",function(){return $o}),i.d(e,"dc",function(){return Oc}),i.d(e,"ec",function(){return be}),i.d(e,"fc",function(){return Ae}),i.d(e,"gc",function(){return Yo}),i.d(e,"hc",function(){return hc}),i.d(e,"ic",function(){return uc}),i.d(e,"jc",function(){return dc}),i.d(e,"kc",function(){return pc}),i.d(e,"lc",function(){return Jo}),i.d(e,"mc",function(){return Xo}),i.d(e,"nc",function(){return To}),i.d(e,"oc",function(){return ta}),i.d(e,"pc",function(){return ea}),i.d(e,"qc",function(){return ia}),i.d(e,"rc",function(){return ic}),i.d(e,"sc",function(){return nc}),i.d(e,"tc",function(){return rc}),i.d(e,"uc",function(){return sc}),i.d(e,"vc",function(){return Dc}),i.d(e,"wc",function(){return ao}),i.d(e,"xc",function(){return Nn}),i.d(e,"yc",function(){return Bn}),i.d(e,"zc",function(){return Un}),i.d(e,"Ac",function(){return Ht}),i.d(e,"Bc",function(){return Dn}),i.d(e,"Cc",function(){return Pn}),i.d(e,"Dc",function(){return In}),i.d(e,"Ec",function(){return nt}),i.d(e,"Fc",function(){return ca}),i.d(e,"Gc",function(){return Go}),i.d(e,"Hc",function(){return Pa}),i.d(e,"Ic",function(){return oo}),i.d(e,"Jc",function(){return Vc}),i.d(e,"Kc",function(){return xa}),i.d(e,"Lc",function(){return Ca}),i.d(e,"Mc",function(){return Sa}),i.d(e,"Nc",function(){return ka}),i.d(e,"Oc",function(){return Ea}),i.d(e,"Pc",function(){return Ic});var n=i("XNiG"),r=i("quSY"),s=i("HDdC"),o=i("VRyK"),a=i("w1tV");function l(t){for(let e in t)if(t[e]===l)return e;throw Error("Could not find renamed property on target object.")}function c(t,e){for(const i in e)e.hasOwnProperty(i)&&!t.hasOwnProperty(i)&&(t[i]=e[i])}function h(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(h).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;const e=t.toString();if(null==e)return""+e;const i=e.indexOf("\n");return-1===i?e:e.substring(0,i)}function u(t,e){return null==t||""===t?null===e?"":e:null==e||""===e?t:t+" "+e}const d=l({__forward_ref__:l});function p(t){return t.__forward_ref__=p,t.toString=function(){return h(this())},t}function f(t){return m(t)?t():t}function m(t){return"function"==typeof t&&t.hasOwnProperty(d)&&t.__forward_ref__===p}class g extends Error{constructor(t,e){super(function(t,e){return`${t?`NG0${t}: `:""}${e}`}(t,e)),this.code=t}}function A(t){return"string"==typeof t?t:null==t?"":String(t)}function b(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():A(t)}function v(t,e){const i=e?` in ${e}`:"";throw new g("201",`No provider for ${b(t)} found${i}`)}function _(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function y(t){return{providers:t.providers||[],imports:t.imports||[]}}function w(t){return x(t,S)||x(t,E)}function x(t,e){return t.hasOwnProperty(e)?t[e]:null}function C(t){return t&&(t.hasOwnProperty(k)||t.hasOwnProperty(D))?t[k]:null}const S=l({"\u0275prov":l}),k=l({"\u0275inj":l}),E=l({ngInjectableDef:l}),D=l({ngInjectorDef:l});var I=function(t){return t[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional",t}({});let P;function O(t){const e=P;return P=t,e}function M(t,e,i){const n=w(t);return n&&"root"==n.providedIn?void 0===n.value?n.value=n.factory():n.value:i&I.Optional?null:void 0!==e?e:void v(h(t),"Injector")}function T(t){return{toString:t}.toString()}var R=function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t}({}),V=function(t){return t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t}({});const F="undefined"!=typeof globalThis&&globalThis,L="undefined"!=typeof window&&window,U="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,B="undefined"!=typeof global&&global,N=F||B||L||U,j={},z=[],H=[],K=l({"\u0275cmp":l}),$=l({"\u0275dir":l}),G=l({"\u0275pipe":l}),W=l({"\u0275mod":l}),Z=l({"\u0275loc":l}),q=l({"\u0275fac":l}),Y=l({__NG_ELEMENT_ID__:l});let Q=0;function X(t){return T(()=>{const e={},i={type:t.type,providersResolver:null,decls:t.decls,vars:t.vars,factory:null,template:t.template||null,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,inputs:null,outputs:null,exportAs:t.exportAs||null,onPush:t.changeDetection===R.OnPush,directiveDefs:null,pipeDefs:null,selectors:t.selectors||H,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||V.Emulated,id:"c",styles:t.styles||H,_:null,setInput:null,schemas:t.schemas||null,tView:null},n=t.directives,r=t.features,s=t.pipes;return i.id+=Q++,i.inputs=rt(t.inputs,e),i.outputs=rt(t.outputs),r&&r.forEach(t=>t(i)),i.directiveDefs=n?()=>("function"==typeof n?n():n).map(J):null,i.pipeDefs=s?()=>("function"==typeof s?s():s).map(tt):null,i})}function J(t){return at(t)||function(t){return t[$]||null}(t)}function tt(t){return function(t){return t[G]||null}(t)}const et={};function it(t){const e={type:t.type,bootstrap:t.bootstrap||H,declarations:t.declarations||H,imports:t.imports||H,exports:t.exports||H,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null};return null!=t.id&&T(()=>{et[t.id]=t.type}),e}function nt(t,e){return T(()=>{const i=lt(t,!0);i.declarations=e.declarations||H,i.imports=e.imports||H,i.exports=e.exports||H})}function rt(t,e){if(null==t)return j;const i={};for(const n in t)if(t.hasOwnProperty(n)){let r=t[n],s=r;Array.isArray(r)&&(s=r[1],r=r[0]),i[r]=n,e&&(e[r]=s)}return i}const st=X;function ot(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,onDestroy:t.type.prototype.ngOnDestroy||null}}function at(t){return t[K]||null}function lt(t,e){const i=t[W]||null;if(!i&&!0===e)throw new Error(`Type ${h(t)} does not have '\u0275mod' property.`);return i}function ct(t){return Array.isArray(t)&&"object"==typeof t[1]}function ht(t){return Array.isArray(t)&&!0===t[1]}function ut(t){return 0!=(8&t.flags)}function dt(t){return 2==(2&t.flags)}function pt(t){return 1==(1&t.flags)}function ft(t){return null!==t.template}function mt(t,e){return t.hasOwnProperty(q)?t[q]:null}class gt{constructor(t,e,i){this.previousValue=t,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}}function At(){return bt}function bt(t){return t.type.prototype.ngOnChanges&&(t.setInput=_t),vt}function vt(){const t=yt(this),e=null==t?void 0:t.current;if(e){const i=t.previous;if(i===j)t.previous=e;else for(let t in e)i[t]=e[t];t.current=null,this.ngOnChanges(e)}}function _t(t,e,i,n){const r=yt(t)||function(t,e){return t.__ngSimpleChanges__=e}(t,{previous:j,current:null}),s=r.current||(r.current={}),o=r.previous,a=this.declaredInputs[i],l=o[a];s[a]=new gt(l&&l.currentValue,e,o===j),t[n]=e}function yt(t){return t.__ngSimpleChanges__||null}let wt;function xt(t){wt=t}function Ct(){return void 0!==wt?wt:"undefined"!=typeof document?document:void 0}function St(t){return!!t.listen}At.ngInherit=!0;const kt={createRenderer:(t,e)=>Ct()};function Et(t){for(;Array.isArray(t);)t=t[0];return t}function Dt(t,e){return Et(e[t])}function It(t,e){return Et(e[t.index])}function Pt(t,e){return t.data[e]}function Ot(t,e){return t[e]}function Mt(t,e){const i=e[t];return ct(i)?i:i[0]}function Tt(t){const e=function(t){return t.__ngContext__||null}(t);return e?Array.isArray(e)?e:e.lView:null}function Rt(t){return 4==(4&t[2])}function Vt(t){return 128==(128&t[2])}function Ft(t,e){return null==e?null:t[e]}function Lt(t){t[18]=0}function Ut(t,e){t[5]+=e;let i=t,n=t[3];for(;null!==n&&(1===e&&1===i[5]||-1===e&&0===i[5]);)n[5]+=e,i=n,n=n[3]}const Bt={lFrame:he(null),bindingsEnabled:!0,isInCheckNoChangesMode:!1};function Nt(){return Bt.bindingsEnabled}function jt(){return Bt.lFrame.lView}function zt(){return Bt.lFrame.tView}function Ht(t){Bt.lFrame.contextLView=t}function Kt(){let t=$t();for(;null!==t&&64===t.type;)t=t.parent;return t}function $t(){return Bt.lFrame.currentTNode}function Gt(t,e){const i=Bt.lFrame;i.currentTNode=t,i.isParent=e}function Wt(){return Bt.lFrame.isParent}function Zt(){Bt.lFrame.isParent=!1}function qt(){return Bt.isInCheckNoChangesMode}function Yt(t){Bt.isInCheckNoChangesMode=t}function Qt(){const t=Bt.lFrame;let e=t.bindingRootIndex;return-1===e&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function Xt(){return Bt.lFrame.bindingIndex}function Jt(){return Bt.lFrame.bindingIndex++}function te(t){const e=Bt.lFrame,i=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,i}function ee(t,e){const i=Bt.lFrame;i.bindingIndex=i.bindingRootIndex=t,ie(e)}function ie(t){Bt.lFrame.currentDirectiveIndex=t}function ne(t){const e=Bt.lFrame.currentDirectiveIndex;return-1===e?null:t[e]}function re(){return Bt.lFrame.currentQueryIndex}function se(t){Bt.lFrame.currentQueryIndex=t}function oe(t){const e=t[1];return 2===e.type?e.declTNode:1===e.type?t[6]:null}function ae(t,e,i){if(i&I.SkipSelf){let n=e,r=t;for(;n=n.parent,!(null!==n||i&I.Host||(n=oe(r),null===n)||(r=r[15],10&n.type)););if(null===n)return!1;e=n,t=r}const n=Bt.lFrame=ce();return n.currentTNode=e,n.lView=t,!0}function le(t){const e=ce(),i=t[1];Bt.lFrame=e,e.currentTNode=i.firstChild,e.lView=t,e.tView=i,e.contextLView=t,e.bindingIndex=i.bindingStartIndex,e.inI18n=!1}function ce(){const t=Bt.lFrame,e=null===t?null:t.child;return null===e?he(t):e}function he(t){const e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return null!==t&&(t.child=e),e}function ue(){const t=Bt.lFrame;return Bt.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const de=ue;function pe(){const t=ue();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function fe(){return Bt.lFrame.selectedIndex}function me(t){Bt.lFrame.selectedIndex=t}function ge(){const t=Bt.lFrame;return Pt(t.tView,t.selectedIndex)}function Ae(){Bt.lFrame.currentNamespace="http://www.w3.org/2000/svg"}function be(){Bt.lFrame.currentNamespace=null}function ve(t,e){for(let i=e.directiveStart,n=e.directiveEnd;i<n;i++){const e=t.data[i].type.prototype,{ngAfterContentInit:n,ngAfterContentChecked:r,ngAfterViewInit:s,ngAfterViewChecked:o,ngOnDestroy:a}=e;n&&(t.contentHooks||(t.contentHooks=[])).push(-i,n),r&&((t.contentHooks||(t.contentHooks=[])).push(i,r),(t.contentCheckHooks||(t.contentCheckHooks=[])).push(i,r)),s&&(t.viewHooks||(t.viewHooks=[])).push(-i,s),o&&((t.viewHooks||(t.viewHooks=[])).push(i,o),(t.viewCheckHooks||(t.viewCheckHooks=[])).push(i,o)),null!=a&&(t.destroyHooks||(t.destroyHooks=[])).push(i,a)}}function _e(t,e,i){xe(t,e,3,i)}function ye(t,e,i,n){(3&t[2])===i&&xe(t,e,i,n)}function we(t,e){let i=t[2];(3&i)===e&&(i&=2047,i+=1,t[2]=i)}function xe(t,e,i,n){const r=null!=n?n:-1,s=e.length-1;let o=0;for(let a=void 0!==n?65535&t[18]:0;a<s;a++)if("number"==typeof e[a+1]){if(o=e[a],null!=n&&o>=n)break}else e[a]<0&&(t[18]+=65536),(o<r||-1==r)&&(Ce(t,i,e,a),t[18]=(4294901760&t[18])+a+2),a++}function Ce(t,e,i,n){const r=i[n]<0,s=i[n+1],o=t[r?-i[n]:i[n]];r?t[2]>>11<t[18]>>16&&(3&t[2])===e&&(t[2]+=2048,s.call(o)):s.call(o)}class Se{constructor(t,e,i){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=i}}function ke(t,e,i){const n=St(t);let r=0;for(;r<i.length;){const s=i[r];if("number"==typeof s){if(0!==s)break;r++;const o=i[r++],a=i[r++],l=i[r++];n?t.setAttribute(e,a,l,o):e.setAttributeNS(o,a,l)}else{const o=s,a=i[++r];De(o)?n&&t.setProperty(e,o,a):n?t.setAttribute(e,o,a):e.setAttribute(o,a),r++}}return r}function Ee(t){return 3===t||4===t||6===t}function De(t){return 64===t.charCodeAt(0)}function Ie(t,e){if(null===e||0===e.length);else if(null===t||0===t.length)t=e.slice();else{let i=-1;for(let n=0;n<e.length;n++){const r=e[n];"number"==typeof r?i=r:0===i||Pe(t,i,r,null,-1===i||2===i?e[++n]:null)}}return t}function Pe(t,e,i,n,r){let s=0,o=t.length;if(-1===e)o=-1;else for(;s<t.length;){const i=t[s++];if("number"==typeof i){if(i===e){o=-1;break}if(i>e){o=s-1;break}}}for(;s<t.length;){const e=t[s];if("number"==typeof e)break;if(e===i){if(null===n)return void(null!==r&&(t[s+1]=r));if(n===t[s+1])return void(t[s+2]=r)}s++,null!==n&&s++,null!==r&&s++}-1!==o&&(t.splice(o,0,e),s=o+1),t.splice(s++,0,i),null!==n&&t.splice(s++,0,n),null!==r&&t.splice(s++,0,r)}function Oe(t){return-1!==t}function Me(t){return 32767&t}function Te(t,e){let i=t>>16,n=e;for(;i>0;)n=n[15],i--;return n}let Re=!0;function Ve(t){const e=Re;return Re=t,e}let Fe=0;function Le(t,e){const i=Be(t,e);if(-1!==i)return i;const n=e[1];n.firstCreatePass&&(t.injectorIndex=e.length,Ue(n.data,t),Ue(e,null),Ue(n.blueprint,null));const r=Ne(t,e),s=t.injectorIndex;if(Oe(r)){const t=Me(r),i=Te(r,e),n=i[1].data;for(let r=0;r<8;r++)e[s+r]=i[t+r]|n[t+r]}return e[s+8]=r,s}function Ue(t,e){t.push(0,0,0,0,0,0,0,0,e)}function Be(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===e[t.injectorIndex+8]?-1:t.injectorIndex}function Ne(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let i=0,n=null,r=e;for(;null!==r;){const t=r[1],e=t.type;if(n=2===e?t.declTNode:1===e?r[6]:null,null===n)return-1;if(i++,r=r[15],-1!==n.injectorIndex)return n.injectorIndex|i<<16}return-1}function je(t,e,i){!function(t,e,i){let n;"string"==typeof i?n=i.charCodeAt(0)||0:i.hasOwnProperty(Y)&&(n=i[Y]),null==n&&(n=i[Y]=Fe++);const r=255&n;e.data[t+(r>>5)]|=1<<r}(t,e,i)}function ze(t,e,i){if(i&I.Optional)return t;v(e,"NodeInjector")}function He(t,e,i,n){if(i&I.Optional&&void 0===n&&(n=null),0==(i&(I.Self|I.Host))){const r=t[9],s=O(void 0);try{return r?r.get(e,n,i&I.Optional):M(e,n,i&I.Optional)}finally{O(s)}}return ze(n,e,i)}function Ke(t,e,i,n=I.Default,r){if(null!==t){const s=function(t){if("string"==typeof t)return t.charCodeAt(0)||0;const e=t.hasOwnProperty(Y)?t[Y]:void 0;return"number"==typeof e?e>=0?255&e:Ge:e}(i);if("function"==typeof s){if(!ae(e,t,n))return n&I.Host?ze(r,i,n):He(e,i,n,r);try{const t=s();if(null!=t||n&I.Optional)return t;v(i)}finally{de()}}else if("number"==typeof s){let r=null,o=Be(t,e),a=-1,l=n&I.Host?e[16][6]:null;for((-1===o||n&I.SkipSelf)&&(a=-1===o?Ne(t,e):e[o+8],-1!==a&&Qe(n,!1)?(r=e[1],o=Me(a),e=Te(a,e)):o=-1);-1!==o;){const t=e[1];if(Ye(s,o,t.data)){const t=We(o,e,i,r,n,l);if(t!==$e)return t}a=e[o+8],-1!==a&&Qe(n,e[1].data[o+8]===l)&&Ye(s,o,e)?(r=t,o=Me(a),e=Te(a,e)):o=-1}}}return He(e,i,n,r)}const $e={};function Ge(){return new Xe(Kt(),jt())}function We(t,e,i,n,r,s){const o=e[1],a=o.data[t+8],l=Ze(a,o,i,null==n?dt(a)&&Re:n!=o&&0!=(3&a.type),r&I.Host&&s===a);return null!==l?qe(e,o,l,a):$e}function Ze(t,e,i,n,r){const s=t.providerIndexes,o=e.data,a=1048575&s,l=t.directiveStart,c=s>>20,h=r?a+c:t.directiveEnd;for(let u=n?a:a+c;u<h;u++){const t=o[u];if(u<l&&i===t||u>=l&&t.type===i)return u}if(r){const t=o[l];if(t&&ft(t)&&t.type===i)return l}return null}function qe(t,e,i,n){let r=t[i];const s=e.data;if(r instanceof Se){const o=r;o.resolving&&function(t,e){throw new g("200",`Circular dependency in DI detected for ${t}`)}(b(s[i]));const a=Ve(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?O(o.injectImpl):null;ae(t,n,I.Default);try{r=t[i]=o.factory(void 0,s,t,n),e.firstCreatePass&&i>=n.directiveStart&&function(t,e,i){const{ngOnChanges:n,ngOnInit:r,ngDoCheck:s}=e.type.prototype;if(n){const n=bt(e);(i.preOrderHooks||(i.preOrderHooks=[])).push(t,n),(i.preOrderCheckHooks||(i.preOrderCheckHooks=[])).push(t,n)}r&&(i.preOrderHooks||(i.preOrderHooks=[])).push(0-t,r),s&&((i.preOrderHooks||(i.preOrderHooks=[])).push(t,s),(i.preOrderCheckHooks||(i.preOrderCheckHooks=[])).push(t,s))}(i,s[i],e)}finally{null!==l&&O(l),Ve(a),o.resolving=!1,de()}}return r}function Ye(t,e,i){return!!(i[e+(t>>5)]&1<<t)}function Qe(t,e){return!(t&I.Self||t&I.Host&&e)}class Xe{constructor(t,e){this._tNode=t,this._lView=e}get(t,e){return Ke(this._tNode,this._lView,t,void 0,e)}}function Je(t){return T(()=>{const e=t.prototype.constructor,i=e[q]||ti(e),n=Object.prototype;let r=Object.getPrototypeOf(t.prototype).constructor;for(;r&&r!==n;){const t=r[q]||ti(r);if(t&&t!==i)return t;r=Object.getPrototypeOf(r)}return t=>new t})}function ti(t){return m(t)?()=>{const e=ti(f(t));return e&&e()}:mt(t)}function ei(t){return function(t,e){if("class"===e)return t.classes;if("style"===e)return t.styles;const i=t.attrs;if(i){const t=i.length;let n=0;for(;n<t;){const r=i[n];if(Ee(r))break;if(0===r)n+=2;else if("number"==typeof r)for(n++;n<t&&"string"==typeof i[n];)n++;else{if(r===e)return i[n+1];n+=2}}}return null}(Kt(),t)}const ii="__parameters__";function ni(t,e,i){return T(()=>{const n=function(t){return function(...e){if(t){const i=t(...e);for(const t in i)this[t]=i[t]}}}(e);function r(...t){if(this instanceof r)return n.apply(this,t),this;const e=new r(...t);return i.annotation=e,i;function i(t,i,n){const r=t.hasOwnProperty(ii)?t[ii]:Object.defineProperty(t,ii,{value:[]})[ii];for(;r.length<=n;)r.push(null);return(r[n]=r[n]||[]).push(e),t}}return i&&(r.prototype=Object.create(i.prototype)),r.prototype.ngMetadataName=t,r.annotationCls=r,r})}class ri{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=_({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}toString(){return`InjectionToken ${this._desc}`}}const si=new ri("AnalyzeForEntryComponents"),oi=Function;function ai(t){return"function"==typeof t}function li(t,e){void 0===e&&(e=t);for(let i=0;i<t.length;i++){let n=t[i];Array.isArray(n)?(e===t&&(e=t.slice(0,i)),li(n,e)):e!==t&&e.push(n)}return e}function ci(t,e){t.forEach(t=>Array.isArray(t)?ci(t,e):e(t))}function hi(t,e,i){e>=t.length?t.push(i):t.splice(e,0,i)}function ui(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function di(t,e){const i=[];for(let n=0;n<t;n++)i.push(e);return i}function pi(t,e,i){let n=mi(t,e);return n>=0?t[1|n]=i:(n=~n,function(t,e,i,n){let r=t.length;if(r==e)t.push(i,n);else if(1===r)t.push(n,t[0]),t[0]=i;else{for(r--,t.push(t[r-1],t[r]);r>e;)t[r]=t[r-2],r--;t[e]=i,t[e+1]=n}}(t,n,e,i)),n}function fi(t,e){const i=mi(t,e);if(i>=0)return t[1|i]}function mi(t,e){return function(t,e,i){let n=0,r=t.length>>1;for(;r!==n;){const i=n+(r-n>>1),s=t[i<<1];if(e===s)return i<<1;s>e?r=i:n=i+1}return~(r<<1)}(t,e)}const gi=/^function\s+\S+\(\)\s*{[\s\S]+\.apply\(this,\s*(arguments|[^()]+\(arguments\))\)/,Ai=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{/,bi=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(/,vi=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(\)\s*{\s*super\(\.\.\.arguments\)/;class _i{constructor(t){this._reflect=t||N.Reflect}isReflectionEnabled(){return!0}factory(t){return(...e)=>new t(...e)}_zipTypesAndAnnotations(t,e){let i;i=di(void 0===t?e.length:t.length);for(let n=0;n<i.length;n++)i[n]=void 0===t?[]:t[n]&&t[n]!=Object?[t[n]]:[],e&&null!=e[n]&&(i[n]=i[n].concat(e[n]));return i}_ownParameters(t,e){if(i=t.toString(),gi.test(i)||vi.test(i)||Ai.test(i)&&!bi.test(i))return null;var i;if(t.parameters&&t.parameters!==e.parameters)return t.parameters;const n=t.ctorParameters;if(n&&n!==e.ctorParameters){const t="function"==typeof n?n():n,e=t.map(t=>t&&t.type),i=t.map(t=>t&&yi(t.decorators));return this._zipTypesAndAnnotations(e,i)}const r=t.hasOwnProperty(ii)&&t[ii],s=this._reflect&&this._reflect.getOwnMetadata&&this._reflect.getOwnMetadata("design:paramtypes",t);return s||r?this._zipTypesAndAnnotations(s,r):di(t.length)}parameters(t){if(!ai(t))return[];const e=wi(t);let i=this._ownParameters(t,e);return i||e===Object||(i=this.parameters(e)),i||[]}_ownAnnotations(t,e){if(t.annotations&&t.annotations!==e.annotations){let e=t.annotations;return"function"==typeof e&&e.annotations&&(e=e.annotations),e}return t.decorators&&t.decorators!==e.decorators?yi(t.decorators):t.hasOwnProperty("__annotations__")?t.__annotations__:null}annotations(t){if(!ai(t))return[];const e=wi(t),i=this._ownAnnotations(t,e)||[];return(e!==Object?this.annotations(e):[]).concat(i)}_ownPropMetadata(t,e){if(t.propMetadata&&t.propMetadata!==e.propMetadata){let e=t.propMetadata;return"function"==typeof e&&e.propMetadata&&(e=e.propMetadata),e}if(t.propDecorators&&t.propDecorators!==e.propDecorators){const e=t.propDecorators,i={};return Object.keys(e).forEach(t=>{i[t]=yi(e[t])}),i}return t.hasOwnProperty("__prop__metadata__")?t.__prop__metadata__:null}propMetadata(t){if(!ai(t))return{};const e=wi(t),i={};if(e!==Object){const t=this.propMetadata(e);Object.keys(t).forEach(e=>{i[e]=t[e]})}const n=this._ownPropMetadata(t,e);return n&&Object.keys(n).forEach(t=>{const e=[];i.hasOwnProperty(t)&&e.push(...i[t]),e.push(...n[t]),i[t]=e}),i}ownPropMetadata(t){return ai(t)&&this._ownPropMetadata(t,wi(t))||{}}hasLifecycleHook(t,e){return t instanceof oi&&e in t.prototype}guards(t){return{}}getter(t){return new Function("o","return o."+t+";")}setter(t){return new Function("o","v","return o."+t+" = v;")}method(t){return new Function("o","args",`if (!o.${t}) throw new Error('"${t}" is undefined');\n return o.${t}.apply(o, args);`)}importUri(t){return"object"==typeof t&&t.filePath?t.filePath:`./${h(t)}`}resourceUri(t){return`./${h(t)}`}resolveIdentifier(t,e,i,n){return n}resolveEnum(t,e){return t[e]}}function yi(t){return t?t.map(t=>new(0,t.type.annotationCls)(...t.args?t.args:[])):[]}function wi(t){const e=t.prototype?Object.getPrototypeOf(t.prototype):null;return(e?e.constructor:null)||Object}const xi={},Ci=/\n/gm,Si=l({provide:String,useValue:l});let ki;function Ei(t){const e=ki;return ki=t,e}function Di(t,e=I.Default){if(void 0===ki)throw new Error("inject() must be called from an injection context");return null===ki?M(t,void 0,e):ki.get(t,e&I.Optional?null:void 0,e)}function Ii(t,e=I.Default){return(P||Di)(f(t),e)}const Pi=Ii;function Oi(t){const e=[];for(let i=0;i<t.length;i++){const n=f(t[i]);if(Array.isArray(n)){if(0===n.length)throw new Error("Arguments array must have arguments.");let t,i=I.Default;for(let e=0;e<n.length;e++){const r=n[e],s=r.__NG_DI_FLAG__;"number"==typeof s?-1===s?t=r.token:i|=s:t=r}e.push(Ii(t,i))}else e.push(Ii(n))}return e}function Mi(t,e){return t.__NG_DI_FLAG__=e,t.prototype.__NG_DI_FLAG__=e,t}const Ti=Mi(ni("Inject",t=>({token:t})),-1),Ri=Mi(ni("Optional"),8),Vi=Mi(ni("Self"),2),Fi=Mi(ni("SkipSelf"),4);let Li,Ui;function Bi(t){var e;return(null===(e=function(){if(void 0===Li&&(Li=null,N.trustedTypes))try{Li=N.trustedTypes.createPolicy("angular",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch(e){}return Li}())||void 0===e?void 0:e.createHTML(t))||t}function Ni(){if(void 0===Ui&&(Ui=null,N.trustedTypes))try{Ui=N.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch(t){}return Ui}function ji(t){var e;return(null===(e=Ni())||void 0===e?void 0:e.createHTML(t))||t}function zi(t){var e;return(null===(e=Ni())||void 0===e?void 0:e.createScriptURL(t))||t}class Hi{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see https://g.co/ng/security#xss)`}}class Ki extends Hi{getTypeName(){return"HTML"}}class $i extends Hi{getTypeName(){return"Style"}}class Gi extends Hi{getTypeName(){return"Script"}}class Wi extends Hi{getTypeName(){return"URL"}}class Zi extends Hi{getTypeName(){return"ResourceURL"}}function qi(t){return t instanceof Hi?t.changingThisBreaksApplicationSecurity:t}function Yi(t,e){const i=Qi(t);if(null!=i&&i!==e){if("ResourceURL"===i&&"URL"===e)return!0;throw new Error(`Required a safe ${e}, got a ${i} (see https://g.co/ng/security#xss)`)}return i===e}function Qi(t){return t instanceof Hi&&t.getTypeName()||null}function Xi(t){return new Ki(t)}function Ji(t){return new $i(t)}function tn(t){return new Gi(t)}function en(t){return new Wi(t)}function nn(t){return new Zi(t)}class rn{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t="<body><remove></remove>"+t;try{const e=(new window.DOMParser).parseFromString(Bi(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch(e){return null}}}class sn{constructor(t){if(this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const t=this.inertDocument.createElement("html");this.inertDocument.appendChild(t);const e=this.inertDocument.createElement("body");t.appendChild(e)}}getInertBodyElement(t){const e=this.inertDocument.createElement("template");if("content"in e)return e.innerHTML=Bi(t),e;const i=this.inertDocument.createElement("body");return i.innerHTML=Bi(t),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(i),i}stripCustomNsAttrs(t){const e=t.attributes;for(let n=e.length-1;0<n;n--){const i=e.item(n).name;"xmlns:ns1"!==i&&0!==i.indexOf("ns1:")||t.removeAttribute(i)}let i=t.firstChild;for(;i;)i.nodeType===Node.ELEMENT_NODE&&this.stripCustomNsAttrs(i),i=i.nextSibling}}const on=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi,an=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;function ln(t){return(t=String(t)).match(on)||t.match(an)?t:"unsafe:"+t}function cn(t){const e={};for(const i of t.split(","))e[i]=!0;return e}function hn(...t){const e={};for(const i of t)for(const t in i)i.hasOwnProperty(t)&&(e[t]=!0);return e}const un=cn("area,br,col,hr,img,wbr"),dn=cn("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),pn=cn("rp,rt"),fn=hn(pn,dn),mn=hn(un,hn(dn,cn("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),hn(pn,cn("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),fn),gn=cn("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),An=cn("srcset"),bn=hn(gn,An,cn("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),cn("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),vn=cn("script,style,template");class _n{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(t){let e=t.firstChild,i=!0;for(;e;)if(e.nodeType===Node.ELEMENT_NODE?i=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,i&&e.firstChild)e=e.firstChild;else for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let t=this.checkClobberedElement(e,e.nextSibling);if(t){e=t;break}e=this.checkClobberedElement(e,e.parentNode)}return this.buf.join("")}startElement(t){const e=t.nodeName.toLowerCase();if(!mn.hasOwnProperty(e))return this.sanitizedSomething=!0,!vn.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);const i=t.attributes;for(let r=0;r<i.length;r++){const t=i.item(r),e=t.name,s=e.toLowerCase();if(!bn.hasOwnProperty(s)){this.sanitizedSomething=!0;continue}let o=t.value;gn[s]&&(o=ln(o)),An[s]&&(n=o,o=(n=String(n)).split(",").map(t=>ln(t.trim())).join(", ")),this.buf.push(" ",e,'="',xn(o),'"')}var n;return this.buf.push(">"),!0}endElement(t){const e=t.nodeName.toLowerCase();mn.hasOwnProperty(e)&&!un.hasOwnProperty(e)&&(this.buf.push("</"),this.buf.push(e),this.buf.push(">"))}chars(t){this.buf.push(xn(t))}checkClobberedElement(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`);return e}}const yn=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,wn=/([^\#-~ |!])/g;function xn(t){return t.replace(/&/g,"&amp;").replace(yn,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(wn,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}let Cn;function Sn(t,e){let i=null;try{Cn=Cn||function(t){const e=new sn(t);return function(){try{return!!(new window.DOMParser).parseFromString(Bi(""),"text/html")}catch(t){return!1}}()?new rn(e):e}(t);let n=e?String(e):"";i=Cn.getInertBodyElement(n);let r=5,s=n;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,n=s,s=i.innerHTML,i=Cn.getInertBodyElement(n)}while(n!==s);return Bi((new _n).sanitizeChildren(kn(i)||i))}finally{if(i){const t=kn(i)||i;for(;t.firstChild;)t.removeChild(t.firstChild)}}}function kn(t){return"content"in t&&function(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var En=function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t}({});function Dn(t){const e=On();return e?ji(e.sanitize(En.HTML,t)||""):Yi(t,"HTML")?ji(qi(t)):Sn(Ct(),A(t))}function In(t){const e=On();return e?e.sanitize(En.URL,t)||"":Yi(t,"URL")?qi(t):ln(A(t))}function Pn(t){const e=On();if(e)return zi(e.sanitize(En.RESOURCE_URL,t)||"");if(Yi(t,"ResourceURL"))return zi(qi(t));throw new Error("unsafe value used in a resource URL context (see https://g.co/ng/security#xss)")}function On(){const t=jt();return t&&t[12]}function Mn(t){return t.ngDebugContext}function Tn(t){return t.ngOriginalError}function Rn(t,...e){t.error(...e)}class Vn{constructor(){this._console=console}handleError(t){const e=this._findOriginalError(t),i=this._findContext(t),n=function(t){return t.ngErrorLogger||Rn}(t);n(this._console,"ERROR",t),e&&n(this._console,"ORIGINAL ERROR",e),i&&n(this._console,"ERROR CONTEXT",i)}_findContext(t){return t?Mn(t)?Mn(t):this._findContext(Tn(t)):null}_findOriginalError(t){let e=Tn(t);for(;e&&Tn(e);)e=Tn(e);return e}}function Fn(t,e){t.__ngContext__=e}const Ln=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(N))();function Un(t){return{name:"window",target:t.ownerDocument.defaultView}}function Bn(t){return{name:"document",target:t.ownerDocument}}function Nn(t){return{name:"body",target:t.ownerDocument.body}}function jn(t){return t instanceof Function?t():t}var zn=function(t){return t[t.Important=1]="Important",t[t.DashCase=2]="DashCase",t}({});function Hn(t,e){return(void 0)(t,e)}function Kn(t){const e=t[3];return ht(e)?e[3]:e}function $n(t){return Wn(t[13])}function Gn(t){return Wn(t[4])}function Wn(t){for(;null!==t&&!ht(t);)t=t[4];return t}function Zn(t,e,i,n,r){if(null!=n){let s,o=!1;ht(n)?s=n:ct(n)&&(o=!0,n=n[0]);const a=Et(n);0===t&&null!==i?null==r?ir(e,i,a):er(e,i,a,r||null,!0):1===t&&null!==i?er(e,i,a,r||null,!0):2===t?function(t,e,i){const n=rr(t,e);n&&function(t,e,i,n){St(t)?t.removeChild(e,i,n):e.removeChild(i)}(t,n,e,i)}(e,a,o):3===t&&e.destroyNode(a),null!=s&&function(t,e,i,n,r){const s=i[7];s!==Et(i)&&Zn(e,t,n,s,r);for(let o=10;o<i.length;o++){const r=i[o];dr(r[1],r,t,e,n,s)}}(e,t,s,i,r)}}function qn(t,e,i){return St(t)?t.createElement(e,i):null===i?t.createElement(e):t.createElementNS(i,e)}function Yn(t,e){const i=t[9],n=i.indexOf(e),r=e[3];1024&e[2]&&(e[2]&=-1025,Ut(r,-1)),i.splice(n,1)}function Qn(t,e){if(t.length<=10)return;const i=10+e,n=t[i];if(n){const s=n[17];null!==s&&s!==t&&Yn(s,n),e>0&&(t[i-1][4]=n[4]);const o=ui(t,10+e);dr(n[1],r=n,r[11],2,null,null),r[0]=null,r[6]=null;const a=o[19];null!==a&&a.detachView(o[1]),n[3]=null,n[4]=null,n[2]&=-129}var r;return n}function Xn(t,e){if(!(256&e[2])){const i=e[11];St(i)&&i.destroyNode&&dr(t,e,i,3,null,null),function(t){let e=t[13];if(!e)return Jn(t[1],t);for(;e;){let i=null;if(ct(e))i=e[13];else{const t=e[10];t&&(i=t)}if(!i){for(;e&&!e[4]&&e!==t;)ct(e)&&Jn(e[1],e),e=e[3];null===e&&(e=t),ct(e)&&Jn(e[1],e),i=e&&e[4]}e=i}}(e)}}function Jn(t,e){if(!(256&e[2])){e[2]&=-129,e[2]|=256,function(t,e){let i;if(null!=t&&null!=(i=t.destroyHooks))for(let n=0;n<i.length;n+=2){const t=e[i[n]];if(!(t instanceof Se)){const e=i[n+1];if(Array.isArray(e))for(let i=0;i<e.length;i+=2)e[i+1].call(t[e[i]]);else e.call(t)}}}(t,e),function(t,e){const i=t.cleanup,n=e[7];let r=-1;if(null!==i)for(let s=0;s<i.length-1;s+=2)if("string"==typeof i[s]){const t=i[s+1],o="function"==typeof t?t(e):Et(e[t]),a=n[r=i[s+2]],l=i[s+3];"boolean"==typeof l?o.removeEventListener(i[s],a,l):l>=0?n[r=l]():n[r=-l].unsubscribe(),s+=2}else{const t=n[r=i[s+1]];i[s].call(t)}if(null!==n){for(let t=r+1;t<n.length;t++)(0,n[t])();e[7]=null}}(t,e),1===e[1].type&&St(e[11])&&e[11].destroy();const i=e[17];if(null!==i&&ht(e[3])){i!==e[3]&&Yn(i,e);const n=e[19];null!==n&&n.detachView(t)}}}function tr(t,e,i){return function(t,e,i){let n=e;for(;null!==n&&40&n.type;)n=(e=n).parent;if(null===n)return i[0];if(2&n.flags){const e=t.data[n.directiveStart].encapsulation;if(e===V.None||e===V.Emulated)return null}return It(n,i)}(t,e.parent,i)}function er(t,e,i,n,r){St(t)?t.insertBefore(e,i,n,r):e.insertBefore(i,n,r)}function ir(t,e,i){St(t)?t.appendChild(e,i):e.appendChild(i)}function nr(t,e,i,n,r){null!==n?er(t,e,i,n,r):ir(t,e,i)}function rr(t,e){return St(t)?t.parentNode(e):e.parentNode}function sr(t,e,i){return or(t,e,i)}let or=function(t,e,i){return 40&t.type?It(t,i):null};function ar(t,e,i,n){const r=tr(t,n,e),s=e[11],o=sr(n.parent||e[6],n,e);if(null!=r)if(Array.isArray(i))for(let a=0;a<i.length;a++)nr(s,r,i[a],o,!1);else nr(s,r,i,o,!1)}function lr(t,e){if(null!==e){const i=e.type;if(3&i)return It(e,t);if(4&i)return hr(-1,t[e.index]);if(8&i){const i=e.child;if(null!==i)return lr(t,i);{const i=t[e.index];return ht(i)?hr(-1,i):Et(i)}}if(32&i)return Hn(e,t)()||Et(t[e.index]);{const i=cr(t,e);return null!==i?Array.isArray(i)?i[0]:lr(Kn(t[16]),i):lr(t,e.next)}}return null}function cr(t,e){return null!==e?t[16][6].projection[e.projection]:null}function hr(t,e){const i=10+t+1;if(i<e.length){const t=e[i],n=t[1].firstChild;if(null!==n)return lr(t,n)}return e[7]}function ur(t,e,i,n,r,s,o){for(;null!=i;){const a=n[i.index],l=i.type;if(o&&0===e&&(a&&Fn(Et(a),n),i.flags|=4),64!=(64&i.flags))if(8&l)ur(t,e,i.child,n,r,s,!1),Zn(e,t,r,a,s);else if(32&l){const o=Hn(i,n);let l;for(;l=o();)Zn(e,t,r,l,s);Zn(e,t,r,a,s)}else 16&l?pr(t,e,n,i,r,s):Zn(e,t,r,a,s);i=o?i.projectionNext:i.next}}function dr(t,e,i,n,r,s){ur(i,n,t.firstChild,e,r,s,!1)}function pr(t,e,i,n,r,s){const o=i[16],a=o[6].projection[n.projection];if(Array.isArray(a))for(let l=0;l<a.length;l++)Zn(e,t,r,a[l],s);else ur(t,e,a,o[3],r,s,!0)}function fr(t,e,i){St(t)?t.setAttribute(e,"style",i):e.style.cssText=i}function mr(t,e,i){St(t)?""===i?t.removeAttribute(e,"class"):t.setAttribute(e,"class",i):e.className=i}function gr(t,e,i){let n=t.length;for(;;){const r=t.indexOf(e,i);if(-1===r)return r;if(0===r||t.charCodeAt(r-1)<=32){const i=e.length;if(r+i===n||t.charCodeAt(r+i)<=32)return r}i=r+1}}function Ar(t,e,i){let n=0;for(;n<t.length;){let r=t[n++];if(i&&"class"===r){if(r=t[n],-1!==gr(r.toLowerCase(),e,0))return!0}else if(1===r){for(;n<t.length&&"string"==typeof(r=t[n++]);)if(r.toLowerCase()===e)return!0;return!1}}return!1}function br(t){return 4===t.type&&"ng-template"!==t.value}function vr(t,e,i){return e===(4!==t.type||i?t.value:"ng-template")}function _r(t,e,i){let n=4;const r=t.attrs||[],s=function(t){for(let e=0;e<t.length;e++)if(Ee(t[e]))return e;return t.length}(r);let o=!1;for(let a=0;a<e.length;a++){const l=e[a];if("number"!=typeof l){if(!o)if(4&n){if(n=2|1&n,""!==l&&!vr(t,l,i)||""===l&&1===e.length){if(yr(n))return!1;o=!0}}else{const c=8&n?l:e[++a];if(8&n&&null!==t.attrs){if(!Ar(t.attrs,c,i)){if(yr(n))return!1;o=!0}continue}const h=wr(8&n?"class":l,r,br(t),i);if(-1===h){if(yr(n))return!1;o=!0;continue}if(""!==c){let t;t=h>s?"":r[h+1].toLowerCase();const e=8&n?t:null;if(e&&-1!==gr(e,c,0)||2&n&&c!==t){if(yr(n))return!1;o=!0}}}}else{if(!o&&!yr(n)&&!yr(l))return!1;if(o&&yr(l))continue;o=!1,n=l|1&n}}return yr(n)||o}function yr(t){return 0==(1&t)}function wr(t,e,i,n){if(null===e)return-1;let r=0;if(n||!i){let i=!1;for(;r<e.length;){const n=e[r];if(n===t)return r;if(3===n||6===n)i=!0;else{if(1===n||2===n){let t=e[++r];for(;"string"==typeof t;)t=e[++r];continue}if(4===n)break;if(0===n){r+=4;continue}}r+=i?1:2}return-1}return function(t,e){let i=t.indexOf(4);if(i>-1)for(i++;i<t.length;){const n=t[i];if("number"==typeof n)return-1;if(n===e)return i;i++}return-1}(e,t)}function xr(t,e,i=!1){for(let n=0;n<e.length;n++)if(_r(t,e[n],i))return!0;return!1}function Cr(t,e){t:for(let i=0;i<e.length;i++){const n=e[i];if(t.length===n.length){for(let e=0;e<t.length;e++)if(t[e]!==n[e])continue t;return!0}}return!1}function Sr(t,e){return t?":not("+e.trim()+")":e}function kr(t){let e=t[0],i=1,n=2,r="",s=!1;for(;i<t.length;){let o=t[i];if("string"==typeof o)if(2&n){const e=t[++i];r+="["+o+(e.length>0?'="'+e+'"':"")+"]"}else 8&n?r+="."+o:4&n&&(r+=" "+o);else""===r||yr(o)||(e+=Sr(s,r),r=""),n=o,s=s||!yr(n);i++}return""!==r&&(e+=Sr(s,r)),e}const Er={};function Dr(t){Ir(zt(),jt(),fe()+t,qt())}function Ir(t,e,i,n){if(!n)if(3==(3&e[2])){const n=t.preOrderCheckHooks;null!==n&&_e(e,n,i)}else{const n=t.preOrderHooks;null!==n&&ye(e,n,0,i)}me(i)}function Pr(t,e){return t<<17|e<<2}function Or(t){return t>>17&32767}function Mr(t){return 2|t}function Tr(t){return(131068&t)>>2}function Rr(t,e){return-131069&t|e<<2}function Vr(t){return 1|t}function Fr(t,e){const i=t.contentQueries;if(null!==i)for(let n=0;n<i.length;n+=2){const r=i[n],s=i[n+1];if(-1!==s){const i=t.data[s];se(r),i.contentQueries(2,e[s],s)}}}function Lr(t,e,i,n,r,s,o,a,l,c){const h=e.blueprint.slice();return h[0]=r,h[2]=140|n,Lt(h),h[3]=h[15]=t,h[8]=i,h[10]=o||t&&t[10],h[11]=a||t&&t[11],h[12]=l||t&&t[12]||null,h[9]=c||t&&t[9]||null,h[6]=s,h[16]=2==e.type?t[16]:h,h}function Ur(t,e,i,n,r){let s=t.data[e];if(null===s)s=function(t,e,i,n,r){const s=$t(),o=Wt(),a=t.data[e]=function(t,e,i,n,r,s){return{type:i,index:n,insertBeforeIndex:null,injectorIndex:e?e.injectorIndex:-1,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,propertyBindings:null,flags:0,providerIndexes:0,value:r,attrs:s,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tViews:null,next:null,projectionNext:null,child:null,parent:e,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}(0,o?s:s&&s.parent,i,e,n,r);return null===t.firstChild&&(t.firstChild=a),null!==s&&(o?null==s.child&&null!==a.parent&&(s.child=a):null===s.next&&(s.next=a)),a}(t,e,i,n,r),Bt.lFrame.inI18n&&(s.flags|=64);else if(64&s.type){s.type=i,s.value=n,s.attrs=r;const t=function(){const t=Bt.lFrame,e=t.currentTNode;return t.isParent?e:e.parent}();s.injectorIndex=null===t?-1:t.injectorIndex}return Gt(s,!0),s}function Br(t,e,i,n){if(0===i)return-1;const r=e.length;for(let s=0;s<i;s++)e.push(n),t.blueprint.push(n),t.data.push(null);return r}function Nr(t,e,i){le(e);try{const n=t.viewQuery;null!==n&&gs(1,n,i);const r=t.template;null!==r&&Hr(t,e,r,1,i),t.firstCreatePass&&(t.firstCreatePass=!1),t.staticContentQueries&&Fr(t,e),t.staticViewQueries&&gs(2,t.viewQuery,i);const s=t.components;null!==s&&function(t,e){for(let i=0;i<e.length;i++)us(t,e[i])}(e,s)}catch(n){throw t.firstCreatePass&&(t.incompleteFirstPass=!0),n}finally{e[2]&=-5,pe()}}function jr(t,e,i,n){const r=e[2];if(256==(256&r))return;le(e);const s=qt();try{Lt(e),Bt.lFrame.bindingIndex=t.bindingStartIndex,null!==i&&Hr(t,e,i,2,n);const o=3==(3&r);if(!s)if(o){const i=t.preOrderCheckHooks;null!==i&&_e(e,i,null)}else{const i=t.preOrderHooks;null!==i&&ye(e,i,0,null),we(e,0)}if(function(t){for(let e=$n(t);null!==e;e=Gn(e)){if(!e[2])continue;const t=e[9];for(let e=0;e<t.length;e++){const i=t[e],n=i[3];0==(1024&i[2])&&Ut(n,1),i[2]|=1024}}}(e),function(t){for(let e=$n(t);null!==e;e=Gn(e))for(let t=10;t<e.length;t++){const i=e[t],n=i[1];Vt(i)&&jr(n,i,n.template,i[8])}}(e),null!==t.contentQueries&&Fr(t,e),!s)if(o){const i=t.contentCheckHooks;null!==i&&_e(e,i)}else{const i=t.contentHooks;null!==i&&ye(e,i,1),we(e,1)}!function(t,e){const i=t.hostBindingOpCodes;if(null!==i)try{for(let t=0;t<i.length;t++){const n=i[t];if(n<0)me(~n);else{const r=n,s=i[++t],o=i[++t];ee(s,r),o(2,e[r])}}}finally{me(-1)}}(t,e);const a=t.components;null!==a&&function(t,e){for(let i=0;i<e.length;i++)cs(t,e[i])}(e,a);const l=t.viewQuery;if(null!==l&&gs(2,l,n),!s)if(o){const i=t.viewCheckHooks;null!==i&&_e(e,i)}else{const i=t.viewHooks;null!==i&&ye(e,i,2),we(e,2)}!0===t.firstUpdatePass&&(t.firstUpdatePass=!1),s||(e[2]&=-73),1024&e[2]&&(e[2]&=-1025,Ut(e[3],-1))}finally{pe()}}function zr(t,e,i,n){const r=e[10],s=!qt(),o=Rt(e);try{s&&!o&&r.begin&&r.begin(),o&&Nr(t,e,n),jr(t,e,i,n)}finally{s&&!o&&r.end&&r.end()}}function Hr(t,e,i,n,r){const s=fe();try{me(-1),2&n&&e.length>20&&Ir(t,e,20,qt()),i(n,r)}finally{me(s)}}function Kr(t,e,i){if(ut(e)){const n=e.directiveEnd;for(let r=e.directiveStart;r<n;r++){const e=t.data[r];e.contentQueries&&e.contentQueries(1,i[r],r)}}}function $r(t,e,i){Nt()&&(function(t,e,i,n){const r=i.directiveStart,s=i.directiveEnd;t.firstCreatePass||Le(i,e),Fn(n,e);const o=i.initialInputs;for(let a=r;a<s;a++){const n=t.data[a],s=ft(n);s&&ss(e,i,n);const l=qe(e,t,a,i);Fn(l,e),null!==o&&os(0,a-r,l,n,0,o),s&&(Mt(i.index,e)[8]=l)}}(t,e,i,It(i,e)),128==(128&i.flags)&&function(t,e,i){const n=i.directiveStart,r=i.directiveEnd,s=i.index,o=Bt.lFrame.currentDirectiveIndex;try{me(s);for(let i=n;i<r;i++){const n=t.data[i],r=e[i];ie(i),null===n.hostBindings&&0===n.hostVars&&null===n.hostAttrs||ts(n,r)}}finally{me(-1),ie(o)}}(t,e,i))}function Gr(t,e,i=It){const n=e.localNames;if(null!==n){let r=e.index+1;for(let s=0;s<n.length;s+=2){const o=n[s+1],a=-1===o?i(e,t):t[o];t[r++]=a}}}function Wr(t){const e=t.tView;return null===e||e.incompleteFirstPass?t.tView=Zr(1,null,t.template,t.decls,t.vars,t.directiveDefs,t.pipeDefs,t.viewQuery,t.schemas,t.consts):e}function Zr(t,e,i,n,r,s,o,a,l,c){const h=20+n,u=h+r,d=function(t,e){const i=[];for(let n=0;n<e;n++)i.push(n<t?null:Er);return i}(h,u),p="function"==typeof c?c():c;return d[1]={type:t,blueprint:d,template:i,queries:null,viewQuery:a,declTNode:e,data:d.slice().fill(null,h),bindingStartIndex:h,expandoStartIndex:u,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:"function"==typeof s?s():s,pipeRegistry:"function"==typeof o?o():o,firstChild:null,schemas:l,consts:p,incompleteFirstPass:!1}}function qr(t,e,i,n){const r=bs(e);null===i?r.push(n):(r.push(i),t.firstCreatePass&&vs(t).push(n,r.length-1))}function Yr(t,e,i){for(let n in t)if(t.hasOwnProperty(n)){const r=t[n];(i=null===i?{}:i).hasOwnProperty(n)?i[n].push(e,r):i[n]=[e,r]}return i}function Qr(t,e,i,n,r,s,o,a){const l=It(e,i);let c,h=e.inputs;var u;!a&&null!=h&&(c=h[n])?(ws(t,i,c,n,r),dt(e)&&function(t,e){const i=Mt(e,t);16&i[2]||(i[2]|=64)}(i,e.index)):3&e.type&&(n="class"===(u=n)?"className":"for"===u?"htmlFor":"formaction"===u?"formAction":"innerHtml"===u?"innerHTML":"readonly"===u?"readOnly":"tabindex"===u?"tabIndex":u,r=null!=o?o(r,e.value||"",n):r,St(s)?s.setProperty(l,n,r):De(n)||(l.setProperty?l.setProperty(n,r):l[n]=r))}function Xr(t,e,i,n){let r=!1;if(Nt()){const s=function(t,e,i){const n=t.directiveRegistry;let r=null;if(n)for(let s=0;s<n.length;s++){const o=n[s];xr(i,o.selectors,!1)&&(r||(r=[]),je(Le(i,e),t,o.type),ft(o)?(es(t,i),r.unshift(o)):r.push(o))}return r}(t,e,i),o=null===n?null:{"":-1};if(null!==s){r=!0,ns(i,t.data.length,s.length);for(let t=0;t<s.length;t++){const e=s[t];e.providersResolver&&e.providersResolver(e)}let n=!1,a=!1,l=Br(t,e,s.length,null);for(let r=0;r<s.length;r++){const c=s[r];i.mergedAttrs=Ie(i.mergedAttrs,c.hostAttrs),rs(t,i,e,l,c),is(l,c,o),null!==c.contentQueries&&(i.flags|=8),null===c.hostBindings&&null===c.hostAttrs&&0===c.hostVars||(i.flags|=128);const h=c.type.prototype;!n&&(h.ngOnChanges||h.ngOnInit||h.ngDoCheck)&&((t.preOrderHooks||(t.preOrderHooks=[])).push(i.index),n=!0),a||!h.ngOnChanges&&!h.ngDoCheck||((t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(i.index),a=!0),l++}!function(t,e){const i=e.directiveEnd,n=t.data,r=e.attrs,s=[];let o=null,a=null;for(let l=e.directiveStart;l<i;l++){const t=n[l],i=t.inputs,c=null===r||br(e)?null:as(i,r);s.push(c),o=Yr(i,l,o),a=Yr(t.outputs,l,a)}null!==o&&(o.hasOwnProperty("class")&&(e.flags|=16),o.hasOwnProperty("style")&&(e.flags|=32)),e.initialInputs=s,e.inputs=o,e.outputs=a}(t,i)}o&&function(t,e,i){if(e){const n=t.localNames=[];for(let t=0;t<e.length;t+=2){const r=i[e[t+1]];if(null==r)throw new g("301",`Export of name '${e[t+1]}' not found!`);n.push(e[t],r)}}}(i,n,o)}return i.mergedAttrs=Ie(i.mergedAttrs,i.attrs),r}function Jr(t,e,i,n,r,s){const o=s.hostBindings;if(o){let i=t.hostBindingOpCodes;null===i&&(i=t.hostBindingOpCodes=[]);const s=~e.index;(function(t){let e=t.length;for(;e>0;){const i=t[--e];if("number"==typeof i&&i<0)return i}return 0})(i)!=s&&i.push(s),i.push(n,r,o)}}function ts(t,e){null!==t.hostBindings&&t.hostBindings(1,e)}function es(t,e){e.flags|=2,(t.components||(t.components=[])).push(e.index)}function is(t,e,i){if(i){if(e.exportAs)for(let n=0;n<e.exportAs.length;n++)i[e.exportAs[n]]=t;ft(e)&&(i[""]=t)}}function ns(t,e,i){t.flags|=1,t.directiveStart=e,t.directiveEnd=e+i,t.providerIndexes=e}function rs(t,e,i,n,r){t.data[n]=r;const s=r.factory||(r.factory=mt(r.type)),o=new Se(s,ft(r),null);t.blueprint[n]=o,i[n]=o,Jr(t,e,0,n,Br(t,i,r.hostVars,Er),r)}function ss(t,e,i){const n=It(e,t),r=Wr(i),s=t[10],o=ds(t,Lr(t,r,null,i.onPush?64:16,n,e,s,s.createRenderer(n,i),null,null));t[e.index]=o}function os(t,e,i,n,r,s){const o=s[e];if(null!==o){const t=n.setInput;for(let e=0;e<o.length;){const r=o[e++],s=o[e++],a=o[e++];null!==t?n.setInput(i,a,r,s):i[s]=a}}}function as(t,e){let i=null,n=0;for(;n<e.length;){const r=e[n];if(0!==r)if(5!==r){if("number"==typeof r)break;t.hasOwnProperty(r)&&(null===i&&(i=[]),i.push(r,t[r],e[n+1])),n+=2}else n+=2;else n+=4}return i}function ls(t,e,i,n){return new Array(t,!0,!1,e,null,0,n,i,null,null)}function cs(t,e){const i=Mt(e,t);if(Vt(i)){const t=i[1];80&i[2]?jr(t,i,t.template,i[8]):i[5]>0&&hs(i)}}function hs(t){for(let i=$n(t);null!==i;i=Gn(i))for(let t=10;t<i.length;t++){const e=i[t];if(1024&e[2]){const t=e[1];jr(t,e,t.template,e[8])}else e[5]>0&&hs(e)}const e=t[1].components;if(null!==e)for(let i=0;i<e.length;i++){const n=Mt(e[i],t);Vt(n)&&n[5]>0&&hs(n)}}function us(t,e){const i=Mt(e,t),n=i[1];!function(t,e){for(let i=e.length;i<t.blueprint.length;i++)e.push(t.blueprint[i])}(n,i),Nr(n,i,i[8])}function ds(t,e){return t[13]?t[14][4]=e:t[13]=e,t[14]=e,e}function ps(t){for(;t;){t[2]|=64;const e=Kn(t);if(0!=(512&t[2])&&!e)return t;t=e}return null}function fs(t,e,i){const n=e[10];n.begin&&n.begin();try{jr(t,e,t.template,i)}catch(r){throw ys(e,r),r}finally{n.end&&n.end()}}function ms(t){!function(t){for(let e=0;e<t.components.length;e++){const i=t.components[e],n=Tt(i),r=n[1];zr(r,n,r.template,i)}}(t[8])}function gs(t,e,i){se(0),e(t,i)}const As=(()=>Promise.resolve(null))();function bs(t){return t[7]||(t[7]=[])}function vs(t){return t.cleanup||(t.cleanup=[])}function _s(t,e,i){return(null===t||ft(t))&&(i=function(t){for(;Array.isArray(t);){if("object"==typeof t[1])return t;t=t[0]}return null}(i[e.index])),i[11]}function ys(t,e){const i=t[9],n=i?i.get(Vn,null):null;n&&n.handleError(e)}function ws(t,e,i,n,r){for(let s=0;s<i.length;){const o=i[s++],a=i[s++],l=e[o],c=t.data[o];null!==c.setInput?c.setInput(l,r,n,a):l[a]=r}}function xs(t,e,i){const n=Dt(e,t);!function(t,e,i){St(t)?t.setValue(e,i):e.textContent=i}(t[11],n,i)}function Cs(t,e,i){let n=i?t.styles:null,r=i?t.classes:null,s=0;if(null!==e)for(let o=0;o<e.length;o++){const t=e[o];"number"==typeof t?s=t:1==s?r=u(r,t):2==s&&(n=u(n,t+": "+e[++o]+";"))}i?t.styles=n:t.stylesWithoutHost=n,i?t.classes=r:t.classesWithoutHost=r}const Ss=new ri("INJECTOR",-1);class ks{get(t,e=xi){if(e===xi){const e=new Error(`NullInjectorError: No provider for ${h(t)}!`);throw e.name="NullInjectorError",e}return e}}const Es=new ri("Set Injector scope."),Ds={},Is={},Ps=[];let Os;function Ms(){return void 0===Os&&(Os=new ks),Os}function Ts(t,e=null,i=null,n){return new Rs(t,i,e||Ms(),n)}class Rs{constructor(t,e,i,n=null){this.parent=i,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;const r=[];e&&ci(e,i=>this.processProvider(i,t,e)),ci([t],t=>this.processInjectorType(t,[],r)),this.records.set(Ss,Ls(void 0,this));const s=this.records.get(Es);this.scope=null!=s?s.value:null,this.source=n||("object"==typeof t?null:h(t))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(t=>t.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(t,e=xi,i=I.Default){this.assertNotDestroyed();const n=Ei(this);try{if(!(i&I.SkipSelf)){let e=this.records.get(t);if(void 0===e){const i=("function"==typeof(r=t)||"object"==typeof r&&r instanceof ri)&&w(t);e=i&&this.injectableDefInScope(i)?Ls(Vs(t),Ds):null,this.records.set(t,e)}if(null!=e)return this.hydrate(t,e)}return(i&I.Self?Ms():this.parent).get(t,e=i&I.Optional&&e===xi?null:e)}catch(s){if("NullInjectorError"===s.name){if((s.ngTempTokenPath=s.ngTempTokenPath||[]).unshift(h(t)),n)throw s;return function(t,e,i,n){const r=t.ngTempTokenPath;throw e.__source&&r.unshift(e.__source),t.message=function(t,e,i,n=null){t=t&&"\n"===t.charAt(0)&&"\u0275"==t.charAt(1)?t.substr(2):t;let r=h(e);if(Array.isArray(e))r=e.map(h).join(" -> ");else if("object"==typeof e){let t=[];for(let i in e)if(e.hasOwnProperty(i)){let n=e[i];t.push(i+":"+("string"==typeof n?JSON.stringify(n):h(n)))}r=`{${t.join(", ")}}`}return`${i}${n?"("+n+")":""}[${r}]: ${t.replace(Ci,"\n ")}`}("\n"+t.message,r,i,n),t.ngTokenPath=r,t.ngTempTokenPath=null,t}(s,t,"R3InjectorError",this.source)}throw s}finally{Ei(n)}var r}_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(t=>this.get(t))}toString(){const t=[];return this.records.forEach((e,i)=>t.push(h(i))),`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}processInjectorType(t,e,i){if(!(t=f(t)))return!1;let n=C(t);const r=null==n&&t.ngModule||void 0,s=void 0===r?t:r,o=-1!==i.indexOf(s);if(void 0!==r&&(n=C(r)),null==n)return!1;if(null!=n.imports&&!o){let t;i.push(s);try{ci(n.imports,n=>{this.processInjectorType(n,e,i)&&(void 0===t&&(t=[]),t.push(n))})}finally{}if(void 0!==t)for(let e=0;e<t.length;e++){const{ngModule:i,providers:n}=t[e];ci(n,t=>this.processProvider(t,i,n||Ps))}}this.injectorDefTypes.add(s);const a=mt(s)||(()=>new s);this.records.set(s,Ls(a,Ds));const l=n.providers;if(null!=l&&!o){const e=t;ci(l,t=>this.processProvider(t,e,l))}return void 0!==r&&void 0!==t.providers}processProvider(t,e,i){let n=Bs(t=f(t))?t:f(t&&t.provide);const r=function(t,e,i){return Us(t)?Ls(void 0,t.useValue):Ls(Fs(t),Ds)}(t);if(Bs(t)||!0!==t.multi)this.records.get(n);else{let e=this.records.get(n);e||(e=Ls(void 0,Ds,!0),e.factory=()=>Oi(e.multi),this.records.set(n,e)),n=t,e.multi.push(t)}this.records.set(n,r)}hydrate(t,e){var i;return e.value===Ds&&(e.value=Is,e.value=e.factory()),"object"==typeof e.value&&e.value&&null!==(i=e.value)&&"object"==typeof i&&"function"==typeof i.ngOnDestroy&&this.onDestroy.add(e.value),e.value}injectableDefInScope(t){return!!t.providedIn&&("string"==typeof t.providedIn?"any"===t.providedIn||t.providedIn===this.scope:this.injectorDefTypes.has(t.providedIn))}}function Vs(t){const e=w(t),i=null!==e?e.factory:mt(t);if(null!==i)return i;if(t instanceof ri)throw new Error(`Token ${h(t)} is missing a \u0275prov definition.`);if(t instanceof Function)return function(t){const e=t.length;if(e>0){const i=di(e,"?");throw new Error(`Can't resolve all parameters for ${h(t)}: (${i.join(", ")}).`)}const i=function(t){const e=t&&(t[S]||t[E]);if(e){const i=function(t){if(t.hasOwnProperty("name"))return t.name;const e=(""+t).match(/^function\s*([^\s(]+)/);return null===e?"":e[1]}(t);return console.warn(`DEPRECATED: DI is instantiating a token "${i}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${i}" class.`),e}return null}(t);return null!==i?()=>i.factory(t):()=>new t}(t);throw new Error("unreachable")}function Fs(t,e,i){let n;if(Bs(t)){const e=f(t);return mt(e)||Vs(e)}if(Us(t))n=()=>f(t.useValue);else if((r=t)&&r.useFactory)n=()=>t.useFactory(...Oi(t.deps||[]));else if(function(t){return!(!t||!t.useExisting)}(t))n=()=>Ii(f(t.useExisting));else{const e=f(t&&(t.useClass||t.provide));if(!function(t){return!!t.deps}(t))return mt(e)||Vs(e);n=()=>new e(...Oi(t.deps))}var r;return n}function Ls(t,e,i=!1){return{factory:t,value:e,multi:i?[]:void 0}}function Us(t){return null!==t&&"object"==typeof t&&Si in t}function Bs(t){return"function"==typeof t}const Ns=function(t,e,i){return function(t,e=null,i=null,n){const r=Ts(t,e,i,n);return r._resolveInjectorDefTypes(),r}({name:i},e,t,i)};let js=(()=>{class t{static create(t,e){return Array.isArray(t)?Ns(t,e,""):Ns(t.providers,t.parent,t.name||"")}}return t.THROW_IF_NOT_FOUND=xi,t.NULL=new ks,t.\u0275prov=_({token:t,providedIn:"any",factory:()=>Ii(Ss)}),t.__NG_ELEMENT_ID__=-1,t})();function zs(t,e){ve(Tt(t)[1],Kt())}function Hs(t){let e=Object.getPrototypeOf(t.type.prototype).constructor,i=!0;const n=[t];for(;e;){let r;if(ft(t))r=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new Error("Directives cannot inherit Components");r=e.\u0275dir}if(r){if(i){n.push(r);const e=t;e.inputs=Ks(t.inputs),e.declaredInputs=Ks(t.declaredInputs),e.outputs=Ks(t.outputs);const i=r.hostBindings;i&&Ws(t,i);const s=r.viewQuery,o=r.contentQueries;if(s&&$s(t,s),o&&Gs(t,o),c(t.inputs,r.inputs),c(t.declaredInputs,r.declaredInputs),c(t.outputs,r.outputs),ft(r)&&r.data.animation){const e=t.data;e.animation=(e.animation||[]).concat(r.data.animation)}}const e=r.features;if(e)for(let n=0;n<e.length;n++){const r=e[n];r&&r.ngInherit&&r(t),r===Hs&&(i=!1)}}e=Object.getPrototypeOf(e)}!function(t){let e=0,i=null;for(let n=t.length-1;n>=0;n--){const r=t[n];r.hostVars=e+=r.hostVars,r.hostAttrs=Ie(r.hostAttrs,i=Ie(i,r.hostAttrs))}}(n)}function Ks(t){return t===j?{}:t===H?[]:t}function $s(t,e){const i=t.viewQuery;t.viewQuery=i?(t,n)=>{e(t,n),i(t,n)}:e}function Gs(t,e){const i=t.contentQueries;t.contentQueries=i?(t,n,r)=>{e(t,n,r),i(t,n,r)}:e}function Ws(t,e){const i=t.hostBindings;t.hostBindings=i?(t,n)=>{e(t,n),i(t,n)}:e}let Zs=null;function qs(){if(!Zs){const t=N.Symbol;if(t&&t.iterator)Zs=t.iterator;else{const t=Object.getOwnPropertyNames(Map.prototype);for(let e=0;e<t.length;++e){const i=t[e];"entries"!==i&&"size"!==i&&Map.prototype[i]===Map.prototype.entries&&(Zs=i)}}}return Zs}class Ys{constructor(t){this.wrapped=t}static wrap(t){return new Ys(t)}static unwrap(t){return Ys.isWrapped(t)?t.wrapped:t}static isWrapped(t){return t instanceof Ys}}function Qs(t){return!!Xs(t)&&(Array.isArray(t)||!(t instanceof Map)&&qs()in t)}function Xs(t){return null!==t&&("function"==typeof t||"object"==typeof t)}function Js(t,e,i){return t[e]=i}function to(t,e,i){return!Object.is(t[e],i)&&(t[e]=i,!0)}function eo(t,e,i,n){const r=to(t,e,i);return to(t,e+1,n)||r}function io(t,e,i,n,r){const s=eo(t,e,i,n);return to(t,e+2,r)||s}function no(t,e,i,n){const r=jt();return to(r,Jt(),e)&&(zt(),function(t,e,i,n,r,s){const o=It(t,e);!function(t,e,i,n,r,s,o){if(null==s)St(t)?t.removeAttribute(e,r,i):e.removeAttribute(r);else{const a=null==o?A(s):o(s,n||"",r);St(t)?t.setAttribute(e,r,a,i):i?e.setAttributeNS(i,r,a):e.setAttribute(r,a)}}(e[11],o,s,t.value,i,n,r)}(ge(),r,t,e,i,n)),no}function ro(t,e,i,n){return to(t,Jt(),i)?e+A(i)+n:Er}function so(t,e,i,n,r,s){const o=eo(t,Xt(),i,r);return te(2),o?e+A(i)+n+A(r)+s:Er}function oo(t,e,i,n,r,s,o,a){const l=jt(),c=zt(),h=t+20,u=c.firstCreatePass?function(t,e,i,n,r,s,o,a,l){const c=e.consts,h=Ur(e,t,4,o||null,Ft(c,a));Xr(e,i,h,Ft(c,l)),ve(e,h);const u=h.tViews=Zr(2,h,n,r,s,e.directiveRegistry,e.pipeRegistry,null,e.schemas,c);return null!==e.queries&&(e.queries.template(e,h),u.queries=e.queries.embeddedTView(h)),h}(h,c,l,e,i,n,r,s,o):c.data[h];Gt(u,!1);const d=l[11].createComment("");ar(c,l,d,u),Fn(d,l),ds(l,l[h]=ls(d,l,d,u)),pt(u)&&$r(c,l,u),null!=o&&Gr(l,u,a)}function ao(t){return Ot(Bt.lFrame.contextLView,20+t)}function lo(t){return t.length>1?" ("+function(t){const e=[];for(let i=0;i<t.length;++i){if(e.indexOf(t[i])>-1)return e.push(t[i]),e;e.push(t[i])}return e}(t.slice().reverse()).map(t=>h(t.token)).join(" -> ")+")":""}function co(t,e,i,n){const r=[e],s=i(r),o=n?function(t,e){const i=`${t} caused by: ${e instanceof Error?e.message:e}`,n=Error(i);return n.ngOriginalError=e,n}(s,n):Error(s);return o.addKey=ho,o.keys=r,o.injectors=[t],o.constructResolvingMessage=i,o.ngOriginalError=n,o}function ho(t,e){this.injectors.push(t),this.keys.push(e),this.message=this.constructResolvingMessage(this.keys)}function uo(t,e){const i=[];for(let n=0,r=e.length;n<r;n++){const t=e[n];i.push(t&&0!=t.length?t.map(h).join(" "):"?")}return Error("Cannot resolve all parameters for '"+h(t)+"'("+i.join(", ")+"). Make sure that all the parameters are decorated with Inject or have valid type annotations and that '"+h(t)+"' is decorated with Injectable.")}class po{constructor(t,e){if(this.token=t,this.id=e,!t)throw new Error("Token must be defined!");this.displayName=h(this.token)}static get(t){return mo.get(f(t))}static get numberOfKeys(){return mo.numberOfKeys}}class fo{constructor(){this._allKeys=new Map}get(t){if(t instanceof po)return t;if(this._allKeys.has(t))return this._allKeys.get(t);const e=new po(t,po.numberOfKeys);return this._allKeys.set(t,e),e}get numberOfKeys(){return this._allKeys.size}}const mo=new fo;class go{constructor(t){this.reflectionCapabilities=t}updateCapabilities(t){this.reflectionCapabilities=t}factory(t){return this.reflectionCapabilities.factory(t)}parameters(t){return this.reflectionCapabilities.parameters(t)}annotations(t){return this.reflectionCapabilities.annotations(t)}propMetadata(t){return this.reflectionCapabilities.propMetadata(t)}hasLifecycleHook(t,e){return this.reflectionCapabilities.hasLifecycleHook(t,e)}getter(t){return this.reflectionCapabilities.getter(t)}setter(t){return this.reflectionCapabilities.setter(t)}method(t){return this.reflectionCapabilities.method(t)}importUri(t){return this.reflectionCapabilities.importUri(t)}resourceUri(t){return this.reflectionCapabilities.resourceUri(t)}resolveIdentifier(t,e,i,n){return this.reflectionCapabilities.resolveIdentifier(t,e,i,n)}resolveEnum(t,e){return this.reflectionCapabilities.resolveEnum(t,e)}}const Ao=new go(new _i);class bo{constructor(t,e,i){this.key=t,this.optional=e,this.visibility=i}static fromKey(t){return new bo(t,!1,null)}}const vo=[];class _o{constructor(t,e,i){this.key=t,this.resolvedFactories=e,this.multiProvider=i,this.resolvedFactory=this.resolvedFactories[0]}}class yo{constructor(t,e){this.factory=t,this.dependencies=e}}function wo(t){let e,i;if(t.useClass){const n=f(t.useClass);e=Ao.factory(n),i=ko(n)}else t.useExisting?(e=t=>t,i=[bo.fromKey(po.get(t.useExisting))]):t.useFactory?(e=t.useFactory,i=function(t,e){if(e){const i=e.map(t=>[t]);return e.map(e=>Eo(t,e,i))}return ko(t)}(t.useFactory,t.deps)):(e=()=>t.useValue,i=vo);return new yo(e,i)}function xo(t){return new _o(po.get(t.provide),[wo(t)],t.multi||!1)}function Co(t){const e=function(t,e){for(let i=0;i<t.length;i++){const n=t[i],r=e.get(n.key.id);if(r){if(n.multiProvider!==r.multiProvider)throw Error(`Cannot mix multi providers and regular providers, got: ${r} ${n}`);if(n.multiProvider)for(let t=0;t<n.resolvedFactories.length;t++)r.resolvedFactories.push(n.resolvedFactories[t]);else e.set(n.key.id,n)}else{let t;t=n.multiProvider?new _o(n.key,n.resolvedFactories.slice(),n.multiProvider):n,e.set(n.key.id,t)}}return e}(So(t,[]).map(xo),new Map);return Array.from(e.values())}function So(t,e){return t.forEach(t=>{if(t instanceof oi)e.push({provide:t,useClass:t});else if(t&&"object"==typeof t&&void 0!==t.provide)e.push(t);else{if(!Array.isArray(t))throw Error(`Invalid provider - only instances of Provider and Type are allowed, got: ${t}`);So(t,e)}}),e}function ko(t){const e=Ao.parameters(t);if(!e)return[];if(e.some(t=>null==t))throw uo(t,e);return e.map(i=>Eo(t,i,e))}function Eo(t,e,i){let n=null,r=!1;if(!Array.isArray(e))return Do(e instanceof Ti?e.token:e,r,null);let s=null;for(let o=0;o<e.length;++o){const t=e[o];t instanceof oi?n=t:t instanceof Ti?n=t.token:t instanceof Ri?r=!0:t instanceof Vi||t instanceof Fi?s=t:t instanceof ri&&(n=t)}if(n=f(n),null!=n)return Do(n,r,s);throw uo(t,i)}function Do(t,e,i){return new bo(po.get(t),e,i)}const Io={};class Po{static resolve(t){return Co(t)}static resolveAndCreate(t,e){const i=Po.resolve(t);return Po.fromResolvedProviders(i,e)}static fromResolvedProviders(t,e){return new Oo(t,e)}}let Oo=(()=>{class t{constructor(t,e){this._constructionCounter=0,this._providers=t,this.parent=e||null;const i=t.length;this.keyIds=[],this.objs=[];for(let n=0;n<i;n++)this.keyIds[n]=t[n].key.id,this.objs[n]=Io}get(t,e=xi){return this._getByKey(po.get(t),null,e)}resolveAndCreateChild(t){const e=Po.resolve(t);return this.createChildFromResolved(e)}createChildFromResolved(e){const i=new t(e);return i.parent=this,i}resolveAndInstantiate(t){return this.instantiateResolved(Po.resolve([t])[0])}instantiateResolved(t){return this._instantiateProvider(t)}getProviderAtIndex(t){if(t<0||t>=this._providers.length)throw function(t){return Error(`Index ${t} is out-of-bounds.`)}(t);return this._providers[t]}_new(t){if(this._constructionCounter++>this._getMaxNumberOfObjects())throw co(this,t.key,function(t){return`Cannot instantiate cyclic dependency!${lo(t)}`});return this._instantiateProvider(t)}_getMaxNumberOfObjects(){return this.objs.length}_instantiateProvider(t){if(t.multiProvider){const e=[];for(let i=0;i<t.resolvedFactories.length;++i)e[i]=this._instantiate(t,t.resolvedFactories[i]);return e}return this._instantiate(t,t.resolvedFactories[0])}_instantiate(t,e){const i=e.factory;let n,r;try{n=e.dependencies.map(t=>this._getByReflectiveDependency(t))}catch(o){throw o.addKey&&o.addKey(this,t.key),o}try{r=i(...n)}catch(o){throw co(this,t.key,function(t){const e=h(t[0].token);return`${s.message}: Error during instantiation of ${e}!${lo(t)}.`},s=o)}var s;return r}_getByReflectiveDependency(t){return this._getByKey(t.key,t.visibility,t.optional?null:xi)}_getByKey(e,i,n){return e===t.INJECTOR_KEY?this:i instanceof Vi?this._getByKeySelf(e,n):this._getByKeyDefault(e,n,i)}_getObjByKeyId(t){for(let e=0;e<this.keyIds.length;e++)if(this.keyIds[e]===t)return this.objs[e]===Io&&(this.objs[e]=this._new(this._providers[e])),this.objs[e];return Io}_throwOrNull(t,e){if(e!==xi)return e;throw function(t,e){return co(t,e,function(t){return`No provider for ${h(t[0].token)}!${lo(t)}`})}(this,t)}_getByKeySelf(t,e){const i=this._getObjByKeyId(t.id);return i!==Io?i:this._throwOrNull(t,e)}_getByKeyDefault(e,i,n){let r;for(r=n instanceof Fi?this.parent:this;r instanceof t;){const t=r,i=t._getObjByKeyId(e.id);if(i!==Io)return i;r=t.parent}return null!==r?r.get(e.token,i):this._throwOrNull(e,i)}get displayName(){return`ReflectiveInjector(providers: [${function(t,e){const i=[];for(let n=0;n<t._providers.length;++n)i[n]=' "'+t.getProviderAtIndex(n).key.displayName+'" ';return i}(this).join(", ")}])`}toString(){return this.displayName}}return t.INJECTOR_KEY=po.get(js),t})();function Mo(t,e=I.Default){const i=jt();return null===i?Ii(t,e):Ke(Kt(),i,f(t),e)}function To(t,e,i){const n=jt();return to(n,Jt(),e)&&Qr(zt(),ge(),n,t,e,n[11],i,!1),To}function Ro(t,e,i,n,r){const s=r?"class":"style";ws(t,i,e.inputs[s],s,n)}function Vo(t,e,i,n){const r=jt(),s=zt(),o=20+t,a=r[11],l=r[o]=qn(a,e,Bt.lFrame.currentNamespace),c=s.firstCreatePass?function(t,e,i,n,r,s,o){const a=e.consts,l=Ur(e,t,2,r,Ft(a,s));return Xr(e,i,l,Ft(a,o)),null!==l.attrs&&Cs(l,l.attrs,!1),null!==l.mergedAttrs&&Cs(l,l.mergedAttrs,!0),null!==e.queries&&e.queries.elementStart(e,l),l}(o,s,r,0,e,i,n):s.data[o];Gt(c,!0);const h=c.mergedAttrs;null!==h&&ke(a,l,h);const u=c.classes;null!==u&&mr(a,l,u);const d=c.styles;null!==d&&fr(a,l,d),64!=(64&c.flags)&&ar(s,r,l,c),0===Bt.lFrame.elementDepthCount&&Fn(l,r),Bt.lFrame.elementDepthCount++,pt(c)&&($r(s,r,c),Kr(s,c,r)),null!==n&&Gr(r,c)}function Fo(){let t=Kt();Wt()?Zt():(t=t.parent,Gt(t,!1));const e=t;Bt.lFrame.elementDepthCount--;const i=zt();i.firstCreatePass&&(ve(i,t),ut(t)&&i.queries.elementEnd(t)),null!=e.classesWithoutHost&&function(t){return 0!=(16&t.flags)}(e)&&Ro(i,e,jt(),e.classesWithoutHost,!0),null!=e.stylesWithoutHost&&function(t){return 0!=(32&t.flags)}(e)&&Ro(i,e,jt(),e.stylesWithoutHost,!1)}function Lo(t,e,i,n){Vo(t,e,i,n),Fo()}function Uo(t,e,i){const n=jt(),r=zt(),s=t+20,o=r.firstCreatePass?function(t,e,i,n,r){const s=e.consts,o=Ft(s,n),a=Ur(e,t,8,"ng-container",o);return null!==o&&Cs(a,o,!0),Xr(e,i,a,Ft(s,r)),null!==e.queries&&e.queries.elementStart(e,a),a}(s,r,n,e,i):r.data[s];Gt(o,!0);const a=n[s]=n[11].createComment("");ar(r,n,a,o),Fn(a,n),pt(o)&&($r(r,n,o),Kr(r,o,n)),null!=i&&Gr(n,o)}function Bo(){let t=Kt();const e=zt();Wt()?Zt():(t=t.parent,Gt(t,!1)),e.firstCreatePass&&(ve(e,t),ut(t)&&e.queries.elementEnd(t))}function No(t,e,i){Uo(t,e,i),Bo()}function jo(){return jt()}function zo(t){return!!t&&"function"==typeof t.then}function Ho(t){return!!t&&"function"==typeof t.subscribe}const Ko=Ho;function $o(t,e,i=!1,n){const r=jt(),s=zt(),o=Kt();return Wo(s,r,r[11],o,t,e,i,n),$o}function Go(t,e,i=!1,n){const r=Kt(),s=jt(),o=zt();return Wo(o,s,_s(ne(o.data),r,s),r,t,e,i,n),Go}function Wo(t,e,i,n,r,s,o=!1,a){const l=pt(n),c=t.firstCreatePass&&vs(t),h=bs(e);let u=!0;if(3&n.type){const d=It(n,e),p=a?a(d):j,f=p.target||d,m=h.length,g=a?t=>a(Et(t[n.index])).target:n.index;if(St(i)){let o=null;if(!a&&l&&(o=function(t,e,i,n){const r=t.cleanup;if(null!=r)for(let s=0;s<r.length-1;s+=2){const t=r[s];if(t===i&&r[s+1]===n){const t=e[7],i=r[s+2];return t.length>i?t[i]:null}"string"==typeof t&&(s+=2)}return null}(t,e,r,n.index)),null!==o)(o.__ngLastListenerFn__||o).__ngNextListenerFn__=s,o.__ngLastListenerFn__=s,u=!1;else{s=qo(n,e,s,!1);const t=i.listen(p.name||f,r,s);h.push(s,t),c&&c.push(r,g,m,m+1)}}else s=qo(n,e,s,!0),f.addEventListener(r,s,o),h.push(s),c&&c.push(r,g,m,o)}else s=qo(n,e,s,!1);const d=n.outputs;let p;if(u&&null!==d&&(p=d[r])){const t=p.length;if(t)for(let i=0;i<t;i+=2){const t=e[p[i]][p[i+1]].subscribe(s),o=h.length;h.push(s,t),c&&c.push(r,n.index,o,-(o+1))}}}function Zo(t,e,i){try{return!1!==e(i)}catch(n){return ys(t,n),!1}}function qo(t,e,i,n){return function r(s){if(s===Function)return i;const o=2&t.flags?Mt(t.index,e):e;0==(32&e[2])&&ps(o);let a=Zo(e,i,s),l=r.__ngNextListenerFn__;for(;l;)a=Zo(e,l,s)&&a,l=l.__ngNextListenerFn__;return n&&!1===a&&(s.preventDefault(),s.returnValue=!1),a}}function Yo(t=1){return function(t){return(Bt.lFrame.contextLView=function(t,e){for(;t>0;)e=e[15],t--;return e}(t,Bt.lFrame.contextLView))[8]}(t)}function Qo(t,e){let i=null;const n=function(t){const e=t.attrs;if(null!=e){const t=e.indexOf(5);if(0==(1&t))return e[t+1]}return null}(t);for(let r=0;r<e.length;r++){const s=e[r];if("*"!==s){if(null===n?xr(t,s,!0):Cr(n,s))return r}else i=r}return i}function Xo(t){const e=jt()[16][6];if(!e.projection){const i=e.projection=di(t?t.length:1,null),n=i.slice();let r=e.child;for(;null!==r;){const e=t?Qo(r,t):0;null!==e&&(n[e]?n[e].projectionNext=r:i[e]=r,n[e]=r),r=r.next}}}function Jo(t,e=0,i){const n=jt(),r=zt(),s=Ur(r,20+t,16,null,i||null);null===s.projection&&(s.projection=e),Zt(),64!=(64&s.flags)&&function(t,e,i){pr(e[11],0,e,i,tr(t,i,e),sr(i.parent||e[6],i,e))}(r,n,s)}function ta(t,e,i){return ea(t,"",e,"",i),ta}function ea(t,e,i,n,r){const s=jt(),o=ro(s,e,i,n);return o!==Er&&Qr(zt(),ge(),s,t,o,s[11],r,!1),ea}function ia(t,e,i,n,r,s,o){const a=jt(),l=so(a,e,i,n,r,s);return l!==Er&&Qr(zt(),ge(),a,t,l,a[11],o,!1),ia}function na(t,e,i,n,r){const s=t[i+1],o=null===e;let a=n?Or(s):Tr(s),l=!1;for(;0!==a&&(!1===l||o);){const i=t[a+1];ra(t[a],e)&&(l=!0,t[a+1]=n?Vr(i):Mr(i)),a=n?Or(i):Tr(i)}l&&(t[i+1]=n?Mr(s):Vr(s))}function ra(t,e){return null===t||null==e||(Array.isArray(t)?t[1]:t)===e||!(!Array.isArray(t)||"string"!=typeof e)&&mi(t,e)>=0}const sa={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function oa(t){return t.substring(sa.key,sa.keyEnd)}function aa(t,e){const i=sa.textEnd;return i===e?-1:(e=sa.keyEnd=function(t,e,i){for(;e<i&&t.charCodeAt(e)>32;)e++;return e}(t,sa.key=e,i),la(t,e,i))}function la(t,e,i){for(;e<i&&t.charCodeAt(e)<=32;)e++;return e}function ca(t,e,i){return pa(t,e,i,!1),ca}function ha(t,e){return pa(t,e,null,!0),ha}function ua(t){fa(pi,da,t,!0)}function da(t,e){for(let i=function(t){return function(t){sa.key=0,sa.keyEnd=0,sa.value=0,sa.valueEnd=0,sa.textEnd=t.length}(t),aa(t,la(t,0,sa.textEnd))}(e);i>=0;i=aa(e,i))pi(t,oa(e),!0)}function pa(t,e,i,n){const r=jt(),s=zt(),o=te(2);s.firstUpdatePass&&ga(s,t,o,n),e!==Er&&to(r,o,e)&&va(s,s.data[fe()],r,r[11],t,r[o+1]=function(t,e){return null==t||("string"==typeof e?t+=e:"object"==typeof t&&(t=h(qi(t)))),t}(e,i),n,o)}function fa(t,e,i,n){const r=zt(),s=te(2);r.firstUpdatePass&&ga(r,null,s,n);const o=jt();if(i!==Er&&to(o,s,i)){const a=r.data[fe()];if(wa(a,n)&&!ma(r,s)){let t=n?a.classesWithoutHost:a.stylesWithoutHost;null!==t&&(i=u(t,i||"")),Ro(r,a,o,i,n)}else!function(t,e,i,n,r,s,o,a){r===Er&&(r=z);let l=0,c=0,h=0<r.length?r[0]:null,u=0<s.length?s[0]:null;for(;null!==h||null!==u;){const d=l<r.length?r[l+1]:void 0,p=c<s.length?s[c+1]:void 0;let f,m=null;h===u?(l+=2,c+=2,d!==p&&(m=u,f=p)):null===u||null!==h&&h<u?(l+=2,m=h):(c+=2,m=u,f=p),null!==m&&va(t,e,i,n,m,f,o,a),h=l<r.length?r[l]:null,u=c<s.length?s[c]:null}}(r,a,o,o[11],o[s+1],o[s+1]=function(t,e,i){if(null==i||""===i)return z;const n=[],r=qi(i);if(Array.isArray(r))for(let s=0;s<r.length;s++)t(n,r[s],!0);else if("object"==typeof r)for(const s in r)r.hasOwnProperty(s)&&t(n,s,r[s]);else"string"==typeof r&&e(n,r);return n}(t,e,i),n,s)}}function ma(t,e){return e>=t.expandoStartIndex}function ga(t,e,i,n){const r=t.data;if(null===r[i+1]){const s=r[fe()],o=ma(t,i);wa(s,n)&&null===e&&!o&&(e=!1),e=function(t,e,i,n){const r=ne(t);let s=n?e.residualClasses:e.residualStyles;if(null===r)0===(n?e.classBindings:e.styleBindings)&&(i=ba(i=Aa(null,t,e,i,n),e.attrs,n),s=null);else{const o=e.directiveStylingLast;if(-1===o||t[o]!==r)if(i=Aa(r,t,e,i,n),null===s){let i=function(t,e,i){const n=i?e.classBindings:e.styleBindings;if(0!==Tr(n))return t[Or(n)]}(t,e,n);void 0!==i&&Array.isArray(i)&&(i=Aa(null,t,e,i[1],n),i=ba(i,e.attrs,n),function(t,e,i,n){t[Or(i?e.classBindings:e.styleBindings)]=n}(t,e,n,i))}else s=function(t,e,i){let n;const r=e.directiveEnd;for(let s=1+e.directiveStylingLast;s<r;s++)n=ba(n,t[s].hostAttrs,i);return ba(n,e.attrs,i)}(t,e,n)}return void 0!==s&&(n?e.residualClasses=s:e.residualStyles=s),i}(r,s,e,n),function(t,e,i,n,r,s){let o=s?e.classBindings:e.styleBindings,a=Or(o),l=Tr(o);t[n]=i;let c,h=!1;if(Array.isArray(i)){const t=i;c=t[1],(null===c||mi(t,c)>0)&&(h=!0)}else c=i;if(r)if(0!==l){const e=Or(t[a+1]);t[n+1]=Pr(e,a),0!==e&&(t[e+1]=Rr(t[e+1],n)),t[a+1]=131071&t[a+1]|n<<17}else t[n+1]=Pr(a,0),0!==a&&(t[a+1]=Rr(t[a+1],n)),a=n;else t[n+1]=Pr(l,0),0===a?a=n:t[l+1]=Rr(t[l+1],n),l=n;h&&(t[n+1]=Mr(t[n+1])),na(t,c,n,!0),na(t,c,n,!1),function(t,e,i,n,r){const s=r?t.residualClasses:t.residualStyles;null!=s&&"string"==typeof e&&mi(s,e)>=0&&(i[n+1]=Vr(i[n+1]))}(e,c,t,n,s),o=Pr(a,l),s?e.classBindings=o:e.styleBindings=o}(r,s,e,i,o,n)}}function Aa(t,e,i,n,r){let s=null;const o=i.directiveEnd;let a=i.directiveStylingLast;for(-1===a?a=i.directiveStart:a++;a<o&&(s=e[a],n=ba(n,s.hostAttrs,r),s!==t);)a++;return null!==t&&(i.directiveStylingLast=a),n}function ba(t,e,i){const n=i?1:2;let r=-1;if(null!==e)for(let s=0;s<e.length;s++){const o=e[s];"number"==typeof o?r=o:r===n&&(Array.isArray(t)||(t=void 0===t?[]:["",t]),pi(t,o,!!i||e[++s]))}return void 0===t?null:t}function va(t,e,i,n,r,s,o,a){if(!(3&e.type))return;const l=t.data,c=l[a+1];ya(1==(1&c)?_a(l,e,i,r,Tr(c),o):void 0)||(ya(s)||2==(2&c)&&(s=_a(l,null,i,r,a,o)),function(t,e,i,n,r){const s=St(t);if(e)r?s?t.addClass(i,n):i.classList.add(n):s?t.removeClass(i,n):i.classList.remove(n);else{let e=-1===n.indexOf("-")?void 0:zn.DashCase;if(null==r)s?t.removeStyle(i,n,e):i.style.removeProperty(n);else{const o="string"==typeof r&&r.endsWith("!important");o&&(r=r.slice(0,-10),e|=zn.Important),s?t.setStyle(i,n,r,e):i.style.setProperty(n,r,o?"important":"")}}}(n,o,Dt(fe(),i),r,s))}function _a(t,e,i,n,r,s){const o=null===e;let a;for(;r>0;){const e=t[r],s=Array.isArray(e),l=s?e[1]:e,c=null===l;let h=i[r+1];h===Er&&(h=c?z:void 0);let u=c?fi(h,n):l===n?h:void 0;if(s&&!ya(u)&&(u=fi(e,n)),ya(u)&&(a=u,o))return a;const d=t[r+1];r=o?Or(d):Tr(d)}if(null!==e){let t=s?e.residualClasses:e.residualStyles;null!=t&&(a=fi(t,n))}return a}function ya(t){return void 0!==t}function wa(t,e){return 0!=(t.flags&(e?16:32))}function xa(t,e=""){const i=jt(),n=zt(),r=t+20,s=n.firstCreatePass?Ur(n,r,1,e,null):n.data[r],o=i[r]=function(t,e){return St(t)?t.createText(e):t.createTextNode(e)}(i[11],e);ar(n,i,o,s),Gt(s,!1)}function Ca(t){return Sa("",t,""),Ca}function Sa(t,e,i){const n=jt(),r=ro(n,t,e,i);return r!==Er&&xs(n,fe(),r),Sa}function ka(t,e,i,n,r){const s=jt(),o=so(s,t,e,i,n,r);return o!==Er&&xs(s,fe(),o),ka}function Ea(t,e,i,n,r,s,o){const a=jt(),l=function(t,e,i,n,r,s,o,a){const l=io(t,Xt(),i,r,o);return te(3),l?e+A(i)+n+A(r)+s+A(o)+a:Er}(a,t,e,i,n,r,s,o);return l!==Er&&xs(a,fe(),l),Ea}function Da(t,e,i){fa(pi,da,ro(jt(),t,e,i),!0)}function Ia(t,e,i){const n=jt();return to(n,Jt(),e)&&Qr(zt(),ge(),n,t,e,n[11],i,!0),Ia}function Pa(t,e,i){const n=jt();if(to(n,Jt(),e)){const r=zt(),s=ge();Qr(r,s,n,t,e,_s(ne(r.data),s,n),i,!0)}return Pa}const Oa=void 0;var Ma=["en",[["a","p"],["AM","PM"],Oa],[["AM","PM"],Oa,Oa],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Oa,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Oa,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",Oa,"{1} 'at' {0}",Oa],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(t){let e=Math.floor(Math.abs(t)),i=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===i?1:5}];let Ta={};function Ra(t,e,i){"string"!=typeof e&&(i=e,e=t[Ba.LocaleId]),e=e.toLowerCase().replace(/_/g,"-"),Ta[e]=t,i&&(Ta[e][Ba.ExtraData]=i)}function Va(t){const e=function(t){return t.toLowerCase().replace(/_/g,"-")}(t);let i=Ua(e);if(i)return i;const n=e.split("-")[0];if(i=Ua(n),i)return i;if("en"===n)return Ma;throw new Error(`Missing locale data for the locale "${t}".`)}function Fa(t){return Va(t)[Ba.CurrencyCode]||null}function La(t){return Va(t)[Ba.PluralCase]}function Ua(t){return t in Ta||(Ta[t]=N.ng&&N.ng.common&&N.ng.common.locales&&N.ng.common.locales[t]),Ta[t]}var Ba=function(t){return t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData",t}({});let Na="en-US";function ja(t){var e,i;i="Expected localeId to be defined",null==(e=t)&&function(t,e,i,n){throw new Error(`ASSERTION ERROR: ${t} [Expected=> null != ${e} <=Actual]`)}(i,e),"string"==typeof t&&(Na=t.toLowerCase().replace(/_/g,"-"))}function za(t,e,i,n,r){if(t=f(t),Array.isArray(t))for(let s=0;s<t.length;s++)za(t[s],e,i,n,r);else{const s=zt(),o=jt();let a=Bs(t)?t:f(t.provide),l=Fs(t);const c=Kt(),h=1048575&c.providerIndexes,u=c.directiveStart,d=c.providerIndexes>>20;if(Bs(t)||!t.multi){const n=new Se(l,r,Mo),p=$a(a,e,r?h:h+d,u);-1===p?(je(Le(c,o),s,a),Ha(s,t,e.length),e.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),i.push(n),o.push(n)):(i[p]=n,o[p]=n)}else{const p=$a(a,e,h+d,u),f=$a(a,e,h,h+d),m=p>=0&&i[p],g=f>=0&&i[f];if(r&&!g||!r&&!m){je(Le(c,o),s,a);const h=function(t,e,i,n,r){const s=new Se(t,i,Mo);return s.multi=[],s.index=e,s.componentProviders=0,Ka(s,r,n&&!i),s}(r?Wa:Ga,i.length,r,n,l);!r&&g&&(i[f].providerFactory=h),Ha(s,t,e.length,0),e.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),i.push(h),o.push(h)}else Ha(s,t,p>-1?p:f,Ka(i[r?f:p],l,!r&&n));!r&&n&&g&&i[f].componentProviders++}}}function Ha(t,e,i,n){const r=Bs(e);if(r||e.useClass){const s=(e.useClass||e).prototype.ngOnDestroy;if(s){const o=t.destroyHooks||(t.destroyHooks=[]);if(!r&&e.multi){const t=o.indexOf(i);-1===t?o.push(i,[n,s]):o[t+1].push(n,s)}else o.push(i,s)}}}function Ka(t,e,i){return i&&t.componentProviders++,t.multi.push(e)-1}function $a(t,e,i,n){for(let r=i;r<n;r++)if(e[r]===t)return r;return-1}function Ga(t,e,i,n){return Za(this.multi,[])}function Wa(t,e,i,n){const r=this.multi;let s;if(this.providerFactory){const t=this.providerFactory.componentProviders,e=qe(i,i[1],this.providerFactory.index,n);s=e.slice(0,t),Za(r,s);for(let i=t;i<e.length;i++)s.push(e[i])}else s=[],Za(r,s);return s}function Za(t,e){for(let i=0;i<t.length;i++)e.push((0,t[i])());return e}function qa(t,e=[]){return i=>{i.providersResolver=(i,n)=>function(t,e,i){const n=zt();if(n.firstCreatePass){const r=ft(t);za(i,n.data,n.blueprint,r,!0),za(e,n.data,n.blueprint,r,!1)}}(i,n?n(t):t,e)}}class Ya{}class Qa{resolveComponentFactory(t){throw function(t){const e=Error(`No component factory found for ${h(t)}. Did you add it to @NgModule.entryComponents?`);return e.ngComponent=t,e}(t)}}let Xa=(()=>{class t{}return t.NULL=new Qa,t})();function Ja(...t){}function tl(t,e){return new il(It(t,e))}const el=function(){return tl(Kt(),jt())};let il=(()=>{class t{constructor(t){this.nativeElement=t}}return t.__NG_ELEMENT_ID__=el,t})();function nl(t){return t instanceof il?t.nativeElement:t}class rl{}let sl=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>ol(),t})();const ol=function(){const t=jt(),e=Mt(Kt().index,t);return function(t){return t[11]}(ct(e)?e:t)};let al=(()=>{class t{}return t.\u0275prov=_({token:t,providedIn:"root",factory:()=>null}),t})();class ll{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const cl=new ll("11.2.6");class hl{constructor(){}supports(t){return Qs(t)}create(t){return new dl(t)}}const ul=(t,e)=>e;class dl{constructor(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||ul}forEachItem(t){let e;for(e=this._itHead;null!==e;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,i=this._removalsHead,n=0,r=null;for(;e||i;){const s=!i||e&&e.currentIndex<gl(i,n,r)?e:i,o=gl(s,n,r),a=s.currentIndex;if(s===i)n--,i=i._nextRemoved;else if(e=e._next,null==s.previousIndex)n++;else{r||(r=[]);const t=o-n,e=a-n;if(t!=e){for(let i=0;i<t;i++){const n=i<r.length?r[i]:r[i]=0,s=n+i;e<=s&&s<t&&(r[i]=n+1)}r[s.previousIndex]=e-t}}o!==a&&t(s,o,a)}}forEachPreviousItem(t){let e;for(e=this._previousItHead;null!==e;e=e._nextPrevious)t(e)}forEachAddedItem(t){let e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)}forEachMovedItem(t){let e;for(e=this._movesHead;null!==e;e=e._nextMoved)t(e)}forEachRemovedItem(t){let e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)}forEachIdentityChange(t){let e;for(e=this._identityChangesHead;null!==e;e=e._nextIdentityChange)t(e)}diff(t){if(null==t&&(t=[]),!Qs(t))throw new Error(`Error trying to diff '${h(t)}'. Only arrays and iterables are allowed`);return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let e,i,n,r=this._itHead,s=!1;if(Array.isArray(t)){this.length=t.length;for(let e=0;e<this.length;e++)i=t[e],n=this._trackByFn(e,i),null!==r&&Object.is(r.trackById,n)?(s&&(r=this._verifyReinsertion(r,i,n,e)),Object.is(r.item,i)||this._addIdentityChange(r,i)):(r=this._mismatch(r,i,n,e),s=!0),r=r._next}else e=0,function(t,e){if(Array.isArray(t))for(let i=0;i<t.length;i++)e(t[i]);else{const i=t[qs()]();let n;for(;!(n=i.next()).done;)e(n.value)}}(t,t=>{n=this._trackByFn(e,t),null!==r&&Object.is(r.trackById,n)?(s&&(r=this._verifyReinsertion(r,t,n,e)),Object.is(r.item,t)||this._addIdentityChange(r,t)):(r=this._mismatch(r,t,n,e),s=!0),r=r._next,e++}),this.length=e;return this._truncate(r),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,e,i,n){let r;return null===t?r=this._itTail:(r=t._prev,this._remove(t)),null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,r,n)):null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(i,n))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,r,n)):t=this._addAfter(new pl(e,i),r,n),t}_verifyReinsertion(t,e,i,n){let r=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==r?t=this._reinsertAfter(r,t._prev,n):t.currentIndex!=n&&(t.currentIndex=n,this._addToMoves(t,n)),t}_truncate(t){for(;null!==t;){const e=t._next;this._addToRemovals(this._unlink(t)),t=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(t,e,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const n=t._prevRemoved,r=t._nextRemoved;return null===n?this._removalsHead=r:n._nextRemoved=r,null===r?this._removalsTail=n:r._prevRemoved=n,this._insertAfter(t,e,i),this._addToMoves(t,i),t}_moveAfter(t,e,i){return this._unlink(t),this._insertAfter(t,e,i),this._addToMoves(t,i),t}_addAfter(t,e,i){return this._insertAfter(t,e,i),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,e,i){const n=null===e?this._itHead:e._next;return t._next=n,t._prev=e,null===n?this._itTail=t:n._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new ml),this._linkedRecords.put(t),t.currentIndex=i,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const e=t._prev,i=t._next;return null===e?this._itHead=i:e._next=i,null===i?this._itTail=e:i._prev=e,t}_addToMoves(t,e){return t.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new ml),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,e){return t.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}}class pl{constructor(t,e){this.item=t,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class fl{constructor(){this._head=null,this._tail=null}add(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,e){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===e||e<=i.currentIndex)&&Object.is(i.trackById,t))return i;return null}remove(t){const e=t._prevDup,i=t._nextDup;return null===e?this._head=i:e._nextDup=i,null===i?this._tail=e:i._prevDup=e,null===this._head}}class ml{constructor(){this.map=new Map}put(t){const e=t.trackById;let i=this.map.get(e);i||(i=new fl,this.map.set(e,i)),i.add(t)}get(t,e){const i=this.map.get(t);return i?i.get(t,e):null}remove(t){const e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function gl(t,e,i){const n=t.previousIndex;if(null===n)return n;let r=0;return i&&n<i.length&&(r=i[n]),n+e+r}class Al{constructor(){}supports(t){return t instanceof Map||Xs(t)}create(){return new bl}}class bl{constructor(){this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}get isDirty(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead}forEachItem(t){let e;for(e=this._mapHead;null!==e;e=e._next)t(e)}forEachPreviousItem(t){let e;for(e=this._previousMapHead;null!==e;e=e._nextPrevious)t(e)}forEachChangedItem(t){let e;for(e=this._changesHead;null!==e;e=e._nextChanged)t(e)}forEachAddedItem(t){let e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)}forEachRemovedItem(t){let e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)}diff(t){if(t){if(!(t instanceof Map||Xs(t)))throw new Error(`Error trying to diff '${h(t)}'. Only maps and objects are allowed`)}else t=new Map;return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let e=this._mapHead;if(this._appendAfter=null,this._forEach(t,(t,i)=>{if(e&&e.key===i)this._maybeAddToChanges(e,t),this._appendAfter=e,e=e._next;else{const n=this._getOrCreateRecordForKey(i,t);e=this._insertBeforeOrAppend(e,n)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let t=e;null!==t;t=t._nextRemoved)t===this._mapHead&&(this._mapHead=null),this._records.delete(t.key),t._nextRemoved=t._next,t.previousValue=t.currentValue,t.currentValue=null,t._prev=null,t._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,e){if(t){const i=t._prev;return e._next=t,e._prev=i,t._prev=e,i&&(i._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(t,e){if(this._records.has(t)){const i=this._records.get(t);this._maybeAddToChanges(i,e);const n=i._prev,r=i._next;return n&&(n._next=r),r&&(r._prev=n),i._next=null,i._prev=null,i}const i=new vl(t);return this._records.set(t,i),i.currentValue=e,this._addToAdditions(i),i}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,e){Object.is(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))}_addToAdditions(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(i=>e(t[i],i))}}class vl{constructor(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function _l(){return new yl([new hl])}let yl=(()=>{class t{constructor(t){this.factories=t}static create(e,i){if(null!=i){const t=i.factories.slice();e=e.concat(t)}return new t(e)}static extend(e){return{provide:t,useFactory:i=>t.create(e,i||_l()),deps:[[t,new Fi,new Ri]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(null!=e)return e;throw new Error(`Cannot find a differ supporting object '${t}' of type '${i=t,i.name||typeof i}'`);var i}}return t.\u0275prov=_({token:t,providedIn:"root",factory:_l}),t})();function wl(){return new xl([new Al])}let xl=(()=>{class t{constructor(t){this.factories=t}static create(e,i){if(i){const t=i.factories.slice();e=e.concat(t)}return new t(e)}static extend(e){return{provide:t,useFactory:i=>t.create(e,i||wl()),deps:[[t,new Fi,new Ri]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(e)return e;throw new Error(`Cannot find a differ supporting object '${t}'`)}}return t.\u0275prov=_({token:t,providedIn:"root",factory:wl}),t})();function Cl(t,e,i,n,r=!1){for(;null!==i;){const s=e[i.index];if(null!==s&&n.push(Et(s)),ht(s))for(let t=10;t<s.length;t++){const e=s[t],i=e[1].firstChild;null!==i&&Cl(e[1],e,i,n)}const o=i.type;if(8&o)Cl(t,e,i.child,n);else if(32&o){const t=Hn(i,e);let r;for(;r=t();)n.push(r)}else if(16&o){const t=cr(e,i);if(Array.isArray(t))n.push(...t);else{const i=Kn(e[16]);Cl(i[1],i,t,n,!0)}}i=r?i.projectionNext:i.next}return n}class Sl{constructor(t,e){this._lView=t,this._cdRefInjectingView=e,this._appRef=null,this._attachedToViewContainer=!1}get rootNodes(){const t=this._lView,e=t[1];return Cl(e,t,e.firstChild,[])}get context(){return this._lView[8]}get destroyed(){return 256==(256&this._lView[2])}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){const t=this._lView[3];if(ht(t)){const e=t[8],i=e?e.indexOf(this):-1;i>-1&&(Qn(t,i),ui(e,i))}this._attachedToViewContainer=!1}Xn(this._lView[1],this._lView)}onDestroy(t){qr(this._lView[1],this._lView,null,t)}markForCheck(){ps(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){fs(this._lView[1],this._lView,this.context)}checkNoChanges(){!function(t,e,i){Yt(!0);try{fs(t,e,i)}finally{Yt(!1)}}(this._lView[1],this._lView,this.context)}attachToViewContainerRef(){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._attachedToViewContainer=!0}detachFromAppRef(){var t;this._appRef=null,dr(this._lView[1],t=this._lView,t[11],2,null,null)}attachToAppRef(t){if(this._attachedToViewContainer)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t}}class kl extends Sl{constructor(t){super(t),this._view=t}detectChanges(){ms(this._view)}checkNoChanges(){!function(t){Yt(!0);try{ms(t)}finally{Yt(!1)}}(this._view)}get context(){return null}}const El=Il;let Dl=(()=>{class t{}return t.__NG_ELEMENT_ID__=El,t.__ChangeDetectorRef__=!0,t})();function Il(t=!1){return function(t,e,i){if(!i&&dt(t)){const i=Mt(t.index,e);return new Sl(i,i)}return 47&t.type?new Sl(e[16],e):null}(Kt(),jt(),t)}const Pl=[new Al],Ol=new yl([new hl]),Ml=new xl(Pl),Tl=function(){return Ll(Kt(),jt())};let Rl=(()=>{class t{}return t.__NG_ELEMENT_ID__=Tl,t})();const Vl=Rl,Fl=class extends Vl{constructor(t,e,i){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=i}createEmbeddedView(t){const e=this._declarationTContainer.tViews,i=Lr(this._declarationLView,e,t,16,null,e.declTNode,null,null,null,null);i[17]=this._declarationLView[this._declarationTContainer.index];const n=this._declarationLView[19];return null!==n&&(i[19]=n.createEmbeddedView(e)),Nr(e,i,t),new Sl(i)}};function Ll(t,e){return 4&t.type?new Fl(e,t,tl(t,e)):null}class Ul{}class Bl{}const Nl=function(){return Gl(Kt(),jt())};let jl=(()=>{class t{}return t.__NG_ELEMENT_ID__=Nl,t})();const zl=jl,Hl=class extends zl{constructor(t,e,i){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=i}get element(){return tl(this._hostTNode,this._hostLView)}get injector(){return new Xe(this._hostTNode,this._hostLView)}get parentInjector(){const t=Ne(this._hostTNode,this._hostLView);if(Oe(t)){const e=Te(t,this._hostLView),i=Me(t);return new Xe(e[1].data[i+8],e)}return new Xe(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=Kl(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-10}createEmbeddedView(t,e,i){const n=t.createEmbeddedView(e||{});return this.insert(n,i),n}createComponent(t,e,i,n,r){const s=i||this.parentInjector;if(!r&&null==t.ngModule&&s){const t=s.get(Ul,null);t&&(r=t)}const o=t.create(s,n,void 0,r);return this.insert(o.hostView,e),o}insert(t,e){const i=t._lView,n=i[1];if(ht(i[3])){const e=this.indexOf(t);if(-1!==e)this.detach(e);else{const e=i[3],n=new Hl(e,e[6],e[3]);n.detach(n.indexOf(t))}}const r=this._adjustIndex(e),s=this._lContainer;!function(t,e,i,n){const r=10+n,s=i.length;n>0&&(i[r-1][4]=e),n<s-10?(e[4]=i[r],hi(i,10+n,e)):(i.push(e),e[4]=null),e[3]=i;const o=e[17];null!==o&&i!==o&&function(t,e){const i=t[9];e[16]!==e[3][3][16]&&(t[2]=!0),null===i?t[9]=[e]:i.push(e)}(o,e);const a=e[19];null!==a&&a.insertView(t),e[2]|=128}(n,i,s,r);const o=hr(r,s),a=i[11],l=rr(a,s[7]);return null!==l&&function(t,e,i,n,r,s){n[0]=r,n[6]=e,dr(t,n,i,1,r,s)}(n,s[6],a,i,l,o),t.attachToViewContainerRef(),hi($l(s),r,t),t}move(t,e){return this.insert(t,e)}indexOf(t){const e=Kl(this._lContainer);return null!==e?e.indexOf(t):-1}remove(t){const e=this._adjustIndex(t,-1),i=Qn(this._lContainer,e);i&&(ui($l(this._lContainer),e),Xn(i[1],i))}detach(t){const e=this._adjustIndex(t,-1),i=Qn(this._lContainer,e);return i&&null!=ui($l(this._lContainer),e)?new Sl(i):null}_adjustIndex(t,e=0){return null==t?this.length+e:t}};function Kl(t){return t[8]}function $l(t){return t[8]||(t[8]=[])}function Gl(t,e){let i;const n=e[t.index];if(ht(n))i=n;else{let r;if(8&t.type)r=Et(n);else{const i=e[11];r=i.createComment("");const n=It(t,e);er(i,rr(i,n),r,function(t,e){return St(t)?t.nextSibling(e):e.nextSibling}(i,n),!1)}e[t.index]=i=ls(n,e,r,t),ds(e,i)}return new Hl(i,t,e)}const Wl={};class Zl extends Xa{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=at(t);return new Ql(e,this.ngModule)}}function ql(t){const e=[];for(let i in t)t.hasOwnProperty(i)&&e.push({propName:t[i],templateName:i});return e}const Yl=new ri("SCHEDULER_TOKEN",{providedIn:"root",factory:()=>Ln});class Ql extends Ya{constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=t.selectors.map(kr).join(","),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}get inputs(){return ql(this.componentDef.inputs)}get outputs(){return ql(this.componentDef.outputs)}create(t,e,i,n){const r=(n=n||this.ngModule)?function(t,e){return{get:(i,n,r)=>{const s=t.get(i,Wl,r);return s!==Wl||n===Wl?s:e.get(i,n,r)}}}(t,n.injector):t,s=r.get(rl,kt),o=r.get(al,null),a=s.createRenderer(null,this.componentDef),l=this.componentDef.selectors[0][0]||"div",c=i?function(t,e,i){if(St(t))return t.selectRootElement(e,i===V.ShadowDom);let n="string"==typeof e?t.querySelector(e):e;return n.textContent="",n}(a,i,this.componentDef.encapsulation):qn(s.createRenderer(null,this.componentDef),l,function(t){const e=t.toLowerCase();return"svg"===e?"http://www.w3.org/2000/svg":"math"===e?"http://www.w3.org/1998/MathML/":null}(l)),h=this.componentDef.onPush?576:528,u={components:[],scheduler:Ln,clean:As,playerHandler:null,flags:0},d=Zr(0,null,null,1,0,null,null,null,null,null),p=Lr(null,d,u,h,null,null,s,a,o,r);let f,m;le(p);try{const t=function(t,e,i,n,r,s){const o=i[1];i[20]=t;const a=Ur(o,20,2,"#host",null),l=a.mergedAttrs=e.hostAttrs;null!==l&&(Cs(a,l,!0),null!==t&&(ke(r,t,l),null!==a.classes&&mr(r,t,a.classes),null!==a.styles&&fr(r,t,a.styles)));const c=n.createRenderer(t,e),h=Lr(i,Wr(e),null,e.onPush?64:16,i[20],a,n,c,null,null);return o.firstCreatePass&&(je(Le(a,i),o,e.type),es(o,a),ns(a,i.length,1)),ds(i,h),i[20]=h}(c,this.componentDef,p,s,a);if(c)if(i)ke(a,c,["ng-version",cl.full]);else{const{attrs:t,classes:e}=function(t){const e=[],i=[];let n=1,r=2;for(;n<t.length;){let s=t[n];if("string"==typeof s)2===r?""!==s&&e.push(s,t[++n]):8===r&&i.push(s);else{if(!yr(r))break;r=s}n++}return{attrs:e,classes:i}}(this.componentDef.selectors[0]);t&&ke(a,c,t),e&&e.length>0&&mr(a,c,e.join(" "))}if(m=Pt(d,20),void 0!==e){const t=m.projection=[];for(let i=0;i<this.ngContentSelectors.length;i++){const n=e[i];t.push(null!=n?Array.from(n):null)}}f=function(t,e,i,n,r){const s=i[1],o=function(t,e,i){const n=Kt();t.firstCreatePass&&(i.providersResolver&&i.providersResolver(i),rs(t,n,e,Br(t,e,1,null),i));const r=qe(e,t,n.directiveStart,n);Fn(r,e);const s=It(n,e);return s&&Fn(s,e),r}(s,i,e);if(n.components.push(o),t[8]=o,r&&r.forEach(t=>t(o,e)),e.contentQueries){const t=Kt();e.contentQueries(1,o,t.directiveStart)}const a=Kt();return!s.firstCreatePass||null===e.hostBindings&&null===e.hostAttrs||(me(a.index),Jr(i[1],a,0,a.directiveStart,a.directiveEnd,e),ts(e,o)),o}(t,this.componentDef,p,u,[zs]),Nr(d,p,null)}finally{pe()}return new Xl(this.componentType,f,tl(m,p),p,m)}}class Xl extends class{}{constructor(t,e,i,n,r){super(),this.location=i,this._rootLView=n,this._tNode=r,this.instance=e,this.hostView=this.changeDetectorRef=new kl(n),this.componentType=t}get injector(){return new Xe(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(t){this.hostView.onDestroy(t)}}const Jl=new Map;class tc extends Ul{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new Zl(this);const i=lt(t),n=t[Z]||null;n&&ja(n),this._bootstrapComponents=jn(i.bootstrap),this._r3Injector=Ts(t,e,[{provide:Ul,useValue:this},{provide:Xa,useValue:this.componentFactoryResolver}],h(t)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(t)}get(t,e=js.THROW_IF_NOT_FOUND,i=I.Default){return t===js||t===Ul||t===Ss?this:this._r3Injector.get(t,e,i)}destroy(){const t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class ec extends Bl{constructor(t){super(),this.moduleType=t,null!==lt(t)&&function(t){const e=new Set;!function t(i){const n=lt(i,!0),r=n.id;null!==r&&(function(t,e,i){if(e&&e!==i)throw new Error(`Duplicate module registered for ${t} - ${h(e)} vs ${h(e.name)}`)}(r,Jl.get(r),i),Jl.set(r,i));const s=jn(n.imports);for(const o of s)e.has(o)||(e.add(o),t(o))}(t)}(t)}create(t){return new tc(this.moduleType,t)}}function ic(t,e,i){const n=Qt()+t,r=jt();return r[n]===Er?Js(r,n,i?e.call(i):e()):function(t,e){return t[e]}(r,n)}function nc(t,e,i,n){return ac(jt(),Qt(),t,e,i,n)}function rc(t,e,i,n,r){return lc(jt(),Qt(),t,e,i,n,r)}function sc(t,e,i,n,r,s){return cc(jt(),Qt(),t,e,i,n,r,s)}function oc(t,e){const i=t[e];return i===Er?void 0:i}function ac(t,e,i,n,r,s){const o=e+i;return to(t,o,r)?Js(t,o+1,s?n.call(s,r):n(r)):oc(t,o+1)}function lc(t,e,i,n,r,s,o){const a=e+i;return eo(t,a,r,s)?Js(t,a+2,o?n.call(o,r,s):n(r,s)):oc(t,a+2)}function cc(t,e,i,n,r,s,o,a){const l=e+i;return io(t,l,r,s,o)?Js(t,l+3,a?n.call(a,r,s,o):n(r,s,o)):oc(t,l+3)}function hc(t,e){const i=zt();let n;const r=t+20;i.firstCreatePass?(n=function(t,e){if(e)for(let i=e.length-1;i>=0;i--){const n=e[i];if(t===n.name)return n}throw new g("302",`The pipe '${t}' could not be found!`)}(e,i.pipeRegistry),i.data[r]=n,n.onDestroy&&(i.destroyHooks||(i.destroyHooks=[])).push(r,n.onDestroy)):n=i.data[r];const s=n.factory||(n.factory=mt(n.type)),o=O(Mo);try{const t=Ve(!1),e=s();return Ve(t),function(t,e,i,n){i>=t.data.length&&(t.data[i]=null,t.blueprint[i]=null),e[i]=n}(i,jt(),r,e),e}finally{O(o)}}function uc(t,e,i){const n=t+20,r=jt(),s=Ot(r,n);return mc(r,fc(r,n)?ac(r,Qt(),e,s.transform,i,s):s.transform(i))}function dc(t,e,i,n){const r=t+20,s=jt(),o=Ot(s,r);return mc(s,fc(s,r)?lc(s,Qt(),e,o.transform,i,n,o):o.transform(i,n))}function pc(t,e,i,n,r){const s=t+20,o=jt(),a=Ot(o,s);return mc(o,fc(o,s)?cc(o,Qt(),e,a.transform,i,n,r,a):a.transform(i,n,r))}function fc(t,e){return t[1].data[e].pure}function mc(t,e){return Ys.isWrapped(e)&&(e=Ys.unwrap(e),t[Xt()]=Er),e}const gc=class extends n.a{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,e,i){let n,s=t=>null,o=()=>null;t&&"object"==typeof t?(n=this.__isAsync?e=>{setTimeout(()=>t.next(e))}:e=>{t.next(e)},t.error&&(s=this.__isAsync?e=>{setTimeout(()=>t.error(e))}:e=>{t.error(e)}),t.complete&&(o=this.__isAsync?()=>{setTimeout(()=>t.complete())}:()=>{t.complete()})):(n=this.__isAsync?e=>{setTimeout(()=>t(e))}:e=>{t(e)},e&&(s=this.__isAsync?t=>{setTimeout(()=>e(t))}:t=>{e(t)}),i&&(o=this.__isAsync?()=>{setTimeout(()=>i())}:()=>{i()}));const a=super.subscribe(n,s,o);return t instanceof r.a&&t.add(a),a}};function Ac(){return this._results[qs()]()}class bc{constructor(t=!1){this._emitDistinctChangesOnly=t,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const e=qs(),i=bc.prototype;i[e]||(i[e]=Ac)}get changes(){return this._changes||(this._changes=new gc)}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,e){return this._results.reduce(t,e)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,e){this.dirty=!1;const i=li(t);(this._changesDetected=!function(t,e,i){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++){let r=t[n],s=e[n];if(i&&(r=i(r),s=i(s)),s!==r)return!1}return!0}(this._results,i,e))&&(this._results=i,this.length=i.length,this.last=i[this.length-1],this.first=i[0])}notifyOnChanges(){!this._changes||!this._changesDetected&&this._emitDistinctChangesOnly||this._changes.emit(this)}setDirty(){this.dirty=!0}destroy(){this.changes.complete(),this.changes.unsubscribe()}}class vc{constructor(t){this.queryList=t,this.matches=null}clone(){return new vc(this.queryList)}setDirty(){this.queryList.setDirty()}}class _c{constructor(t=[]){this.queries=t}createEmbeddedView(t){const e=t.queries;if(null!==e){const i=null!==t.contentQueries?t.contentQueries[0]:e.length,n=[];for(let t=0;t<i;t++){const i=e.getByIndex(t);n.push(this.queries[i.indexInDeclarationView].clone())}return new _c(n)}return null}insertView(t){this.dirtyQueriesWithMatches(t)}detachView(t){this.dirtyQueriesWithMatches(t)}dirtyQueriesWithMatches(t){for(let e=0;e<this.queries.length;e++)null!==Rc(t,e).matches&&this.queries[e].setDirty()}}class yc{constructor(t,e,i=null){this.predicate=t,this.flags=e,this.read=i}}class wc{constructor(t=[]){this.queries=t}elementStart(t,e){for(let i=0;i<this.queries.length;i++)this.queries[i].elementStart(t,e)}elementEnd(t){for(let e=0;e<this.queries.length;e++)this.queries[e].elementEnd(t)}embeddedTView(t){let e=null;for(let i=0;i<this.length;i++){const n=null!==e?e.length:0,r=this.getByIndex(i).embeddedTView(t,n);r&&(r.indexInDeclarationView=i,null!==e?e.push(r):e=[r])}return null!==e?new wc(e):null}template(t,e){for(let i=0;i<this.queries.length;i++)this.queries[i].template(t,e)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}}class xc{constructor(t,e=-1){this.metadata=t,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=e}elementStart(t,e){this.isApplyingToNode(e)&&this.matchTNode(t,e)}elementEnd(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}template(t,e){this.elementStart(t,e)}embeddedTView(t,e){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,e),new xc(this.metadata)):null}isApplyingToNode(t){if(this._appliesToNextNode&&1!=(1&this.metadata.flags)){const e=this._declarationNodeIndex;let i=t.parent;for(;null!==i&&8&i.type&&i.index!==e;)i=i.parent;return e===(null!==i?i.index:-1)}return this._appliesToNextNode}matchTNode(t,e){const i=this.metadata.predicate;if(Array.isArray(i))for(let n=0;n<i.length;n++){const r=i[n];this.matchTNodeWithReadOption(t,e,Cc(e,r)),this.matchTNodeWithReadOption(t,e,Ze(e,t,r,!1,!1))}else i===Rl?4&e.type&&this.matchTNodeWithReadOption(t,e,-1):this.matchTNodeWithReadOption(t,e,Ze(e,t,i,!1,!1))}matchTNodeWithReadOption(t,e,i){if(null!==i){const n=this.metadata.read;if(null!==n)if(n===il||n===jl||n===Rl&&4&e.type)this.addMatch(e.index,-2);else{const i=Ze(e,t,n,!1,!1);null!==i&&this.addMatch(e.index,i)}else this.addMatch(e.index,i)}}addMatch(t,e){null===this.matches?this.matches=[t,e]:this.matches.push(t,e)}}function Cc(t,e){const i=t.localNames;if(null!==i)for(let n=0;n<i.length;n+=2)if(i[n]===e)return i[n+1];return null}function Sc(t,e,i,n){return-1===i?function(t,e){return 11&t.type?tl(t,e):4&t.type?Ll(t,e):null}(e,t):-2===i?function(t,e,i){return i===il?tl(e,t):i===Rl?Ll(e,t):i===jl?Gl(e,t):void 0}(t,e,n):qe(t,t[1],i,e)}function kc(t,e,i,n){const r=e[19].queries[n];if(null===r.matches){const n=t.data,s=i.matches,o=[];for(let t=0;t<s.length;t+=2){const r=s[t];o.push(r<0?null:Sc(e,n[r],s[t+1],i.metadata.read))}r.matches=o}return r.matches}function Ec(t,e,i,n){const r=t.queries.getByIndex(i),s=r.matches;if(null!==s){const o=kc(t,e,r,i);for(let t=0;t<s.length;t+=2){const i=s[t];if(i>0)n.push(o[t/2]);else{const r=s[t+1],o=e[-i];for(let t=10;t<o.length;t++){const e=o[t];e[17]===e[3]&&Ec(e[1],e,r,n)}if(null!==o[9]){const t=o[9];for(let e=0;e<t.length;e++){const i=t[e];Ec(i[1],i,r,n)}}}}}return n}function Dc(t){const e=jt(),i=zt(),n=re();se(n+1);const r=Rc(i,n);if(t.dirty&&Rt(e)===(2==(2&r.metadata.flags))){if(null===r.matches)t.reset([]);else{const s=r.crossesNgTemplate?Ec(i,e,n,[]):kc(i,e,r,n);t.reset(s,nl),t.notifyOnChanges()}return!0}return!1}function Ic(t,e,i){const n=zt();n.firstCreatePass&&(Tc(n,new yc(t,e,i),-1),2==(2&e)&&(n.staticViewQueries=!0)),Mc(n,jt(),e)}function Pc(t,e,i,n){const r=zt();if(r.firstCreatePass){const s=Kt();Tc(r,new yc(e,i,n),s.index),function(t,e){const i=t.contentQueries||(t.contentQueries=[]);e!==(i.length?i[i.length-1]:-1)&&i.push(t.queries.length-1,e)}(r,t),2==(2&i)&&(r.staticContentQueries=!0)}Mc(r,jt(),i)}function Oc(){return t=jt(),e=re(),t[19].queries[e].queryList;var t,e}function Mc(t,e,i){const n=new bc(4==(4&i));qr(t,e,n,n.destroy),null===e[19]&&(e[19]=new _c),e[19].queries.push(new vc(n))}function Tc(t,e,i){null===t.queries&&(t.queries=new wc),t.queries.track(new xc(e,i))}function Rc(t,e){return t.queries.getByIndex(e)}function Vc(t,e){return Ll(t,e)}function Fc(t=I.Default){const e=Il(!0);if(null!=e||t&I.Optional)return e;v("ChangeDetectorRef")}const Lc=new ri("Application Initializer");let Uc=(()=>{class t{constructor(t){this.appInits=t,this.resolve=Ja,this.reject=Ja,this.initialized=!1,this.done=!1,this.donePromise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}runInitializers(){if(this.initialized)return;const t=[],e=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let i=0;i<this.appInits.length;i++){const e=this.appInits[i]();zo(e)&&t.push(e)}Promise.all(t).then(()=>{e()}).catch(t=>{this.reject(t)}),0===t.length&&e(),this.initialized=!0}}return t.\u0275fac=function(e){return new(e||t)(Ii(Lc,8))},t.\u0275prov=_({token:t,factory:t.\u0275fac}),t})();const Bc=new ri("AppId"),Nc={provide:Bc,useFactory:function(){return`${jc()}${jc()}${jc()}`},deps:[]};function jc(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const zc=new ri("Platform Initializer"),Hc=new ri("Platform ID"),Kc=new ri("appBootstrapListener");let $c=(()=>{class t{log(t){console.log(t)}warn(t){console.warn(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=_({token:t,factory:t.\u0275fac}),t})();const Gc=new ri("LocaleId"),Wc=new ri("DefaultCurrencyCode");class Zc{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}const qc=function(t){return new ec(t)},Yc=qc,Qc=function(t){return Promise.resolve(qc(t))},Xc=function(t){const e=qc(t),i=jn(lt(t).declarations).reduce((t,e)=>{const i=at(e);return i&&t.push(new Ql(i)),t},[]);return new Zc(e,i)},Jc=Xc,th=function(t){return Promise.resolve(Xc(t))};let eh=(()=>{class t{constructor(){this.compileModuleSync=Yc,this.compileModuleAsync=Qc,this.compileModuleAndAllComponentsSync=Jc,this.compileModuleAndAllComponentsAsync=th}clearCache(){}clearCacheFor(t){}getModuleId(t){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=_({token:t,factory:t.\u0275fac}),t})();const ih=(()=>Promise.resolve(0))();function nh(t){"undefined"==typeof Zone?ih.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class rh{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:i=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new gc(!1),this.onMicrotaskEmpty=new gc(!1),this.onStable=new gc(!1),this.onError=new gc(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched(),this._nesting=0,this._outer=this._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(this._inner=this._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(this._inner=this._inner.fork(Zone.longStackTraceZoneSpec)),this.shouldCoalesceEventChangeDetection=!i&&e,this.shouldCoalesceRunChangeDetection=i,this.lastRequestAnimationFrameId=-1,this.nativeRequestAnimationFrame=function(){let t=N.requestAnimationFrame,e=N.cancelAnimationFrame;if("undefined"!=typeof Zone&&t&&e){const i=t[Zone.__symbol__("OriginalDelegate")];i&&(t=i);const n=e[Zone.__symbol__("OriginalDelegate")];n&&(e=n)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function(t){const e=()=>{!function(t){-1===t.lastRequestAnimationFrameId&&(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(N,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,ah(t),oh(t)},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),ah(t))}(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(i,n,r,s,o,a)=>{try{return lh(t),i.invokeTask(r,s,o,a)}finally{(t.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||t.shouldCoalesceRunChangeDetection)&&e(),ch(t)}},onInvoke:(i,n,r,s,o,a,l)=>{try{return lh(t),i.invoke(r,s,o,a,l)}finally{t.shouldCoalesceRunChangeDetection&&e(),ch(t)}},onHasTask:(e,i,n,r)=>{e.hasTask(n,r),i===n&&("microTask"==r.change?(t._hasPendingMicrotasks=r.microTask,ah(t),oh(t)):"macroTask"==r.change&&(t.hasPendingMacrotasks=r.macroTask))},onHandleError:(e,i,n,r)=>(e.handleError(n,r),t.runOutsideAngular(()=>t.onError.emit(r)),!1)})}(this)}static isInAngularZone(){return!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!rh.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(rh.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(t,e,i){return this._inner.run(t,e,i)}runTask(t,e,i,n){const r=this._inner,s=r.scheduleEventTask("NgZoneEvent: "+n,t,sh,Ja,Ja);try{return r.runTask(s,e,i)}finally{r.cancelTask(s)}}runGuarded(t,e,i){return this._inner.runGuarded(t,e,i)}runOutsideAngular(t){return this._outer.run(t)}}const sh={};function oh(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function ah(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&-1!==t.lastRequestAnimationFrameId)}function lh(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function ch(t){t._nesting--,oh(t)}class hh{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new gc,this.onMicrotaskEmpty=new gc,this.onStable=new gc,this.onError=new gc}run(t,e,i){return t.apply(e,i)}runGuarded(t,e,i){return t.apply(e,i)}runOutsideAngular(t){return t()}runTask(t,e,i,n){return t.apply(e,i)}}let uh=(()=>{class t{constructor(t){this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),t.run(()=>{this.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{rh.assertNotInAngularZone(),nh(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())nh(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(this._didWork)}this._didWork=!1});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(e=>!e.updateCb||!e.updateCb(t)||(clearTimeout(e.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,e,i){let n=-1;e&&e>0&&(n=setTimeout(()=>{this._callbacks=this._callbacks.filter(t=>t.timeoutId!==n),t(this._didWork,this.getPendingTasks())},e)),this._callbacks.push({doneCb:t,timeoutId:n,updateCb:i})}whenStable(t,e,i){if(i&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(t,e,i),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(t,e,i){return[]}}return t.\u0275fac=function(e){return new(e||t)(Ii(rh))},t.\u0275prov=_({token:t,factory:t.\u0275fac}),t})(),dh=(()=>{class t{constructor(){this._applications=new Map,gh.addToWindow(this)}registerApplication(t,e){this._applications.set(t,e)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,e=!0){return gh.findTestabilityInTree(this,t,e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=_({token:t,factory:t.\u0275fac}),t})();class ph{addToWindow(t){}findTestabilityInTree(t,e,i){return null}}function fh(t){gh=t}let mh,gh=new ph,Ah=!0,bh=!1;function vh(){return bh=!0,Ah}function _h(){if(bh)throw new Error("Cannot enable prod mode after platform setup.");Ah=!1}const yh=new ri("AllowMultipleToken");class wh{constructor(t,e){this.name=t,this.token=e}}function xh(t,e,i=[]){const n=`Platform: ${e}`,r=new ri(n);return(e=[])=>{let s=Ch();if(!s||s.injector.get(yh,!1))if(t)t(i.concat(e).concat({provide:r,useValue:!0}));else{const t=i.concat(e).concat({provide:r,useValue:!0},{provide:Es,useValue:"platform"});!function(t){if(mh&&!mh.destroyed&&!mh.injector.get(yh,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");mh=t.get(Sh);const e=t.get(zc,null);e&&e.forEach(t=>t())}(js.create({providers:t,name:n}))}return function(t){const e=Ch();if(!e)throw new Error("No platform exists!");if(!e.injector.get(t,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return e}(r)}}function Ch(){return mh&&!mh.destroyed?mh:null}let Sh=(()=>{class t{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,e){const i=function(t,e){let i;return i="noop"===t?new hh:("zone.js"===t?void 0:t)||new rh({enableLongStackTrace:vh(),shouldCoalesceEventChangeDetection:!!(null==e?void 0:e.ngZoneEventCoalescing),shouldCoalesceRunChangeDetection:!!(null==e?void 0:e.ngZoneRunCoalescing)}),i}(e?e.ngZone:void 0,{ngZoneEventCoalescing:e&&e.ngZoneEventCoalescing||!1,ngZoneRunCoalescing:e&&e.ngZoneRunCoalescing||!1}),n=[{provide:rh,useValue:i}];return i.run(()=>{const e=js.create({providers:n,parent:this.injector,name:t.moduleType.name}),r=t.create(e),s=r.injector.get(Vn,null);if(!s)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return i.runOutsideAngular(()=>{const t=i.onError.subscribe({next:t=>{s.handleError(t)}});r.onDestroy(()=>{Dh(this._modules,r),t.unsubscribe()})}),function(t,e,i){try{const n=i();return zo(n)?n.catch(i=>{throw e.runOutsideAngular(()=>t.handleError(i)),i}):n}catch(n){throw e.runOutsideAngular(()=>t.handleError(n)),n}}(s,i,()=>{const t=r.injector.get(Uc);return t.runInitializers(),t.donePromise.then(()=>(ja(r.injector.get(Gc,"en-US")||"en-US"),this._moduleDoBootstrap(r),r))})})}bootstrapModule(t,e=[]){const i=kh({},e);return function(t,e,i){const n=new ec(i);return Promise.resolve(n)}(0,0,t).then(t=>this.bootstrapModuleFactory(t,i))}_moduleDoBootstrap(t){const e=t.injector.get(Eh);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(t=>e.bootstrap(t));else{if(!t.instance.ngDoBootstrap)throw new Error(`The module ${h(t.instance.constructor)} was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.`);t.instance.ngDoBootstrap(e)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(t=>t.destroy()),this._destroyListeners.forEach(t=>t()),this._destroyed=!0}get destroyed(){return this._destroyed}}return t.\u0275fac=function(e){return new(e||t)(Ii(js))},t.\u0275prov=_({token:t,factory:t.\u0275fac}),t})();function kh(t,e){return Array.isArray(e)?e.reduce(kh,t):Object.assign(Object.assign({},t),e)}let Eh=(()=>{class t{constructor(t,e,i,n,r){this._zone=t,this._injector=e,this._exceptionHandler=i,this._componentFactoryResolver=n,this._initStatus=r,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const l=new s.a(t=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{t.next(this._stable),t.complete()})}),c=new s.a(t=>{let e;this._zone.runOutsideAngular(()=>{e=this._zone.onStable.subscribe(()=>{rh.assertNotInAngularZone(),nh(()=>{this._stable||this._zone.hasPendingMacrotasks||this._zone.hasPendingMicrotasks||(this._stable=!0,t.next(!0))})})});const i=this._zone.onUnstable.subscribe(()=>{rh.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{t.next(!1)}))});return()=>{e.unsubscribe(),i.unsubscribe()}});this.isStable=Object(o.a)(l,c.pipe(Object(a.a)()))}bootstrap(t,e){if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");let i;i=t instanceof Ya?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(i.componentType);const n=i.isBoundToModule?void 0:this._injector.get(Ul),r=i.create(js.NULL,[],e||i.selector,n),s=r.location.nativeElement,o=r.injector.get(uh,null),a=o&&r.injector.get(dh);return o&&a&&a.registerApplication(s,o),r.onDestroy(()=>{this.detachView(r.hostView),Dh(this.components,r),a&&a.unregisterApplication(s)}),this._loadComponent(r),r}tick(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;for(let t of this._views)t.detectChanges()}catch(t){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(t))}finally{this._runningTick=!1}}attachView(t){const e=t;this._views.push(e),e.attachToAppRef(this)}detachView(t){const e=t;Dh(this._views,e),e.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(Kc,[]).concat(this._bootstrapListeners).forEach(e=>e(t))}ngOnDestroy(){this._views.slice().forEach(t=>t.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}get viewCount(){return this._views.length}}return t.\u0275fac=function(e){return new(e||t)(Ii(rh),Ii(js),Ii(Vn),Ii(Xa),Ii(Uc))},t.\u0275prov=_({token:t,factory:t.\u0275fac}),t})();function Dh(t,e){const i=t.indexOf(e);i>-1&&t.splice(i,1)}class Ih{}class Ph{}const Oh={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"};let Mh=(()=>{class t{constructor(t,e){this._compiler=t,this._config=e||Oh}load(t){return this.loadAndCompile(t)}loadAndCompile(t){let[e,n]=t.split("#");return void 0===n&&(n="default"),i("zn8P")(e).then(t=>t[n]).then(t=>Th(t,e,n)).then(t=>this._compiler.compileModuleAsync(t))}loadFactory(t){let[e,n]=t.split("#"),r="NgFactory";return void 0===n&&(n="default",r=""),i("zn8P")(this._config.factoryPathPrefix+e+this._config.factoryPathSuffix).then(t=>t[n+r]).then(t=>Th(t,e,n))}}return t.\u0275fac=function(e){return new(e||t)(Ii(eh),Ii(Ph,8))},t.\u0275prov=_({token:t,factory:t.\u0275fac}),t})();function Th(t,e,i){if(!t)throw new Error(`Cannot find '${i}' in '${e}'`);return t}class Rh extends Dl{}class Vh extends Rh{}const Fh=function(t){return null},Lh=xh(null,"core",[{provide:Hc,useValue:"unknown"},{provide:Sh,deps:[js]},{provide:dh,deps:[]},{provide:$c,deps:[]}]),Uh=[{provide:Eh,useClass:Eh,deps:[rh,js,Vn,Xa,Uc]},{provide:Yl,deps:[rh],useFactory:function(t){let e=[];return t.onStable.subscribe(()=>{for(;e.length;)e.pop()()}),function(t){e.push(t)}}},{provide:Uc,useClass:Uc,deps:[[new Ri,Lc]]},{provide:eh,useClass:eh,deps:[]},Nc,{provide:yl,useFactory:function(){return Ol},deps:[]},{provide:xl,useFactory:function(){return Ml},deps:[]},{provide:Gc,useFactory:function(t){return ja(t=t||"undefined"!=typeof $localize&&$localize.locale||"en-US"),t},deps:[[new Ti(Gc),new Ri,new Fi]]},{provide:Wc,useValue:"USD"}];let Bh=(()=>{class t{constructor(t){}}return t.\u0275fac=function(e){return new(e||t)(Ii(Eh))},t.\u0275mod=it({type:t}),t.\u0275inj=y({providers:Uh}),t})()},gKCj:function(t,e,i){t.exports=i.p+"0-es2015.38742f744abe6758427b.worker.js"},gRHU:function(t,e,i){"use strict";i.d(e,"a",function(){return s});var n=i("2fFW"),r=i("NJ4a");const s={closed:!0,next(t){},error(t){if(n.a.useDeprecatedSynchronousErrorHandling)throw t;Object(r.a)(t)},complete(){}}},gllA:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if(!t)return!1;if("string"!=typeof t)return!1;var e={A:10,B:12,C:13,D:14,E:15,F:16,G:17,H:18,I:19,J:20,K:21,L:23,M:24,N:25,O:26,P:27,Q:28,R:29,S:30,T:31,U:32,V:34,W:35,X:36,Y:37,Z:38},i=11!==(t=t.toUpperCase()).length,n=/^[A-Z]{4}\d{7}/.test(t);if(i||!n)return!1;var r=0,s=t.substr(10);return t.substr(0,10).split("").map(function(t,i){var n=Number(t);i<4&&(n=e[t]),n*=Math.pow(2,i),r+=n}),r%=11,(r%=10)===Number(s)}},jZKg:function(t,e,i){"use strict";i.d(e,"a",function(){return s});var n=i("HDdC"),r=i("quSY");function s(t,e){return new n.a(i=>{const n=new r.a;let s=0;return n.add(e.schedule(function(){s!==t.length?(i.next(t[s++]),i.closed||n.add(this.schedule())):i.complete()})),n})}},kJWO:function(t,e,i){"use strict";i.d(e,"a",function(){return n});const n=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")()},kdvv:function(t,e,i){"use strict";(function(t){i.d(e,"a",function(){return c});var n,r=i("9/Zf"),s=i("+A1k"),o={nowSeconds:function(){return Date.now()/1e3}},a=Object(s.b)()?function(){try{return Object(s.a)(t,"perf_hooks").performance}catch(e){return}}():function(){var t=Object(r.e)().performance;if(t&&t.now)return{now:function(){return t.now()},timeOrigin:Date.now()-t.now()}}(),l=void 0===a?o:{nowSeconds:function(){return(a.timeOrigin+a.now())/1e3}},c=o.nowSeconds.bind(o);l.nowSeconds.bind(l),(n=Object(r.e)().performance)&&(n.timeOrigin||n.timing&&n.timing.navigationStart||Date.now())}).call(this,i("3UD+")(t))},lJxs:function(t,e,i){"use strict";i.d(e,"a",function(){return r});var n=i("7o/Q");function r(t,e){return function(i){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return i.lift(new s(t,e))}}class s{constructor(t,e){this.project=t,this.thisArg=e}call(t,e){return e.subscribe(new o(t,this.project,this.thisArg))}}class o extends n.a{constructor(t,e,i){super(t),this.project=e,this.count=0,this.thisArg=i||this}_next(t){let e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(i){return void this.destination.error(i)}this.destination.next(e)}}},mrSG:function(t,e,i){"use strict";function n(t,e,i,n){var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o}function r(t,e){return function(i,n){e(i,n,t)}}function s(t,e,i,n){return new(i||(i=Promise))(function(r,s){function o(t){try{l(n.next(t))}catch(e){s(e)}}function a(t){try{l(n.throw(t))}catch(e){s(e)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(o,a)}l((n=n.apply(t,e||[])).next())})}i.d(e,"b",function(){return n}),i.d(e,"c",function(){return r}),i.d(e,"a",function(){return s})},n6bG:function(t,e,i){"use strict";function n(t){return"function"==typeof t}i.d(e,"a",function(){return n})},ngJS:function(t,e,i){"use strict";i.d(e,"a",function(){return n});const n=t=>e=>{for(let i=0,n=t.length;i<n&&!e.closed;i++)e.next(t[i]);e.complete()}},quSY:function(t,e,i){"use strict";i.d(e,"a",function(){return a});var n=i("DH7j"),r=i("XoHu"),s=i("n6bG");const o=(()=>{function t(t){return Error.call(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((t,e)=>`${e+1}) ${t.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t})();let a=(()=>{class t{constructor(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}unsubscribe(){let e;if(this.closed)return;let{_parentOrParents:i,_ctorUnsubscribe:a,_unsubscribe:c,_subscriptions:h}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,i instanceof t)i.remove(this);else if(null!==i)for(let t=0;t<i.length;++t)i[t].remove(this);if(Object(s.a)(c)){a&&(this._unsubscribe=void 0);try{c.call(this)}catch(u){e=u instanceof o?l(u.errors):[u]}}if(Object(n.a)(h)){let t=-1,i=h.length;for(;++t<i;){const i=h[t];if(Object(r.a)(i))try{i.unsubscribe()}catch(u){e=e||[],u instanceof o?e=e.concat(l(u.errors)):e.push(u)}}}if(e)throw new o(e)}add(e){let i=e;if(!e)return t.EMPTY;switch(typeof e){case"function":i=new t(e);case"object":if(i===this||i.closed||"function"!=typeof i.unsubscribe)return i;if(this.closed)return i.unsubscribe(),i;if(!(i instanceof t)){const e=i;i=new t,i._subscriptions=[e]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}let{_parentOrParents:n}=i;if(null===n)i._parentOrParents=this;else if(n instanceof t){if(n===this)return i;i._parentOrParents=[n,this]}else{if(-1!==n.indexOf(this))return i;n.push(this)}const r=this._subscriptions;return null===r?this._subscriptions=[i]:r.push(i),i}remove(t){const e=this._subscriptions;if(e){const i=e.indexOf(t);-1!==i&&e.splice(i,1)}}}var e;return t.EMPTY=((e=new t).closed=!0,e),t})();function l(t){return t.reduce((t,e)=>t.concat(e instanceof o?e.errors:e),[])}},w1tV:function(t,e,i){"use strict";i.d(e,"a",function(){return a});var n=i("EQ5u"),r=i("x+ZX"),s=i("XNiG");function o(){return new s.a}function a(){return t=>{return Object(r.a)()((e=o,function(t){let i;i="function"==typeof e?e:function(){return e};const r=Object.create(t,n.b);return r.source=t,r.subjectFactory=i,r})(t));var e}}},"x+ZX":function(t,e,i){"use strict";i.d(e,"a",function(){return r});var n=i("7o/Q");function r(){return function(t){return t.lift(new s(t))}}class s{constructor(t){this.connectable=t}call(t,e){const{connectable:i}=this;i._refCount++;const n=new o(t,i),r=e.subscribe(n);return n.closed||(n.connection=i.connect()),r}}class o extends n.a{constructor(t,e){super(t),this.connectable=e}_unsubscribe(){const{connectable:t}=this;if(!t)return void(this.connection=null);this.connectable=null;const e=t._refCount;if(e<=0)return void(this.connection=null);if(t._refCount=e-1,e>1)return void(this.connection=null);const{connection:i}=this,n=t._connection;this.connection=null,!n||i&&n!==i||n.unsubscribe()}}},yCtX:function(t,e,i){"use strict";i.d(e,"a",function(){return o});var n=i("HDdC"),r=i("ngJS"),s=i("jZKg");function o(t,e){return e?Object(s.a)(t,e):new n.a(Object(r.a)(t))}},yLV6:function(t,e,i){var n;!function(r,s,o,a){"use strict";var l,c=["","webkit","Moz","MS","ms","o"],h=s.createElement("div"),u=Math.round,d=Math.abs,p=Date.now;function f(t,e,i){return setTimeout(y(t,i),e)}function m(t,e,i){return!!Array.isArray(t)&&(g(t,i[e],i),!0)}function g(t,e,i){var n;if(t)if(t.forEach)t.forEach(e,i);else if(void 0!==t.length)for(n=0;n<t.length;)e.call(i,t[n],n,t),n++;else for(n in t)t.hasOwnProperty(n)&&e.call(i,t[n],n,t)}function A(t,e,i){var n="DEPRECATED METHOD: "+e+"\n"+i+" AT \n";return function(){var e=new Error("get-stack-trace"),i=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",s=r.console&&(r.console.warn||r.console.log);return s&&s.call(r.console,n,i),t.apply(this,arguments)}}l="function"!=typeof Object.assign?function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(null!=n)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}:Object.assign;var b=A(function(t,e,i){for(var n=Object.keys(e),r=0;r<n.length;)(!i||i&&void 0===t[n[r]])&&(t[n[r]]=e[n[r]]),r++;return t},"extend","Use `assign`."),v=A(function(t,e){return b(t,e,!0)},"merge","Use `assign`.");function _(t,e,i){var n,r=e.prototype;(n=t.prototype=Object.create(r)).constructor=t,n._super=r,i&&l(n,i)}function y(t,e){return function(){return t.apply(e,arguments)}}function w(t,e){return"function"==typeof t?t.apply(e&&e[0]||void 0,e):t}function x(t,e){return void 0===t?e:t}function C(t,e,i){g(D(e),function(e){t.addEventListener(e,i,!1)})}function S(t,e,i){g(D(e),function(e){t.removeEventListener(e,i,!1)})}function k(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function E(t,e){return t.indexOf(e)>-1}function D(t){return t.trim().split(/\s+/g)}function I(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var n=0;n<t.length;){if(i&&t[n][i]==e||!i&&t[n]===e)return n;n++}return-1}function P(t){return Array.prototype.slice.call(t,0)}function O(t,e,i){for(var n=[],r=[],s=0;s<t.length;){var o=e?t[s][e]:t[s];I(r,o)<0&&n.push(t[s]),r[s]=o,s++}return i&&(n=e?n.sort(function(t,i){return t[e]>i[e]}):n.sort()),n}function M(t,e){for(var i,n,r=e[0].toUpperCase()+e.slice(1),s=0;s<c.length;){if((n=(i=c[s])?i+r:e)in t)return n;s++}}var T=1;function R(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||r}var V="ontouchstart"in r,F=void 0!==M(r,"PointerEvent"),L=V&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),U=["x","y"],B=["clientX","clientY"];function N(t,e){var i=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){w(t.options.enable,[t])&&i.handler(e)},this.init()}function j(t,e,i){var n=i.pointers.length,r=i.changedPointers.length,s=1&e&&n-r==0,o=12&e&&n-r==0;i.isFirst=!!s,i.isFinal=!!o,s&&(t.session={}),i.eventType=e,function(t,e){var i=t.session,n=e.pointers,r=n.length;i.firstInput||(i.firstInput=z(e)),r>1&&!i.firstMultiple?i.firstMultiple=z(e):1===r&&(i.firstMultiple=!1);var s=i.firstInput,o=i.firstMultiple,a=o?o.center:s.center,l=e.center=H(n);e.timeStamp=p(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=W(a,l),e.distance=G(a,l),function(t,e){var i=e.center,n=t.offsetDelta||{},r=t.prevDelta||{},s=t.prevInput||{};1!==e.eventType&&4!==s.eventType||(r=t.prevDelta={x:s.deltaX||0,y:s.deltaY||0},n=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=r.x+(i.x-n.x),e.deltaY=r.y+(i.y-n.y)}(i,e),e.offsetDirection=$(e.deltaX,e.deltaY);var c,h,u=K(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=u.x,e.overallVelocityY=u.y,e.overallVelocity=d(u.x)>d(u.y)?u.x:u.y,e.scale=o?(c=o.pointers,G((h=n)[0],h[1],B)/G(c[0],c[1],B)):1,e.rotation=o?function(t,e){return W(e[1],e[0],B)+W(t[1],t[0],B)}(o.pointers,n):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,function(t,e){var i,n,r,s,o=t.lastInterval||e,a=e.timeStamp-o.timeStamp;if(8!=e.eventType&&(a>25||void 0===o.velocity)){var l=e.deltaX-o.deltaX,c=e.deltaY-o.deltaY,h=K(a,l,c);n=h.x,r=h.y,i=d(h.x)>d(h.y)?h.x:h.y,s=$(l,c),t.lastInterval=e}else i=o.velocity,n=o.velocityX,r=o.velocityY,s=o.direction;e.velocity=i,e.velocityX=n,e.velocityY=r,e.direction=s}(i,e);var f=t.element;k(e.srcEvent.target,f)&&(f=e.srcEvent.target),e.target=f}(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function z(t){for(var e=[],i=0;i<t.pointers.length;)e[i]={clientX:u(t.pointers[i].clientX),clientY:u(t.pointers[i].clientY)},i++;return{timeStamp:p(),pointers:e,center:H(e),deltaX:t.deltaX,deltaY:t.deltaY}}function H(t){var e=t.length;if(1===e)return{x:u(t[0].clientX),y:u(t[0].clientY)};for(var i=0,n=0,r=0;r<e;)i+=t[r].clientX,n+=t[r].clientY,r++;return{x:u(i/e),y:u(n/e)}}function K(t,e,i){return{x:e/t||0,y:i/t||0}}function $(t,e){return t===e?1:d(t)>=d(e)?t<0?2:4:e<0?8:16}function G(t,e,i){i||(i=U);var n=e[i[0]]-t[i[0]],r=e[i[1]]-t[i[1]];return Math.sqrt(n*n+r*r)}function W(t,e,i){return i||(i=U),180*Math.atan2(e[i[1]]-t[i[1]],e[i[0]]-t[i[0]])/Math.PI}N.prototype={handler:function(){},init:function(){this.evEl&&C(this.element,this.evEl,this.domHandler),this.evTarget&&C(this.target,this.evTarget,this.domHandler),this.evWin&&C(R(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&S(this.element,this.evEl,this.domHandler),this.evTarget&&S(this.target,this.evTarget,this.domHandler),this.evWin&&S(R(this.element),this.evWin,this.domHandler)}};var Z={mousedown:1,mousemove:2,mouseup:4};function q(){this.evEl="mousedown",this.evWin="mousemove mouseup",this.pressed=!1,N.apply(this,arguments)}_(q,N,{handler:function(t){var e=Z[t.type];1&e&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))}});var Y={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},Q={2:"touch",3:"pen",4:"mouse",5:"kinect"},X="pointerdown",J="pointermove pointerup pointercancel";function tt(){this.evEl=X,this.evWin=J,N.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}r.MSPointerEvent&&!r.PointerEvent&&(X="MSPointerDown",J="MSPointerMove MSPointerUp MSPointerCancel"),_(tt,N,{handler:function(t){var e=this.store,i=!1,n=t.type.toLowerCase().replace("ms",""),r=Y[n],s=Q[t.pointerType]||t.pointerType,o="touch"==s,a=I(e,t.pointerId,"pointerId");1&r&&(0===t.button||o)?a<0&&(e.push(t),a=e.length-1):12&r&&(i=!0),a<0||(e[a]=t,this.callback(this.manager,r,{pointers:e,changedPointers:[t],pointerType:s,srcEvent:t}),i&&e.splice(a,1))}});var et={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function it(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,N.apply(this,arguments)}function nt(t,e){var i=P(t.touches),n=P(t.changedTouches);return 12&e&&(i=O(i.concat(n),"identifier",!0)),[i,n]}_(it,N,{handler:function(t){var e=et[t.type];if(1===e&&(this.started=!0),this.started){var i=nt.call(this,t,e);12&e&&i[0].length-i[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:"touch",srcEvent:t})}}});var rt={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function st(){this.evTarget="touchstart touchmove touchend touchcancel",this.targetIds={},N.apply(this,arguments)}function ot(t,e){var i=P(t.touches),n=this.targetIds;if(3&e&&1===i.length)return n[i[0].identifier]=!0,[i,i];var r,s,o=P(t.changedTouches),a=[],l=this.target;if(s=i.filter(function(t){return k(t.target,l)}),1===e)for(r=0;r<s.length;)n[s[r].identifier]=!0,r++;for(r=0;r<o.length;)n[o[r].identifier]&&a.push(o[r]),12&e&&delete n[o[r].identifier],r++;return a.length?[O(s.concat(a),"identifier",!0),a]:void 0}function at(){N.apply(this,arguments);var t=y(this.handler,this);this.touch=new st(this.manager,t),this.mouse=new q(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function lt(t,e){1&t?(this.primaryTouch=e.changedPointers[0].identifier,ct.call(this,e)):12&t&&ct.call(this,e)}function ct(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var i={x:e.clientX,y:e.clientY};this.lastTouches.push(i);var n=this.lastTouches;setTimeout(function(){var t=n.indexOf(i);t>-1&&n.splice(t,1)},2500)}}function ht(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,n=0;n<this.lastTouches.length;n++){var r=this.lastTouches[n],s=Math.abs(e-r.x),o=Math.abs(i-r.y);if(s<=25&&o<=25)return!0}return!1}_(st,N,{handler:function(t){var e=rt[t.type],i=ot.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:"touch",srcEvent:t})}}),_(at,N,{handler:function(t,e,i){var n="mouse"==i.pointerType;if(!(n&&i.sourceCapabilities&&i.sourceCapabilities.firesTouchEvents)){if("touch"==i.pointerType)lt.call(this,e,i);else if(n&&ht.call(this,i))return;this.callback(t,e,i)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var ut=M(h.style,"touchAction"),dt=void 0!==ut,pt=function(){if(!dt)return!1;var t={},e=r.CSS&&r.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(i){t[i]=!e||r.CSS.supports("touch-action",i)}),t}();function ft(t,e){this.manager=t,this.set(e)}function mt(t){this.options=l({},this.defaults,t||{}),this.id=T++,this.manager=null,this.options.enable=x(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function gt(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}function At(t){return 16==t?"down":8==t?"up":2==t?"left":4==t?"right":""}function bt(t,e){var i=e.manager;return i?i.get(t):t}function vt(){mt.apply(this,arguments)}function _t(){vt.apply(this,arguments),this.pX=null,this.pY=null}function yt(){vt.apply(this,arguments)}function wt(){mt.apply(this,arguments),this._timer=null,this._input=null}function xt(){vt.apply(this,arguments)}function Ct(){vt.apply(this,arguments)}function St(){mt.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function kt(t,e){return(e=e||{}).recognizers=x(e.recognizers,kt.defaults.preset),new Et(t,e)}function Et(t,e){this.options=l({},kt.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new(this.options.inputClass||(F?tt:L?st:V?at:q))(this,j),this.touchAction=new ft(this,this.options.touchAction),Dt(this,!0),g(this.options.recognizers,function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}function Dt(t,e){var i,n=t.element;n.style&&(g(t.options.cssProps,function(r,s){i=M(n.style,s),e?(t.oldCssProps[i]=n.style[i],n.style[i]=r):n.style[i]=t.oldCssProps[i]||""}),e||(t.oldCssProps={}))}ft.prototype={set:function(t){"compute"==t&&(t=this.compute()),dt&&this.manager.element.style&&pt[t]&&(this.manager.element.style[ut]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return g(this.manager.recognizers,function(e){w(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),function(t){if(E(t,"none"))return"none";var e=E(t,"pan-x"),i=E(t,"pan-y");return e&&i?"none":e||i?e?"pan-x":"pan-y":E(t,"manipulation")?"manipulation":"auto"}(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,i=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var n=this.actions,r=E(n,"none")&&!pt.none,s=E(n,"pan-y")&&!pt["pan-y"],o=E(n,"pan-x")&&!pt["pan-x"];if(r&&1===t.pointers.length&&t.distance<2&&t.deltaTime<250)return;if(!o||!s)return r||s&&6&i||o&&24&i?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}},mt.prototype={defaults:{},set:function(t){return l(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(m(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=bt(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return m(t,"dropRecognizeWith",this)||(t=bt(t,this),delete this.simultaneous[t.id]),this},requireFailure:function(t){if(m(t,"requireFailure",this))return this;var e=this.requireFail;return-1===I(e,t=bt(t,this))&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(m(t,"dropRequireFailure",this))return this;t=bt(t,this);var e=I(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,i=this.state;function n(i){e.manager.emit(i,t)}i<8&&n(e.options.event+gt(i)),n(e.options.event),t.additionalEvent&&n(t.additionalEvent),i>=8&&n(e.options.event+gt(i))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0},recognize:function(t){var e=l({},t);if(!w(this.options.enable,[this,e]))return this.reset(),void(this.state=32);56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},process:function(t){},getTouchAction:function(){},reset:function(){}},_(vt,mt,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,i=t.eventType,n=6&e,r=this.attrTest(t);return n&&(8&i||!r)?16|e:n||r?4&i?8|e:2&e?4|e:2:32}}),_(_t,vt,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var t=this.options.direction,e=[];return 6&t&&e.push("pan-y"),24&t&&e.push("pan-x"),e},directionTest:function(t){var e=this.options,i=!0,n=t.distance,r=t.direction,s=t.deltaX,o=t.deltaY;return r&e.direction||(6&e.direction?(r=0===s?1:s<0?2:4,i=s!=this.pX,n=Math.abs(t.deltaX)):(r=0===o?1:o<0?8:16,i=o!=this.pY,n=Math.abs(t.deltaY))),t.direction=r,i&&n>e.threshold&&r&e.direction},attrTest:function(t){return vt.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=At(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),_(yt,vt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){1!==t.scale&&(t.additionalEvent=this.options.event+(t.scale<1?"in":"out")),this._super.emit.call(this,t)}}),_(wt,mt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distance<e.threshold,r=t.deltaTime>e.time;if(this._input=t,!n||!i||12&t.eventType&&!r)this.reset();else if(1&t.eventType)this.reset(),this._timer=f(function(){this.state=8,this.tryEmit()},e.time,this);else if(4&t.eventType)return 8;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&4&t.eventType?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=p(),this.manager.emit(this.options.event,this._input)))}}),_(xt,vt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),_(Ct,vt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return _t.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return 30&i?e=t.overallVelocity:6&i?e=t.overallVelocityX:24&i&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&d(e)>this.options.velocity&&4&t.eventType},emit:function(t){var e=At(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),_(St,mt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return["manipulation"]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distance<e.threshold,r=t.deltaTime<e.time;if(this.reset(),1&t.eventType&&0===this.count)return this.failTimeout();if(n&&r&&i){if(4!=t.eventType)return this.failTimeout();var s=!this.pTime||t.timeStamp-this.pTime<e.interval,o=!this.pCenter||G(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,o&&s?this.count+=1:this.count=1,this._input=t,0==this.count%e.taps)return this.hasRequireFailures()?(this._timer=f(function(){this.state=8,this.tryEmit()},e.interval,this),2):8}return 32},failTimeout:function(){return this._timer=f(function(){this.state=32},this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),kt.VERSION="2.0.7",kt.defaults={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,preset:[[xt,{enable:!1}],[yt,{enable:!1},["rotate"]],[Ct,{direction:6}],[_t,{direction:6},["swipe"]],[St],[St,{event:"doubletap",taps:2},["tap"]],[wt]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Et.prototype={set:function(t){return l(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e=this.session;if(!e.stopped){var i;this.touchAction.preventDefaults(t);var n=this.recognizers,r=e.curRecognizer;(!r||r&&8&r.state)&&(r=e.curRecognizer=null);for(var s=0;s<n.length;)i=n[s],2===e.stopped||r&&i!=r&&!i.canRecognizeWith(r)?i.reset():i.recognize(t),!r&&14&i.state&&(r=e.curRecognizer=i),s++}},get:function(t){if(t instanceof mt)return t;for(var e=this.recognizers,i=0;i<e.length;i++)if(e[i].options.event==t)return e[i];return null},add:function(t){if(m(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(m(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,i=I(e,t);-1!==i&&(e.splice(i,1),this.touchAction.update())}return this},on:function(t,e){if(void 0!==t&&void 0!==e){var i=this.handlers;return g(D(t),function(t){i[t]=i[t]||[],i[t].push(e)}),this}},off:function(t,e){if(void 0!==t){var i=this.handlers;return g(D(t),function(t){e?i[t]&&i[t].splice(I(i[t],e),1):delete i[t]}),this}},emit:function(t,e){this.options.domEvents&&function(t,e){var i=s.createEvent("Event");i.initEvent(t,!0,!0),i.gesture=e,e.target.dispatchEvent(i)}(t,e);var i=this.handlers[t]&&this.handlers[t].slice();if(i&&i.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var n=0;n<i.length;)i[n](e),n++}},destroy:function(){this.element&&Dt(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},l(kt,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:32,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:24,DIRECTION_ALL:30,Manager:Et,Input:N,TouchAction:ft,TouchInput:st,MouseInput:q,PointerEventInput:tt,TouchMouseInput:at,SingleTouchInput:it,Recognizer:mt,AttrRecognizer:vt,Tap:St,Pan:_t,Swipe:Ct,Pinch:yt,Rotate:xt,Press:wt,on:C,off:S,each:g,merge:v,extend:b,assign:l,inherit:_,bindFn:y,prefixed:M}),(void 0!==r?r:"undefined"!=typeof self?self:{}).Hammer=kt,void 0===(n=(function(){return kt}).call(e,i,e,t))||(t.exports=n)}(window,document)},"z+Ro":function(t,e,i){"use strict";function n(t){return t&&"function"==typeof t.schedule}i.d(e,"a",function(){return n})},zUnb:function(t,e,i){"use strict";i.r(e);var n={};i.r(n),i.d(n,"FunctionToString",function(){return hit}),i.d(n,"InboundFilters",function(){return dit});var r=i("fXoL");let s=null;function o(){return s}const a=new r.s("DocumentToken");let l=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(r.Lb)({factory:c,token:t,providedIn:"platform"}),t})();function c(){return Object(r.Zb)(u)}const h=new r.s("Location Initialized");let u=(()=>{class t extends l{constructor(t){super(),this._doc=t,this._init()}_init(){this.location=o().getLocation(),this._history=o().getHistory()}getBaseHrefFromDOM(){return o().getBaseHref(this._doc)}onPopState(t){o().getGlobalEventTarget(this._doc,"window").addEventListener("popstate",t,!1)}onHashChange(t){o().getGlobalEventTarget(this._doc,"window").addEventListener("hashchange",t,!1)}get href(){return this.location.href}get protocol(){return this.location.protocol}get hostname(){return this.location.hostname}get port(){return this.location.port}get pathname(){return this.location.pathname}get search(){return this.location.search}get hash(){return this.location.hash}set pathname(t){this.location.pathname=t}pushState(t,e,i){d()?this._history.pushState(t,e,i):this.location.hash=i}replaceState(t,e,i){d()?this._history.replaceState(t,e,i):this.location.hash=i}forward(){this._history.forward()}back(){this._history.back()}getState(){return this._history.state}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(a))},t.\u0275prov=Object(r.Lb)({factory:p,token:t,providedIn:"platform"}),t})();function d(){return!!window.history.pushState}function p(){return new u(Object(r.Zb)(a))}function f(t,e){if(0==t.length)return e;if(0==e.length)return t;let i=0;return t.endsWith("/")&&i++,e.startsWith("/")&&i++,2==i?t+e.substring(1):1==i?t+e:t+"/"+e}function m(t){const e=t.match(/#|\?|$/),i=e&&e.index||t.length;return t.slice(0,i-("/"===t[i-1]?1:0))+t.slice(i)}function g(t){return t&&"?"!==t[0]?"?"+t:t}let A=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(r.Lb)({factory:b,token:t,providedIn:"root"}),t})();function b(t){const e=Object(r.Zb)(a).location;return new _(Object(r.Zb)(l),e&&e.origin||"")}const v=new r.s("appBaseHref");let _=(()=>{class t extends A{constructor(t,e){if(super(),this._platformLocation=t,null==e&&(e=this._platformLocation.getBaseHrefFromDOM()),null==e)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");this._baseHref=e}onPopState(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)}getBaseHref(){return this._baseHref}prepareExternalUrl(t){return f(this._baseHref,t)}path(t=!1){const e=this._platformLocation.pathname+g(this._platformLocation.search),i=this._platformLocation.hash;return i&&t?`${e}${i}`:e}pushState(t,e,i,n){const r=this.prepareExternalUrl(i+g(n));this._platformLocation.pushState(t,e,r)}replaceState(t,e,i,n){const r=this.prepareExternalUrl(i+g(n));this._platformLocation.replaceState(t,e,r)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(l),r.Zb(v,8))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),y=(()=>{class t extends A{constructor(t,e){super(),this._platformLocation=t,this._baseHref="",null!=e&&(this._baseHref=e)}onPopState(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)}getBaseHref(){return this._baseHref}path(t=!1){let e=this._platformLocation.hash;return null==e&&(e="#"),e.length>0?e.substring(1):e}prepareExternalUrl(t){const e=f(this._baseHref,t);return e.length>0?"#"+e:e}pushState(t,e,i,n){let r=this.prepareExternalUrl(i+g(n));0==r.length&&(r=this._platformLocation.pathname),this._platformLocation.pushState(t,e,r)}replaceState(t,e,i,n){let r=this.prepareExternalUrl(i+g(n));0==r.length&&(r=this._platformLocation.pathname),this._platformLocation.replaceState(t,e,r)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(l),r.Zb(v,8))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),w=(()=>{class t{constructor(t,e){this._subject=new r.o,this._urlChangeListeners=[],this._platformStrategy=t;const i=this._platformStrategy.getBaseHref();this._platformLocation=e,this._baseHref=m(C(i)),this._platformStrategy.onPopState(t=>{this._subject.emit({url:this.path(!0),pop:!0,state:t.state,type:t.type})})}path(t=!1){return this.normalize(this._platformStrategy.path(t))}getState(){return this._platformLocation.getState()}isCurrentPathEqualTo(t,e=""){return this.path()==this.normalize(t+g(e))}normalize(e){return t.stripTrailingSlash(function(t,e){return t&&e.startsWith(t)?e.substring(t.length):e}(this._baseHref,C(e)))}prepareExternalUrl(t){return t&&"/"!==t[0]&&(t="/"+t),this._platformStrategy.prepareExternalUrl(t)}go(t,e="",i=null){this._platformStrategy.pushState(i,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+g(e)),i)}replaceState(t,e="",i=null){this._platformStrategy.replaceState(i,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+g(e)),i)}forward(){this._platformStrategy.forward()}back(){this._platformStrategy.back()}onUrlChange(t){this._urlChangeListeners.push(t),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(t=>{this._notifyUrlChangeListeners(t.url,t.state)}))}_notifyUrlChangeListeners(t="",e){this._urlChangeListeners.forEach(i=>i(t,e))}subscribe(t,e,i){return this._subject.subscribe({next:t,error:e,complete:i})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(A),r.Zb(l))},t.normalizeQueryParams=g,t.joinWithSlash=f,t.stripTrailingSlash=m,t.\u0275prov=Object(r.Lb)({factory:x,token:t,providedIn:"root"}),t})();function x(){return new w(Object(r.Zb)(A),Object(r.Zb)(l))}function C(t){return t.replace(/\/index.html$/,"")}var S=function(t){return t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Few=3]="Few",t[t.Many=4]="Many",t[t.Other=5]="Other",t}({}),k=function(t){return t[t.Format=0]="Format",t[t.Standalone=1]="Standalone",t}({}),E=function(t){return t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short",t}({}),D=function(t){return t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full",t}({}),I=function(t){return t[t.Decimal=0]="Decimal",t[t.Group=1]="Group",t[t.List=2]="List",t[t.PercentSign=3]="PercentSign",t[t.PlusSign=4]="PlusSign",t[t.MinusSign=5]="MinusSign",t[t.Exponential=6]="Exponential",t[t.SuperscriptingExponent=7]="SuperscriptingExponent",t[t.PerMille=8]="PerMille",t[t[1/0]=9]="Infinity",t[t.NaN=10]="NaN",t[t.TimeSeparator=11]="TimeSeparator",t[t.CurrencyDecimal=12]="CurrencyDecimal",t[t.CurrencyGroup=13]="CurrencyGroup",t}({});function P(t,e){return F(Object(r.mb)(t)[r.db.DateFormat],e)}function O(t,e){return F(Object(r.mb)(t)[r.db.TimeFormat],e)}function M(t,e){return F(Object(r.mb)(t)[r.db.DateTimeFormat],e)}function T(t,e){const i=Object(r.mb)(t),n=i[r.db.NumberSymbols][e];if(void 0===n){if(e===I.CurrencyDecimal)return i[r.db.NumberSymbols][I.Decimal];if(e===I.CurrencyGroup)return i[r.db.NumberSymbols][I.Group]}return n}const R=r.pb;function V(t){if(!t[r.db.ExtraData])throw new Error(`Missing extra locale data for the locale "${t[r.db.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function F(t,e){for(let i=e;i>-1;i--)if(void 0!==t[i])return t[i];throw new Error("Locale data API: locale data undefined")}function L(t){const[e,i]=t.split(":");return{hours:+e,minutes:+i}}const U=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,B={},N=/((?:[^GyYMLwWdEabBhHmsSzZO']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;var j=function(t){return t[t.Short=0]="Short",t[t.ShortGMT=1]="ShortGMT",t[t.Long=2]="Long",t[t.Extended=3]="Extended",t}({}),z=function(t){return t[t.FullYear=0]="FullYear",t[t.Month=1]="Month",t[t.Date=2]="Date",t[t.Hours=3]="Hours",t[t.Minutes=4]="Minutes",t[t.Seconds=5]="Seconds",t[t.FractionalSeconds=6]="FractionalSeconds",t[t.Day=7]="Day",t}({}),H=function(t){return t[t.DayPeriods=0]="DayPeriods",t[t.Days=1]="Days",t[t.Months=2]="Months",t[t.Eras=3]="Eras",t}({});function K(t,e,i,n){let r=function(t){if(nt(t))return t;if("number"==typeof t&&!isNaN(t))return new Date(t);if("string"==typeof t){if(t=t.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(t)){const[e,i=1,n=1]=t.split("-").map(t=>+t);return $(e,i-1,n)}const e=parseFloat(t);if(!isNaN(t-e))return new Date(e);let i;if(i=t.match(U))return function(t){const e=new Date(0);let i=0,n=0;const r=t[8]?e.setUTCFullYear:e.setFullYear,s=t[8]?e.setUTCHours:e.setHours;t[9]&&(i=Number(t[9]+t[10]),n=Number(t[9]+t[11])),r.call(e,Number(t[1]),Number(t[2])-1,Number(t[3]));const o=Number(t[4]||0)-i,a=Number(t[5]||0)-n,l=Number(t[6]||0),c=Math.floor(1e3*parseFloat("0."+(t[7]||0)));return s.call(e,o,a,l,c),e}(i)}const e=new Date(t);if(!nt(e))throw new Error(`Unable to convert "${t}" into a date`);return e}(t);e=G(i,e)||e;let s,o=[];for(;e;){if(s=N.exec(e),!s){o.push(e);break}{o=o.concat(s.slice(1));const t=o.pop();if(!t)break;e=t}}let a=r.getTimezoneOffset();n&&(a=it(n,a),r=function(t,e,i){const n=t.getTimezoneOffset();return function(t,e){return(t=new Date(t.getTime())).setMinutes(t.getMinutes()+e),t}(t,-1*(it(e,n)-n))}(r,n));let l="";return o.forEach(t=>{const e=function(t){if(et[t])return et[t];let e;switch(t){case"G":case"GG":case"GGG":e=Y(H.Eras,E.Abbreviated);break;case"GGGG":e=Y(H.Eras,E.Wide);break;case"GGGGG":e=Y(H.Eras,E.Narrow);break;case"y":e=q(z.FullYear,1,0,!1,!0);break;case"yy":e=q(z.FullYear,2,0,!0,!0);break;case"yyy":e=q(z.FullYear,3,0,!1,!0);break;case"yyyy":e=q(z.FullYear,4,0,!1,!0);break;case"Y":e=tt(1);break;case"YY":e=tt(2,!0);break;case"YYY":e=tt(3);break;case"YYYY":e=tt(4);break;case"M":case"L":e=q(z.Month,1,1);break;case"MM":case"LL":e=q(z.Month,2,1);break;case"MMM":e=Y(H.Months,E.Abbreviated);break;case"MMMM":e=Y(H.Months,E.Wide);break;case"MMMMM":e=Y(H.Months,E.Narrow);break;case"LLL":e=Y(H.Months,E.Abbreviated,k.Standalone);break;case"LLLL":e=Y(H.Months,E.Wide,k.Standalone);break;case"LLLLL":e=Y(H.Months,E.Narrow,k.Standalone);break;case"w":e=J(1);break;case"ww":e=J(2);break;case"W":e=J(1,!0);break;case"d":e=q(z.Date,1);break;case"dd":e=q(z.Date,2);break;case"E":case"EE":case"EEE":e=Y(H.Days,E.Abbreviated);break;case"EEEE":e=Y(H.Days,E.Wide);break;case"EEEEE":e=Y(H.Days,E.Narrow);break;case"EEEEEE":e=Y(H.Days,E.Short);break;case"a":case"aa":case"aaa":e=Y(H.DayPeriods,E.Abbreviated);break;case"aaaa":e=Y(H.DayPeriods,E.Wide);break;case"aaaaa":e=Y(H.DayPeriods,E.Narrow);break;case"b":case"bb":case"bbb":e=Y(H.DayPeriods,E.Abbreviated,k.Standalone,!0);break;case"bbbb":e=Y(H.DayPeriods,E.Wide,k.Standalone,!0);break;case"bbbbb":e=Y(H.DayPeriods,E.Narrow,k.Standalone,!0);break;case"B":case"BB":case"BBB":e=Y(H.DayPeriods,E.Abbreviated,k.Format,!0);break;case"BBBB":e=Y(H.DayPeriods,E.Wide,k.Format,!0);break;case"BBBBB":e=Y(H.DayPeriods,E.Narrow,k.Format,!0);break;case"h":e=q(z.Hours,1,-12);break;case"hh":e=q(z.Hours,2,-12);break;case"H":e=q(z.Hours,1);break;case"HH":e=q(z.Hours,2);break;case"m":e=q(z.Minutes,1);break;case"mm":e=q(z.Minutes,2);break;case"s":e=q(z.Seconds,1);break;case"ss":e=q(z.Seconds,2);break;case"S":e=q(z.FractionalSeconds,1);break;case"SS":e=q(z.FractionalSeconds,2);break;case"SSS":e=q(z.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":e=Q(j.Short);break;case"ZZZZZ":e=Q(j.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":e=Q(j.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":e=Q(j.Long);break;default:return null}return et[t]=e,e}(t);l+=e?e(r,i,a):"''"===t?"'":t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}function $(t,e,i){const n=new Date(0);return n.setFullYear(t,e,i),n.setHours(0,0,0),n}function G(t,e){const i=function(t){return Object(r.mb)(t)[r.db.LocaleId]}(t);if(B[i]=B[i]||{},B[i][e])return B[i][e];let n="";switch(e){case"shortDate":n=P(t,D.Short);break;case"mediumDate":n=P(t,D.Medium);break;case"longDate":n=P(t,D.Long);break;case"fullDate":n=P(t,D.Full);break;case"shortTime":n=O(t,D.Short);break;case"mediumTime":n=O(t,D.Medium);break;case"longTime":n=O(t,D.Long);break;case"fullTime":n=O(t,D.Full);break;case"short":const e=G(t,"shortTime"),i=G(t,"shortDate");n=W(M(t,D.Short),[e,i]);break;case"medium":const r=G(t,"mediumTime"),s=G(t,"mediumDate");n=W(M(t,D.Medium),[r,s]);break;case"long":const o=G(t,"longTime"),a=G(t,"longDate");n=W(M(t,D.Long),[o,a]);break;case"full":const l=G(t,"fullTime"),c=G(t,"fullDate");n=W(M(t,D.Full),[l,c])}return n&&(B[i][e]=n),n}function W(t,e){return e&&(t=t.replace(/\{([^}]+)}/g,function(t,i){return null!=e&&i in e?e[i]:t})),t}function Z(t,e,i="-",n,r){let s="";(t<0||r&&t<=0)&&(r?t=1-t:(t=-t,s=i));let o=String(t);for(;o.length<e;)o="0"+o;return n&&(o=o.substr(o.length-e)),s+o}function q(t,e,i=0,n=!1,r=!1){return function(s,o){let a=function(t,e){switch(t){case z.FullYear:return e.getFullYear();case z.Month:return e.getMonth();case z.Date:return e.getDate();case z.Hours:return e.getHours();case z.Minutes:return e.getMinutes();case z.Seconds:return e.getSeconds();case z.FractionalSeconds:return e.getMilliseconds();case z.Day:return e.getDay();default:throw new Error(`Unknown DateType value "${t}".`)}}(t,s);if((i>0||a>-i)&&(a+=i),t===z.Hours)0===a&&-12===i&&(a=12);else if(t===z.FractionalSeconds)return l=e,Z(a,3).substr(0,l);var l;const c=T(o,I.MinusSign);return Z(a,e,c,n,r)}}function Y(t,e,i=k.Format,n=!1){return function(s,o){return function(t,e,i,n,s,o){switch(i){case H.Months:return function(t,e,i){const n=Object(r.mb)(t),s=F([n[r.db.MonthsFormat],n[r.db.MonthsStandalone]],e);return F(s,i)}(e,s,n)[t.getMonth()];case H.Days:return function(t,e,i){const n=Object(r.mb)(t),s=F([n[r.db.DaysFormat],n[r.db.DaysStandalone]],e);return F(s,i)}(e,s,n)[t.getDay()];case H.DayPeriods:const a=t.getHours(),l=t.getMinutes();if(o){const t=function(t){const e=Object(r.mb)(t);return V(e),(e[r.db.ExtraData][2]||[]).map(t=>"string"==typeof t?L(t):[L(t[0]),L(t[1])])}(e),i=function(t,e,i){const n=Object(r.mb)(t);V(n);const s=F([n[r.db.ExtraData][0],n[r.db.ExtraData][1]],e)||[];return F(s,i)||[]}(e,s,n),o=t.findIndex(t=>{if(Array.isArray(t)){const[e,i]=t,n=a>=e.hours&&l>=e.minutes,r=a<i.hours||a===i.hours&&l<i.minutes;if(e.hours<i.hours){if(n&&r)return!0}else if(n||r)return!0}else if(t.hours===a&&t.minutes===l)return!0;return!1});if(-1!==o)return i[o]}return function(t,e,i){const n=Object(r.mb)(t),s=F([n[r.db.DayPeriodsFormat],n[r.db.DayPeriodsStandalone]],e);return F(s,i)}(e,s,n)[a<12?0:1];case H.Eras:return function(t,e){return F(Object(r.mb)(t)[r.db.Eras],e)}(e,n)[t.getFullYear()<=0?0:1];default:throw new Error(`unexpected translation type ${i}`)}}(s,o,t,e,i,n)}}function Q(t){return function(e,i,n){const r=-1*n,s=T(i,I.MinusSign),o=r>0?Math.floor(r/60):Math.ceil(r/60);switch(t){case j.Short:return(r>=0?"+":"")+Z(o,2,s)+Z(Math.abs(r%60),2,s);case j.ShortGMT:return"GMT"+(r>=0?"+":"")+Z(o,1,s);case j.Long:return"GMT"+(r>=0?"+":"")+Z(o,2,s)+":"+Z(Math.abs(r%60),2,s);case j.Extended:return 0===n?"Z":(r>=0?"+":"")+Z(o,2,s)+":"+Z(Math.abs(r%60),2,s);default:throw new Error(`Unknown zone width "${t}"`)}}}function X(t){return $(t.getFullYear(),t.getMonth(),t.getDate()+(4-t.getDay()))}function J(t,e=!1){return function(i,n){let r;if(e){const t=new Date(i.getFullYear(),i.getMonth(),1).getDay()-1,e=i.getDate();r=1+Math.floor((e+t)/7)}else{const t=X(i),e=function(t){const e=$(t,0,1).getDay();return $(t,0,1+(e<=4?4:11)-e)}(t.getFullYear()),n=t.getTime()-e.getTime();r=1+Math.round(n/6048e5)}return Z(r,t,T(n,I.MinusSign))}}function tt(t,e=!1){return function(i,n){return Z(X(i).getFullYear(),t,T(n,I.MinusSign),e)}}const et={};function it(t,e){t=t.replace(/:/g,"");const i=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(i)?e:i}function nt(t){return t instanceof Date&&!isNaN(t.valueOf())}class rt{}let st=(()=>{class t extends rt{constructor(t){super(),this.locale=t}getPluralCategory(t,e){switch(R(e||this.locale)(t)){case S.Zero:return"zero";case S.One:return"one";case S.Two:return"two";case S.Few:return"few";case S.Many:return"many";default:return"other"}}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.w))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();function ot(t,e){e=encodeURIComponent(e);for(const i of t.split(";")){const t=i.indexOf("="),[n,r]=-1==t?[i,""]:[i.slice(0,t),i.slice(t+1)];if(n.trim()===e)return decodeURIComponent(r)}return null}let at=(()=>{class t{constructor(t,e,i,n){this._iterableDiffers=t,this._keyValueDiffers=e,this._ngEl=i,this._renderer=n,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}set klass(t){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof t?t.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}set ngClass(t){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof t?t.split(/\s+/):t,this._rawClass&&(Object(r.sb)(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}ngDoCheck(){if(this._iterableDiffer){const t=this._iterableDiffer.diff(this._rawClass);t&&this._applyIterableChanges(t)}else if(this._keyValueDiffer){const t=this._keyValueDiffer.diff(this._rawClass);t&&this._applyKeyValueChanges(t)}}_applyKeyValueChanges(t){t.forEachAddedItem(t=>this._toggleClass(t.key,t.currentValue)),t.forEachChangedItem(t=>this._toggleClass(t.key,t.currentValue)),t.forEachRemovedItem(t=>{t.previousValue&&this._toggleClass(t.key,!1)})}_applyIterableChanges(t){t.forEachAddedItem(t=>{if("string"!=typeof t.item)throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${Object(r.yb)(t.item)}`);this._toggleClass(t.item,!0)}),t.forEachRemovedItem(t=>this._toggleClass(t.item,!1))}_applyClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(t=>this._toggleClass(t,!0)):Object.keys(t).forEach(e=>this._toggleClass(e,!!t[e])))}_removeClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(t=>this._toggleClass(t,!1)):Object.keys(t).forEach(t=>this._toggleClass(t,!1)))}_toggleClass(t,e){(t=t.trim())&&t.split(/\s+/g).forEach(t=>{e?this._renderer.addClass(this._ngEl.nativeElement,t):this._renderer.removeClass(this._ngEl.nativeElement,t)})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.u),r.Pb(r.v),r.Pb(r.l),r.Pb(r.H))},t.\u0275dir=r.Kb({type:t,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),t})();class lt{constructor(t,e,i,n){this.$implicit=t,this.ngForOf=e,this.index=i,this.count=n}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let ct=(()=>{class t{constructor(t,e,i){this._viewContainer=t,this._template=e,this._differs=i,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const e=this._ngForOf;if(!this._differ&&e)try{this._differ=this._differs.find(e).create(this.ngForTrackBy)}catch(Knt){throw new Error(`Cannot find a differ supporting object '${e}' of type '${t=e,t.name||typeof t}'. NgFor only supports binding to Iterables such as Arrays.`)}}var t;if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const e=[];t.forEachOperation((t,i,n)=>{if(null==t.previousIndex){const i=this._viewContainer.createEmbeddedView(this._template,new lt(null,this._ngForOf,-1,-1),null===n?void 0:n),r=new ht(t,i);e.push(r)}else if(null==n)this._viewContainer.remove(null===i?void 0:i);else if(null!==i){const r=this._viewContainer.get(i);this._viewContainer.move(r,n);const s=new ht(t,r);e.push(s)}});for(let i=0;i<e.length;i++)this._perViewChange(e[i].view,e[i].record);for(let i=0,n=this._viewContainer.length;i<n;i++){const t=this._viewContainer.get(i);t.context.index=i,t.context.count=n,t.context.ngForOf=this._ngForOf}t.forEachIdentityChange(t=>{this._viewContainer.get(t.currentIndex).context.$implicit=t.item})}_perViewChange(t,e){t.context.$implicit=e.item}static ngTemplateContextGuard(t,e){return!0}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.S),r.Pb(r.O),r.Pb(r.u))},t.\u0275dir=r.Kb({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),t})();class ht{constructor(t,e){this.record=t,this.view=e}}let ut=(()=>{class t{constructor(t,e){this._viewContainer=t,this._context=new dt,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=e}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){pt("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){pt("ngIfElse",t),this._elseTemplateRef=t,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(t,e){return!0}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.S),r.Pb(r.O))},t.\u0275dir=r.Kb({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),t})();class dt{constructor(){this.$implicit=null,this.ngIf=null}}function pt(t,e){if(e&&!e.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${Object(r.yb)(e)}'.`)}class ft{constructor(t,e){this._viewContainerRef=t,this._templateRef=e,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(t){t&&!this._created?this.create():!t&&this._created&&this.destroy()}}let mt=(()=>{class t{constructor(){this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(t){this._ngSwitch=t,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(t){this._defaultViews||(this._defaultViews=[]),this._defaultViews.push(t)}_matchCase(t){const e=t==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||e,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),e}_updateDefaultCases(t){if(this._defaultViews&&t!==this._defaultUsed){this._defaultUsed=t;for(let e=0;e<this._defaultViews.length;e++)this._defaultViews[e].enforceState(t)}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"}}),t})(),gt=(()=>{class t{constructor(t,e,i){this.ngSwitch=i,i._addCase(),this._view=new ft(t,e)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.S),r.Pb(r.O),r.Pb(mt,1))},t.\u0275dir=r.Kb({type:t,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"}}),t})(),At=(()=>{class t{constructor(t,e,i){i._addDefault(new ft(t,e))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.S),r.Pb(r.O),r.Pb(mt,1))},t.\u0275dir=r.Kb({type:t,selectors:[["","ngSwitchDefault",""]]}),t})(),bt=(()=>{class t{constructor(t,e,i){this._ngEl=t,this._differs=e,this._renderer=i,this._ngStyle=null,this._differ=null}set ngStyle(t){this._ngStyle=t,!this._differ&&t&&(this._differ=this._differs.find(t).create())}ngDoCheck(){if(this._differ){const t=this._differ.diff(this._ngStyle);t&&this._applyChanges(t)}}_setStyle(t,e){const[i,n]=t.split(".");null!=(e=null!=e&&n?`${e}${n}`:e)?this._renderer.setStyle(this._ngEl.nativeElement,i,e):this._renderer.removeStyle(this._ngEl.nativeElement,i)}_applyChanges(t){t.forEachRemovedItem(t=>this._setStyle(t.key,null)),t.forEachAddedItem(t=>this._setStyle(t.key,t.currentValue)),t.forEachChangedItem(t=>this._setStyle(t.key,t.currentValue))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.v),r.Pb(r.H))},t.\u0275dir=r.Kb({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}}),t})(),vt=(()=>{class t{constructor(t){this._viewContainerRef=t,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null}ngOnChanges(t){if(this._shouldRecreateView(t)){const t=this._viewContainerRef;this._viewRef&&t.remove(t.indexOf(this._viewRef)),this._viewRef=this.ngTemplateOutlet?t.createEmbeddedView(this.ngTemplateOutlet,this.ngTemplateOutletContext):null}else this._viewRef&&this.ngTemplateOutletContext&&this._updateExistingContext(this.ngTemplateOutletContext)}_shouldRecreateView(t){const e=t.ngTemplateOutletContext;return!!t.ngTemplateOutlet||e&&this._hasContextShapeChanged(e)}_hasContextShapeChanged(t){const e=Object.keys(t.previousValue||{}),i=Object.keys(t.currentValue||{});if(e.length===i.length){for(let t of i)if(-1===e.indexOf(t))return!0;return!1}return!0}_updateExistingContext(t){for(let e of Object.keys(t))this._viewRef.context[e]=this.ngTemplateOutletContext[e]}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.S))},t.\u0275dir=r.Kb({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet"},features:[r.Bb]}),t})();function _t(t,e){return Error(`InvalidPipeArgument: '${e}' for pipe '${Object(r.yb)(t)}'`)}class yt{createSubscription(t,e){return t.subscribe({next:e,error:t=>{throw t}})}dispose(t){t.unsubscribe()}onDestroy(t){t.unsubscribe()}}class wt{createSubscription(t,e){return t.then(e,t=>{throw t})}dispose(t){}onDestroy(t){}}const xt=new wt,Ct=new yt;let St=(()=>{class t{constructor(t){this._ref=t,this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null}ngOnDestroy(){this._subscription&&this._dispose()}transform(t){return this._obj?t!==this._obj?(this._dispose(),this.transform(t)):this._latestValue:(t&&this._subscribe(t),this._latestValue)}_subscribe(t){this._obj=t,this._strategy=this._selectStrategy(t),this._subscription=this._strategy.createSubscription(t,e=>this._updateLatestValue(t,e))}_selectStrategy(e){if(Object(r.ub)(e))return xt;if(Object(r.vb)(e))return Ct;throw _t(t,e)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(t,e){t===this._obj&&(this._latestValue=e,this._ref.markForCheck())}}return t.\u0275fac=function(e){return new(e||t)(r.bc())},t.\u0275pipe=r.Ob({name:"async",type:t,pure:!1}),t})(),kt=(()=>{class t{constructor(t){this.locale=t}transform(e,i="mediumDate",n,r){if(null==e||""===e||e!=e)return null;try{return K(e,i,r||this.locale,n)}catch(s){throw _t(t,s.message)}}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.w))},t.\u0275pipe=r.Ob({name:"date",type:t,pure:!0}),t})(),Et=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[{provide:rt,useClass:st}]}),t})();function Dt(t){return"browser"===t}let It=(()=>{class t{}return t.\u0275prov=Object(r.Lb)({token:t,providedIn:"root",factory:()=>new Pt(Object(r.Zb)(a),window)}),t})();class Pt{constructor(t,e){this.document=t,this.window=e,this.offset=()=>[0,0]}setOffset(t){this.offset=Array.isArray(t)?()=>t:t}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(t){this.supportsScrolling()&&this.window.scrollTo(t[0],t[1])}scrollToAnchor(t){var e;if(!this.supportsScrolling())return;const i=null!==(e=this.document.getElementById(t))&&void 0!==e?e:this.document.getElementsByName(t)[0];void 0!==i&&(this.scrollToElement(i),this.attemptFocus(i))}setHistoryScrollRestoration(t){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=t)}}scrollToElement(t){const e=t.getBoundingClientRect(),i=e.left+this.window.pageXOffset,n=e.top+this.window.pageYOffset,r=this.offset();this.window.scrollTo(i-r[0],n-r[1])}attemptFocus(t){return t.focus(),this.document.activeElement===t}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const t=Ot(this.window.history)||Ot(Object.getPrototypeOf(this.window.history));return!(!t||!t.writable&&!t.set)}catch(Knt){return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch(Knt){return!1}}}function Ot(t){return Object.getOwnPropertyDescriptor(t,"scrollRestoration")}class Mt extends class extends class{}{constructor(){super()}supportsDOMEvents(){return!0}}{static makeCurrent(){var t;t=new Mt,s||(s=t)}getProperty(t,e){return t[e]}log(t){window.console&&window.console.log&&window.console.log(t)}logGroup(t){window.console&&window.console.group&&window.console.group(t)}logGroupEnd(){window.console&&window.console.groupEnd&&window.console.groupEnd()}onAndCancel(t,e,i){return t.addEventListener(e,i,!1),()=>{t.removeEventListener(e,i,!1)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){return t.parentNode&&t.parentNode.removeChild(t),t}getValue(t){return t.value}createElement(t,e){return(e=e||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null}getHistory(){return window.history}getLocation(){return window.location}getBaseHref(t){const e=Rt||(Rt=document.querySelector("base"),Rt)?Rt.getAttribute("href"):null;return null==e?null:(i=e,Tt||(Tt=document.createElement("a")),Tt.setAttribute("href",i),"/"===Tt.pathname.charAt(0)?Tt.pathname:"/"+Tt.pathname);var i}resetBaseElement(){Rt=null}getUserAgent(){return window.navigator.userAgent}performanceNow(){return window.performance&&window.performance.now?window.performance.now():(new Date).getTime()}supportsCookies(){return!0}getCookie(t){return ot(document.cookie,t)}}let Tt,Rt=null;const Vt=new r.s("TRANSITION_ID"),Ft=[{provide:r.d,useFactory:function(t,e,i){return()=>{i.get(r.e).donePromise.then(()=>{const i=o();Array.prototype.slice.apply(e.querySelectorAll("style[ng-transition]")).filter(e=>e.getAttribute("ng-transition")===t).forEach(t=>i.remove(t))})}},deps:[Vt,a,r.t],multi:!0}];class Lt{static init(){Object(r.ab)(new Lt)}addToWindow(t){r.rb.getAngularTestability=(e,i=!0)=>{const n=t.findTestabilityInTree(e,i);if(null==n)throw new Error("Could not find testability for element.");return n},r.rb.getAllAngularTestabilities=()=>t.getAllTestabilities(),r.rb.getAllAngularRootElements=()=>t.getAllRootElements(),r.rb.frameworkStabilizers||(r.rb.frameworkStabilizers=[]),r.rb.frameworkStabilizers.push(t=>{const e=r.rb.getAllAngularTestabilities();let i=e.length,n=!1;const s=function(e){n=n||e,i--,0==i&&t(n)};e.forEach(function(t){t.whenStable(s)})})}findTestabilityInTree(t,e,i){if(null==e)return null;const n=t.getTestability(e);return null!=n?n:i?o().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null}}const Ut=new r.s("EventManagerPlugins");let Bt=(()=>{class t{constructor(t,e){this._zone=e,this._eventNameToPlugin=new Map,t.forEach(t=>t.manager=this),this._plugins=t.slice().reverse()}addEventListener(t,e,i){return this._findPluginFor(e).addEventListener(t,e,i)}addGlobalEventListener(t,e,i){return this._findPluginFor(e).addGlobalEventListener(t,e,i)}getZone(){return this._zone}_findPluginFor(t){const e=this._eventNameToPlugin.get(t);if(e)return e;const i=this._plugins;for(let n=0;n<i.length;n++){const e=i[n];if(e.supports(t))return this._eventNameToPlugin.set(t,e),e}throw new Error(`No event manager plugin found for event ${t}`)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Ut),r.Zb(r.B))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();class Nt{constructor(t){this._doc=t}addGlobalEventListener(t,e,i){const n=o().getGlobalEventTarget(this._doc,t);if(!n)throw new Error(`Unsupported event target ${n} for event ${e}`);return this.addEventListener(n,e,i)}}let jt=(()=>{class t{constructor(){this._stylesSet=new Set}addStyles(t){const e=new Set;t.forEach(t=>{this._stylesSet.has(t)||(this._stylesSet.add(t),e.add(t))}),this.onStylesAdded(e)}onStylesAdded(t){}getAllStyles(){return Array.from(this._stylesSet)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),zt=(()=>{class t extends jt{constructor(t){super(),this._doc=t,this._hostNodes=new Set,this._styleNodes=new Set,this._hostNodes.add(t.head)}_addStylesToHost(t,e){t.forEach(t=>{const i=this._doc.createElement("style");i.textContent=t,this._styleNodes.add(e.appendChild(i))})}addHost(t){this._addStylesToHost(this._stylesSet,t),this._hostNodes.add(t)}removeHost(t){this._hostNodes.delete(t)}onStylesAdded(t){this._hostNodes.forEach(e=>this._addStylesToHost(t,e))}ngOnDestroy(){this._styleNodes.forEach(t=>o().remove(t))}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(a))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();const Ht={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Kt=/%COMP%/g;function $t(t,e,i){for(let n=0;n<e.length;n++){let r=e[n];Array.isArray(r)?$t(t,r,i):(r=r.replace(Kt,t),i.push(r))}return i}function Gt(t){return e=>{if("__ngUnwrap__"===e)return t;!1===t(e)&&(e.preventDefault(),e.returnValue=!1)}}let Wt=(()=>{class t{constructor(t,e,i){this.eventManager=t,this.sharedStylesHost=e,this.appId=i,this.rendererByCompId=new Map,this.defaultRenderer=new Zt(t)}createRenderer(t,e){if(!t||!e)return this.defaultRenderer;switch(e.encapsulation){case r.T.Emulated:{let i=this.rendererByCompId.get(e.id);return i||(i=new qt(this.eventManager,this.sharedStylesHost,e,this.appId),this.rendererByCompId.set(e.id,i)),i.applyToHost(t),i}case 1:case r.T.ShadowDom:return new Yt(this.eventManager,this.sharedStylesHost,t,e);default:if(!this.rendererByCompId.has(e.id)){const t=$t(e.id,e.styles,[]);this.sharedStylesHost.addStyles(t),this.rendererByCompId.set(e.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Bt),r.Zb(zt),r.Zb(r.c))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();class Zt{constructor(t){this.eventManager=t,this.data=Object.create(null)}destroy(){}createElement(t,e){return e?document.createElementNS(Ht[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){t.appendChild(e)}insertBefore(t,e,i){t&&t.insertBefore(e,i)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t,e){let i="string"==typeof t?document.querySelector(t):t;if(!i)throw new Error(`The selector "${t}" did not match any elements`);return e||(i.textContent=""),i}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,i,n){if(n){e=n+":"+e;const r=Ht[n];r?t.setAttributeNS(r,e,i):t.setAttribute(e,i)}else t.setAttribute(e,i)}removeAttribute(t,e,i){if(i){const n=Ht[i];n?t.removeAttributeNS(n,e):t.removeAttribute(`${i}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,i,n){n&(r.J.DashCase|r.J.Important)?t.style.setProperty(e,i,n&r.J.Important?"important":""):t.style[e]=i}removeStyle(t,e,i){i&r.J.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,i){t[e]=i}setValue(t,e){t.nodeValue=e}listen(t,e,i){return"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,Gt(i)):this.eventManager.addEventListener(t,e,Gt(i))}}class qt extends Zt{constructor(t,e,i,n){super(t),this.component=i;const r=$t(n+"-"+i.id,i.styles,[]);e.addStyles(r),this.contentAttr="_ngcontent-%COMP%".replace(Kt,n+"-"+i.id),this.hostAttr="_nghost-%COMP%".replace(Kt,n+"-"+i.id)}applyToHost(t){super.setAttribute(t,this.hostAttr,"")}createElement(t,e){const i=super.createElement(t,e);return super.setAttribute(i,this.contentAttr,""),i}}class Yt extends Zt{constructor(t,e,i,n){super(t),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const r=$t(n.id,n.styles,[]);for(let s=0;s<r.length;s++){const t=document.createElement("style");t.textContent=r[s],this.shadowRoot.appendChild(t)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,i){return super.insertBefore(this.nodeOrShadowRoot(t),e,i)}removeChild(t,e){return super.removeChild(this.nodeOrShadowRoot(t),e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}}let Qt=(()=>{class t extends Nt{constructor(t){super(t)}supports(t){return!0}addEventListener(t,e,i){return t.addEventListener(e,i,!1),()=>this.removeEventListener(t,e,i)}removeEventListener(t,e,i){return t.removeEventListener(e,i)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(a))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();const Xt=["alt","control","meta","shift"],Jt={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},te={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"},ee={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};let ie=(()=>{class t extends Nt{constructor(t){super(t)}supports(e){return null!=t.parseEventName(e)}addEventListener(e,i,n){const r=t.parseEventName(i),s=t.eventCallback(r.fullKey,n,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>o().onAndCancel(e,r.domEventName,s))}static parseEventName(e){const i=e.toLowerCase().split("."),n=i.shift();if(0===i.length||"keydown"!==n&&"keyup"!==n)return null;const r=t._normalizeKey(i.pop());let s="";if(Xt.forEach(t=>{const e=i.indexOf(t);e>-1&&(i.splice(e,1),s+=t+".")}),s+=r,0!=i.length||0===r.length)return null;const o={};return o.domEventName=n,o.fullKey=s,o}static getEventFullKey(t){let e="",i=function(t){let e=t.key;if(null==e){if(e=t.keyIdentifier,null==e)return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===t.location&&te.hasOwnProperty(e)&&(e=te[e]))}return Jt[e]||e}(t);return i=i.toLowerCase()," "===i?i="space":"."===i&&(i="dot"),Xt.forEach(n=>{n!=i&&(0,ee[n])(t)&&(e+=n+".")}),e+=i,e}static eventCallback(e,i,n){return r=>{t.getEventFullKey(r)===e&&n.runGuarded(()=>i(r))}}static _normalizeKey(t){switch(t){case"esc":return"escape";default:return t}}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(a))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),ne=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(r.Lb)({factory:function(){return Object(r.Zb)(re)},token:t,providedIn:"root"}),t})(),re=(()=>{class t extends ne{constructor(t){super(),this._doc=t}sanitize(t,e){if(null==e)return null;switch(t){case r.L.NONE:return e;case r.L.HTML:return Object(r.gb)(e,"HTML")?Object(r.zb)(e):Object(r.eb)(this._doc,String(e)).toString();case r.L.STYLE:return Object(r.gb)(e,"Style")?Object(r.zb)(e):e;case r.L.SCRIPT:if(Object(r.gb)(e,"Script"))return Object(r.zb)(e);throw new Error("unsafe value used in a script context");case r.L.URL:return Object(r.qb)(e),Object(r.gb)(e,"URL")?Object(r.zb)(e):Object(r.fb)(String(e));case r.L.RESOURCE_URL:if(Object(r.gb)(e,"ResourceURL"))return Object(r.zb)(e);throw new Error("unsafe value used in a resource URL context (see https://g.co/ng/security#xss)");default:throw new Error(`Unexpected SecurityContext ${t} (see https://g.co/ng/security#xss)`)}}bypassSecurityTrustHtml(t){return Object(r.hb)(t)}bypassSecurityTrustStyle(t){return Object(r.kb)(t)}bypassSecurityTrustScript(t){return Object(r.jb)(t)}bypassSecurityTrustUrl(t){return Object(r.lb)(t)}bypassSecurityTrustResourceUrl(t){return Object(r.ib)(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(a))},t.\u0275prov=Object(r.Lb)({factory:function(){return t=Object(r.Zb)(r.p),new re(t.get(a));var t},token:t,providedIn:"root"}),t})();const se=[{provide:r.D,useValue:"browser"},{provide:r.E,useValue:function(){Mt.makeCurrent(),Lt.init()},multi:!0},{provide:a,useFactory:function(){return Object(r.xb)(document),document},deps:[]}],oe=Object(r.U)(r.Z,"browser",se),ae=[[],{provide:r.cb,useValue:"root"},{provide:r.n,useFactory:function(){return new r.n},deps:[]},{provide:Ut,useClass:Qt,multi:!0,deps:[a,r.B,r.D]},{provide:Ut,useClass:ie,multi:!0,deps:[a]},[],{provide:Wt,useClass:Wt,deps:[Bt,zt,r.c]},{provide:r.I,useExisting:Wt},{provide:jt,useExisting:zt},{provide:zt,useClass:zt,deps:[a]},{provide:r.P,useClass:r.P,deps:[r.B]},{provide:Bt,useClass:Bt,deps:[Ut,r.B]},[]];let le=(()=>{class t{constructor(t){if(t)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}static withServerTransition(e){return{ngModule:t,providers:[{provide:r.c,useValue:e.appId},{provide:Vt,useExisting:r.c},Ft]}}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(t,12))},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:ae,imports:[Et,r.f]}),t})();function ce(){return new he(Object(r.Zb)(a))}let he=(()=>{class t{constructor(t){this._doc=t}getTitle(){return this._doc.title}setTitle(t){this._doc.title=t||""}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(a))},t.\u0275prov=Object(r.Lb)({factory:ce,token:t,providedIn:"root"}),t})();"undefined"!=typeof window&&window,i("yLV6");var ue=i("mrSG");class de{attach(t){return this._attachedHost=t,t.attach(this)}detach(){let t=this._attachedHost;null!=t&&(this._attachedHost=null,t.detach())}get isAttached(){return null!=this._attachedHost}setAttachedHost(t){this._attachedHost=t}}class pe extends de{constructor(t,e,i,n){super(),this.component=t,this.viewContainerRef=e,this.injector=i,this.componentFactoryResolver=n}}class fe extends de{constructor(t,e,i){super(),this.templateRef=t,this.viewContainerRef=e,this.context=i}get origin(){return this.templateRef.elementRef}attach(t,e=this.context){return this.context=e,super.attach(t)}detach(){return this.context=void 0,super.detach()}}class me extends de{constructor(t){super(),this.element=t instanceof r.l?t.nativeElement:t}}class ge{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){return t instanceof pe?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof fe?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof me?(this._attachedPortal=t,this.attachDomPortal(t)):void 0}detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(t){this._disposeFn=t}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}}class Ae extends ge{constructor(t,e,i,n,r){super(),this.outletElement=t,this._componentFactoryResolver=e,this._appRef=i,this._defaultInjector=n,this.attachDomPortal=t=>{const e=t.element,i=this._document.createComment("dom-portal");e.parentNode.insertBefore(i,e),this.outletElement.appendChild(e),super.setDisposeFn(()=>{i.parentNode&&i.parentNode.replaceChild(e,i)})},this._document=r}attachComponentPortal(t){const e=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component);let i;return t.viewContainerRef?(i=t.viewContainerRef.createComponent(e,t.viewContainerRef.length,t.injector||t.viewContainerRef.injector),this.setDisposeFn(()=>i.destroy())):(i=e.create(t.injector||this._defaultInjector),this._appRef.attachView(i.hostView),this.setDisposeFn(()=>{this._appRef.detachView(i.hostView),i.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(i)),i}attachTemplatePortal(t){let e=t.viewContainerRef,i=e.createEmbeddedView(t.templateRef,t.context);return i.rootNodes.forEach(t=>this.outletElement.appendChild(t)),i.detectChanges(),this.setDisposeFn(()=>{let t=e.indexOf(i);-1!==t&&e.remove(t)}),i}dispose(){super.dispose(),null!=this.outletElement.parentNode&&this.outletElement.parentNode.removeChild(this.outletElement)}_getComponentRootNode(t){return t.hostView.rootNodes[0]}}let be=(()=>{class t extends ge{constructor(t,e,i){super(),this._componentFactoryResolver=t,this._viewContainerRef=e,this._isInitialized=!1,this.attached=new r.o,this.attachDomPortal=t=>{const e=t.element,i=this._document.createComment("dom-portal");t.setAttachedHost(this),e.parentNode.insertBefore(i,e),this._getRootNode().appendChild(e),super.setDisposeFn(()=>{i.parentNode&&i.parentNode.replaceChild(e,i)})},this._document=i}get portal(){return this._attachedPortal}set portal(t){(!this.hasAttached()||t||this._isInitialized)&&(this.hasAttached()&&super.detach(),t&&super.attach(t),this._attachedPortal=t)}get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedPortal=null,this._attachedRef=null}attachComponentPortal(t){t.setAttachedHost(this);const e=null!=t.viewContainerRef?t.viewContainerRef:this._viewContainerRef,i=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component),n=e.createComponent(i,e.length,t.injector||e.injector);return e!==this._viewContainerRef&&this._getRootNode().appendChild(n.hostView.rootNodes[0]),super.setDisposeFn(()=>n.destroy()),this._attachedPortal=t,this._attachedRef=n,this.attached.emit(n),n}attachTemplatePortal(t){t.setAttachedHost(this);const e=this._viewContainerRef.createEmbeddedView(t.templateRef,t.context);return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=t,this._attachedRef=e,this.attached.emit(e),e}_getRootNode(){const t=this._viewContainerRef.element.nativeElement;return t.nodeType===t.ELEMENT_NODE?t:t.parentNode}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.j),r.Pb(r.S),r.Pb(a))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[r.Ab]}),t})(),ve=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({}),t})();var _e=i("XNiG"),ye=i("quSY"),we=i("z+Ro"),xe=i("yCtX"),Ce=i("jZKg");function Se(...t){let e=t[t.length-1];return Object(we.a)(e)?(t.pop(),Object(Ce.a)(t,e)):Object(xe.a)(t)}function ke(t,...e){return e.length?e.some(e=>t[e]):t.altKey||t.shiftKey||t.ctrlKey||t.metaKey}var Ee=i("7o/Q");function De(){}var Ie=i("n6bG");function Pe(t,e,i){return function(n){return n.lift(new Oe(t,e,i))}}class Oe{constructor(t,e,i){this.nextOrObserver=t,this.error=e,this.complete=i}call(t,e){return e.subscribe(new Me(t,this.nextOrObserver,this.error,this.complete))}}class Me extends Ee.a{constructor(t,e,i,n){super(t),this._tapNext=De,this._tapError=De,this._tapComplete=De,this._tapError=i||De,this._tapComplete=n||De,Object(Ie.a)(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||De,this._tapError=e.error||De,this._tapComplete=e.complete||De)}_next(t){try{this._tapNext.call(this._context,t)}catch(e){return void this.destination.error(e)}this.destination.next(t)}_error(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)}_complete(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}class Te extends ye.a{constructor(t,e){super()}schedule(t,e=0){return this}}class Re extends Te{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){if(this.closed)return this;this.state=t;const i=this.id,n=this.scheduler;return null!=i&&(this.id=this.recycleAsyncId(n,i,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(n,this.id,e),this}requestAsyncId(t,e,i=0){return setInterval(t.flush.bind(t,this),i)}recycleAsyncId(t,e,i=0){if(null!==i&&this.delay===i&&!1===this.pending)return e;clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(t,e);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let i,n=!1;try{this.work(t)}catch(r){n=!0,i=!!r&&r||new Error(r)}if(n)return this.unsubscribe(),i}_unsubscribe(){const t=this.id,e=this.scheduler,i=e.actions,n=i.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==n&&i.splice(n,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null}}let Ve=(()=>{class t{constructor(e,i=t.now){this.SchedulerAction=e,this.now=i}schedule(t,e=0,i){return new this.SchedulerAction(this,t).schedule(i,e)}}return t.now=()=>Date.now(),t})();class Fe extends Ve{constructor(t,e=Ve.now){super(t,()=>Fe.delegate&&Fe.delegate!==this?Fe.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(t,e=0,i){return Fe.delegate&&Fe.delegate!==this?Fe.delegate.schedule(t,e,i):super.schedule(t,e,i)}flush(t){const{actions:e}=this;if(this.active)return void e.push(t);let i;this.active=!0;do{if(i=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,i){for(;t=e.shift();)t.unsubscribe();throw i}}}const Le=new Fe(Re),Ue=Le;function Be(t,e=Ue){return i=>i.lift(new Ne(t,e))}class Ne{constructor(t,e){this.dueTime=t,this.scheduler=e}call(t,e){return e.subscribe(new je(t,this.dueTime,this.scheduler))}}class je extends Ee.a{constructor(t,e,i){super(t),this.dueTime=e,this.scheduler=i,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(ze,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:t}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}}clearDebounce(){const t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)}}function ze(t){t.debouncedNext()}function He(t,e){return function(i){return i.lift(new Ke(t,e))}}class Ke{constructor(t,e){this.predicate=t,this.thisArg=e}call(t,e){return e.subscribe(new $e(t,this.predicate,this.thisArg))}}class $e extends Ee.a{constructor(t,e,i){super(t),this.predicate=e,this.thisArg=i,this.count=0}_next(t){let e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(i){return void this.destination.error(i)}e&&this.destination.next(t)}}var Ge=i("lJxs");const We=(()=>{function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t})();var Ze=i("HDdC");const qe=new Ze.a(t=>t.complete());function Ye(t){return t?function(t){return new Ze.a(e=>t.schedule(()=>e.complete()))}(t):qe}function Qe(t){return e=>0===t?Ye():e.lift(new Xe(t))}class Xe{constructor(t){if(this.total=t,this.total<0)throw new We}call(t,e){return e.subscribe(new Je(t,this.total))}}class Je extends Ee.a{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){const e=this.total,i=++this.count;i<=e&&(this.destination.next(t),i===e&&(this.destination.complete(),this.unsubscribe()))}}function ti(t){return null!=t&&"false"!=`${t}`}function ei(t,e=0){return ii(t)?Number(t):e}function ii(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}function ni(t){return Array.isArray(t)?t:[t]}function ri(t){return null==t?"":"string"==typeof t?t:`${t}px`}function si(t){return t instanceof r.l?t.nativeElement:t}function oi(t,e=/\s+/){const i=[];if(null!=t){const n=Array.isArray(t)?t:`${t}`.split(e);for(const t of n){const e=`${t}`.trim();e&&i.push(e)}}return i}let ai;try{ai="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(Knt){ai=!1}let li,ci=(()=>{class t{constructor(t){this._platformId=t,this.isBrowser=this._platformId?Dt(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!ai)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.D))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(r.D))},token:t,providedIn:"root"}),t})(),hi=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({}),t})();const ui=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function di(){if(li)return li;if("object"!=typeof document||!document)return li=new Set(ui),li;let t=document.createElement("input");return li=new Set(ui.filter(e=>(t.setAttribute("type",e),t.type===e))),li}let pi,fi,mi,gi;function Ai(t){return function(){if(null==pi&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>pi=!0}))}finally{pi=pi||!1}return pi}()?t:!!t.capture}function bi(){if(null==mi){if("object"!=typeof document||!document)return mi=!1,mi;if("scrollBehavior"in document.documentElement.style)mi=!0;else{const t=Element.prototype.scrollTo;mi=!!t&&!/\{\s*\[native code\]\s*\}/.test(t.toString())}}return mi}function vi(){if("object"!=typeof document||!document)return 0;if(null==fi){const t=document.createElement("div"),e=t.style;t.dir="rtl",e.width="1px",e.overflow="auto",e.visibility="hidden",e.pointerEvents="none",e.position="absolute";const i=document.createElement("div"),n=i.style;n.width="2px",n.height="1px",t.appendChild(i),document.body.appendChild(t),fi=0,0===t.scrollLeft&&(t.scrollLeft=1,fi=0===t.scrollLeft?1:2),t.parentNode.removeChild(t)}return fi}function _i(t){if(function(){if(null==gi){const t="undefined"!=typeof document?document.head:null;gi=!(!t||!t.createShadowRoot&&!t.attachShadow)}return gi}()){const e=t.getRootNode?t.getRootNode():null;if("undefined"!=typeof ShadowRoot&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}let yi=(()=>{class t{create(t){return"undefined"==typeof MutationObserver?null:new MutationObserver(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(r.Lb)({factory:function(){return new t},token:t,providedIn:"root"}),t})(),wi=(()=>{class t{constructor(t){this._mutationObserverFactory=t,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((t,e)=>this._cleanupObserver(e))}observe(t){const e=si(t);return new Ze.a(t=>{const i=this._observeElement(e).subscribe(t);return()=>{i.unsubscribe(),this._unobserveElement(e)}})}_observeElement(t){if(this._observedElements.has(t))this._observedElements.get(t).count++;else{const e=new _e.a,i=this._mutationObserverFactory.create(t=>e.next(t));i&&i.observe(t,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(t,{observer:i,stream:e,count:1})}return this._observedElements.get(t).stream}_unobserveElement(t){this._observedElements.has(t)&&(this._observedElements.get(t).count--,this._observedElements.get(t).count||this._cleanupObserver(t))}_cleanupObserver(t){if(this._observedElements.has(t)){const{observer:e,stream:i}=this._observedElements.get(t);e&&e.disconnect(),i.complete(),this._observedElements.delete(t)}}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(yi))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(yi))},token:t,providedIn:"root"}),t})(),xi=(()=>{class t{constructor(t,e,i){this._contentObserver=t,this._elementRef=e,this._ngZone=i,this.event=new r.o,this._disabled=!1,this._currentSubscription=null}get disabled(){return this._disabled}set disabled(t){this._disabled=ti(t),this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(t){this._debounce=ei(t),this._subscribe()}ngAfterContentInit(){this._currentSubscription||this.disabled||this._subscribe()}ngOnDestroy(){this._unsubscribe()}_subscribe(){this._unsubscribe();const t=this._contentObserver.observe(this._elementRef);this._ngZone.runOutsideAngular(()=>{this._currentSubscription=(this.debounce?t.pipe(Be(this.debounce)):t).subscribe(this.event)})}_unsubscribe(){var t;null===(t=this._currentSubscription)||void 0===t||t.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(wi),r.Pb(r.l),r.Pb(r.B))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),t})(),Ci=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[yi]}),t})();function Si(t,e){return(t.getAttribute(e)||"").match(/\S+/g)||[]}let ki=0;const Ei=new Map;let Di=null,Ii=(()=>{class t{constructor(t){this._document=t}describe(t,e,i){if(!this._canBeDescribed(t,e))return;const n=Pi(e,i);"string"!=typeof e?(Oi(e),Ei.set(n,{messageElement:e,referenceCount:0})):Ei.has(n)||this._createMessageElement(e,i),this._isElementDescribedByMessage(t,n)||this._addMessageReference(t,n)}removeDescription(t,e,i){if(!e||!this._isElementNode(t))return;const n=Pi(e,i);if(this._isElementDescribedByMessage(t,n)&&this._removeMessageReference(t,n),"string"==typeof e){const t=Ei.get(n);t&&0===t.referenceCount&&this._deleteMessageElement(n)}Di&&0===Di.childNodes.length&&this._deleteMessagesContainer()}ngOnDestroy(){const t=this._document.querySelectorAll("[cdk-describedby-host]");for(let e=0;e<t.length;e++)this._removeCdkDescribedByReferenceIds(t[e]),t[e].removeAttribute("cdk-describedby-host");Di&&this._deleteMessagesContainer(),Ei.clear()}_createMessageElement(t,e){const i=this._document.createElement("div");Oi(i),i.textContent=t,e&&i.setAttribute("role",e),this._createMessagesContainer(),Di.appendChild(i),Ei.set(Pi(t,e),{messageElement:i,referenceCount:0})}_deleteMessageElement(t){const e=Ei.get(t),i=e&&e.messageElement;Di&&i&&Di.removeChild(i),Ei.delete(t)}_createMessagesContainer(){if(!Di){const t=this._document.getElementById("cdk-describedby-message-container");t&&t.parentNode&&t.parentNode.removeChild(t),Di=this._document.createElement("div"),Di.id="cdk-describedby-message-container",Di.style.visibility="hidden",Di.classList.add("cdk-visually-hidden"),this._document.body.appendChild(Di)}}_deleteMessagesContainer(){Di&&Di.parentNode&&(Di.parentNode.removeChild(Di),Di=null)}_removeCdkDescribedByReferenceIds(t){const e=Si(t,"aria-describedby").filter(t=>0!=t.indexOf("cdk-describedby-message"));t.setAttribute("aria-describedby",e.join(" "))}_addMessageReference(t,e){const i=Ei.get(e);!function(t,e,i){const n=Si(t,e);n.some(t=>t.trim()==i.trim())||(n.push(i.trim()),t.setAttribute(e,n.join(" ")))}(t,"aria-describedby",i.messageElement.id),t.setAttribute("cdk-describedby-host",""),i.referenceCount++}_removeMessageReference(t,e){const i=Ei.get(e);i.referenceCount--,function(t,e,i){const n=Si(t,e).filter(t=>t!=i.trim());n.length?t.setAttribute(e,n.join(" ")):t.removeAttribute(e)}(t,"aria-describedby",i.messageElement.id),t.removeAttribute("cdk-describedby-host")}_isElementDescribedByMessage(t,e){const i=Si(t,"aria-describedby"),n=Ei.get(e),r=n&&n.messageElement.id;return!!r&&-1!=i.indexOf(r)}_canBeDescribed(t,e){if(!this._isElementNode(t))return!1;if(e&&"object"==typeof e)return!0;const i=null==e?"":`${e}`.trim(),n=t.getAttribute("aria-label");return!(!i||n&&n.trim()===i)}_isElementNode(t){return t.nodeType===this._document.ELEMENT_NODE}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(a))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(a))},token:t,providedIn:"root"}),t})();function Pi(t,e){return"string"==typeof t?`${e||""}/${t}`:t}function Oi(t){t.id||(t.id="cdk-describedby-message-"+ki++)}class Mi{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new _e.a,this._typeaheadSubscription=ye.a.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._skipPredicateFn=t=>t.disabled,this._pressedLetters=[],this.tabOut=new _e.a,this.change=new _e.a,t instanceof r.F&&t.changes.subscribe(t=>{if(this._activeItem){const e=t.toArray().indexOf(this._activeItem);e>-1&&e!==this._activeItemIndex&&(this._activeItemIndex=e)}})}skipPredicate(t){return this._skipPredicateFn=t,this}withWrap(t=!0){return this._wrap=t,this}withVerticalOrientation(t=!0){return this._vertical=t,this}withHorizontalOrientation(t){return this._horizontal=t,this}withAllowedModifierKeys(t){return this._allowedModifierKeys=t,this}withTypeAhead(t=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(Pe(t=>this._pressedLetters.push(t)),Be(t),He(()=>this._pressedLetters.length>0),Object(Ge.a)(()=>this._pressedLetters.join(""))).subscribe(t=>{const e=this._getItemsArray();for(let i=1;i<e.length+1;i++){const n=(this._activeItemIndex+i)%e.length,r=e[n];if(!this._skipPredicateFn(r)&&0===r.getLabel().toUpperCase().trim().indexOf(t)){this.setActiveItem(n);break}}this._pressedLetters=[]}),this}withHomeAndEnd(t=!0){return this._homeAndEnd=t,this}setActiveItem(t){const e=this._activeItem;this.updateActiveItem(t),this._activeItem!==e&&this.change.next(this._activeItemIndex)}onKeydown(t){const e=t.keyCode,i=["altKey","ctrlKey","metaKey","shiftKey"].every(e=>!t[e]||this._allowedModifierKeys.indexOf(e)>-1);switch(e){case 9:return void this.tabOut.next();case 40:if(this._vertical&&i){this.setNextItemActive();break}return;case 38:if(this._vertical&&i){this.setPreviousItemActive();break}return;case 39:if(this._horizontal&&i){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case 37:if(this._horizontal&&i){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case 36:if(this._homeAndEnd&&i){this.setFirstItemActive();break}return;case 35:if(this._homeAndEnd&&i){this.setLastItemActive();break}return;default:return void((i||ke(t,"shiftKey"))&&(t.key&&1===t.key.length?this._letterKeyStream.next(t.key.toLocaleUpperCase()):(e>=65&&e<=90||e>=48&&e<=57)&&this._letterKeyStream.next(String.fromCharCode(e))))}this._pressedLetters=[],t.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}isTyping(){return this._pressedLetters.length>0}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._items.length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(t){const e=this._getItemsArray(),i="number"==typeof t?t:e.indexOf(t),n=e[i];this._activeItem=null==n?null:n,this._activeItemIndex=i}_setActiveItemByDelta(t){this._wrap?this._setActiveInWrapMode(t):this._setActiveInDefaultMode(t)}_setActiveInWrapMode(t){const e=this._getItemsArray();for(let i=1;i<=e.length;i++){const n=(this._activeItemIndex+t*i+e.length)%e.length;if(!this._skipPredicateFn(e[n]))return void this.setActiveItem(n)}}_setActiveInDefaultMode(t){this._setActiveItemByIndex(this._activeItemIndex+t,t)}_setActiveItemByIndex(t,e){const i=this._getItemsArray();if(i[t]){for(;this._skipPredicateFn(i[t]);)if(!i[t+=e])return;this.setActiveItem(t)}}_getItemsArray(){return this._items instanceof r.F?this._items.toArray():this._items}}class Ti extends Mi{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}}class Ri extends Mi{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(t){return this._origin=t,this}setActiveItem(t){super.setActiveItem(t),this.activeItem&&this.activeItem.focus(this._origin)}}let Vi=(()=>{class t{constructor(t){this._platform=t}isDisabled(t){return t.hasAttribute("disabled")}isVisible(t){return function(t){return!!(t.offsetWidth||t.offsetHeight||"function"==typeof t.getClientRects&&t.getClientRects().length)}(t)&&"visible"===getComputedStyle(t).visibility}isTabbable(t){if(!this._platform.isBrowser)return!1;const e=function(t){try{return t.frameElement}catch(Knt){return null}}((i=t).ownerDocument&&i.ownerDocument.defaultView||window);var i;if(e){if(-1===Li(e))return!1;if(!this.isVisible(e))return!1}let n=t.nodeName.toLowerCase(),r=Li(t);return t.hasAttribute("contenteditable")?-1!==r:"iframe"!==n&&"object"!==n&&!(this._platform.WEBKIT&&this._platform.IOS&&!function(t){let e=t.nodeName.toLowerCase(),i="input"===e&&t.type;return"text"===i||"password"===i||"select"===e||"textarea"===e}(t))&&("audio"===n?!!t.hasAttribute("controls")&&-1!==r:"video"===n?-1!==r&&(null!==r||this._platform.FIREFOX||t.hasAttribute("controls")):t.tabIndex>=0)}isFocusable(t,e){return function(t){return!function(t){return function(t){return"input"==t.nodeName.toLowerCase()}(t)&&"hidden"==t.type}(t)&&(function(t){let e=t.nodeName.toLowerCase();return"input"===e||"select"===e||"button"===e||"textarea"===e}(t)||function(t){return function(t){return"a"==t.nodeName.toLowerCase()}(t)&&t.hasAttribute("href")}(t)||t.hasAttribute("contenteditable")||Fi(t))}(t)&&!this.isDisabled(t)&&((null==e?void 0:e.ignoreVisibility)||this.isVisible(t))}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(ci))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(ci))},token:t,providedIn:"root"}),t})();function Fi(t){if(!t.hasAttribute("tabindex")||void 0===t.tabIndex)return!1;let e=t.getAttribute("tabindex");return"-32768"!=e&&!(!e||isNaN(parseInt(e,10)))}function Li(t){if(!Fi(t))return null;const e=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}class Ui{constructor(t,e,i,n,r=!1){this._element=t,this._checker=e,this._ngZone=i,this._document=n,this._hasAttached=!1,this.startAnchorListener=()=>this.focusLastTabbableElement(),this.endAnchorListener=()=>this.focusFirstTabbableElement(),this._enabled=!0,r||this.attachAnchors()}get enabled(){return this._enabled}set enabled(t){this._enabled=t,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}destroy(){const t=this._startAnchor,e=this._endAnchor;t&&(t.removeEventListener("focus",this.startAnchorListener),t.parentNode&&t.parentNode.removeChild(t)),e&&(e.removeEventListener("focus",this.endAnchorListener),e.parentNode&&e.parentNode.removeChild(e)),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return!!this._hasAttached||(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(){return new Promise(t=>{this._executeOnStable(()=>t(this.focusInitialElement()))})}focusFirstTabbableElementWhenReady(){return new Promise(t=>{this._executeOnStable(()=>t(this.focusFirstTabbableElement()))})}focusLastTabbableElementWhenReady(){return new Promise(t=>{this._executeOnStable(()=>t(this.focusLastTabbableElement()))})}_getRegionBoundary(t){let e=this._element.querySelectorAll(`[cdk-focus-region-${t}], [cdkFocusRegion${t}], [cdk-focus-${t}]`);for(let i=0;i<e.length;i++)e[i].hasAttribute(`cdk-focus-${t}`)?console.warn(`Found use of deprecated attribute 'cdk-focus-${t}', use 'cdkFocusRegion${t}' instead. The deprecated attribute will be removed in 8.0.0.`,e[i]):e[i].hasAttribute(`cdk-focus-region-${t}`)&&console.warn(`Found use of deprecated attribute 'cdk-focus-region-${t}', use 'cdkFocusRegion${t}' instead. The deprecated attribute will be removed in 8.0.0.`,e[i]);return"start"==t?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(){const t=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(t){if(t.hasAttribute("cdk-focus-initial")&&console.warn("Found use of deprecated attribute 'cdk-focus-initial', use 'cdkFocusInitial' instead. The deprecated attribute will be removed in 8.0.0",t),!this._checker.isFocusable(t)){const e=this._getFirstTabbableElement(t);return null==e||e.focus(),!!e}return t.focus(),!0}return this.focusFirstTabbableElement()}focusFirstTabbableElement(){const t=this._getRegionBoundary("start");return t&&t.focus(),!!t}focusLastTabbableElement(){const t=this._getRegionBoundary("end");return t&&t.focus(),!!t}hasAttached(){return this._hasAttached}_getFirstTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;let e=t.children||t.childNodes;for(let i=0;i<e.length;i++){let t=e[i].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(e[i]):null;if(t)return t}return null}_getLastTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;let e=t.children||t.childNodes;for(let i=e.length-1;i>=0;i--){let t=e[i].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[i]):null;if(t)return t}return null}_createAnchor(){const t=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,t),t.classList.add("cdk-visually-hidden"),t.classList.add("cdk-focus-trap-anchor"),t.setAttribute("aria-hidden","true"),t}_toggleAnchorTabIndex(t,e){t?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}toggleAnchors(t){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}_executeOnStable(t){this._ngZone.isStable?t():this._ngZone.onStable.pipe(Qe(1)).subscribe(t)}}let Bi=(()=>{class t{constructor(t,e,i){this._checker=t,this._ngZone=e,this._document=i}create(t,e=!1){return new Ui(t,this._checker,this._ngZone,this._document,e)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Vi),r.Zb(r.B),r.Zb(a))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(Vi),Object(r.Zb)(r.B),Object(r.Zb)(a))},token:t,providedIn:"root"}),t})(),Ni=(()=>{class t{constructor(t,e,i){this._elementRef=t,this._focusTrapFactory=e,this._previouslyFocusedElement=null,this._document=i,this.focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement,!0)}get enabled(){return this.focusTrap.enabled}set enabled(t){this.focusTrap.enabled=ti(t)}get autoCapture(){return this._autoCapture}set autoCapture(t){this._autoCapture=ti(t)}ngOnDestroy(){this.focusTrap.destroy(),this._previouslyFocusedElement&&(this._previouslyFocusedElement.focus(),this._previouslyFocusedElement=null)}ngAfterContentInit(){this.focusTrap.attachAnchors(),this.autoCapture&&this._captureFocus()}ngDoCheck(){this.focusTrap.hasAttached()||this.focusTrap.attachAnchors()}ngOnChanges(t){const e=t.autoCapture;e&&!e.firstChange&&this.autoCapture&&this.focusTrap.hasAttached()&&this._captureFocus()}_captureFocus(){this._previouslyFocusedElement=this._document.activeElement,this.focusTrap.focusInitialElementWhenReady()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(Bi),r.Pb(a))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdkTrapFocus",""]],inputs:{enabled:["cdkTrapFocus","enabled"],autoCapture:["cdkTrapFocusAutoCapture","autoCapture"]},exportAs:["cdkTrapFocus"],features:[r.Bb]}),t})();"undefined"!=typeof Element&&Element;const ji=new r.s("liveAnnouncerElement",{providedIn:"root",factory:function(){return null}}),zi=new r.s("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let Hi=(()=>{class t{constructor(t,e,i,n){this._ngZone=e,this._defaultOptions=n,this._document=i,this._liveElement=t||this._createLiveElement()}announce(t,...e){const i=this._defaultOptions;let n,r;return 1===e.length&&"number"==typeof e[0]?r=e[0]:[n,r]=e,this.clear(),clearTimeout(this._previousTimeout),n||(n=i&&i.politeness?i.politeness:"polite"),null==r&&i&&(r=i.duration),this._liveElement.setAttribute("aria-live",n),this._ngZone.runOutsideAngular(()=>new Promise(e=>{clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=t,e(),"number"==typeof r&&(this._previousTimeout=setTimeout(()=>this.clear(),r))},100)}))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement&&this._liveElement.parentNode&&(this._liveElement.parentNode.removeChild(this._liveElement),this._liveElement=null)}_createLiveElement(){const t=this._document.getElementsByClassName("cdk-live-announcer-element"),e=this._document.createElement("div");for(let i=0;i<t.length;i++)t[i].parentNode.removeChild(t[i]);return e.classList.add("cdk-live-announcer-element"),e.classList.add("cdk-visually-hidden"),e.setAttribute("aria-atomic","true"),e.setAttribute("aria-live","polite"),this._document.body.appendChild(e),e}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(ji,8),r.Zb(r.B),r.Zb(a),r.Zb(zi,8))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(ji,8),Object(r.Zb)(r.B),Object(r.Zb)(a),Object(r.Zb)(zi,8))},token:t,providedIn:"root"}),t})(),Ki=(()=>{class t{constructor(t,e,i,n){this._elementRef=t,this._liveAnnouncer=e,this._contentObserver=i,this._ngZone=n,this._politeness="polite"}get politeness(){return this._politeness}set politeness(t){this._politeness="off"===t||"assertive"===t?t:"polite","off"===this._politeness?this._subscription&&(this._subscription.unsubscribe(),this._subscription=null):this._subscription||(this._subscription=this._ngZone.runOutsideAngular(()=>this._contentObserver.observe(this._elementRef).subscribe(()=>{const t=this._elementRef.nativeElement.textContent;t!==this._previousAnnouncedText&&(this._liveAnnouncer.announce(t,this._politeness),this._previousAnnouncedText=t)})))}ngOnDestroy(){this._subscription&&this._subscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(Hi),r.Pb(wi),r.Pb(r.B))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdkAriaLive",""]],inputs:{politeness:["cdkAriaLive","politeness"]},exportAs:["cdkAriaLive"]}),t})();function $i(t){return 0===t.buttons}function Gi(t){const e=t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0];return!(!e||-1!==e.identifier||null!=e.radiusX&&1!==e.radiusX||null!=e.radiusY&&1!==e.radiusY)}const Wi=new r.s("cdk-focus-monitor-default-options"),Zi=Ai({passive:!0,capture:!0});let qi=(()=>{class t{constructor(t,e,i,n){this._ngZone=t,this._platform=e,this._origin=null,this._windowFocused=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._documentKeydownListener=()=>{this._lastTouchTarget=null,this._setOriginForCurrentEventQueue("keyboard")},this._documentMousedownListener=t=>{if(!this._lastTouchTarget){const e=$i(t)?"keyboard":"mouse";this._setOriginForCurrentEventQueue(e)}},this._documentTouchstartListener=t=>{Gi(t)?this._lastTouchTarget||this._setOriginForCurrentEventQueue("keyboard"):(null!=this._touchTimeoutId&&clearTimeout(this._touchTimeoutId),this._lastTouchTarget=Yi(t),this._touchTimeoutId=setTimeout(()=>this._lastTouchTarget=null,650))},this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)},this._rootNodeFocusAndBlurListener=t=>{const e=Yi(t),i="focus"===t.type?this._onFocus:this._onBlur;for(let n=e;n;n=n.parentElement)i.call(this,t,n)},this._document=i,this._detectionMode=(null==n?void 0:n.detectionMode)||0}monitor(t,e=!1){const i=si(t);if(!this._platform.isBrowser||1!==i.nodeType)return Se(null);const n=_i(i)||this._getDocument(),r=this._elementInfo.get(i);if(r)return e&&(r.checkChildren=!0),r.subject;const s={checkChildren:e,subject:new _e.a,rootNode:n};return this._elementInfo.set(i,s),this._registerGlobalListeners(s),s.subject}stopMonitoring(t){const e=si(t),i=this._elementInfo.get(e);i&&(i.subject.complete(),this._setClasses(e),this._elementInfo.delete(e),this._removeGlobalListeners(i))}focusVia(t,e,i){const n=si(t);n===this._getDocument().activeElement?this._getClosestElementsInfo(n).forEach(([t,i])=>this._originChanged(t,e,i)):(this._setOriginForCurrentEventQueue(e),"function"==typeof n.focus&&n.focus(i))}ngOnDestroy(){this._elementInfo.forEach((t,e)=>this.stopMonitoring(e))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_toggleClass(t,e,i){i?t.classList.add(e):t.classList.remove(e)}_getFocusOrigin(t){return this._origin?this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:this._wasCausedByTouch(t)?"touch":"program"}_setClasses(t,e){this._toggleClass(t,"cdk-focused",!!e),this._toggleClass(t,"cdk-touch-focused","touch"===e),this._toggleClass(t,"cdk-keyboard-focused","keyboard"===e),this._toggleClass(t,"cdk-mouse-focused","mouse"===e),this._toggleClass(t,"cdk-program-focused","program"===e)}_setOriginForCurrentEventQueue(t){this._ngZone.runOutsideAngular(()=>{this._origin=t,0===this._detectionMode&&(this._originTimeoutId=setTimeout(()=>this._origin=null,1))})}_wasCausedByTouch(t){const e=Yi(t);return this._lastTouchTarget instanceof Node&&e instanceof Node&&(e===this._lastTouchTarget||e.contains(this._lastTouchTarget))}_onFocus(t,e){const i=this._elementInfo.get(e);i&&(i.checkChildren||e===Yi(t))&&this._originChanged(e,this._getFocusOrigin(t),i)}_onBlur(t,e){const i=this._elementInfo.get(e);!i||i.checkChildren&&t.relatedTarget instanceof Node&&e.contains(t.relatedTarget)||(this._setClasses(e),this._emitOrigin(i.subject,null))}_emitOrigin(t,e){this._ngZone.run(()=>t.next(e))}_registerGlobalListeners(t){if(!this._platform.isBrowser)return;const e=t.rootNode,i=this._rootNodeFocusListenerCount.get(e)||0;i||this._ngZone.runOutsideAngular(()=>{e.addEventListener("focus",this._rootNodeFocusAndBlurListener,Zi),e.addEventListener("blur",this._rootNodeFocusAndBlurListener,Zi)}),this._rootNodeFocusListenerCount.set(e,i+1),1==++this._monitoredElementCount&&this._ngZone.runOutsideAngular(()=>{const t=this._getDocument(),e=this._getWindow();t.addEventListener("keydown",this._documentKeydownListener,Zi),t.addEventListener("mousedown",this._documentMousedownListener,Zi),t.addEventListener("touchstart",this._documentTouchstartListener,Zi),e.addEventListener("focus",this._windowFocusListener)})}_removeGlobalListeners(t){const e=t.rootNode;if(this._rootNodeFocusListenerCount.has(e)){const t=this._rootNodeFocusListenerCount.get(e);t>1?this._rootNodeFocusListenerCount.set(e,t-1):(e.removeEventListener("focus",this._rootNodeFocusAndBlurListener,Zi),e.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Zi),this._rootNodeFocusListenerCount.delete(e))}if(!--this._monitoredElementCount){const t=this._getDocument(),e=this._getWindow();t.removeEventListener("keydown",this._documentKeydownListener,Zi),t.removeEventListener("mousedown",this._documentMousedownListener,Zi),t.removeEventListener("touchstart",this._documentTouchstartListener,Zi),e.removeEventListener("focus",this._windowFocusListener),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._touchTimeoutId),clearTimeout(this._originTimeoutId)}}_originChanged(t,e,i){this._setClasses(t,e),this._emitOrigin(i.subject,e),this._lastFocusOrigin=e}_getClosestElementsInfo(t){const e=[];return this._elementInfo.forEach((i,n)=>{(n===t||i.checkChildren&&n.contains(t))&&e.push([n,i])}),e}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.B),r.Zb(ci),r.Zb(a,8),r.Zb(Wi,8))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(r.B),Object(r.Zb)(ci),Object(r.Zb)(a,8),Object(r.Zb)(Wi,8))},token:t,providedIn:"root"}),t})();function Yi(t){return t.composedPath?t.composedPath()[0]:t.target}let Qi=(()=>{class t{constructor(t,e){this._elementRef=t,this._focusMonitor=e,this.cdkFocusChange=new r.o}ngAfterViewInit(){const t=this._elementRef.nativeElement;this._monitorSubscription=this._focusMonitor.monitor(t,1===t.nodeType&&t.hasAttribute("cdkMonitorSubtreeFocus")).subscribe(t=>this.cdkFocusChange.emit(t))}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._monitorSubscription&&this._monitorSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(qi))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdkMonitorElementFocus",""],["","cdkMonitorSubtreeFocus",""]],outputs:{cdkFocusChange:"cdkFocusChange"}}),t})(),Xi=(()=>{class t{constructor(t,e){this._platform=t,this._document=e}getHighContrastMode(){if(!this._platform.isBrowser)return 0;const t=this._document.createElement("div");t.style.backgroundColor="rgb(1,2,3)",t.style.position="absolute",this._document.body.appendChild(t);const e=this._document.defaultView||window,i=e&&e.getComputedStyle?e.getComputedStyle(t):null,n=(i&&i.backgroundColor||"").replace(/ /g,"");switch(this._document.body.removeChild(t),n){case"rgb(0,0,0)":return 2;case"rgb(255,255,255)":return 1}return 0}_applyBodyHighContrastModeCssClasses(){if(this._platform.isBrowser&&this._document.body){const t=this._document.body.classList;t.remove("cdk-high-contrast-active"),t.remove("cdk-high-contrast-black-on-white"),t.remove("cdk-high-contrast-white-on-black");const e=this.getHighContrastMode();1===e?(t.add("cdk-high-contrast-active"),t.add("cdk-high-contrast-black-on-white")):2===e&&(t.add("cdk-high-contrast-active"),t.add("cdk-high-contrast-white-on-black"))}}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(ci),r.Zb(a))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(ci),Object(r.Zb)(a))},token:t,providedIn:"root"}),t})(),Ji=(()=>{class t{constructor(t){t._applyBodyHighContrastModeCssClasses()}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Xi))},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[hi,Ci]]}),t})();var tn=i("DH7j");function en(t,e,i,n){return Object(Ie.a)(i)&&(n=i,i=void 0),n?en(t,e,i).pipe(Object(Ge.a)(t=>Object(tn.a)(t)?n(...t):n(t))):new Ze.a(n=>{nn(t,e,function(t){n.next(arguments.length>1?Array.prototype.slice.call(arguments):t)},n,i)})}function nn(t,e,i,n,r){let s;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){const n=t;t.addEventListener(e,i,r),s=()=>n.removeEventListener(e,i,r)}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){const n=t;t.on(e,i),s=()=>n.off(e,i)}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){const n=t;t.addListener(e,i),s=()=>n.removeListener(e,i)}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(let s=0,o=t.length;s<o;s++)nn(t[s],e,i,n,r)}n.add(s)}class rn extends Re{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,i=0){return null!==i&&i>0?super.requestAsyncId(t,e,i):(t.actions.push(this),t.scheduled||(t.scheduled=requestAnimationFrame(()=>t.flush(null))))}recycleAsyncId(t,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(t,e,i);0===t.actions.length&&(cancelAnimationFrame(e),t.scheduled=void 0)}}class sn extends Fe{flush(t){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let i,n=-1,r=e.length;t=t||e.shift();do{if(i=t.execute(t.state,t.delay))break}while(++n<r&&(t=e.shift()));if(this.active=!1,i){for(;++n<r&&(t=e.shift());)t.unsubscribe();throw i}}}const on=new sn(rn);let an=1;const ln=(()=>Promise.resolve())(),cn={};function hn(t){return t in cn&&(delete cn[t],!0)}const un={setImmediate(t){const e=an++;return cn[e]=!0,ln.then(()=>hn(e)&&t()),e},clearImmediate(t){hn(t)}};class dn extends Re{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,i=0){return null!==i&&i>0?super.requestAsyncId(t,e,i):(t.actions.push(this),t.scheduled||(t.scheduled=un.setImmediate(t.flush.bind(t,null))))}recycleAsyncId(t,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(t,e,i);0===t.actions.length&&(un.clearImmediate(e),t.scheduled=void 0)}}class pn extends Fe{flush(t){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let i,n=-1,r=e.length;t=t||e.shift();do{if(i=t.execute(t.state,t.delay))break}while(++n<r&&(t=e.shift()));if(this.active=!1,i){for(;++n<r&&(t=e.shift());)t.unsubscribe();throw i}}}const fn=new pn(dn);function mn(t,e){return i=>i.lift(new gn(t,e))}class gn{constructor(t,e){this.compare=t,this.keySelector=e}call(t,e){return e.subscribe(new An(t,this.compare,this.keySelector))}}class An extends Ee.a{constructor(t,e,i){super(t),this.keySelector=i,this.hasKey=!1,"function"==typeof e&&(this.compare=e)}compare(t,e){return t===e}_next(t){let e;try{const{keySelector:i}=this;e=i?i(t):t}catch(n){return this.destination.error(n)}let i=!1;if(this.hasKey)try{const{compare:t}=this;i=t(this.key,e)}catch(n){return this.destination.error(n)}else this.hasKey=!0;i||(this.key=e,this.destination.next(t))}}var bn=i("zx2A");class vn{constructor(t){this.durationSelector=t}call(t,e){return e.subscribe(new _n(t,this.durationSelector))}}class _n extends bn.b{constructor(t,e){super(t),this.durationSelector=e,this.hasValue=!1}_next(t){if(this.value=t,this.hasValue=!0,!this.throttled){let i;try{const{durationSelector:e}=this;i=e(t)}catch(e){return this.destination.error(e)}const n=Object(bn.c)(i,new bn.a(this));!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}}clearThrottle(){const{value:t,hasValue:e,throttled:i}=this;i&&(this.remove(i),this.throttled=void 0,i.unsubscribe()),e&&(this.value=void 0,this.hasValue=!1,this.destination.next(t))}notifyNext(){this.clearThrottle()}notifyComplete(){this.clearThrottle()}}function yn(t){return!Object(tn.a)(t)&&t-parseFloat(t)+1>=0}function wn(t=0,e,i){let n=-1;return yn(e)?n=Number(e)<1?1:Number(e):Object(we.a)(e)&&(i=e),Object(we.a)(i)||(i=Ue),new Ze.a(e=>{const r=yn(t)?t:+t-i.now();return i.schedule(xn,r,{index:0,period:n,subscriber:e})})}function xn(t){const{index:e,period:i,subscriber:n}=t;if(n.next(e),!n.closed){if(-1===i)return n.complete();t.index=e+1,this.schedule(t,i)}}function Cn(t,e=Ue){return i=()=>wn(t,e),function(t){return t.lift(new vn(i))};var i}function Sn(t){return e=>e.lift(new kn(t))}class kn{constructor(t){this.notifier=t}call(t,e){const i=new En(t),n=Object(bn.c)(this.notifier,new bn.a(i));return n&&!i.seenValue?(i.add(n),e.subscribe(i)):i}}class En extends bn.b{constructor(t){super(t),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}var Dn=i("bHdf");function In(...t){return Object(Dn.a)(1)(Se(...t))}function Pn(...t){const e=t[t.length-1];return Object(we.a)(e)?(t.pop(),i=>In(t,i,e)):e=>In(t,e)}var On=i("Cfvw");function Mn(t,e){return"function"==typeof e?i=>i.pipe(Mn((i,n)=>Object(On.a)(t(i,n)).pipe(Object(Ge.a)((t,r)=>e(i,t,n,r))))):e=>e.lift(new Tn(t))}class Tn{constructor(t){this.project=t}call(t,e){return e.subscribe(new Rn(t,this.project))}}class Rn extends bn.b{constructor(t,e){super(t),this.project=e,this.index=0}_next(t){let e;const i=this.index++;try{e=this.project(t,i)}catch(n){return void this.destination.error(n)}this._innerSub(e)}_innerSub(t){const e=this.innerSubscription;e&&e.unsubscribe();const i=new bn.a(this),n=this.destination;n.add(i),this.innerSubscription=Object(bn.c)(t,i),this.innerSubscription!==i&&n.add(this.innerSubscription)}_complete(){const{innerSubscription:t}=this;t&&!t.closed||super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(t){this.destination.next(t)}}class Vn extends Re{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}schedule(t,e=0){return e>0?super.schedule(t,e):(this.delay=e,this.state=t,this.scheduler.flush(this),this)}execute(t,e){return e>0||this.closed?super.execute(t,e):this._execute(t,e)}requestAsyncId(t,e,i=0){return null!==i&&i>0||null===i&&this.delay>0?super.requestAsyncId(t,e,i):t.flush(this)}}class Fn extends Fe{}const Ln=new Fn(Vn);function Un(t,e){return new Ze.a(e?i=>e.schedule(Bn,0,{error:t,subscriber:i}):e=>e.error(t))}function Bn({error:t,subscriber:e}){e.error(t)}let Nn=(()=>{class t{constructor(t,e,i){this.kind=t,this.value=e,this.error=i,this.hasValue="N"===t}observe(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}}do(t,e,i){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return i&&i()}}accept(t,e,i){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,i)}toObservable(){switch(this.kind){case"N":return Se(this.value);case"E":return Un(this.error);case"C":return Ye()}throw new Error("unexpected notification kind value")}static createNext(e){return void 0!==e?new t("N",e):t.undefinedValueNotification}static createError(e){return new t("E",void 0,e)}static createComplete(){return t.completeNotification}}return t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t})();class jn extends Ee.a{constructor(t,e,i=0){super(t),this.scheduler=e,this.delay=i}static dispatch(t){const{notification:e,destination:i}=t;e.observe(i),this.unsubscribe()}scheduleMessage(t){this.destination.add(this.scheduler.schedule(jn.dispatch,this.delay,new zn(t,this.destination)))}_next(t){this.scheduleMessage(Nn.createNext(t))}_error(t){this.scheduleMessage(Nn.createError(t)),this.unsubscribe()}_complete(){this.scheduleMessage(Nn.createComplete()),this.unsubscribe()}}class zn{constructor(t,e){this.notification=t,this.destination=e}}var Hn=i("9ppp"),Kn=i("Ylt2");class $n extends _e.a{constructor(t=Number.POSITIVE_INFINITY,e=Number.POSITIVE_INFINITY,i){super(),this.scheduler=i,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=t<1?1:t,this._windowTime=e<1?1:e,e===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(t){if(!this.isStopped){const e=this._events;e.push(t),e.length>this._bufferSize&&e.shift()}super.next(t)}nextTimeWindow(t){this.isStopped||(this._events.push(new Gn(this._getNow(),t)),this._trimBufferThenGetEvents()),super.next(t)}_subscribe(t){const e=this._infiniteTimeWindow,i=e?this._events:this._trimBufferThenGetEvents(),n=this.scheduler,r=i.length;let s;if(this.closed)throw new Hn.a;if(this.isStopped||this.hasError?s=ye.a.EMPTY:(this.observers.push(t),s=new Kn.a(this,t)),n&&t.add(t=new jn(t,n)),e)for(let o=0;o<r&&!t.closed;o++)t.next(i[o]);else for(let o=0;o<r&&!t.closed;o++)t.next(i[o].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),s}_getNow(){return(this.scheduler||Ln).now()}_trimBufferThenGetEvents(){const t=this._getNow(),e=this._bufferSize,i=this._windowTime,n=this._events,r=n.length;let s=0;for(;s<r&&!(t-n[s].time<i);)s++;return r>e&&(s=Math.max(s,r-e)),s>0&&n.splice(0,s),n}}class Gn{constructor(t,e){this.time=t,this.value=e}}const Wn=new r.s("cdk-dir-doc",{providedIn:"root",factory:function(){return Object(r.X)(a)}});let Zn=(()=>{class t{constructor(t){if(this.value="ltr",this.change=new r.o,t){const e=t.documentElement?t.documentElement.dir:null,i=(t.body?t.body.dir:null)||e;this.value="ltr"===i||"rtl"===i?i:"ltr"}}ngOnDestroy(){this.change.complete()}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Wn,8))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(Wn,8))},token:t,providedIn:"root"}),t})(),qn=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({}),t})();function Yn(t){return t&&"function"==typeof t.connect}class Qn{applyChanges(t,e,i,n,r){t.forEachOperation((t,n,s)=>{let o,a;if(null==t.previousIndex){const r=i(t,n,s);o=e.createEmbeddedView(r.templateRef,r.context,r.index),a=1}else null==s?(e.remove(n),a=3):(o=e.get(n),e.move(o,s),a=2);r&&r({context:null==o?void 0:o.context,operation:a,record:t})})}detach(){}}class Xn{constructor(t=!1,e,i=!0){this._multiple=t,this._emitChanges=i,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new _e.a,e&&e.length&&(t?e.forEach(t=>this._markSelected(t)):this._markSelected(e[0]),this._selectedToEmit.length=0)}get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}select(...t){this._verifyValueAssignment(t),t.forEach(t=>this._markSelected(t)),this._emitChangeEvent()}deselect(...t){this._verifyValueAssignment(t),t.forEach(t=>this._unmarkSelected(t)),this._emitChangeEvent()}toggle(t){this.isSelected(t)?this.deselect(t):this.select(t)}clear(){this._unmarkAll(),this._emitChangeEvent()}isSelected(t){return this._selection.has(t)}isEmpty(){return 0===this._selection.size}hasValue(){return!this.isEmpty()}sort(t){this._multiple&&this.selected&&this._selected.sort(t)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(t){this.isSelected(t)||(this._multiple||this._unmarkAll(),this._selection.add(t),this._emitChanges&&this._selectedToEmit.push(t))}_unmarkSelected(t){this.isSelected(t)&&(this._selection.delete(t),this._emitChanges&&this._deselectedToEmit.push(t))}_unmarkAll(){this.isEmpty()||this._selection.forEach(t=>this._unmarkSelected(t))}_verifyValueAssignment(t){}}let Jn=(()=>{class t{constructor(){this._listeners=[]}notify(t,e){for(let i of this._listeners)i(t,e)}listen(t){return this._listeners.push(t),()=>{this._listeners=this._listeners.filter(e=>t!==e)}}ngOnDestroy(){this._listeners=[]}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(r.Lb)({factory:function(){return new t},token:t,providedIn:"root"}),t})();const tr=new r.s("_ViewRepeater");let er=(()=>{class t{constructor(t,e,i){this._ngZone=t,this._platform=e,this._scrolled=new _e.a,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=i}register(t){this.scrollContainers.has(t)||this.scrollContainers.set(t,t.elementScrolled().subscribe(()=>this._scrolled.next(t)))}deregister(t){const e=this.scrollContainers.get(t);e&&(e.unsubscribe(),this.scrollContainers.delete(t))}scrolled(t=20){return this._platform.isBrowser?new Ze.a(e=>{this._globalSubscription||this._addGlobalListener();const i=t>0?this._scrolled.pipe(Cn(t)).subscribe(e):this._scrolled.subscribe(e);return this._scrolledCount++,()=>{i.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):Se()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((t,e)=>this.deregister(e)),this._scrolled.complete()}ancestorScrolled(t,e){const i=this.getAncestorScrollContainers(t);return this.scrolled(e).pipe(He(t=>!t||i.indexOf(t)>-1))}getAncestorScrollContainers(t){const e=[];return this.scrollContainers.forEach((i,n)=>{this._scrollableContainsElement(n,t)&&e.push(n)}),e}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(t,e){let i=si(e),n=t.getElementRef().nativeElement;do{if(i==n)return!0}while(i=i.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>en(this._getWindow().document,"scroll").subscribe(()=>this._scrolled.next()))}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.B),r.Zb(ci),r.Zb(a,8))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(r.B),Object(r.Zb)(ci),Object(r.Zb)(a,8))},token:t,providedIn:"root"}),t})(),ir=(()=>{class t{constructor(t,e,i,n){this.elementRef=t,this.scrollDispatcher=e,this.ngZone=i,this.dir=n,this._destroyed=new _e.a,this._elementScrolled=new Ze.a(t=>this.ngZone.runOutsideAngular(()=>en(this.elementRef.nativeElement,"scroll").pipe(Sn(this._destroyed)).subscribe(t)))}ngOnInit(){this.scrollDispatcher.register(this)}ngOnDestroy(){this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(t){const e=this.elementRef.nativeElement,i=this.dir&&"rtl"==this.dir.value;null==t.left&&(t.left=i?t.end:t.start),null==t.right&&(t.right=i?t.start:t.end),null!=t.bottom&&(t.top=e.scrollHeight-e.clientHeight-t.bottom),i&&0!=vi()?(null!=t.left&&(t.right=e.scrollWidth-e.clientWidth-t.left),2==vi()?t.left=t.right:1==vi()&&(t.left=t.right?-t.right:t.right)):null!=t.right&&(t.left=e.scrollWidth-e.clientWidth-t.right),this._applyScrollToOptions(t)}_applyScrollToOptions(t){const e=this.elementRef.nativeElement;bi()?e.scrollTo(t):(null!=t.top&&(e.scrollTop=t.top),null!=t.left&&(e.scrollLeft=t.left))}measureScrollOffset(t){const e=this.elementRef.nativeElement;if("top"==t)return e.scrollTop;if("bottom"==t)return e.scrollHeight-e.clientHeight-e.scrollTop;const i=this.dir&&"rtl"==this.dir.value;return"start"==t?t=i?"right":"left":"end"==t&&(t=i?"left":"right"),i&&2==vi()?"left"==t?e.scrollWidth-e.clientWidth-e.scrollLeft:e.scrollLeft:i&&1==vi()?"left"==t?e.scrollLeft+e.scrollWidth-e.clientWidth:-e.scrollLeft:"left"==t?e.scrollLeft:e.scrollWidth-e.clientWidth-e.scrollLeft}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(er),r.Pb(r.B),r.Pb(Zn,8))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]}),t})(),nr=(()=>{class t{constructor(t,e,i){this._platform=t,this._change=new _e.a,this._changeListener=t=>{this._change.next(t)},this._document=i,e.runOutsideAngular(()=>{if(t.isBrowser){const t=this._getWindow();t.addEventListener("resize",this._changeListener),t.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._updateViewportSize())})}ngOnDestroy(){if(this._platform.isBrowser){const t=this._getWindow();t.removeEventListener("resize",this._changeListener),t.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}getViewportRect(){const t=this.getViewportScrollPosition(),{width:e,height:i}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+i,right:t.left+e,height:i,width:e}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const t=this._document,e=this._getWindow(),i=t.documentElement,n=i.getBoundingClientRect();return{top:-n.top||t.body.scrollTop||e.scrollY||i.scrollTop||0,left:-n.left||t.body.scrollLeft||e.scrollX||i.scrollLeft||0}}change(t=20){return t>0?this._change.pipe(Cn(t)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){const t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(ci),r.Zb(r.B),r.Zb(a,8))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(ci),Object(r.Zb)(r.B),Object(r.Zb)(a,8))},token:t,providedIn:"root"}),t})(),rr=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({}),t})(),sr=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[qn,hi,rr],qn,rr]}),t})();var or=i("VRyK");function ar(t,e=!1){return i=>i.lift(new lr(t,e))}class lr{constructor(t,e){this.predicate=t,this.inclusive=e}call(t,e){return e.subscribe(new cr(t,this.predicate,this.inclusive))}}class cr extends Ee.a{constructor(t,e,i){super(t),this.predicate=e,this.inclusive=i,this.index=0}_next(t){const e=this.destination;let i;try{i=this.predicate(t,this.index++)}catch(n){return void e.error(n)}this.nextOrComplete(t,i)}nextOrComplete(t,e){const i=this.destination;Boolean(e)?i.next(t):(this.inclusive&&i.next(t),i.complete())}}const hr=bi();class ur{constructor(t,e){this._viewportRuler=t,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=e}attach(){}enable(){if(this._canBeEnabled()){const t=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=t.style.left||"",this._previousHTMLStyles.top=t.style.top||"",t.style.left=ri(-this._previousScrollPosition.left),t.style.top=ri(-this._previousScrollPosition.top),t.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){const t=this._document.documentElement,e=t.style,i=this._document.body.style,n=e.scrollBehavior||"",r=i.scrollBehavior||"";this._isEnabled=!1,e.left=this._previousHTMLStyles.left,e.top=this._previousHTMLStyles.top,t.classList.remove("cdk-global-scrollblock"),hr&&(e.scrollBehavior=i.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),hr&&(e.scrollBehavior=n,i.scrollBehavior=r)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;const t=this._document.body,e=this._viewportRuler.getViewportSize();return t.scrollHeight>e.height||t.scrollWidth>e.width}}class dr{constructor(t,e,i,n){this._scrollDispatcher=t,this._ngZone=e,this._viewportRuler=i,this._config=n,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(t){this._overlayRef=t}enable(){if(this._scrollSubscription)return;const t=this._scrollDispatcher.scrolled(0);this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=t.subscribe(()=>{const t=this._viewportRuler.getViewportScrollPosition().top;Math.abs(t-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=t.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}class pr{enable(){}disable(){}attach(){}}function fr(t,e){return e.some(e=>t.bottom<e.top||t.top>e.bottom||t.right<e.left||t.left>e.right)}function mr(t,e){return e.some(e=>t.top<e.top||t.bottom>e.bottom||t.left<e.left||t.right>e.right)}class gr{constructor(t,e,i,n){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=i,this._config=n,this._scrollSubscription=null}attach(t){this._overlayRef=t}enable(){this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){const t=this._overlayRef.overlayElement.getBoundingClientRect(),{width:e,height:i}=this._viewportRuler.getViewportSize();fr(t,[{width:e,height:i,bottom:i,right:e,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}}))}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}let Ar=(()=>{class t{constructor(t,e,i,n){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=i,this.noop=()=>new pr,this.close=t=>new dr(this._scrollDispatcher,this._ngZone,this._viewportRuler,t),this.block=()=>new ur(this._viewportRuler,this._document),this.reposition=t=>new gr(this._scrollDispatcher,this._viewportRuler,this._ngZone,t),this._document=n}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(er),r.Zb(nr),r.Zb(r.B),r.Zb(a))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(er),Object(r.Zb)(nr),Object(r.Zb)(r.B),Object(r.Zb)(a))},token:t,providedIn:"root"}),t})();class br{constructor(t){if(this.scrollStrategy=new pr,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,t){const e=Object.keys(t);for(const i of e)void 0!==t[i]&&(this[i]=t[i])}}}class vr{constructor(t,e,i,n,r){this.offsetX=i,this.offsetY=n,this.panelClass=r,this.originX=t.originX,this.originY=t.originY,this.overlayX=e.overlayX,this.overlayY=e.overlayY}}class _r{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}let yr=(()=>{class t{constructor(t){this._attachedOverlays=[],this._document=t}ngOnDestroy(){this.detach()}add(t){this.remove(t),this._attachedOverlays.push(t)}remove(t){const e=this._attachedOverlays.indexOf(t);e>-1&&this._attachedOverlays.splice(e,1),0===this._attachedOverlays.length&&this.detach()}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(a))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(a))},token:t,providedIn:"root"}),t})(),wr=(()=>{class t extends yr{constructor(t){super(t),this._keydownListener=t=>{const e=this._attachedOverlays;for(let i=e.length-1;i>-1;i--)if(e[i]._keydownEvents.observers.length>0){e[i]._keydownEvents.next(t);break}}}add(t){super.add(t),this._isAttached||(this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(a))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(a))},token:t,providedIn:"root"}),t})(),xr=(()=>{class t extends yr{constructor(t,e){super(t),this._platform=e,this._cursorStyleIsSet=!1,this._clickListener=t=>{const e=t.composedPath?t.composedPath()[0]:t.target,i=this._attachedOverlays.slice();for(let n=i.length-1;n>-1;n--){const r=i[n];if(!(r._outsidePointerEvents.observers.length<1)&&r.hasAttached()){if(r.overlayElement.contains(e))break;r._outsidePointerEvents.next(t)}}}}add(t){super.add(t),this._isAttached||(this._document.body.addEventListener("click",this._clickListener,!0),this._document.body.addEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=this._document.body.style.cursor,this._document.body.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("click",this._clickListener,!0),this._document.body.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(a),r.Zb(ci))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(a),Object(r.Zb)(ci))},token:t,providedIn:"root"}),t})();const Cr=!("undefined"==typeof window||!window||!window.__karma__&&!window.jasmine);let Sr=(()=>{class t{constructor(t,e){this._platform=e,this._document=t}ngOnDestroy(){const t=this._containerElement;t&&t.parentNode&&t.parentNode.removeChild(t)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){if(this._platform.isBrowser||Cr){const t=this._document.querySelectorAll('.cdk-overlay-container[platform="server"], .cdk-overlay-container[platform="test"]');for(let e=0;e<t.length;e++)t[e].parentNode.removeChild(t[e])}const t=this._document.createElement("div");t.classList.add("cdk-overlay-container"),Cr?t.setAttribute("platform","test"):this._platform.isBrowser||t.setAttribute("platform","server"),this._document.body.appendChild(t),this._containerElement=t}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(a),r.Zb(ci))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(a),Object(r.Zb)(ci))},token:t,providedIn:"root"}),t})();class kr{constructor(t,e,i,n,r,s,o,a,l){this._portalOutlet=t,this._host=e,this._pane=i,this._config=n,this._ngZone=r,this._keyboardDispatcher=s,this._document=o,this._location=a,this._outsideClickDispatcher=l,this._backdropElement=null,this._backdropClick=new _e.a,this._attachments=new _e.a,this._detachments=new _e.a,this._locationChanges=ye.a.EMPTY,this._backdropClickHandler=t=>this._backdropClick.next(t),this._keydownEvents=new _e.a,this._outsidePointerEvents=new _e.a,n.scrollStrategy&&(this._scrollStrategy=n.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=n.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(t){let e=this._portalOutlet.attach(t);return!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host),this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._ngZone.onStable.pipe(Qe(1)).subscribe(()=>{this.hasAttached()&&this.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),e}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();const t=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenStable(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),t}dispose(){const t=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this.detachBackdrop(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host&&this._host.parentNode&&(this._host.parentNode.removeChild(this._host),this._host=null),this._previousHostParent=this._pane=null,t&&this._detachments.next(),this._detachments.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(t){t!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=t,this.hasAttached()&&(t.attach(this),this.updatePosition()))}updateSize(t){this._config=Object.assign(Object.assign({},this._config),t),this._updateElementSize()}setDirection(t){this._config=Object.assign(Object.assign({},this._config),{direction:t}),this._updateElementDirection()}addPanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!0)}removePanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!1)}getDirection(){const t=this._config.direction;return t?"string"==typeof t?t:t.value:"ltr"}updateScrollStrategy(t){t!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=t,this.hasAttached()&&(t.attach(this),t.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;const t=this._pane.style;t.width=ri(this._config.width),t.height=ri(this._config.height),t.minWidth=ri(this._config.minWidth),t.minHeight=ri(this._config.minHeight),t.maxWidth=ri(this._config.maxWidth),t.maxHeight=ri(this._config.maxHeight)}_togglePointerEvents(t){this._pane.style.pointerEvents=t?"":"none"}_attachBackdrop(){this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),"undefined"!=typeof requestAnimationFrame?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add("cdk-overlay-backdrop-showing")})}):this._backdropElement.classList.add("cdk-overlay-backdrop-showing")}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){let t,e=this._backdropElement;if(!e)return;let i=()=>{e&&(e.removeEventListener("click",this._backdropClickHandler),e.removeEventListener("transitionend",i),e.parentNode&&e.parentNode.removeChild(e)),this._backdropElement==e&&(this._backdropElement=null),this._config.backdropClass&&this._toggleClasses(e,this._config.backdropClass,!1),clearTimeout(t)};e.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{e.addEventListener("transitionend",i)}),e.style.pointerEvents="none",t=this._ngZone.runOutsideAngular(()=>setTimeout(i,500))}_toggleClasses(t,e,i){const n=t.classList;ni(e).forEach(t=>{t&&(i?n.add(t):n.remove(t))})}_detachContentWhenStable(){this._ngZone.runOutsideAngular(()=>{const t=this._ngZone.onStable.pipe(Sn(Object(or.a)(this._attachments,this._detachments))).subscribe(()=>{this._pane&&this._host&&0!==this._pane.children.length||(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._previousHostParent.removeChild(this._host)),t.unsubscribe())})})}_disposeScrollStrategy(){const t=this._scrollStrategy;t&&(t.disable(),t.detach&&t.detach())}}const Er=/([A-Za-z%]+)$/;class Dr{constructor(t,e,i,n,r){this._viewportRuler=e,this._document=i,this._platform=n,this._overlayContainer=r,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new _e.a,this._resizeSubscription=ye.a.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}get positions(){return this._preferredPositions}attach(t){this._validatePositions(),t.hostElement.classList.add("cdk-overlay-connected-position-bounding-box"),this._overlayRef=t,this._boundingBox=t.hostElement,this._pane=t.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition)return void this.reapplyLastPosition();this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect();const t=this._originRect,e=this._overlayRect,i=this._viewportRect,n=[];let r;for(let s of this._preferredPositions){let o=this._getOriginPoint(t,s),a=this._getOverlayPoint(o,e,s),l=this._getOverlayFit(a,e,i,s);if(l.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(s,o);this._canFitWithFlexibleDimensions(l,a,i)?n.push({position:s,origin:o,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(o,s)}):(!r||r.overlayFit.visibleArea<l.visibleArea)&&(r={overlayFit:l,overlayPoint:a,originPoint:o,position:s,overlayRect:e})}if(n.length){let t=null,e=-1;for(const i of n){const n=i.boundingBoxRect.width*i.boundingBoxRect.height*(i.position.weight||1);n>e&&(e=n,t=i)}return this._isPushed=!1,void this._applyPosition(t.position,t.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(r.position,r.originPoint);this._applyPosition(r.position,r.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&Ir(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove("cdk-overlay-connected-position-bounding-box"),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(!this._isDisposed&&(!this._platform||this._platform.isBrowser)){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect();const t=this._lastPosition||this._preferredPositions[0],e=this._getOriginPoint(this._originRect,t);this._applyPosition(t,e)}}withScrollableContainers(t){return this._scrollables=t,this}withPositions(t){return this._preferredPositions=t,-1===t.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(t){return this._viewportMargin=t,this}withFlexibleDimensions(t=!0){return this._hasFlexibleDimensions=t,this}withGrowAfterOpen(t=!0){return this._growAfterOpen=t,this}withPush(t=!0){return this._canPush=t,this}withLockedPosition(t=!0){return this._positionLocked=t,this}setOrigin(t){return this._origin=t,this}withDefaultOffsetX(t){return this._offsetX=t,this}withDefaultOffsetY(t){return this._offsetY=t,this}withTransformOriginOn(t){return this._transformOriginSelector=t,this}_getOriginPoint(t,e){let i,n;if("center"==e.originX)i=t.left+t.width/2;else{const n=this._isRtl()?t.right:t.left,r=this._isRtl()?t.left:t.right;i="start"==e.originX?n:r}return n="center"==e.originY?t.top+t.height/2:"top"==e.originY?t.top:t.bottom,{x:i,y:n}}_getOverlayPoint(t,e,i){let n,r;return n="center"==i.overlayX?-e.width/2:"start"===i.overlayX?this._isRtl()?-e.width:0:this._isRtl()?0:-e.width,r="center"==i.overlayY?-e.height/2:"top"==i.overlayY?0:-e.height,{x:t.x+n,y:t.y+r}}_getOverlayFit(t,e,i,n){const r=Or(e);let{x:s,y:o}=t,a=this._getOffset(n,"x"),l=this._getOffset(n,"y");a&&(s+=a),l&&(o+=l);let c=0-o,h=o+r.height-i.height,u=this._subtractOverflows(r.width,0-s,s+r.width-i.width),d=this._subtractOverflows(r.height,c,h),p=u*d;return{visibleArea:p,isCompletelyWithinViewport:r.width*r.height===p,fitsInViewportVertically:d===r.height,fitsInViewportHorizontally:u==r.width}}_canFitWithFlexibleDimensions(t,e,i){if(this._hasFlexibleDimensions){const n=i.bottom-e.y,r=i.right-e.x,s=Pr(this._overlayRef.getConfig().minHeight),o=Pr(this._overlayRef.getConfig().minWidth),a=t.fitsInViewportHorizontally||null!=o&&o<=r;return(t.fitsInViewportVertically||null!=s&&s<=n)&&a}return!1}_pushOverlayOnScreen(t,e,i){if(this._previousPushAmount&&this._positionLocked)return{x:t.x+this._previousPushAmount.x,y:t.y+this._previousPushAmount.y};const n=Or(e),r=this._viewportRect,s=Math.max(t.x+n.width-r.width,0),o=Math.max(t.y+n.height-r.height,0),a=Math.max(r.top-i.top-t.y,0),l=Math.max(r.left-i.left-t.x,0);let c=0,h=0;return c=n.width<=r.width?l||-s:t.x<this._viewportMargin?r.left-i.left-t.x:0,h=n.height<=r.height?a||-o:t.y<this._viewportMargin?r.top-i.top-t.y:0,this._previousPushAmount={x:c,y:h},{x:t.x+c,y:t.y+h}}_applyPosition(t,e){if(this._setTransformOrigin(t),this._setOverlayElementStyles(e,t),this._setBoundingBoxStyles(e,t),t.panelClass&&this._addPanelClasses(t.panelClass),this._lastPosition=t,this._positionChanges.observers.length){const e=this._getScrollVisibility(),i=new _r(t,e);this._positionChanges.next(i)}this._isInitialRender=!1}_setTransformOrigin(t){if(!this._transformOriginSelector)return;const e=this._boundingBox.querySelectorAll(this._transformOriginSelector);let i,n=t.overlayY;i="center"===t.overlayX?"center":this._isRtl()?"start"===t.overlayX?"right":"left":"start"===t.overlayX?"left":"right";for(let r=0;r<e.length;r++)e[r].style.transformOrigin=`${i} ${n}`}_calculateBoundingBoxRect(t,e){const i=this._viewportRect,n=this._isRtl();let r,s,o,a,l,c;if("top"===e.overlayY)s=t.y,r=i.height-s+this._viewportMargin;else if("bottom"===e.overlayY)o=i.height-t.y+2*this._viewportMargin,r=i.height-o+this._viewportMargin;else{const e=Math.min(i.bottom-t.y+i.top,t.y),n=this._lastBoundingBoxSize.height;r=2*e,s=t.y-e,r>n&&!this._isInitialRender&&!this._growAfterOpen&&(s=t.y-n/2)}if("end"===e.overlayX&&!n||"start"===e.overlayX&&n)c=i.width-t.x+this._viewportMargin,a=t.x-this._viewportMargin;else if("start"===e.overlayX&&!n||"end"===e.overlayX&&n)l=t.x,a=i.right-t.x;else{const e=Math.min(i.right-t.x+i.left,t.x),n=this._lastBoundingBoxSize.width;a=2*e,l=t.x-e,a>n&&!this._isInitialRender&&!this._growAfterOpen&&(l=t.x-n/2)}return{top:s,left:l,bottom:o,right:c,width:a,height:r}}_setBoundingBoxStyles(t,e){const i=this._calculateBoundingBoxRect(t,e);this._isInitialRender||this._growAfterOpen||(i.height=Math.min(i.height,this._lastBoundingBoxSize.height),i.width=Math.min(i.width,this._lastBoundingBoxSize.width));const n={};if(this._hasExactPosition())n.top=n.left="0",n.bottom=n.right=n.maxHeight=n.maxWidth="",n.width=n.height="100%";else{const t=this._overlayRef.getConfig().maxHeight,r=this._overlayRef.getConfig().maxWidth;n.height=ri(i.height),n.top=ri(i.top),n.bottom=ri(i.bottom),n.width=ri(i.width),n.left=ri(i.left),n.right=ri(i.right),n.alignItems="center"===e.overlayX?"center":"end"===e.overlayX?"flex-end":"flex-start",n.justifyContent="center"===e.overlayY?"center":"bottom"===e.overlayY?"flex-end":"flex-start",t&&(n.maxHeight=ri(t)),r&&(n.maxWidth=ri(r))}this._lastBoundingBoxSize=i,Ir(this._boundingBox.style,n)}_resetBoundingBoxStyles(){Ir(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Ir(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(t,e){const i={},n=this._hasExactPosition(),r=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(n){const n=this._viewportRuler.getViewportScrollPosition();Ir(i,this._getExactOverlayY(e,t,n)),Ir(i,this._getExactOverlayX(e,t,n))}else i.position="static";let o="",a=this._getOffset(e,"x"),l=this._getOffset(e,"y");a&&(o+=`translateX(${a}px) `),l&&(o+=`translateY(${l}px)`),i.transform=o.trim(),s.maxHeight&&(n?i.maxHeight=ri(s.maxHeight):r&&(i.maxHeight="")),s.maxWidth&&(n?i.maxWidth=ri(s.maxWidth):r&&(i.maxWidth="")),Ir(this._pane.style,i)}_getExactOverlayY(t,e,i){let n={top:"",bottom:""},r=this._getOverlayPoint(e,this._overlayRect,t);this._isPushed&&(r=this._pushOverlayOnScreen(r,this._overlayRect,i));let s=this._overlayContainer.getContainerElement().getBoundingClientRect().top;return r.y-=s,"bottom"===t.overlayY?n.bottom=this._document.documentElement.clientHeight-(r.y+this._overlayRect.height)+"px":n.top=ri(r.y),n}_getExactOverlayX(t,e,i){let n,r={left:"",right:""},s=this._getOverlayPoint(e,this._overlayRect,t);return this._isPushed&&(s=this._pushOverlayOnScreen(s,this._overlayRect,i)),n=this._isRtl()?"end"===t.overlayX?"left":"right":"end"===t.overlayX?"right":"left","right"===n?r.right=this._document.documentElement.clientWidth-(s.x+this._overlayRect.width)+"px":r.left=ri(s.x),r}_getScrollVisibility(){const t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),i=this._scrollables.map(t=>t.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:mr(t,i),isOriginOutsideView:fr(t,i),isOverlayClipped:mr(e,i),isOverlayOutsideView:fr(e,i)}}_subtractOverflows(t,...e){return e.reduce((t,e)=>t-Math.max(e,0),t)}_getNarrowedViewportRect(){const t=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,i=this._viewportRuler.getViewportScrollPosition();return{top:i.top+this._viewportMargin,left:i.left+this._viewportMargin,right:i.left+t-this._viewportMargin,bottom:i.top+e-this._viewportMargin,width:t-2*this._viewportMargin,height:e-2*this._viewportMargin}}_isRtl(){return"rtl"===this._overlayRef.getDirection()}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(t,e){return"x"===e?null==t.offsetX?this._offsetX:t.offsetX:null==t.offsetY?this._offsetY:t.offsetY}_validatePositions(){}_addPanelClasses(t){this._pane&&ni(t).forEach(t=>{""!==t&&-1===this._appliedPanelClasses.indexOf(t)&&(this._appliedPanelClasses.push(t),this._pane.classList.add(t))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(t=>{this._pane.classList.remove(t)}),this._appliedPanelClasses=[])}_getOriginRect(){const t=this._origin;if(t instanceof r.l)return t.nativeElement.getBoundingClientRect();if(t instanceof Element)return t.getBoundingClientRect();const e=t.width||0,i=t.height||0;return{top:t.y,bottom:t.y+i,left:t.x,right:t.x+e,height:i,width:e}}}function Ir(t,e){for(let i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function Pr(t){if("number"!=typeof t&&null!=t){const[e,i]=t.split(Er);return i&&"px"!==i?null:parseFloat(e)}return t||null}function Or(t){return{top:Math.floor(t.top),right:Math.floor(t.right),bottom:Math.floor(t.bottom),left:Math.floor(t.left),width:Math.floor(t.width),height:Math.floor(t.height)}}class Mr{constructor(t,e,i,n,r,s,o){this._preferredPositions=[],this._positionStrategy=new Dr(i,n,r,s,o).withFlexibleDimensions(!1).withPush(!1).withViewportMargin(0),this.withFallbackPosition(t,e),this.onPositionChange=this._positionStrategy.positionChanges}get positions(){return this._preferredPositions}attach(t){this._overlayRef=t,this._positionStrategy.attach(t),this._direction&&(t.setDirection(this._direction),this._direction=null)}dispose(){this._positionStrategy.dispose()}detach(){this._positionStrategy.detach()}apply(){this._positionStrategy.apply()}recalculateLastPosition(){this._positionStrategy.reapplyLastPosition()}withScrollableContainers(t){this._positionStrategy.withScrollableContainers(t)}withFallbackPosition(t,e,i,n){const r=new vr(t,e,i,n);return this._preferredPositions.push(r),this._positionStrategy.withPositions(this._preferredPositions),this}withDirection(t){return this._overlayRef?this._overlayRef.setDirection(t):this._direction=t,this}withOffsetX(t){return this._positionStrategy.withDefaultOffsetX(t),this}withOffsetY(t){return this._positionStrategy.withDefaultOffsetY(t),this}withLockedPosition(t){return this._positionStrategy.withLockedPosition(t),this}withPositions(t){return this._preferredPositions=t.slice(),this._positionStrategy.withPositions(this._preferredPositions),this}setOrigin(t){return this._positionStrategy.setOrigin(t),this}}class Tr{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._leftOffset="",this._rightOffset="",this._alignItems="",this._justifyContent="",this._width="",this._height=""}attach(t){const e=t.getConfig();this._overlayRef=t,this._width&&!e.width&&t.updateSize({width:this._width}),this._height&&!e.height&&t.updateSize({height:this._height}),t.hostElement.classList.add("cdk-global-overlay-wrapper"),this._isDisposed=!1}top(t=""){return this._bottomOffset="",this._topOffset=t,this._alignItems="flex-start",this}left(t=""){return this._rightOffset="",this._leftOffset=t,this._justifyContent="flex-start",this}bottom(t=""){return this._topOffset="",this._bottomOffset=t,this._alignItems="flex-end",this}right(t=""){return this._leftOffset="",this._rightOffset=t,this._justifyContent="flex-end",this}width(t=""){return this._overlayRef?this._overlayRef.updateSize({width:t}):this._width=t,this}height(t=""){return this._overlayRef?this._overlayRef.updateSize({height:t}):this._height=t,this}centerHorizontally(t=""){return this.left(t),this._justifyContent="center",this}centerVertically(t=""){return this.top(t),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;const t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,i=this._overlayRef.getConfig(),{width:n,height:r,maxWidth:s,maxHeight:o}=i,a=!("100%"!==n&&"100vw"!==n||s&&"100%"!==s&&"100vw"!==s),l=!("100%"!==r&&"100vh"!==r||o&&"100%"!==o&&"100vh"!==o);t.position=this._cssPosition,t.marginLeft=a?"0":this._leftOffset,t.marginTop=l?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=this._rightOffset,a?e.justifyContent="flex-start":"center"===this._justifyContent?e.justifyContent="center":"rtl"===this._overlayRef.getConfig().direction?"flex-start"===this._justifyContent?e.justifyContent="flex-end":"flex-end"===this._justifyContent&&(e.justifyContent="flex-start"):e.justifyContent=this._justifyContent,e.alignItems=l?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;const t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,i=e.style;e.classList.remove("cdk-global-overlay-wrapper"),i.justifyContent=i.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}let Rr=(()=>{class t{constructor(t,e,i,n){this._viewportRuler=t,this._document=e,this._platform=i,this._overlayContainer=n}global(){return new Tr}connectedTo(t,e,i){return new Mr(e,i,t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}flexibleConnectedTo(t){return new Dr(t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(nr),r.Zb(a),r.Zb(ci),r.Zb(Sr))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(nr),Object(r.Zb)(a),Object(r.Zb)(ci),Object(r.Zb)(Sr))},token:t,providedIn:"root"}),t})(),Vr=0,Fr=(()=>{class t{constructor(t,e,i,n,r,s,o,a,l,c,h){this.scrollStrategies=t,this._overlayContainer=e,this._componentFactoryResolver=i,this._positionBuilder=n,this._keyboardDispatcher=r,this._injector=s,this._ngZone=o,this._document=a,this._directionality=l,this._location=c,this._outsideClickDispatcher=h}create(t){const e=this._createHostElement(),i=this._createPaneElement(e),n=this._createPortalOutlet(i),r=new br(t);return r.direction=r.direction||this._directionality.value,new kr(n,e,i,r,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher)}position(){return this._positionBuilder}_createPaneElement(t){const e=this._document.createElement("div");return e.id="cdk-overlay-"+Vr++,e.classList.add("cdk-overlay-pane"),t.appendChild(e),e}_createHostElement(){const t=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(t),t}_createPortalOutlet(t){return this._appRef||(this._appRef=this._injector.get(r.g)),new Ae(t,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Ar),r.Zb(Sr),r.Zb(r.j),r.Zb(Rr),r.Zb(wr),r.Zb(r.t),r.Zb(r.B),r.Zb(a),r.Zb(Zn),r.Zb(w),r.Zb(xr))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();const Lr=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],Ur=new r.s("cdk-connected-overlay-scroll-strategy");let Br=(()=>{class t{constructor(t){this.elementRef=t}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"]}),t})(),Nr=(()=>{class t{constructor(t,e,i,n,s){this._overlay=t,this._dir=s,this._hasBackdrop=!1,this._lockPosition=!1,this._growAfterOpen=!1,this._flexibleDimensions=!1,this._push=!1,this._backdropSubscription=ye.a.EMPTY,this._attachSubscription=ye.a.EMPTY,this._detachSubscription=ye.a.EMPTY,this._positionSubscription=ye.a.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new r.o,this.positionChange=new r.o,this.attach=new r.o,this.detach=new r.o,this.overlayKeydown=new r.o,this.overlayOutsideClick=new r.o,this._templatePortal=new fe(e,i),this._scrollStrategyFactory=n,this.scrollStrategy=this._scrollStrategyFactory()}get offsetX(){return this._offsetX}set offsetX(t){this._offsetX=t,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(t){this._offsetY=t,this._position&&this._updatePositionStrategy(this._position)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(t){this._hasBackdrop=ti(t)}get lockPosition(){return this._lockPosition}set lockPosition(t){this._lockPosition=ti(t)}get flexibleDimensions(){return this._flexibleDimensions}set flexibleDimensions(t){this._flexibleDimensions=ti(t)}get growAfterOpen(){return this._growAfterOpen}set growAfterOpen(t){this._growAfterOpen=ti(t)}get push(){return this._push}set push(t){this._push=ti(t)}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef&&this._overlayRef.dispose()}ngOnChanges(t){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),t.origin&&this.open&&this._position.apply()),t.open&&(this.open?this._attachOverlay():this._detachOverlay())}_createOverlay(){this.positions&&this.positions.length||(this.positions=Lr);const t=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=t.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=t.detachments().subscribe(()=>this.detach.emit()),t.keydownEvents().subscribe(t=>{this.overlayKeydown.next(t),27!==t.keyCode||this.disableClose||ke(t)||(t.preventDefault(),this._detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(t=>{this.overlayOutsideClick.next(t)})}_buildConfig(){const t=this._position=this.positionStrategy||this._createPositionStrategy(),e=new br({direction:this._dir,positionStrategy:t,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop});return(this.width||0===this.width)&&(e.width=this.width),(this.height||0===this.height)&&(e.height=this.height),(this.minWidth||0===this.minWidth)&&(e.minWidth=this.minWidth),(this.minHeight||0===this.minHeight)&&(e.minHeight=this.minHeight),this.backdropClass&&(e.backdropClass=this.backdropClass),this.panelClass&&(e.panelClass=this.panelClass),e}_updatePositionStrategy(t){const e=this.positions.map(t=>({originX:t.originX,originY:t.originY,overlayX:t.overlayX,overlayY:t.overlayY,offsetX:t.offsetX||this.offsetX,offsetY:t.offsetY||this.offsetY,panelClass:t.panelClass||void 0}));return t.setOrigin(this.origin.elementRef).withPositions(e).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){const t=this._overlay.position().flexibleConnectedTo(this.origin.elementRef);return this._updatePositionStrategy(t),t}_attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(t=>{this.backdropClick.emit(t)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(ar(()=>this.positionChange.observers.length>0)).subscribe(t=>{this.positionChange.emit(t),0===this.positionChange.observers.length&&this._positionSubscription.unsubscribe()}))}_detachOverlay(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Fr),r.Pb(r.O),r.Pb(r.S),r.Pb(Ur),r.Pb(Zn,8))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{viewportMargin:["cdkConnectedOverlayViewportMargin","viewportMargin"],open:["cdkConnectedOverlayOpen","open"],disableClose:["cdkConnectedOverlayDisableClose","disableClose"],scrollStrategy:["cdkConnectedOverlayScrollStrategy","scrollStrategy"],offsetX:["cdkConnectedOverlayOffsetX","offsetX"],offsetY:["cdkConnectedOverlayOffsetY","offsetY"],hasBackdrop:["cdkConnectedOverlayHasBackdrop","hasBackdrop"],lockPosition:["cdkConnectedOverlayLockPosition","lockPosition"],flexibleDimensions:["cdkConnectedOverlayFlexibleDimensions","flexibleDimensions"],growAfterOpen:["cdkConnectedOverlayGrowAfterOpen","growAfterOpen"],push:["cdkConnectedOverlayPush","push"],positions:["cdkConnectedOverlayPositions","positions"],origin:["cdkConnectedOverlayOrigin","origin"],positionStrategy:["cdkConnectedOverlayPositionStrategy","positionStrategy"],width:["cdkConnectedOverlayWidth","width"],height:["cdkConnectedOverlayHeight","height"],minWidth:["cdkConnectedOverlayMinWidth","minWidth"],minHeight:["cdkConnectedOverlayMinHeight","minHeight"],backdropClass:["cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:["cdkConnectedOverlayPanelClass","panelClass"],transformOriginSelector:["cdkConnectedOverlayTransformOriginOn","transformOriginSelector"]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],features:[r.Bb]}),t})();const jr={provide:Ur,deps:[Fr],useFactory:function(t){return()=>t.scrollStrategies.reposition()}};let zr=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[Fr,jr],imports:[[qn,ve,sr],sr]}),t})();const Hr=new r.R("11.2.5");class Kr{}function $r(t,e){return{type:7,name:t,definitions:e,options:{}}}function Gr(t,e=null){return{type:4,styles:e,timings:t}}function Wr(t,e=null){return{type:2,steps:t,options:e}}function Zr(t){return{type:6,styles:t,offset:null}}function qr(t,e,i){return{type:0,name:t,styles:e,options:i}}function Yr(t){return{type:5,steps:t}}function Qr(t,e,i=null){return{type:1,expr:t,animation:e,options:i}}function Xr(t=null){return{type:9,options:t}}function Jr(t,e,i=null){return{type:11,selector:t,animation:e,options:i}}function ts(t){Promise.resolve(null).then(t)}class es{constructor(t=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=t+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){ts(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){}setPosition(t){this._position=this.totalTime?t*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}class is{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let e=0,i=0,n=0;const r=this.players.length;0==r?ts(()=>this._onFinish()):this.players.forEach(t=>{t.onDone(()=>{++e==r&&this._onFinish()}),t.onDestroy(()=>{++i==r&&this._onDestroy()}),t.onStart(()=>{++n==r&&this._onStart()})}),this.totalTime=this.players.reduce((t,e)=>Math.max(t,e.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){const e=t*this.totalTime;this.players.forEach(t=>{const i=t.totalTime?Math.min(1,e/t.totalTime):1;t.setPosition(i)})}getPosition(){const t=this.players.reduce((t,e)=>null===t||e.totalTime>t.totalTime?e:t,null);return null!=t?t.getPosition():0}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}function ns(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function rs(t){switch(t.length){case 0:return new es;case 1:return t[0];default:return new is(t)}}function ss(t,e,i,n,r={},s={}){const o=[],a=[];let l=-1,c=null;if(n.forEach(t=>{const i=t.offset,n=i==l,h=n&&c||{};Object.keys(t).forEach(i=>{let n=i,a=t[i];if("offset"!==i)switch(n=e.normalizePropertyName(n,o),a){case"!":a=r[i];break;case"*":a=s[i];break;default:a=e.normalizeStyleValue(i,n,a,o)}h[n]=a}),n||a.push(h),c=h,l=i}),o.length){const t="\n - ";throw new Error(`Unable to animate due to the following errors:${t}${o.join(t)}`)}return a}function os(t,e,i,n){switch(e){case"start":t.onStart(()=>n(i&&as(i,"start",t)));break;case"done":t.onDone(()=>n(i&&as(i,"done",t)));break;case"destroy":t.onDestroy(()=>n(i&&as(i,"destroy",t)))}}function as(t,e,i){const n=i.totalTime,r=ls(t.element,t.triggerName,t.fromState,t.toState,e||t.phaseName,null==n?t.totalTime:n,!!i.disabled),s=t._data;return null!=s&&(r._data=s),r}function ls(t,e,i,n,r="",s=0,o){return{element:t,triggerName:e,fromState:i,toState:n,phaseName:r,totalTime:s,disabled:!!o}}function cs(t,e,i){let n;return t instanceof Map?(n=t.get(e),n||t.set(e,n=i)):(n=t[e],n||(n=t[e]=i)),n}function hs(t){const e=t.indexOf(":");return[t.substring(1,e),t.substr(e+1)]}let us=(t,e)=>!1,ds=(t,e)=>!1,ps=(t,e,i)=>[];const fs=ns();(fs||"undefined"!=typeof Element)&&(us=(t,e)=>t.contains(e),ds=(()=>{if(fs||Element.prototype.matches)return(t,e)=>t.matches(e);{const t=Element.prototype,e=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector;return e?(t,i)=>e.apply(t,[i]):ds}})(),ps=(t,e,i)=>{let n=[];if(i){const i=t.querySelectorAll(e);for(let t=0;t<i.length;t++)n.push(i[t])}else{const i=t.querySelector(e);i&&n.push(i)}return n});let ms=null,gs=!1;function As(t){ms||(ms=("undefined"!=typeof document?document.body:null)||{},gs=!!ms.style&&"WebkitAppearance"in ms.style);let e=!0;return ms.style&&!function(t){return"ebkit"==t.substring(1,6)}(t)&&(e=t in ms.style,!e&&gs)&&(e="Webkit"+t.charAt(0).toUpperCase()+t.substr(1)in ms.style),e}const bs=ds,vs=us,_s=ps;function ys(t){const e={};return Object.keys(t).forEach(i=>{const n=i.replace(/([a-z])([A-Z])/g,"$1-$2");e[n]=t[i]}),e}let ws=(()=>{class t{validateStyleProperty(t){return As(t)}matchesElement(t,e){return bs(t,e)}containsElement(t,e){return vs(t,e)}query(t,e,i){return _s(t,e,i)}computeStyle(t,e,i){return i||""}animate(t,e,i,n,r,s=[],o){return new es(i,n)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),xs=(()=>{class t{}return t.NOOP=new ws,t})();function Cs(t){if("number"==typeof t)return t;const e=t.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:Ss(parseFloat(e[1]),e[2])}function Ss(t,e){switch(e){case"s":return 1e3*t;default:return t}}function ks(t,e,i){return t.hasOwnProperty("duration")?t:function(t,e,i){let n,r=0,s="";if("string"==typeof t){const i=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===i)return e.push(`The provided timing value "${t}" is invalid.`),{duration:0,delay:0,easing:""};n=Ss(parseFloat(i[1]),i[2]);const o=i[3];null!=o&&(r=Ss(parseFloat(o),i[4]));const a=i[5];a&&(s=a)}else n=t;if(!i){let i=!1,s=e.length;n<0&&(e.push("Duration values below 0 are not allowed for this animation step."),i=!0),r<0&&(e.push("Delay values below 0 are not allowed for this animation step."),i=!0),i&&e.splice(s,0,`The provided timing value "${t}" is invalid.`)}return{duration:n,delay:r,easing:s}}(t,e,i)}function Es(t,e={}){return Object.keys(t).forEach(i=>{e[i]=t[i]}),e}function Ds(t,e,i={}){if(e)for(let n in t)i[n]=t[n];else Es(t,i);return i}function Is(t,e,i){return i?e+":"+i+";":""}function Ps(t){let e="";for(let i=0;i<t.style.length;i++){const n=t.style.item(i);e+=Is(0,n,t.style.getPropertyValue(n))}for(const i in t.style)t.style.hasOwnProperty(i)&&!i.startsWith("_")&&(e+=Is(0,i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),t.style[i]));t.setAttribute("style",e)}function Os(t,e,i){t.style&&(Object.keys(e).forEach(n=>{const r=Bs(n);i&&!i.hasOwnProperty(n)&&(i[n]=t.style[r]),t.style[r]=e[n]}),ns()&&Ps(t))}function Ms(t,e){t.style&&(Object.keys(e).forEach(e=>{const i=Bs(e);t.style[i]=""}),ns()&&Ps(t))}function Ts(t){return Array.isArray(t)?1==t.length?t[0]:Wr(t):t}const Rs=new RegExp("{{\\s*(.+?)\\s*}}","g");function Vs(t){let e=[];if("string"==typeof t){let i;for(;i=Rs.exec(t);)e.push(i[1]);Rs.lastIndex=0}return e}function Fs(t,e,i){const n=t.toString(),r=n.replace(Rs,(t,n)=>{let r=e[n];return e.hasOwnProperty(n)||(i.push(`Please provide a value for the animation param ${n}`),r=""),r.toString()});return r==n?t:r}function Ls(t){const e=[];let i=t.next();for(;!i.done;)e.push(i.value),i=t.next();return e}const Us=/-+([a-z0-9])/g;function Bs(t){return t.replace(Us,(...t)=>t[1].toUpperCase())}function Ns(t,e){return 0===t||0===e}function js(t,e,i){const n=Object.keys(i);if(n.length&&e.length){let s=e[0],o=[];if(n.forEach(t=>{s.hasOwnProperty(t)||o.push(t),s[t]=i[t]}),o.length)for(var r=1;r<e.length;r++){let i=e[r];o.forEach(function(e){i[e]=Hs(t,e)})}}return e}function zs(t,e,i){switch(e.type){case 7:return t.visitTrigger(e,i);case 0:return t.visitState(e,i);case 1:return t.visitTransition(e,i);case 2:return t.visitSequence(e,i);case 3:return t.visitGroup(e,i);case 4:return t.visitAnimate(e,i);case 5:return t.visitKeyframes(e,i);case 6:return t.visitStyle(e,i);case 8:return t.visitReference(e,i);case 9:return t.visitAnimateChild(e,i);case 10:return t.visitAnimateRef(e,i);case 11:return t.visitQuery(e,i);case 12:return t.visitStagger(e,i);default:throw new Error(`Unable to resolve animation metadata node #${e.type}`)}}function Hs(t,e){return window.getComputedStyle(t)[e]}function Ks(t,e){const i=[];return"string"==typeof t?t.split(/\s*,\s*/).forEach(t=>function(t,e,i){if(":"==t[0]){const n=function(t,e){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,e)=>parseFloat(e)>parseFloat(t);case":decrement":return(t,e)=>parseFloat(e)<parseFloat(t);default:return e.push(`The transition alias value "${t}" is not supported`),"* => *"}}(t,i);if("function"==typeof n)return void e.push(n);t=n}const n=t.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==n||n.length<4)return i.push(`The provided transition expression "${t}" is not supported`),e;const r=n[1],s=n[2],o=n[3];e.push(Ws(r,o)),"<"!=s[0]||"*"==r&&"*"==o||e.push(Ws(o,r))}(t,i,e)):i.push(t),i}const $s=new Set(["true","1"]),Gs=new Set(["false","0"]);function Ws(t,e){const i=$s.has(t)||Gs.has(t),n=$s.has(e)||Gs.has(e);return(r,s)=>{let o="*"==t||t==r,a="*"==e||e==s;return!o&&i&&"boolean"==typeof r&&(o=r?$s.has(t):Gs.has(t)),!a&&n&&"boolean"==typeof s&&(a=s?$s.has(e):Gs.has(e)),o&&a}}const Zs=new RegExp("s*:selfs*,?","g");function qs(t,e,i){return new Ys(t).build(e,i)}class Ys{constructor(t){this._driver=t}build(t,e){const i=new Qs(e);return this._resetContextStyleTimingState(i),zs(this,Ts(t),i)}_resetContextStyleTimingState(t){t.currentQuerySelector="",t.collectedStyles={},t.collectedStyles[""]={},t.currentTime=0}visitTrigger(t,e){let i=e.queryCount=0,n=e.depCount=0;const r=[],s=[];return"@"==t.name.charAt(0)&&e.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),t.definitions.forEach(t=>{if(this._resetContextStyleTimingState(e),0==t.type){const i=t,n=i.name;n.toString().split(/\s*,\s*/).forEach(t=>{i.name=t,r.push(this.visitState(i,e))}),i.name=n}else if(1==t.type){const r=this.visitTransition(t,e);i+=r.queryCount,n+=r.depCount,s.push(r)}else e.errors.push("only state() and transition() definitions can sit inside of a trigger()")}),{type:7,name:t.name,states:r,transitions:s,queryCount:i,depCount:n,options:null}}visitState(t,e){const i=this.visitStyle(t.styles,e),n=t.options&&t.options.params||null;if(i.containsDynamicStyles){const r=new Set,s=n||{};if(i.styles.forEach(t=>{if(Xs(t)){const e=t;Object.keys(e).forEach(t=>{Vs(e[t]).forEach(t=>{s.hasOwnProperty(t)||r.add(t)})})}}),r.size){const i=Ls(r.values());e.errors.push(`state("${t.name}", ...) must define default values for all the following style substitutions: ${i.join(", ")}`)}}return{type:0,name:t.name,style:i,options:n?{params:n}:null}}visitTransition(t,e){e.queryCount=0,e.depCount=0;const i=zs(this,Ts(t.animation),e);return{type:1,matchers:Ks(t.expr,e.errors),animation:i,queryCount:e.queryCount,depCount:e.depCount,options:Js(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(t=>zs(this,t,e)),options:Js(t.options)}}visitGroup(t,e){const i=e.currentTime;let n=0;const r=t.steps.map(t=>{e.currentTime=i;const r=zs(this,t,e);return n=Math.max(n,e.currentTime),r});return e.currentTime=n,{type:3,steps:r,options:Js(t.options)}}visitAnimate(t,e){const i=function(t,e){let i=null;if(t.hasOwnProperty("duration"))i=t;else if("number"==typeof t)return to(ks(t,e).duration,0,"");const n=t;if(n.split(/\s+/).some(t=>"{"==t.charAt(0)&&"{"==t.charAt(1))){const t=to(0,0,"");return t.dynamic=!0,t.strValue=n,t}return i=i||ks(n,e),to(i.duration,i.delay,i.easing)}(t.timings,e.errors);let n;e.currentAnimateTimings=i;let r=t.styles?t.styles:Zr({});if(5==r.type)n=this.visitKeyframes(r,e);else{let r=t.styles,s=!1;if(!r){s=!0;const t={};i.easing&&(t.easing=i.easing),r=Zr(t)}e.currentTime+=i.duration+i.delay;const o=this.visitStyle(r,e);o.isEmptyStep=s,n=o}return e.currentAnimateTimings=null,{type:4,timings:i,style:n,options:null}}visitStyle(t,e){const i=this._makeStyleAst(t,e);return this._validateStyleAst(i,e),i}_makeStyleAst(t,e){const i=[];Array.isArray(t.styles)?t.styles.forEach(t=>{"string"==typeof t?"*"==t?i.push(t):e.errors.push(`The provided style string value ${t} is not allowed.`):i.push(t)}):i.push(t.styles);let n=!1,r=null;return i.forEach(t=>{if(Xs(t)){const e=t,i=e.easing;if(i&&(r=i,delete e.easing),!n)for(let t in e)if(e[t].toString().indexOf("{{")>=0){n=!0;break}}}),{type:6,styles:i,easing:r,offset:t.offset,containsDynamicStyles:n,options:null}}_validateStyleAst(t,e){const i=e.currentAnimateTimings;let n=e.currentTime,r=e.currentTime;i&&r>0&&(r-=i.duration+i.delay),t.styles.forEach(t=>{"string"!=typeof t&&Object.keys(t).forEach(i=>{if(!this._driver.validateStyleProperty(i))return void e.errors.push(`The provided animation property "${i}" is not a supported CSS property for animations`);const s=e.collectedStyles[e.currentQuerySelector],o=s[i];let a=!0;o&&(r!=n&&r>=o.startTime&&n<=o.endTime&&(e.errors.push(`The CSS property "${i}" that exists between the times of "${o.startTime}ms" and "${o.endTime}ms" is also being animated in a parallel animation between the times of "${r}ms" and "${n}ms"`),a=!1),r=o.startTime),a&&(s[i]={startTime:r,endTime:n}),e.options&&function(t,e,i){const n=e.params||{},r=Vs(t);r.length&&r.forEach(t=>{n.hasOwnProperty(t)||i.push(`Unable to resolve the local animation param ${t} in the given list of values`)})}(t[i],e.options,e.errors)})})}visitKeyframes(t,e){const i={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push("keyframes() must be placed inside of a call to animate()"),i;let n=0;const r=[];let s=!1,o=!1,a=0;const l=t.steps.map(t=>{const i=this._makeStyleAst(t,e);let l=null!=i.offset?i.offset:function(t){if("string"==typeof t)return null;let e=null;if(Array.isArray(t))t.forEach(t=>{if(Xs(t)&&t.hasOwnProperty("offset")){const i=t;e=parseFloat(i.offset),delete i.offset}});else if(Xs(t)&&t.hasOwnProperty("offset")){const i=t;e=parseFloat(i.offset),delete i.offset}return e}(i.styles),c=0;return null!=l&&(n++,c=i.offset=l),o=o||c<0||c>1,s=s||c<a,a=c,r.push(c),i});o&&e.errors.push("Please ensure that all keyframe offsets are between 0 and 1"),s&&e.errors.push("Please ensure that all keyframe offsets are in order");const c=t.steps.length;let h=0;n>0&&n<c?e.errors.push("Not all style() steps within the declared keyframes() contain offsets"):0==n&&(h=1/(c-1));const u=c-1,d=e.currentTime,p=e.currentAnimateTimings,f=p.duration;return l.forEach((t,n)=>{const s=h>0?n==u?1:h*n:r[n],o=s*f;e.currentTime=d+p.delay+o,p.duration=o,this._validateStyleAst(t,e),t.offset=s,i.styles.push(t)}),i}visitReference(t,e){return{type:8,animation:zs(this,Ts(t.animation),e),options:Js(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:Js(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:Js(t.options)}}visitQuery(t,e){const i=e.currentQuerySelector,n=t.options||{};e.queryCount++,e.currentQuery=t;const[r,s]=function(t){const e=!!t.split(/\s*,\s*/).find(t=>":self"==t);return e&&(t=t.replace(Zs,"")),[t=t.replace(/@\*/g,".ng-trigger").replace(/@\w+/g,t=>".ng-trigger-"+t.substr(1)).replace(/:animating/g,".ng-animating"),e]}(t.selector);e.currentQuerySelector=i.length?i+" "+r:r,cs(e.collectedStyles,e.currentQuerySelector,{});const o=zs(this,Ts(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=i,{type:11,selector:r,limit:n.limit||0,optional:!!n.optional,includeSelf:s,animation:o,originalSelector:t.selector,options:Js(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push("stagger() can only be used inside of query()");const i="full"===t.timings?{duration:0,delay:0,easing:"full"}:ks(t.timings,e.errors,!0);return{type:12,animation:zs(this,Ts(t.animation),e),timings:i,options:null}}}class Qs{constructor(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null}}function Xs(t){return!Array.isArray(t)&&"object"==typeof t}function Js(t){var e;return t?(t=Es(t)).params&&(t.params=(e=t.params)?Es(e):null):t={},t}function to(t,e,i){return{duration:t,delay:e,easing:i}}function eo(t,e,i,n,r,s,o=null,a=!1){return{type:1,element:t,keyframes:e,preStyleProps:i,postStyleProps:n,duration:r,delay:s,totalTime:r+s,easing:o,subTimeline:a}}class io{constructor(){this._map=new Map}consume(t){let e=this._map.get(t);return e?this._map.delete(t):e=[],e}append(t,e){let i=this._map.get(t);i||this._map.set(t,i=[]),i.push(...e)}has(t){return this._map.has(t)}clear(){this._map.clear()}}const no=new RegExp(":enter","g"),ro=new RegExp(":leave","g");function so(t,e,i,n,r,s={},o={},a,l,c=[]){return(new oo).buildKeyframes(t,e,i,n,r,s,o,a,l,c)}class oo{buildKeyframes(t,e,i,n,r,s,o,a,l,c=[]){l=l||new io;const h=new lo(t,e,l,n,r,c,[]);h.options=a,h.currentTimeline.setStyles([s],null,h.errors,a),zs(this,i,h);const u=h.timelines.filter(t=>t.containsAnimation());if(u.length&&Object.keys(o).length){const t=u[u.length-1];t.allowOnlyTimelineStyles()||t.setStyles([o],null,h.errors,a)}return u.length?u.map(t=>t.buildKeyframes()):[eo(e,[],[],[],0,0,"",!1)]}visitTrigger(t,e){}visitState(t,e){}visitTransition(t,e){}visitAnimateChild(t,e){const i=e.subInstructions.consume(e.element);if(i){const n=e.createSubContext(t.options),r=e.currentTimeline.currentTime,s=this._visitSubInstructions(i,n,n.options);r!=s&&e.transformIntoNewTimeline(s)}e.previousNode=t}visitAnimateRef(t,e){const i=e.createSubContext(t.options);i.transformIntoNewTimeline(),this.visitReference(t.animation,i),e.transformIntoNewTimeline(i.currentTimeline.currentTime),e.previousNode=t}_visitSubInstructions(t,e,i){let n=e.currentTimeline.currentTime;const r=null!=i.duration?Cs(i.duration):null,s=null!=i.delay?Cs(i.delay):null;return 0!==r&&t.forEach(t=>{const i=e.appendInstructionToTimeline(t,r,s);n=Math.max(n,i.duration+i.delay)}),n}visitReference(t,e){e.updateOptions(t.options,!0),zs(this,t.animation,e),e.previousNode=t}visitSequence(t,e){const i=e.subContextCount;let n=e;const r=t.options;if(r&&(r.params||r.delay)&&(n=e.createSubContext(r),n.transformIntoNewTimeline(),null!=r.delay)){6==n.previousNode.type&&(n.currentTimeline.snapshotCurrentStyles(),n.previousNode=ao);const t=Cs(r.delay);n.delayNextStep(t)}t.steps.length&&(t.steps.forEach(t=>zs(this,t,n)),n.currentTimeline.applyStylesToKeyframe(),n.subContextCount>i&&n.transformIntoNewTimeline()),e.previousNode=t}visitGroup(t,e){const i=[];let n=e.currentTimeline.currentTime;const r=t.options&&t.options.delay?Cs(t.options.delay):0;t.steps.forEach(s=>{const o=e.createSubContext(t.options);r&&o.delayNextStep(r),zs(this,s,o),n=Math.max(n,o.currentTimeline.currentTime),i.push(o.currentTimeline)}),i.forEach(t=>e.currentTimeline.mergeTimelineCollectedStyles(t)),e.transformIntoNewTimeline(n),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){const i=t.strValue;return ks(e.params?Fs(i,e.params,e.errors):i,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,e){const i=e.currentAnimateTimings=this._visitTiming(t.timings,e),n=e.currentTimeline;i.delay&&(e.incrementTime(i.delay),n.snapshotCurrentStyles());const r=t.style;5==r.type?this.visitKeyframes(r,e):(e.incrementTime(i.duration),this.visitStyle(r,e),n.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}visitStyle(t,e){const i=e.currentTimeline,n=e.currentAnimateTimings;!n&&i.getCurrentStyleProperties().length&&i.forwardFrame();const r=n&&n.easing||t.easing;t.isEmptyStep?i.applyEmptyStep(r):i.setStyles(t.styles,r,e.errors,e.options),e.previousNode=t}visitKeyframes(t,e){const i=e.currentAnimateTimings,n=e.currentTimeline.duration,r=i.duration,s=e.createSubContext().currentTimeline;s.easing=i.easing,t.styles.forEach(t=>{s.forwardTime((t.offset||0)*r),s.setStyles(t.styles,t.easing,e.errors,e.options),s.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(s),e.transformIntoNewTimeline(n+r),e.previousNode=t}visitQuery(t,e){const i=e.currentTimeline.currentTime,n=t.options||{},r=n.delay?Cs(n.delay):0;r&&(6===e.previousNode.type||0==i&&e.currentTimeline.getCurrentStyleProperties().length)&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=ao);let s=i;const o=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!n.optional,e.errors);e.currentQueryTotal=o.length;let a=null;o.forEach((i,n)=>{e.currentQueryIndex=n;const o=e.createSubContext(t.options,i);r&&o.delayNextStep(r),i===e.element&&(a=o.currentTimeline),zs(this,t.animation,o),o.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,o.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),a&&(e.currentTimeline.mergeTimelineCollectedStyles(a),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){const i=e.parentContext,n=e.currentTimeline,r=t.timings,s=Math.abs(r.duration),o=s*(e.currentQueryTotal-1);let a=s*e.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":a=o-a;break;case"full":a=i.currentStaggerTime}const l=e.currentTimeline;a&&l.delayNextStep(a);const c=l.currentTime;zs(this,t.animation,e),e.previousNode=t,i.currentStaggerTime=n.currentTime-c+(n.startTime-i.currentTimeline.startTime)}}const ao={};class lo{constructor(t,e,i,n,r,s,o,a){this._driver=t,this.element=e,this.subInstructions=i,this._enterClassName=n,this._leaveClassName=r,this.errors=s,this.timelines=o,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=ao,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=a||new co(this._driver,e,0),o.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,e){if(!t)return;const i=t;let n=this.options;null!=i.duration&&(n.duration=Cs(i.duration)),null!=i.delay&&(n.delay=Cs(i.delay));const r=i.params;if(r){let t=n.params;t||(t=this.options.params={}),Object.keys(r).forEach(i=>{e&&t.hasOwnProperty(i)||(t[i]=Fs(r[i],t,this.errors))})}}_copyOptions(){const t={};if(this.options){const e=this.options.params;if(e){const i=t.params={};Object.keys(e).forEach(t=>{i[t]=e[t]})}}return t}createSubContext(t=null,e,i){const n=e||this.element,r=new lo(this._driver,n,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(n,i||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(t),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(t){return this.previousNode=ao,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,e,i){const n={duration:null!=e?e:t.duration,delay:this.currentTimeline.currentTime+(null!=i?i:0)+t.delay,easing:""},r=new ho(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,n,t.stretchStartingKeyframe);return this.timelines.push(r),n}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,e,i,n,r,s){let o=[];if(n&&o.push(this.element),t.length>0){t=(t=t.replace(no,"."+this._enterClassName)).replace(ro,"."+this._leaveClassName);let e=this._driver.query(this.element,t,1!=i);0!==i&&(e=i<0?e.slice(e.length+i,e.length):e.slice(0,i)),o.push(...e)}return r||0!=o.length||s.push(`\`query("${e}")\` returned zero elements. (Use \`query("${e}", { optional: true })\` if you wish to allow this.)`),o}}class co{constructor(t,e,i,n){this._driver=t,this.element=e,this.startTime=i,this._elementTimelineStylesLookup=n,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}}getCurrentStyleProperties(){return Object.keys(this._currentKeyframe)}get currentTime(){return this.startTime+this.duration}delayNextStep(t){const e=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,e){return this.applyStylesToKeyframe(),new co(this._driver,t,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,e){this._localTimelineStyles[t]=e,this._globalTimelineStyles[t]=e,this._styleSummary[t]={time:this.currentTime,value:e}}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&(this._previousKeyframe.easing=t),Object.keys(this._globalTimelineStyles).forEach(t=>{this._backFill[t]=this._globalTimelineStyles[t]||"*",this._currentKeyframe[t]="*"}),this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,i,n){e&&(this._previousKeyframe.easing=e);const r=n&&n.params||{},s=function(t,e){const i={};let n;return t.forEach(t=>{"*"===t?(n=n||Object.keys(e),n.forEach(t=>{i[t]="*"})):Ds(t,!1,i)}),i}(t,this._globalTimelineStyles);Object.keys(s).forEach(t=>{const e=Fs(s[t],r,i);this._pendingStyles[t]=e,this._localTimelineStyles.hasOwnProperty(t)||(this._backFill[t]=this._globalTimelineStyles.hasOwnProperty(t)?this._globalTimelineStyles[t]:"*"),this._updateStyle(t,e)})}applyStylesToKeyframe(){const t=this._pendingStyles,e=Object.keys(t);0!=e.length&&(this._pendingStyles={},e.forEach(e=>{this._currentKeyframe[e]=t[e]}),Object.keys(this._localTimelineStyles).forEach(t=>{this._currentKeyframe.hasOwnProperty(t)||(this._currentKeyframe[t]=this._localTimelineStyles[t])}))}snapshotCurrentStyles(){Object.keys(this._localTimelineStyles).forEach(t=>{const e=this._localTimelineStyles[t];this._pendingStyles[t]=e,this._updateStyle(t,e)})}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const t=[];for(let e in this._currentKeyframe)t.push(e);return t}mergeTimelineCollectedStyles(t){Object.keys(t._styleSummary).forEach(e=>{const i=this._styleSummary[e],n=t._styleSummary[e];(!i||n.time>i.time)&&this._updateStyle(e,n.value)})}buildKeyframes(){this.applyStylesToKeyframe();const t=new Set,e=new Set,i=1===this._keyframes.size&&0===this.duration;let n=[];this._keyframes.forEach((r,s)=>{const o=Ds(r,!0);Object.keys(o).forEach(i=>{const n=o[i];"!"==n?t.add(i):"*"==n&&e.add(i)}),i||(o.offset=s/this.duration),n.push(o)});const r=t.size?Ls(t.values()):[],s=e.size?Ls(e.values()):[];if(i){const t=n[0],e=Es(t);t.offset=0,e.offset=1,n=[t,e]}return eo(this.element,n,r,s,this.duration,this.startTime,this.easing,!1)}}class ho extends co{constructor(t,e,i,n,r,s,o=!1){super(t,e,s.delay),this.element=e,this.keyframes=i,this.preStyleProps=n,this.postStyleProps=r,this._stretchStartingKeyframe=o,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:e,duration:i,easing:n}=this.timings;if(this._stretchStartingKeyframe&&e){const r=[],s=i+e,o=e/s,a=Ds(t[0],!1);a.offset=0,r.push(a);const l=Ds(t[0],!1);l.offset=uo(o),r.push(l);const c=t.length-1;for(let n=1;n<=c;n++){let o=Ds(t[n],!1);o.offset=uo((e+o.offset*i)/s),r.push(o)}i=s,e=0,n="",t=r}return eo(this.element,t,this.preStyleProps,this.postStyleProps,i,e,n,!0)}}function uo(t,e=3){const i=Math.pow(10,e-1);return Math.round(t*i)/i}class po{}class fo extends po{normalizePropertyName(t,e){return Bs(t)}normalizeStyleValue(t,e,i,n){let r="";const s=i.toString().trim();if(mo[e]&&0!==i&&"0"!==i)if("number"==typeof i)r="px";else{const e=i.match(/^[+-]?[\d\.]+([a-z]*)$/);e&&0==e[1].length&&n.push(`Please provide a CSS unit value for ${t}:${i}`)}return s+r}}const mo=(()=>function(t){const e={};return t.forEach(t=>e[t]=!0),e}("width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective".split(",")))();function go(t,e,i,n,r,s,o,a,l,c,h,u,d){return{type:0,element:t,triggerName:e,isRemovalTransition:r,fromState:i,fromStyles:s,toState:n,toStyles:o,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:h,totalTime:u,errors:d}}const Ao={};class bo{constructor(t,e,i){this._triggerName=t,this.ast=e,this._stateStyles=i}match(t,e,i,n){return function(t,e,i,n,r){return t.some(t=>t(e,i,n,r))}(this.ast.matchers,t,e,i,n)}buildStyles(t,e,i){const n=this._stateStyles["*"],r=this._stateStyles[t],s=n?n.buildStyles(e,i):{};return r?r.buildStyles(e,i):s}build(t,e,i,n,r,s,o,a,l,c){const h=[],u=this.ast.options&&this.ast.options.params||Ao,d=this.buildStyles(i,o&&o.params||Ao,h),p=a&&a.params||Ao,f=this.buildStyles(n,p,h),m=new Set,g=new Map,A=new Map,b="void"===n,v={params:Object.assign(Object.assign({},u),p)},_=c?[]:so(t,e,this.ast.animation,r,s,d,f,v,l,h);let y=0;if(_.forEach(t=>{y=Math.max(t.duration+t.delay,y)}),h.length)return go(e,this._triggerName,i,n,b,d,f,[],[],g,A,y,h);_.forEach(t=>{const i=t.element,n=cs(g,i,{});t.preStyleProps.forEach(t=>n[t]=!0);const r=cs(A,i,{});t.postStyleProps.forEach(t=>r[t]=!0),i!==e&&m.add(i)});const w=Ls(m.values());return go(e,this._triggerName,i,n,b,d,f,_,w,g,A,y)}}class vo{constructor(t,e){this.styles=t,this.defaultParams=e}buildStyles(t,e){const i={},n=Es(this.defaultParams);return Object.keys(t).forEach(e=>{const i=t[e];null!=i&&(n[e]=i)}),this.styles.styles.forEach(t=>{if("string"!=typeof t){const r=t;Object.keys(r).forEach(t=>{let s=r[t];s.length>1&&(s=Fs(s,n,e)),i[t]=s})}}),i}}class _o{constructor(t,e){this.name=t,this.ast=e,this.transitionFactories=[],this.states={},e.states.forEach(t=>{this.states[t.name]=new vo(t.style,t.options&&t.options.params||{})}),yo(this.states,"true","1"),yo(this.states,"false","0"),e.transitions.forEach(e=>{this.transitionFactories.push(new bo(t,e,this.states))}),this.fallbackTransition=new bo(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[(t,e)=>!0],options:null,queryCount:0,depCount:0},this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,e,i,n){return this.transitionFactories.find(r=>r.match(t,e,i,n))||null}matchStyles(t,e,i){return this.fallbackTransition.buildStyles(t,e,i)}}function yo(t,e,i){t.hasOwnProperty(e)?t.hasOwnProperty(i)||(t[i]=t[e]):t.hasOwnProperty(i)&&(t[e]=t[i])}const wo=new io;class xo{constructor(t,e,i){this.bodyNode=t,this._driver=e,this._normalizer=i,this._animations={},this._playersById={},this.players=[]}register(t,e){const i=[],n=qs(this._driver,e,i);if(i.length)throw new Error(`Unable to build the animation due to the following errors: ${i.join("\n")}`);this._animations[t]=n}_buildPlayer(t,e,i){const n=t.element,r=ss(0,this._normalizer,0,t.keyframes,e,i);return this._driver.animate(n,r,t.duration,t.delay,t.easing,[],!0)}create(t,e,i={}){const n=[],r=this._animations[t];let s;const o=new Map;if(r?(s=so(this._driver,e,r,"ng-enter","ng-leave",{},{},i,wo,n),s.forEach(t=>{const e=cs(o,t.element,{});t.postStyleProps.forEach(t=>e[t]=null)})):(n.push("The requested animation doesn't exist or has already been destroyed"),s=[]),n.length)throw new Error(`Unable to create the animation due to the following errors: ${n.join("\n")}`);o.forEach((t,e)=>{Object.keys(t).forEach(i=>{t[i]=this._driver.computeStyle(e,i,"*")})});const a=rs(s.map(t=>{const e=o.get(t.element);return this._buildPlayer(t,{},e)}));return this._playersById[t]=a,a.onDestroy(()=>this.destroy(t)),this.players.push(a),a}destroy(t){const e=this._getPlayer(t);e.destroy(),delete this._playersById[t];const i=this.players.indexOf(e);i>=0&&this.players.splice(i,1)}_getPlayer(t){const e=this._playersById[t];if(!e)throw new Error(`Unable to find the timeline player referenced by ${t}`);return e}listen(t,e,i,n){const r=ls(e,"","","");return os(this._getPlayer(t),i,r,n),()=>{}}command(t,e,i,n){if("register"==i)return void this.register(t,n[0]);if("create"==i)return void this.create(t,e,n[0]||{});const r=this._getPlayer(t);switch(i){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(n[0]));break;case"destroy":this.destroy(t)}}}const Co=[],So={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},ko={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0};class Eo{constructor(t,e=""){this.namespaceId=e;const i=t&&t.hasOwnProperty("value");if(this.value=null!=(n=i?t.value:t)?n:null,i){const e=Es(t);delete e.value,this.options=e}else this.options={};var n;this.options.params||(this.options.params={})}get params(){return this.options.params}absorbOptions(t){const e=t.params;if(e){const t=this.options.params;Object.keys(e).forEach(i=>{null==t[i]&&(t[i]=e[i])})}}}const Do=new Eo("void");class Io{constructor(t,e,i){this.id=t,this.hostElement=e,this._engine=i,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,Fo(e,this._hostClassName)}listen(t,e,i,n){if(!this._triggers.hasOwnProperty(e))throw new Error(`Unable to listen on the animation trigger event "${i}" because the animation trigger "${e}" doesn't exist!`);if(null==i||0==i.length)throw new Error(`Unable to listen on the animation trigger "${e}" because the provided event is undefined!`);if("start"!=(r=i)&&"done"!=r)throw new Error(`The provided animation trigger event "${i}" for the animation trigger "${e}" is not supported!`);var r;const s=cs(this._elementListeners,t,[]),o={name:e,phase:i,callback:n};s.push(o);const a=cs(this._engine.statesByElement,t,{});return a.hasOwnProperty(e)||(Fo(t,"ng-trigger"),Fo(t,"ng-trigger-"+e),a[e]=Do),()=>{this._engine.afterFlush(()=>{const t=s.indexOf(o);t>=0&&s.splice(t,1),this._triggers[e]||delete a[e]})}}register(t,e){return!this._triggers[t]&&(this._triggers[t]=e,!0)}_getTrigger(t){const e=this._triggers[t];if(!e)throw new Error(`The provided animation trigger "${t}" has not been registered!`);return e}trigger(t,e,i,n=!0){const r=this._getTrigger(e),s=new Oo(this.id,e,t);let o=this._engine.statesByElement.get(t);o||(Fo(t,"ng-trigger"),Fo(t,"ng-trigger-"+e),this._engine.statesByElement.set(t,o={}));let a=o[e];const l=new Eo(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&a&&l.absorbOptions(a.options),o[e]=l,a||(a=Do),"void"!==l.value&&a.value===l.value){if(!function(t,e){const i=Object.keys(t),n=Object.keys(e);if(i.length!=n.length)return!1;for(let r=0;r<i.length;r++){const n=i[r];if(!e.hasOwnProperty(n)||t[n]!==e[n])return!1}return!0}(a.params,l.params)){const e=[],i=r.matchStyles(a.value,a.params,e),n=r.matchStyles(l.value,l.params,e);e.length?this._engine.reportError(e):this._engine.afterFlush(()=>{Ms(t,i),Os(t,n)})}return}const c=cs(this._engine.playersByElement,t,[]);c.forEach(t=>{t.namespaceId==this.id&&t.triggerName==e&&t.queued&&t.destroy()});let h=r.matchTransition(a.value,l.value,t,l.params),u=!1;if(!h){if(!n)return;h=r.fallbackTransition,u=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:h,fromState:a,toState:l,player:s,isFallbackTransition:u}),u||(Fo(t,"ng-animate-queued"),s.onStart(()=>{Lo(t,"ng-animate-queued")})),s.onDone(()=>{let e=this.players.indexOf(s);e>=0&&this.players.splice(e,1);const i=this._engine.playersByElement.get(t);if(i){let t=i.indexOf(s);t>=0&&i.splice(t,1)}}),this.players.push(s),c.push(s),s}deregister(t){delete this._triggers[t],this._engine.statesByElement.forEach((e,i)=>{delete e[t]}),this._elementListeners.forEach((e,i)=>{this._elementListeners.set(i,e.filter(e=>e.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);const e=this._engine.playersByElement.get(t);e&&(e.forEach(t=>t.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,e){const i=this._engine.driver.query(t,".ng-trigger",!0);i.forEach(t=>{if(t.__ng_removed)return;const i=this._engine.fetchNamespacesByElement(t);i.size?i.forEach(i=>i.triggerLeaveAnimation(t,e,!1,!0)):this.clearElementCache(t)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(t=>this.clearElementCache(t)))}triggerLeaveAnimation(t,e,i,n){const r=this._engine.statesByElement.get(t);if(r){const s=[];if(Object.keys(r).forEach(e=>{if(this._triggers[e]){const i=this.trigger(t,e,"void",n);i&&s.push(i)}}),s.length)return this._engine.markElementAsRemoved(this.id,t,!0,e),i&&rs(s).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){const e=this._elementListeners.get(t),i=this._engine.statesByElement.get(t);if(e&&i){const n=new Set;e.forEach(e=>{const r=e.name;if(n.has(r))return;n.add(r);const s=this._triggers[r].fallbackTransition,o=i[r]||Do,a=new Eo("void"),l=new Oo(this.id,r,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:r,transition:s,fromState:o,toState:a,player:l,isFallbackTransition:!0})})}}removeNode(t,e){const i=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),this.triggerLeaveAnimation(t,e,!0))return;let n=!1;if(i.totalAnimations){const e=i.players.length?i.playersByQueriedElement.get(t):[];if(e&&e.length)n=!0;else{let e=t;for(;e=e.parentNode;)if(i.statesByElement.get(e)){n=!0;break}}}if(this.prepareLeaveAnimationListeners(t),n)i.markElementAsRemoved(this.id,t,!1,e);else{const n=t.__ng_removed;n&&n!==So||(i.afterFlush(()=>this.clearElementCache(t)),i.destroyInnerAnimations(t),i._onRemovalComplete(t,e))}}insertNode(t,e){Fo(t,this._hostClassName)}drainQueuedTransitions(t){const e=[];return this._queue.forEach(i=>{const n=i.player;if(n.destroyed)return;const r=i.element,s=this._elementListeners.get(r);s&&s.forEach(e=>{if(e.name==i.triggerName){const n=ls(r,i.triggerName,i.fromState.value,i.toState.value);n._data=t,os(i.player,e.phase,n,e.callback)}}),n.markedForDestroy?this._engine.afterFlush(()=>{n.destroy()}):e.push(i)}),this._queue=[],e.sort((t,e)=>{const i=t.transition.ast.depCount,n=e.transition.ast.depCount;return 0==i||0==n?i-n:this._engine.driver.containsElement(t.element,e.element)?1:-1})}destroy(t){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}elementContainsData(t){let e=!1;return this._elementListeners.has(t)&&(e=!0),e=!!this._queue.find(e=>e.element===t)||e,e}}class Po{constructor(t,e,i){this.bodyNode=t,this.driver=e,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(t,e)=>{}}_onRemovalComplete(t,e){this.onRemovalComplete(t,e)}get queuedPlayers(){const t=[];return this._namespaceList.forEach(e=>{e.players.forEach(e=>{e.queued&&t.push(e)})}),t}createNamespace(t,e){const i=new Io(t,e,this);return e.parentNode?this._balanceNamespaceList(i,e):(this.newHostElements.set(e,i),this.collectEnterElement(e)),this._namespaceLookup[t]=i}_balanceNamespaceList(t,e){const i=this._namespaceList.length-1;if(i>=0){let n=!1;for(let r=i;r>=0;r--)if(this.driver.containsElement(this._namespaceList[r].hostElement,e)){this._namespaceList.splice(r+1,0,t),n=!0;break}n||this._namespaceList.splice(0,0,t)}else this._namespaceList.push(t);return this.namespacesByHostElement.set(e,t),t}register(t,e){let i=this._namespaceLookup[t];return i||(i=this.createNamespace(t,e)),i}registerTrigger(t,e,i){let n=this._namespaceLookup[t];n&&n.register(e,i)&&this.totalAnimations++}destroy(t,e){if(!t)return;const i=this._fetchNamespace(t);this.afterFlush(()=>{this.namespacesByHostElement.delete(i.hostElement),delete this._namespaceLookup[t];const e=this._namespaceList.indexOf(i);e>=0&&this._namespaceList.splice(e,1)}),this.afterFlushAnimationsDone(()=>i.destroy(e))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){const e=new Set,i=this.statesByElement.get(t);if(i){const t=Object.keys(i);for(let n=0;n<t.length;n++){const r=i[t[n]].namespaceId;if(r){const t=this._fetchNamespace(r);t&&e.add(t)}}}return e}trigger(t,e,i,n){if(Mo(e)){const r=this._fetchNamespace(t);if(r)return r.trigger(e,i,n),!0}return!1}insertNode(t,e,i,n){if(!Mo(e))return;const r=e.__ng_removed;if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;const t=this.collectedLeaveElements.indexOf(e);t>=0&&this.collectedLeaveElements.splice(t,1)}if(t){const n=this._fetchNamespace(t);n&&n.insertNode(e,i)}n&&this.collectEnterElement(e)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),Fo(t,"ng-animate-disabled")):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Lo(t,"ng-animate-disabled"))}removeNode(t,e,i,n){if(Mo(e)){const r=t?this._fetchNamespace(t):null;if(r?r.removeNode(e,n):this.markElementAsRemoved(t,e,!1,n),i){const i=this.namespacesByHostElement.get(e);i&&i.id!==t&&i.removeNode(e,n)}}else this._onRemovalComplete(e,n)}markElementAsRemoved(t,e,i,n){this.collectedLeaveElements.push(e),e.__ng_removed={namespaceId:t,setForRemoval:n,hasAnimation:i,removedBeforeQueried:!1}}listen(t,e,i,n,r){return Mo(e)?this._fetchNamespace(t).listen(e,i,n,r):()=>{}}_buildInstruction(t,e,i,n,r){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,i,n,t.fromState.options,t.toState.options,e,r)}destroyInnerAnimations(t){let e=this.driver.query(t,".ng-trigger",!0);e.forEach(t=>this.destroyActiveAnimationsForElement(t)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,".ng-animating",!0),e.forEach(t=>this.finishActiveQueriedAnimationOnElement(t)))}destroyActiveAnimationsForElement(t){const e=this.playersByElement.get(t);e&&e.forEach(t=>{t.queued?t.markedForDestroy=!0:t.destroy()})}finishActiveQueriedAnimationOnElement(t){const e=this.playersByQueriedElement.get(t);e&&e.forEach(t=>t.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return rs(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t.__ng_removed;if(e&&e.setForRemoval){if(t.__ng_removed=So,e.namespaceId){this.destroyInnerAnimations(t);const i=this._fetchNamespace(e.namespaceId);i&&i.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}this.driver.matchesElement(t,".ng-animate-disabled")&&this.markElementAsDisabled(t,!1),this.driver.query(t,".ng-animate-disabled",!0).forEach(t=>{this.markElementAsDisabled(t,!1)})}flush(t=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((t,e)=>this._balanceNamespaceList(t,e)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;i<this.collectedEnterElements.length;i++)Fo(this.collectedEnterElements[i],"ng-star-inserted");if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){const i=[];try{e=this._flushAnimations(i,t)}finally{for(let t=0;t<i.length;t++)i[t]()}}else for(let i=0;i<this.collectedLeaveElements.length;i++)this.processLeaveNode(this.collectedLeaveElements[i]);if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(t=>t()),this._flushFns=[],this._whenQuietFns.length){const t=this._whenQuietFns;this._whenQuietFns=[],e.length?rs(e).onDone(()=>{t.forEach(t=>t())}):t.forEach(t=>t())}}reportError(t){throw new Error(`Unable to process animations due to the following failed trigger transitions\n ${t.join("\n")}`)}_flushAnimations(t,e){const i=new io,n=[],r=new Map,s=[],o=new Map,a=new Map,l=new Map,c=new Set;this.disabledNodes.forEach(t=>{c.add(t);const e=this.driver.query(t,".ng-animate-queued",!0);for(let i=0;i<e.length;i++)c.add(e[i])});const h=this.bodyNode,u=Array.from(this.statesByElement.keys()),d=Vo(u,this.collectedEnterElements),p=new Map;let f=0;d.forEach((t,e)=>{const i="ng-enter"+f++;p.set(e,i),t.forEach(t=>Fo(t,i))});const m=[],g=new Set,A=new Set;for(let P=0;P<this.collectedLeaveElements.length;P++){const t=this.collectedLeaveElements[P],e=t.__ng_removed;e&&e.setForRemoval&&(m.push(t),g.add(t),e.hasAnimation?this.driver.query(t,".ng-star-inserted",!0).forEach(t=>g.add(t)):A.add(t))}const b=new Map,v=Vo(u,Array.from(g));v.forEach((t,e)=>{const i="ng-leave"+f++;b.set(e,i),t.forEach(t=>Fo(t,i))}),t.push(()=>{d.forEach((t,e)=>{const i=p.get(e);t.forEach(t=>Lo(t,i))}),v.forEach((t,e)=>{const i=b.get(e);t.forEach(t=>Lo(t,i))}),m.forEach(t=>{this.processLeaveNode(t)})});const _=[],y=[];for(let P=this._namespaceList.length-1;P>=0;P--)this._namespaceList[P].drainQueuedTransitions(e).forEach(t=>{const e=t.player,r=t.element;if(_.push(e),this.collectedEnterElements.length){const t=r.__ng_removed;if(t&&t.setForMove)return void e.destroy()}const c=!h||!this.driver.containsElement(h,r),u=b.get(r),d=p.get(r),f=this._buildInstruction(t,i,d,u,c);if(f.errors&&f.errors.length)y.push(f);else{if(c)return e.onStart(()=>Ms(r,f.fromStyles)),e.onDestroy(()=>Os(r,f.toStyles)),void n.push(e);if(t.isFallbackTransition)return e.onStart(()=>Ms(r,f.fromStyles)),e.onDestroy(()=>Os(r,f.toStyles)),void n.push(e);f.timelines.forEach(t=>t.stretchStartingKeyframe=!0),i.append(r,f.timelines),s.push({instruction:f,player:e,element:r}),f.queriedElements.forEach(t=>cs(o,t,[]).push(e)),f.preStyleProps.forEach((t,e)=>{const i=Object.keys(t);if(i.length){let t=a.get(e);t||a.set(e,t=new Set),i.forEach(e=>t.add(e))}}),f.postStyleProps.forEach((t,e)=>{const i=Object.keys(t);let n=l.get(e);n||l.set(e,n=new Set),i.forEach(t=>n.add(t))})}});if(y.length){const t=[];y.forEach(e=>{t.push(`@${e.triggerName} has failed due to:\n`),e.errors.forEach(e=>t.push(`- ${e}\n`))}),_.forEach(t=>t.destroy()),this.reportError(t)}const w=new Map,x=new Map;s.forEach(t=>{const e=t.element;i.has(e)&&(x.set(e,e),this._beforeAnimationBuild(t.player.namespaceId,t.instruction,w))}),n.forEach(t=>{const e=t.element;this._getPreviousPlayers(e,!1,t.namespaceId,t.triggerName,null).forEach(t=>{cs(w,e,[]).push(t),t.destroy()})});const C=m.filter(t=>No(t,a,l)),S=new Map;Ro(S,this.driver,A,l,"*").forEach(t=>{No(t,a,l)&&C.push(t)});const k=new Map;d.forEach((t,e)=>{Ro(k,this.driver,new Set(t),a,"!")}),C.forEach(t=>{const e=S.get(t),i=k.get(t);S.set(t,Object.assign(Object.assign({},e),i))});const E=[],D=[],I={};s.forEach(t=>{const{element:e,player:s,instruction:o}=t;if(i.has(e)){if(c.has(e))return s.onDestroy(()=>Os(e,o.toStyles)),s.disabled=!0,s.overrideTotalTime(o.totalTime),void n.push(s);let t=I;if(x.size>1){let i=e;const n=[];for(;i=i.parentNode;){const e=x.get(i);if(e){t=e;break}n.push(i)}n.forEach(e=>x.set(e,t))}const i=this._buildAnimation(s.namespaceId,o,w,r,k,S);if(s.setRealPlayer(i),t===I)E.push(s);else{const e=this.playersByElement.get(t);e&&e.length&&(s.parentPlayer=rs(e)),n.push(s)}}else Ms(e,o.fromStyles),s.onDestroy(()=>Os(e,o.toStyles)),D.push(s),c.has(e)&&n.push(s)}),D.forEach(t=>{const e=r.get(t.element);if(e&&e.length){const i=rs(e);t.setRealPlayer(i)}}),n.forEach(t=>{t.parentPlayer?t.syncPlayerEvents(t.parentPlayer):t.destroy()});for(let P=0;P<m.length;P++){const t=m[P],e=t.__ng_removed;if(Lo(t,"ng-leave"),e&&e.hasAnimation)continue;let i=[];if(o.size){let e=o.get(t);e&&e.length&&i.push(...e);let n=this.driver.query(t,".ng-animating",!0);for(let t=0;t<n.length;t++){let e=o.get(n[t]);e&&e.length&&i.push(...e)}}const n=i.filter(t=>!t.destroyed);n.length?Uo(this,t,n):this.processLeaveNode(t)}return m.length=0,E.forEach(t=>{this.players.push(t),t.onDone(()=>{t.destroy();const e=this.players.indexOf(t);this.players.splice(e,1)}),t.play()}),E}elementContainsData(t,e){let i=!1;const n=e.__ng_removed;return n&&n.setForRemoval&&(i=!0),this.playersByElement.has(e)&&(i=!0),this.playersByQueriedElement.has(e)&&(i=!0),this.statesByElement.has(e)&&(i=!0),this._fetchNamespace(t).elementContainsData(e)||i}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,e,i,n,r){let s=[];if(e){const e=this.playersByQueriedElement.get(t);e&&(s=e)}else{const e=this.playersByElement.get(t);if(e){const t=!r||"void"==r;e.forEach(e=>{e.queued||(t||e.triggerName==n)&&s.push(e)})}}return(i||n)&&(s=s.filter(t=>!(i&&i!=t.namespaceId||n&&n!=t.triggerName))),s}_beforeAnimationBuild(t,e,i){const n=e.element,r=e.isRemovalTransition?void 0:t,s=e.isRemovalTransition?void 0:e.triggerName;for(const o of e.timelines){const t=o.element,a=t!==n,l=cs(i,t,[]);this._getPreviousPlayers(t,a,r,s,e.toState).forEach(t=>{const e=t.getRealPlayer();e.beforeDestroy&&e.beforeDestroy(),t.destroy(),l.push(t)})}Ms(n,e.fromStyles)}_buildAnimation(t,e,i,n,r,s){const o=e.triggerName,a=e.element,l=[],c=new Set,h=new Set,u=e.timelines.map(e=>{const u=e.element;c.add(u);const d=u.__ng_removed;if(d&&d.removedBeforeQueried)return new es(e.duration,e.delay);const p=u!==a,f=function(t){const e=[];return Bo(t,e),e}((i.get(u)||Co).map(t=>t.getRealPlayer())).filter(t=>!!t.element&&t.element===u),m=r.get(u),g=s.get(u),A=ss(0,this._normalizer,0,e.keyframes,m,g),b=this._buildPlayer(e,A,f);if(e.subTimeline&&n&&h.add(u),p){const e=new Oo(t,o,u);e.setRealPlayer(b),l.push(e)}return b});l.forEach(t=>{cs(this.playersByQueriedElement,t.element,[]).push(t),t.onDone(()=>function(t,e,i){let n;if(t instanceof Map){if(n=t.get(e),n){if(n.length){const t=n.indexOf(i);n.splice(t,1)}0==n.length&&t.delete(e)}}else if(n=t[e],n){if(n.length){const t=n.indexOf(i);n.splice(t,1)}0==n.length&&delete t[e]}return n}(this.playersByQueriedElement,t.element,t))}),c.forEach(t=>Fo(t,"ng-animating"));const d=rs(u);return d.onDestroy(()=>{c.forEach(t=>Lo(t,"ng-animating")),Os(a,e.toStyles)}),h.forEach(t=>{cs(n,t,[]).push(d)}),d}_buildPlayer(t,e,i){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,i):new es(t.duration,t.delay)}}class Oo{constructor(t,e,i){this.namespaceId=t,this.triggerName=e,this.element=i,this._player=new es,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,Object.keys(this._queuedCallbacks).forEach(e=>{this._queuedCallbacks[e].forEach(i=>os(t,e,void 0,i))}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){const e=this._player;e.triggerCallback&&t.onStart(()=>e.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,e){cs(this._queuedCallbacks,t,[]).push(e)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){const e=this._player;e.triggerCallback&&e.triggerCallback(t)}}function Mo(t){return t&&1===t.nodeType}function To(t,e){const i=t.style.display;return t.style.display=null!=e?e:"none",i}function Ro(t,e,i,n,r){const s=[];i.forEach(t=>s.push(To(t)));const o=[];n.forEach((i,n)=>{const s={};i.forEach(t=>{const i=s[t]=e.computeStyle(n,t,r);i&&0!=i.length||(n.__ng_removed=ko,o.push(n))}),t.set(n,s)});let a=0;return i.forEach(t=>To(t,s[a++])),o}function Vo(t,e){const i=new Map;if(t.forEach(t=>i.set(t,[])),0==e.length)return i;const n=new Set(e),r=new Map;function s(t){if(!t)return 1;let e=r.get(t);if(e)return e;const o=t.parentNode;return e=i.has(o)?o:n.has(o)?1:s(o),r.set(t,e),e}return e.forEach(t=>{const e=s(t);1!==e&&i.get(e).push(t)}),i}function Fo(t,e){if(t.classList)t.classList.add(e);else{let i=t.$$classes;i||(i=t.$$classes={}),i[e]=!0}}function Lo(t,e){if(t.classList)t.classList.remove(e);else{let i=t.$$classes;i&&delete i[e]}}function Uo(t,e,i){rs(i).onDone(()=>t.processLeaveNode(e))}function Bo(t,e){for(let i=0;i<t.length;i++){const n=t[i];n instanceof is?Bo(n.players,e):e.push(n)}}function No(t,e,i){const n=i.get(t);if(!n)return!1;let r=e.get(t);return r?n.forEach(t=>r.add(t)):e.set(t,n),i.delete(t),!0}class jo{constructor(t,e,i){this.bodyNode=t,this._driver=e,this._triggerCache={},this.onRemovalComplete=(t,e)=>{},this._transitionEngine=new Po(t,e,i),this._timelineEngine=new xo(t,e,i),this._transitionEngine.onRemovalComplete=(t,e)=>this.onRemovalComplete(t,e)}registerTrigger(t,e,i,n,r){const s=t+"-"+n;let o=this._triggerCache[s];if(!o){const t=[],e=qs(this._driver,r,t);if(t.length)throw new Error(`The animation trigger "${n}" has failed to build due to the following errors:\n - ${t.join("\n - ")}`);o=function(t,e){return new _o(t,e)}(n,e),this._triggerCache[s]=o}this._transitionEngine.registerTrigger(e,n,o)}register(t,e){this._transitionEngine.register(t,e)}destroy(t,e){this._transitionEngine.destroy(t,e)}onInsert(t,e,i,n){this._transitionEngine.insertNode(t,e,i,n)}onRemove(t,e,i,n){this._transitionEngine.removeNode(t,e,n||!1,i)}disableAnimations(t,e){this._transitionEngine.markElementAsDisabled(t,e)}process(t,e,i,n){if("@"==i.charAt(0)){const[t,r]=hs(i);this._timelineEngine.command(t,e,r,n)}else this._transitionEngine.trigger(t,e,i,n)}listen(t,e,i,n,r){if("@"==i.charAt(0)){const[t,n]=hs(i);return this._timelineEngine.listen(t,e,n,r)}return this._transitionEngine.listen(t,e,i,n,r)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}function zo(t,e){let i=null,n=null;return Array.isArray(e)&&e.length?(i=Ko(e[0]),e.length>1&&(n=Ko(e[e.length-1]))):e&&(i=Ko(e)),i||n?new Ho(t,i,n):null}let Ho=(()=>{class t{constructor(e,i,n){this._element=e,this._startStyles=i,this._endStyles=n,this._state=0;let r=t.initialStylesByElement.get(e);r||t.initialStylesByElement.set(e,r={}),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&Os(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Os(this._element,this._initialStyles),this._endStyles&&(Os(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(Ms(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Ms(this._element,this._endStyles),this._endStyles=null),Os(this._element,this._initialStyles),this._state=3)}}return t.initialStylesByElement=new WeakMap,t})();function Ko(t){let e=null;const i=Object.keys(t);for(let n=0;n<i.length;n++){const r=i[n];$o(r)&&(e=e||{},e[r]=t[r])}return e}function $o(t){return"display"===t||"position"===t}class Go{constructor(t,e,i,n,r,s,o){this._element=t,this._name=e,this._duration=i,this._delay=n,this._easing=r,this._fillMode=s,this._onDoneFn=o,this._finished=!1,this._destroyed=!1,this._startTime=0,this._position=0,this._eventFn=t=>this._handleCallback(t)}apply(){!function(t,e){const i=Xo(t,"").trim();i.length&&(function(t,e){let i=0;for(let n=0;n<t.length;n++)","===t.charAt(n)&&i++}(i),e=`${i}, ${e}`),Qo(t,"",e)}(this._element,`${this._duration}ms ${this._easing} ${this._delay}ms 1 normal ${this._fillMode} ${this._name}`),Yo(this._element,this._eventFn,!1),this._startTime=Date.now()}pause(){Wo(this._element,this._name,"paused")}resume(){Wo(this._element,this._name,"running")}setPosition(t){const e=Zo(this._element,this._name);this._position=t*this._duration,Qo(this._element,"Delay",`-${this._position}ms`,e)}getPosition(){return this._position}_handleCallback(t){const e=t._ngTestManualTimestamp||Date.now(),i=1e3*parseFloat(t.elapsedTime.toFixed(3));t.animationName==this._name&&Math.max(e-this._startTime,0)>=this._delay&&i>=this._duration&&this.finish()}finish(){this._finished||(this._finished=!0,this._onDoneFn(),Yo(this._element,this._eventFn,!0))}destroy(){this._destroyed||(this._destroyed=!0,this.finish(),function(t,e){const i=Xo(t,"").split(","),n=qo(i,e);n>=0&&(i.splice(n,1),Qo(t,"",i.join(",")))}(this._element,this._name))}}function Wo(t,e,i){Qo(t,"PlayState",i,Zo(t,e))}function Zo(t,e){const i=Xo(t,"");return i.indexOf(",")>0?qo(i.split(","),e):qo([i],e)}function qo(t,e){for(let i=0;i<t.length;i++)if(t[i].indexOf(e)>=0)return i;return-1}function Yo(t,e,i){i?t.removeEventListener("animationend",e):t.addEventListener("animationend",e)}function Qo(t,e,i,n){const r="animation"+e;if(null!=n){const e=t.style[r];if(e.length){const t=e.split(",");t[n]=i,i=t.join(",")}}t.style[r]=i}function Xo(t,e){return t.style["animation"+e]||""}class Jo{constructor(t,e,i,n,r,s,o,a){this.element=t,this.keyframes=e,this.animationName=i,this._duration=n,this._delay=r,this._finalStyles=o,this._specialStyles=a,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=s||"linear",this.totalTime=n+r,this._buildStyler()}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}destroy(){this.init(),this._state>=4||(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}_flushDoneFns(){this._onDoneFns.forEach(t=>t()),this._onDoneFns=[]}_flushStartFns(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}finish(){this.init(),this._state>=3||(this._state=3,this._styler.finish(),this._flushStartFns(),this._specialStyles&&this._specialStyles.finish(),this._flushDoneFns())}setPosition(t){this._styler.setPosition(t)}getPosition(){return this._styler.getPosition()}hasStarted(){return this._state>=2}init(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())}play(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2,this._specialStyles&&this._specialStyles.start()),this._styler.resume()}pause(){this.init(),this._styler.pause()}restart(){this.reset(),this.play()}reset(){this._styler.destroy(),this._buildStyler(),this._styler.apply()}_buildStyler(){this._styler=new Go(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",()=>this.finish())}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}beforeDestroy(){this.init();const t={};if(this.hasStarted()){const e=this._state>=3;Object.keys(this._finalStyles).forEach(i=>{"offset"!=i&&(t[i]=e?this._finalStyles[i]:Hs(this.element,i))})}this.currentSnapshot=t}}class ta extends es{constructor(t,e){super(),this.element=t,this._startingStyles={},this.__initialized=!1,this._styles=ys(e)}init(){!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach(t=>{this._startingStyles[t]=this.element.style[t]}),super.init())}play(){this._startingStyles&&(this.init(),Object.keys(this._styles).forEach(t=>this.element.style.setProperty(t,this._styles[t])),super.play())}destroy(){this._startingStyles&&(Object.keys(this._startingStyles).forEach(t=>{const e=this._startingStyles[t];e?this.element.style.setProperty(t,e):this.element.style.removeProperty(t)}),this._startingStyles=null,super.destroy())}}class ea{constructor(){this._count=0,this._head=document.querySelector("head")}validateStyleProperty(t){return As(t)}matchesElement(t,e){return bs(t,e)}containsElement(t,e){return vs(t,e)}query(t,e,i){return _s(t,e,i)}computeStyle(t,e,i){return window.getComputedStyle(t)[e]}buildKeyframeElement(t,e,i){i=i.map(t=>ys(t));let n=`@keyframes ${e} {\n`,r="";i.forEach(t=>{r=" ";const e=parseFloat(t.offset);n+=`${r}${100*e}% {\n`,r+=" ",Object.keys(t).forEach(e=>{const i=t[e];switch(e){case"offset":return;case"easing":return void(i&&(n+=`${r}animation-timing-function: ${i};\n`));default:return void(n+=`${r}${e}: ${i};\n`)}}),n+=`${r}}\n`}),n+="}\n";const s=document.createElement("style");return s.textContent=n,s}animate(t,e,i,n,r,s=[],o){const a=s.filter(t=>t instanceof Jo),l={};Ns(i,n)&&a.forEach(t=>{let e=t.currentSnapshot;Object.keys(e).forEach(t=>l[t]=e[t])});const c=function(t){let e={};return t&&(Array.isArray(t)?t:[t]).forEach(t=>{Object.keys(t).forEach(i=>{"offset"!=i&&"easing"!=i&&(e[i]=t[i])})}),e}(e=js(t,e,l));if(0==i)return new ta(t,c);const h="gen_css_kf_"+this._count++,u=this.buildKeyframeElement(t,h,e);document.querySelector("head").appendChild(u);const d=zo(t,e),p=new Jo(t,e,h,i,n,r,c,d);return p.onDestroy(()=>{var t;(t=u).parentNode.removeChild(t)}),p}}class ia{constructor(t,e,i,n){this.element=t,this.keyframes=e,this.options=i,this._specialStyles=n,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:{},this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_triggerWebAnimation(t,e,i){return t.animate(e,i)}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=t*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const t={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(e=>{"offset"!=e&&(t[e]=this._finished?this._finalKeyframe[e]:Hs(this.element,e))}),this.currentSnapshot=t}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}class na{constructor(){this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(ra().toString()),this._cssKeyframesDriver=new ea}validateStyleProperty(t){return As(t)}matchesElement(t,e){return bs(t,e)}containsElement(t,e){return vs(t,e)}query(t,e,i){return _s(t,e,i)}computeStyle(t,e,i){return window.getComputedStyle(t)[e]}overrideWebAnimationsSupport(t){this._isNativeImpl=t}animate(t,e,i,n,r,s=[],o){if(!o&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(t,e,i,n,r,s);const a={duration:i,delay:n,fill:0==n?"both":"forwards"};r&&(a.easing=r);const l={},c=s.filter(t=>t instanceof ia);Ns(i,n)&&c.forEach(t=>{let e=t.currentSnapshot;Object.keys(e).forEach(t=>l[t]=e[t])});const h=zo(t,e=js(t,e=e.map(t=>Ds(t,!1)),l));return new ia(t,e,a,h)}}function ra(){return"undefined"!=typeof window&&void 0!==window.document&&Element.prototype.animate||{}}let sa=(()=>{class t extends Kr{constructor(t,e){super(),this._nextAnimationId=0,this._renderer=t.createRenderer(e.body,{id:"0",encapsulation:r.T.None,styles:[],data:{animation:[]}})}build(t){const e=this._nextAnimationId.toString();this._nextAnimationId++;const i=Array.isArray(t)?Wr(t):t;return la(this._renderer,null,e,"register",[i]),new oa(e,this._renderer)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.I),r.Zb(a))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();class oa extends class{}{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new aa(this._id,t,e||{},this._renderer)}}class aa{constructor(t,e,i,n){this.id=t,this.element=e,this._renderer=n,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}_listen(t,e){return this._renderer.listen(this.element,`@@${this.id}:${t}`,e)}_command(t,...e){return la(this._renderer,this.element,this.id,t,e)}onDone(t){this._listen("done",t)}onStart(t){this._listen("start",t)}onDestroy(t){this._listen("destroy",t)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset")}setPosition(t){this._command("setPosition",t)}getPosition(){var t,e;return null!==(e=null===(t=this._renderer.engine.players[+this.id])||void 0===t?void 0:t.getPosition())&&void 0!==e?e:0}}function la(t,e,i,n,r){return t.setProperty(e,`@@${i}:${n}`,r)}let ca=(()=>{class t{constructor(t,e,i){this.delegate=t,this.engine=e,this._zone=i,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),e.onRemovalComplete=(t,e)=>{e&&e.parentNode(t)&&e.removeChild(t.parentNode,t)}}createRenderer(t,e){const i=this.delegate.createRenderer(t,e);if(!(t&&e&&e.data&&e.data.animation)){let t=this._rendererCache.get(i);return t||(t=new ha("",i,this.engine),this._rendererCache.set(i,t)),t}const n=e.id,r=e.id+"-"+this._currentId;this._currentId++,this.engine.register(r,t);const s=e=>{Array.isArray(e)?e.forEach(s):this.engine.registerTrigger(n,r,t,e.name,e)};return e.data.animation.forEach(s),new ua(this,r,i,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(t,e,i){t>=0&&t<this._microtaskId?this._zone.run(()=>e(i)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(t=>{const[e,i]=t;e(i)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([e,i]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.I),r.Zb(jo),r.Zb(r.B))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();class ha{constructor(t,e,i){this.namespaceId=t,this.delegate=e,this.engine=i,this.destroyNode=this.delegate.destroyNode?t=>e.destroyNode(t):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)}insertBefore(t,e,i,n=!0){this.delegate.insertBefore(t,e,i),this.engine.onInsert(this.namespaceId,e,t,n)}removeChild(t,e,i){this.engine.onRemove(this.namespaceId,e,this.delegate,i)}selectRootElement(t,e){return this.delegate.selectRootElement(t,e)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,i,n){this.delegate.setAttribute(t,e,i,n)}removeAttribute(t,e,i){this.delegate.removeAttribute(t,e,i)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,i,n){this.delegate.setStyle(t,e,i,n)}removeStyle(t,e,i){this.delegate.removeStyle(t,e,i)}setProperty(t,e,i){"@"==e.charAt(0)&&"@.disabled"==e?this.disableAnimations(t,!!i):this.delegate.setProperty(t,e,i)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,i){return this.delegate.listen(t,e,i)}disableAnimations(t,e){this.engine.disableAnimations(t,e)}}class ua extends ha{constructor(t,e,i,n){super(e,i,n),this.factory=t,this.namespaceId=e}setProperty(t,e,i){"@"==e.charAt(0)?"."==e.charAt(1)&&"@.disabled"==e?this.disableAnimations(t,i=void 0===i||!!i):this.engine.process(this.namespaceId,t,e.substr(1),i):this.delegate.setProperty(t,e,i)}listen(t,e,i){if("@"==e.charAt(0)){const n=function(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(t);let r=e.substr(1),s="";return"@"!=r.charAt(0)&&([r,s]=function(t){const e=t.indexOf(".");return[t.substring(0,e),t.substr(e+1)]}(r)),this.engine.listen(this.namespaceId,n,r,s,t=>{this.factory.scheduleListenerCallback(t._data||-1,i,t)})}return this.delegate.listen(t,e,i)}}let da=(()=>{class t extends jo{constructor(t,e,i){super(t.body,e,i)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(a),r.Zb(xs),r.Zb(po))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();const pa=new r.s("AnimationModuleType"),fa=[{provide:xs,useFactory:function(){return"function"==typeof ra()?new na:new ea}},{provide:pa,useValue:"BrowserAnimations"},{provide:Kr,useClass:sa},{provide:po,useFactory:function(){return new fo}},{provide:jo,useClass:da},{provide:r.I,useFactory:function(t,e,i){return new ca(t,e,i)},deps:[Wt,jo,r.B]}];let ma=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:fa,imports:[le]}),t})();const ga=["*",[["mat-option"],["ng-container"]]],Aa=["*","mat-option, ng-container"];function ba(t,e){if(1&t&&r.Qb(0,"mat-pseudo-checkbox",4),2&t){const t=r.gc();r.nc("state",t.selected?"checked":"unchecked")("disabled",t.disabled)}}function va(t,e){if(1&t&&(r.Vb(0,"span",5),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Mc("(",t.group.label,")")}}const _a=["*"];let ya=(()=>{class t{}return t.STANDARD_CURVE="cubic-bezier(0.4,0.0,0.2,1)",t.DECELERATION_CURVE="cubic-bezier(0.0,0.0,0.2,1)",t.ACCELERATION_CURVE="cubic-bezier(0.4,0.0,1,1)",t.SHARP_CURVE="cubic-bezier(0.4,0.0,0.6,1)",t})(),wa=(()=>{class t{}return t.COMPLEX="375ms",t.ENTERING="225ms",t.EXITING="195ms",t})();const xa=new r.R("11.2.5"),Ca=new r.s("mat-sanity-checks",{providedIn:"root",factory:function(){return!0}});let Sa=(()=>{class t{constructor(t,e,i){this._hasDoneGlobalChecks=!1,this._document=i,t._applyBodyHighContrastModeCssClasses(),this._sanityChecks=e,this._hasDoneGlobalChecks||(this._checkDoctypeIsDefined(),this._checkThemeIsPresent(),this._checkCdkVersionMatch(),this._hasDoneGlobalChecks=!0)}_getWindow(){const t=this._document.defaultView||window;return"object"==typeof t&&t?t:null}_checksAreEnabled(){return Object(r.Y)()&&!this._isTestEnv()}_isTestEnv(){const t=this._getWindow();return t&&(t.__karma__||t.jasmine)}_checkDoctypeIsDefined(){this._checksAreEnabled()&&(!0===this._sanityChecks||this._sanityChecks.doctype)&&!this._document.doctype&&console.warn("Current document does not have a doctype. This may cause some Angular Material components not to behave as expected.")}_checkThemeIsPresent(){if(!this._checksAreEnabled()||!1===this._sanityChecks||!this._sanityChecks.theme||!this._document.body||"function"!=typeof getComputedStyle)return;const t=this._document.createElement("div");t.classList.add("mat-theme-loaded-marker"),this._document.body.appendChild(t);const e=getComputedStyle(t);e&&"none"!==e.display&&console.warn("Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming"),this._document.body.removeChild(t)}_checkCdkVersionMatch(){this._checksAreEnabled()&&(!0===this._sanityChecks||this._sanityChecks.version)&&xa.full!==Hr.full&&console.warn("The Angular Material version ("+xa.full+") does not match the Angular CDK version ("+Hr.full+").\nPlease ensure the versions of these two packages exactly match.")}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Xi),r.Zb(Ca,8),r.Zb(a))},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[qn],qn]}),t})();function ka(t){return class extends t{constructor(...t){super(...t),this._disabled=!1}get disabled(){return this._disabled}set disabled(t){this._disabled=ti(t)}}}function Ea(t,e){return class extends t{constructor(...t){super(...t),this.defaultColor=e,this.color=e}get color(){return this._color}set color(t){const e=t||this.defaultColor;e!==this._color&&(this._color&&this._elementRef.nativeElement.classList.remove(`mat-${this._color}`),e&&this._elementRef.nativeElement.classList.add(`mat-${e}`),this._color=e)}}}function Da(t){return class extends t{constructor(...t){super(...t),this._disableRipple=!1}get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=ti(t)}}}function Ia(t,e=0){return class extends t{constructor(...t){super(...t),this._tabIndex=e,this.defaultTabIndex=e}get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(t){this._tabIndex=null!=t?ei(t):this.defaultTabIndex}}}function Pa(t){return class extends t{constructor(...t){super(...t),this.errorState=!1,this.stateChanges=new _e.a}updateErrorState(){const t=this.errorState,e=(this.errorStateMatcher||this._defaultErrorStateMatcher).isErrorState(this.ngControl?this.ngControl.control:null,this._parentFormGroup||this._parentForm);e!==t&&(this.errorState=e,this.stateChanges.next())}}}function Oa(t){return class extends t{constructor(...t){super(...t),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new Ze.a(t=>{this._isInitialized?this._notifySubscriber(t):this._pendingSubscribers.push(t)})}_markInitialized(){this._isInitialized=!0,this._pendingSubscribers.forEach(this._notifySubscriber),this._pendingSubscribers=null}_notifySubscriber(t){t.next(),t.complete()}}}const Ma=new r.s("MAT_DATE_LOCALE",{providedIn:"root",factory:function(){return Object(r.X)(r.w)}});class Ta{constructor(){this._localeChanges=new _e.a,this.localeChanges=this._localeChanges}getValidDateOrNull(t){return this.isDateInstance(t)&&this.isValid(t)?t:null}deserialize(t){return null==t||this.isDateInstance(t)&&this.isValid(t)?t:this.invalid()}setLocale(t){this.locale=t,this._localeChanges.next()}compareDate(t,e){return this.getYear(t)-this.getYear(e)||this.getMonth(t)-this.getMonth(e)||this.getDate(t)-this.getDate(e)}sameDate(t,e){if(t&&e){let i=this.isValid(t),n=this.isValid(e);return i&&n?!this.compareDate(t,e):i==n}return t==e}clampDate(t,e,i){return e&&this.compareDate(t,e)<0?e:i&&this.compareDate(t,i)>0?i:t}}const Ra=new r.s("mat-date-formats");let Va;try{Va="undefined"!=typeof Intl}catch(Knt){Va=!1}const Fa={long:["January","February","March","April","May","June","July","August","September","October","November","December"],short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],narrow:["J","F","M","A","M","J","J","A","S","O","N","D"]},La=Na(31,t=>String(t+1)),Ua={long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],narrow:["S","M","T","W","T","F","S"]},Ba=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;function Na(t,e){const i=Array(t);for(let n=0;n<t;n++)i[n]=e(n);return i}let ja=(()=>{class t extends Ta{constructor(t,e){super(),this.useUtcForDisplay=!0,super.setLocale(t),this.useUtcForDisplay=!e.TRIDENT,this._clampDate=e.TRIDENT||e.EDGE}getYear(t){return t.getFullYear()}getMonth(t){return t.getMonth()}getDate(t){return t.getDate()}getDayOfWeek(t){return t.getDay()}getMonthNames(t){if(Va){const e=new Intl.DateTimeFormat(this.locale,{month:t,timeZone:"utc"});return Na(12,t=>this._stripDirectionalityCharacters(this._format(e,new Date(2017,t,1))))}return Fa[t]}getDateNames(){if(Va){const t=new Intl.DateTimeFormat(this.locale,{day:"numeric",timeZone:"utc"});return Na(31,e=>this._stripDirectionalityCharacters(this._format(t,new Date(2017,0,e+1))))}return La}getDayOfWeekNames(t){if(Va){const e=new Intl.DateTimeFormat(this.locale,{weekday:t,timeZone:"utc"});return Na(7,t=>this._stripDirectionalityCharacters(this._format(e,new Date(2017,0,t+1))))}return Ua[t]}getYearName(t){if(Va){const e=new Intl.DateTimeFormat(this.locale,{year:"numeric",timeZone:"utc"});return this._stripDirectionalityCharacters(this._format(e,t))}return String(this.getYear(t))}getFirstDayOfWeek(){return 0}getNumDaysInMonth(t){return this.getDate(this._createDateWithOverflow(this.getYear(t),this.getMonth(t)+1,0))}clone(t){return new Date(t.getTime())}createDate(t,e,i){let n=this._createDateWithOverflow(t,e,i);return n.getMonth(),n}today(){return new Date}parse(t){return"number"==typeof t?new Date(t):t?new Date(Date.parse(t)):null}format(t,e){if(!this.isValid(t))throw Error("NativeDateAdapter: Cannot format invalid date.");if(Va){this._clampDate&&(t.getFullYear()<1||t.getFullYear()>9999)&&(t=this.clone(t)).setFullYear(Math.max(1,Math.min(9999,t.getFullYear()))),e=Object.assign(Object.assign({},e),{timeZone:"utc"});const i=new Intl.DateTimeFormat(this.locale,e);return this._stripDirectionalityCharacters(this._format(i,t))}return this._stripDirectionalityCharacters(t.toDateString())}addCalendarYears(t,e){return this.addCalendarMonths(t,12*e)}addCalendarMonths(t,e){let i=this._createDateWithOverflow(this.getYear(t),this.getMonth(t)+e,this.getDate(t));return this.getMonth(i)!=((this.getMonth(t)+e)%12+12)%12&&(i=this._createDateWithOverflow(this.getYear(i),this.getMonth(i),0)),i}addCalendarDays(t,e){return this._createDateWithOverflow(this.getYear(t),this.getMonth(t),this.getDate(t)+e)}toIso8601(t){return[t.getUTCFullYear(),this._2digit(t.getUTCMonth()+1),this._2digit(t.getUTCDate())].join("-")}deserialize(t){if("string"==typeof t){if(!t)return null;if(Ba.test(t)){let e=new Date(t);if(this.isValid(e))return e}}return super.deserialize(t)}isDateInstance(t){return t instanceof Date}isValid(t){return!isNaN(t.getTime())}invalid(){return new Date(NaN)}_createDateWithOverflow(t,e,i){const n=new Date;return n.setFullYear(t,e,i),n.setHours(0,0,0,0),n}_2digit(t){return("00"+t).slice(-2)}_stripDirectionalityCharacters(t){return t.replace(/[\u200e\u200f]/g,"")}_format(t,e){const i=new Date;return i.setUTCFullYear(e.getFullYear(),e.getMonth(),e.getDate()),i.setUTCHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),t.format(i)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Ma,8),r.Zb(ci))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),za=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[{provide:Ta,useClass:ja}],imports:[[hi]]}),t})();const Ha={parse:{dateInput:null},display:{dateInput:{year:"numeric",month:"numeric",day:"numeric"},monthYearLabel:{year:"numeric",month:"short"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"}}};let Ka=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[{provide:Ra,useValue:Ha}],imports:[[za]]}),t})(),$a=(()=>{class t{isErrorState(t,e){return!!(t&&t.invalid&&(t.touched||e&&e.submitted))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(r.Lb)({factory:function(){return new t},token:t,providedIn:"root"}),t})(),Ga=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","mat-line",""],["","matLine",""]],hostAttrs:[1,"mat-line"]}),t})();function Wa(t,e,i){const n=t.nativeElement.classList;i?n.add(e):n.remove(e)}let Za=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Sa],Sa]}),t})();class qa{constructor(t,e,i){this._renderer=t,this.element=e,this.config=i,this.state=3}fadeOut(){this._renderer.fadeOutRipple(this)}}const Ya={enterDuration:450,exitDuration:400},Qa=Ai({passive:!0}),Xa=["mousedown","touchstart"],Ja=["mouseup","mouseleave","touchend","touchcancel"];class tl{constructor(t,e,i,n){this._target=t,this._ngZone=e,this._isPointerDown=!1,this._activeRipples=new Set,this._pointerUpEventsRegistered=!1,n.isBrowser&&(this._containerElement=si(i))}fadeInRipple(t,e,i={}){const n=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),r=Object.assign(Object.assign({},Ya),i.animation);i.centered&&(t=n.left+n.width/2,e=n.top+n.height/2);const s=i.radius||function(t,e,i){const n=Math.max(Math.abs(t-i.left),Math.abs(t-i.right)),r=Math.max(Math.abs(e-i.top),Math.abs(e-i.bottom));return Math.sqrt(n*n+r*r)}(t,e,n),o=t-n.left,a=e-n.top,l=r.enterDuration,c=document.createElement("div");c.classList.add("mat-ripple-element"),c.style.left=o-s+"px",c.style.top=a-s+"px",c.style.height=2*s+"px",c.style.width=2*s+"px",null!=i.color&&(c.style.backgroundColor=i.color),c.style.transitionDuration=`${l}ms`,this._containerElement.appendChild(c),window.getComputedStyle(c).getPropertyValue("opacity"),c.style.transform="scale(1)";const h=new qa(this,c,i);return h.state=0,this._activeRipples.add(h),i.persistent||(this._mostRecentTransientRipple=h),this._runTimeoutOutsideZone(()=>{const t=h===this._mostRecentTransientRipple;h.state=1,i.persistent||t&&this._isPointerDown||h.fadeOut()},l),h}fadeOutRipple(t){const e=this._activeRipples.delete(t);if(t===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),this._activeRipples.size||(this._containerRect=null),!e)return;const i=t.element,n=Object.assign(Object.assign({},Ya),t.config.animation);i.style.transitionDuration=`${n.exitDuration}ms`,i.style.opacity="0",t.state=2,this._runTimeoutOutsideZone(()=>{t.state=3,i.parentNode.removeChild(i)},n.exitDuration)}fadeOutAll(){this._activeRipples.forEach(t=>t.fadeOut())}setupTriggerEvents(t){const e=si(t);e&&e!==this._triggerElement&&(this._removeTriggerEvents(),this._triggerElement=e,this._registerEvents(Xa))}handleEvent(t){"mousedown"===t.type?this._onMousedown(t):"touchstart"===t.type?this._onTouchStart(t):this._onPointerUp(),this._pointerUpEventsRegistered||(this._registerEvents(Ja),this._pointerUpEventsRegistered=!0)}_onMousedown(t){const e=$i(t),i=this._lastTouchStartEvent&&Date.now()<this._lastTouchStartEvent+800;this._target.rippleDisabled||e||i||(this._isPointerDown=!0,this.fadeInRipple(t.clientX,t.clientY,this._target.rippleConfig))}_onTouchStart(t){if(!this._target.rippleDisabled&&!Gi(t)){this._lastTouchStartEvent=Date.now(),this._isPointerDown=!0;const e=t.changedTouches;for(let t=0;t<e.length;t++)this.fadeInRipple(e[t].clientX,e[t].clientY,this._target.rippleConfig)}}_onPointerUp(){this._isPointerDown&&(this._isPointerDown=!1,this._activeRipples.forEach(t=>{!t.config.persistent&&(1===t.state||t.config.terminateOnPointerUp&&0===t.state)&&t.fadeOut()}))}_runTimeoutOutsideZone(t,e=0){this._ngZone.runOutsideAngular(()=>setTimeout(t,e))}_registerEvents(t){this._ngZone.runOutsideAngular(()=>{t.forEach(t=>{this._triggerElement.addEventListener(t,this,Qa)})})}_removeTriggerEvents(){this._triggerElement&&(Xa.forEach(t=>{this._triggerElement.removeEventListener(t,this,Qa)}),this._pointerUpEventsRegistered&&Ja.forEach(t=>{this._triggerElement.removeEventListener(t,this,Qa)}))}}const el=new r.s("mat-ripple-global-options");let il=(()=>{class t{constructor(t,e,i,n,r){this._elementRef=t,this._animationMode=r,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=n||{},this._rippleRenderer=new tl(this,e,t,i)}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._setupTriggerEventsIfEnabled()}get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(t){this._trigger=t,this._setupTriggerEventsIfEnabled()}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:Object.assign(Object.assign(Object.assign({},this._globalOptions.animation),"NoopAnimations"===this._animationMode?{enterDuration:0,exitDuration:0}:{}),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(t,e=0,i){return"number"==typeof t?this._rippleRenderer.fadeInRipple(t,e,Object.assign(Object.assign({},this.rippleConfig),i)):this._rippleRenderer.fadeInRipple(0,0,Object.assign(Object.assign({},this.rippleConfig),t))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.B),r.Pb(ci),r.Pb(el,8),r.Pb(pa,8))},t.\u0275dir=r.Kb({type:t,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(t,e){2&t&&r.Hb("mat-ripple-unbounded",e.unbounded)},inputs:{radius:["matRippleRadius","radius"],disabled:["matRippleDisabled","disabled"],trigger:["matRippleTrigger","trigger"],color:["matRippleColor","color"],unbounded:["matRippleUnbounded","unbounded"],centered:["matRippleCentered","centered"],animation:["matRippleAnimation","animation"]},exportAs:["matRipple"]}),t})(),nl=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Sa,hi],Sa]}),t})(),rl=(()=>{class t{constructor(t){this._animationMode=t,this.state="unchecked",this.disabled=!1}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(pa,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:8,hostBindings:function(t,e){2&t&&r.Hb("mat-pseudo-checkbox-indeterminate","indeterminate"===e.state)("mat-pseudo-checkbox-checked","checked"===e.state)("mat-pseudo-checkbox-disabled",e.disabled)("_mat-animation-noopable","NoopAnimations"===e._animationMode)},inputs:{state:"state",disabled:"disabled"},decls:0,vars:0,template:function(t,e){},styles:['.mat-pseudo-checkbox{width:16px;height:16px;border:2px solid;border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate{border-color:transparent}._mat-animation-noopable.mat-pseudo-checkbox{transition:none;animation:none}._mat-animation-noopable.mat-pseudo-checkbox::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{top:5px;left:1px;width:10px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{top:2.4px;left:1px;width:8px;height:3px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}\n'],encapsulation:2,changeDetection:0}),t})(),sl=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Sa]]}),t})();const al=new r.s("MAT_OPTION_PARENT_COMPONENT");class ll{}const cl=ka(ll);let hl=0,ul=(()=>{class t extends cl{constructor(t){var e;super(),this._labelId="mat-optgroup-label-"+hl++,this._inert=null!==(e=null==t?void 0:t.inertGroups)&&void 0!==e&&e}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(al,8))},t.\u0275dir=r.Kb({type:t,inputs:{label:"label"},features:[r.Ab]}),t})();const dl=new r.s("MatOptgroup");let pl=(()=>{class t extends ul{}return t.\u0275fac=function(e){return fl(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-optgroup"]],hostAttrs:[1,"mat-optgroup"],hostVars:5,hostBindings:function(t,e){2&t&&(r.Eb("role",e._inert?null:"group")("aria-disabled",e._inert?null:e.disabled.toString())("aria-labelledby",e._inert?null:e._labelId),r.Hb("mat-optgroup-disabled",e.disabled))},inputs:{disabled:"disabled"},exportAs:["matOptgroup"],features:[r.Cb([{provide:dl,useExisting:t}]),r.Ab],ngContentSelectors:Aa,decls:4,vars:2,consts:[["aria-hidden","true",1,"mat-optgroup-label",3,"id"]],template:function(t,e){1&t&&(r.mc(ga),r.Vb(0,"span",0),r.Kc(1),r.lc(2),r.Ub(),r.lc(3,1)),2&t&&(r.nc("id",e._labelId),r.Db(1),r.Mc("",e.label," "))},styles:[".mat-optgroup-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-optgroup-label[disabled]{cursor:default}[dir=rtl] .mat-optgroup-label{text-align:right}.mat-optgroup-label .mat-icon{margin-right:16px;vertical-align:middle}.mat-optgroup-label .mat-icon svg{vertical-align:top}[dir=rtl] .mat-optgroup-label .mat-icon{margin-left:16px;margin-right:0}\n"],encapsulation:2,changeDetection:0}),t})();const fl=r.Xb(pl);let ml=0;class gl{constructor(t,e=!1){this.source=t,this.isUserInput=e}}let Al=(()=>{class t{constructor(t,e,i,n){this._element=t,this._changeDetectorRef=e,this._parent=i,this.group=n,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id="mat-option-"+ml++,this.onSelectionChange=new r.o,this._stateChanges=new _e.a}get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}get disabled(){return this.group&&this.group.disabled||this._disabled}set disabled(t){this._disabled=ti(t)}get disableRipple(){return this._parent&&this._parent.disableRipple}get active(){return this._active}get viewValue(){return(this._getHostElement().textContent||"").trim()}select(){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}deselect(){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}focus(t,e){const i=this._getHostElement();"function"==typeof i.focus&&i.focus(e)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(t){13!==t.keyCode&&32!==t.keyCode||ke(t)||(this._selectViaInteraction(),t.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getAriaSelected(){return this.selected||!this.multiple&&null}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){const t=this.viewValue;t!==this._mostRecentViewValue&&(this._mostRecentViewValue=t,this._stateChanges.next())}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(t=!1){this.onSelectionChange.emit(new gl(this,t))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.h),r.Pb(void 0),r.Pb(ul))},t.\u0275dir=r.Kb({type:t,inputs:{id:"id",disabled:"disabled",value:"value"},outputs:{onSelectionChange:"onSelectionChange"}}),t})(),bl=(()=>{class t extends Al{constructor(t,e,i,n){super(t,e,i,n)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.h),r.Pb(al,8),r.Pb(dl,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-option","mat-focus-indicator"],hostVars:12,hostBindings:function(t,e){1&t&&r.cc("click",function(){return e._selectViaInteraction()})("keydown",function(t){return e._handleKeydown(t)}),2&t&&(r.Yb("id",e.id),r.Eb("tabindex",e._getTabIndex())("aria-selected",e._getAriaSelected())("aria-disabled",e.disabled.toString()),r.Hb("mat-selected",e.selected)("mat-option-multiple",e.multiple)("mat-active",e.active)("mat-option-disabled",e.disabled))},exportAs:["matOption"],features:[r.Ab],ngContentSelectors:_a,decls:5,vars:4,consts:[["class","mat-option-pseudo-checkbox",3,"state","disabled",4,"ngIf"],[1,"mat-option-text"],["class","cdk-visually-hidden",4,"ngIf"],["mat-ripple","",1,"mat-option-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-option-pseudo-checkbox",3,"state","disabled"],[1,"cdk-visually-hidden"]],template:function(t,e){1&t&&(r.mc(),r.Ic(0,ba,1,2,"mat-pseudo-checkbox",0),r.Vb(1,"span",1),r.lc(2),r.Ub(),r.Ic(3,va,2,1,"span",2),r.Qb(4,"div",3)),2&t&&(r.nc("ngIf",e.multiple),r.Db(3),r.nc("ngIf",e.group&&e.group._inert),r.Db(1),r.nc("matRippleTrigger",e._getHostElement())("matRippleDisabled",e.disabled||e.disableRipple))},directives:[ut,il,rl],styles:[".mat-option{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative;cursor:pointer;outline:none;display:flex;flex-direction:row;max-width:100%;box-sizing:border-box;align-items:center;-webkit-tap-highlight-color:transparent}.mat-option[disabled]{cursor:default}[dir=rtl] .mat-option{text-align:right}.mat-option .mat-icon{margin-right:16px;vertical-align:middle}.mat-option .mat-icon svg{vertical-align:top}[dir=rtl] .mat-option .mat-icon{margin-left:16px;margin-right:0}.mat-option[aria-disabled=true]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:32px}[dir=rtl] .mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:16px;padding-right:32px}.cdk-high-contrast-active .mat-option{margin:0 1px}.cdk-high-contrast-active .mat-option.mat-active{border:solid 1px currentColor;margin:0}.cdk-high-contrast-active .mat-option[aria-disabled=true]{opacity:.5}.mat-option-text{display:inline-block;flex-grow:1;overflow:hidden;text-overflow:ellipsis}.mat-option .mat-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-option-pseudo-checkbox{margin-right:8px}[dir=rtl] .mat-option-pseudo-checkbox{margin-left:8px;margin-right:0}\n"],encapsulation:2,changeDetection:0}),t})();function vl(t,e,i){if(i.length){let n=e.toArray(),r=i.toArray(),s=0;for(let e=0;e<t+1;e++)n[e].group&&n[e].group===r[s]&&s++;return s}return 0}function _l(t,e,i,n){return t<i?t:t+e>i+n?Math.max(0,t-n+e):i}let yl=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[nl,Et,Sa,sl]]}),t})();const wl=["mat-button",""],xl=["*"],Cl=".mat-button .mat-button-focus-overlay,.mat-icon-button .mat-button-focus-overlay{opacity:0}.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:.04}@media(hover: none){.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:0}}.mat-button,.mat-icon-button,.mat-stroked-button,.mat-flat-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-button.mat-button-disabled,.mat-icon-button.mat-button-disabled,.mat-stroked-button.mat-button-disabled,.mat-flat-button.mat-button-disabled{cursor:default}.mat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-button.cdk-program-focused .mat-button-focus-overlay,.mat-icon-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-icon-button.cdk-program-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-program-focused .mat-button-focus-overlay,.mat-flat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-flat-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-raised-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button.mat-button-disabled{cursor:default}.mat-raised-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-raised-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-raised-button::-moz-focus-inner{border:0}._mat-animation-noopable.mat-raised-button{transition:none;animation:none}.mat-stroked-button{border:1px solid currentColor;padding:0 15px;line-height:34px}.mat-stroked-button .mat-button-ripple.mat-ripple,.mat-stroked-button .mat-button-focus-overlay{top:-1px;left:-1px;right:-1px;bottom:-1px}.mat-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:56px;height:56px;padding:0;flex-shrink:0}.mat-fab::-moz-focus-inner{border:0}.mat-fab.mat-button-disabled{cursor:default}.mat-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-fab::-moz-focus-inner{border:0}._mat-animation-noopable.mat-fab{transition:none;animation:none}.mat-fab .mat-button-wrapper{padding:16px 0;display:inline-block;line-height:24px}.mat-mini-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:40px;height:40px;padding:0;flex-shrink:0}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab.mat-button-disabled{cursor:default}.mat-mini-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-mini-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-mini-fab::-moz-focus-inner{border:0}._mat-animation-noopable.mat-mini-fab{transition:none;animation:none}.mat-mini-fab .mat-button-wrapper{padding:8px 0;display:inline-block;line-height:24px}.mat-icon-button{padding:0;min-width:0;width:40px;height:40px;flex-shrink:0;line-height:40px;border-radius:50%}.mat-icon-button i,.mat-icon-button .mat-icon{line-height:24px}.mat-button-ripple.mat-ripple,.mat-button-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-button-ripple.mat-ripple:not(:empty){transform:translateZ(0)}.mat-button-focus-overlay{opacity:0;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1),background-color 200ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-button-focus-overlay{transition:none}.mat-button-ripple-round{border-radius:50%;z-index:1}.mat-button .mat-button-wrapper>*,.mat-flat-button .mat-button-wrapper>*,.mat-stroked-button .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-fab .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*{vertical-align:middle}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button{display:inline-flex;justify-content:center;align-items:center;font-size:inherit;width:2.5em;height:2.5em}.cdk-high-contrast-active .mat-button,.cdk-high-contrast-active .mat-flat-button,.cdk-high-contrast-active .mat-raised-button,.cdk-high-contrast-active .mat-icon-button,.cdk-high-contrast-active .mat-fab,.cdk-high-contrast-active .mat-mini-fab{outline:solid 1px}.cdk-high-contrast-active .mat-button-base.cdk-keyboard-focused,.cdk-high-contrast-active .mat-button-base.cdk-program-focused{outline:solid 3px}\n",Sl=["mat-button","mat-flat-button","mat-icon-button","mat-raised-button","mat-stroked-button","mat-mini-fab","mat-fab"];class kl{constructor(t){this._elementRef=t}}const El=Ea(ka(Da(kl)));let Dl=(()=>{class t extends El{constructor(t,e,i){super(t),this._focusMonitor=e,this._animationMode=i,this.isRoundButton=this._hasHostAttributes("mat-fab","mat-mini-fab"),this.isIconButton=this._hasHostAttributes("mat-icon-button");for(const n of Sl)this._hasHostAttributes(n)&&this._getHostElement().classList.add(n);t.nativeElement.classList.add("mat-button-base"),this.isRoundButton&&(this.color="accent")}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}focus(t,e){t?this._focusMonitor.focusVia(this._getHostElement(),t,e):this._getHostElement().focus(e)}_getHostElement(){return this._elementRef.nativeElement}_isRippleDisabled(){return this.disableRipple||this.disabled}_hasHostAttributes(...t){return t.some(t=>this._getHostElement().hasAttribute(t))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(qi),r.Pb(pa,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-icon-button",""],["button","mat-fab",""],["button","mat-mini-fab",""],["button","mat-stroked-button",""],["button","mat-flat-button",""]],viewQuery:function(t,e){if(1&t&&r.Pc(il,1),2&t){let t;r.vc(t=r.dc())&&(e.ripple=t.first)}},hostAttrs:[1,"mat-focus-indicator"],hostVars:5,hostBindings:function(t,e){2&t&&(r.Eb("disabled",e.disabled||null),r.Hb("_mat-animation-noopable","NoopAnimations"===e._animationMode)("mat-button-disabled",e.disabled))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color"},exportAs:["matButton"],features:[r.Ab],attrs:wl,ngContentSelectors:xl,decls:4,vars:5,consts:[[1,"mat-button-wrapper"],["matRipple","",1,"mat-button-ripple",3,"matRippleDisabled","matRippleCentered","matRippleTrigger"],[1,"mat-button-focus-overlay"]],template:function(t,e){1&t&&(r.mc(),r.Vb(0,"span",0),r.lc(1),r.Ub(),r.Qb(2,"span",1),r.Qb(3,"span",2)),2&t&&(r.Db(2),r.Hb("mat-button-ripple-round",e.isRoundButton||e.isIconButton),r.nc("matRippleDisabled",e._isRippleDisabled())("matRippleCentered",e.isIconButton)("matRippleTrigger",e._getHostElement()))},directives:[il],styles:[Cl],encapsulation:2,changeDetection:0}),t})(),Il=(()=>{class t extends Dl{constructor(t,e,i){super(e,t,i)}_haltDisabledEvents(t){this.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(qi),r.Pb(r.l),r.Pb(pa,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["a","mat-button",""],["a","mat-raised-button",""],["a","mat-icon-button",""],["a","mat-fab",""],["a","mat-mini-fab",""],["a","mat-stroked-button",""],["a","mat-flat-button",""]],hostAttrs:[1,"mat-focus-indicator"],hostVars:7,hostBindings:function(t,e){1&t&&r.cc("click",function(t){return e._haltDisabledEvents(t)}),2&t&&(r.Eb("tabindex",e.disabled?-1:e.tabIndex||0)("disabled",e.disabled||null)("aria-disabled",e.disabled.toString()),r.Hb("_mat-animation-noopable","NoopAnimations"===e._animationMode)("mat-button-disabled",e.disabled))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex"},exportAs:["matButton","matAnchor"],features:[r.Ab],attrs:wl,ngContentSelectors:xl,decls:4,vars:5,consts:[[1,"mat-button-wrapper"],["matRipple","",1,"mat-button-ripple",3,"matRippleDisabled","matRippleCentered","matRippleTrigger"],[1,"mat-button-focus-overlay"]],template:function(t,e){1&t&&(r.mc(),r.Vb(0,"span",0),r.lc(1),r.Ub(),r.Qb(2,"span",1),r.Qb(3,"span",2)),2&t&&(r.Db(2),r.Hb("mat-button-ripple-round",e.isRoundButton||e.isIconButton),r.nc("matRippleDisabled",e._isRippleDisabled())("matRippleCentered",e.isIconButton)("matRippleTrigger",e._getHostElement()))},directives:[il],styles:[Cl],encapsulation:2,changeDetection:0}),t})(),Pl=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[nl,Sa],Sa]}),t})();function Ol(t){return new Ze.a(e=>{let i;try{i=t()}catch(n){return void e.error(n)}return(i?Object(On.a)(i):Ye()).subscribe(e)})}function Ml(t,e){}class Tl{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.maxWidth="80vw",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.autoFocus=!0,this.restoreFocus=!0,this.closeOnNavigation=!0}}const Rl={dialogContainer:$r("dialogContainer",[qr("void, exit",Zr({opacity:0,transform:"scale(0.7)"})),qr("enter",Zr({transform:"none"})),Qr("* => enter",Gr("150ms cubic-bezier(0, 0, 0.2, 1)",Zr({transform:"none",opacity:1}))),Qr("* => void, * => exit",Gr("75ms cubic-bezier(0.4, 0.0, 0.2, 1)",Zr({opacity:0})))])};let Vl=(()=>{class t extends ge{constructor(t,e,i,n,s,o){super(),this._elementRef=t,this._focusTrapFactory=e,this._changeDetectorRef=i,this._config=s,this._focusMonitor=o,this._animationStateChanged=new r.o,this._elementFocusedBeforeDialogWasOpened=null,this._closeInteractionType=null,this.attachDomPortal=t=>(this._portalOutlet.hasAttached(),this._portalOutlet.attachDomPortal(t)),this._ariaLabelledBy=s.ariaLabelledBy||null,this._document=n}_initializeWithAttachedContent(){this._setupFocusTrap(),this._capturePreviouslyFocusedElement(),this._focusDialogContainer()}attachComponentPortal(t){return this._portalOutlet.hasAttached(),this._portalOutlet.attachComponentPortal(t)}attachTemplatePortal(t){return this._portalOutlet.hasAttached(),this._portalOutlet.attachTemplatePortal(t)}_recaptureFocus(){this._containsFocus()||(!this._config.autoFocus||!this._focusTrap.focusInitialElement())&&this._elementRef.nativeElement.focus()}_trapFocus(){this._config.autoFocus?this._focusTrap.focusInitialElementWhenReady():this._containsFocus()||this._elementRef.nativeElement.focus()}_restoreFocus(){const t=this._elementFocusedBeforeDialogWasOpened;if(this._config.restoreFocus&&t&&"function"==typeof t.focus){const e=this._getActiveElement(),i=this._elementRef.nativeElement;e&&e!==this._document.body&&e!==i&&!i.contains(e)||(this._focusMonitor?(this._focusMonitor.focusVia(t,this._closeInteractionType),this._closeInteractionType=null):t.focus())}this._focusTrap&&this._focusTrap.destroy()}_setupFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement)}_capturePreviouslyFocusedElement(){this._document&&(this._elementFocusedBeforeDialogWasOpened=this._getActiveElement())}_focusDialogContainer(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}_containsFocus(){const t=this._elementRef.nativeElement,e=this._getActiveElement();return t===e||t.contains(e)}_getActiveElement(){var t;const e=this._document.activeElement;return(null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.activeElement)||e}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(Bi),r.Pb(r.h),r.Pb(a,8),r.Pb(Tl),r.Pb(qi))},t.\u0275dir=r.Kb({type:t,viewQuery:function(t,e){if(1&t&&r.Pc(be,3),2&t){let t;r.vc(t=r.dc())&&(e._portalOutlet=t.first)}},features:[r.Ab]}),t})(),Fl=(()=>{class t extends Vl{constructor(){super(...arguments),this._state="enter"}_onAnimationDone({toState:t,totalTime:e}){"enter"===t?(this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:e})):"exit"===t&&(this._restoreFocus(),this._animationStateChanged.next({state:"closed",totalTime:e}))}_onAnimationStart({toState:t,totalTime:e}){"enter"===t?this._animationStateChanged.next({state:"opening",totalTime:e}):"exit"!==t&&"void"!==t||this._animationStateChanged.next({state:"closing",totalTime:e})}_startExitAnimation(){this._state="exit",this._changeDetectorRef.markForCheck()}}return t.\u0275fac=function(e){return Ll(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1","aria-modal","true",1,"mat-dialog-container"],hostVars:6,hostBindings:function(t,e){1&t&&r.Gc("@dialogContainer.start",function(t){return e._onAnimationStart(t)})("@dialogContainer.done",function(t){return e._onAnimationDone(t)}),2&t&&(r.Yb("id",e._id),r.Eb("role",e._config.role)("aria-labelledby",e._config.ariaLabel?null:e._ariaLabelledBy)("aria-label",e._config.ariaLabel)("aria-describedby",e._config.ariaDescribedBy||null),r.Hc("@dialogContainer",e._state))},features:[r.Ab],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,e){1&t&&r.Ic(0,Ml,0,0,"ng-template",0)},directives:[be],styles:[".mat-dialog-container{display:block;padding:24px;border-radius:4px;box-sizing:border-box;overflow:auto;outline:0;width:100%;height:100%;min-height:inherit;max-height:inherit}.cdk-high-contrast-active .mat-dialog-container{outline:solid 1px}.mat-dialog-content{display:block;margin:0 -24px;padding:0 24px;max-height:65vh;overflow:auto;-webkit-overflow-scrolling:touch}.mat-dialog-title{margin:0 0 20px;display:block}.mat-dialog-actions{padding:8px 0;display:flex;flex-wrap:wrap;min-height:52px;align-items:center;box-sizing:content-box;margin-bottom:-24px}.mat-dialog-actions[align=end]{justify-content:flex-end}.mat-dialog-actions[align=center]{justify-content:center}.mat-dialog-actions .mat-button-base+.mat-button-base,.mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}\n"],encapsulation:2,data:{animation:[Rl.dialogContainer]}}),t})();const Ll=r.Xb(Fl);let Ul=0;class Bl{constructor(t,e,i="mat-dialog-"+Ul++){this._overlayRef=t,this._containerInstance=e,this.id=i,this.disableClose=this._containerInstance._config.disableClose,this._afterOpened=new _e.a,this._afterClosed=new _e.a,this._beforeClosed=new _e.a,this._state=0,e._id=i,e._animationStateChanged.pipe(He(t=>"opened"===t.state),Qe(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),e._animationStateChanged.pipe(He(t=>"closed"===t.state),Qe(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._afterClosed.next(this._result),this._afterClosed.complete(),this.componentInstance=null,this._overlayRef.dispose()}),t.keydownEvents().pipe(He(t=>27===t.keyCode&&!this.disableClose&&!ke(t))).subscribe(t=>{t.preventDefault(),Nl(this,"keyboard")}),t.backdropClick().subscribe(()=>{this.disableClose?this._containerInstance._recaptureFocus():Nl(this,"mouse")})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(He(t=>"closing"===t.state),Qe(1)).subscribe(e=>{this._beforeClosed.next(t),this._beforeClosed.complete(),this._overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),e.totalTime+100)}),this._state=1,this._containerInstance._startExitAnimation()}afterOpened(){return this._afterOpened}afterClosed(){return this._afterClosed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._overlayRef.backdropClick()}keydownEvents(){return this._overlayRef.keydownEvents()}updatePosition(t){let e=this._getPositionStrategy();return t&&(t.left||t.right)?t.left?e.left(t.left):e.right(t.right):e.centerHorizontally(),t&&(t.top||t.bottom)?t.top?e.top(t.top):e.bottom(t.bottom):e.centerVertically(),this._overlayRef.updatePosition(),this}updateSize(t="",e=""){return this._overlayRef.updateSize({width:t,height:e}),this._overlayRef.updatePosition(),this}addPanelClass(t){return this._overlayRef.addPanelClass(t),this}removePanelClass(t){return this._overlayRef.removePanelClass(t),this}getState(){return this._state}_finishDialogClose(){this._state=2,this._overlayRef.dispose()}_getPositionStrategy(){return this._overlayRef.getConfig().positionStrategy}}function Nl(t,e,i){return void 0!==t._containerInstance&&(t._containerInstance._closeInteractionType=e),t.close(i)}const jl=new r.s("MatDialogData"),zl=new r.s("mat-dialog-default-options"),Hl=new r.s("mat-dialog-scroll-strategy"),Kl={provide:Hl,deps:[Fr],useFactory:function(t){return()=>t.scrollStrategies.block()}};let $l=(()=>{class t{constructor(t,e,i,n,r,s,o,a,l){this._overlay=t,this._injector=e,this._defaultOptions=i,this._parentDialog=n,this._overlayContainer=r,this._dialogRefConstructor=o,this._dialogContainerType=a,this._dialogDataToken=l,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new _e.a,this._afterOpenedAtThisLevel=new _e.a,this._ariaHiddenElements=new Map,this.afterAllClosed=Ol(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Pn(void 0))),this._scrollStrategy=s}get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){const t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}open(t,e){(e=function(t,e){return Object.assign(Object.assign({},e),t)}(e,this._defaultOptions||new Tl)).id&&this.getDialogById(e.id);const i=this._createOverlay(e),n=this._attachDialogContainer(i,e),r=this._attachDialogContent(t,n,i,e);return this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(r),r.afterClosed().subscribe(()=>this._removeOpenDialog(r)),this.afterOpened.next(r),n._initializeWithAttachedContent(),r}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(t){return this.openDialogs.find(e=>e.id===t)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_createOverlay(t){const e=this._getOverlayConfig(t);return this._overlay.create(e)}_getOverlayConfig(t){const e=new br({positionStrategy:this._overlay.position().global(),scrollStrategy:t.scrollStrategy||this._scrollStrategy(),panelClass:t.panelClass,hasBackdrop:t.hasBackdrop,direction:t.direction,minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight,disposeOnNavigation:t.closeOnNavigation});return t.backdropClass&&(e.backdropClass=t.backdropClass),e}_attachDialogContainer(t,e){const i=r.t.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:Tl,useValue:e}]}),n=new pe(this._dialogContainerType,e.viewContainerRef,i,e.componentFactoryResolver);return t.attach(n).instance}_attachDialogContent(t,e,i,n){const s=new this._dialogRefConstructor(i,e,n.id);if(t instanceof r.O)e.attachTemplatePortal(new fe(t,null,{$implicit:n.data,dialogRef:s}));else{const i=this._createInjector(n,s,e),r=e.attachComponentPortal(new pe(t,n.viewContainerRef,i));s.componentInstance=r.instance}return s.updateSize(n.width,n.height).updatePosition(n.position),s}_createInjector(t,e,i){const n=t&&t.viewContainerRef&&t.viewContainerRef.injector,s=[{provide:this._dialogContainerType,useValue:i},{provide:this._dialogDataToken,useValue:t.data},{provide:this._dialogRefConstructor,useValue:e}];return!t.direction||n&&n.get(Zn,null)||s.push({provide:Zn,useValue:{value:t.direction,change:Se()}}),r.t.create({parent:n||this._injector,providers:s})}_removeOpenDialog(t){const e=this.openDialogs.indexOf(t);e>-1&&(this.openDialogs.splice(e,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((t,e)=>{t?e.setAttribute("aria-hidden",t):e.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){const t=this._overlayContainer.getContainerElement();if(t.parentElement){const e=t.parentElement.children;for(let i=e.length-1;i>-1;i--){let n=e[i];n===t||"SCRIPT"===n.nodeName||"STYLE"===n.nodeName||n.hasAttribute("aria-live")||(this._ariaHiddenElements.set(n,n.getAttribute("aria-hidden")),n.setAttribute("aria-hidden","true"))}}}_closeDialogs(t){let e=t.length;for(;e--;)t[e].close()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Fr),r.Pb(r.t),r.Pb(void 0),r.Pb(void 0),r.Pb(Sr),r.Pb(void 0),r.Pb(r.Q),r.Pb(r.Q),r.Pb(r.s))},t.\u0275dir=r.Kb({type:t}),t})(),Gl=(()=>{class t extends $l{constructor(t,e,i,n,r,s,o){super(t,e,n,s,o,r,Bl,Fl,jl)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Fr),r.Zb(r.t),r.Zb(w,8),r.Zb(zl,8),r.Zb(Hl),r.Zb(t,12),r.Zb(Sr))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),Wl=0,Zl=(()=>{class t{constructor(t,e,i){this.dialogRef=t,this._elementRef=e,this._dialog=i,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=Xl(this._elementRef,this._dialog.openDialogs))}ngOnChanges(t){const e=t._matDialogClose||t._matDialogCloseResult;e&&(this.dialogResult=e.currentValue)}_onButtonClick(t){Nl(this.dialogRef,0===t.screenX&&0===t.screenY?"keyboard":"mouse",this.dialogResult)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Bl,8),r.Pb(r.l),r.Pb(Gl))},t.\u0275dir=r.Kb({type:t,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(t,e){1&t&&r.cc("click",function(t){return e._onButtonClick(t)}),2&t&&r.Eb("aria-label",e.ariaLabel||null)("type",e.type)},inputs:{type:"type",dialogResult:["mat-dialog-close","dialogResult"],ariaLabel:["aria-label","ariaLabel"],_matDialogClose:["matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],features:[r.Bb]}),t})(),ql=(()=>{class t{constructor(t,e,i){this._dialogRef=t,this._elementRef=e,this._dialog=i,this.id="mat-dialog-title-"+Wl++}ngOnInit(){this._dialogRef||(this._dialogRef=Xl(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{const t=this._dialogRef._containerInstance;t&&!t._ariaLabelledBy&&(t._ariaLabelledBy=this.id)})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Bl,8),r.Pb(r.l),r.Pb(Gl))},t.\u0275dir=r.Kb({type:t,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-dialog-title"],hostVars:1,hostBindings:function(t,e){2&t&&r.Yb("id",e.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),t})(),Yl=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-dialog-content"]}),t})(),Ql=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-dialog-actions"]}),t})();function Xl(t,e){let i=t.nativeElement.parentElement;for(;i&&!i.classList.contains("mat-dialog-container");)i=i.parentElement;return i?e.find(t=>t.id===i.id):null}let Jl=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[Gl,Kl],imports:[[zr,ve,Sa],Sa]}),t})();var tc=i("XoHu");function ec(...t){if(1===t.length){const e=t[0];if(Object(tn.a)(e))return ic(e,null);if(Object(tc.a)(e)&&Object.getPrototypeOf(e)===Object.prototype){const t=Object.keys(e);return ic(t.map(t=>e[t]),t)}}if("function"==typeof t[t.length-1]){const e=t.pop();return ic(t=1===t.length&&Object(tn.a)(t[0])?t[0]:t,null).pipe(Object(Ge.a)(t=>e(...t)))}return ic(t,null)}function ic(t,e){return new Ze.a(i=>{const n=t.length;if(0===n)return void i.complete();const r=new Array(n);let s=0,o=0;for(let a=0;a<n;a++){const l=Object(On.a)(t[a]);let c=!1;i.add(l.subscribe({next:t=>{c||(c=!0,o++),r[a]=t},error:t=>i.error(t),complete:()=>{s++,s!==n&&c||(o===n&&i.next(e?e.reduce((t,e,i)=>(t[e]=r[i],t),{}):r),i.complete())}}))}})}class nc{}const rc=new r.s("NgValueAccessor"),sc={provide:rc,useExisting:Object(r.W)(()=>ac),multi:!0},oc=new r.s("CompositionEventMode");let ac=(()=>{class t{constructor(t,e,i){this._renderer=t,this._elementRef=e,this._compositionMode=i,this.onChange=t=>{},this.onTouched=()=>{},this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function(){const t=o()?o().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.H),r.Pb(r.l),r.Pb(oc,8))},t.\u0275dir=r.Kb({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(t,e){1&t&&r.cc("input",function(t){return e._handleInput(t.target.value)})("blur",function(){return e.onTouched()})("compositionstart",function(){return e._compositionStart()})("compositionend",function(t){return e._compositionEnd(t.target.value)})},features:[r.Cb([sc])]}),t})();function lc(t){return null==t||0===t.length}function cc(t){return null!=t&&"number"==typeof t.length}const hc=new r.s("NgValidators"),uc=new r.s("NgAsyncValidators"),dc=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class pc{static min(t){return function(t){return e=>{if(lc(e.value)||lc(t))return null;const i=parseFloat(e.value);return!isNaN(i)&&i<t?{min:{min:t,actual:e.value}}:null}}(t)}static max(t){return function(t){return e=>{if(lc(e.value)||lc(t))return null;const i=parseFloat(e.value);return!isNaN(i)&&i>t?{max:{max:t,actual:e.value}}:null}}(t)}static required(t){return fc(t)}static requiredTrue(t){return function(t){return!0===t.value?null:{required:!0}}(t)}static email(t){return function(t){return lc(t.value)||dc.test(t.value)?null:{email:!0}}(t)}static minLength(t){return mc(t)}static maxLength(t){return gc(t)}static pattern(t){return function(t){if(!t)return Ac;let e,i;return"string"==typeof t?(i="","^"!==t.charAt(0)&&(i+="^"),i+=t,"$"!==t.charAt(t.length-1)&&(i+="$"),e=new RegExp(i)):(i=t.toString(),e=t),t=>{if(lc(t.value))return null;const n=t.value;return e.test(n)?null:{pattern:{requiredPattern:i,actualValue:n}}}}(t)}static nullValidator(t){return null}static compose(t){return xc(t)}static composeAsync(t){return Sc(t)}}function fc(t){return lc(t.value)?{required:!0}:null}function mc(t){return e=>lc(e.value)||!cc(e.value)?null:e.value.length<t?{minlength:{requiredLength:t,actualLength:e.value.length}}:null}function gc(t){return e=>cc(e.value)&&e.value.length>t?{maxlength:{requiredLength:t,actualLength:e.value.length}}:null}function Ac(t){return null}function bc(t){return null!=t}function vc(t){const e=Object(r.ub)(t)?Object(On.a)(t):t;return Object(r.tb)(e),e}function _c(t){let e={};return t.forEach(t=>{e=null!=t?Object.assign(Object.assign({},e),t):e}),0===Object.keys(e).length?null:e}function yc(t,e){return e.map(e=>e(t))}function wc(t){return t.map(t=>function(t){return!t.validate}(t)?t:e=>t.validate(e))}function xc(t){if(!t)return null;const e=t.filter(bc);return 0==e.length?null:function(t){return _c(yc(t,e))}}function Cc(t){return null!=t?xc(wc(t)):null}function Sc(t){if(!t)return null;const e=t.filter(bc);return 0==e.length?null:function(t){return ec(yc(t,e).map(vc)).pipe(Object(Ge.a)(_c))}}function kc(t){return null!=t?Sc(wc(t)):null}function Ec(t,e){return null===t?[e]:Array.isArray(t)?[...t,e]:[t,e]}function Dc(t){return t._rawValidators}function Ic(t){return t._rawAsyncValidators}let Pc=(()=>{class t{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=Cc(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=kc(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t){this.control&&this.control.reset(t)}hasError(t,e){return!!this.control&&this.control.hasError(t,e)}getError(t,e){return this.control?this.control.getError(t,e):null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t}),t})(),Oc=(()=>{class t extends Pc{get formDirective(){return null}get path(){return null}}return t.\u0275fac=function(e){return Mc(e||t)},t.\u0275dir=r.Kb({type:t,features:[r.Ab]}),t})();const Mc=r.Xb(Oc);class Tc extends Pc{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Rc{constructor(t){this._cd=t}is(t){var e,i;return!!(null===(i=null===(e=this._cd)||void 0===e?void 0:e.control)||void 0===i?void 0:i[t])}}let Vc=(()=>{class t extends Rc{constructor(t){super(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Tc,2))},t.\u0275dir=r.Kb({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,e){2&t&&r.Hb("ng-untouched",e.is("untouched"))("ng-touched",e.is("touched"))("ng-pristine",e.is("pristine"))("ng-dirty",e.is("dirty"))("ng-valid",e.is("valid"))("ng-invalid",e.is("invalid"))("ng-pending",e.is("pending"))},features:[r.Ab]}),t})(),Fc=(()=>{class t extends Rc{constructor(t){super(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Oc,10))},t.\u0275dir=r.Kb({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:14,hostBindings:function(t,e){2&t&&r.Hb("ng-untouched",e.is("untouched"))("ng-touched",e.is("touched"))("ng-pristine",e.is("pristine"))("ng-dirty",e.is("dirty"))("ng-valid",e.is("valid"))("ng-invalid",e.is("invalid"))("ng-pending",e.is("pending"))},features:[r.Ab]}),t})();function Lc(t,e){return[...e.path,t]}function Uc(t,e){jc(t,e,!0),e.valueAccessor.writeValue(t.value),function(t,e){e.valueAccessor.registerOnChange(i=>{t._pendingValue=i,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&Hc(t,e)})}(t,e),function(t,e){const i=(t,i)=>{e.valueAccessor.writeValue(t),i&&e.viewToModelUpdate(t)};t.registerOnChange(i),e._registerOnDestroy(()=>{t._unregisterOnChange(i)})}(t,e),function(t,e){e.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&Hc(t,e),"submit"!==t.updateOn&&t.markAsTouched()})}(t,e),function(t,e){if(e.valueAccessor.setDisabledState){const i=t=>{e.valueAccessor.setDisabledState(t)};t.registerOnDisabledChange(i),e._registerOnDestroy(()=>{t._unregisterOnDisabledChange(i)})}}(t,e)}function Bc(t,e,i=!0){const n=()=>{};e.valueAccessor&&(e.valueAccessor.registerOnChange(n),e.valueAccessor.registerOnTouched(n)),zc(t,e,!0),t&&(e._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function Nc(t,e){t.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function jc(t,e,i){const n=Dc(t);null!==e.validator?t.setValidators(Ec(n,e.validator)):"function"==typeof n&&t.setValidators([n]);const r=Ic(t);if(null!==e.asyncValidator?t.setAsyncValidators(Ec(r,e.asyncValidator)):"function"==typeof r&&t.setAsyncValidators([r]),i){const i=()=>t.updateValueAndValidity();Nc(e._rawValidators,i),Nc(e._rawAsyncValidators,i)}}function zc(t,e,i){let n=!1;if(null!==t){if(null!==e.validator){const i=Dc(t);if(Array.isArray(i)&&i.length>0){const r=i.filter(t=>t!==e.validator);r.length!==i.length&&(n=!0,t.setValidators(r))}}if(null!==e.asyncValidator){const i=Ic(t);if(Array.isArray(i)&&i.length>0){const r=i.filter(t=>t!==e.asyncValidator);r.length!==i.length&&(n=!0,t.setAsyncValidators(r))}}}if(i){const t=()=>{};Nc(e._rawValidators,t),Nc(e._rawAsyncValidators,t)}return n}function Hc(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function Kc(t,e){jc(t,e,!1)}function $c(t,e){if(!t.hasOwnProperty("model"))return!1;const i=t.model;return!!i.isFirstChange()||!Object.is(e,i.currentValue)}function Gc(t,e){t._syncPendingControls(),e.forEach(t=>{const e=t.control;"submit"===e.updateOn&&e._pendingChange&&(t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1)})}function Wc(t,e){if(!e)return null;let i,n,r;return Array.isArray(e),e.forEach(t=>{t.constructor===ac?i=t:Object.getPrototypeOf(t.constructor)===nc?n=t:r=t}),r||n||i||null}function Zc(t,e){const i=t.indexOf(e);i>-1&&t.splice(i,1)}function qc(t){return(Jc(t)?t.validators:t)||null}function Yc(t){return Array.isArray(t)?Cc(t):t||null}function Qc(t,e){return(Jc(e)?e.asyncValidators:t)||null}function Xc(t){return Array.isArray(t)?kc(t):t||null}function Jc(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}class th{constructor(t,e){this._hasOwnPendingAsyncValidator=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=t,this._rawAsyncValidators=e,this._composedValidatorFn=Yc(this._rawValidators),this._composedAsyncValidatorFn=Xc(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get valid(){return"VALID"===this.status}get invalid(){return"INVALID"===this.status}get pending(){return"PENDING"==this.status}get disabled(){return"DISABLED"===this.status}get enabled(){return"DISABLED"!==this.status}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._rawValidators=t,this._composedValidatorFn=Yc(t)}setAsyncValidators(t){this._rawAsyncValidators=t,this._composedAsyncValidatorFn=Xc(t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(t=>t.markAllAsTouched())}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status="PENDING",!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status="DISABLED",this.errors=null,this._forEachChild(e=>{e.disable(Object.assign(Object.assign({},t),{onlySelf:!0}))}),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(t=>t(!0))}enable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status="VALID",this._forEachChild(e=>{e.enable(Object.assign(Object.assign({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(t=>t(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}updateValueAndValidity(t={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),"VALID"!==this.status&&"PENDING"!==this.status||this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?"DISABLED":"VALID"}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status="PENDING",this._hasOwnPendingAsyncValidator=!0;const e=vc(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(e=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(e,{emitEvent:t})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)}get(t){return function(t,e,i){if(null==e)return null;if(Array.isArray(e)||(e=e.split(".")),Array.isArray(e)&&0===e.length)return null;let n=t;return e.forEach(t=>{n=n instanceof ih?n.controls.hasOwnProperty(t)?n.controls[t]:null:n instanceof nh&&n.at(t)||null}),n}(this,t)}getError(t,e){const i=e?this.get(e):this;return i&&i.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new r.o,this.statusChanges=new r.o}_calculateStatus(){return this._allControlsDisabled()?"DISABLED":this.errors?"INVALID":this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus("PENDING")?"PENDING":this._anyControlsHaveStatus("INVALID")?"INVALID":"VALID"}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_isBoxedValue(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){Jc(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}}class eh extends th{constructor(t=null,e,i){super(qc(e),Qc(i,e)),this._onChange=[],this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!i})}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(t=>t(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=null,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){Zc(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Zc(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(t){this._isBoxedValue(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}}class ih extends th{constructor(t,e,i){super(qc(e),Qc(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!i})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e){this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}removeControl(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity(),this._onCollectionChange()}setControl(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){this._checkAllValuesPresent(t),Object.keys(t).forEach(i=>{this._throwIfControlMissing(i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){null!=t&&(Object.keys(t).forEach(i=>{this.controls[i]&&this.controls[i].patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,n)=>{i.reset(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e instanceof eh?e.value:e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(t,e)=>!!e._syncPendingControls()||t);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_throwIfControlMissing(t){if(!Object.keys(this.controls).length)throw new Error("\n There are no form controls registered with this group yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.controls[t])throw new Error(`Cannot find form control with name: ${t}.`)}_forEachChild(t){Object.keys(this.controls).forEach(e=>{const i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(const e of Object.keys(this.controls)){const i=this.controls[e];if(this.contains(e)&&t(i))return!0}return!1}_reduceValue(){return this._reduceChildren({},(t,e,i)=>((e.enabled||this.disabled)&&(t[i]=e.value),t))}_reduceChildren(t,e){let i=t;return this._forEachChild((t,n)=>{i=e(i,t,n)}),i}_allControlsDisabled(){for(const t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_checkAllValuesPresent(t){this._forEachChild((e,i)=>{if(void 0===t[i])throw new Error(`Must supply a value for form control with name: '${i}'.`)})}}class nh extends th{constructor(t,e,i){super(qc(e),Qc(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!i})}at(t){return this.controls[t]}push(t){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity(),this._onCollectionChange()}insert(t,e){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity()}removeAt(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),this.updateValueAndValidity()}setControl(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),e&&(this.controls.splice(t,0,e),this._registerControl(e)),this.updateValueAndValidity(),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){this._checkAllValuesPresent(t),t.forEach((t,i)=>{this._throwIfControlMissing(i),this.at(i).setValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){null!=t&&(t.forEach((t,i)=>{this.at(i)&&this.at(i).patchValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((i,n)=>{i.reset(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t instanceof eh?t.value:t.getRawValue())}clear(){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity())}_syncPendingControls(){let t=this.controls.reduce((t,e)=>!!e._syncPendingControls()||t,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_throwIfControlMissing(t){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(t))throw new Error(`Cannot find form control at index ${t}`)}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_checkAllValuesPresent(t){this._forEachChild((e,i)=>{if(void 0===t[i])throw new Error(`Must supply a value for form control at index: ${i}.`)})}_allControlsDisabled(){for(const t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}}const rh={provide:Oc,useExisting:Object(r.W)(()=>oh)},sh=(()=>Promise.resolve(null))();let oh=(()=>{class t extends Oc{constructor(t,e){super(),this.submitted=!1,this._directives=[],this.ngSubmit=new r.o,this.form=new ih({},Cc(t),kc(e))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){sh.then(()=>{const e=this._findContainer(t.path);t.control=e.registerControl(t.name,t.control),Uc(t.control,t),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.push(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){sh.then(()=>{const e=this._findContainer(t.path);e&&e.removeControl(t.name),Zc(this._directives,t)})}addFormGroup(t){sh.then(()=>{const e=this._findContainer(t.path),i=new ih({});Kc(i,t),e.registerControl(t.name,i),i.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){sh.then(()=>{const e=this._findContainer(t.path);e&&e.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,e){sh.then(()=>{this.form.get(t.path).setValue(e)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submitted=!0,Gc(this.form,this._directives),this.ngSubmit.emit(t),!1}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(hc,10),r.Pb(uc,10))},t.\u0275dir=r.Kb({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,e){1&t&&r.cc("submit",function(t){return e.onSubmit(t)})("reset",function(){return e.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[r.Cb([rh]),r.Ab]}),t})(),ah=(()=>{class t extends Oc{ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return Lc(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}}return t.\u0275fac=function(e){return lh(e||t)},t.\u0275dir=r.Kb({type:t,features:[r.Ab]}),t})();const lh=r.Xb(ah),ch={provide:Tc,useExisting:Object(r.W)(()=>uh)},hh=(()=>Promise.resolve(null))();let uh=(()=>{class t extends Tc{constructor(t,e,i,n){super(),this.control=new eh,this._registered=!1,this.update=new r.o,this._parent=t,this._setValidators(e),this._setAsyncValidators(i),this.valueAccessor=Wc(0,n)}ngOnChanges(t){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in t&&this._updateDisabled(t),$c(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._parent?Lc(this.name,this._parent):[this.name]}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){Uc(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(t){hh.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1})})}_updateDisabled(t){const e=t.isDisabled.currentValue,i=""===e||e&&"false"!==e;hh.then(()=>{i&&!this.control.disabled?this.control.disable():!i&&this.control.disabled&&this.control.enable()})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Oc,9),r.Pb(hc,10),r.Pb(uc,10),r.Pb(rc,10))},t.\u0275dir=r.Kb({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[r.Cb([ch]),r.Ab,r.Bb]}),t})(),dh=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),t})();const ph={provide:rc,useExisting:Object(r.W)(()=>fh),multi:!0};let fh=(()=>{class t extends nc{constructor(t,e){super(),this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}registerOnChange(t){this.onChange=e=>{t(""==e?null:parseFloat(e))}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.H),r.Pb(r.l))},t.\u0275dir=r.Kb({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(t,e){1&t&&r.cc("input",function(t){return e.onChange(t.target.value)})("blur",function(){return e.onTouched()})},features:[r.Cb([ph]),r.Ab]}),t})(),mh=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({}),t})();const gh=new r.s("NgModelWithFormControlWarning"),Ah={provide:Tc,useExisting:Object(r.W)(()=>bh)};let bh=(()=>{class t extends Tc{constructor(t,e,i,n){super(),this._ngModelWarningConfig=n,this.update=new r.o,this._ngModelWarningSent=!1,this._setValidators(t),this._setAsyncValidators(e),this.valueAccessor=Wc(0,i)}set isDisabled(t){}ngOnChanges(t){if(this._isControlChanged(t)){const e=t.form.previousValue;e&&Bc(e,this,!1),Uc(this.form,this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this.form.updateValueAndValidity({emitEvent:!1})}$c(t,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&Bc(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_isControlChanged(t){return t.hasOwnProperty("form")}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(hc,10),r.Pb(uc,10),r.Pb(rc,10),r.Pb(gh,8))},t.\u0275dir=r.Kb({type:t,selectors:[["","formControl",""]],inputs:{isDisabled:["disabled","isDisabled"],form:["formControl","form"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[r.Cb([Ah]),r.Ab,r.Bb]}),t._ngModelWarningSentOnce=!1,t})();const vh={provide:Oc,useExisting:Object(r.W)(()=>_h)};let _h=(()=>{class t extends Oc{constructor(t,e){super(),this.validators=t,this.asyncValidators=e,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new r.o,this._setValidators(t),this._setAsyncValidators(e)}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(zc(this.form,this,!1),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){const e=this.form.get(t.path);return Uc(e,t),e.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),e}getControl(t){return this.form.get(t.path)}removeControl(t){Bc(t.control||null,t,!1),Zc(this.directives,t)}addFormGroup(t){this._setUpFormContainer(t)}removeFormGroup(t){this._cleanUpFormContainer(t)}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){this._setUpFormContainer(t)}removeFormArray(t){this._cleanUpFormContainer(t)}getFormArray(t){return this.form.get(t.path)}updateModel(t,e){this.form.get(t.path).setValue(e)}onSubmit(t){return this.submitted=!0,Gc(this.form,this.directives),this.ngSubmit.emit(t),!1}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_updateDomValue(){this.directives.forEach(t=>{const e=t.control,i=this.form.get(t.path);e!==i&&(Bc(e||null,t),i instanceof eh&&(Uc(i,t),t.control=i))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(t){const e=this.form.get(t.path);Kc(e,t),e.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(t){if(this.form){const e=this.form.get(t.path);e&&function(t,e){return zc(t,e,!1)}(e,t)&&e.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){jc(this.form,this,!1),this._oldForm&&zc(this._oldForm,this,!1)}_checkFormPresent(){}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(hc,10),r.Pb(uc,10))},t.\u0275dir=r.Kb({type:t,selectors:[["","formGroup",""]],hostBindings:function(t,e){1&t&&r.cc("submit",function(t){return e.onSubmit(t)})("reset",function(){return e.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[r.Cb([vh]),r.Ab,r.Bb]}),t})();const yh={provide:Oc,useExisting:Object(r.W)(()=>wh)};let wh=(()=>{class t extends ah{constructor(t,e,i){super(),this._parent=t,this._setValidators(e),this._setAsyncValidators(i)}_checkParentType(){Sh(this._parent)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Oc,13),r.Pb(hc,10),r.Pb(uc,10))},t.\u0275dir=r.Kb({type:t,selectors:[["","formGroupName",""]],inputs:{name:["formGroupName","name"]},features:[r.Cb([yh]),r.Ab]}),t})();const xh={provide:Oc,useExisting:Object(r.W)(()=>Ch)};let Ch=(()=>{class t extends Oc{constructor(t,e,i){super(),this._parent=t,this._setValidators(e),this._setAsyncValidators(i)}ngOnInit(){this._checkParentType(),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return Lc(null==this.name?this.name:this.name.toString(),this._parent)}_checkParentType(){Sh(this._parent)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Oc,13),r.Pb(hc,10),r.Pb(uc,10))},t.\u0275dir=r.Kb({type:t,selectors:[["","formArrayName",""]],inputs:{name:["formArrayName","name"]},features:[r.Cb([xh]),r.Ab]}),t})();function Sh(t){return!(t instanceof wh||t instanceof _h||t instanceof Ch)}const kh={provide:Tc,useExisting:Object(r.W)(()=>Eh)};let Eh=(()=>{class t extends Tc{constructor(t,e,i,n,s){super(),this._ngModelWarningConfig=s,this._added=!1,this.update=new r.o,this._ngModelWarningSent=!1,this._parent=t,this._setValidators(e),this._setAsyncValidators(i),this.valueAccessor=Wc(0,n)}set isDisabled(t){}ngOnChanges(t){this._added||this._setUpControl(),$c(t,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}get path(){return Lc(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this._added=!0}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Oc,13),r.Pb(hc,10),r.Pb(uc,10),r.Pb(rc,10),r.Pb(gh,8))},t.\u0275dir=r.Kb({type:t,selectors:[["","formControlName",""]],inputs:{isDisabled:["disabled","isDisabled"],name:["formControlName","name"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[r.Cb([kh]),r.Ab,r.Bb]}),t._ngModelWarningSentOnce=!1,t})();const Dh={provide:hc,useExisting:Object(r.W)(()=>Ih),multi:!0};let Ih=(()=>{class t{constructor(){this._required=!1}get required(){return this._required}set required(t){this._required=null!=t&&!1!==t&&"false"!=`${t}`,this._onChange&&this._onChange()}validate(t){return this.required?fc(t):null}registerOnValidatorChange(t){this._onChange=t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(t,e){2&t&&r.Eb("required",e.required?"":null)},inputs:{required:"required"},features:[r.Cb([Dh])]}),t})();const Ph={provide:hc,useExisting:Object(r.W)(()=>Oh),multi:!0};let Oh=(()=>{class t{constructor(){this._validator=Ac}ngOnChanges(t){"minlength"in t&&(this._createValidator(),this._onChange&&this._onChange())}validate(t){return null==this.minlength?null:this._validator(t)}registerOnValidatorChange(t){this._onChange=t}_createValidator(){this._validator=mc("number"==typeof this.minlength?this.minlength:parseInt(this.minlength,10))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&r.Eb("minlength",e.minlength?e.minlength:null)},inputs:{minlength:"minlength"},features:[r.Cb([Ph]),r.Bb]}),t})();const Mh={provide:hc,useExisting:Object(r.W)(()=>Th),multi:!0};let Th=(()=>{class t{constructor(){this._validator=Ac}ngOnChanges(t){"maxlength"in t&&(this._createValidator(),this._onChange&&this._onChange())}validate(t){return null!=this.maxlength?this._validator(t):null}registerOnValidatorChange(t){this._onChange=t}_createValidator(){this._validator=gc("number"==typeof this.maxlength?this.maxlength:parseInt(this.maxlength,10))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&r.Eb("maxlength",e.maxlength?e.maxlength:null)},inputs:{maxlength:"maxlength"},features:[r.Cb([Mh]),r.Bb]}),t})(),Rh=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[mh]]}),t})(),Vh=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[Rh]}),t})(),Fh=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:gh,useValue:e.warnOnNgModelWithFormControl}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[Rh]}),t})(),Lh=(()=>{class t{group(t,e=null){const i=this._reduceControls(t);let n,r=null,s=null;return null!=e&&(function(t){return void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn}(e)?(r=null!=e.validators?e.validators:null,s=null!=e.asyncValidators?e.asyncValidators:null,n=null!=e.updateOn?e.updateOn:void 0):(r=null!=e.validator?e.validator:null,s=null!=e.asyncValidator?e.asyncValidator:null)),new ih(i,{asyncValidators:s,updateOn:n,validators:r})}control(t,e,i){return new eh(t,e,i)}array(t,e,i){const n=t.map(t=>this._createControl(t));return new nh(n,e,i)}_reduceControls(t){const e={};return Object.keys(t).forEach(i=>{e[i]=this._createControl(t[i])}),e}_createControl(t){return t instanceof eh||t instanceof ih||t instanceof nh?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(r.Lb)({factory:function(){return new t},token:t,providedIn:Fh}),t})();const Uh=["underline"],Bh=["connectionContainer"],Nh=["inputContainer"],jh=["label"];function zh(t,e){1&t&&(r.Tb(0),r.Vb(1,"div",14),r.Qb(2,"div",15),r.Qb(3,"div",16),r.Qb(4,"div",17),r.Ub(),r.Vb(5,"div",18),r.Qb(6,"div",15),r.Qb(7,"div",16),r.Qb(8,"div",17),r.Ub(),r.Sb())}function Hh(t,e){1&t&&(r.Vb(0,"div",19),r.lc(1,1),r.Ub())}function Kh(t,e){if(1&t&&(r.Tb(0),r.lc(1,2),r.Vb(2,"span"),r.Kc(3),r.Ub(),r.Sb()),2&t){const t=r.gc(2);r.Db(3),r.Lc(t._control.placeholder)}}function $h(t,e){1&t&&r.lc(0,3,["*ngSwitchCase","true"])}function Gh(t,e){1&t&&(r.Vb(0,"span",23),r.Kc(1," *"),r.Ub())}function Wh(t,e){if(1&t){const t=r.Wb();r.Vb(0,"label",20,21),r.cc("cdkObserveContent",function(){return r.Ac(t),r.gc().updateOutlineGap()}),r.Ic(2,Kh,4,1,"ng-container",12),r.Ic(3,$h,1,0,"ng-content",12),r.Ic(4,Gh,2,0,"span",22),r.Ub()}if(2&t){const t=r.gc();r.Hb("mat-empty",t._control.empty&&!t._shouldAlwaysFloat())("mat-form-field-empty",t._control.empty&&!t._shouldAlwaysFloat())("mat-accent","accent"==t.color)("mat-warn","warn"==t.color),r.nc("cdkObserveContentDisabled","outline"!=t.appearance)("id",t._labelId)("ngSwitch",t._hasLabel()),r.Eb("for",t._control.id)("aria-owns",t._control.id),r.Db(2),r.nc("ngSwitchCase",!1),r.Db(1),r.nc("ngSwitchCase",!0),r.Db(1),r.nc("ngIf",!t.hideRequiredMarker&&t._control.required&&!t._control.disabled)}}function Zh(t,e){1&t&&(r.Vb(0,"div",24),r.lc(1,4),r.Ub())}function qh(t,e){if(1&t&&(r.Vb(0,"div",25,26),r.Qb(2,"span",27),r.Ub()),2&t){const t=r.gc();r.Db(2),r.Hb("mat-accent","accent"==t.color)("mat-warn","warn"==t.color)}}function Yh(t,e){if(1&t&&(r.Vb(0,"div"),r.lc(1,5),r.Ub()),2&t){const t=r.gc();r.nc("@transitionMessages",t._subscriptAnimationState)}}function Qh(t,e){if(1&t&&(r.Vb(0,"div",31),r.Kc(1),r.Ub()),2&t){const t=r.gc(2);r.nc("id",t._hintLabelId),r.Db(1),r.Lc(t.hintLabel)}}function Xh(t,e){if(1&t&&(r.Vb(0,"div",28),r.Ic(1,Qh,2,2,"div",29),r.lc(2,6),r.Qb(3,"div",30),r.lc(4,7),r.Ub()),2&t){const t=r.gc();r.nc("@transitionMessages",t._subscriptAnimationState),r.Db(1),r.nc("ngIf",t.hintLabel)}}const Jh=["*",[["","matPrefix",""]],[["mat-placeholder"]],[["mat-label"]],[["","matSuffix",""]],[["mat-error"]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],tu=["*","[matPrefix]","mat-placeholder","mat-label","[matSuffix]","mat-error","mat-hint:not([align='end'])","mat-hint[align='end']"];let eu=0;const iu=new r.s("MatError");let nu=(()=>{class t{constructor(){this.id="mat-error-"+eu++}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["mat-error"]],hostAttrs:["role","alert",1,"mat-error"],hostVars:1,hostBindings:function(t,e){2&t&&r.Eb("id",e.id)},inputs:{id:"id"},features:[r.Cb([{provide:iu,useExisting:t}])]}),t})();const ru={transitionMessages:$r("transitionMessages",[qr("enter",Zr({opacity:1,transform:"translateY(0%)"})),Qr("void => enter",[Zr({opacity:0,transform:"translateY(-5px)"}),Gr("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let su=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t}),t})(),ou=0;const au=new r.s("MatHint");let lu=(()=>{class t{constructor(){this.align="start",this.id="mat-hint-"+ou++}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["mat-hint"]],hostAttrs:[1,"mat-hint"],hostVars:4,hostBindings:function(t,e){2&t&&(r.Eb("id",e.id)("align",null),r.Hb("mat-form-field-hint-end","end"===e.align))},inputs:{align:"align",id:"id"},features:[r.Cb([{provide:au,useExisting:t}])]}),t})(),cu=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["mat-label"]]}),t})(),hu=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["mat-placeholder"]]}),t})();const uu=new r.s("MatPrefix");let du=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","matPrefix",""]],features:[r.Cb([{provide:uu,useExisting:t}])]}),t})();const pu=new r.s("MatSuffix");let fu=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","matSuffix",""]],features:[r.Cb([{provide:pu,useExisting:t}])]}),t})(),mu=0;class gu{constructor(t){this._elementRef=t}}const Au=Ea(gu,"primary"),bu=new r.s("MAT_FORM_FIELD_DEFAULT_OPTIONS"),vu=new r.s("MatFormField");let _u=(()=>{class t extends Au{constructor(t,e,i,n,r,s,o,a){super(t),this._elementRef=t,this._changeDetectorRef=e,this._dir=n,this._defaults=r,this._platform=s,this._ngZone=o,this._outlineGapCalculationNeededImmediately=!1,this._outlineGapCalculationNeededOnStable=!1,this._destroyed=new _e.a,this._showAlwaysAnimate=!1,this._subscriptAnimationState="",this._hintLabel="",this._hintLabelId="mat-hint-"+mu++,this._labelId="mat-form-field-label-"+mu++,this.floatLabel=this._getDefaultFloatLabelState(),this._animationsEnabled="NoopAnimations"!==a,this.appearance=r&&r.appearance?r.appearance:"legacy",this._hideRequiredMarker=!(!r||null==r.hideRequiredMarker)&&r.hideRequiredMarker}get appearance(){return this._appearance}set appearance(t){const e=this._appearance;this._appearance=t||this._defaults&&this._defaults.appearance||"legacy","outline"===this._appearance&&e!==t&&(this._outlineGapCalculationNeededOnStable=!0)}get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(t){this._hideRequiredMarker=ti(t)}_shouldAlwaysFloat(){return"always"===this.floatLabel&&!this._showAlwaysAnimate}_canLabelFloat(){return"never"!==this.floatLabel}get hintLabel(){return this._hintLabel}set hintLabel(t){this._hintLabel=t,this._processHints()}get floatLabel(){return"legacy"!==this.appearance&&"never"===this._floatLabel?"auto":this._floatLabel}set floatLabel(t){t!==this._floatLabel&&(this._floatLabel=t||this._getDefaultFloatLabelState(),this._changeDetectorRef.markForCheck())}get _control(){return this._explicitFormFieldControl||this._controlNonStatic||this._controlStatic}set _control(t){this._explicitFormFieldControl=t}getLabelId(){return this._hasFloatingLabel()?this._labelId:null}getConnectedOverlayOrigin(){return this._connectionContainerRef||this._elementRef}ngAfterContentInit(){this._validateControlChild();const t=this._control;t.controlType&&this._elementRef.nativeElement.classList.add(`mat-form-field-type-${t.controlType}`),t.stateChanges.pipe(Pn(null)).subscribe(()=>{this._validatePlaceholders(),this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),t.ngControl&&t.ngControl.valueChanges&&t.ngControl.valueChanges.pipe(Sn(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe(Sn(this._destroyed)).subscribe(()=>{this._outlineGapCalculationNeededOnStable&&this.updateOutlineGap()})}),Object(or.a)(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._outlineGapCalculationNeededOnStable=!0,this._changeDetectorRef.markForCheck()}),this._hintChildren.changes.pipe(Pn(null)).subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.pipe(Pn(null)).subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._dir&&this._dir.change.pipe(Sn(this._destroyed)).subscribe(()=>{"function"==typeof requestAnimationFrame?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this.updateOutlineGap())}):this.updateOutlineGap()})}ngAfterContentChecked(){this._validateControlChild(),this._outlineGapCalculationNeededImmediately&&this.updateOutlineGap()}ngAfterViewInit(){this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_shouldForward(t){const e=this._control?this._control.ngControl:null;return e&&e[t]}_hasPlaceholder(){return!!(this._control&&this._control.placeholder||this._placeholderChild)}_hasLabel(){return!(!this._labelChildNonStatic&&!this._labelChildStatic)}_shouldLabelFloat(){return this._canLabelFloat()&&(this._control&&this._control.shouldLabelFloat||this._shouldAlwaysFloat())}_hideControlPlaceholder(){return"legacy"===this.appearance&&!this._hasLabel()||this._hasLabel()&&!this._shouldLabelFloat()}_hasFloatingLabel(){return this._hasLabel()||"legacy"===this.appearance&&this._hasPlaceholder()}_getDisplayedMessages(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_animateAndLockLabel(){this._hasFloatingLabel()&&this._canLabelFloat()&&(this._animationsEnabled&&this._label&&(this._showAlwaysAnimate=!0,en(this._label.nativeElement,"transitionend").pipe(Qe(1)).subscribe(()=>{this._showAlwaysAnimate=!1})),this.floatLabel="always",this._changeDetectorRef.markForCheck())}_validatePlaceholders(){}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){}_getDefaultFloatLabelState(){return this._defaults&&this._defaults.floatLabel||"auto"}_syncDescribedByIds(){if(this._control){let t=[];if(this._control.userAriaDescribedBy&&"string"==typeof this._control.userAriaDescribedBy&&t.push(...this._control.userAriaDescribedBy.split(" ")),"hint"===this._getDisplayedMessages()){const e=this._hintChildren?this._hintChildren.find(t=>"start"===t.align):null,i=this._hintChildren?this._hintChildren.find(t=>"end"===t.align):null;e?t.push(e.id):this._hintLabel&&t.push(this._hintLabelId),i&&t.push(i.id)}else this._errorChildren&&t.push(...this._errorChildren.map(t=>t.id));this._control.setDescribedByIds(t)}}_validateControlChild(){}updateOutlineGap(){const t=this._label?this._label.nativeElement:null;if("outline"!==this.appearance||!t||!t.children.length||!t.textContent.trim())return;if(!this._platform.isBrowser)return;if(!this._isAttachedToDOM())return void(this._outlineGapCalculationNeededImmediately=!0);let e=0,i=0;const n=this._connectionContainerRef.nativeElement,r=n.querySelectorAll(".mat-form-field-outline-start"),s=n.querySelectorAll(".mat-form-field-outline-gap");if(this._label&&this._label.nativeElement.children.length){const r=n.getBoundingClientRect();if(0===r.width&&0===r.height)return this._outlineGapCalculationNeededOnStable=!0,void(this._outlineGapCalculationNeededImmediately=!1);const s=this._getStartEnd(r),o=t.children,a=this._getStartEnd(o[0].getBoundingClientRect());let l=0;for(let t=0;t<o.length;t++)l+=o[t].offsetWidth;e=Math.abs(a-s)-5,i=l>0?.75*l+10:0}for(let o=0;o<r.length;o++)r[o].style.width=`${e}px`;for(let o=0;o<s.length;o++)s[o].style.width=`${i}px`;this._outlineGapCalculationNeededOnStable=this._outlineGapCalculationNeededImmediately=!1}_getStartEnd(t){return this._dir&&"rtl"===this._dir.value?t.right:t.left}_isAttachedToDOM(){const t=this._elementRef.nativeElement;if(t.getRootNode){const e=t.getRootNode();return e&&e!==t}return document.documentElement.contains(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.h),r.Pb(r.l),r.Pb(Zn,8),r.Pb(bu,8),r.Pb(ci),r.Pb(r.B),r.Pb(pa,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-form-field"]],contentQueries:function(t,e,i){if(1&t&&(r.Ib(i,su,1),r.Ib(i,su,3),r.Ib(i,cu,1),r.Ib(i,cu,3),r.Ib(i,hu,1),r.Ib(i,iu,1),r.Ib(i,au,1),r.Ib(i,uu,1),r.Ib(i,pu,1)),2&t){let t;r.vc(t=r.dc())&&(e._controlNonStatic=t.first),r.vc(t=r.dc())&&(e._controlStatic=t.first),r.vc(t=r.dc())&&(e._labelChildNonStatic=t.first),r.vc(t=r.dc())&&(e._labelChildStatic=t.first),r.vc(t=r.dc())&&(e._placeholderChild=t.first),r.vc(t=r.dc())&&(e._errorChildren=t),r.vc(t=r.dc())&&(e._hintChildren=t),r.vc(t=r.dc())&&(e._prefixChildren=t),r.vc(t=r.dc())&&(e._suffixChildren=t)}},viewQuery:function(t,e){if(1&t&&(r.Pc(Uh,1),r.Pc(Bh,3),r.Pc(Nh,1),r.Pc(jh,1)),2&t){let t;r.vc(t=r.dc())&&(e.underlineRef=t.first),r.vc(t=r.dc())&&(e._connectionContainerRef=t.first),r.vc(t=r.dc())&&(e._inputContainerRef=t.first),r.vc(t=r.dc())&&(e._label=t.first)}},hostAttrs:[1,"mat-form-field"],hostVars:44,hostBindings:function(t,e){2&t&&r.Hb("mat-form-field-appearance-standard","standard"==e.appearance)("mat-form-field-appearance-fill","fill"==e.appearance)("mat-form-field-appearance-outline","outline"==e.appearance)("mat-form-field-appearance-legacy","legacy"==e.appearance)("mat-form-field-invalid",e._control.errorState)("mat-form-field-can-float",e._canLabelFloat())("mat-form-field-should-float",e._shouldLabelFloat())("mat-form-field-has-label",e._hasFloatingLabel())("mat-form-field-hide-placeholder",e._hideControlPlaceholder())("mat-form-field-disabled",e._control.disabled)("mat-form-field-autofilled",e._control.autofilled)("mat-focused",e._control.focused)("mat-accent","accent"==e.color)("mat-warn","warn"==e.color)("ng-untouched",e._shouldForward("untouched"))("ng-touched",e._shouldForward("touched"))("ng-pristine",e._shouldForward("pristine"))("ng-dirty",e._shouldForward("dirty"))("ng-valid",e._shouldForward("valid"))("ng-invalid",e._shouldForward("invalid"))("ng-pending",e._shouldForward("pending"))("_mat-animation-noopable",!e._animationsEnabled)},inputs:{color:"color",floatLabel:"floatLabel",appearance:"appearance",hideRequiredMarker:"hideRequiredMarker",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[r.Cb([{provide:vu,useExisting:t}]),r.Ab],ngContentSelectors:tu,decls:15,vars:8,consts:[[1,"mat-form-field-wrapper"],[1,"mat-form-field-flex",3,"click"],["connectionContainer",""],[4,"ngIf"],["class","mat-form-field-prefix",4,"ngIf"],[1,"mat-form-field-infix"],["inputContainer",""],[1,"mat-form-field-label-wrapper"],["class","mat-form-field-label",3,"cdkObserveContentDisabled","id","mat-empty","mat-form-field-empty","mat-accent","mat-warn","ngSwitch","cdkObserveContent",4,"ngIf"],["class","mat-form-field-suffix",4,"ngIf"],["class","mat-form-field-underline",4,"ngIf"],[1,"mat-form-field-subscript-wrapper",3,"ngSwitch"],[4,"ngSwitchCase"],["class","mat-form-field-hint-wrapper",4,"ngSwitchCase"],[1,"mat-form-field-outline"],[1,"mat-form-field-outline-start"],[1,"mat-form-field-outline-gap"],[1,"mat-form-field-outline-end"],[1,"mat-form-field-outline","mat-form-field-outline-thick"],[1,"mat-form-field-prefix"],[1,"mat-form-field-label",3,"cdkObserveContentDisabled","id","ngSwitch","cdkObserveContent"],["label",""],["class","mat-placeholder-required mat-form-field-required-marker","aria-hidden","true",4,"ngIf"],["aria-hidden","true",1,"mat-placeholder-required","mat-form-field-required-marker"],[1,"mat-form-field-suffix"],[1,"mat-form-field-underline"],["underline",""],[1,"mat-form-field-ripple"],[1,"mat-form-field-hint-wrapper"],["class","mat-hint",3,"id",4,"ngIf"],[1,"mat-form-field-hint-spacer"],[1,"mat-hint",3,"id"]],template:function(t,e){1&t&&(r.mc(Jh),r.Vb(0,"div",0),r.Vb(1,"div",1,2),r.cc("click",function(t){return e._control.onContainerClick&&e._control.onContainerClick(t)}),r.Ic(3,zh,9,0,"ng-container",3),r.Ic(4,Hh,2,0,"div",4),r.Vb(5,"div",5,6),r.lc(7),r.Vb(8,"span",7),r.Ic(9,Wh,5,16,"label",8),r.Ub(),r.Ub(),r.Ic(10,Zh,2,0,"div",9),r.Ub(),r.Ic(11,qh,3,4,"div",10),r.Vb(12,"div",11),r.Ic(13,Yh,2,1,"div",12),r.Ic(14,Xh,5,2,"div",13),r.Ub(),r.Ub()),2&t&&(r.Db(3),r.nc("ngIf","outline"==e.appearance),r.Db(1),r.nc("ngIf",e._prefixChildren.length),r.Db(5),r.nc("ngIf",e._hasFloatingLabel()),r.Db(1),r.nc("ngIf",e._suffixChildren.length),r.Db(1),r.nc("ngIf","outline"!=e.appearance),r.Db(1),r.nc("ngSwitch",e._getDisplayedMessages()),r.Db(1),r.nc("ngSwitchCase","error"),r.Db(1),r.nc("ngSwitchCase","hint"))},directives:[ut,mt,gt,xi],styles:[".mat-form-field{display:inline-block;position:relative;text-align:left}[dir=rtl] .mat-form-field{text-align:right}.mat-form-field-wrapper{position:relative}.mat-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-form-field-prefix,.mat-form-field-suffix{white-space:nowrap;flex:none;position:relative}.mat-form-field-infix{display:block;position:relative;flex:auto;min-width:0;width:180px}.cdk-high-contrast-active .mat-form-field-infix{border-image:linear-gradient(transparent, transparent)}.mat-form-field-label-wrapper{position:absolute;left:0;box-sizing:content-box;width:100%;height:100%;overflow:hidden;pointer-events:none}[dir=rtl] .mat-form-field-label-wrapper{left:auto;right:0}.mat-form-field-label{position:absolute;left:0;font:inherit;pointer-events:none;width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;transform-origin:0 0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),width 400ms cubic-bezier(0.25, 0.8, 0.25, 1);display:none}[dir=rtl] .mat-form-field-label{transform-origin:100% 0;left:auto;right:0}.mat-form-field-empty.mat-form-field-label,.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label{display:block}.mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:block;transition:none}.mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-form-field-can-float .mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:block}.mat-form-field-label:not(.mat-form-field-empty){transition:none}.mat-form-field-underline{position:absolute;width:100%;pointer-events:none;transform:scale3d(1, 1.0001, 1)}.mat-form-field-ripple{position:absolute;left:0;width:100%;transform-origin:50%;transform:scaleX(0.5);opacity:0;transition:background-color 300ms cubic-bezier(0.55, 0, 0.55, 0.2)}.mat-form-field.mat-focused .mat-form-field-ripple,.mat-form-field.mat-form-field-invalid .mat-form-field-ripple{opacity:1;transform:none;transition:transform 300ms cubic-bezier(0.25, 0.8, 0.25, 1),opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 300ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-subscript-wrapper{position:absolute;box-sizing:border-box;width:100%;overflow:hidden}.mat-form-field-subscript-wrapper .mat-icon,.mat-form-field-label-wrapper .mat-icon{width:1em;height:1em;font-size:inherit;vertical-align:baseline}.mat-form-field-hint-wrapper{display:flex}.mat-form-field-hint-spacer{flex:1 0 1em}.mat-error{display:block}.mat-form-field-control-wrapper{position:relative}.mat-form-field-hint-end{order:1}.mat-form-field._mat-animation-noopable .mat-form-field-label,.mat-form-field._mat-animation-noopable .mat-form-field-ripple{transition:none}\n",'.mat-form-field-appearance-fill .mat-form-field-flex{border-radius:4px 4px 0 0;padding:.75em .75em 0 .75em}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-flex{outline:solid 1px}.mat-form-field-appearance-fill .mat-form-field-underline::before{content:"";display:block;position:absolute;bottom:0;height:1px;width:100%}.mat-form-field-appearance-fill .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-fill:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-fill._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}.mat-form-field-appearance-fill .mat-form-field-subscript-wrapper{padding:0 1em}\n','.mat-input-element{font:inherit;background:transparent;color:currentColor;border:none;outline:none;padding:0;margin:0;width:100%;max-width:100%;vertical-align:bottom;text-align:inherit;box-sizing:content-box}.mat-input-element:-moz-ui-invalid{box-shadow:none}.mat-input-element::-ms-clear,.mat-input-element::-ms-reveal{display:none}.mat-input-element,.mat-input-element::-webkit-search-cancel-button,.mat-input-element::-webkit-search-decoration,.mat-input-element::-webkit-search-results-button,.mat-input-element::-webkit-search-results-decoration{-webkit-appearance:none}.mat-input-element::-webkit-contacts-auto-fill-button,.mat-input-element::-webkit-caps-lock-indicator,.mat-input-element::-webkit-credentials-auto-fill-button{visibility:hidden}.mat-input-element[type=date],.mat-input-element[type=datetime],.mat-input-element[type=datetime-local],.mat-input-element[type=month],.mat-input-element[type=week],.mat-input-element[type=time]{line-height:1}.mat-input-element[type=date]::after,.mat-input-element[type=datetime]::after,.mat-input-element[type=datetime-local]::after,.mat-input-element[type=month]::after,.mat-input-element[type=week]::after,.mat-input-element[type=time]::after{content:" ";white-space:pre;width:1px}.mat-input-element::-webkit-inner-spin-button,.mat-input-element::-webkit-calendar-picker-indicator,.mat-input-element::-webkit-clear-button{font-size:.75em}.mat-input-element::placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element::-moz-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-moz-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element::-webkit-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-webkit-input-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element:-ms-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element:-ms-input-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-form-field-hide-placeholder .mat-input-element::placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element::-moz-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element::-webkit-input-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element:-ms-input-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}textarea.mat-input-element{resize:vertical;overflow:auto}textarea.mat-input-element.cdk-textarea-autosize{resize:none}textarea.mat-input-element{padding:2px 0;margin:-2px 0}select.mat-input-element{-moz-appearance:none;-webkit-appearance:none;position:relative;background-color:transparent;display:inline-flex;box-sizing:border-box;padding-top:1em;top:-1em;margin-bottom:-1em}select.mat-input-element::-ms-expand{display:none}select.mat-input-element::-moz-focus-inner{border:0}select.mat-input-element:not(:disabled){cursor:pointer}select.mat-input-element::-ms-value{color:inherit;background:none}.mat-focused .cdk-high-contrast-active select.mat-input-element::-ms-value{color:inherit}.mat-form-field-type-mat-native-select .mat-form-field-infix::after{content:"";width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;position:absolute;top:50%;right:0;margin-top:-2.5px;pointer-events:none}[dir=rtl] .mat-form-field-type-mat-native-select .mat-form-field-infix::after{right:auto;left:0}.mat-form-field-type-mat-native-select .mat-input-element{padding-right:15px}[dir=rtl] .mat-form-field-type-mat-native-select .mat-input-element{padding-right:0;padding-left:15px}.mat-form-field-type-mat-native-select .mat-form-field-label-wrapper{max-width:calc(100% - 10px)}.mat-form-field-type-mat-native-select.mat-form-field-appearance-outline .mat-form-field-infix::after{margin-top:-5px}.mat-form-field-type-mat-native-select.mat-form-field-appearance-fill .mat-form-field-infix::after{margin-top:-10px}\n',".mat-form-field-appearance-legacy .mat-form-field-label{transform:perspective(100px);-ms-transform:none}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon{width:1em}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button{font:inherit;vertical-align:baseline}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button .mat-icon{font-size:inherit}.mat-form-field-appearance-legacy .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-legacy .mat-form-field-ripple{top:0;height:2px;overflow:hidden}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}.cdk-high-contrast-active .mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-legacy.mat-form-field-invalid:not(.mat-focused) .mat-form-field-ripple{height:1px}\n",".mat-form-field-appearance-outline .mat-form-field-wrapper{margin:.25em 0}.mat-form-field-appearance-outline .mat-form-field-flex{padding:0 .75em 0 .75em;margin-top:-0.25em;position:relative}.mat-form-field-appearance-outline .mat-form-field-prefix,.mat-form-field-appearance-outline .mat-form-field-suffix{top:.25em}.mat-form-field-appearance-outline .mat-form-field-outline{display:flex;position:absolute;top:.25em;left:0;right:0;bottom:0;pointer-events:none}.mat-form-field-appearance-outline .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-end{border:1px solid currentColor;min-width:5px}.mat-form-field-appearance-outline .mat-form-field-outline-start{border-radius:5px 0 0 5px;border-right-style:none}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-start{border-right-style:solid;border-left-style:none;border-radius:0 5px 5px 0}.mat-form-field-appearance-outline .mat-form-field-outline-end{border-radius:0 5px 5px 0;border-left-style:none;flex-grow:1}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-end{border-left-style:solid;border-right-style:none;border-radius:5px 0 0 5px}.mat-form-field-appearance-outline .mat-form-field-outline-gap{border-radius:.000001px;border:1px solid currentColor;border-left-style:none;border-right-style:none}.mat-form-field-appearance-outline.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-outline-gap{border-top-color:transparent}.mat-form-field-appearance-outline .mat-form-field-outline-thick{opacity:0}.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-end,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-gap{border-width:2px}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline{opacity:0;transition:opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline{opacity:0;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline .mat-form-field-subscript-wrapper{padding:0 1em}.mat-form-field-appearance-outline._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-start,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-end,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-gap{transition:none}\n",".mat-form-field-appearance-standard .mat-form-field-flex{padding-top:.75em}.mat-form-field-appearance-standard .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-standard .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}.cdk-high-contrast-active .mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-standard:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-standard._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}\n"],encapsulation:2,data:{animation:[ru.transitionMessages]},changeDetection:0}),t})(),yu=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Et,Sa,Ci],Sa]}),t})();const wu=Ai({passive:!0});let xu=(()=>{class t{constructor(t,e){this._platform=t,this._ngZone=e,this._monitoredElements=new Map}monitor(t){if(!this._platform.isBrowser)return qe;const e=si(t),i=this._monitoredElements.get(e);if(i)return i.subject;const n=new _e.a,r="cdk-text-field-autofilled",s=t=>{"cdk-text-field-autofill-start"!==t.animationName||e.classList.contains(r)?"cdk-text-field-autofill-end"===t.animationName&&e.classList.contains(r)&&(e.classList.remove(r),this._ngZone.run(()=>n.next({target:t.target,isAutofilled:!1}))):(e.classList.add(r),this._ngZone.run(()=>n.next({target:t.target,isAutofilled:!0})))};return this._ngZone.runOutsideAngular(()=>{e.addEventListener("animationstart",s,wu),e.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(e,{subject:n,unlisten:()=>{e.removeEventListener("animationstart",s,wu)}}),n}stopMonitoring(t){const e=si(t),i=this._monitoredElements.get(e);i&&(i.unlisten(),i.subject.complete(),e.classList.remove("cdk-text-field-autofill-monitored"),e.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(e))}ngOnDestroy(){this._monitoredElements.forEach((t,e)=>this.stopMonitoring(e))}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(ci),r.Zb(r.B))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(ci),Object(r.Zb)(r.B))},token:t,providedIn:"root"}),t})(),Cu=(()=>{class t{constructor(t,e,i,n){this._elementRef=t,this._platform=e,this._ngZone=i,this._destroyed=new _e.a,this._enabled=!0,this._previousMinRows=-1,this._document=n,this._textareaElement=this._elementRef.nativeElement,this._measuringClass=e.FIREFOX?"cdk-textarea-autosize-measuring-firefox":"cdk-textarea-autosize-measuring"}get minRows(){return this._minRows}set minRows(t){this._minRows=ei(t),this._setMinHeight()}get maxRows(){return this._maxRows}set maxRows(t){this._maxRows=ei(t),this._setMaxHeight()}get enabled(){return this._enabled}set enabled(t){t=ti(t),this._enabled!==t&&((this._enabled=t)?this.resizeToFitContent(!0):this.reset())}_setMinHeight(){const t=this.minRows&&this._cachedLineHeight?this.minRows*this._cachedLineHeight+"px":null;t&&(this._textareaElement.style.minHeight=t)}_setMaxHeight(){const t=this.maxRows&&this._cachedLineHeight?this.maxRows*this._cachedLineHeight+"px":null;t&&(this._textareaElement.style.maxHeight=t)}ngAfterViewInit(){this._platform.isBrowser&&(this._initialHeight=this._textareaElement.style.height,this.resizeToFitContent(),this._ngZone.runOutsideAngular(()=>{en(this._getWindow(),"resize").pipe(Cn(16),Sn(this._destroyed)).subscribe(()=>this.resizeToFitContent(!0))}))}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_cacheTextareaLineHeight(){if(this._cachedLineHeight)return;let t=this._textareaElement.cloneNode(!1);t.rows=1,t.style.position="absolute",t.style.visibility="hidden",t.style.border="none",t.style.padding="0",t.style.height="",t.style.minHeight="",t.style.maxHeight="",t.style.overflow="hidden",this._textareaElement.parentNode.appendChild(t),this._cachedLineHeight=t.clientHeight,this._textareaElement.parentNode.removeChild(t),this._setMinHeight(),this._setMaxHeight()}ngDoCheck(){this._platform.isBrowser&&this.resizeToFitContent()}resizeToFitContent(t=!1){if(!this._enabled)return;if(this._cacheTextareaLineHeight(),!this._cachedLineHeight)return;const e=this._elementRef.nativeElement,i=e.value;if(!t&&this._minRows===this._previousMinRows&&i===this._previousValue)return;const n=e.placeholder;e.classList.add(this._measuringClass),e.placeholder="",e.style.height=e.scrollHeight-4+"px",e.classList.remove(this._measuringClass),e.placeholder=n,this._ngZone.runOutsideAngular(()=>{"undefined"!=typeof requestAnimationFrame?requestAnimationFrame(()=>this._scrollToCaretPosition(e)):setTimeout(()=>this._scrollToCaretPosition(e))}),this._previousValue=i,this._previousMinRows=this._minRows}reset(){void 0!==this._initialHeight&&(this._textareaElement.style.height=this._initialHeight)}_noopInputHandler(){}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_scrollToCaretPosition(t){const{selectionStart:e,selectionEnd:i}=t,n=this._getDocument();this._destroyed.isStopped||n.activeElement!==t||t.setSelectionRange(e,i)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(ci),r.Pb(r.B),r.Pb(a,8))},t.\u0275dir=r.Kb({type:t,selectors:[["textarea","cdkTextareaAutosize",""]],hostAttrs:["rows","1",1,"cdk-textarea-autosize"],hostBindings:function(t,e){1&t&&r.cc("input",function(){return e._noopInputHandler()})},inputs:{minRows:["cdkAutosizeMinRows","minRows"],maxRows:["cdkAutosizeMaxRows","maxRows"],enabled:["cdkTextareaAutosize","enabled"]},exportAs:["cdkTextareaAutosize"]}),t})(),Su=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[hi]]}),t})();const ku=new r.s("MAT_INPUT_VALUE_ACCESSOR"),Eu=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let Du=0;class Iu{constructor(t,e,i,n){this._defaultErrorStateMatcher=t,this._parentForm=e,this._parentFormGroup=i,this.ngControl=n}}const Pu=Pa(Iu);let Ou=(()=>{class t extends Pu{constructor(t,e,i,n,r,s,o,a,l,c){super(s,n,r,i),this._elementRef=t,this._platform=e,this.ngControl=i,this._autofillMonitor=a,this._formField=c,this._uid="mat-input-"+Du++,this.focused=!1,this.stateChanges=new _e.a,this.controlType="mat-input",this.autofilled=!1,this._disabled=!1,this._required=!1,this._type="text",this._readonly=!1,this._neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(t=>di().has(t));const h=this._elementRef.nativeElement,u=h.nodeName.toLowerCase();this._inputValueAccessor=o||h,this._previousNativeValue=this.value,this.id=this.id,e.IOS&&l.runOutsideAngular(()=>{t.nativeElement.addEventListener("keyup",t=>{let e=t.target;e.value||e.selectionStart||e.selectionEnd||(e.setSelectionRange(1,1),e.setSelectionRange(0,0))})}),this._isServer=!this._platform.isBrowser,this._isNativeSelect="select"===u,this._isTextarea="textarea"===u,this._isNativeSelect&&(this.controlType=h.multiple?"mat-native-select-multiple":"mat-native-select")}get disabled(){return this.ngControl&&null!==this.ngControl.disabled?this.ngControl.disabled:this._disabled}set disabled(t){this._disabled=ti(t),this.focused&&(this.focused=!1,this.stateChanges.next())}get id(){return this._id}set id(t){this._id=t||this._uid}get required(){return this._required}set required(t){this._required=ti(t)}get type(){return this._type}set type(t){this._type=t||"text",this._validateType(),!this._isTextarea&&di().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}get value(){return this._inputValueAccessor.value}set value(t){t!==this.value&&(this._inputValueAccessor.value=t,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(t){this._readonly=ti(t)}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(t=>{this.autofilled=t.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement)}ngDoCheck(){this.ngControl&&this.updateErrorState(),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(t){this._elementRef.nativeElement.focus(t)}_focusChanged(t){t===this.focused||this.readonly&&t||(this.focused=t,this.stateChanges.next())}_onInput(){}_dirtyCheckPlaceholder(){var t,e;const i=(null===(e=null===(t=this._formField)||void 0===t?void 0:t._hideControlPlaceholder)||void 0===e?void 0:e.call(t))?null:this.placeholder;if(i!==this._previousPlaceholder){const t=this._elementRef.nativeElement;this._previousPlaceholder=i,i?t.setAttribute("placeholder",i):t.removeAttribute("placeholder")}}_dirtyCheckNativeValue(){const t=this._elementRef.nativeElement.value;this._previousNativeValue!==t&&(this._previousNativeValue=t,this.stateChanges.next())}_validateType(){Eu.indexOf(this._type)}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let t=this._elementRef.nativeElement.validity;return t&&t.badInput}get empty(){return!(this._isNeverEmpty()||this._elementRef.nativeElement.value||this._isBadInput()||this.autofilled)}get shouldLabelFloat(){if(this._isNativeSelect){const t=this._elementRef.nativeElement,e=t.options[0];return this.focused||t.multiple||!this.empty||!!(t.selectedIndex>-1&&e&&e.label)}return this.focused||!this.empty}setDescribedByIds(t){t.length?this._elementRef.nativeElement.setAttribute("aria-describedby",t.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(ci),r.Pb(Tc,10),r.Pb(oh,8),r.Pb(_h,8),r.Pb($a),r.Pb(ku,10),r.Pb(xu),r.Pb(r.B),r.Pb(vu,8))},t.\u0275dir=r.Kb({type:t,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-input-element","mat-form-field-autofill-control"],hostVars:9,hostBindings:function(t,e){1&t&&r.cc("focus",function(){return e._focusChanged(!0)})("blur",function(){return e._focusChanged(!1)})("input",function(){return e._onInput()}),2&t&&(r.Yb("disabled",e.disabled)("required",e.required),r.Eb("id",e.id)("data-placeholder",e.placeholder)("readonly",e.readonly&&!e._isNativeSelect||null)("aria-invalid",e.errorState&&!e.empty)("aria-required",e.required),r.Hb("mat-input-server",e._isServer))},inputs:{id:"id",disabled:"disabled",required:"required",type:"type",value:"value",readonly:"readonly",placeholder:"placeholder",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"]},exportAs:["matInput"],features:[r.Cb([{provide:su,useExisting:t}]),r.Ab,r.Bb]}),t})(),Mu=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[$a],imports:[[Su,yu,Sa],Su,yu]}),t})();const Tu=["mat-calendar-body",""];function Ru(t,e){if(1&t&&(r.Vb(0,"tr",2),r.Vb(1,"td",3),r.Kc(2),r.Ub(),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Fc("padding-top",t._cellPadding)("padding-bottom",t._cellPadding),r.Eb("colspan",t.numCols),r.Db(1),r.Mc(" ",t.label," ")}}function Vu(t,e){if(1&t&&(r.Vb(0,"td",7),r.Kc(1),r.Ub()),2&t){const t=r.gc(2);r.Fc("padding-top",t._cellPadding)("padding-bottom",t._cellPadding),r.Eb("colspan",t._firstRowOffset),r.Db(1),r.Mc(" ",t._firstRowOffset>=t.labelMinRequiredCells?t.label:""," ")}}function Fu(t,e){if(1&t){const t=r.Wb();r.Vb(0,"td",8),r.cc("click",function(i){r.Ac(t);const n=e.$implicit;return r.gc(2)._cellClicked(n,i)}),r.Vb(1,"div",9),r.Kc(2),r.Ub(),r.Qb(3,"div",10),r.Ub()}if(2&t){const t=e.$implicit,i=e.index,n=r.gc().index,s=r.gc();r.Fc("width",s._cellWidth)("padding-top",s._cellPadding)("padding-bottom",s._cellPadding),r.Hb("mat-calendar-body-disabled",!t.enabled)("mat-calendar-body-active",s._isActiveCell(n,i))("mat-calendar-body-range-start",s._isRangeStart(t.compareValue))("mat-calendar-body-range-end",s._isRangeEnd(t.compareValue))("mat-calendar-body-in-range",s._isInRange(t.compareValue))("mat-calendar-body-comparison-bridge-start",s._isComparisonBridgeStart(t.compareValue,n,i))("mat-calendar-body-comparison-bridge-end",s._isComparisonBridgeEnd(t.compareValue,n,i))("mat-calendar-body-comparison-start",s._isComparisonStart(t.compareValue))("mat-calendar-body-comparison-end",s._isComparisonEnd(t.compareValue))("mat-calendar-body-in-comparison-range",s._isInComparisonRange(t.compareValue))("mat-calendar-body-preview-start",s._isPreviewStart(t.compareValue))("mat-calendar-body-preview-end",s._isPreviewEnd(t.compareValue))("mat-calendar-body-in-preview",s._isInPreview(t.compareValue)),r.nc("ngClass",t.cssClasses)("tabindex",s._isActiveCell(n,i)?0:-1),r.Eb("data-mat-row",n)("data-mat-col",i)("aria-label",t.ariaLabel)("aria-disabled",!t.enabled||null)("aria-selected",s._isSelected(t.compareValue)),r.Db(1),r.Hb("mat-calendar-body-selected",s._isSelected(t.compareValue))("mat-calendar-body-comparison-identical",s._isComparisonIdentical(t.compareValue))("mat-calendar-body-today",s.todayValue===t.compareValue),r.Db(1),r.Mc(" ",t.displayValue," ")}}function Lu(t,e){if(1&t&&(r.Vb(0,"tr",4),r.Ic(1,Vu,2,6,"td",5),r.Ic(2,Fu,4,46,"td",6),r.Ub()),2&t){const t=e.$implicit,i=e.index,n=r.gc();r.Db(1),r.nc("ngIf",0===i&&n._firstRowOffset),r.Db(1),r.nc("ngForOf",t)}}function Uu(t,e){if(1&t&&(r.Vb(0,"th",5),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.Eb("aria-label",t.long),r.Db(1),r.Lc(t.narrow)}}const Bu=["*"];function Nu(t,e){}function ju(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-month-view",5),r.cc("activeDateChange",function(e){return r.Ac(t),r.gc().activeDate=e})("_userSelection",function(e){return r.Ac(t),r.gc()._dateSelected(e)}),r.Ub()}if(2&t){const t=r.gc();r.nc("activeDate",t.activeDate)("selected",t.selected)("dateFilter",t.dateFilter)("maxDate",t.maxDate)("minDate",t.minDate)("dateClass",t.dateClass)("comparisonStart",t.comparisonStart)("comparisonEnd",t.comparisonEnd)}}function zu(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-year-view",6),r.cc("activeDateChange",function(e){return r.Ac(t),r.gc().activeDate=e})("monthSelected",function(e){return r.Ac(t),r.gc()._monthSelectedInYearView(e)})("selectedChange",function(e){return r.Ac(t),r.gc()._goToDateInView(e,"month")}),r.Ub()}if(2&t){const t=r.gc();r.nc("activeDate",t.activeDate)("selected",t.selected)("dateFilter",t.dateFilter)("maxDate",t.maxDate)("minDate",t.minDate)("dateClass",t.dateClass)}}function Hu(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-multi-year-view",7),r.cc("activeDateChange",function(e){return r.Ac(t),r.gc().activeDate=e})("yearSelected",function(e){return r.Ac(t),r.gc()._yearSelectedInMultiYearView(e)})("selectedChange",function(e){return r.Ac(t),r.gc()._goToDateInView(e,"year")}),r.Ub()}if(2&t){const t=r.gc();r.nc("activeDate",t.activeDate)("selected",t.selected)("dateFilter",t.dateFilter)("maxDate",t.maxDate)("minDate",t.minDate)("dateClass",t.dateClass)}}function Ku(t,e){}const $u=["button"];function Gu(t,e){1&t&&(r.fc(),r.Vb(0,"svg",3),r.Qb(1,"path",4),r.Ub())}const Wu=[[["","matDatepickerToggleIcon",""]]],Zu=["[matDatepickerToggleIcon]"],qu=[[["input","matStartDate",""]],[["input","matEndDate",""]]],Yu=["input[matStartDate]","input[matEndDate]"];let Qu=(()=>{class t{constructor(){this.changes=new _e.a,this.calendarLabel="Calendar",this.openCalendarLabel="Open calendar",this.closeCalendarLabel="Close calendar",this.prevMonthLabel="Previous month",this.nextMonthLabel="Next month",this.prevYearLabel="Previous year",this.nextYearLabel="Next year",this.prevMultiYearLabel="Previous 20 years",this.nextMultiYearLabel="Next 20 years",this.switchToMonthViewLabel="Choose date",this.switchToMultiYearViewLabel="Choose month and year"}formatYearRange(t,e){return`${t} \u2013 ${e}`}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(r.Lb)({factory:function(){return new t},token:t,providedIn:"root"}),t})();class Xu{constructor(t,e,i,n,r={},s=t,o){this.value=t,this.displayValue=e,this.ariaLabel=i,this.enabled=n,this.cssClasses=r,this.compareValue=s,this.rawValue=o}}let Ju=(()=>{class t{constructor(t,e){this._elementRef=t,this._ngZone=e,this.numCols=7,this.activeCell=0,this.isRange=!1,this.cellAspectRatio=1,this.previewStart=null,this.previewEnd=null,this.selectedValueChange=new r.o,this.previewChange=new r.o,this._enterHandler=t=>{if(this._skipNextFocus&&"focus"===t.type)this._skipNextFocus=!1;else if(t.target&&this.isRange){const e=this._getCellFromElement(t.target);e&&this._ngZone.run(()=>this.previewChange.emit({value:e.enabled?e:null,event:t}))}},this._leaveHandler=t=>{null!==this.previewEnd&&this.isRange&&t.target&&td(t.target)&&this._ngZone.run(()=>this.previewChange.emit({value:null,event:t}))},e.runOutsideAngular(()=>{const e=t.nativeElement;e.addEventListener("mouseenter",this._enterHandler,!0),e.addEventListener("focus",this._enterHandler,!0),e.addEventListener("mouseleave",this._leaveHandler,!0),e.addEventListener("blur",this._leaveHandler,!0)})}_cellClicked(t,e){t.enabled&&this.selectedValueChange.emit({value:t.value,event:e})}_isSelected(t){return this.startValue===t||this.endValue===t}ngOnChanges(t){const e=t.numCols,{rows:i,numCols:n}=this;(t.rows||e)&&(this._firstRowOffset=i&&i.length&&i[0].length?n-i[0].length:0),(t.cellAspectRatio||e||!this._cellPadding)&&(this._cellPadding=50*this.cellAspectRatio/n+"%"),!e&&this._cellWidth||(this._cellWidth=100/n+"%")}ngOnDestroy(){const t=this._elementRef.nativeElement;t.removeEventListener("mouseenter",this._enterHandler,!0),t.removeEventListener("focus",this._enterHandler,!0),t.removeEventListener("mouseleave",this._leaveHandler,!0),t.removeEventListener("blur",this._leaveHandler,!0)}_isActiveCell(t,e){let i=t*this.numCols+e;return t&&(i-=this._firstRowOffset),i==this.activeCell}_focusActiveCell(t=!0){this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe(Qe(1)).subscribe(()=>{const e=this._elementRef.nativeElement.querySelector(".mat-calendar-body-active");e&&(t||(this._skipNextFocus=!0),e.focus())})})}_isRangeStart(t){return ed(t,this.startValue,this.endValue)}_isRangeEnd(t){return id(t,this.startValue,this.endValue)}_isInRange(t){return nd(t,this.startValue,this.endValue,this.isRange)}_isComparisonStart(t){return ed(t,this.comparisonStart,this.comparisonEnd)}_isComparisonBridgeStart(t,e,i){if(!this._isComparisonStart(t)||this._isRangeStart(t)||!this._isInRange(t))return!1;let n=this.rows[e][i-1];if(!n){const t=this.rows[e-1];n=t&&t[t.length-1]}return n&&!this._isRangeEnd(n.compareValue)}_isComparisonBridgeEnd(t,e,i){if(!this._isComparisonEnd(t)||this._isRangeEnd(t)||!this._isInRange(t))return!1;let n=this.rows[e][i+1];if(!n){const t=this.rows[e+1];n=t&&t[0]}return n&&!this._isRangeStart(n.compareValue)}_isComparisonEnd(t){return id(t,this.comparisonStart,this.comparisonEnd)}_isInComparisonRange(t){return nd(t,this.comparisonStart,this.comparisonEnd,this.isRange)}_isComparisonIdentical(t){return this.comparisonStart===this.comparisonEnd&&t===this.comparisonStart}_isPreviewStart(t){return ed(t,this.previewStart,this.previewEnd)}_isPreviewEnd(t){return id(t,this.previewStart,this.previewEnd)}_isInPreview(t){return nd(t,this.previewStart,this.previewEnd,this.isRange)}_getCellFromElement(t){let e;if(td(t)?e=t:td(t.parentNode)&&(e=t.parentNode),e){const t=e.getAttribute("data-mat-row"),i=e.getAttribute("data-mat-col");if(t&&i)return this.rows[parseInt(t)][parseInt(i)]}return null}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.B))},t.\u0275cmp=r.Jb({type:t,selectors:[["","mat-calendar-body",""]],hostAttrs:["role","grid","aria-readonly","true",1,"mat-calendar-body"],inputs:{numCols:"numCols",activeCell:"activeCell",isRange:"isRange",cellAspectRatio:"cellAspectRatio",previewStart:"previewStart",previewEnd:"previewEnd",label:"label",rows:"rows",todayValue:"todayValue",startValue:"startValue",endValue:"endValue",labelMinRequiredCells:"labelMinRequiredCells",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},outputs:{selectedValueChange:"selectedValueChange",previewChange:"previewChange"},exportAs:["matCalendarBody"],features:[r.Bb],attrs:Tu,decls:2,vars:2,consts:[["aria-hidden","true",4,"ngIf"],["role","row",4,"ngFor","ngForOf"],["aria-hidden","true"],[1,"mat-calendar-body-label"],["role","row"],["aria-hidden","true","class","mat-calendar-body-label",3,"paddingTop","paddingBottom",4,"ngIf"],["role","gridcell","class","mat-calendar-body-cell",3,"ngClass","tabindex","mat-calendar-body-disabled","mat-calendar-body-active","mat-calendar-body-range-start","mat-calendar-body-range-end","mat-calendar-body-in-range","mat-calendar-body-comparison-bridge-start","mat-calendar-body-comparison-bridge-end","mat-calendar-body-comparison-start","mat-calendar-body-comparison-end","mat-calendar-body-in-comparison-range","mat-calendar-body-preview-start","mat-calendar-body-preview-end","mat-calendar-body-in-preview","width","paddingTop","paddingBottom","click",4,"ngFor","ngForOf"],["aria-hidden","true",1,"mat-calendar-body-label"],["role","gridcell",1,"mat-calendar-body-cell",3,"ngClass","tabindex","click"],[1,"mat-calendar-body-cell-content","mat-focus-indicator"],[1,"mat-calendar-body-cell-preview"]],template:function(t,e){1&t&&(r.Ic(0,Ru,3,6,"tr",0),r.Ic(1,Lu,3,2,"tr",1)),2&t&&(r.nc("ngIf",e._firstRowOffset<e.labelMinRequiredCells),r.Db(1),r.nc("ngForOf",e.rows))},directives:[ut,ct,at],styles:['.mat-calendar-body{min-width:224px}.mat-calendar-body-label{height:0;line-height:0;text-align:left;padding-left:4.7142857143%;padding-right:4.7142857143%}.mat-calendar-body-cell{position:relative;height:0;line-height:0;text-align:center;outline:none;cursor:pointer}.mat-calendar-body-cell::before,.mat-calendar-body-cell::after,.mat-calendar-body-cell-preview{content:"";position:absolute;top:5%;left:0;z-index:0;box-sizing:border-box;height:90%;width:100%}.mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-start::after,.mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,.mat-calendar-body-comparison-start::after,.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:5%;width:95%;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,[dir=rtl] .mat-calendar-body-comparison-start::after,[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:0;border-radius:0;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,.mat-calendar-body-comparison-end::after,.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}[dir=rtl] .mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,[dir=rtl] .mat-calendar-body-comparison-end::after,[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{left:5%;border-radius:0;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-comparison-bridge-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-bridge-end.mat-calendar-body-range-start::after{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end.mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-end.mat-calendar-body-range-start::after{width:90%}.mat-calendar-body-in-preview .mat-calendar-body-cell-preview{border-top:dashed 1px;border-bottom:dashed 1px}.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:dashed 1px}[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:0;border-right:dashed 1px}.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:dashed 1px}[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:0;border-left:dashed 1px}.mat-calendar-body-disabled{cursor:default}.cdk-high-contrast-active .mat-calendar-body-disabled{opacity:.5}.mat-calendar-body-cell-content{top:5%;left:5%;z-index:1;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;line-height:1;border-width:1px;border-style:solid;border-radius:999px}.mat-calendar-body-cell-content.mat-focus-indicator{position:absolute}.cdk-high-contrast-active .mat-calendar-body-cell-content{border:none}.mat-datepicker-dialog .mat-dialog-container{position:relative;overflow:visible}.cdk-high-contrast-active .mat-datepicker-popup:not(:empty),.cdk-high-contrast-active .mat-calendar-body-selected{outline:solid 1px}.cdk-high-contrast-active .mat-calendar-body-today{outline:dotted 1px}.cdk-high-contrast-active .cdk-keyboard-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected),.cdk-high-contrast-active .cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){outline:dotted 2px}[dir=rtl] .mat-calendar-body-label{text-align:right}@media(hover: none){.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){background-color:transparent}}\n'],encapsulation:2,changeDetection:0}),t})();function td(t){return"TD"===t.nodeName}function ed(t,e,i){return null!==i&&e!==i&&t<i&&t===e}function id(t,e,i){return null!==e&&e!==i&&t>=e&&t===i}function nd(t,e,i,n){return n&&null!==e&&null!==i&&e!==i&&t>=e&&t<=i}class rd{constructor(t,e){this.start=t,this.end=e}}let sd=(()=>{class t{constructor(t,e){this.selection=t,this._adapter=e,this._selectionChanged=new _e.a,this.selectionChanged=this._selectionChanged,this.selection=t}updateSelection(t,e){this.selection=t,this._selectionChanged.next({selection:t,source:e})}ngOnDestroy(){this._selectionChanged.complete()}_isValidDateInstance(t){return this._adapter.isDateInstance(t)&&this._adapter.isValid(t)}clone(){return null}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(void 0),r.Zb(Ta))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),od=(()=>{class t extends sd{constructor(t){super(null,t)}add(t){super.updateSelection(t,this)}isValid(){return null!=this.selection&&this._isValidDateInstance(this.selection)}isComplete(){return null!=this.selection}clone(){const e=new t(this._adapter);return e.updateSelection(this.selection,this),e}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Ta))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),ad=(()=>{class t extends sd{constructor(t){super(new rd(null,null),t)}add(t){let{start:e,end:i}=this.selection;null==e?e=t:null==i?i=t:(e=t,i=null),super.updateSelection(new rd(e,i),this)}isValid(){const{start:t,end:e}=this.selection;return null==t&&null==e||(null!=t&&null!=e?this._isValidDateInstance(t)&&this._isValidDateInstance(e)&&this._adapter.compareDate(t,e)<=0:(null==t||this._isValidDateInstance(t))&&(null==e||this._isValidDateInstance(e)))}isComplete(){return null!=this.selection.start&&null!=this.selection.end}clone(){const e=new t(this._adapter);return e.updateSelection(this.selection,this),e}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Ta))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();const ld={provide:sd,deps:[[new r.C,new r.M,sd],Ta],useFactory:function(t,e){return t||new od(e)}},cd={provide:sd,deps:[[new r.C,new r.M,sd],Ta],useFactory:function(t,e){return t||new ad(e)}},hd=new r.s("MAT_DATE_RANGE_SELECTION_STRATEGY");let ud=(()=>{class t{constructor(t){this._dateAdapter=t}selectionFinished(t,e){let{start:i,end:n}=e;return null==i?i=t:null==n&&t&&this._dateAdapter.compareDate(t,i)>=0?n=t:(i=t,n=null),new rd(i,n)}createPreview(t,e){let i=null,n=null;return e.start&&!e.end&&t&&(i=e.start,n=t),new rd(i,n)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Ta))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();const dd={provide:hd,deps:[[new r.C,new r.M,hd],Ta],useFactory:function(t,e){return t||new ud(e)}};let pd=(()=>{class t{constructor(t,e,i,n,s){this._changeDetectorRef=t,this._dateFormats=e,this._dateAdapter=i,this._dir=n,this._rangeStrategy=s,this._rerenderSubscription=ye.a.EMPTY,this.selectedChange=new r.o,this._userSelection=new r.o,this.activeDateChange=new r.o,this._activeDate=this._dateAdapter.today()}get activeDate(){return this._activeDate}set activeDate(t){const e=this._activeDate,i=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(i,this.minDate,this.maxDate),this._hasSameMonthAndYear(e,this._activeDate)||this._init()}get selected(){return this._selected}set selected(t){this._selected=t instanceof rd?t:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setRanges(this._selected)}get minDate(){return this._minDate}set minDate(t){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get maxDate(){return this._maxDate}set maxDate(t){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(Pn(null)).subscribe(()=>this._init())}ngOnChanges(t){const e=t.comparisonStart||t.comparisonEnd;e&&!e.firstChange&&this._setRanges(this.selected)}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_dateSelected(t){const e=t.value,i=this._dateAdapter.getYear(this.activeDate),n=this._dateAdapter.getMonth(this.activeDate),r=this._dateAdapter.createDate(i,n,e);let s,o;this._selected instanceof rd?(s=this._getDateInCurrentMonth(this._selected.start),o=this._getDateInCurrentMonth(this._selected.end)):s=o=this._getDateInCurrentMonth(this._selected),s===e&&o===e||this.selectedChange.emit(r),this._userSelection.emit({value:r,event:t.event}),this._previewStart=this._previewEnd=null,this._changeDetectorRef.markForCheck()}_handleCalendarBodyKeydown(t){const e=this._activeDate,i=this._isRtl();switch(t.keyCode){case 37:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,i?1:-1);break;case 39:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,i?-1:1);break;case 38:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,-7);break;case 40:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,7);break;case 36:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,1-this._dateAdapter.getDate(this._activeDate));break;case 35:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,this._dateAdapter.getNumDaysInMonth(this._activeDate)-this._dateAdapter.getDate(this._activeDate));break;case 33:this.activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,-1):this._dateAdapter.addCalendarMonths(this._activeDate,-1);break;case 34:this.activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,1):this._dateAdapter.addCalendarMonths(this._activeDate,1);break;case 13:case 32:return void(this.dateFilter&&!this.dateFilter(this._activeDate)||(this._dateSelected({value:this._dateAdapter.getDate(this._activeDate),event:t}),t.preventDefault()));case 27:return void(null==this._previewEnd||ke(t)||(this._previewStart=this._previewEnd=null,this.selectedChange.emit(null),this._userSelection.emit({value:null,event:t}),t.preventDefault(),t.stopPropagation()));default:return}this._dateAdapter.compareDate(e,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),t.preventDefault()}_init(){this._setRanges(this.selected),this._todayDate=this._getCellCompareValue(this._dateAdapter.today()),this._monthLabel=this._dateFormats.display.monthLabel?this._dateAdapter.format(this.activeDate,this._dateFormats.display.monthLabel):this._dateAdapter.getMonthNames("short")[this._dateAdapter.getMonth(this.activeDate)].toLocaleUpperCase();let t=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),1);this._firstWeekOffset=(7+this._dateAdapter.getDayOfWeek(t)-this._dateAdapter.getFirstDayOfWeek())%7,this._initWeekdays(),this._createWeekCells(),this._changeDetectorRef.markForCheck()}_focusActiveCell(t){this._matCalendarBody._focusActiveCell(t)}_previewChanged({event:t,value:e}){if(this._rangeStrategy){const i=this._rangeStrategy.createPreview(e?e.rawValue:null,this.selected,t);this._previewStart=this._getCellCompareValue(i.start),this._previewEnd=this._getCellCompareValue(i.end),this._changeDetectorRef.detectChanges()}}_initWeekdays(){const t=this._dateAdapter.getFirstDayOfWeek(),e=this._dateAdapter.getDayOfWeekNames("narrow");let i=this._dateAdapter.getDayOfWeekNames("long").map((t,i)=>({long:t,narrow:e[i]}));this._weekdays=i.slice(t).concat(i.slice(0,t))}_createWeekCells(){const t=this._dateAdapter.getNumDaysInMonth(this.activeDate),e=this._dateAdapter.getDateNames();this._weeks=[[]];for(let i=0,n=this._firstWeekOffset;i<t;i++,n++){7==n&&(this._weeks.push([]),n=0);const t=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),i+1),r=this._shouldEnableDate(t),s=this._dateAdapter.format(t,this._dateFormats.display.dateA11yLabel),o=this.dateClass?this.dateClass(t,"month"):void 0;this._weeks[this._weeks.length-1].push(new Xu(i+1,e[i],s,r,o,this._getCellCompareValue(t),t))}}_shouldEnableDate(t){return!!t&&(!this.minDate||this._dateAdapter.compareDate(t,this.minDate)>=0)&&(!this.maxDate||this._dateAdapter.compareDate(t,this.maxDate)<=0)&&(!this.dateFilter||this.dateFilter(t))}_getDateInCurrentMonth(t){return t&&this._hasSameMonthAndYear(t,this.activeDate)?this._dateAdapter.getDate(t):null}_hasSameMonthAndYear(t,e){return!(!t||!e||this._dateAdapter.getMonth(t)!=this._dateAdapter.getMonth(e)||this._dateAdapter.getYear(t)!=this._dateAdapter.getYear(e))}_getCellCompareValue(t){if(t){const e=this._dateAdapter.getYear(t),i=this._dateAdapter.getMonth(t),n=this._dateAdapter.getDate(t);return new Date(e,i,n).getTime()}return null}_isRtl(){return this._dir&&"rtl"===this._dir.value}_setRanges(t){t instanceof rd?(this._rangeStart=this._getCellCompareValue(t.start),this._rangeEnd=this._getCellCompareValue(t.end),this._isRange=!0):(this._rangeStart=this._rangeEnd=this._getCellCompareValue(t),this._isRange=!1),this._comparisonRangeStart=this._getCellCompareValue(this.comparisonStart),this._comparisonRangeEnd=this._getCellCompareValue(this.comparisonEnd)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(Ra,8),r.Pb(Ta,8),r.Pb(Zn,8),r.Pb(hd,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-month-view"]],viewQuery:function(t,e){if(1&t&&r.Pc(Ju,1),2&t){let t;r.vc(t=r.dc())&&(e._matCalendarBody=t.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},outputs:{selectedChange:"selectedChange",_userSelection:"_userSelection",activeDateChange:"activeDateChange"},exportAs:["matMonthView"],features:[r.Bb],decls:7,vars:13,consts:[["role","presentation",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["scope","col",4,"ngFor","ngForOf"],["colspan","7","aria-hidden","true",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"label","rows","todayValue","startValue","endValue","comparisonStart","comparisonEnd","previewStart","previewEnd","isRange","labelMinRequiredCells","activeCell","selectedValueChange","previewChange","keydown"],["scope","col"]],template:function(t,e){1&t&&(r.Vb(0,"table",0),r.Vb(1,"thead",1),r.Vb(2,"tr"),r.Ic(3,Uu,2,2,"th",2),r.Ub(),r.Vb(4,"tr"),r.Qb(5,"th",3),r.Ub(),r.Ub(),r.Vb(6,"tbody",4),r.cc("selectedValueChange",function(t){return e._dateSelected(t)})("previewChange",function(t){return e._previewChanged(t)})("keydown",function(t){return e._handleCalendarBodyKeydown(t)}),r.Ub(),r.Ub()),2&t&&(r.Db(3),r.nc("ngForOf",e._weekdays),r.Db(3),r.nc("label",e._monthLabel)("rows",e._weeks)("todayValue",e._todayDate)("startValue",e._rangeStart)("endValue",e._rangeEnd)("comparisonStart",e._comparisonRangeStart)("comparisonEnd",e._comparisonRangeEnd)("previewStart",e._previewStart)("previewEnd",e._previewEnd)("isRange",e._isRange)("labelMinRequiredCells",3)("activeCell",e._dateAdapter.getDate(e.activeDate)-1))},directives:[ct,Ju],encapsulation:2,changeDetection:0}),t})(),fd=(()=>{class t{constructor(t,e,i){this._changeDetectorRef=t,this._dateAdapter=e,this._dir=i,this._rerenderSubscription=ye.a.EMPTY,this.selectedChange=new r.o,this.yearSelected=new r.o,this.activeDateChange=new r.o,this._activeDate=this._dateAdapter.today()}get activeDate(){return this._activeDate}set activeDate(t){let e=this._activeDate;const i=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(i,this.minDate,this.maxDate),md(this._dateAdapter,e,this._activeDate,this.minDate,this.maxDate)||this._init()}get selected(){return this._selected}set selected(t){this._selected=t instanceof rd?t:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setSelectedYear(t)}get minDate(){return this._minDate}set minDate(t){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get maxDate(){return this._maxDate}set maxDate(t){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(Pn(null)).subscribe(()=>this._init())}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_init(){this._todayYear=this._dateAdapter.getYear(this._dateAdapter.today());const t=this._dateAdapter.getYear(this._activeDate)-gd(this._dateAdapter,this.activeDate,this.minDate,this.maxDate);this._years=[];for(let e=0,i=[];e<24;e++)i.push(t+e),4==i.length&&(this._years.push(i.map(t=>this._createCellForYear(t))),i=[]);this._changeDetectorRef.markForCheck()}_yearSelected(t){const e=t.value;this.yearSelected.emit(this._dateAdapter.createDate(e,0,1));let i=this._dateAdapter.getMonth(this.activeDate),n=this._dateAdapter.getNumDaysInMonth(this._dateAdapter.createDate(e,i,1));this.selectedChange.emit(this._dateAdapter.createDate(e,i,Math.min(this._dateAdapter.getDate(this.activeDate),n)))}_handleCalendarBodyKeydown(t){const e=this._activeDate,i=this._isRtl();switch(t.keyCode){case 37:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,i?1:-1);break;case 39:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,i?-1:1);break;case 38:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-4);break;case 40:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,4);break;case 36:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-gd(this._dateAdapter,this.activeDate,this.minDate,this.maxDate));break;case 35:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,24-gd(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)-1);break;case 33:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?-240:-24);break;case 34:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?240:24);break;case 13:case 32:this._yearSelected({value:this._dateAdapter.getYear(this._activeDate),event:t});break;default:return}this._dateAdapter.compareDate(e,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),t.preventDefault()}_getActiveCell(){return gd(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)}_focusActiveCell(){this._matCalendarBody._focusActiveCell()}_createCellForYear(t){const e=this._dateAdapter.createDate(t,0,1),i=this._dateAdapter.getYearName(e),n=this.dateClass?this.dateClass(e,"multi-year"):void 0;return new Xu(t,i,i,this._shouldEnableYear(t),n)}_shouldEnableYear(t){if(null==t||this.maxDate&&t>this._dateAdapter.getYear(this.maxDate)||this.minDate&&t<this._dateAdapter.getYear(this.minDate))return!1;if(!this.dateFilter)return!0;for(let e=this._dateAdapter.createDate(t,0,1);this._dateAdapter.getYear(e)==t;e=this._dateAdapter.addCalendarDays(e,1))if(this.dateFilter(e))return!0;return!1}_isRtl(){return this._dir&&"rtl"===this._dir.value}_setSelectedYear(t){if(this._selectedYear=null,t instanceof rd){const e=t.start||t.end;e&&(this._selectedYear=this._dateAdapter.getYear(e))}else t&&(this._selectedYear=this._dateAdapter.getYear(t))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(Ta,8),r.Pb(Zn,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-multi-year-view"]],viewQuery:function(t,e){if(1&t&&r.Pc(Ju,1),2&t){let t;r.vc(t=r.dc())&&(e._matCalendarBody=t.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass"},outputs:{selectedChange:"selectedChange",yearSelected:"yearSelected",activeDateChange:"activeDateChange"},exportAs:["matMultiYearView"],decls:5,vars:7,consts:[["role","presentation",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["colspan","4",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"rows","todayValue","startValue","endValue","numCols","cellAspectRatio","activeCell","selectedValueChange","keydown"]],template:function(t,e){1&t&&(r.Vb(0,"table",0),r.Vb(1,"thead",1),r.Vb(2,"tr"),r.Qb(3,"th",2),r.Ub(),r.Ub(),r.Vb(4,"tbody",3),r.cc("selectedValueChange",function(t){return e._yearSelected(t)})("keydown",function(t){return e._handleCalendarBodyKeydown(t)}),r.Ub(),r.Ub()),2&t&&(r.Db(4),r.nc("rows",e._years)("todayValue",e._todayYear)("startValue",e._selectedYear)("endValue",e._selectedYear)("numCols",4)("cellAspectRatio",4/7)("activeCell",e._getActiveCell()))},directives:[Ju],encapsulation:2,changeDetection:0}),t})();function md(t,e,i,n,r){const s=t.getYear(e),o=t.getYear(i),a=Ad(t,n,r);return Math.floor((s-a)/24)===Math.floor((o-a)/24)}function gd(t,e,i,n){return((t.getYear(e)-Ad(t,i,n))%24+24)%24}function Ad(t,e,i){let n=0;return i?n=t.getYear(i)-24+1:e&&(n=t.getYear(e)),n}let bd=(()=>{class t{constructor(t,e,i,n){this._changeDetectorRef=t,this._dateFormats=e,this._dateAdapter=i,this._dir=n,this._rerenderSubscription=ye.a.EMPTY,this.selectedChange=new r.o,this.monthSelected=new r.o,this.activeDateChange=new r.o,this._activeDate=this._dateAdapter.today()}get activeDate(){return this._activeDate}set activeDate(t){let e=this._activeDate;const i=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(i,this.minDate,this.maxDate),this._dateAdapter.getYear(e)!==this._dateAdapter.getYear(this._activeDate)&&this._init()}get selected(){return this._selected}set selected(t){this._selected=t instanceof rd?t:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setSelectedMonth(t)}get minDate(){return this._minDate}set minDate(t){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get maxDate(){return this._maxDate}set maxDate(t){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(Pn(null)).subscribe(()=>this._init())}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_monthSelected(t){const e=t.value,i=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),e,1);this.monthSelected.emit(i);const n=this._dateAdapter.getNumDaysInMonth(i);this.selectedChange.emit(this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),e,Math.min(this._dateAdapter.getDate(this.activeDate),n)))}_handleCalendarBodyKeydown(t){const e=this._activeDate,i=this._isRtl();switch(t.keyCode){case 37:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,i?1:-1);break;case 39:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,i?-1:1);break;case 38:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-4);break;case 40:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,4);break;case 36:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-this._dateAdapter.getMonth(this._activeDate));break;case 35:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,11-this._dateAdapter.getMonth(this._activeDate));break;case 33:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?-10:-1);break;case 34:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?10:1);break;case 13:case 32:this._monthSelected({value:this._dateAdapter.getMonth(this._activeDate),event:t});break;default:return}this._dateAdapter.compareDate(e,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),t.preventDefault()}_init(){this._setSelectedMonth(this.selected),this._todayMonth=this._getMonthInCurrentYear(this._dateAdapter.today()),this._yearLabel=this._dateAdapter.getYearName(this.activeDate);let t=this._dateAdapter.getMonthNames("short");this._months=[[0,1,2,3],[4,5,6,7],[8,9,10,11]].map(e=>e.map(e=>this._createCellForMonth(e,t[e]))),this._changeDetectorRef.markForCheck()}_focusActiveCell(){this._matCalendarBody._focusActiveCell()}_getMonthInCurrentYear(t){return t&&this._dateAdapter.getYear(t)==this._dateAdapter.getYear(this.activeDate)?this._dateAdapter.getMonth(t):null}_createCellForMonth(t,e){const i=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),t,1),n=this._dateAdapter.format(i,this._dateFormats.display.monthYearA11yLabel),r=this.dateClass?this.dateClass(i,"year"):void 0;return new Xu(t,e.toLocaleUpperCase(),n,this._shouldEnableMonth(t),r)}_shouldEnableMonth(t){const e=this._dateAdapter.getYear(this.activeDate);if(null==t||this._isYearAndMonthAfterMaxDate(e,t)||this._isYearAndMonthBeforeMinDate(e,t))return!1;if(!this.dateFilter)return!0;for(let i=this._dateAdapter.createDate(e,t,1);this._dateAdapter.getMonth(i)==t;i=this._dateAdapter.addCalendarDays(i,1))if(this.dateFilter(i))return!0;return!1}_isYearAndMonthAfterMaxDate(t,e){if(this.maxDate){const i=this._dateAdapter.getYear(this.maxDate),n=this._dateAdapter.getMonth(this.maxDate);return t>i||t===i&&e>n}return!1}_isYearAndMonthBeforeMinDate(t,e){if(this.minDate){const i=this._dateAdapter.getYear(this.minDate),n=this._dateAdapter.getMonth(this.minDate);return t<i||t===i&&e<n}return!1}_isRtl(){return this._dir&&"rtl"===this._dir.value}_setSelectedMonth(t){this._selectedMonth=t instanceof rd?this._getMonthInCurrentYear(t.start)||this._getMonthInCurrentYear(t.end):this._getMonthInCurrentYear(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(Ra,8),r.Pb(Ta,8),r.Pb(Zn,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-year-view"]],viewQuery:function(t,e){if(1&t&&r.Pc(Ju,1),2&t){let t;r.vc(t=r.dc())&&(e._matCalendarBody=t.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass"},outputs:{selectedChange:"selectedChange",monthSelected:"monthSelected",activeDateChange:"activeDateChange"},exportAs:["matYearView"],decls:5,vars:9,consts:[["role","presentation",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["colspan","4",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"label","rows","todayValue","startValue","endValue","labelMinRequiredCells","numCols","cellAspectRatio","activeCell","selectedValueChange","keydown"]],template:function(t,e){1&t&&(r.Vb(0,"table",0),r.Vb(1,"thead",1),r.Vb(2,"tr"),r.Qb(3,"th",2),r.Ub(),r.Ub(),r.Vb(4,"tbody",3),r.cc("selectedValueChange",function(t){return e._monthSelected(t)})("keydown",function(t){return e._handleCalendarBodyKeydown(t)}),r.Ub(),r.Ub()),2&t&&(r.Db(4),r.nc("label",e._yearLabel)("rows",e._months)("todayValue",e._todayMonth)("startValue",e._selectedMonth)("endValue",e._selectedMonth)("labelMinRequiredCells",2)("numCols",4)("cellAspectRatio",4/7)("activeCell",e._dateAdapter.getMonth(e.activeDate)))},directives:[Ju],encapsulation:2,changeDetection:0}),t})(),vd=0,_d=(()=>{class t{constructor(t,e,i,n,r){this._intl=t,this.calendar=e,this._dateAdapter=i,this._dateFormats=n,this._buttonDescriptionId="mat-calendar-button-"+vd++,this.calendar.stateChanges.subscribe(()=>r.markForCheck())}get periodButtonText(){if("month"==this.calendar.currentView)return this._dateAdapter.format(this.calendar.activeDate,this._dateFormats.display.monthYearLabel).toLocaleUpperCase();if("year"==this.calendar.currentView)return this._dateAdapter.getYearName(this.calendar.activeDate);const t=this._dateAdapter.getYear(this.calendar.activeDate)-gd(this._dateAdapter,this.calendar.activeDate,this.calendar.minDate,this.calendar.maxDate),e=t+24-1,i=this._dateAdapter.getYearName(this._dateAdapter.createDate(t,0,1)),n=this._dateAdapter.getYearName(this._dateAdapter.createDate(e,0,1));return this._intl.formatYearRange(i,n)}get periodButtonLabel(){return"month"==this.calendar.currentView?this._intl.switchToMultiYearViewLabel:this._intl.switchToMonthViewLabel}get prevButtonLabel(){return{month:this._intl.prevMonthLabel,year:this._intl.prevYearLabel,"multi-year":this._intl.prevMultiYearLabel}[this.calendar.currentView]}get nextButtonLabel(){return{month:this._intl.nextMonthLabel,year:this._intl.nextYearLabel,"multi-year":this._intl.nextMultiYearLabel}[this.calendar.currentView]}currentPeriodClicked(){this.calendar.currentView="month"==this.calendar.currentView?"multi-year":"month"}previousClicked(){this.calendar.activeDate="month"==this.calendar.currentView?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,-1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,"year"==this.calendar.currentView?-1:-24)}nextClicked(){this.calendar.activeDate="month"==this.calendar.currentView?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,"year"==this.calendar.currentView?1:24)}previousEnabled(){return!this.calendar.minDate||!this.calendar.minDate||!this._isSameView(this.calendar.activeDate,this.calendar.minDate)}nextEnabled(){return!this.calendar.maxDate||!this._isSameView(this.calendar.activeDate,this.calendar.maxDate)}_isSameView(t,e){return"month"==this.calendar.currentView?this._dateAdapter.getYear(t)==this._dateAdapter.getYear(e)&&this._dateAdapter.getMonth(t)==this._dateAdapter.getMonth(e):"year"==this.calendar.currentView?this._dateAdapter.getYear(t)==this._dateAdapter.getYear(e):md(this._dateAdapter,t,e,this.calendar.minDate,this.calendar.maxDate)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Qu),r.Pb(Object(r.W)(()=>yd)),r.Pb(Ta,8),r.Pb(Ra,8),r.Pb(r.h))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-calendar-header"]],exportAs:["matCalendarHeader"],ngContentSelectors:Bu,decls:10,vars:10,consts:[[1,"mat-calendar-header"],[1,"mat-calendar-controls"],["mat-button","","type","button","cdkAriaLive","polite",1,"mat-calendar-period-button",3,"click"],[1,"mat-calendar-arrow"],[1,"mat-calendar-spacer"],["mat-icon-button","","type","button",1,"mat-calendar-previous-button",3,"disabled","click"],["mat-icon-button","","type","button",1,"mat-calendar-next-button",3,"disabled","click"]],template:function(t,e){1&t&&(r.mc(),r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"button",2),r.cc("click",function(){return e.currentPeriodClicked()}),r.Vb(3,"span"),r.Kc(4),r.Ub(),r.Qb(5,"div",3),r.Ub(),r.Qb(6,"div",4),r.lc(7),r.Vb(8,"button",5),r.cc("click",function(){return e.previousClicked()}),r.Ub(),r.Vb(9,"button",6),r.cc("click",function(){return e.nextClicked()}),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(2),r.Eb("aria-label",e.periodButtonLabel)("aria-describedby",e._buttonDescriptionId),r.Db(1),r.Eb("id",e._buttonDescriptionId),r.Db(1),r.Lc(e.periodButtonText),r.Db(1),r.Hb("mat-calendar-invert","month"!==e.calendar.currentView),r.Db(3),r.nc("disabled",!e.previousEnabled()),r.Eb("aria-label",e.prevButtonLabel),r.Db(1),r.nc("disabled",!e.nextEnabled()),r.Eb("aria-label",e.nextButtonLabel))},directives:[Dl,Ki],encapsulation:2,changeDetection:0}),t})(),yd=(()=>{class t{constructor(t,e,i,n){this._dateAdapter=e,this._dateFormats=i,this._changeDetectorRef=n,this._moveFocusOnNextTick=!1,this.startView="month",this.selectedChange=new r.o,this.yearSelected=new r.o,this.monthSelected=new r.o,this.viewChanged=new r.o(!0),this._userSelection=new r.o,this.stateChanges=new _e.a,this._intlChanges=t.changes.subscribe(()=>{n.markForCheck(),this.stateChanges.next()})}get startAt(){return this._startAt}set startAt(t){this._startAt=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get selected(){return this._selected}set selected(t){this._selected=t instanceof rd?t:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get minDate(){return this._minDate}set minDate(t){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get maxDate(){return this._maxDate}set maxDate(t){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get activeDate(){return this._clampedActiveDate}set activeDate(t){this._clampedActiveDate=this._dateAdapter.clampDate(t,this.minDate,this.maxDate),this.stateChanges.next(),this._changeDetectorRef.markForCheck()}get currentView(){return this._currentView}set currentView(t){const e=this._currentView!==t?t:null;this._currentView=t,this._moveFocusOnNextTick=!0,this._changeDetectorRef.markForCheck(),e&&this.viewChanged.emit(e)}ngAfterContentInit(){this._calendarHeaderPortal=new pe(this.headerComponent||_d),this.activeDate=this.startAt||this._dateAdapter.today(),this._currentView=this.startView}ngAfterViewChecked(){this._moveFocusOnNextTick&&(this._moveFocusOnNextTick=!1,this.focusActiveCell())}ngOnDestroy(){this._intlChanges.unsubscribe(),this.stateChanges.complete()}ngOnChanges(t){const e=t.minDate||t.maxDate||t.dateFilter;if(e&&!e.firstChange){const t=this._getCurrentViewComponent();t&&(this._changeDetectorRef.detectChanges(),t._init())}this.stateChanges.next()}focusActiveCell(){this._getCurrentViewComponent()._focusActiveCell(!1)}updateTodaysDate(){const t=this.currentView;let e;e="month"===t?this.monthView:"year"===t?this.yearView:this.multiYearView,e._init()}_dateSelected(t){const e=t.value;(this.selected instanceof rd||e&&!this._dateAdapter.sameDate(e,this.selected))&&this.selectedChange.emit(e),this._userSelection.emit(t)}_yearSelectedInMultiYearView(t){this.yearSelected.emit(t)}_monthSelectedInYearView(t){this.monthSelected.emit(t)}_goToDateInView(t,e){this.activeDate=t,this.currentView=e}_getCurrentViewComponent(){return this.monthView||this.yearView||this.multiYearView}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Qu),r.Pb(Ta,8),r.Pb(Ra,8),r.Pb(r.h))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-calendar"]],viewQuery:function(t,e){if(1&t&&(r.Pc(pd,1),r.Pc(bd,1),r.Pc(fd,1)),2&t){let t;r.vc(t=r.dc())&&(e.monthView=t.first),r.vc(t=r.dc())&&(e.yearView=t.first),r.vc(t=r.dc())&&(e.multiYearView=t.first)}},hostAttrs:[1,"mat-calendar"],inputs:{startView:"startView",startAt:"startAt",selected:"selected",minDate:"minDate",maxDate:"maxDate",headerComponent:"headerComponent",dateFilter:"dateFilter",dateClass:"dateClass",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},outputs:{selectedChange:"selectedChange",yearSelected:"yearSelected",monthSelected:"monthSelected",viewChanged:"viewChanged",_userSelection:"_userSelection"},exportAs:["matCalendar"],features:[r.Cb([ld]),r.Bb],decls:5,vars:5,consts:[[3,"cdkPortalOutlet"],["cdkMonitorSubtreeFocus","","tabindex","-1",1,"mat-calendar-content",3,"ngSwitch"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","comparisonStart","comparisonEnd","activeDateChange","_userSelection",4,"ngSwitchCase"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","monthSelected","selectedChange",4,"ngSwitchCase"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","yearSelected","selectedChange",4,"ngSwitchCase"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","comparisonStart","comparisonEnd","activeDateChange","_userSelection"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","monthSelected","selectedChange"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","yearSelected","selectedChange"]],template:function(t,e){1&t&&(r.Ic(0,Nu,0,0,"ng-template",0),r.Vb(1,"div",1),r.Ic(2,ju,1,8,"mat-month-view",2),r.Ic(3,zu,1,6,"mat-year-view",3),r.Ic(4,Hu,1,6,"mat-multi-year-view",4),r.Ub()),2&t&&(r.nc("cdkPortalOutlet",e._calendarHeaderPortal),r.Db(1),r.nc("ngSwitch",e.currentView),r.Db(1),r.nc("ngSwitchCase","month"),r.Db(1),r.nc("ngSwitchCase","year"),r.Db(1),r.nc("ngSwitchCase","multi-year"))},directives:[be,Qi,mt,gt,pd,bd,fd],styles:['.mat-calendar{display:block}.mat-calendar-header{padding:8px 8px 0 8px}.mat-calendar-content{padding:0 8px 8px 8px;outline:none}.mat-calendar-controls{display:flex;margin:5% calc(33% / 7 - 16px)}.mat-calendar-controls .mat-icon-button:hover .mat-button-focus-overlay{opacity:.04}.mat-calendar-spacer{flex:1 1 auto}.mat-calendar-period-button{min-width:0}.mat-calendar-arrow{display:inline-block;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top-width:5px;border-top-style:solid;margin:0 0 0 5px;vertical-align:middle}.mat-calendar-arrow.mat-calendar-invert{transform:rotate(180deg)}[dir=rtl] .mat-calendar-arrow{margin:0 5px 0 0}.mat-calendar-previous-button,.mat-calendar-next-button{position:relative}.mat-calendar-previous-button::after,.mat-calendar-next-button::after{top:0;left:0;right:0;bottom:0;position:absolute;content:"";margin:15.5px;border:0 solid currentColor;border-top-width:2px}[dir=rtl] .mat-calendar-previous-button,[dir=rtl] .mat-calendar-next-button{transform:rotate(180deg)}.mat-calendar-previous-button::after{border-left-width:2px;transform:translateX(2px) rotate(-45deg)}.mat-calendar-next-button::after{border-right-width:2px;transform:translateX(-2px) rotate(45deg)}.mat-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.mat-calendar-table-header th{text-align:center;padding:0 0 8px 0}.mat-calendar-table-header-divider{position:relative;height:1px}.mat-calendar-table-header-divider::after{content:"";position:absolute;top:0;left:-8px;right:-8px;height:1px}\n'],encapsulation:2,changeDetection:0}),t})();const wd={transformPanel:$r("transformPanel",[qr("void",Zr({opacity:0,transform:"scale(1, 0.8)"})),Qr("void => enter",Gr("120ms cubic-bezier(0, 0, 0.2, 1)",Zr({opacity:1,transform:"scale(1, 1)"}))),Qr("* => void",Gr("100ms linear",Zr({opacity:0})))]),fadeInCalendar:$r("fadeInCalendar",[qr("void",Zr({opacity:0})),qr("enter",Zr({opacity:1})),Qr("void => *",Gr("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])};let xd=0;const Cd=new r.s("mat-datepicker-scroll-strategy"),Sd={provide:Cd,deps:[Fr],useFactory:function(t){return()=>t.scrollStrategies.reposition()}};class kd{constructor(t){this._elementRef=t}}const Ed=Ea(kd);let Dd=(()=>{class t extends Ed{constructor(t,e,i,n,r,s){super(t),this._changeDetectorRef=e,this._globalModel=i,this._dateAdapter=n,this._rangeSelectionStrategy=r,this._subscriptions=new ye.a,this._animationState="enter",this._animationDone=new _e.a,this._actionsPortal=null,this._closeButtonText=(null==s?void 0:s.closeCalendarLabel)||"Close calendar"}ngOnInit(){this._model=this._actionsPortal?this._globalModel.clone():this._globalModel}ngAfterViewInit(){this._subscriptions.add(this.datepicker.stateChanges.subscribe(()=>{this._changeDetectorRef.markForCheck()})),this._calendar.focusActiveCell()}ngOnDestroy(){this._subscriptions.unsubscribe(),this._animationDone.complete()}_handleUserSelection(t){const e=this._model.selection,i=t.value,n=e instanceof rd;if(n&&this._rangeSelectionStrategy){const n=this._rangeSelectionStrategy.selectionFinished(i,e,t.event);this._model.updateSelection(n,this)}else!i||!n&&this._dateAdapter.sameDate(i,e)||this._model.add(i);this._model&&!this._model.isComplete()||this._actionsPortal||this.datepicker.close()}_startExitAnimation(){this._animationState="void",this._changeDetectorRef.markForCheck()}_getSelected(){return this._model.selection}_applyPendingSelection(){this._model!==this._globalModel&&this._globalModel.updateSelection(this._model.selection,this)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.h),r.Pb(sd),r.Pb(Ta),r.Pb(hd,8),r.Pb(Qu))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-datepicker-content"]],viewQuery:function(t,e){if(1&t&&r.Pc(yd,1),2&t){let t;r.vc(t=r.dc())&&(e._calendar=t.first)}},hostAttrs:[1,"mat-datepicker-content"],hostVars:3,hostBindings:function(t,e){1&t&&r.Gc("@transformPanel.done",function(){return e._animationDone.next()}),2&t&&(r.Hc("@transformPanel",e._animationState),r.Hb("mat-datepicker-content-touch",e.datepicker.touchUi))},inputs:{color:"color"},exportAs:["matDatepickerContent"],features:[r.Ab],decls:5,vars:20,consts:[["cdkTrapFocus","",1,"mat-datepicker-content-container"],[3,"id","ngClass","startAt","startView","minDate","maxDate","dateFilter","headerComponent","selected","dateClass","comparisonStart","comparisonEnd","yearSelected","monthSelected","viewChanged","_userSelection"],[3,"cdkPortalOutlet"],["type","button","mat-raised-button","",1,"mat-datepicker-close-button",3,"color","focus","blur","click"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"mat-calendar",1),r.cc("yearSelected",function(t){return e.datepicker._selectYear(t)})("monthSelected",function(t){return e.datepicker._selectMonth(t)})("viewChanged",function(t){return e.datepicker._viewChanged(t)})("_userSelection",function(t){return e._handleUserSelection(t)}),r.Ub(),r.Ic(2,Ku,0,0,"ng-template",2),r.Vb(3,"button",3),r.cc("focus",function(){return e._closeButtonFocused=!0})("blur",function(){return e._closeButtonFocused=!1})("click",function(){return e.datepicker.close()}),r.Kc(4),r.Ub(),r.Ub()),2&t&&(r.Hb("mat-datepicker-content-container-with-actions",e._actionsPortal),r.Db(1),r.nc("id",e.datepicker.id)("ngClass",e.datepicker.panelClass)("startAt",e.datepicker.startAt)("startView",e.datepicker.startView)("minDate",e.datepicker._getMinDate())("maxDate",e.datepicker._getMaxDate())("dateFilter",e.datepicker._getDateFilter())("headerComponent",e.datepicker.calendarHeaderComponent)("selected",e._getSelected())("dateClass",e.datepicker.dateClass)("comparisonStart",e.comparisonStart)("comparisonEnd",e.comparisonEnd)("@fadeInCalendar","enter"),r.Db(1),r.nc("cdkPortalOutlet",e._actionsPortal),r.Db(1),r.Hb("cdk-visually-hidden",!e._closeButtonFocused),r.nc("color",e.color||"primary"),r.Db(1),r.Lc(e._closeButtonText))},directives:[Ni,yd,at,be,Dl],styles:[".mat-datepicker-content{display:block;border-radius:4px}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content .mat-datepicker-close-button{position:absolute;top:100%;left:0;margin-top:8px}.ng-animating .mat-datepicker-content .mat-datepicker-close-button{display:none}.mat-datepicker-content-container{display:flex;flex-direction:column;justify-content:space-between}.mat-datepicker-content-touch{display:block;max-height:80vh;overflow:auto;margin:-24px}.mat-datepicker-content-touch .mat-datepicker-content-container{min-height:312px;max-height:788px;min-width:250px;max-width:750px}.mat-datepicker-content-touch .mat-calendar{width:100%;height:auto}@media all and (orientation: landscape){.mat-datepicker-content-touch .mat-datepicker-content-container{width:64vh;height:80vh}}@media all and (orientation: portrait){.mat-datepicker-content-touch .mat-datepicker-content-container{width:80vw;height:100vw}.mat-datepicker-content-touch .mat-datepicker-content-container-with-actions{height:115vw}}\n"],encapsulation:2,data:{animation:[wd.transformPanel,wd.fadeInCalendar]},changeDetection:0}),t})(),Id=(()=>{class t{constructor(t,e,i,n,s,o,a,l,c){this._dialog=t,this._overlay=e,this._ngZone=i,this._viewContainerRef=n,this._dateAdapter=o,this._dir=a,this._document=l,this._model=c,this._inputStateChanges=ye.a.EMPTY,this.startView="month",this._touchUi=!1,this.xPosition="start",this.yPosition="below",this._restoreFocus=!0,this.yearSelected=new r.o,this.monthSelected=new r.o,this.viewChanged=new r.o(!0),this.openedStream=new r.o,this.closedStream=new r.o,this._opened=!1,this.id="mat-datepicker-"+xd++,this._focusedElementBeforeOpen=null,this._backdropHarnessClass=`${this.id}-backdrop`,this.stateChanges=new _e.a,this._scrollStrategy=s}get startAt(){return this._startAt||(this.datepickerInput?this.datepickerInput.getStartValue():null)}set startAt(t){this._startAt=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get color(){return this._color||(this.datepickerInput?this.datepickerInput.getThemePalette():void 0)}set color(t){this._color=t}get touchUi(){return this._touchUi}set touchUi(t){this._touchUi=ti(t)}get disabled(){return void 0===this._disabled&&this.datepickerInput?this.datepickerInput.disabled:!!this._disabled}set disabled(t){const e=ti(t);e!==this._disabled&&(this._disabled=e,this.stateChanges.next(void 0))}get restoreFocus(){return this._restoreFocus}set restoreFocus(t){this._restoreFocus=ti(t)}get panelClass(){return this._panelClass}set panelClass(t){this._panelClass=oi(t)}get opened(){return this._opened}set opened(t){ti(t)?this.open():this.close()}_getMinDate(){return this.datepickerInput&&this.datepickerInput.min}_getMaxDate(){return this.datepickerInput&&this.datepickerInput.max}_getDateFilter(){return this.datepickerInput&&this.datepickerInput.dateFilter}ngOnChanges(t){const e=t.xPosition||t.yPosition;e&&!e.firstChange&&this._popupRef&&(this._setConnectedPositions(this._popupRef.getConfig().positionStrategy),this.opened&&this._popupRef.updatePosition()),this.stateChanges.next(void 0)}ngOnDestroy(){this._destroyPopup(),this.close(),this._inputStateChanges.unsubscribe(),this.stateChanges.complete()}select(t){this._model.add(t)}_selectYear(t){this.yearSelected.emit(t)}_selectMonth(t){this.monthSelected.emit(t)}_viewChanged(t){this.viewChanged.emit(t)}registerInput(t){return this._inputStateChanges.unsubscribe(),this.datepickerInput=t,this._inputStateChanges=t.stateChanges.subscribe(()=>this.stateChanges.next(void 0)),this._model}registerActions(t){this._actionsPortal=t}removeActions(t){t===this._actionsPortal&&(this._actionsPortal=null)}open(){this._opened||this.disabled||(this._document&&(this._focusedElementBeforeOpen=this._document.activeElement),this.touchUi?this._openAsDialog():this._openAsPopup(),this._opened=!0,this.openedStream.emit())}close(){if(!this._opened)return;if(this._popupComponentRef&&this._popupRef){const t=this._popupComponentRef.instance;t._startExitAnimation(),t._animationDone.pipe(Qe(1)).subscribe(()=>this._destroyPopup())}this._dialogRef&&(this._dialogRef.close(),this._dialogRef=null);const t=()=>{this._opened&&(this._opened=!1,this.closedStream.emit(),this._focusedElementBeforeOpen=null)};this._restoreFocus&&this._focusedElementBeforeOpen&&"function"==typeof this._focusedElementBeforeOpen.focus?(this._focusedElementBeforeOpen.focus(),setTimeout(t)):t()}_applyPendingSelection(){var t,e;const i=(null===(t=this._popupComponentRef)||void 0===t?void 0:t.instance)||(null===(e=this._dialogRef)||void 0===e?void 0:e.componentInstance);null==i||i._applyPendingSelection()}_openAsDialog(){this._dialogRef&&this._dialogRef.close(),this._dialogRef=this._dialog.open(Dd,{direction:this._dir?this._dir.value:"ltr",viewContainerRef:this._viewContainerRef,panelClass:"mat-datepicker-dialog",hasBackdrop:!0,disableClose:!1,backdropClass:["cdk-overlay-dark-backdrop",this._backdropHarnessClass],width:"",height:"",minWidth:"",minHeight:"",maxWidth:"80vw",maxHeight:"",position:{},autoFocus:!1,restoreFocus:!1}),this._dialogRef.afterClosed().subscribe(()=>this.close()),this._forwardContentValues(this._dialogRef.componentInstance)}_openAsPopup(){const t=new pe(Dd,this._viewContainerRef);this._destroyPopup(),this._createPopup(),this._popupComponentRef=this._popupRef.attach(t),this._forwardContentValues(this._popupComponentRef.instance),this._ngZone.onStable.pipe(Qe(1)).subscribe(()=>{this._popupRef.updatePosition()})}_forwardContentValues(t){t.datepicker=this,t.color=this.color,t._actionsPortal=this._actionsPortal}_createPopup(){const t=this._overlay.position().flexibleConnectedTo(this.datepickerInput.getConnectedOverlayOrigin()).withTransformOriginOn(".mat-datepicker-content").withFlexibleDimensions(!1).withViewportMargin(8).withLockedPosition(),e=new br({positionStrategy:this._setConnectedPositions(t),hasBackdrop:!0,backdropClass:["mat-overlay-transparent-backdrop",this._backdropHarnessClass],direction:this._dir,scrollStrategy:this._scrollStrategy(),panelClass:"mat-datepicker-popup"});this._popupRef=this._overlay.create(e),this._popupRef.overlayElement.setAttribute("role","dialog"),Object(or.a)(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(He(t=>27===t.keyCode&&!ke(t)||this.datepickerInput&&ke(t,"altKey")&&38===t.keyCode))).subscribe(t=>{t&&t.preventDefault(),this.close()})}_destroyPopup(){this._popupRef&&(this._popupRef.dispose(),this._popupRef=this._popupComponentRef=null)}_setConnectedPositions(t){const e="end"===this.xPosition?"end":"start",i="start"===e?"end":"start",n="above"===this.yPosition?"bottom":"top",r="top"===n?"bottom":"top";return t.withPositions([{originX:e,originY:r,overlayX:e,overlayY:n},{originX:e,originY:n,overlayX:e,overlayY:r},{originX:i,originY:r,overlayX:i,overlayY:n},{originX:i,originY:n,overlayX:i,overlayY:r}])}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Gl),r.Pb(Fr),r.Pb(r.B),r.Pb(r.S),r.Pb(Cd),r.Pb(Ta,8),r.Pb(Zn,8),r.Pb(a,8),r.Pb(sd))},t.\u0275dir=r.Kb({type:t,inputs:{startView:"startView",xPosition:"xPosition",yPosition:"yPosition",startAt:"startAt",color:"color",touchUi:"touchUi",disabled:"disabled",restoreFocus:"restoreFocus",panelClass:"panelClass",opened:"opened",calendarHeaderComponent:"calendarHeaderComponent",dateClass:"dateClass"},outputs:{yearSelected:"yearSelected",monthSelected:"monthSelected",viewChanged:"viewChanged",openedStream:"opened",closedStream:"closed"},features:[r.Bb]}),t})(),Pd=(()=>{class t extends Id{}return t.\u0275fac=function(e){return Od(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-datepicker"]],exportAs:["matDatepicker"],features:[r.Cb([ld,{provide:Id,useExisting:t}]),r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();const Od=r.Xb(Pd);class Md{constructor(t,e){this.target=t,this.targetElement=e,this.value=this.target.value}}let Td=(()=>{class t{constructor(t,e,i){this._elementRef=t,this._dateAdapter=e,this._dateFormats=i,this.dateChange=new r.o,this.dateInput=new r.o,this.stateChanges=new _e.a,this._onTouched=()=>{},this._validatorOnChange=()=>{},this._cvaOnChange=()=>{},this._valueChangesSubscription=ye.a.EMPTY,this._localeSubscription=ye.a.EMPTY,this._parseValidator=()=>this._lastValueValid?null:{matDatepickerParse:{text:this._elementRef.nativeElement.value}},this._filterValidator=t=>{const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t.value));return!e||this._matchesFilter(e)?null:{matDatepickerFilter:!0}},this._minValidator=t=>{const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t.value)),i=this._getMinDate();return!i||!e||this._dateAdapter.compareDate(i,e)<=0?null:{matDatepickerMin:{min:i,actual:e}}},this._maxValidator=t=>{const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t.value)),i=this._getMaxDate();return!i||!e||this._dateAdapter.compareDate(i,e)>=0?null:{matDatepickerMax:{max:i,actual:e}}},this._lastValueValid=!1,this._localeSubscription=e.localeChanges.subscribe(()=>{this._assignValueProgrammatically(this.value)})}get value(){return this._model?this._getValueFromModel(this._model.selection):this._pendingValue}set value(t){this._assignValueProgrammatically(t)}get disabled(){return!!this._disabled||this._parentDisabled()}set disabled(t){const e=ti(t),i=this._elementRef.nativeElement;this._disabled!==e&&(this._disabled=e,this.stateChanges.next(void 0)),e&&this._isInitialized&&i.blur&&i.blur()}_getValidators(){return[this._parseValidator,this._minValidator,this._maxValidator,this._filterValidator]}_registerModel(t){this._model=t,this._valueChangesSubscription.unsubscribe(),this._pendingValue&&this._assignValue(this._pendingValue),this._valueChangesSubscription=this._model.selectionChanged.subscribe(t=>{if(this._shouldHandleChangeEvent(t)){const e=this._getValueFromModel(t.selection);this._lastValueValid=this._isValidValue(e),this._cvaOnChange(e),this._onTouched(),this._formatValue(e),this.dateInput.emit(new Md(this,this._elementRef.nativeElement)),this.dateChange.emit(new Md(this,this._elementRef.nativeElement))}})}ngAfterViewInit(){this._isInitialized=!0}ngOnChanges(t){Rd(t,this._dateAdapter)&&this.stateChanges.next(void 0)}ngOnDestroy(){this._valueChangesSubscription.unsubscribe(),this._localeSubscription.unsubscribe(),this.stateChanges.complete()}registerOnValidatorChange(t){this._validatorOnChange=t}validate(t){return this._validator?this._validator(t):null}writeValue(t){this._assignValueProgrammatically(t)}registerOnChange(t){this._cvaOnChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t}_onKeydown(t){t.altKey&&40===t.keyCode&&!this._elementRef.nativeElement.readOnly&&(this._openPopup(),t.preventDefault())}_onInput(t){const e=this._lastValueValid;let i=this._dateAdapter.parse(t,this._dateFormats.parse.dateInput);this._lastValueValid=this._isValidValue(i),i=this._dateAdapter.getValidDateOrNull(i),this._dateAdapter.sameDate(i,this.value)?(t&&!this.value&&this._cvaOnChange(i),e!==this._lastValueValid&&this._validatorOnChange()):(this._assignValue(i),this._cvaOnChange(i),this.dateInput.emit(new Md(this,this._elementRef.nativeElement)))}_onChange(){this.dateChange.emit(new Md(this,this._elementRef.nativeElement))}_onBlur(){this.value&&this._formatValue(this.value),this._onTouched()}_formatValue(t){this._elementRef.nativeElement.value=t?this._dateAdapter.format(t,this._dateFormats.display.dateInput):""}_assignValue(t){this._model?(this._assignValueToModel(t),this._pendingValue=null):this._pendingValue=t}_isValidValue(t){return!t||this._dateAdapter.isValid(t)}_parentDisabled(){return!1}_assignValueProgrammatically(t){t=this._dateAdapter.deserialize(t),this._lastValueValid=this._isValidValue(t),t=this._dateAdapter.getValidDateOrNull(t),this._assignValue(t),this._formatValue(t)}_matchesFilter(t){const e=this._getDateFilter();return!e||e(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(Ta,8),r.Pb(Ra,8))},t.\u0275dir=r.Kb({type:t,inputs:{value:"value",disabled:"disabled"},outputs:{dateChange:"dateChange",dateInput:"dateInput"},features:[r.Bb]}),t})();function Rd(t,e){const i=Object.keys(t);for(let n of i){const{previousValue:i,currentValue:r}=t[n];if(!e.isDateInstance(i)||!e.isDateInstance(r))return!0;if(!e.sameDate(i,r))return!0}return!1}const Vd={provide:rc,useExisting:Object(r.W)(()=>Ld),multi:!0},Fd={provide:hc,useExisting:Object(r.W)(()=>Ld),multi:!0};let Ld=(()=>{class t extends Td{constructor(t,e,i,n){super(t,e,i),this._formField=n,this._closedSubscription=ye.a.EMPTY,this._validator=pc.compose(super._getValidators())}set matDatepicker(t){t&&(this._datepicker=t,this._closedSubscription=t.closedStream.subscribe(()=>this._onTouched()),this._registerModel(t.registerInput(this)))}get min(){return this._min}set min(t){const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t));this._dateAdapter.sameDate(e,this._min)||(this._min=e,this._validatorOnChange())}get max(){return this._max}set max(t){const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t));this._dateAdapter.sameDate(e,this._max)||(this._max=e,this._validatorOnChange())}get dateFilter(){return this._dateFilter}set dateFilter(t){const e=this._matchesFilter(this.value);this._dateFilter=t,this._matchesFilter(this.value)!==e&&this._validatorOnChange()}getConnectedOverlayOrigin(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef}getThemePalette(){return this._formField?this._formField.color:void 0}getStartValue(){return this.value}ngOnDestroy(){super.ngOnDestroy(),this._closedSubscription.unsubscribe()}_openPopup(){this._datepicker&&this._datepicker.open()}_getValueFromModel(t){return t}_assignValueToModel(t){this._model&&this._model.updateSelection(t,this)}_getMinDate(){return this._min}_getMaxDate(){return this._max}_getDateFilter(){return this._dateFilter}_shouldHandleChangeEvent(t){return t.source!==this}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(Ta,8),r.Pb(Ra,8),r.Pb(vu,8))},t.\u0275dir=r.Kb({type:t,selectors:[["input","matDatepicker",""]],hostAttrs:[1,"mat-datepicker-input"],hostVars:6,hostBindings:function(t,e){1&t&&r.cc("input",function(t){return e._onInput(t.target.value)})("change",function(){return e._onChange()})("blur",function(){return e._onBlur()})("keydown",function(t){return e._onKeydown(t)}),2&t&&(r.Yb("disabled",e.disabled),r.Eb("aria-haspopup",e._datepicker?"dialog":null)("aria-owns",(null==e._datepicker?null:e._datepicker.opened)&&e._datepicker.id||null)("min",e.min?e._dateAdapter.toIso8601(e.min):null)("max",e.max?e._dateAdapter.toIso8601(e.max):null)("data-mat-calendar",e._datepicker?e._datepicker.id:null))},inputs:{matDatepicker:"matDatepicker",min:"min",max:"max",dateFilter:["matDatepickerFilter","dateFilter"]},exportAs:["matDatepickerInput"],features:[r.Cb([Vd,Fd,{provide:ku,useExisting:t}]),r.Ab]}),t})(),Ud=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","matDatepickerToggleIcon",""]]}),t})(),Bd=(()=>{class t{constructor(t,e,i){this._intl=t,this._changeDetectorRef=e,this._stateChanges=ye.a.EMPTY;const n=Number(i);this.tabIndex=n||0===n?n:null}get disabled(){return void 0===this._disabled&&this.datepicker?this.datepicker.disabled:!!this._disabled}set disabled(t){this._disabled=ti(t)}ngOnChanges(t){t.datepicker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}_open(t){this.datepicker&&!this.disabled&&(this.datepicker.open(),t.stopPropagation())}_watchStateChanges(){const t=this.datepicker?this.datepicker.stateChanges:Se(),e=this.datepicker&&this.datepicker.datepickerInput?this.datepicker.datepickerInput.stateChanges:Se(),i=this.datepicker?Object(or.a)(this.datepicker.openedStream,this.datepicker.closedStream):Se();this._stateChanges.unsubscribe(),this._stateChanges=Object(or.a)(this._intl.changes,t,e,i).subscribe(()=>this._changeDetectorRef.markForCheck())}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Qu),r.Pb(r.h),r.ac("tabindex"))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-datepicker-toggle"]],contentQueries:function(t,e,i){if(1&t&&r.Ib(i,Ud,1),2&t){let t;r.vc(t=r.dc())&&(e._customIcon=t.first)}},viewQuery:function(t,e){if(1&t&&r.Pc($u,1),2&t){let t;r.vc(t=r.dc())&&(e._button=t.first)}},hostAttrs:[1,"mat-datepicker-toggle"],hostVars:8,hostBindings:function(t,e){1&t&&r.cc("click",function(t){return e._open(t)}),2&t&&(r.Eb("tabindex",null)("data-mat-calendar",e.datepicker?e.datepicker.id:null),r.Hb("mat-datepicker-toggle-active",e.datepicker&&e.datepicker.opened)("mat-accent",e.datepicker&&"accent"===e.datepicker.color)("mat-warn",e.datepicker&&"warn"===e.datepicker.color))},inputs:{tabIndex:"tabIndex",disabled:"disabled",datepicker:["for","datepicker"],ariaLabel:["aria-label","ariaLabel"],disableRipple:"disableRipple"},exportAs:["matDatepickerToggle"],features:[r.Bb],ngContentSelectors:Zu,decls:4,vars:6,consts:[["mat-icon-button","","type","button",3,"disabled","disableRipple"],["button",""],["class","mat-datepicker-toggle-default-icon","viewBox","0 0 24 24","width","24px","height","24px","fill","currentColor","focusable","false",4,"ngIf"],["viewBox","0 0 24 24","width","24px","height","24px","fill","currentColor","focusable","false",1,"mat-datepicker-toggle-default-icon"],["d","M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"]],template:function(t,e){1&t&&(r.mc(Wu),r.Vb(0,"button",0,1),r.Ic(2,Gu,2,0,"svg",2),r.lc(3),r.Ub()),2&t&&(r.nc("disabled",e.disabled)("disableRipple",e.disableRipple),r.Eb("aria-haspopup",e.datepicker?"dialog":null)("aria-label",e.ariaLabel||e._intl.openCalendarLabel)("tabindex",e.disabled?-1:e.tabIndex),r.Db(2),r.nc("ngIf",!e._customIcon))},directives:[Dl,ut],styles:[".mat-form-field-appearance-legacy .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-datepicker-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-datepicker-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-datepicker-toggle-default-icon{margin:auto}\n"],encapsulation:2,changeDetection:0}),t})();const Nd=new r.s("MAT_DATE_RANGE_INPUT_PARENT"),jd=Pa((()=>{class t extends Td{constructor(t,e,i,n,r,s,o,a){super(e,o,a),this._rangeInput=t,this._defaultErrorStateMatcher=i,this._injector=n,this._parentForm=r,this._parentFormGroup=s}ngOnInit(){const t=this._injector.get(Tc,null,r.r.Self);t&&(this.ngControl=t)}ngDoCheck(){this.ngControl&&this.updateErrorState()}isEmpty(){return 0===this._elementRef.nativeElement.value.length}_getPlaceholder(){return this._elementRef.nativeElement.placeholder}focus(){this._elementRef.nativeElement.focus()}_onInput(t){super._onInput(t),this._rangeInput._handleChildValueChange()}_openPopup(){this._rangeInput._openDatepicker()}_getMinDate(){return this._rangeInput.min}_getMaxDate(){return this._rangeInput.max}_getDateFilter(){return this._rangeInput.dateFilter}_parentDisabled(){return this._rangeInput._groupDisabled}_shouldHandleChangeEvent({source:t}){return t!==this._rangeInput._startInput&&t!==this._rangeInput._endInput}_assignValueProgrammatically(t){super._assignValueProgrammatically(t);const e=this===this._rangeInput._startInput?this._rangeInput._endInput:this._rangeInput._startInput;null==e||e._validatorOnChange()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Nd),r.Pb(r.l),r.Pb($a),r.Pb(r.t),r.Pb(oh,8),r.Pb(_h,8),r.Pb(Ta,8),r.Pb(Ra,8))},t.\u0275dir=r.Kb({type:t,features:[r.Ab]}),t})());let zd=(()=>{class t extends jd{constructor(t,e,i,n,r,s,o,a){super(t,e,i,n,r,s,o,a),this._startValidator=t=>{const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t.value)),i=this._model?this._model.selection.end:null;return!e||!i||this._dateAdapter.compareDate(e,i)<=0?null:{matStartDateInvalid:{end:i,actual:e}}},this._validator=pc.compose([...super._getValidators(),this._startValidator])}ngOnInit(){super.ngOnInit()}ngDoCheck(){super.ngDoCheck()}_getValueFromModel(t){return t.start}_assignValueToModel(t){if(this._model){const e=new rd(t,this._model.selection.end);this._model.updateSelection(e,this)}}_formatValue(t){super._formatValue(t),this._rangeInput._handleChildValueChange()}getMirrorValue(){const t=this._elementRef.nativeElement,e=t.value;return e.length>0?e:t.placeholder}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Nd),r.Pb(r.l),r.Pb($a),r.Pb(r.t),r.Pb(oh,8),r.Pb(_h,8),r.Pb(Ta,8),r.Pb(Ra,8))},t.\u0275dir=r.Kb({type:t,selectors:[["input","matStartDate",""]],hostAttrs:["type","text",1,"mat-start-date","mat-date-range-input-inner"],hostVars:6,hostBindings:function(t,e){1&t&&r.cc("input",function(t){return e._onInput(t.target.value)})("change",function(){return e._onChange()})("keydown",function(t){return e._onKeydown(t)})("blur",function(){return e._onBlur()}),2&t&&(r.Yb("disabled",e.disabled),r.Eb("id",e._rangeInput.id)("aria-haspopup",e._rangeInput.rangePicker?"dialog":null)("aria-owns",(null==e._rangeInput.rangePicker?null:e._rangeInput.rangePicker.opened)&&e._rangeInput.rangePicker.id||null)("min",e._getMinDate()?e._dateAdapter.toIso8601(e._getMinDate()):null)("max",e._getMaxDate()?e._dateAdapter.toIso8601(e._getMaxDate()):null))},inputs:{errorStateMatcher:"errorStateMatcher"},outputs:{dateChange:"dateChange",dateInput:"dateInput"},features:[r.Cb([{provide:rc,useExisting:t,multi:!0},{provide:hc,useExisting:t,multi:!0}]),r.Ab]}),t})(),Hd=(()=>{class t extends jd{constructor(t,e,i,n,r,s,o,a){super(t,e,i,n,r,s,o,a),this._endValidator=t=>{const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t.value)),i=this._model?this._model.selection.start:null;return!e||!i||this._dateAdapter.compareDate(e,i)>=0?null:{matEndDateInvalid:{start:i,actual:e}}},this._validator=pc.compose([...super._getValidators(),this._endValidator])}ngOnInit(){super.ngOnInit()}ngDoCheck(){super.ngDoCheck()}_getValueFromModel(t){return t.end}_assignValueToModel(t){if(this._model){const e=new rd(this._model.selection.start,t);this._model.updateSelection(e,this)}}_onKeydown(t){8!==t.keyCode||this._elementRef.nativeElement.value||this._rangeInput._startInput.focus(),super._onKeydown(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Nd),r.Pb(r.l),r.Pb($a),r.Pb(r.t),r.Pb(oh,8),r.Pb(_h,8),r.Pb(Ta,8),r.Pb(Ra,8))},t.\u0275dir=r.Kb({type:t,selectors:[["input","matEndDate",""]],hostAttrs:["type","text",1,"mat-end-date","mat-date-range-input-inner"],hostVars:5,hostBindings:function(t,e){1&t&&r.cc("input",function(t){return e._onInput(t.target.value)})("change",function(){return e._onChange()})("keydown",function(t){return e._onKeydown(t)})("blur",function(){return e._onBlur()}),2&t&&(r.Yb("disabled",e.disabled),r.Eb("aria-haspopup",e._rangeInput.rangePicker?"dialog":null)("aria-owns",(null==e._rangeInput.rangePicker?null:e._rangeInput.rangePicker.opened)&&e._rangeInput.rangePicker.id||null)("min",e._getMinDate()?e._dateAdapter.toIso8601(e._getMinDate()):null)("max",e._getMaxDate()?e._dateAdapter.toIso8601(e._getMaxDate()):null))},inputs:{errorStateMatcher:"errorStateMatcher"},outputs:{dateChange:"dateChange",dateInput:"dateInput"},features:[r.Cb([{provide:rc,useExisting:t,multi:!0},{provide:hc,useExisting:t,multi:!0}]),r.Ab]}),t})(),Kd=0,$d=(()=>{class t{constructor(t,e,i,n,r){this._changeDetectorRef=t,this._elementRef=e,this._dateAdapter=n,this._formField=r,this._closedSubscription=ye.a.EMPTY,this.id="mat-date-range-input-"+Kd++,this.focused=!1,this.controlType="mat-date-range-input",this._groupDisabled=!1,this._ariaDescribedBy=null,this.separator="\u2013",this.comparisonStart=null,this.comparisonEnd=null,this.stateChanges=new _e.a,this.ngControl=i}get value(){return this._model?this._model.selection:null}get shouldLabelFloat(){return this.focused||!this.empty}get placeholder(){var t,e;const i=(null===(t=this._startInput)||void 0===t?void 0:t._getPlaceholder())||"",n=(null===(e=this._endInput)||void 0===e?void 0:e._getPlaceholder())||"";return i||n?`${i} ${this.separator} ${n}`:""}get rangePicker(){return this._rangePicker}set rangePicker(t){t&&(this._model=t.registerInput(this),this._rangePicker=t,this._closedSubscription.unsubscribe(),this._closedSubscription=t.closedStream.subscribe(()=>{var t,e;null===(t=this._startInput)||void 0===t||t._onTouched(),null===(e=this._endInput)||void 0===e||e._onTouched()}),this._registerModel(this._model))}get required(){return!!this._required}set required(t){this._required=ti(t)}get dateFilter(){return this._dateFilter}set dateFilter(t){const e=this._startInput,i=this._endInput,n=e&&e._matchesFilter(e.value),r=i&&i._matchesFilter(e.value);this._dateFilter=t,e&&e._matchesFilter(e.value)!==n&&e._validatorOnChange(),i&&i._matchesFilter(i.value)!==r&&i._validatorOnChange()}get min(){return this._min}set min(t){const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t));this._dateAdapter.sameDate(e,this._min)||(this._min=e,this._revalidate())}get max(){return this._max}set max(t){const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t));this._dateAdapter.sameDate(e,this._max)||(this._max=e,this._revalidate())}get disabled(){return this._startInput&&this._endInput?this._startInput.disabled&&this._endInput.disabled:this._groupDisabled}set disabled(t){const e=ti(t);e!==this._groupDisabled&&(this._groupDisabled=e,this.stateChanges.next(void 0))}get errorState(){return!(!this._startInput||!this._endInput)&&(this._startInput.errorState||this._endInput.errorState)}get empty(){const t=!!this._startInput&&this._startInput.isEmpty(),e=!!this._endInput&&this._endInput.isEmpty();return t&&e}setDescribedByIds(t){this._ariaDescribedBy=t.length?t.join(" "):null}onContainerClick(){this.focused||this.disabled||(this._model&&this._model.selection.start?this._endInput.focus():this._startInput.focus())}ngAfterContentInit(){this._model&&this._registerModel(this._model),Object(or.a)(this._startInput.stateChanges,this._endInput.stateChanges).subscribe(()=>{this.stateChanges.next(void 0)})}ngOnChanges(t){Rd(t,this._dateAdapter)&&this.stateChanges.next(void 0)}ngOnDestroy(){this._closedSubscription.unsubscribe(),this.stateChanges.complete()}getStartValue(){return this.value?this.value.start:null}getThemePalette(){return this._formField?this._formField.color:void 0}getConnectedOverlayOrigin(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef}_getInputMirrorValue(){return this._startInput?this._startInput.getMirrorValue():""}_shouldHidePlaceholders(){return!!this._startInput&&!this._startInput.isEmpty()}_handleChildValueChange(){this.stateChanges.next(void 0),this._changeDetectorRef.markForCheck()}_openDatepicker(){this._rangePicker&&this._rangePicker.open()}_shouldHideSeparator(){return(!this._formField||this._formField._hideControlPlaceholder())&&this.empty}_getAriaLabelledby(){const t=this._formField;return t&&t._hasFloatingLabel()?t._labelId:null}_revalidate(){this._startInput&&this._startInput._validatorOnChange(),this._endInput&&this._endInput._validatorOnChange()}_registerModel(t){this._startInput&&this._startInput._registerModel(t),this._endInput&&this._endInput._registerModel(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(r.l),r.Pb(Oc,10),r.Pb(Ta,8),r.Pb(vu,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-date-range-input"]],contentQueries:function(t,e,i){if(1&t&&(r.Ib(i,zd,1),r.Ib(i,Hd,1)),2&t){let t;r.vc(t=r.dc())&&(e._startInput=t.first),r.vc(t=r.dc())&&(e._endInput=t.first)}},hostAttrs:["role","group",1,"mat-date-range-input"],hostVars:8,hostBindings:function(t,e){2&t&&(r.Eb("id",null)("aria-labelledby",e._getAriaLabelledby())("aria-describedby",e._ariaDescribedBy)("data-mat-calendar",e.rangePicker?e.rangePicker.id:null),r.Hb("mat-date-range-input-hide-placeholders",e._shouldHidePlaceholders())("mat-date-range-input-required",e.required))},inputs:{separator:"separator",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd",rangePicker:"rangePicker",required:"required",dateFilter:"dateFilter",min:"min",max:"max",disabled:"disabled"},exportAs:["matDateRangeInput"],features:[r.Cb([{provide:su,useExisting:t},{provide:Nd,useExisting:t}]),r.Bb],ngContentSelectors:Yu,decls:9,vars:4,consts:[["cdkMonitorSubtreeFocus","",1,"mat-date-range-input-container",3,"cdkFocusChange"],[1,"mat-date-range-input-start-wrapper"],["aria-hidden","true",1,"mat-date-range-input-mirror"],[1,"mat-date-range-input-separator"],[1,"mat-date-range-input-end-wrapper"]],template:function(t,e){1&t&&(r.mc(qu),r.Vb(0,"div",0),r.cc("cdkFocusChange",function(t){return e.focused=null!==t}),r.Vb(1,"div",1),r.lc(2),r.Vb(3,"span",2),r.Kc(4),r.Ub(),r.Ub(),r.Vb(5,"span",3),r.Kc(6),r.Ub(),r.Vb(7,"div",4),r.lc(8,1),r.Ub(),r.Ub()),2&t&&(r.Db(4),r.Lc(e._getInputMirrorValue()),r.Db(1),r.Hb("mat-date-range-input-separator-hidden",e._shouldHideSeparator()),r.Db(1),r.Lc(e.separator))},directives:[Qi],styles:[".mat-date-range-input{display:block;width:100%}.mat-date-range-input-container{display:flex;align-items:center}.mat-date-range-input-separator{transition:opacity 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);margin:0 4px}.mat-date-range-input-separator-hidden{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:0;transition:none}.mat-date-range-input-inner{font:inherit;background:transparent;color:currentColor;border:none;outline:none;padding:0;margin:0;vertical-align:bottom;text-align:inherit;-webkit-appearance:none;width:100%}.mat-date-range-input-inner::-ms-clear,.mat-date-range-input-inner::-ms-reveal{display:none}.mat-date-range-input-inner:-moz-ui-invalid{box-shadow:none}.mat-date-range-input-inner::placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-moz-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-webkit-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner:-ms-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-date-range-input-mirror{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;visibility:hidden;white-space:nowrap;display:inline-block;min-width:2px}.mat-date-range-input-start-wrapper{position:relative;overflow:hidden;max-width:calc(50% - 4px)}.mat-date-range-input-start-wrapper .mat-date-range-input-inner{position:absolute;top:0;left:0}.mat-date-range-input-end-wrapper{flex-grow:1;max-width:calc(50% - 4px)}.mat-form-field-type-mat-date-range-input .mat-form-field-infix{width:200px}\n"],encapsulation:2,changeDetection:0}),t})(),Gd=(()=>{class t extends Id{_forwardContentValues(t){super._forwardContentValues(t);const e=this.datepickerInput;e&&(t.comparisonStart=e.comparisonStart,t.comparisonEnd=e.comparisonEnd)}}return t.\u0275fac=function(e){return Wd(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-date-range-picker"]],exportAs:["matDateRangePicker"],features:[r.Cb([cd,dd,{provide:Id,useExisting:t}]),r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();const Wd=r.Xb(Gd);let Zd=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[Qu,Sd],imports:[[Et,Pl,Jl,zr,Ji,ve,Sa],rr]}),t})();function qd(t){return function(e){const i=new Yd(t),n=e.lift(i);return i.caught=n}}class Yd{constructor(t){this.selector=t}call(t,e){return e.subscribe(new Qd(t,this.selector,this.caught))}}class Qd extends bn.b{constructor(t,e,i){super(t),this.selector=e,this.caught=i}error(t){if(!this.isStopped){let i;try{i=this.selector(t,this.caught)}catch(e){return void super.error(e)}this._unsubscribeAndRecycle();const n=new bn.a(this);this.add(n);const r=Object(bn.c)(i,n);r!==n&&this.add(r)}}}function Xd(t){return e=>e.lift(new Jd(t))}class Jd{constructor(t){this.callback=t}call(t,e){return e.subscribe(new tp(t,this.callback))}}class tp extends Ee.a{constructor(t,e){super(t),this.add(new ye.a(e))}}var ep=i("w1tV"),ip=i("5+tZ");function np(t,e){return Object(ip.a)(t,e,1)}class rp{}class sp{}class op{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?()=>{this.headers=new Map,t.split("\n").forEach(t=>{const e=t.indexOf(":");if(e>0){const i=t.slice(0,e),n=i.toLowerCase(),r=t.slice(e+1).trim();this.maybeSetNormalizedName(i,n),this.headers.has(n)?this.headers.get(n).push(r):this.headers.set(n,[r])}})}:()=>{this.headers=new Map,Object.keys(t).forEach(e=>{let i=t[e];const n=e.toLowerCase();"string"==typeof i&&(i=[i]),i.length>0&&(this.headers.set(n,i),this.maybeSetNormalizedName(e,n))})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();const e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof op?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){const e=new op;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof op?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){const e=t.name.toLowerCase();switch(t.op){case"a":case"s":let i=t.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(t.name,e);const n=("a"===t.op?this.headers.get(e):void 0)||[];n.push(...i),this.headers.set(e,n);break;case"d":const r=t.value;if(r){let t=this.headers.get(e);if(!t)return;t=t.filter(t=>-1===r.indexOf(t)),0===t.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,t)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}}class ap{encodeKey(t){return lp(t)}encodeValue(t){return lp(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}function lp(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}class cp{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new ap,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function(t,e){const i=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(t=>{const n=t.indexOf("="),[r,s]=-1==n?[e.decodeKey(t),""]:[e.decodeKey(t.slice(0,n)),e.decodeValue(t.slice(n+1))],o=i.get(r)||[];o.push(s),i.set(r,o)}),i}(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{const i=t.fromObject[e];this.map.set(e,Array.isArray(i)?i:[i])})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();const e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}appendAll(t){const e=[];return Object.keys(t).forEach(i=>{const n=t[i];Array.isArray(n)?n.forEach(t=>{e.push({param:i,value:t,op:"a"})}):e.push({param:i,value:n,op:"a"})}),this.clone(e)}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{const e=this.encoder.encodeKey(t);return this.map.get(t).map(t=>e+"="+this.encoder.encodeValue(t)).join("&")}).filter(t=>""!==t).join("&")}clone(t){const e=new cp({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":const e=("a"===t.op?this.map.get(t.param):void 0)||[];e.push(t.value),this.map.set(t.param,e);break;case"d":if(void 0===t.value){this.map.delete(t.param);break}{let e=this.map.get(t.param)||[];const i=e.indexOf(t.value);-1!==i&&e.splice(i,1),e.length>0?this.map.set(t.param,e):this.map.delete(t.param)}}}),this.cloneFrom=this.updates=null)}}function hp(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer}function up(t){return"undefined"!=typeof Blob&&t instanceof Blob}function dp(t){return"undefined"!=typeof FormData&&t instanceof FormData}class pp{constructor(t,e,i,n){let r;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||n?(this.body=void 0!==i?i:null,r=n):r=i,r&&(this.reportProgress=!!r.reportProgress,this.withCredentials=!!r.withCredentials,r.responseType&&(this.responseType=r.responseType),r.headers&&(this.headers=r.headers),r.params&&(this.params=r.params)),this.headers||(this.headers=new op),this.params){const t=this.params.toString();if(0===t.length)this.urlWithParams=e;else{const i=e.indexOf("?");this.urlWithParams=e+(-1===i?"?":i<e.length-1?"&":"")+t}}else this.params=new cp,this.urlWithParams=e}serializeBody(){return null===this.body?null:hp(this.body)||up(this.body)||dp(this.body)||"string"==typeof this.body?this.body:this.body instanceof cp?this.body.toString():"object"==typeof this.body||"boolean"==typeof this.body||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return null===this.body||dp(this.body)?null:up(this.body)?this.body.type||null:hp(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof cp?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||Array.isArray(this.body)?"application/json":null}clone(t={}){const e=t.method||this.method,i=t.url||this.url,n=t.responseType||this.responseType,r=void 0!==t.body?t.body:this.body,s=void 0!==t.withCredentials?t.withCredentials:this.withCredentials,o=void 0!==t.reportProgress?t.reportProgress:this.reportProgress;let a=t.headers||this.headers,l=t.params||this.params;return void 0!==t.setHeaders&&(a=Object.keys(t.setHeaders).reduce((e,i)=>e.set(i,t.setHeaders[i]),a)),t.setParams&&(l=Object.keys(t.setParams).reduce((e,i)=>e.set(i,t.setParams[i]),l)),new pp(e,i,r,{params:l,headers:a,reportProgress:o,responseType:n,withCredentials:s})}}var fp=function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t}({});class mp{constructor(t,e=200,i="OK"){this.headers=t.headers||new op,this.status=void 0!==t.status?t.status:e,this.statusText=t.statusText||i,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}}class gp extends mp{constructor(t={}){super(t),this.type=fp.ResponseHeader}clone(t={}){return new gp({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class Ap extends mp{constructor(t={}){super(t),this.type=fp.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new Ap({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class bp extends mp{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${t.url||"(unknown url)"}`:`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}}function vp(t,e){return{body:e,headers:t.headers,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}let _p=(()=>{class t{constructor(t){this.handler=t}request(t,e,i={}){let n;if(t instanceof pp)n=t;else{let r,s;r=i.headers instanceof op?i.headers:new op(i.headers),i.params&&(s=i.params instanceof cp?i.params:new cp({fromObject:i.params})),n=new pp(t,e,void 0!==i.body?i.body:null,{headers:r,params:s,reportProgress:i.reportProgress,responseType:i.responseType||"json",withCredentials:i.withCredentials})}const r=Se(n).pipe(np(t=>this.handler.handle(t)));if(t instanceof pp||"events"===i.observe)return r;const s=r.pipe(He(t=>t instanceof Ap));switch(i.observe||"body"){case"body":switch(n.responseType){case"arraybuffer":return s.pipe(Object(Ge.a)(t=>{if(null!==t.body&&!(t.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return t.body}));case"blob":return s.pipe(Object(Ge.a)(t=>{if(null!==t.body&&!(t.body instanceof Blob))throw new Error("Response is not a Blob.");return t.body}));case"text":return s.pipe(Object(Ge.a)(t=>{if(null!==t.body&&"string"!=typeof t.body)throw new Error("Response is not a string.");return t.body}));case"json":default:return s.pipe(Object(Ge.a)(t=>t.body))}case"response":return s;default:throw new Error(`Unreachable: unhandled observe type ${i.observe}}`)}}delete(t,e={}){return this.request("DELETE",t,e)}get(t,e={}){return this.request("GET",t,e)}head(t,e={}){return this.request("HEAD",t,e)}jsonp(t,e){return this.request("JSONP",t,{params:(new cp).append(e,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,e={}){return this.request("OPTIONS",t,e)}patch(t,e,i={}){return this.request("PATCH",t,vp(i,e))}post(t,e,i={}){return this.request("POST",t,vp(i,e))}put(t,e,i={}){return this.request("PUT",t,vp(i,e))}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(rp))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();class yp{constructor(t,e){this.next=t,this.interceptor=e}handle(t){return this.interceptor.intercept(t,this.next)}}const wp=new r.s("HTTP_INTERCEPTORS");let xp=(()=>{class t{intercept(t,e){return e.handle(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();const Cp=/^\)\]\}',?\n/;class Sp{}let kp=(()=>{class t{constructor(){}build(){return new XMLHttpRequest}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),Ep=(()=>{class t{constructor(t){this.xhrFactory=t}handle(t){if("JSONP"===t.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new Ze.a(e=>{const i=this.xhrFactory.build();if(i.open(t.method,t.urlWithParams),t.withCredentials&&(i.withCredentials=!0),t.headers.forEach((t,e)=>i.setRequestHeader(t,e.join(","))),t.headers.has("Accept")||i.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){const e=t.detectContentTypeHeader();null!==e&&i.setRequestHeader("Content-Type",e)}if(t.responseType){const e=t.responseType.toLowerCase();i.responseType="json"!==e?e:"text"}const n=t.serializeBody();let r=null;const s=()=>{if(null!==r)return r;const e=1223===i.status?204:i.status,n=i.statusText||"OK",s=new op(i.getAllResponseHeaders()),o=function(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(i)||t.url;return r=new gp({headers:s,status:e,statusText:n,url:o}),r},o=()=>{let{headers:n,status:r,statusText:o,url:a}=s(),l=null;204!==r&&(l=void 0===i.response?i.responseText:i.response),0===r&&(r=l?200:0);let c=r>=200&&r<300;if("json"===t.responseType&&"string"==typeof l){const t=l;l=l.replace(Cp,"");try{l=""!==l?JSON.parse(l):null}catch(h){l=t,c&&(c=!1,l={error:h,text:l})}}c?(e.next(new Ap({body:l,headers:n,status:r,statusText:o,url:a||void 0})),e.complete()):e.error(new bp({error:l,headers:n,status:r,statusText:o,url:a||void 0}))},a=t=>{const{url:n}=s(),r=new bp({error:t,status:i.status||0,statusText:i.statusText||"Unknown Error",url:n||void 0});e.error(r)};let l=!1;const c=n=>{l||(e.next(s()),l=!0);let r={type:fp.DownloadProgress,loaded:n.loaded};n.lengthComputable&&(r.total=n.total),"text"===t.responseType&&i.responseText&&(r.partialText=i.responseText),e.next(r)},h=t=>{let i={type:fp.UploadProgress,loaded:t.loaded};t.lengthComputable&&(i.total=t.total),e.next(i)};return i.addEventListener("load",o),i.addEventListener("error",a),i.addEventListener("timeout",a),i.addEventListener("abort",a),t.reportProgress&&(i.addEventListener("progress",c),null!==n&&i.upload&&i.upload.addEventListener("progress",h)),i.send(n),e.next({type:fp.Sent}),()=>{i.removeEventListener("error",a),i.removeEventListener("abort",a),i.removeEventListener("load",o),i.removeEventListener("timeout",a),t.reportProgress&&(i.removeEventListener("progress",c),null!==n&&i.upload&&i.upload.removeEventListener("progress",h)),i.readyState!==i.DONE&&i.abort()}})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Sp))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();const Dp=new r.s("XSRF_COOKIE_NAME"),Ip=new r.s("XSRF_HEADER_NAME");class Pp{}let Op=(()=>{class t{constructor(t,e,i){this.doc=t,this.platform=e,this.cookieName=i,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=ot(t,this.cookieName),this.lastCookieString=t),this.lastToken}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(a),r.Zb(r.D),r.Zb(Dp))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),Mp=(()=>{class t{constructor(t,e){this.tokenService=t,this.headerName=e}intercept(t,e){const i=t.url.toLowerCase();if("GET"===t.method||"HEAD"===t.method||i.startsWith("http://")||i.startsWith("https://"))return e.handle(t);const n=this.tokenService.getToken();return null===n||t.headers.has(this.headerName)||(t=t.clone({headers:t.headers.set(this.headerName,n)})),e.handle(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Pp),r.Zb(Ip))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),Tp=(()=>{class t{constructor(t,e){this.backend=t,this.injector=e,this.chain=null}handle(t){if(null===this.chain){const t=this.injector.get(wp,[]);this.chain=t.reduceRight((t,e)=>new yp(t,e),this.backend)}return this.chain.handle(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(sp),r.Zb(r.t))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),Rp=(()=>{class t{static disable(){return{ngModule:t,providers:[{provide:Mp,useClass:xp}]}}static withOptions(e={}){return{ngModule:t,providers:[e.cookieName?{provide:Dp,useValue:e.cookieName}:[],e.headerName?{provide:Ip,useValue:e.headerName}:[]]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[Mp,{provide:wp,useExisting:Mp,multi:!0},{provide:Pp,useClass:Op},{provide:Dp,useValue:"XSRF-TOKEN"},{provide:Ip,useValue:"X-XSRF-TOKEN"}]}),t})(),Vp=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[_p,{provide:rp,useClass:Tp},Ep,{provide:sp,useExisting:Ep},kp,{provide:Sp,useExisting:kp}],imports:[[Rp.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),t})();const Fp=["*"];function Lp(t){return Error(`Unable to find icon with the name "${t}"`)}function Up(t){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${t}".`)}function Bp(t){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${t}".`)}class Np{constructor(t,e,i){this.url=t,this.svgText=e,this.options=i}}let jp=(()=>{class t{constructor(t,e,i,n){this._httpClient=t,this._sanitizer=e,this._errorHandler=n,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._resolvers=[],this._defaultFontSetClass="material-icons",this._document=i}addSvgIcon(t,e,i){return this.addSvgIconInNamespace("",t,e,i)}addSvgIconLiteral(t,e,i){return this.addSvgIconLiteralInNamespace("",t,e,i)}addSvgIconInNamespace(t,e,i,n){return this._addSvgIconConfig(t,e,new Np(i,null,n))}addSvgIconResolver(t){return this._resolvers.push(t),this}addSvgIconLiteralInNamespace(t,e,i,n){const s=this._sanitizer.sanitize(r.L.HTML,i);if(!s)throw Bp(i);return this._addSvgIconConfig(t,e,new Np("",s,n))}addSvgIconSet(t,e){return this.addSvgIconSetInNamespace("",t,e)}addSvgIconSetLiteral(t,e){return this.addSvgIconSetLiteralInNamespace("",t,e)}addSvgIconSetInNamespace(t,e,i){return this._addSvgIconSetConfig(t,new Np(e,null,i))}addSvgIconSetLiteralInNamespace(t,e,i){const n=this._sanitizer.sanitize(r.L.HTML,e);if(!n)throw Bp(e);return this._addSvgIconSetConfig(t,new Np("",n,i))}registerFontClassAlias(t,e=t){return this._fontCssClassesByAlias.set(t,e),this}classNameForFontAlias(t){return this._fontCssClassesByAlias.get(t)||t}setDefaultFontSetClass(t){return this._defaultFontSetClass=t,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(t){const e=this._sanitizer.sanitize(r.L.RESOURCE_URL,t);if(!e)throw Up(t);const i=this._cachedIconsByUrl.get(e);return i?Se(zp(i)):this._loadSvgIconFromConfig(new Np(t,null)).pipe(Pe(t=>this._cachedIconsByUrl.set(e,t)),Object(Ge.a)(t=>zp(t)))}getNamedSvgIcon(t,e=""){const i=Hp(e,t);let n=this._svgIconConfigs.get(i);if(n)return this._getSvgFromConfig(n);if(n=this._getIconConfigFromResolvers(e,t),n)return this._svgIconConfigs.set(i,n),this._getSvgFromConfig(n);const r=this._iconSetConfigs.get(e);return r?this._getSvgFromIconSetConfigs(t,r):Un(Lp(i))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(t){return t.svgText?Se(zp(this._svgElementFromConfig(t))):this._loadSvgIconFromConfig(t).pipe(Object(Ge.a)(t=>zp(t)))}_getSvgFromIconSetConfigs(t,e){const i=this._extractIconWithNameFromAnySet(t,e);return i?Se(i):ec(e.filter(t=>!t.svgText).map(t=>this._loadSvgIconSetFromConfig(t).pipe(qd(e=>{const i=this._sanitizer.sanitize(r.L.RESOURCE_URL,t.url);return this._errorHandler.handleError(new Error(`Loading icon set URL: ${i} failed: ${e.message}`)),Se(null)})))).pipe(Object(Ge.a)(()=>{const i=this._extractIconWithNameFromAnySet(t,e);if(!i)throw Lp(t);return i}))}_extractIconWithNameFromAnySet(t,e){for(let i=e.length-1;i>=0;i--){const n=e[i];if(n.svgText&&n.svgText.indexOf(t)>-1){const e=this._svgElementFromConfig(n),i=this._extractSvgIconFromSet(e,t,n.options);if(i)return i}}return null}_loadSvgIconFromConfig(t){return this._fetchIcon(t).pipe(Pe(e=>t.svgText=e),Object(Ge.a)(()=>this._svgElementFromConfig(t)))}_loadSvgIconSetFromConfig(t){return t.svgText?Se(null):this._fetchIcon(t).pipe(Pe(e=>t.svgText=e))}_extractSvgIconFromSet(t,e,i){const n=t.querySelector(`[id="${e}"]`);if(!n)return null;const r=n.cloneNode(!0);if(r.removeAttribute("id"),"svg"===r.nodeName.toLowerCase())return this._setSvgAttributes(r,i);if("symbol"===r.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(r),i);const s=this._svgElementFromString("<svg></svg>");return s.appendChild(r),this._setSvgAttributes(s,i)}_svgElementFromString(t){const e=this._document.createElement("DIV");e.innerHTML=t;const i=e.querySelector("svg");if(!i)throw Error("<svg> tag not found");return i}_toSvgElement(t){const e=this._svgElementFromString("<svg></svg>"),i=t.attributes;for(let n=0;n<i.length;n++){const{name:t,value:r}=i[n];"id"!==t&&e.setAttribute(t,r)}for(let n=0;n<t.childNodes.length;n++)t.childNodes[n].nodeType===this._document.ELEMENT_NODE&&e.appendChild(t.childNodes[n].cloneNode(!0));return e}_setSvgAttributes(t,e){return t.setAttribute("fit",""),t.setAttribute("height","100%"),t.setAttribute("width","100%"),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.setAttribute("focusable","false"),e&&e.viewBox&&t.setAttribute("viewBox",e.viewBox),t}_fetchIcon(t){var e;const{url:i,options:n}=t,s=null!==(e=null==n?void 0:n.withCredentials)&&void 0!==e&&e;if(!this._httpClient)throw Error("Could not find HttpClient provider for use with Angular Material icons. Please include the HttpClientModule from @angular/common/http in your app imports.");if(null==i)throw Error(`Cannot fetch icon from URL "${i}".`);const o=this._sanitizer.sanitize(r.L.RESOURCE_URL,i);if(!o)throw Up(i);const a=this._inProgressUrlFetches.get(o);if(a)return a;const l=this._httpClient.get(o,{responseType:"text",withCredentials:s}).pipe(Xd(()=>this._inProgressUrlFetches.delete(o)),Object(ep.a)());return this._inProgressUrlFetches.set(o,l),l}_addSvgIconConfig(t,e,i){return this._svgIconConfigs.set(Hp(t,e),i),this}_addSvgIconSetConfig(t,e){const i=this._iconSetConfigs.get(t);return i?i.push(e):this._iconSetConfigs.set(t,[e]),this}_svgElementFromConfig(t){if(!t.svgElement){const e=this._svgElementFromString(t.svgText);this._setSvgAttributes(e,t.options),t.svgElement=e}return t.svgElement}_getIconConfigFromResolvers(t,e){for(let n=0;n<this._resolvers.length;n++){const r=this._resolvers[n](e,t);if(r)return(i=r).url&&i.options?new Np(r.url,null,r.options):new Np(r,null)}var i}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(_p,8),r.Zb(ne),r.Zb(a,8),r.Zb(r.n))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(_p,8),Object(r.Zb)(ne),Object(r.Zb)(a,8),Object(r.Zb)(r.n))},token:t,providedIn:"root"}),t})();function zp(t){return t.cloneNode(!0)}function Hp(t,e){return t+":"+e}class Kp{constructor(t){this._elementRef=t}}const $p=Ea(Kp),Gp=new r.s("mat-icon-location",{providedIn:"root",factory:function(){const t=Object(r.X)(a),e=t?t.location:null;return{getPathname:()=>e?e.pathname+e.search:""}}}),Wp=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],Zp=Wp.map(t=>`[${t}]`).join(", "),qp=/^url\(['"]?#(.*?)['"]?\)$/;let Yp=(()=>{class t extends $p{constructor(t,e,i,n,r){super(t),this._iconRegistry=e,this._location=n,this._errorHandler=r,this._inline=!1,this._currentIconFetch=ye.a.EMPTY,i||t.nativeElement.setAttribute("aria-hidden","true")}get inline(){return this._inline}set inline(t){this._inline=ti(t)}get svgIcon(){return this._svgIcon}set svgIcon(t){t!==this._svgIcon&&(t?this._updateSvgIcon(t):this._svgIcon&&this._clearSvgElement(),this._svgIcon=t)}get fontSet(){return this._fontSet}set fontSet(t){const e=this._cleanupFontValue(t);e!==this._fontSet&&(this._fontSet=e,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(t){const e=this._cleanupFontValue(t);e!==this._fontIcon&&(this._fontIcon=e,this._updateFontIconClasses())}_splitIconName(t){if(!t)return["",""];const e=t.split(":");switch(e.length){case 1:return["",e[0]];case 2:return e;default:throw Error(`Invalid icon name: "${t}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){const t=this._elementsWithExternalReferences;if(t&&t.size){const t=this._location.getPathname();t!==this._previousPath&&(this._previousPath=t,this._prependPathToReferences(t))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(t){this._clearSvgElement();const e=t.querySelectorAll("style");for(let n=0;n<e.length;n++)e[n].textContent+=" ";const i=this._location.getPathname();this._previousPath=i,this._cacheChildrenWithExternalReferences(t),this._prependPathToReferences(i),this._elementRef.nativeElement.appendChild(t)}_clearSvgElement(){const t=this._elementRef.nativeElement;let e=t.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();e--;){const i=t.childNodes[e];1===i.nodeType&&"svg"!==i.nodeName.toLowerCase()||t.removeChild(i)}}_updateFontIconClasses(){if(!this._usingFontIcon())return;const t=this._elementRef.nativeElement,e=this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet):this._iconRegistry.getDefaultFontSetClass();e!=this._previousFontSetClass&&(this._previousFontSetClass&&t.classList.remove(this._previousFontSetClass),e&&t.classList.add(e),this._previousFontSetClass=e),this.fontIcon!=this._previousFontIconClass&&(this._previousFontIconClass&&t.classList.remove(this._previousFontIconClass),this.fontIcon&&t.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(t){return"string"==typeof t?t.trim().split(" ")[0]:t}_prependPathToReferences(t){const e=this._elementsWithExternalReferences;e&&e.forEach((e,i)=>{e.forEach(e=>{i.setAttribute(e.name,`url('${t}#${e.value}')`)})})}_cacheChildrenWithExternalReferences(t){const e=t.querySelectorAll(Zp),i=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let n=0;n<e.length;n++)Wp.forEach(t=>{const r=e[n],s=r.getAttribute(t),o=s?s.match(qp):null;if(o){let e=i.get(r);e||(e=[],i.set(r,e)),e.push({name:t,value:o[1]})}})}_updateSvgIcon(t){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),t){const[e,i]=this._splitIconName(t);e&&(this._svgNamespace=e),i&&(this._svgName=i),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(i,e).pipe(Qe(1)).subscribe(t=>this._setSvgElement(t),t=>{this._errorHandler.handleError(new Error(`Error retrieving icon ${e}:${i}! ${t.message}`))})}}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(jp),r.ac("aria-hidden"),r.Pb(Gp),r.Pb(r.n))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:7,hostBindings:function(t,e){2&t&&(r.Eb("data-mat-icon-type",e._usingFontIcon()?"font":"svg")("data-mat-icon-name",e._svgName||e.fontIcon)("data-mat-icon-namespace",e._svgNamespace||e.fontSet),r.Hb("mat-icon-inline",e.inline)("mat-icon-no-color","primary"!==e.color&&"accent"!==e.color&&"warn"!==e.color))},inputs:{color:"color",inline:"inline",svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],features:[r.Ab],ngContentSelectors:Fp,decls:1,vars:0,template:function(t,e){1&t&&(r.mc(),r.lc(0))},styles:[".mat-icon{background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}\n"],encapsulation:2,changeDetection:0}),t})(),Qp=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Sa],Sa]}),t})();const Xp=["ngx-mat-calendar-body",""];function Jp(t,e){if(1&t&&(r.Vb(0,"tr",2),r.Vb(1,"td",3),r.Kc(2),r.Ub(),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Fc("padding-top",t._cellPadding)("padding-bottom",t._cellPadding),r.Eb("colspan",t.numCols),r.Db(1),r.Mc(" ",t.label," ")}}function tf(t,e){if(1&t&&(r.Vb(0,"td",7),r.Kc(1),r.Ub()),2&t){const t=r.gc(2);r.Fc("padding-top",t._cellPadding)("padding-bottom",t._cellPadding),r.Eb("colspan",t._firstRowOffset),r.Db(1),r.Mc(" ",t._firstRowOffset>=t.labelMinRequiredCells?t.label:""," ")}}function ef(t,e){if(1&t){const t=r.Wb();r.Vb(0,"td",8),r.cc("click",function(i){r.Ac(t);const n=e.$implicit;return r.gc(2)._cellClicked(n,i)}),r.Vb(1,"div",9),r.Kc(2),r.Ub(),r.Qb(3,"div",10),r.Ub()}if(2&t){const t=e.$implicit,i=e.index,n=r.gc().index,s=r.gc();r.Fc("width",s._cellWidth)("padding-top",s._cellPadding)("padding-bottom",s._cellPadding),r.Hb("mat-calendar-body-disabled",!t.enabled)("mat-calendar-body-active",s._isActiveCell(n,i))("mat-calendar-body-range-start",s._isRangeStart(t.compareValue))("mat-calendar-body-range-end",s._isRangeEnd(t.compareValue))("mat-calendar-body-in-range",s._isInRange(t.compareValue))("mat-calendar-body-comparison-bridge-start",s._isComparisonBridgeStart(t.compareValue,n,i))("mat-calendar-body-comparison-bridge-end",s._isComparisonBridgeEnd(t.compareValue,n,i))("mat-calendar-body-comparison-start",s._isComparisonStart(t.compareValue))("mat-calendar-body-comparison-end",s._isComparisonEnd(t.compareValue))("mat-calendar-body-in-comparison-range",s._isInComparisonRange(t.compareValue))("mat-calendar-body-preview-start",s._isPreviewStart(t.compareValue))("mat-calendar-body-preview-end",s._isPreviewEnd(t.compareValue))("mat-calendar-body-in-preview",s._isInPreview(t.compareValue)),r.nc("ngClass",t.cssClasses)("tabindex",s._isActiveCell(n,i)?0:-1),r.Eb("data-mat-row",n)("data-mat-col",i)("aria-label",t.ariaLabel)("aria-disabled",!t.enabled||null)("aria-selected",s._isSelected(t)),r.Db(1),r.Hb("mat-calendar-body-selected",s._isSelected(t))("mat-calendar-body-today",s.todayValue===t.compareValue),r.Db(1),r.Mc(" ",t.displayValue," ")}}function nf(t,e){if(1&t&&(r.Vb(0,"tr",4),r.Ic(1,tf,2,6,"td",5),r.Ic(2,ef,4,44,"td",6),r.Ub()),2&t){const t=e.$implicit,i=e.index,n=r.gc();r.Db(1),r.nc("ngIf",0===i&&n._firstRowOffset),r.Db(1),r.nc("ngForOf",t)}}function rf(t,e){if(1&t&&(r.Vb(0,"th",5),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.Eb("aria-label",t.long),r.Db(1),r.Lc(t.narrow)}}const sf=["*"];function of(t,e){}function af(t,e){if(1&t){const t=r.Wb();r.Vb(0,"ngx-mat-month-view",5),r.cc("activeDateChange",function(e){return r.Ac(t),r.gc().activeDate=e})("selectedChange",function(e){return r.Ac(t),r.gc()._dateSelected(e)})("_userSelection",function(){return r.Ac(t),r.gc()._userSelected()}),r.Ub()}if(2&t){const t=r.gc();r.nc("activeDate",t.activeDate)("selected",t.selected)("dateFilter",t.dateFilter)("maxDate",t.maxDate)("minDate",t.minDate)("dateClass",t.dateClass)}}function lf(t,e){if(1&t){const t=r.Wb();r.Vb(0,"ngx-mat-year-view",6),r.cc("activeDateChange",function(e){return r.Ac(t),r.gc().activeDate=e})("monthSelected",function(e){return r.Ac(t),r.gc()._monthSelectedInYearView(e)})("selectedChange",function(e){return r.Ac(t),r.gc()._goToDateInView(e,"month")}),r.Ub()}if(2&t){const t=r.gc();r.nc("activeDate",t.activeDate)("selected",t.selected)("dateFilter",t.dateFilter)("maxDate",t.maxDate)("minDate",t.minDate)}}function cf(t,e){if(1&t){const t=r.Wb();r.Vb(0,"ngx-mat-multi-year-view",7),r.cc("activeDateChange",function(e){return r.Ac(t),r.gc().activeDate=e})("yearSelected",function(e){return r.Ac(t),r.gc()._yearSelectedInMultiYearView(e)})("selectedChange",function(e){return r.Ac(t),r.gc()._goToDateInView(e,"year")}),r.Ub()}if(2&t){const t=r.gc();r.nc("activeDate",t.activeDate)("selected",t.selected)("dateFilter",t.dateFilter)("maxDate",t.maxDate)("minDate",t.minDate)}}function hf(t,e){if(1&t){const t=r.Wb();r.Vb(0,"td"),r.Vb(1,"button",10),r.cc("click",function(){return r.Ac(t),r.gc(2).change("second",!0)}),r.Vb(2,"mat-icon"),r.Kc(3,"expand_less"),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=r.gc(2);r.Db(1),r.nc("disabled",t.disabled||t.disableMinute)}}function uf(t,e){1&t&&r.Qb(0,"td",6)}function df(t,e){1&t&&r.Qb(0,"td")}function pf(t,e){if(1&t){const t=r.Wb();r.Vb(0,"tr"),r.Vb(1,"td"),r.Vb(2,"button",10),r.cc("click",function(){return r.Ac(t),r.gc().change("hour",!0)}),r.Vb(3,"mat-icon"),r.Kc(4,"expand_less"),r.Ub(),r.Ub(),r.Ub(),r.Qb(5,"td"),r.Vb(6,"td"),r.Vb(7,"button",10),r.cc("click",function(){return r.Ac(t),r.gc().change("minute",!0)}),r.Vb(8,"mat-icon"),r.Kc(9,"expand_less"),r.Ub(),r.Ub(),r.Ub(),r.Qb(10,"td"),r.Ic(11,hf,4,1,"td",3),r.Ic(12,uf,1,0,"td",8),r.Ic(13,df,1,0,"td",3),r.Ub()}if(2&t){const t=r.gc();r.Db(2),r.nc("disabled",t.disabled),r.Db(5),r.nc("disabled",t.disabled||t.disableMinute),r.Db(4),r.nc("ngIf",t.showSeconds),r.Db(1),r.nc("ngIf",t.enableMeridian),r.Db(1),r.nc("ngIf",t.enableMeridian)}}function ff(t,e){1&t&&(r.Vb(0,"td",6),r.Kc(1,":"),r.Ub())}function mf(t,e){if(1&t){const t=r.Wb();r.Vb(0,"td"),r.Vb(1,"mat-form-field",4),r.Vb(2,"input",11),r.cc("input",function(e){return r.Ac(t),r.gc().formatInput(e.target)})("keydown.ArrowUp",function(e){return r.Ac(t),r.gc().change("second",!0),e.preventDefault()})("keydown.ArrowDown",function(e){return r.Ac(t),r.gc().change("second",!1),e.preventDefault()})("blur",function(){return r.Ac(t),r.gc().change("second")}),r.Ub(),r.Ub(),r.Ub()}}function gf(t,e){1&t&&r.Qb(0,"td",6)}function Af(t,e){if(1&t){const t=r.Wb();r.Vb(0,"td",12),r.Vb(1,"button",13),r.cc("click",function(){return r.Ac(t),r.gc().toggleMeridian()}),r.Kc(2),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.Db(1),r.nc("color",t.color)("disabled",t.disabled),r.Db(1),r.Mc(" ",t.meridian," ")}}function bf(t,e){1&t&&r.Qb(0,"td")}function vf(t,e){if(1&t){const t=r.Wb();r.Vb(0,"td"),r.Vb(1,"button",14),r.cc("click",function(){return r.Ac(t),r.gc(2).change("second",!1)}),r.Vb(2,"mat-icon"),r.Kc(3,"expand_more"),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=r.gc(2);r.Db(1),r.nc("disabled",t.disabled||t.disableMinute)}}function _f(t,e){1&t&&r.Qb(0,"td",6)}function yf(t,e){1&t&&r.Qb(0,"td")}function wf(t,e){if(1&t){const t=r.Wb();r.Vb(0,"tr"),r.Vb(1,"td"),r.Vb(2,"button",14),r.cc("click",function(){return r.Ac(t),r.gc().change("hour",!1)}),r.Vb(3,"mat-icon"),r.Kc(4,"expand_more"),r.Ub(),r.Ub(),r.Ub(),r.Qb(5,"td"),r.Vb(6,"td"),r.Vb(7,"button",14),r.cc("click",function(){return r.Ac(t),r.gc().change("minute",!1)}),r.Vb(8,"mat-icon"),r.Kc(9,"expand_more"),r.Ub(),r.Ub(),r.Ub(),r.Ic(10,bf,1,0,"td",3),r.Ic(11,vf,4,1,"td",3),r.Ic(12,_f,1,0,"td",8),r.Ic(13,yf,1,0,"td",3),r.Ub()}if(2&t){const t=r.gc();r.Db(2),r.nc("disabled",t.disabled),r.Db(5),r.nc("disabled",t.disabled||t.disableMinute),r.Db(3),r.nc("ngIf",t.showSeconds),r.Db(1),r.nc("ngIf",t.showSeconds),r.Db(1),r.nc("ngIf",t.enableMeridian),r.Db(1),r.nc("ngIf",t.enableMeridian)}}function xf(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",6),r.Vb(1,"ngx-mat-timepicker",7),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).datepicker._selected=e}),r.Ub(),r.Ub()}if(2&t){const t=r.gc(2);r.Hb("disable-seconds",!t.datepicker._showSeconds),r.Db(1),r.nc("showSpinners",t.datepicker._showSpinners)("showSeconds",t.datepicker._showSeconds)("disabled",t.datepicker._disabled)("stepHour",t.datepicker._stepHour)("stepMinute",t.datepicker._stepMinute)("stepSecond",t.datepicker._stepSecond)("ngModel",t.datepicker._selected)("color",t.datepicker._color)("enableMeridian",t.datepicker._enableMeridian)("disableMinute",t.datepicker._disableMinute)}}function Cf(t,e){1&t&&(r.Vb(0,"mat-icon"),r.Kc(1,"done"),r.Ub())}function Sf(t,e){}function kf(t,e){if(1&t){const t=r.Wb();r.Tb(0),r.Ic(1,xf,2,12,"div",2),r.Vb(2,"div",3),r.Vb(3,"button",4),r.cc("click",function(){return r.Ac(t),r.gc().datepicker.ok()}),r.Ic(4,Cf,2,0,"mat-icon",1),r.Ic(5,Sf,0,0,"ng-template",5),r.Ub(),r.Ub(),r.Sb()}if(2&t){const t=r.gc();r.Db(1),r.nc("ngIf",!t.datepicker._hideTime),r.Db(2),r.nc("color",t.datepicker._color)("disabled",!t.valid),r.Db(1),r.nc("ngIf",!t.datepicker._customIcon),r.Db(1),r.nc("cdkPortalOutlet",t._templateCustomIconPortal)}}class Ef extends Ta{isSameTime(t,e){return null==t||null==e||this.getHour(t)===this.getHour(e)&&this.getMinute(t)===this.getMinute(e)&&this.getSecond(t)===this.getSecond(e)}copyTime(t,e){this.setHour(t,this.getHour(e)),this.setMinute(t,this.getMinute(e)),this.setSecond(t,this.getSecond(e))}compareDateWithTime(t,e,i){let n=super.compareDate(t,e)||this.getHour(t)-this.getHour(e)||this.getMinute(t)-this.getMinute(e);return i&&(n=n||this.getSecond(t)-this.getSecond(e)),n}setTimeByDefaultValues(t,e){if(!Array.isArray(e))throw Error("@Input DefaultTime should be an array");this.setHour(t,e[0]||0),this.setMinute(t,e[1]||0),this.setSecond(t,e[2]||0)}}const Df=new r.s("ngx-mat-date-formats");class If{constructor(t,e,i,n,r={},s=t,o){this.value=t,this.displayValue=e,this.ariaLabel=i,this.enabled=n,this.cssClasses=r,this.compareValue=s,this.rawValue=o}}let Pf=(()=>{class t{constructor(t,e){this._elementRef=t,this._ngZone=e,this.numCols=7,this.activeCell=0,this.isRange=!1,this.cellAspectRatio=1,this.previewStart=null,this.previewEnd=null,this.selectedValueChange=new r.o,this.previewChange=new r.o,this._enterHandler=t=>{if(this._skipNextFocus&&"focus"===t.type)this._skipNextFocus=!1;else if(t.target&&this.isRange){const e=this._getCellFromElement(t.target);e&&this._ngZone.run(()=>this.previewChange.emit({value:e.enabled?e:null,event:t}))}},this._leaveHandler=t=>{null!==this.previewEnd&&this.isRange&&t.target&&Of(t.target)&&this._ngZone.run(()=>this.previewChange.emit({value:null,event:t}))},e.runOutsideAngular(()=>{const e=t.nativeElement;e.addEventListener("mouseenter",this._enterHandler,!0),e.addEventListener("focus",this._enterHandler,!0),e.addEventListener("mouseleave",this._leaveHandler,!0),e.addEventListener("blur",this._leaveHandler,!0)})}_cellClicked(t,e){t.enabled&&this.selectedValueChange.emit({value:t.value,event:e})}_isSelected(t){return this.startValue===t.compareValue||this.endValue===t.compareValue}ngOnChanges(t){const e=t.numCols,{rows:i,numCols:n}=this;(t.rows||e)&&(this._firstRowOffset=i&&i.length&&i[0].length?n-i[0].length:0),(t.cellAspectRatio||e||!this._cellPadding)&&(this._cellPadding=50*this.cellAspectRatio/n+"%"),!e&&this._cellWidth||(this._cellWidth=100/n+"%")}ngOnDestroy(){const t=this._elementRef.nativeElement;t.removeEventListener("mouseenter",this._enterHandler,!0),t.removeEventListener("focus",this._enterHandler,!0),t.removeEventListener("mouseleave",this._leaveHandler,!0),t.removeEventListener("blur",this._leaveHandler,!0)}_isActiveCell(t,e){let i=t*this.numCols+e;return t&&(i-=this._firstRowOffset),i==this.activeCell}_focusActiveCell(t=!0){this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.asObservable().pipe(Qe(1)).subscribe(()=>{const e=this._elementRef.nativeElement.querySelector(".ngx-mat-calendar-body-active");e&&(t||(this._skipNextFocus=!0),e.focus())})})}_isRangeStart(t){return Mf(t,this.startValue,this.endValue)}_isRangeEnd(t){return Tf(t,this.startValue,this.endValue)}_isInRange(t){return Rf(t,this.startValue,this.endValue,this.isRange)}_isComparisonStart(t){return Mf(t,this.comparisonStart,this.comparisonEnd)}_isComparisonBridgeStart(t,e,i){if(!this._isComparisonStart(t)||this._isRangeStart(t)||!this._isInRange(t))return!1;let n=this.rows[e][i-1];if(!n){const t=this.rows[e-1];n=t&&t[t.length-1]}return n&&!this._isRangeEnd(n.compareValue)}_isComparisonBridgeEnd(t,e,i){if(!this._isComparisonEnd(t)||this._isRangeEnd(t)||!this._isInRange(t))return!1;let n=this.rows[e][i+1];if(!n){const t=this.rows[e+1];n=t&&t[0]}return n&&!this._isRangeStart(n.compareValue)}_isComparisonEnd(t){return Tf(t,this.comparisonStart,this.comparisonEnd)}_isInComparisonRange(t){return Rf(t,this.comparisonStart,this.comparisonEnd,this.isRange)}_isPreviewStart(t){return Mf(t,this.previewStart,this.previewEnd)}_isPreviewEnd(t){return Tf(t,this.previewStart,this.previewEnd)}_isInPreview(t){return Rf(t,this.previewStart,this.previewEnd,this.isRange)}_getCellFromElement(t){let e;if(Of(t)?e=t:Of(t.parentNode)&&(e=t.parentNode),e){const t=e.getAttribute("data-ngx-mat-row"),i=e.getAttribute("data-ngx-mat-col");if(t&&i)return this.rows[parseInt(t)][parseInt(i)]}return null}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.B))},t.\u0275cmp=r.Jb({type:t,selectors:[["","ngx-mat-calendar-body",""]],hostAttrs:["role","grid","aria-readonly","true",1,"ngx-mat-calendar-body"],inputs:{numCols:"numCols",activeCell:"activeCell",isRange:"isRange",cellAspectRatio:"cellAspectRatio",previewStart:"previewStart",previewEnd:"previewEnd",label:"label",rows:"rows",todayValue:"todayValue",startValue:"startValue",endValue:"endValue",labelMinRequiredCells:"labelMinRequiredCells",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},outputs:{selectedValueChange:"selectedValueChange",previewChange:"previewChange"},exportAs:["NgxMatCalendarBody"],features:[r.Bb],attrs:Xp,decls:2,vars:2,consts:[["aria-hidden","true",4,"ngIf"],["role","row",4,"ngFor","ngForOf"],["aria-hidden","true"],[1,"mat-calendar-body-label"],["role","row"],["aria-hidden","true","class","mat-calendar-body-label",3,"paddingTop","paddingBottom",4,"ngIf"],["role","gridcell","class","mat-calendar-body-cell",3,"ngClass","tabindex","mat-calendar-body-disabled","mat-calendar-body-active","mat-calendar-body-range-start","mat-calendar-body-range-end","mat-calendar-body-in-range","mat-calendar-body-comparison-bridge-start","mat-calendar-body-comparison-bridge-end","mat-calendar-body-comparison-start","mat-calendar-body-comparison-end","mat-calendar-body-in-comparison-range","mat-calendar-body-preview-start","mat-calendar-body-preview-end","mat-calendar-body-in-preview","width","paddingTop","paddingBottom","click",4,"ngFor","ngForOf"],["aria-hidden","true",1,"mat-calendar-body-label"],["role","gridcell",1,"mat-calendar-body-cell",3,"ngClass","tabindex","click"],[1,"mat-calendar-body-cell-content","mat-focus-indicator"],[1,"mat-calendar-body-cell-preview"]],template:function(t,e){1&t&&(r.Ic(0,Jp,3,6,"tr",0),r.Ic(1,nf,3,2,"tr",1)),2&t&&(r.nc("ngIf",e._firstRowOffset<e.labelMinRequiredCells),r.Db(1),r.nc("ngForOf",e.rows))},directives:[ut,ct,at],styles:['.mat-calendar-body{min-width:224px}.mat-calendar-body-label{height:0;line-height:0;padding-left:4.7142857143%;padding-right:4.7142857143%;text-align:left}.mat-calendar-body-cell{cursor:pointer;height:0;line-height:0;outline:none;position:relative;text-align:center}.mat-calendar-body-cell-preview,.mat-calendar-body-cell:after,.mat-calendar-body-cell:before{box-sizing:border-box;content:"";height:90%;left:0;position:absolute;top:5%;width:100%;z-index:0}.mat-calendar-body-comparison-start:after,.mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start):before,.mat-calendar-body-preview-start .mat-calendar-body-cell-preview,.mat-calendar-body-range-start:after,.mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range):before{border-bottom-left-radius:999px;border-top-left-radius:999px;left:5%;width:95%}[dir=rtl] .mat-calendar-body-comparison-start:after,[dir=rtl] .mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start):before,[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview,[dir=rtl] .mat-calendar-body-range-start:after,[dir=rtl] .mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range):before{border-bottom-right-radius:999px;border-radius:0;border-top-right-radius:999px;left:0}.mat-calendar-body-comparison-end:after,.mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end):before,.mat-calendar-body-preview-end .mat-calendar-body-cell-preview,.mat-calendar-body-range-end:after,.mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range):before{border-bottom-right-radius:999px;border-top-right-radius:999px;width:95%}[dir=rtl] .mat-calendar-body-comparison-end:after,[dir=rtl] .mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end):before,[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview,[dir=rtl] .mat-calendar-body-range-end:after,[dir=rtl] .mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range):before{border-bottom-left-radius:999px;border-radius:0;border-top-left-radius:999px;left:5%}[dir=rtl] .mat-calendar-body-comparison-bridge-end.mat-calendar-body-range-start:after,[dir=rtl] .mat-calendar-body-comparison-bridge-start.mat-calendar-body-range-end:after{border-bottom-right-radius:999px;border-top-right-radius:999px;width:95%}.mat-calendar-body-comparison-end.mat-calendar-body-range-start:after,.mat-calendar-body-comparison-start.mat-calendar-body-range-end:after,[dir=rtl] .mat-calendar-body-comparison-end.mat-calendar-body-range-start:after,[dir=rtl] .mat-calendar-body-comparison-start.mat-calendar-body-range-end:after{width:90%}.mat-calendar-body-in-preview .mat-calendar-body-cell-preview{border-bottom:1px dashed;border-top:1px dashed}.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:1px dashed}[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:0;border-right:1px dashed}.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:1px dashed}[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-left:1px dashed;border-right:0}.mat-calendar-body-disabled{cursor:default}.mat-calendar-body-cell-content{align-items:center;border-radius:999px;border-style:solid;border-width:1px;box-sizing:border-box;display:flex;height:90%;justify-content:center;left:5%;line-height:1;top:5%;width:90%;z-index:1}.mat-calendar-body-cell-content.mat-focus-indicator{position:absolute}.cdk-high-contrast-active .mat-calendar-body-cell-content{border:none}.cdk-high-contrast-active .mat-calendar-body-selected,.cdk-high-contrast-active .mat-datepicker-popup:not(:empty){outline:1px solid}.cdk-high-contrast-active .mat-calendar-body-today{outline:1px dotted}.cdk-high-contrast-active .cdk-keyboard-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected),.cdk-high-contrast-active .cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){outline:2px dotted}[dir=rtl] .mat-calendar-body-label{text-align:right}@media (hover:none){.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){background-color:transparent}}'],encapsulation:2,changeDetection:0}),t})();function Of(t){return"TD"===t.nodeName}function Mf(t,e,i){return null!==i&&e!==i&&t<i&&t===e}function Tf(t,e,i){return null!==e&&e!==i&&t>=e&&t===i}function Rf(t,e,i,n){return n&&null!==e&&null!==i&&e!==i&&t>=e&&t<=i}const Vf=new r.s("NGX_MAT_DATE_RANGE_SELECTION_STRATEGY");let Ff=(()=>{class t{constructor(t){this._dateAdapter=t}selectionFinished(t,e){let{start:i,end:n}=e;return null==i?i=t:null==n&&t&&this._dateAdapter.compareDate(t,i)>=0?n=t:(i=t,n=null),new rd(i,n)}createPreview(t,e){let i=null,n=null;return e.start&&!e.end&&t&&(i=e.start,n=t),new rd(i,n)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Ef))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();const Lf={minHour:0,maxHour:24,minMinute:0,maxMinute:60,minSecond:0,maxSecond:60,meridian:12},Uf=/[^0-9]/g,Bf=/^(2[0-3]|[0-1][0-9]|[0-9])$/,Nf=/^([0-5][0-9]|[0-9])$/,jf=/^([0-5][0-9]|[0-9])$/;function zf(t){const e=t.toString();return e.length>1?e:`0${e}`}function Hf(t){return Error(`NgxMatDatepicker: No provider found for ${t}. You must import one of the following modules at your application root: NgxMatNativeDateModule, NgxMatMomentModule, or provide a custom implementation.`)}let Kf=(()=>{class t{constructor(t,e,i,n,s){if(this._changeDetectorRef=t,this._dateFormats=e,this._dateAdapter=i,this._dir=n,this._rangeStrategy=s,this._rerenderSubscription=ye.a.EMPTY,this.selectedChange=new r.o,this._userSelection=new r.o,this.activeDateChange=new r.o,!this._dateAdapter)throw Hf("NgxMatDateAdapter");if(!this._dateFormats)throw Hf("NGX_MAT_DATE_FORMATS");this._activeDate=this._dateAdapter.today()}get activeDate(){return this._activeDate}set activeDate(t){const e=this._activeDate,i=this._getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(i,this.minDate,this.maxDate),this._hasSameMonthAndYear(e,this._activeDate)||this._init()}get selected(){return this._selected}set selected(t){this._selected=t instanceof rd?t:this._getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setRanges(this._selected)}get minDate(){return this._minDate}set minDate(t){this._minDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))}get maxDate(){return this._maxDate}set maxDate(t){this._maxDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(Pn(null)).subscribe(()=>this._init())}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_dateSelected(t){const e=t.value,i=this._dateAdapter.getYear(this.activeDate),n=this._dateAdapter.getMonth(this.activeDate),r=this._dateAdapter.createDate(i,n,e);let s,o;this._selected instanceof rd?(s=this._getDateInCurrentMonth(this._selected.start),o=this._getDateInCurrentMonth(this._selected.end)):s=o=this._getDateInCurrentMonth(this._selected),s===e&&o===e||this.selectedChange.emit(r),this._userSelection.emit({value:r,event:t.event})}_handleCalendarBodyKeydown(t){const e=this._activeDate,i=this._isRtl();switch(t.keyCode){case 37:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,i?1:-1);break;case 39:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,i?-1:1);break;case 38:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,-7);break;case 40:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,7);break;case 36:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,1-this._dateAdapter.getDate(this._activeDate));break;case 35:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,this._dateAdapter.getNumDaysInMonth(this._activeDate)-this._dateAdapter.getDate(this._activeDate));break;case 33:this.activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,-1):this._dateAdapter.addCalendarMonths(this._activeDate,-1);break;case 34:this.activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,1):this._dateAdapter.addCalendarMonths(this._activeDate,1);break;case 13:case 32:return void(this.dateFilter&&!this.dateFilter(this._activeDate)||(this._dateSelected({value:this._dateAdapter.getDate(this._activeDate),event:t}),t.preventDefault()));case 27:return void(null!=this._previewEnd&&(this._previewStart=this._previewEnd=null,this.selectedChange.emit(null),this._userSelection.emit({value:null,event:t}),t.preventDefault(),t.stopPropagation()));default:return}this._dateAdapter.compareDate(e,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),t.preventDefault()}_init(){this._setRanges(this.selected),this._todayDate=this._getCellCompareValue(this._dateAdapter.today()),this._monthLabel=this._dateAdapter.getMonthNames("short")[this._dateAdapter.getMonth(this.activeDate)].toLocaleUpperCase();let t=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),1);this._firstWeekOffset=(7+this._dateAdapter.getDayOfWeek(t)-this._dateAdapter.getFirstDayOfWeek())%7,this._initWeekdays(),this._createWeekCells(),this._changeDetectorRef.markForCheck()}_focusActiveCell(t){this._matCalendarBody._focusActiveCell(t)}_previewChanged({event:t,value:e}){if(this._rangeStrategy){const i=this._rangeStrategy.createPreview(e?e.rawValue:null,this.selected,t);this._previewStart=this._getCellCompareValue(i.start),this._previewEnd=this._getCellCompareValue(i.end),this._changeDetectorRef.detectChanges()}}_initWeekdays(){const t=this._dateAdapter.getFirstDayOfWeek(),e=this._dateAdapter.getDayOfWeekNames("narrow");let i=this._dateAdapter.getDayOfWeekNames("long").map((t,i)=>({long:t,narrow:e[i]}));this._weekdays=i.slice(t).concat(i.slice(0,t))}_createWeekCells(){const t=this._dateAdapter.getNumDaysInMonth(this.activeDate),e=this._dateAdapter.getDateNames();this._weeks=[[]];for(let i=0,n=this._firstWeekOffset;i<t;i++,n++){7==n&&(this._weeks.push([]),n=0);const t=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),i+1),r=this._shouldEnableDate(t),s=this._dateAdapter.format(t,this._dateFormats.display.dateA11yLabel),o=this.dateClass?this.dateClass(t):void 0;this._weeks[this._weeks.length-1].push(new If(i+1,e[i],s,r,o,this._getCellCompareValue(t),t))}}_shouldEnableDate(t){return!!t&&(!this.minDate||this._dateAdapter.compareDate(t,this.minDate)>=0)&&(!this.maxDate||this._dateAdapter.compareDate(t,this.maxDate)<=0)&&(!this.dateFilter||this.dateFilter(t))}_getDateInCurrentMonth(t){return t&&this._hasSameMonthAndYear(t,this.activeDate)?this._dateAdapter.getDate(t):null}_hasSameMonthAndYear(t,e){return!(!t||!e||this._dateAdapter.getMonth(t)!=this._dateAdapter.getMonth(e)||this._dateAdapter.getYear(t)!=this._dateAdapter.getYear(e))}_getCellCompareValue(t){if(t){const e=this._dateAdapter.getYear(t),i=this._dateAdapter.getMonth(t),n=this._dateAdapter.getDate(t);return new Date(e,i,n).getTime()}return null}_getValidDateOrNull(t){return this._dateAdapter.isDateInstance(t)&&this._dateAdapter.isValid(t)?t:null}_isRtl(){return this._dir&&"rtl"===this._dir.value}_setRanges(t){t instanceof rd?(this._rangeStart=this._getCellCompareValue(t.start),this._rangeEnd=this._getCellCompareValue(t.end),this._isRange=!0):(this._rangeStart=this._rangeEnd=this._getCellCompareValue(t),this._isRange=!1),this._comparisonRangeStart=this._getCellCompareValue(this.comparisonStart),this._comparisonRangeEnd=this._getCellCompareValue(this.comparisonEnd)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(Df,8),r.Pb(Ef,8),r.Pb(Zn,8),r.Pb(Vf,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["ngx-mat-month-view"]],viewQuery:function(t,e){if(1&t&&r.Pc(Pf,1),2&t){let t;r.vc(t=r.dc())&&(e._matCalendarBody=t.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},outputs:{selectedChange:"selectedChange",_userSelection:"_userSelection",activeDateChange:"activeDateChange"},exportAs:["ngxMatMonthView"],decls:7,vars:13,consts:[["role","presentation",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["scope","col",4,"ngFor","ngForOf"],["colspan","7","aria-hidden","true",1,"mat-calendar-table-header-divider"],["ngx-mat-calendar-body","",3,"label","rows","todayValue","startValue","endValue","comparisonStart","comparisonEnd","previewStart","previewEnd","isRange","labelMinRequiredCells","activeCell","selectedValueChange","previewChange","keydown"],["scope","col"]],template:function(t,e){1&t&&(r.Vb(0,"table",0),r.Vb(1,"thead",1),r.Vb(2,"tr"),r.Ic(3,rf,2,2,"th",2),r.Ub(),r.Vb(4,"tr"),r.Qb(5,"th",3),r.Ub(),r.Ub(),r.Vb(6,"tbody",4),r.cc("selectedValueChange",function(t){return e._dateSelected(t)})("previewChange",function(t){return e._previewChanged(t)})("keydown",function(t){return e._handleCalendarBodyKeydown(t)}),r.Ub(),r.Ub()),2&t&&(r.Db(3),r.nc("ngForOf",e._weekdays),r.Db(3),r.nc("label",e._monthLabel)("rows",e._weeks)("todayValue",e._todayDate)("startValue",e._rangeStart)("endValue",e._rangeEnd)("comparisonStart",e._comparisonRangeStart)("comparisonEnd",e._comparisonRangeEnd)("previewStart",e._previewStart)("previewEnd",e._previewEnd)("isRange",e._isRange)("labelMinRequiredCells",3)("activeCell",e._dateAdapter.getDate(e.activeDate)-1))},directives:[ct,Pf],encapsulation:2,changeDetection:0}),t})(),$f=(()=>{class t{constructor(t,e,i){if(this._changeDetectorRef=t,this._dateAdapter=e,this._dir=i,this._rerenderSubscription=ye.a.EMPTY,this.selectedChange=new r.o,this.yearSelected=new r.o,this.activeDateChange=new r.o,!this._dateAdapter)throw Hf("NgxMatDateAdapter");this._activeDate=this._dateAdapter.today()}get activeDate(){return this._activeDate}set activeDate(t){let e=this._activeDate;const i=this._getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(i,this.minDate,this.maxDate),Gf(this._dateAdapter,e,this._activeDate,this.minDate,this.maxDate)||this._init()}get selected(){return this._selected}set selected(t){this._selected=t instanceof rd?t:this._getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setSelectedYear(t)}get minDate(){return this._minDate}set minDate(t){this._minDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))}get maxDate(){return this._maxDate}set maxDate(t){this._maxDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(Pn(null)).subscribe(()=>this._init())}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_init(){this._todayYear=this._dateAdapter.getYear(this._dateAdapter.today());const t=this._dateAdapter.getYear(this._activeDate)-Wf(this._dateAdapter,this.activeDate,this.minDate,this.maxDate);this._years=[];for(let e=0,i=[];e<24;e++)i.push(t+e),4==i.length&&(this._years.push(i.map(t=>this._createCellForYear(t))),i=[]);this._changeDetectorRef.markForCheck()}_yearSelected(t){const e=t.value;this.yearSelected.emit(this._dateAdapter.createDate(e,0,1));let i=this._dateAdapter.getMonth(this.activeDate),n=this._dateAdapter.getNumDaysInMonth(this._dateAdapter.createDate(e,i,1));this.selectedChange.emit(this._dateAdapter.createDate(e,i,Math.min(this._dateAdapter.getDate(this.activeDate),n)))}_handleCalendarBodyKeydown(t){const e=this._activeDate,i=this._isRtl();switch(t.keyCode){case 37:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,i?1:-1);break;case 39:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,i?-1:1);break;case 38:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-4);break;case 40:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,4);break;case 36:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-Wf(this._dateAdapter,this.activeDate,this.minDate,this.maxDate));break;case 35:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,24-Wf(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)-1);break;case 33:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?-240:-24);break;case 34:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?240:24);break;case 13:case 32:this._yearSelected({value:this._dateAdapter.getYear(this._activeDate),event:t});break;default:return}this._dateAdapter.compareDate(e,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),t.preventDefault()}_getActiveCell(){return Wf(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)}_focusActiveCell(){this._matCalendarBody._focusActiveCell()}_createCellForYear(t){let e=this._dateAdapter.getYearName(this._dateAdapter.createDate(t,0,1));return new If(t,e,e,this._shouldEnableYear(t))}_shouldEnableYear(t){if(null==t||this.maxDate&&t>this._dateAdapter.getYear(this.maxDate)||this.minDate&&t<this._dateAdapter.getYear(this.minDate))return!1;if(!this.dateFilter)return!0;for(let e=this._dateAdapter.createDate(t,0,1);this._dateAdapter.getYear(e)==t;e=this._dateAdapter.addCalendarDays(e,1))if(this.dateFilter(e))return!0;return!1}_getValidDateOrNull(t){return this._dateAdapter.isDateInstance(t)&&this._dateAdapter.isValid(t)?t:null}_isRtl(){return this._dir&&"rtl"===this._dir.value}_setSelectedYear(t){if(this._selectedYear=null,t instanceof rd){const e=t.start||t.end;e&&(this._selectedYear=this._dateAdapter.getYear(e))}else t&&(this._selectedYear=this._dateAdapter.getYear(t))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(Ef,8),r.Pb(Zn,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["ngx-mat-multi-year-view"]],viewQuery:function(t,e){if(1&t&&r.Pc(Pf,1),2&t){let t;r.vc(t=r.dc())&&(e._matCalendarBody=t.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter"},outputs:{selectedChange:"selectedChange",yearSelected:"yearSelected",activeDateChange:"activeDateChange"},exportAs:["ngxMatMultiYearView"],decls:5,vars:7,consts:[["role","presentation",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["colspan","4",1,"mat-calendar-table-header-divider"],["ngx-mat-calendar-body","",3,"rows","todayValue","startValue","endValue","numCols","cellAspectRatio","activeCell","selectedValueChange","keydown"]],template:function(t,e){1&t&&(r.Vb(0,"table",0),r.Vb(1,"thead",1),r.Vb(2,"tr"),r.Qb(3,"th",2),r.Ub(),r.Ub(),r.Vb(4,"tbody",3),r.cc("selectedValueChange",function(t){return e._yearSelected(t)})("keydown",function(t){return e._handleCalendarBodyKeydown(t)}),r.Ub(),r.Ub()),2&t&&(r.Db(4),r.nc("rows",e._years)("todayValue",e._todayYear)("startValue",e._selectedYear)("endValue",e._selectedYear)("numCols",4)("cellAspectRatio",4/7)("activeCell",e._getActiveCell()))},directives:[Pf],encapsulation:2,changeDetection:0}),t})();function Gf(t,e,i,n,r){const s=t.getYear(e),o=t.getYear(i),a=Zf(t,n,r);return Math.floor((s-a)/24)===Math.floor((o-a)/24)}function Wf(t,e,i,n){return((t.getYear(e)-Zf(t,i,n))%24+24)%24}function Zf(t,e,i){let n=0;return i?n=t.getYear(i)-24+1:e&&(n=t.getYear(e)),n}let qf=(()=>{class t{constructor(t,e,i,n){if(this._changeDetectorRef=t,this._dateFormats=e,this._dateAdapter=i,this._dir=n,this._rerenderSubscription=ye.a.EMPTY,this.selectedChange=new r.o,this.monthSelected=new r.o,this.activeDateChange=new r.o,!this._dateAdapter)throw Hf("NgxMatDateAdapter");if(!this._dateFormats)throw Hf("NGX_MAT_DATE_FORMATS");this._activeDate=this._dateAdapter.today()}get activeDate(){return this._activeDate}set activeDate(t){let e=this._activeDate;const i=this._getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(i,this.minDate,this.maxDate),this._dateAdapter.getYear(e)!==this._dateAdapter.getYear(this._activeDate)&&this._init()}get selected(){return this._selected}set selected(t){this._selected=t instanceof rd?t:this._getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setSelectedMonth(t)}get minDate(){return this._minDate}set minDate(t){this._minDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))}get maxDate(){return this._maxDate}set maxDate(t){this._maxDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(Pn(null)).subscribe(()=>this._init())}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_monthSelected(t){const e=t.value,i=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),e,1);this.monthSelected.emit(i);const n=this._dateAdapter.getNumDaysInMonth(i);this.selectedChange.emit(this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),e,Math.min(this._dateAdapter.getDate(this.activeDate),n)))}_handleCalendarBodyKeydown(t){const e=this._activeDate,i=this._isRtl();switch(t.keyCode){case 37:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,i?1:-1);break;case 39:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,i?-1:1);break;case 38:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-4);break;case 40:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,4);break;case 36:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-this._dateAdapter.getMonth(this._activeDate));break;case 35:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,11-this._dateAdapter.getMonth(this._activeDate));break;case 33:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?-10:-1);break;case 34:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?10:1);break;case 13:case 32:this._monthSelected({value:this._dateAdapter.getMonth(this._activeDate),event:t});break;default:return}this._dateAdapter.compareDate(e,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),t.preventDefault()}_init(){this._setSelectedMonth(this.selected),this._todayMonth=this._getMonthInCurrentYear(this._dateAdapter.today()),this._yearLabel=this._dateAdapter.getYearName(this.activeDate);let t=this._dateAdapter.getMonthNames("short");this._months=[[0,1,2,3],[4,5,6,7],[8,9,10,11]].map(e=>e.map(e=>this._createCellForMonth(e,t[e]))),this._changeDetectorRef.markForCheck()}_focusActiveCell(){this._matCalendarBody._focusActiveCell()}_getMonthInCurrentYear(t){return t&&this._dateAdapter.getYear(t)==this._dateAdapter.getYear(this.activeDate)?this._dateAdapter.getMonth(t):null}_createCellForMonth(t,e){let i=this._dateAdapter.format(this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),t,1),this._dateFormats.display.monthYearA11yLabel);return new If(t,e.toLocaleUpperCase(),i,this._shouldEnableMonth(t))}_shouldEnableMonth(t){const e=this._dateAdapter.getYear(this.activeDate);if(null==t||this._isYearAndMonthAfterMaxDate(e,t)||this._isYearAndMonthBeforeMinDate(e,t))return!1;if(!this.dateFilter)return!0;for(let i=this._dateAdapter.createDate(e,t,1);this._dateAdapter.getMonth(i)==t;i=this._dateAdapter.addCalendarDays(i,1))if(this.dateFilter(i))return!0;return!1}_isYearAndMonthAfterMaxDate(t,e){if(this.maxDate){const i=this._dateAdapter.getYear(this.maxDate),n=this._dateAdapter.getMonth(this.maxDate);return t>i||t===i&&e>n}return!1}_isYearAndMonthBeforeMinDate(t,e){if(this.minDate){const i=this._dateAdapter.getYear(this.minDate),n=this._dateAdapter.getMonth(this.minDate);return t<i||t===i&&e<n}return!1}_getValidDateOrNull(t){return this._dateAdapter.isDateInstance(t)&&this._dateAdapter.isValid(t)?t:null}_isRtl(){return this._dir&&"rtl"===this._dir.value}_setSelectedMonth(t){this._selectedMonth=t instanceof rd?this._getMonthInCurrentYear(t.start)||this._getMonthInCurrentYear(t.end):this._getMonthInCurrentYear(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(Df,8),r.Pb(Ef,8),r.Pb(Zn,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["ngx-mat-year-view"]],viewQuery:function(t,e){if(1&t&&r.Pc(Pf,1),2&t){let t;r.vc(t=r.dc())&&(e._matCalendarBody=t.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter"},outputs:{selectedChange:"selectedChange",monthSelected:"monthSelected",activeDateChange:"activeDateChange"},exportAs:["ngxMatYearView"],decls:5,vars:9,consts:[["role","presentation",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["colspan","4",1,"mat-calendar-table-header-divider"],["ngx-mat-calendar-body","",3,"label","rows","todayValue","startValue","endValue","labelMinRequiredCells","numCols","cellAspectRatio","activeCell","selectedValueChange","keydown"]],template:function(t,e){1&t&&(r.Vb(0,"table",0),r.Vb(1,"thead",1),r.Vb(2,"tr"),r.Qb(3,"th",2),r.Ub(),r.Ub(),r.Vb(4,"tbody",3),r.cc("selectedValueChange",function(t){return e._monthSelected(t)})("keydown",function(t){return e._handleCalendarBodyKeydown(t)}),r.Ub(),r.Ub()),2&t&&(r.Db(4),r.nc("label",e._yearLabel)("rows",e._months)("todayValue",e._todayMonth)("startValue",e._selectedMonth)("endValue",e._selectedMonth)("labelMinRequiredCells",2)("numCols",4)("cellAspectRatio",4/7)("activeCell",e._dateAdapter.getMonth(e.activeDate)))},directives:[Pf],encapsulation:2,changeDetection:0}),t})(),Yf=(()=>{class t{constructor(t,e,i,n,r){this._intl=t,this.calendar=e,this._dateAdapter=i,this._dateFormats=n,this.calendar.stateChanges.subscribe(()=>r.markForCheck())}get periodButtonText(){if("month"==this.calendar.currentView)return this._dateAdapter.format(this.calendar.activeDate,this._dateFormats.display.monthYearLabel).toLocaleUpperCase();if("year"==this.calendar.currentView)return this._dateAdapter.getYearName(this.calendar.activeDate);const t=this._dateAdapter.getYear(this.calendar.activeDate)-Wf(this._dateAdapter,this.calendar.activeDate,this.calendar.minDate,this.calendar.maxDate),e=t+24-1;return`${this._dateAdapter.getYearName(this._dateAdapter.createDate(t,0,1))} \u2013 ${this._dateAdapter.getYearName(this._dateAdapter.createDate(e,0,1))}`}get periodButtonLabel(){return"month"==this.calendar.currentView?this._intl.switchToMultiYearViewLabel:this._intl.switchToMonthViewLabel}get prevButtonLabel(){return{month:this._intl.prevMonthLabel,year:this._intl.prevYearLabel,"multi-year":this._intl.prevMultiYearLabel}[this.calendar.currentView]}get nextButtonLabel(){return{month:this._intl.nextMonthLabel,year:this._intl.nextYearLabel,"multi-year":this._intl.nextMultiYearLabel}[this.calendar.currentView]}currentPeriodClicked(){this.calendar.currentView="month"==this.calendar.currentView?"multi-year":"month"}previousClicked(){this.calendar.activeDate="month"==this.calendar.currentView?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,-1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,"year"==this.calendar.currentView?-1:-24)}nextClicked(){this.calendar.activeDate="month"==this.calendar.currentView?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,"year"==this.calendar.currentView?1:24)}previousEnabled(){return!this.calendar.minDate||!this.calendar.minDate||!this._isSameView(this.calendar.activeDate,this.calendar.minDate)}nextEnabled(){return!this.calendar.maxDate||!this._isSameView(this.calendar.activeDate,this.calendar.maxDate)}_isSameView(t,e){return"month"==this.calendar.currentView?this._dateAdapter.getYear(t)==this._dateAdapter.getYear(e)&&this._dateAdapter.getMonth(t)==this._dateAdapter.getMonth(e):"year"==this.calendar.currentView?this._dateAdapter.getYear(t)==this._dateAdapter.getYear(e):Gf(this._dateAdapter,t,e,this.calendar.minDate,this.calendar.maxDate)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Qu),r.Pb(Object(r.W)(()=>Qf)),r.Pb(Ef,8),r.Pb(Df,8),r.Pb(r.h))},t.\u0275cmp=r.Jb({type:t,selectors:[["ngx-mat-calendar-header"]],exportAs:["ngxMatCalendarHeader"],ngContentSelectors:sf,decls:9,vars:8,consts:[[1,"mat-calendar-header"],[1,"mat-calendar-controls"],["mat-button","","type","button","cdkAriaLive","polite",1,"mat-calendar-period-button",3,"click"],[1,"mat-calendar-arrow"],[1,"mat-calendar-spacer"],["mat-icon-button","","type","button",1,"mat-calendar-previous-button",3,"disabled","click"],["mat-icon-button","","type","button",1,"mat-calendar-next-button",3,"disabled","click"]],template:function(t,e){1&t&&(r.mc(),r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"button",2),r.cc("click",function(){return e.currentPeriodClicked()}),r.Kc(3),r.Qb(4,"div",3),r.Ub(),r.Qb(5,"div",4),r.lc(6),r.Vb(7,"button",5),r.cc("click",function(){return e.previousClicked()}),r.Ub(),r.Vb(8,"button",6),r.cc("click",function(){return e.nextClicked()}),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(2),r.Eb("aria-label",e.periodButtonLabel),r.Db(1),r.Mc(" ",e.periodButtonText," "),r.Db(1),r.Hb("mat-calendar-invert","month"!=e.calendar.currentView),r.Db(3),r.nc("disabled",!e.previousEnabled()),r.Eb("aria-label",e.prevButtonLabel),r.Db(1),r.nc("disabled",!e.nextEnabled()),r.Eb("aria-label",e.nextButtonLabel))},directives:[Dl],encapsulation:2,changeDetection:0}),t})(),Qf=(()=>{class t{constructor(t,e,i,n){if(this._dateAdapter=e,this._dateFormats=i,this._changeDetectorRef=n,this._moveFocusOnNextTick=!1,this.startView="month",this.selectedChange=new r.o,this.yearSelected=new r.o,this.monthSelected=new r.o,this._userSelection=new r.o,this.stateChanges=new _e.a,!this._dateAdapter)throw Hf("NgxDateAdapter");if(!this._dateFormats)throw Hf("NGX_MAT_DATE_FORMATS");this._intlChanges=t.changes.subscribe(()=>{n.markForCheck(),this.stateChanges.next()})}get startAt(){return this._startAt}set startAt(t){this._startAt=this._getValidDateOrNull(this._dateAdapter.deserialize(t))}get selected(){return this._selected}set selected(t){this._selected=this._getValidDateOrNull(this._dateAdapter.deserialize(t))}get minDate(){return this._minDate}set minDate(t){this._minDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))}get maxDate(){return this._maxDate}set maxDate(t){this._maxDate=this._getValidDateOrNull(this._dateAdapter.deserialize(t))}get activeDate(){return this._clampedActiveDate}set activeDate(t){this._clampedActiveDate=this._dateAdapter.clampDate(t,this.minDate,this.maxDate),this.stateChanges.next(),this._changeDetectorRef.markForCheck()}get currentView(){return this._currentView}set currentView(t){this._currentView=t,this._moveFocusOnNextTick=!0,this._changeDetectorRef.markForCheck()}ngAfterContentInit(){this._calendarHeaderPortal=new pe(this.headerComponent||Yf),this.activeDate=this.startAt||this._dateAdapter.today(),this._currentView=this.startView}ngAfterViewChecked(){this._moveFocusOnNextTick&&(this._moveFocusOnNextTick=!1,this.focusActiveCell())}ngOnDestroy(){this._intlChanges.unsubscribe(),this.stateChanges.complete()}ngOnChanges(t){const e=t.minDate||t.maxDate||t.dateFilter;if(e&&!e.firstChange){const t=this._getCurrentViewComponent();t&&(this._changeDetectorRef.detectChanges(),t._init())}this.stateChanges.next()}focusActiveCell(){this._getCurrentViewComponent()._focusActiveCell()}updateTodaysDate(){("month"==this.currentView?this.monthView:"year"==this.currentView?this.yearView:this.multiYearView).ngAfterContentInit()}_dateSelected(t){t&&!this._dateAdapter.sameDate(t,this.selected)&&this.selectedChange.emit(t)}_yearSelectedInMultiYearView(t){this.yearSelected.emit(t)}_monthSelectedInYearView(t){this.monthSelected.emit(t)}_userSelected(){this._userSelection.emit()}_goToDateInView(t,e){this.activeDate=t,this.currentView=e}_getValidDateOrNull(t){return this._dateAdapter.isDateInstance(t)&&this._dateAdapter.isValid(t)?t:null}_getCurrentViewComponent(){return this.monthView||this.yearView||this.multiYearView}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Qu),r.Pb(Ef,8),r.Pb(Df,8),r.Pb(r.h))},t.\u0275cmp=r.Jb({type:t,selectors:[["ngx-mat-calendar"]],viewQuery:function(t,e){if(1&t&&(r.Pc(Kf,1),r.Pc(qf,1),r.Pc($f,1)),2&t){let t;r.vc(t=r.dc())&&(e.monthView=t.first),r.vc(t=r.dc())&&(e.yearView=t.first),r.vc(t=r.dc())&&(e.multiYearView=t.first)}},hostAttrs:[1,"mat-calendar"],inputs:{startView:"startView",startAt:"startAt",selected:"selected",minDate:"minDate",maxDate:"maxDate",headerComponent:"headerComponent",dateFilter:"dateFilter",dateClass:"dateClass"},outputs:{selectedChange:"selectedChange",yearSelected:"yearSelected",monthSelected:"monthSelected",_userSelection:"_userSelection"},exportAs:["ngxMatCalendar"],features:[r.Bb],decls:5,vars:5,consts:[[3,"cdkPortalOutlet"],["cdkMonitorSubtreeFocus","","tabindex","-1",1,"mat-calendar-content",3,"ngSwitch"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","selectedChange","_userSelection",4,"ngSwitchCase"],[3,"activeDate","selected","dateFilter","maxDate","minDate","activeDateChange","monthSelected","selectedChange",4,"ngSwitchCase"],[3,"activeDate","selected","dateFilter","maxDate","minDate","activeDateChange","yearSelected","selectedChange",4,"ngSwitchCase"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","selectedChange","_userSelection"],[3,"activeDate","selected","dateFilter","maxDate","minDate","activeDateChange","monthSelected","selectedChange"],[3,"activeDate","selected","dateFilter","maxDate","minDate","activeDateChange","yearSelected","selectedChange"]],template:function(t,e){1&t&&(r.Ic(0,of,0,0,"ng-template",0),r.Vb(1,"div",1),r.Ic(2,af,1,6,"ngx-mat-month-view",2),r.Ic(3,lf,1,5,"ngx-mat-year-view",3),r.Ic(4,cf,1,5,"ngx-mat-multi-year-view",4),r.Ub()),2&t&&(r.nc("cdkPortalOutlet",e._calendarHeaderPortal),r.Db(1),r.nc("ngSwitch",e.currentView),r.Db(1),r.nc("ngSwitchCase","month"),r.Db(1),r.nc("ngSwitchCase","year"),r.Db(1),r.nc("ngSwitchCase","multi-year"))},directives:[be,mt,gt,Kf,qf,$f],styles:['.mat-calendar{display:block}.mat-calendar-header{padding:8px 8px 0}.mat-calendar-content{outline:none;padding:0 8px 8px}.mat-calendar-controls{display:flex;margin:5% calc(4.71429% - 16px)}.mat-calendar-spacer{flex:1 1 auto}.mat-calendar-period-button{min-width:0}.mat-calendar-arrow{border-left:5px solid transparent;border-right:5px solid transparent;border-top-style:solid;border-top-width:5px;display:inline-block;height:0;margin:0 0 0 5px;vertical-align:middle;width:0}.mat-calendar-arrow.mat-calendar-invert{transform:rotate(180deg)}[dir=rtl] .mat-calendar-arrow{margin:0 5px 0 0}.mat-calendar-next-button,.mat-calendar-previous-button{position:relative}.mat-calendar-next-button:after,.mat-calendar-previous-button:after{border:solid;border-width:2px 0 0;bottom:0;content:"";left:0;margin:15.5px;position:absolute;right:0;top:0}[dir=rtl] .mat-calendar-next-button,[dir=rtl] .mat-calendar-previous-button{transform:rotate(180deg)}.mat-calendar-previous-button:after{border-left-width:2px;transform:translateX(2px) rotate(-45deg)}.mat-calendar-next-button:after{border-right-width:2px;transform:translateX(-2px) rotate(45deg)}.mat-calendar-table{border-collapse:collapse;border-spacing:0;width:100%}.mat-calendar-table-header th{padding:0 0 8px;text-align:center}.mat-calendar-table-header-divider{height:1px;position:relative}.mat-calendar-table-header-divider:after{content:"";height:1px;left:-8px;position:absolute;right:-8px;top:0}'],encapsulation:2,changeDetection:0}),t})(),Xf=(()=>{class t{constructor(t,e,i){if(this._dateAdapter=t,this.cd=e,this.formBuilder=i,this.disabled=!1,this.showSpinners=!0,this.stepHour=1,this.stepMinute=1,this.stepSecond=1,this.showSeconds=!1,this.disableMinute=!1,this.enableMeridian=!1,this.color="primary",this.meridian="AM",this._onChange=()=>{},this._onTouched=()=>{},this._destroyed=new _e.a,this.pattern=Bf,!this._dateAdapter)throw Hf("NgxMatDateAdapter");this.form=this.formBuilder.group({hour:[{value:null,disabled:this.disabled},[pc.required,pc.pattern(Bf)]],minute:[{value:null,disabled:this.disabled},[pc.required,pc.pattern(Nf)]],second:[{value:null,disabled:this.disabled},[pc.required,pc.pattern(jf)]]})}get hour(){let t=Number(this.form.controls.hour.value);return isNaN(t)?0:t}get minute(){let t=Number(this.form.controls.minute.value);return isNaN(t)?0:t}get second(){let t=Number(this.form.controls.second.value);return isNaN(t)?0:t}get valid(){return this.form.valid}ngOnInit(){this.form.valueChanges.pipe(Sn(this._destroyed),Be(400)).subscribe(t=>{this._updateModel()})}ngOnChanges(t){(t.disabled||t.disableMinute)&&this._setDisableStates()}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}writeValue(t){null!=t?this._model=t:(this._model=this._dateAdapter.today(),null!=this.defaultTime&&this._dateAdapter.setTimeByDefaultValues(this._model,this.defaultTime)),this._updateHourMinuteSecond()}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this._disabled=t,this.cd.markForCheck()}formatInput(t){t.value=t.value.replace(Uf,"")}toggleMeridian(){this.meridian="AM"===this.meridian?"PM":"AM",this.change("hour")}change(t,e){const i=this._getNextValueByProp(t,e);this.form.controls[t].setValue(zf(i),{onlySelf:!1,emitEvent:!1}),this._updateModel()}_updateHourMinuteSecond(){let t=this._dateAdapter.getHour(this._model);const e=this._dateAdapter.getMinute(this._model),i=this._dateAdapter.getSecond(this._model);this.enableMeridian&&(t>Lf.meridian?(t-=Lf.meridian,this.meridian="PM"):this.meridian="AM"),this.form.controls.hour.setValue(zf(t)),this.form.controls.minute.setValue(zf(e)),this.form.controls.second.setValue(zf(i))}_updateModel(){let t=this.hour;this.enableMeridian&&"PM"===this.meridian&&t!==Lf.meridian&&(t+=Lf.meridian),this._dateAdapter.setHour(this._model,t),this._dateAdapter.setMinute(this._model,this.minute),this._dateAdapter.setSecond(this._model,this.second),this._onChange(this._model)}_getNextValueByProp(t,e){const i=t[0].toUpperCase()+t.slice(1),n=Lf[`min${i}`];let r,s=Lf[`max${i}`];return"hour"===t&&this.enableMeridian&&(s=Lf.meridian),null==e?r=this[t]%s:(r=e?this[t]+this[`step${i}`]:this[t]-this[`step${i}`],"hour"===t&&this.enableMeridian?(r%=s+1,0===r&&(r=e?1:s)):r%=s,r=e?r>s?r-s+n:r:r<n?r-n+s:r),r}_setDisableStates(){this.disabled?this.form.disable():(this.form.enable(),this.disableMinute&&(this.form.get("minute").disable(),this.showSeconds&&this.form.get("second").disable()))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Ef,8),r.Pb(r.h),r.Pb(Lh))},t.\u0275cmp=r.Jb({type:t,selectors:[["ngx-mat-timepicker"]],hostAttrs:[1,"ngx-mat-timepicker"],inputs:{disabled:"disabled",showSpinners:"showSpinners",stepHour:"stepHour",stepMinute:"stepMinute",stepSecond:"stepSecond",showSeconds:"showSeconds",disableMinute:"disableMinute",enableMeridian:"enableMeridian",color:"color",defaultTime:"defaultTime"},exportAs:["ngxMatTimepicker"],features:[r.Cb([{provide:rc,useExisting:Object(r.W)(()=>t),multi:!0}]),r.Bb],decls:18,vars:7,consts:[[3,"formGroup"],[1,"ngx-mat-timepicker-table"],[1,"ngx-mat-timepicker-tbody"],[4,"ngIf"],["appearance","legacy"],["type","text","matInput","","maxlength","2","formControlName","hour",3,"input","keydown.ArrowUp","keydown.ArrowDown","blur"],[1,"ngx-mat-timepicker-spacer"],["type","text","matInput","","maxlength","2","formControlName","minute",3,"input","keydown.ArrowUp","keydown.ArrowDown","blur"],["class","ngx-mat-timepicker-spacer",4,"ngIf"],["class","ngx-mat-timepicker-meridian",4,"ngIf"],["type","button","mat-icon-button","","aria-label","expand_less icon",3,"disabled","click"],["type","text","matInput","","maxlength","2","formControlName","second",3,"input","keydown.ArrowUp","keydown.ArrowDown","blur"],[1,"ngx-mat-timepicker-meridian"],["mat-button","","mat-stroked-button","",3,"color","disabled","click"],["type","button","mat-icon-button","","aria-label","expand_more icon",3,"disabled","click"]],template:function(t,e){1&t&&(r.Vb(0,"form",0),r.Vb(1,"table",1),r.Vb(2,"tbody",2),r.Ic(3,pf,14,5,"tr",3),r.Vb(4,"tr"),r.Vb(5,"td"),r.Vb(6,"mat-form-field",4),r.Vb(7,"input",5),r.cc("input",function(t){return e.formatInput(t.target)})("keydown.ArrowUp",function(t){return e.change("hour",!0),t.preventDefault()})("keydown.ArrowDown",function(t){return e.change("hour",!1),t.preventDefault()})("blur",function(){return e.change("hour")}),r.Ub(),r.Ub(),r.Ub(),r.Vb(8,"td",6),r.Kc(9,":"),r.Ub(),r.Vb(10,"td"),r.Vb(11,"mat-form-field",4),r.Vb(12,"input",7),r.cc("input",function(t){return e.formatInput(t.target)})("keydown.ArrowUp",function(t){return e.change("minute",!0),t.preventDefault()})("keydown.ArrowDown",function(t){return e.change("minute",!1),t.preventDefault()})("blur",function(){return e.change("minute")}),r.Ub(),r.Ub(),r.Ub(),r.Ic(13,ff,2,0,"td",8),r.Ic(14,mf,3,0,"td",3),r.Ic(15,gf,1,0,"td",8),r.Ic(16,Af,3,3,"td",9),r.Ub(),r.Ic(17,wf,14,6,"tr",3),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.nc("formGroup",e.form),r.Db(3),r.nc("ngIf",e.showSpinners),r.Db(10),r.nc("ngIf",e.showSeconds),r.Db(1),r.nc("ngIf",e.showSeconds),r.Db(1),r.nc("ngIf",e.enableMeridian),r.Db(1),r.nc("ngIf",e.enableMeridian),r.Db(1),r.nc("ngIf",e.showSpinners))},directives:[dh,Fc,_h,ut,_u,Ou,ac,Th,Vc,Eh,Dl,Yp],styles:[".ngx-mat-timepicker{font-size:13px}.ngx-mat-timepicker form{min-width:90px}.ngx-mat-timepicker form .ngx-mat-timepicker-table .ngx-mat-timepicker-tbody tr td{text-align:center}.ngx-mat-timepicker form .ngx-mat-timepicker-table .ngx-mat-timepicker-tbody tr td.ngx-mat-timepicker-spacer{font-weight:700}.ngx-mat-timepicker form .ngx-mat-timepicker-table .ngx-mat-timepicker-tbody tr td.ngx-mat-timepicker-meridian .mat-button{border-radius:4px;border-radius:50%;flex-shrink:0;height:36px;line-height:36px;min-width:64px;min-width:0;padding:0;width:36px}.ngx-mat-timepicker form .ngx-mat-timepicker-table .ngx-mat-timepicker-tbody tr td .mat-icon-button{height:24px;line-height:24px;width:24px}.ngx-mat-timepicker form .ngx-mat-timepicker-table .ngx-mat-timepicker-tbody tr td .mat-icon-button .mat-icon{font-size:24px}.ngx-mat-timepicker form .ngx-mat-timepicker-table .ngx-mat-timepicker-tbody tr td .mat-form-field{max-width:20px;text-align:center;width:20px}"],encapsulation:2}),t})(),Jf=0;const tm=Ea(class{constructor(t){this._elementRef=t}});let em=(()=>{class t extends tm{constructor(t,e,i){super(t),this.cd=e,this._viewContainerRef=i}get valid(){return(this.datepicker.hideTime||this._timePicker&&this._timePicker.valid)&&this.datepicker.valid}get isViewMonth(){return!this._calendar||null==this._calendar.currentView||"month"==this._calendar.currentView}ngAfterViewInit(){this._calendar.focusActiveCell(),this.datepicker._customIcon&&(this._templateCustomIconPortal=new fe(this.datepicker._customIcon,this._viewContainerRef),this.cd.detectChanges())}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.h),r.Pb(r.S))},t.\u0275cmp=r.Jb({type:t,selectors:[["ngx-mat-datetime-content"]],viewQuery:function(t,e){if(1&t&&(r.Pc(Qf,1),r.Pc(Xf,1)),2&t){let t;r.vc(t=r.dc())&&(e._calendar=t.first),r.vc(t=r.dc())&&(e._timePicker=t.first)}},hostAttrs:[1,"mat-datepicker-content"],hostVars:3,hostBindings:function(t,e){2&t&&(r.Hc("@transformPanel","enter"),r.Hb("mat-datepicker-content-touch",e.datepicker.touchUi))},inputs:{color:"color"},exportAs:["ngxMatDatetimeContent"],features:[r.Ab],decls:2,vars:12,consts:[["cdkTrapFocus","",3,"id","ngClass","startAt","startView","minDate","maxDate","dateFilter","headerComponent","selected","dateClass","selectedChange","yearSelected","monthSelected"],[4,"ngIf"],["class","time-container",3,"disable-seconds",4,"ngIf"],[1,"actions"],["mat-button","","mat-stroked-button","","cdkFocusInitial","",3,"color","disabled","click"],[3,"cdkPortalOutlet"],[1,"time-container"],[3,"showSpinners","showSeconds","disabled","stepHour","stepMinute","stepSecond","ngModel","color","enableMeridian","disableMinute","ngModelChange"]],template:function(t,e){1&t&&(r.Vb(0,"ngx-mat-calendar",0),r.cc("selectedChange",function(t){return e.datepicker.select(t)})("yearSelected",function(t){return e.datepicker._selectYear(t)})("monthSelected",function(t){return e.datepicker._selectMonth(t)}),r.Ub(),r.Ic(1,kf,6,5,"ng-container",1)),2&t&&(r.nc("id",e.datepicker.id)("ngClass",e.datepicker.panelClass)("startAt",e.datepicker.startAt)("startView",e.datepicker.startView)("minDate",e.datepicker._minDate)("maxDate",e.datepicker._maxDate)("dateFilter",e.datepicker._dateFilter)("headerComponent",e.datepicker.calendarHeaderComponent)("selected",e.datepicker._selected)("dateClass",e.datepicker.dateClass)("@fadeInCalendar","enter"),r.Db(1),r.nc("ngIf",e.isViewMonth))},directives:[Qf,at,ut,Dl,be,Xf,Vc,uh,Yp],styles:['.mat-datepicker-content{border-radius:4px;box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);display:block}.mat-datepicker-content .mat-calendar{width:296px}.mat-datepicker-content .time-container{display:flex;justify-content:center;padding-top:5px;position:relative}.mat-datepicker-content .time-container.disable-seconds .ngx-mat-timepicker .table{margin-left:9px}.mat-datepicker-content .time-container:before{background-color:rgba(0,0,0,.12);content:"";height:1px;left:0;position:absolute;right:0;top:0}.mat-datepicker-content .actions{display:flex;justify-content:flex-end;padding:5px 15px 10px}'],encapsulation:2,data:{animation:[wd.transformPanel,wd.fadeInCalendar]},changeDetection:0}),t})(),im=(()=>{class t{constructor(t,e,i,n,s,o,a,l){if(this._dialog=t,this._overlay=e,this._ngZone=i,this._viewContainerRef=n,this._dateAdapter=o,this._dir=a,this._document=l,this.startView="month",this._defaultColor="primary",this._touchUi=!1,this._hideTime=!1,this.yearSelected=new r.o,this.monthSelected=new r.o,this.openedStream=new r.o,this.closedStream=new r.o,this._opened=!1,this._showSpinners=!0,this._showSeconds=!1,this._stepHour=1,this._stepMinute=1,this._stepSecond=1,this._enableMeridian=!1,this._hasBackdrop=!0,this.id="mat-datepicker-"+Jf++,this._validSelected=null,this._focusedElementBeforeOpen=null,this._inputSubscription=ye.a.EMPTY,this.stateChanges=new _e.a,this._selectedChanged=new _e.a,this._minValidator=()=>!this._minDate||!this._selected||this._dateAdapter.compareDateWithTime(this._minDate,this._selected,this.showSeconds)<=0?null:{matDatetimePickerMin:{min:this._minDate,actual:this._selected}},this._maxValidator=()=>!this._maxDate||!this._selected||this._dateAdapter.compareDateWithTime(this._maxDate,this._selected,this.showSeconds)>=0?null:{matDatetimePickerMax:{max:this._maxDate,actual:this._selected}},!this._dateAdapter)throw Hf("NgxMatDateAdapter");this._scrollStrategy=s}get startAt(){return this._startAt||(this.datepickerInput?this.datepickerInput.value:null)}set startAt(t){this._startAt=this._getValidDateOrNull(this._dateAdapter.deserialize(t))}get defaultColor(){return this._defaultColor}set defaultColor(t){this._defaultColor=t}get color(){return this._color||(this.datepickerInput?this.datepickerInput._getThemePalette():"primary")}set color(t){this._color=t}get touchUi(){return this._touchUi}set touchUi(t){this._touchUi=ti(t)}get hideTime(){return this._hideTime}set hideTime(t){this._hideTime=ti(t)}get disabled(){return void 0===this._disabled&&this.datepickerInput?this.datepickerInput.disabled:!!this._disabled}set disabled(t){const e=ti(t);e!==this._disabled&&(this._disabled=e,this.stateChanges.next(e))}get opened(){return this._opened}set opened(t){t?this.open():this.close()}get showSpinners(){return this._showSpinners}set showSpinners(t){this._showSpinners=t}get showSeconds(){return this._showSeconds}set showSeconds(t){this._showSeconds=t}get stepHour(){return this._stepHour}set stepHour(t){this._stepHour=t}get stepMinute(){return this._stepMinute}set stepMinute(t){this._stepMinute=t}get stepSecond(){return this._stepSecond}set stepSecond(t){this._stepSecond=t}get enableMeridian(){return this._enableMeridian}set enableMeridian(t){this._enableMeridian=t}get disableMinute(){return this._disableMinute}set disableMinute(t){this._disableMinute=t}get defaultTime(){return this._defaultTime}set defaultTime(t){this._defaultTime=t}get _selected(){return this._validSelected}set _selected(t){this._validSelected=t}get _minDate(){return this.datepickerInput&&this.datepickerInput.min}get _maxDate(){return this.datepickerInput&&this.datepickerInput.max}get valid(){const t=this._minValidator(),e=this._maxValidator();return null==t&&null==e}get _dateFilter(){return this.datepickerInput&&this.datepickerInput._dateFilter}ngOnDestroy(){this.close(),this._popupRef&&(this._popupRef.dispose(),this._popupComponentRef=null),this._inputSubscription.unsubscribe(),this.stateChanges.complete()}select(t){this._dateAdapter.copyTime(t,this._selected),this._selected=t}_selectYear(t){this.yearSelected.emit(t)}_selectMonth(t){this.monthSelected.emit(t)}ok(){const t=this._dateAdapter.clone(this._selected);this._selectedChanged.next(t),this.close()}cancel(){this._selected=this._rawValue,this.close()}_registerInput(t){if(this.datepickerInput)throw Error("A NgxMatDatepicker can only be associated with a single input.");this.datepickerInput=t,this._inputSubscription=this.datepickerInput._valueChange.subscribe(t=>this._selected=t)}open(){if(this._rawValue=null!=this._selected?this._dateAdapter.clone(this._selected):null,null==this._selected&&(this._selected=this._dateAdapter.today(),null!=this.defaultTime&&this._dateAdapter.setTimeByDefaultValues(this._selected,this.defaultTime)),!this._opened&&!this.disabled){if(!this.datepickerInput)throw Error("Attempted to open an NgxMatDatepicker with no associated input.");this._document&&(this._focusedElementBeforeOpen=this._document.activeElement),this.touchUi?this._openAsDialog():this._openAsPopup(),this._opened=!0,this.openedStream.emit()}}close(){if(!this._opened)return;this._popupRef&&this._popupRef.hasAttached()&&this._popupRef.detach(),this._dialogRef&&(this._dialogRef.close(),this._dialogRef=null),this._calendarPortal&&this._calendarPortal.isAttached&&this._calendarPortal.detach();const t=()=>{this._opened&&(this._opened=!1,this.closedStream.emit(),this._focusedElementBeforeOpen=null)};this._focusedElementBeforeOpen&&"function"==typeof this._focusedElementBeforeOpen.focus?(this._focusedElementBeforeOpen.focus(),setTimeout(t)):t()}_openAsDialog(){this._dialogRef&&this._dialogRef.close(),this._dialogRef=this._dialog.open(em,{direction:this._dir?this._dir.value:"ltr",viewContainerRef:this._viewContainerRef,panelClass:"mat-datepicker-dialog",hasBackdrop:this._hasBackdrop}),this._dialogRef.afterClosed().subscribe(()=>this.close()),this._dialogRef.componentInstance.datepicker=this,this._setColor()}_openAsPopup(){this._calendarPortal||(this._calendarPortal=new pe(em,this._viewContainerRef)),this._popupRef||this._createPopup(),this._popupRef.hasAttached()||(this._popupComponentRef=this._popupRef.attach(this._calendarPortal),this._popupComponentRef.instance.datepicker=this,this._setColor(),this._ngZone.onStable.asObservable().pipe(Qe(1)).subscribe(()=>{this._popupRef.updatePosition()}))}_createPopup(){const t=new br({positionStrategy:this._createPopupPositionStrategy(),hasBackdrop:this._hasBackdrop,backdropClass:"mat-overlay-transparent-backdrop",direction:this._dir,scrollStrategy:this._scrollStrategy(),panelClass:"mat-datepicker-popup"});this._popupRef=this._overlay.create(t),this._popupRef.overlayElement.setAttribute("role","dialog"),Object(or.a)(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(He(t=>27===t.keyCode||this.datepickerInput&&t.altKey&&38===t.keyCode))).subscribe(t=>{t&&t.preventDefault(),this._hasBackdrop&&t?this.cancel():this.close()})}_createPopupPositionStrategy(){return this._overlay.position().flexibleConnectedTo(this.datepickerInput.getConnectedOverlayOrigin()).withTransformOriginOn(".mat-datepicker-content").withFlexibleDimensions(!1).withViewportMargin(8).withLockedPosition().withPositions([{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"}])}_getValidDateOrNull(t){return this._dateAdapter.isDateInstance(t)&&this._dateAdapter.isValid(t)?t:null}_setColor(){const t=this.color;this._popupComponentRef&&(this._popupComponentRef.instance.color=t),this._dialogRef&&(this._dialogRef.componentInstance.color=t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Gl),r.Pb(Fr),r.Pb(r.B),r.Pb(r.S),r.Pb(Cd),r.Pb(Ef,8),r.Pb(Zn,8),r.Pb(a,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["ngx-mat-datetime-picker"]],contentQueries:function(t,e,i){if(1&t&&r.Ib(i,r.O,1),2&t){let t;r.vc(t=r.dc())&&(e._customIcon=t.first)}},inputs:{startView:"startView",startAt:"startAt",defaultColor:"defaultColor",color:"color",touchUi:"touchUi",hideTime:"hideTime",disabled:"disabled",opened:"opened",showSpinners:"showSpinners",showSeconds:"showSeconds",stepHour:"stepHour",stepMinute:"stepMinute",stepSecond:"stepSecond",enableMeridian:"enableMeridian",disableMinute:"disableMinute",defaultTime:"defaultTime",calendarHeaderComponent:"calendarHeaderComponent",panelClass:"panelClass",dateClass:"dateClass"},outputs:{yearSelected:"yearSelected",monthSelected:"monthSelected",openedStream:"opened",closedStream:"closed"},exportAs:["ngxMatDatetimePicker"],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();const nm={provide:rc,useExisting:Object(r.W)(()=>am),multi:!0},rm={provide:hc,useExisting:Object(r.W)(()=>am),multi:!0};class sm{constructor(t,e){this.target=t,this.targetElement=e,this.value=this.target.value}}let om,am=(()=>{class t{constructor(t,e,i,n){if(this._elementRef=t,this._dateAdapter=e,this._dateFormats=i,this._formField=n,this.dateChange=new r.o,this.dateInput=new r.o,this._valueChange=new r.o,this.stateChanges=new r.o,this._onTouched=()=>{},this._cvaOnChange=()=>{},this._validatorOnChange=()=>{},this._datepickerSubscription=ye.a.EMPTY,this._localeSubscription=ye.a.EMPTY,this._parseValidator=()=>this._lastValueValid?null:{matDatetimePickerParse:{text:this._elementRef.nativeElement.value}},this._minValidator=t=>{const e=this._getValidDateOrNull(this._dateAdapter.deserialize(t.value));return!this.min||!e||this._dateAdapter.compareDateWithTime(this.min,e,this._datepicker.showSeconds)<=0?null:{matDatetimePickerMin:{min:this.min,actual:e}}},this._maxValidator=t=>{const e=this._getValidDateOrNull(this._dateAdapter.deserialize(t.value));return!this.max||!e||this._dateAdapter.compareDateWithTime(this.max,e,this._datepicker.showSeconds)>=0?null:{matDatetimePickerMax:{max:this.max,actual:e}}},this._filterValidator=t=>{const e=this._getValidDateOrNull(this._dateAdapter.deserialize(t.value));return this._dateFilter&&e&&!this._dateFilter(e)?{matDatetimePickerFilter:!0}:null},this._validator=pc.compose([this._parseValidator,this._minValidator,this._maxValidator,this._filterValidator]),this._lastValueValid=!1,!this._dateAdapter)throw Hf("NgxMatDateAdapter");if(!this._dateFormats)throw Hf("NGX_MAT_DATE_FORMATS");this._localeSubscription=e.localeChanges.subscribe(()=>{this.value=this.value})}set ngxMatDatetimePicker(t){t&&(this._datepicker=t,this._datepicker._registerInput(this),this._datepickerSubscription.unsubscribe(),this._datepickerSubscription=this._datepicker._selectedChanged.subscribe(t=>{this.value=t,this._cvaOnChange(t),this._onTouched(),this.dateInput.emit(new sm(this,this._elementRef.nativeElement)),this.dateChange.emit(new sm(this,this._elementRef.nativeElement))}))}set ngxMatDatetimePickerFilter(t){this._dateFilter=t,this._validatorOnChange()}get value(){return this._value}set value(t){t=this._dateAdapter.deserialize(t),this._lastValueValid=!t||this._dateAdapter.isValid(t),t=this._getValidDateOrNull(t);const e=this.value;this._value=t,this._formatValue(t),this._dateAdapter.sameDate(e,t)||this._valueChange.emit(t)}get min(){return this._min}set min(t){this._min=this._getValidDateOrNull(this._dateAdapter.deserialize(t)),this._validatorOnChange()}get max(){return this._max}set max(t){this._max=this._getValidDateOrNull(this._dateAdapter.deserialize(t)),this._validatorOnChange()}get disabled(){return!!this._disabled}set disabled(t){const e=null!=t&&"false"!=`${t}`,i=this._elementRef.nativeElement;this._disabled!==e&&(this._disabled=e,this.stateChanges.emit(void 0)),e&&i.blur&&i.blur()}ngOnDestroy(){this._datepickerSubscription.unsubscribe(),this._localeSubscription.unsubscribe(),this._valueChange.complete(),this.stateChanges.complete()}registerOnValidatorChange(t){this._validatorOnChange=t}validate(t){return this._validator?this._validator(t):null}getPopupConnectionElementRef(){return this.getConnectedOverlayOrigin()}getConnectedOverlayOrigin(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef}writeValue(t){this.value=t}registerOnChange(t){this._cvaOnChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t}_onKeydown(t){this._datepicker&&t.altKey&&40===t.keyCode&&!this._elementRef.nativeElement.readOnly&&(this._datepicker.open(),t.preventDefault())}_onInput(t){const e=this._lastValueValid;let i=this._dateAdapter.parse(t,this._dateFormats.parse.dateInput);this._lastValueValid=!i||this._dateAdapter.isValid(i),i=this._getValidDateOrNull(i);const n=this._dateAdapter.isSameTime(i,this._value);null!=i&&(!n||!this._dateAdapter.sameDate(i,this._value))||null==i&&null!=this._value?(this._value=i,this._cvaOnChange(i),this._valueChange.emit(i),this.dateInput.emit(new sm(this,this._elementRef.nativeElement))):e!==this._lastValueValid&&this._validatorOnChange()}_onChange(){this.dateChange.emit(new sm(this,this._elementRef.nativeElement))}_getThemePalette(){return this._formField?this._formField.color:void 0}_onBlur(){this.value&&this._formatValue(this.value),this._onTouched()}_onFocus(){this._datepicker&&this._datepicker.opened&&this._datepicker.cancel()}_formatValue(t){this._elementRef.nativeElement.value=t?this._dateAdapter.format(t,this._dateFormats.display.dateInput):""}_getValidDateOrNull(t){return this._dateAdapter.isDateInstance(t)&&this._dateAdapter.isValid(t)?t:null}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(Ef,8),r.Pb(Df,8),r.Pb(_u,8))},t.\u0275dir=r.Kb({type:t,selectors:[["input","ngxMatDatetimePicker",""]],hostVars:5,hostBindings:function(t,e){1&t&&r.cc("input",function(t){return e._onInput(t.target.value)})("change",function(){return e._onChange()})("blur",function(){return e._onBlur()})("focus",function(){return e._onFocus()})("keydown",function(t){return e._onKeydown(t)}),2&t&&(r.Yb("disabled",e.disabled),r.Eb("aria-haspopup",e._datepicker?"dialog":null)("aria-owns",(null==e._datepicker?null:e._datepicker.opened)&&e._datepicker.id||null)("min",e.min?e._dateAdapter.toIso8601(e.min):null)("max",e.max?e._dateAdapter.toIso8601(e.max):null))},inputs:{value:"value",ngxMatDatetimePicker:"ngxMatDatetimePicker",ngxMatDatetimePickerFilter:"ngxMatDatetimePickerFilter",min:"min",max:"max",disabled:"disabled"},outputs:{dateChange:"dateChange",dateInput:"dateInput"},exportAs:["ngxMatDatetimePickerInput"],features:[r.Cb([nm,rm,{provide:ku,useExisting:t}])]}),t})(),lm=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Et,Mu,Fh,Vh,Qp,Pl]]}),t})(),cm=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[Sd,{provide:Vf,useClass:Ff}],imports:[[Et,Zd,Jl,ve,Vh,Qp,Pl,Mu,lm]]}),t})();try{om="undefined"!=typeof Intl}catch(Knt){om=!1}const hm={long:["January","February","March","April","May","June","July","August","September","October","November","December"],short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],narrow:["J","F","M","A","M","J","J","A","S","O","N","D"]},um=fm(31,t=>String(t+1)),dm={long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],narrow:["S","M","T","W","T","F","S"]},pm=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;function fm(t,e){const i=Array(t);for(let n=0;n<t;n++)i[n]=e(n);return i}let mm=(()=>{class t extends Ef{constructor(t,e){super(),this.useUtcForDisplay=!0,super.setLocale(t),this.useUtcForDisplay=!e.TRIDENT,this._clampDate=e.TRIDENT||e.EDGE}getYear(t){return t.getFullYear()}getMonth(t){return t.getMonth()}getDate(t){return t.getDate()}getDayOfWeek(t){return t.getDay()}getMonthNames(t){if(om){const e=new Intl.DateTimeFormat(this.locale,{month:t,timeZone:"utc"});return fm(12,t=>this._stripDirectionalityCharacters(this._format(e,new Date(2017,t,1))))}return hm[t]}getDateNames(){if(om){const t=new Intl.DateTimeFormat(this.locale,{day:"numeric",timeZone:"utc"});return fm(31,e=>this._stripDirectionalityCharacters(this._format(t,new Date(2017,0,e+1))))}return um}getDayOfWeekNames(t){if(om){const e=new Intl.DateTimeFormat(this.locale,{weekday:t,timeZone:"utc"});return fm(7,t=>this._stripDirectionalityCharacters(this._format(e,new Date(2017,0,t+1))))}return dm[t]}getYearName(t){if(om){const e=new Intl.DateTimeFormat(this.locale,{year:"numeric",timeZone:"utc"});return this._stripDirectionalityCharacters(this._format(e,t))}return String(this.getYear(t))}getFirstDayOfWeek(){return 0}getNumDaysInMonth(t){return this.getDate(this._createDateWithOverflow(this.getYear(t),this.getMonth(t)+1,0))}clone(t){return new Date(t.getTime())}createDate(t,e,i){if(e<0||e>11)throw Error(`Invalid month index "${e}". Month index has to be between 0 and 11.`);if(i<1)throw Error(`Invalid date "${i}". Date has to be greater than 0.`);let n=this._createDateWithOverflow(t,e,i);if(n.getMonth()!=e)throw Error(`Invalid date "${i}" for month with index "${e}".`);return n}today(){return new Date}parse(t){return"number"==typeof t?new Date(t):t?new Date(Date.parse(t)):null}format(t,e){if(!this.isValid(t))throw Error("NativeDateAdapter: Cannot format invalid date.");if(om){this._clampDate&&(t.getFullYear()<1||t.getFullYear()>9999)&&(t=this.clone(t)).setFullYear(Math.max(1,Math.min(9999,t.getFullYear()))),e=Object.assign(Object.assign({},e),{timeZone:"utc"});const i=new Intl.DateTimeFormat(this.locale,e);return this._stripDirectionalityCharacters(this._format(i,t))}return this._stripDirectionalityCharacters(t.toDateString())}addCalendarYears(t,e){return this.addCalendarMonths(t,12*e)}addCalendarMonths(t,e){let i=this._createDateWithOverflow(this.getYear(t),this.getMonth(t)+e,this.getDate(t));return this.getMonth(i)!=((this.getMonth(t)+e)%12+12)%12&&(i=this._createDateWithOverflow(this.getYear(i),this.getMonth(i),0)),i}addCalendarDays(t,e){return this._createDateWithOverflow(this.getYear(t),this.getMonth(t),this.getDate(t)+e)}toIso8601(t){return[t.getUTCFullYear(),this._2digit(t.getUTCMonth()+1),this._2digit(t.getUTCDate())].join("-")}deserialize(t){if("string"==typeof t){if(!t)return null;if(pm.test(t)){let e=new Date(t);if(this.isValid(e))return e}}return super.deserialize(t)}isDateInstance(t){return t instanceof Date}isValid(t){return!isNaN(t.getTime())}invalid(){return new Date(NaN)}getHour(t){return t.getHours()}getMinute(t){return t.getMinutes()}getSecond(t){return t.getSeconds()}setHour(t,e){t.setHours(e)}setMinute(t,e){t.setMinutes(e)}setSecond(t,e){t.setSeconds(e)}_createDateWithOverflow(t,e,i){const n=new Date(t,e,i);return t>=0&&t<100&&n.setFullYear(this.getYear(n)-1900),n}_2digit(t){return("00"+t).slice(-2)}_stripDirectionalityCharacters(t){return t.replace(/[\u200e\u200f]/g,"")}_format(t,e){const i=new Date;return i.setUTCFullYear(e.getFullYear(),e.getMonth(),e.getDate()),i.setUTCHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),t.format(i)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Ma,8),r.Zb(ci))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();const gm={year:"numeric",month:"numeric",day:"numeric",hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"},Am={parse:{dateInput:gm},display:{dateInput:gm,monthYearLabel:{year:"numeric",month:"short"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"}}};let bm=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[{provide:Ef,useClass:mm}],imports:[[hi]]}),t})();const vm=Am;let _m=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[{provide:Df,useValue:vm}],imports:[[bm]]}),t})();const ym={leading:!0,trailing:!1};function wm(t,e=Ue,i=ym){return n=>n.lift(new xm(t,e,i.leading,i.trailing))}class xm{constructor(t,e,i,n){this.duration=t,this.scheduler=e,this.leading=i,this.trailing=n}call(t,e){return e.subscribe(new Cm(t,this.duration,this.scheduler,this.leading,this.trailing))}}class Cm extends Ee.a{constructor(t,e,i,n,r){super(t),this.duration=e,this.scheduler=i,this.leading=n,this.trailing=r,this._hasTrailingValue=!1,this._trailingValue=null}_next(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(Sm,this.duration,{subscriber:this})),this.leading?this.destination.next(t):this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0))}_complete(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()}clearThrottle(){const t=this.throttled;t&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),t.unsubscribe(),this.remove(t),this.throttled=null)}}function Sm(t){const{subscriber:e}=t;e.clearThrottle()}var km=i("A/ap"),Em=i.n(km);const Dm=["tooltipTemplate"],Im=["leftOuterSelectionBar"],Pm=["rightOuterSelectionBar"],Om=["fullBar"],Mm=["selectionBar"],Tm=["minHandle"],Rm=["maxHandle"],Vm=["floorLabel"],Fm=["ceilLabel"],Lm=["minHandleLabel"],Um=["maxHandleLabel"],Bm=["combinedLabel"],Nm=["ticksElement"];function jm(t,e){if(1&t&&r.Qb(0,"ngx-slider-tooltip-wrapper",31),2&t){const t=r.gc().$implicit,e=r.gc();r.nc("template",e.tooltipTemplate)("tooltip",t.valueTooltip)("placement",t.valueTooltipPlacement)("content",t.value)}}function zm(t,e){if(1&t&&r.Qb(0,"span",32),2&t){const t=r.gc().$implicit;r.nc("innerHTML",t.legend,r.Bc)}}const Hm=function(t){return{"ngx-slider-selected":t}};function Km(t,e){if(1&t&&(r.Vb(0,"span",27),r.Qb(1,"ngx-slider-tooltip-wrapper",28),r.Ic(2,jm,1,4,"ngx-slider-tooltip-wrapper",29),r.Ic(3,zm,1,1,"span",30),r.Ub()),2&t){const t=e.$implicit,i=r.gc();r.nc("ngClass",r.sc(7,Hm,t.selected))("ngStyle",t.style),r.Db(1),r.nc("template",i.tooltipTemplate)("tooltip",t.tooltip)("placement",t.tooltipPlacement),r.Db(1),r.nc("ngIf",null!=t.value),r.Db(1),r.nc("ngIf",null!=t.legend)}}function $m(t,e){}function Gm(t,e){1&t&&r.Ic(0,$m,0,0,"ng-template")}const Wm=function(t,e,i){return{tooltip:t,placement:e,content:i}};function Zm(t,e){if(1&t&&(r.Tb(0),r.Ic(1,Gm,1,0,void 0,1),r.Sb()),2&t){const t=r.gc();r.Db(1),r.nc("ngTemplateOutlet",t.template)("ngTemplateOutletContext",r.uc(2,Wm,t.tooltip,t.placement,t.content))}}function qm(t,e){if(1&t&&(r.Tb(0),r.Vb(1,"div",2),r.Kc(2),r.Ub(),r.Sb()),2&t){const t=r.gc();r.Db(1),r.Eb("title",t.tooltip)("data-tooltip-placement",t.placement),r.Db(1),r.Mc(" ",t.content," ")}}const Ym={Low:0,High:1,Floor:2,Ceil:3,TickValue:4};Ym[Ym.Low]="Low",Ym[Ym.High]="High",Ym[Ym.Floor]="Floor",Ym[Ym.Ceil]="Ceil",Ym[Ym.TickValue]="TickValue";class Qm{constructor(){this.floor=0,this.ceil=null,this.step=1,this.minRange=null,this.maxRange=null,this.pushRange=!1,this.minLimit=null,this.maxLimit=null,this.translate=null,this.combineLabels=null,this.getLegend=null,this.stepsArray=null,this.bindIndexForStepsArray=!1,this.draggableRange=!1,this.draggableRangeOnly=!1,this.showSelectionBar=!1,this.showSelectionBarEnd=!1,this.showSelectionBarFromValue=null,this.showOuterSelectionBars=!1,this.hidePointerLabels=!1,this.hideLimitLabels=!1,this.autoHideLimitLabels=!0,this.readOnly=!1,this.disabled=!1,this.mouseEventsInterval=50,this.touchEventsInterval=50,this.inputEventsInterval=100,this.outputEventsInterval=100,this.showTicks=!1,this.showTicksValues=!1,this.tickStep=null,this.tickValueStep=null,this.ticksArray=null,this.ticksTooltip=null,this.ticksValuesTooltip=null,this.vertical=!1,this.getSelectionBarColor=null,this.getTickColor=null,this.getPointerColor=null,this.keyboardSupport=!0,this.scale=1,this.enforceStep=!0,this.enforceRange=!0,this.enforceStepsArray=!0,this.noSwitching=!1,this.onlyBindHandles=!1,this.rightToLeft=!1,this.reversedControls=!1,this.boundPointerLabels=!0,this.logScale=!1,this.customValueToPosition=null,this.customPositionToValue=null,this.precisionLimit=12,this.selectionBarGradient=null,this.ariaLabel=null,this.ariaLabelledBy=null,this.ariaLabelHigh=null,this.ariaLabelledByHigh=null,this.handleDimension=null,this.barDimension=null,this.animate=!0,this.animateOnMove=!1}}const Xm={Min:0,Max:1};Xm[Xm.Min]="Min",Xm[Xm.Max]="Max";class Jm{}class tg{static isNullOrUndefined(t){return null==t}static areArraysEqual(t,e){if(t.length!==e.length)return!1;for(let i=0;i<t.length;++i)if(t[i]!==e[i])return!1;return!0}static linearValueToPosition(t,e,i){return(t-e)/(i-e)}static logValueToPosition(t,e,i){return((t=Math.log(t))-(e=Math.log(e)))/((i=Math.log(i))-e)}static linearPositionToValue(t,e,i){return t*(i-e)+e}static logPositionToValue(t,e,i){return e=Math.log(e),i=Math.log(i),Math.exp(t*(i-e)+e)}static findStepIndex(t,e){const i=e.map(e=>Math.abs(t-e.value));let n=0;for(let r=0;r<e.length;r++)i[r]!==i[n]&&i[r]<i[n]&&(n=r);return n}}class eg{static isTouchEvent(t){return void 0!==window.TouchEvent?t instanceof TouchEvent:void 0!==t.touches}static isResizeObserverAvailable(){return void 0!==window.ResizeObserver}}class ig{static roundToPrecisionLimit(t,e){return+t.toPrecision(e)}static isModuloWithinPrecisionLimit(t,e,i){const n=Math.pow(10,-i);return Math.abs(t%e)<=n||Math.abs(Math.abs(t%e)-e)<=n}static clampToRange(t,e,i){return Math.min(Math.max(t,e),i)}}class ng{constructor(){this.eventName=null,this.events=null,this.eventsSubscription=null,this.teardownCallback=null}}class rg{constructor(t){this.renderer=t}attachPassiveEventListener(t,e,i,n){if(!0!==Em.a.hasSupport)return this.attachEventListener(t,e,i,n);const r=new ng;r.eventName=e,r.events=new _e.a;const s=t=>{r.events.next(t)};return t.addEventListener(e,s,{passive:!0,capture:!1}),r.teardownCallback=()=>{t.removeEventListener(e,s,{passive:!0,capture:!1})},r.eventsSubscription=r.events.pipe(tg.isNullOrUndefined(n)?Pe(()=>{}):wm(n,void 0,{leading:!0,trailing:!0})).subscribe(t=>{i(t)}),r}detachEventListener(t){tg.isNullOrUndefined(t.eventsSubscription)||(t.eventsSubscription.unsubscribe(),t.eventsSubscription=null),tg.isNullOrUndefined(t.events)||(t.events.complete(),t.events=null),tg.isNullOrUndefined(t.teardownCallback)||(t.teardownCallback(),t.teardownCallback=null)}attachEventListener(t,e,i,n){const r=new ng;return r.eventName=e,r.events=new _e.a,r.teardownCallback=this.renderer.listen(t,e,t=>{r.events.next(t)}),r.eventsSubscription=r.events.pipe(tg.isNullOrUndefined(n)?Pe(()=>{}):wm(n,void 0,{leading:!0,trailing:!0})).subscribe(t=>{i(t)}),r}}let sg=(()=>{class t{constructor(t,e,i){this.elemRef=t,this.renderer=e,this.changeDetectionRef=i,this._position=0,this._dimension=0,this._alwaysHide=!1,this._vertical=!1,this._scale=1,this.opacity=1,this.visibility="visible",this.left="",this.bottom="",this.height="",this.width="",this.eventListeners=[],this.eventListenerHelper=new rg(this.renderer)}get position(){return this._position}get dimension(){return this._dimension}get alwaysHide(){return this._alwaysHide}get vertical(){return this._vertical}get scale(){return this._scale}setAlwaysHide(t){this._alwaysHide=t,this.visibility=t?"hidden":"visible"}hide(){this.opacity=0}show(){this.alwaysHide||(this.opacity=1)}isVisible(){return!this.alwaysHide&&0!==this.opacity}setVertical(t){this._vertical=t,this._vertical?(this.left="",this.width=""):(this.bottom="",this.height="")}setScale(t){this._scale=t}setPosition(t){this._position===t||this.isRefDestroyed()||this.changeDetectionRef.markForCheck(),this._position=t,this._vertical?this.bottom=Math.round(t)+"px":this.left=Math.round(t)+"px"}calculateDimension(){const t=this.getBoundingClientRect();this._dimension=this.vertical?(t.bottom-t.top)*this.scale:(t.right-t.left)*this.scale}setDimension(t){this._dimension===t||this.isRefDestroyed()||this.changeDetectionRef.markForCheck(),this._dimension=t,this._vertical?this.height=Math.round(t)+"px":this.width=Math.round(t)+"px"}getBoundingClientRect(){return this.elemRef.nativeElement.getBoundingClientRect()}on(t,e,i){const n=this.eventListenerHelper.attachEventListener(this.elemRef.nativeElement,t,e,i);this.eventListeners.push(n)}onPassive(t,e,i){const n=this.eventListenerHelper.attachPassiveEventListener(this.elemRef.nativeElement,t,e,i);this.eventListeners.push(n)}off(t){let e,i;tg.isNullOrUndefined(t)?(e=[],i=this.eventListeners):(e=this.eventListeners.filter(e=>e.eventName!==t),i=this.eventListeners.filter(e=>e.eventName===t));for(const n of i)this.eventListenerHelper.detachEventListener(n);this.eventListeners=e}isRefDestroyed(){return tg.isNullOrUndefined(this.changeDetectionRef)||this.changeDetectionRef.destroyed}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.H),r.Pb(r.h))},t.\u0275dir=r.Kb({type:t,selectors:[["","ngxSliderElement",""]],hostVars:12,hostBindings:function(t,e){2&t&&r.Fc("opacity",e.opacity)("visibility",e.visibility)("left",e.left)("bottom",e.bottom)("height",e.height)("width",e.width)}}),t})(),og=(()=>{class t extends sg{constructor(t,e,i){super(t,e,i),this.active=!1,this.role="",this.tabindex="",this.ariaOrientation="",this.ariaLabel="",this.ariaLabelledBy="",this.ariaValueNow="",this.ariaValueText="",this.ariaValueMin="",this.ariaValueMax=""}focus(){this.elemRef.nativeElement.focus()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.H),r.Pb(r.h))},t.\u0275dir=r.Kb({type:t,selectors:[["","ngxSliderHandle",""]],hostVars:11,hostBindings:function(t,e){2&t&&(r.Eb("role",e.role)("tabindex",e.tabindex)("aria-orientation",e.ariaOrientation)("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledBy)("aria-valuenow",e.ariaValueNow)("aria-valuetext",e.ariaValueText)("aria-valuemin",e.ariaValueMin)("aria-valuemax",e.ariaValueMax),r.Hb("ngx-slider-active",e.active))},features:[r.Ab]}),t})(),ag=(()=>{class t extends sg{constructor(t,e,i){super(t,e,i),this._value=null}get value(){return this._value}setValue(t){let e=!1;!this.alwaysHide&&(tg.isNullOrUndefined(this.value)||this.value.length!==t.length||this.value.length>0&&0===this.dimension)&&(e=!0),this._value=t,this.elemRef.nativeElement.innerHTML=t,e&&this.calculateDimension()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.H),r.Pb(r.h))},t.\u0275dir=r.Kb({type:t,selectors:[["","ngxSliderLabel",""]],features:[r.Ab]}),t})();class lg{constructor(){this.selected=!1,this.style={},this.tooltip=null,this.tooltipPlacement=null,this.value=null,this.valueTooltip=null,this.valueTooltipPlacement=null,this.legend=null}}class cg{constructor(){this.active=!1,this.value=0,this.difference=0,this.position=0,this.lowLimit=0,this.highLimit=0}}class hg{static compare(t,e){return!(tg.isNullOrUndefined(t)&&tg.isNullOrUndefined(e)||tg.isNullOrUndefined(t)!==tg.isNullOrUndefined(e)||t.value!==e.value||t.highValue!==e.highValue)}}class ug extends hg{static compare(t,e){return!(tg.isNullOrUndefined(t)&&tg.isNullOrUndefined(e)||tg.isNullOrUndefined(t)!==tg.isNullOrUndefined(e)||t.value!==e.value||t.highValue!==e.highValue||t.forceChange!==e.forceChange)}}const dg={provide:rc,useExisting:Object(r.W)(()=>pg),multi:!0};let pg=(()=>{class t{constructor(t,e,i,n){this.renderer=t,this.elementRef=e,this.changeDetectionRef=i,this.zone=n,this.value=null,this.valueChange=new r.o,this.highValue=null,this.highValueChange=new r.o,this.options=new Qm,this.userChangeStart=new r.o,this.userChange=new r.o,this.userChangeEnd=new r.o,this.initHasRun=!1,this.inputModelChangeSubject=new _e.a,this.inputModelChangeSubscription=null,this.outputModelChangeSubject=new _e.a,this.outputModelChangeSubscription=null,this.viewLowValue=null,this.viewHighValue=null,this.viewOptions=new Qm,this.handleHalfDimension=0,this.maxHandlePosition=0,this.currentTrackingPointer=null,this.currentFocusPointer=null,this.firstKeyDown=!1,this.touchId=null,this.dragging=new cg,this.sliderElementVerticalClass=!1,this.sliderElementAnimateClass=!1,this.sliderElementWithLegendClass=!1,this.sliderElementDisabledAttr=null,this.barStyle={},this.minPointerStyle={},this.maxPointerStyle={},this.fullBarTransparentClass=!1,this.selectionBarDraggableClass=!1,this.ticksUnderValuesClass=!1,this.intermediateTicks=!1,this.ticks=[],this.eventListenerHelper=null,this.onMoveEventListener=null,this.onEndEventListener=null,this.moving=!1,this.resizeObserver=null,this.onTouchedCallback=null,this.onChangeCallback=null,this.eventListenerHelper=new rg(this.renderer)}set manualRefresh(t){this.unsubscribeManualRefresh(),this.manualRefreshSubscription=t.subscribe(()=>{setTimeout(()=>this.calculateViewDimensionsAndDetectChanges())})}set triggerFocus(t){this.unsubscribeTriggerFocus(),this.triggerFocusSubscription=t.subscribe(t=>{this.focusPointer(t)})}get range(){return!tg.isNullOrUndefined(this.value)&&!tg.isNullOrUndefined(this.highValue)}get showTicks(){return this.viewOptions.showTicks}ngOnInit(){this.viewOptions=new Qm,Object.assign(this.viewOptions,this.options),this.updateDisabledState(),this.updateVerticalState()}ngAfterViewInit(){this.applyOptions(),this.subscribeInputModelChangeSubject(this.viewOptions.inputEventsInterval),this.subscribeOutputModelChangeSubject(this.viewOptions.outputEventsInterval),this.renormaliseModelValues(),this.viewLowValue=this.modelValueToViewValue(this.value),this.viewHighValue=this.range?this.modelValueToViewValue(this.highValue):null,this.updateVerticalState(),this.manageElementsStyle(),this.updateDisabledState(),this.calculateViewDimensions(),this.addAccessibility(),this.updateCeilLabel(),this.updateFloorLabel(),this.initHandles(),this.manageEventsBindings(),this.subscribeResizeObserver(),this.initHasRun=!0,this.isRefDestroyed()||this.changeDetectionRef.detectChanges()}ngOnChanges(t){tg.isNullOrUndefined(t.options)||this.onChangeOptions(),tg.isNullOrUndefined(t.value)&&tg.isNullOrUndefined(t.highValue)||this.inputModelChangeSubject.next({value:this.value,highValue:this.highValue,forceChange:!1,internalChange:!1})}ngOnDestroy(){this.unbindEvents(),this.unsubscribeResizeObserver(),this.unsubscribeInputModelChangeSubject(),this.unsubscribeOutputModelChangeSubject(),this.unsubscribeManualRefresh(),this.unsubscribeTriggerFocus()}writeValue(t){t instanceof Array?(this.value=t[0],this.highValue=t[1]):this.value=t,this.inputModelChangeSubject.next({value:this.value,highValue:this.highValue,forceChange:!1,internalChange:!1})}registerOnChange(t){this.onChangeCallback=t}registerOnTouched(t){this.onTouchedCallback=t}setDisabledState(t){this.viewOptions.disabled=t,this.updateDisabledState()}onResize(t){this.calculateViewDimensionsAndDetectChanges()}subscribeInputModelChangeSubject(t){this.inputModelChangeSubscription=this.inputModelChangeSubject.pipe(mn(ug.compare),He(t=>!t.forceChange&&!t.internalChange),tg.isNullOrUndefined(t)?Pe(()=>{}):wm(t,void 0,{leading:!0,trailing:!0})).subscribe(t=>this.applyInputModelChange(t))}subscribeOutputModelChangeSubject(t){this.outputModelChangeSubscription=this.outputModelChangeSubject.pipe(mn(ug.compare),tg.isNullOrUndefined(t)?Pe(()=>{}):wm(t,void 0,{leading:!0,trailing:!0})).subscribe(t=>this.publishOutputModelChange(t))}subscribeResizeObserver(){eg.isResizeObserverAvailable()&&(this.resizeObserver=new ResizeObserver(()=>this.calculateViewDimensionsAndDetectChanges()),this.resizeObserver.observe(this.elementRef.nativeElement))}unsubscribeResizeObserver(){eg.isResizeObserverAvailable()&&null!==this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}unsubscribeOnMove(){tg.isNullOrUndefined(this.onMoveEventListener)||(this.eventListenerHelper.detachEventListener(this.onMoveEventListener),this.onMoveEventListener=null)}unsubscribeOnEnd(){tg.isNullOrUndefined(this.onEndEventListener)||(this.eventListenerHelper.detachEventListener(this.onEndEventListener),this.onEndEventListener=null)}unsubscribeInputModelChangeSubject(){tg.isNullOrUndefined(this.inputModelChangeSubscription)||(this.inputModelChangeSubscription.unsubscribe(),this.inputModelChangeSubscription=null)}unsubscribeOutputModelChangeSubject(){tg.isNullOrUndefined(this.outputModelChangeSubscription)||(this.outputModelChangeSubscription.unsubscribe(),this.outputModelChangeSubscription=null)}unsubscribeManualRefresh(){tg.isNullOrUndefined(this.manualRefreshSubscription)||(this.manualRefreshSubscription.unsubscribe(),this.manualRefreshSubscription=null)}unsubscribeTriggerFocus(){tg.isNullOrUndefined(this.triggerFocusSubscription)||(this.triggerFocusSubscription.unsubscribe(),this.triggerFocusSubscription=null)}getPointerElement(t){return t===Xm.Min?this.minHandleElement:t===Xm.Max?this.maxHandleElement:null}getCurrentTrackingValue(){return this.currentTrackingPointer===Xm.Min?this.viewLowValue:this.currentTrackingPointer===Xm.Max?this.viewHighValue:null}modelValueToViewValue(t){return tg.isNullOrUndefined(t)?NaN:tg.isNullOrUndefined(this.viewOptions.stepsArray)||this.viewOptions.bindIndexForStepsArray?+t:tg.findStepIndex(+t,this.viewOptions.stepsArray)}viewValueToModelValue(t){return tg.isNullOrUndefined(this.viewOptions.stepsArray)||this.viewOptions.bindIndexForStepsArray?t:this.getStepValue(t)}getStepValue(t){const e=this.viewOptions.stepsArray[t];return tg.isNullOrUndefined(e)?NaN:e.value}applyViewChange(){this.value=this.viewValueToModelValue(this.viewLowValue),this.range&&(this.highValue=this.viewValueToModelValue(this.viewHighValue)),this.outputModelChangeSubject.next({value:this.value,highValue:this.highValue,userEventInitiated:!0,forceChange:!1}),this.inputModelChangeSubject.next({value:this.value,highValue:this.highValue,forceChange:!1,internalChange:!0})}applyInputModelChange(t){const e=this.normaliseModelValues(t),i=!hg.compare(t,e);i&&(this.value=e.value,this.highValue=e.highValue),this.viewLowValue=this.modelValueToViewValue(e.value),this.viewHighValue=this.range?this.modelValueToViewValue(e.highValue):null,this.updateLowHandle(this.valueToPosition(this.viewLowValue)),this.range&&this.updateHighHandle(this.valueToPosition(this.viewHighValue)),this.updateSelectionBar(),this.updateTicksScale(),this.updateAriaAttributes(),this.range&&this.updateCombinedLabel(),this.outputModelChangeSubject.next({value:e.value,highValue:e.highValue,forceChange:i,userEventInitiated:!1})}publishOutputModelChange(t){const e=()=>{this.valueChange.emit(t.value),this.range&&this.highValueChange.emit(t.highValue),tg.isNullOrUndefined(this.onChangeCallback)||this.onChangeCallback(this.range?[t.value,t.highValue]:t.value),tg.isNullOrUndefined(this.onTouchedCallback)||this.onTouchedCallback(this.range?[t.value,t.highValue]:t.value)};t.userEventInitiated?(e(),this.userChange.emit(this.getChangeContext())):setTimeout(()=>{e()})}normaliseModelValues(t){const e=new hg;if(e.value=t.value,e.highValue=t.highValue,!tg.isNullOrUndefined(this.viewOptions.stepsArray)){if(this.viewOptions.enforceStepsArray){const t=tg.findStepIndex(e.value,this.viewOptions.stepsArray);if(e.value=this.viewOptions.stepsArray[t].value,this.range){const t=tg.findStepIndex(e.highValue,this.viewOptions.stepsArray);e.highValue=this.viewOptions.stepsArray[t].value}}return e}if(this.viewOptions.enforceStep&&(e.value=this.roundStep(e.value),this.range&&(e.highValue=this.roundStep(e.highValue))),this.viewOptions.enforceRange&&(e.value=ig.clampToRange(e.value,this.viewOptions.floor,this.viewOptions.ceil),this.range&&(e.highValue=ig.clampToRange(e.highValue,this.viewOptions.floor,this.viewOptions.ceil)),this.range&&t.value>t.highValue))if(this.viewOptions.noSwitching)e.value=e.highValue;else{const i=t.value;e.value=t.highValue,e.highValue=i}return e}renormaliseModelValues(){const t={value:this.value,highValue:this.highValue},e=this.normaliseModelValues(t);hg.compare(e,t)||(this.value=e.value,this.highValue=e.highValue,this.outputModelChangeSubject.next({value:this.value,highValue:this.highValue,forceChange:!0,userEventInitiated:!1}))}onChangeOptions(){if(!this.initHasRun)return;const t=this.viewOptions.inputEventsInterval,e=this.viewOptions.outputEventsInterval,i=this.getOptionsInfluencingEventBindings(this.viewOptions);this.applyOptions();const n=this.getOptionsInfluencingEventBindings(this.viewOptions),r=!tg.areArraysEqual(i,n);t!==this.viewOptions.inputEventsInterval&&(this.unsubscribeInputModelChangeSubject(),this.subscribeInputModelChangeSubject(this.viewOptions.inputEventsInterval)),e!==this.viewOptions.outputEventsInterval&&(this.unsubscribeInputModelChangeSubject(),this.subscribeInputModelChangeSubject(this.viewOptions.outputEventsInterval)),this.renormaliseModelValues(),this.viewLowValue=this.modelValueToViewValue(this.value),this.viewHighValue=this.range?this.modelValueToViewValue(this.highValue):null,this.resetSlider(r)}applyOptions(){if(this.viewOptions=new Qm,Object.assign(this.viewOptions,this.options),this.viewOptions.draggableRange=this.range&&this.viewOptions.draggableRange,this.viewOptions.draggableRangeOnly=this.range&&this.viewOptions.draggableRangeOnly,this.viewOptions.draggableRangeOnly&&(this.viewOptions.draggableRange=!0),this.viewOptions.showTicks=this.viewOptions.showTicks||this.viewOptions.showTicksValues||!tg.isNullOrUndefined(this.viewOptions.ticksArray),!this.viewOptions.showTicks||tg.isNullOrUndefined(this.viewOptions.tickStep)&&tg.isNullOrUndefined(this.viewOptions.ticksArray)||(this.intermediateTicks=!0),this.viewOptions.showSelectionBar=this.viewOptions.showSelectionBar||this.viewOptions.showSelectionBarEnd||!tg.isNullOrUndefined(this.viewOptions.showSelectionBarFromValue),tg.isNullOrUndefined(this.viewOptions.stepsArray)?this.applyFloorCeilOptions():this.applyStepsArrayOptions(),tg.isNullOrUndefined(this.viewOptions.combineLabels)&&(this.viewOptions.combineLabels=(t,e)=>t+" - "+e),this.viewOptions.logScale&&0===this.viewOptions.floor)throw Error("Can't use floor=0 with logarithmic scale")}applyStepsArrayOptions(){this.viewOptions.floor=0,this.viewOptions.ceil=this.viewOptions.stepsArray.length-1,this.viewOptions.step=1,tg.isNullOrUndefined(this.viewOptions.translate)&&(this.viewOptions.translate=t=>String(this.viewOptions.bindIndexForStepsArray?this.getStepValue(t):t))}applyFloorCeilOptions(){if(tg.isNullOrUndefined(this.viewOptions.step)?this.viewOptions.step=1:(this.viewOptions.step=+this.viewOptions.step,this.viewOptions.step<=0&&(this.viewOptions.step=1)),tg.isNullOrUndefined(this.viewOptions.ceil)||tg.isNullOrUndefined(this.viewOptions.floor))throw Error("floor and ceil options must be supplied");this.viewOptions.ceil=+this.viewOptions.ceil,this.viewOptions.floor=+this.viewOptions.floor,tg.isNullOrUndefined(this.viewOptions.translate)&&(this.viewOptions.translate=t=>String(t))}resetSlider(t=!0){this.manageElementsStyle(),this.addAccessibility(),this.updateCeilLabel(),this.updateFloorLabel(),t&&(this.unbindEvents(),this.manageEventsBindings()),this.updateDisabledState(),this.calculateViewDimensions(),this.refocusPointerIfNeeded()}focusPointer(t){t!==Xm.Min&&t!==Xm.Max&&(t=Xm.Min),t===Xm.Min?this.minHandleElement.focus():this.range&&t===Xm.Max&&this.maxHandleElement.focus()}refocusPointerIfNeeded(){tg.isNullOrUndefined(this.currentFocusPointer)||(this.onPointerFocus(this.currentFocusPointer),this.getPointerElement(this.currentFocusPointer).focus())}manageElementsStyle(){this.updateScale(),this.floorLabelElement.setAlwaysHide(this.viewOptions.showTicksValues||this.viewOptions.hideLimitLabels),this.ceilLabelElement.setAlwaysHide(this.viewOptions.showTicksValues||this.viewOptions.hideLimitLabels);const t=this.viewOptions.showTicksValues&&!this.intermediateTicks;this.minHandleLabelElement.setAlwaysHide(t||this.viewOptions.hidePointerLabels),this.maxHandleLabelElement.setAlwaysHide(t||!this.range||this.viewOptions.hidePointerLabels),this.combinedLabelElement.setAlwaysHide(t||!this.range||this.viewOptions.hidePointerLabels),this.selectionBarElement.setAlwaysHide(!this.range&&!this.viewOptions.showSelectionBar),this.leftOuterSelectionBarElement.setAlwaysHide(!this.range||!this.viewOptions.showOuterSelectionBars),this.rightOuterSelectionBarElement.setAlwaysHide(!this.range||!this.viewOptions.showOuterSelectionBars),this.fullBarTransparentClass=this.range&&this.viewOptions.showOuterSelectionBars,this.selectionBarDraggableClass=this.viewOptions.draggableRange&&!this.viewOptions.onlyBindHandles,this.ticksUnderValuesClass=this.intermediateTicks&&this.options.showTicksValues,this.sliderElementVerticalClass!==this.viewOptions.vertical&&(this.updateVerticalState(),setTimeout(()=>{this.resetSlider()})),this.sliderElementAnimateClass!==this.viewOptions.animate&&setTimeout(()=>{this.sliderElementAnimateClass=this.viewOptions.animate})}manageEventsBindings(){this.viewOptions.disabled||this.viewOptions.readOnly?this.unbindEvents():this.bindEvents()}updateDisabledState(){this.sliderElementDisabledAttr=this.viewOptions.disabled?"disabled":null}updateVerticalState(){this.sliderElementVerticalClass=this.viewOptions.vertical;for(const t of this.getAllSliderElements())tg.isNullOrUndefined(t)||t.setVertical(this.viewOptions.vertical)}updateScale(){for(const t of this.getAllSliderElements())t.setScale(this.viewOptions.scale)}getAllSliderElements(){return[this.leftOuterSelectionBarElement,this.rightOuterSelectionBarElement,this.fullBarElement,this.selectionBarElement,this.minHandleElement,this.maxHandleElement,this.floorLabelElement,this.ceilLabelElement,this.minHandleLabelElement,this.maxHandleLabelElement,this.combinedLabelElement,this.ticksElement]}initHandles(){this.updateLowHandle(this.valueToPosition(this.viewLowValue)),this.range&&this.updateHighHandle(this.valueToPosition(this.viewHighValue)),this.updateSelectionBar(),this.range&&this.updateCombinedLabel(),this.updateTicksScale()}addAccessibility(){this.updateAriaAttributes(),this.minHandleElement.role="slider",this.minHandleElement.tabindex=!this.viewOptions.keyboardSupport||this.viewOptions.readOnly||this.viewOptions.disabled?"":"0",this.minHandleElement.ariaOrientation=this.viewOptions.vertical?"vertical":"horizontal",tg.isNullOrUndefined(this.viewOptions.ariaLabel)?tg.isNullOrUndefined(this.viewOptions.ariaLabelledBy)||(this.minHandleElement.ariaLabelledBy=this.viewOptions.ariaLabelledBy):this.minHandleElement.ariaLabel=this.viewOptions.ariaLabel,this.range&&(this.maxHandleElement.role="slider",this.maxHandleElement.tabindex=!this.viewOptions.keyboardSupport||this.viewOptions.readOnly||this.viewOptions.disabled?"":"0",this.maxHandleElement.ariaOrientation=this.viewOptions.vertical?"vertical":"horizontal",tg.isNullOrUndefined(this.viewOptions.ariaLabelHigh)?tg.isNullOrUndefined(this.viewOptions.ariaLabelledByHigh)||(this.maxHandleElement.ariaLabelledBy=this.viewOptions.ariaLabelledByHigh):this.maxHandleElement.ariaLabel=this.viewOptions.ariaLabelHigh)}updateAriaAttributes(){this.minHandleElement.ariaValueNow=(+this.value).toString(),this.minHandleElement.ariaValueText=this.viewOptions.translate(+this.value,Ym.Low),this.minHandleElement.ariaValueMin=this.viewOptions.floor.toString(),this.minHandleElement.ariaValueMax=this.viewOptions.ceil.toString(),this.range&&(this.maxHandleElement.ariaValueNow=(+this.highValue).toString(),this.maxHandleElement.ariaValueText=this.viewOptions.translate(+this.highValue,Ym.High),this.maxHandleElement.ariaValueMin=this.viewOptions.floor.toString(),this.maxHandleElement.ariaValueMax=this.viewOptions.ceil.toString())}calculateViewDimensions(){tg.isNullOrUndefined(this.viewOptions.handleDimension)?this.minHandleElement.calculateDimension():this.minHandleElement.setDimension(this.viewOptions.handleDimension);const t=this.minHandleElement.dimension;this.handleHalfDimension=t/2,tg.isNullOrUndefined(this.viewOptions.barDimension)?this.fullBarElement.calculateDimension():this.fullBarElement.setDimension(this.viewOptions.barDimension),this.maxHandlePosition=this.fullBarElement.dimension-t,this.initHasRun&&(this.updateFloorLabel(),this.updateCeilLabel(),this.initHandles())}calculateViewDimensionsAndDetectChanges(){this.calculateViewDimensions(),this.isRefDestroyed()||this.changeDetectionRef.detectChanges()}isRefDestroyed(){return this.changeDetectionRef.destroyed}updateTicksScale(){if(!this.viewOptions.showTicks)return void setTimeout(()=>{this.sliderElementWithLegendClass=!1});const t=tg.isNullOrUndefined(this.viewOptions.ticksArray)?this.getTicksArray():this.viewOptions.ticksArray,e=this.viewOptions.vertical?"translateY":"translateX";this.viewOptions.rightToLeft&&t.reverse();const i=tg.isNullOrUndefined(this.viewOptions.tickValueStep)?tg.isNullOrUndefined(this.viewOptions.tickStep)?this.viewOptions.step:this.viewOptions.tickStep:this.viewOptions.tickValueStep;let n=!1;const r=t.map(t=>{let r=this.valueToPosition(t);this.viewOptions.vertical&&(r=this.maxHandlePosition-r);const s=e+"("+Math.round(r)+"px)",o=new lg;o.selected=this.isTickSelected(t),o.style={"-webkit-transform":s,"-moz-transform":s,"-o-transform":s,"-ms-transform":s,transform:s},o.selected&&!tg.isNullOrUndefined(this.viewOptions.getSelectionBarColor)&&(o.style["background-color"]=this.getSelectionBarColor()),o.selected||tg.isNullOrUndefined(this.viewOptions.getTickColor)||(o.style["background-color"]=this.getTickColor(t)),tg.isNullOrUndefined(this.viewOptions.ticksTooltip)||(o.tooltip=this.viewOptions.ticksTooltip(t),o.tooltipPlacement=this.viewOptions.vertical?"right":"top"),this.viewOptions.showTicksValues&&!tg.isNullOrUndefined(i)&&ig.isModuloWithinPrecisionLimit(t,i,this.viewOptions.precisionLimit)&&(o.value=this.getDisplayValue(t,Ym.TickValue),tg.isNullOrUndefined(this.viewOptions.ticksValuesTooltip)||(o.valueTooltip=this.viewOptions.ticksValuesTooltip(t),o.valueTooltipPlacement=this.viewOptions.vertical?"right":"top"));let a=null;if(tg.isNullOrUndefined(this.viewOptions.stepsArray))tg.isNullOrUndefined(this.viewOptions.getLegend)||(a=this.viewOptions.getLegend(t));else{const e=this.viewOptions.stepsArray[t];tg.isNullOrUndefined(e)||(a=e.legend)}return tg.isNullOrUndefined(a)||(o.legend=a,n=!0),o});if(setTimeout(()=>{this.sliderElementWithLegendClass=n}),tg.isNullOrUndefined(this.ticks)||this.ticks.length!==r.length)this.ticks=r;else for(let s=0;s<r.length;++s)Object.assign(this.ticks[s],r[s]);this.isRefDestroyed()||this.changeDetectionRef.detectChanges()}getTicksArray(){const t=tg.isNullOrUndefined(this.viewOptions.tickStep)?this.viewOptions.step:this.viewOptions.tickStep,e=[],i=1+Math.floor(ig.roundToPrecisionLimit(Math.abs(this.viewOptions.ceil-this.viewOptions.floor)/t,this.viewOptions.precisionLimit));for(let n=0;n<i;++n)e.push(ig.roundToPrecisionLimit(this.viewOptions.floor+t*n,this.viewOptions.precisionLimit));return e}isTickSelected(t){if(!this.range)if(tg.isNullOrUndefined(this.viewOptions.showSelectionBarFromValue)){if(this.viewOptions.showSelectionBarEnd){if(t>=this.viewLowValue)return!0}else if(this.viewOptions.showSelectionBar&&t<=this.viewLowValue)return!0}else{const e=this.viewOptions.showSelectionBarFromValue;if(this.viewLowValue>e&&t>=e&&t<=this.viewLowValue)return!0;if(this.viewLowValue<e&&t<=e&&t>=this.viewLowValue)return!0}return!!(this.range&&t>=this.viewLowValue&&t<=this.viewHighValue)}updateFloorLabel(){this.floorLabelElement.alwaysHide||(this.floorLabelElement.setValue(this.getDisplayValue(this.viewOptions.floor,Ym.Floor)),this.floorLabelElement.calculateDimension(),this.floorLabelElement.setPosition(this.viewOptions.rightToLeft?this.fullBarElement.dimension-this.floorLabelElement.dimension:0))}updateCeilLabel(){this.ceilLabelElement.alwaysHide||(this.ceilLabelElement.setValue(this.getDisplayValue(this.viewOptions.ceil,Ym.Ceil)),this.ceilLabelElement.calculateDimension(),this.ceilLabelElement.setPosition(this.viewOptions.rightToLeft?0:this.fullBarElement.dimension-this.ceilLabelElement.dimension))}updateHandles(t,e){t===Xm.Min?this.updateLowHandle(e):t===Xm.Max&&this.updateHighHandle(e),this.updateSelectionBar(),this.updateTicksScale(),this.range&&this.updateCombinedLabel()}getHandleLabelPos(t,e){const i=t===Xm.Min?this.minHandleLabelElement.dimension:this.maxHandleLabelElement.dimension,n=e-i/2+this.handleHalfDimension,r=this.fullBarElement.dimension-i;return this.viewOptions.boundPointerLabels?this.viewOptions.rightToLeft&&t===Xm.Min||!this.viewOptions.rightToLeft&&t===Xm.Max?Math.min(n,r):Math.min(Math.max(n,0),r):n}updateLowHandle(t){this.minHandleElement.setPosition(t),this.minHandleLabelElement.setValue(this.getDisplayValue(this.viewLowValue,Ym.Low)),this.minHandleLabelElement.setPosition(this.getHandleLabelPos(Xm.Min,t)),tg.isNullOrUndefined(this.viewOptions.getPointerColor)||(this.minPointerStyle={backgroundColor:this.getPointerColor(Xm.Min)}),this.viewOptions.autoHideLimitLabels&&this.updateFloorAndCeilLabelsVisibility()}updateHighHandle(t){this.maxHandleElement.setPosition(t),this.maxHandleLabelElement.setValue(this.getDisplayValue(this.viewHighValue,Ym.High)),this.maxHandleLabelElement.setPosition(this.getHandleLabelPos(Xm.Max,t)),tg.isNullOrUndefined(this.viewOptions.getPointerColor)||(this.maxPointerStyle={backgroundColor:this.getPointerColor(Xm.Max)}),this.viewOptions.autoHideLimitLabels&&this.updateFloorAndCeilLabelsVisibility()}updateFloorAndCeilLabelsVisibility(){if(this.viewOptions.hidePointerLabels)return;let t=!1,e=!1;const i=this.isLabelBelowFloorLabel(this.minHandleLabelElement),n=this.isLabelAboveCeilLabel(this.minHandleLabelElement),r=this.isLabelAboveCeilLabel(this.maxHandleLabelElement),s=this.isLabelBelowFloorLabel(this.combinedLabelElement),o=this.isLabelAboveCeilLabel(this.combinedLabelElement);if(i?(t=!0,this.floorLabelElement.hide()):(t=!1,this.floorLabelElement.show()),n?(e=!0,this.ceilLabelElement.hide()):(e=!1,this.ceilLabelElement.show()),this.range){const n=this.combinedLabelElement.isVisible()?o:r,a=this.combinedLabelElement.isVisible()?s:i;n?this.ceilLabelElement.hide():e||this.ceilLabelElement.show(),a?this.floorLabelElement.hide():t||this.floorLabelElement.show()}}isLabelBelowFloorLabel(t){const e=t.position,i=this.floorLabelElement.position;return this.viewOptions.rightToLeft?e+t.dimension>=i-2:e<=i+this.floorLabelElement.dimension+2}isLabelAboveCeilLabel(t){const e=t.position,i=this.ceilLabelElement.position;return this.viewOptions.rightToLeft?e<=i+this.ceilLabelElement.dimension+2:e+t.dimension>=i-2}updateSelectionBar(){let t=0,e=0;const i=this.viewOptions.rightToLeft?!this.viewOptions.showSelectionBarEnd:this.viewOptions.showSelectionBarEnd,n=this.viewOptions.rightToLeft?this.maxHandleElement.position+this.handleHalfDimension:this.minHandleElement.position+this.handleHalfDimension;if(this.range)e=Math.abs(this.maxHandleElement.position-this.minHandleElement.position),t=n;else if(tg.isNullOrUndefined(this.viewOptions.showSelectionBarFromValue))i?(e=Math.ceil(Math.abs(this.maxHandlePosition-this.minHandleElement.position)+this.handleHalfDimension),t=Math.floor(this.minHandleElement.position+this.handleHalfDimension)):(e=this.minHandleElement.position+this.handleHalfDimension,t=0);else{const i=this.viewOptions.showSelectionBarFromValue,n=this.valueToPosition(i);(this.viewOptions.rightToLeft?this.viewLowValue<=i:this.viewLowValue>i)?(e=this.minHandleElement.position-n,t=n+this.handleHalfDimension):(e=n-this.minHandleElement.position,t=this.minHandleElement.position+this.handleHalfDimension)}if(this.selectionBarElement.setDimension(e),this.selectionBarElement.setPosition(t),this.range&&this.viewOptions.showOuterSelectionBars&&(this.viewOptions.rightToLeft?(this.rightOuterSelectionBarElement.setDimension(t),this.rightOuterSelectionBarElement.setPosition(0),this.fullBarElement.calculateDimension(),this.leftOuterSelectionBarElement.setDimension(this.fullBarElement.dimension-(t+e)),this.leftOuterSelectionBarElement.setPosition(t+e)):(this.leftOuterSelectionBarElement.setDimension(t),this.leftOuterSelectionBarElement.setPosition(0),this.fullBarElement.calculateDimension(),this.rightOuterSelectionBarElement.setDimension(this.fullBarElement.dimension-(t+e)),this.rightOuterSelectionBarElement.setPosition(t+e))),tg.isNullOrUndefined(this.viewOptions.getSelectionBarColor)){if(!tg.isNullOrUndefined(this.viewOptions.selectionBarGradient)){const n=tg.isNullOrUndefined(this.viewOptions.showSelectionBarFromValue)?0:this.valueToPosition(this.viewOptions.showSelectionBarFromValue),r=n-t>0&&!i||n-t<=0&&i;this.barStyle={backgroundImage:"linear-gradient(to "+(this.viewOptions.vertical?r?"bottom":"top":r?"left":"right")+", "+this.viewOptions.selectionBarGradient.from+" 0%,"+this.viewOptions.selectionBarGradient.to+" 100%)"},this.viewOptions.vertical?(this.barStyle.backgroundPosition="center "+(n+e+t+(r?-this.handleHalfDimension:0))+"px",this.barStyle.backgroundSize="100% "+(this.fullBarElement.dimension-this.handleHalfDimension)+"px"):(this.barStyle.backgroundPosition=n-t+(r?this.handleHalfDimension:0)+"px center",this.barStyle.backgroundSize=this.fullBarElement.dimension-this.handleHalfDimension+"px 100%")}}else{const t=this.getSelectionBarColor();this.barStyle={backgroundColor:t}}}getSelectionBarColor(){return this.range?this.viewOptions.getSelectionBarColor(this.value,this.highValue):this.viewOptions.getSelectionBarColor(this.value)}getPointerColor(t){return this.viewOptions.getPointerColor(t===Xm.Max?this.highValue:this.value,t)}getTickColor(t){return this.viewOptions.getTickColor(t)}updateCombinedLabel(){let t=null;if(t=this.viewOptions.rightToLeft?this.minHandleLabelElement.position-this.minHandleLabelElement.dimension-10<=this.maxHandleLabelElement.position:this.minHandleLabelElement.position+this.minHandleLabelElement.dimension+10>=this.maxHandleLabelElement.position,t){const t=this.getDisplayValue(this.viewLowValue,Ym.Low),e=this.getDisplayValue(this.viewHighValue,Ym.High),i=this.viewOptions.rightToLeft?this.viewOptions.combineLabels(e,t):this.viewOptions.combineLabels(t,e);this.combinedLabelElement.setValue(i);const n=this.viewOptions.boundPointerLabels?Math.min(Math.max(this.selectionBarElement.position+this.selectionBarElement.dimension/2-this.combinedLabelElement.dimension/2,0),this.fullBarElement.dimension-this.combinedLabelElement.dimension):this.selectionBarElement.position+this.selectionBarElement.dimension/2-this.combinedLabelElement.dimension/2;this.combinedLabelElement.setPosition(n),this.minHandleLabelElement.hide(),this.maxHandleLabelElement.hide(),this.combinedLabelElement.show()}else this.updateHighHandle(this.valueToPosition(this.viewHighValue)),this.updateLowHandle(this.valueToPosition(this.viewLowValue)),this.maxHandleLabelElement.show(),this.minHandleLabelElement.show(),this.combinedLabelElement.hide();this.viewOptions.autoHideLimitLabels&&this.updateFloorAndCeilLabelsVisibility()}getDisplayValue(t,e){return tg.isNullOrUndefined(this.viewOptions.stepsArray)||this.viewOptions.bindIndexForStepsArray||(t=this.getStepValue(t)),this.viewOptions.translate(t,e)}roundStep(t,e){const i=tg.isNullOrUndefined(e)?this.viewOptions.step:e;let n=ig.roundToPrecisionLimit((t-this.viewOptions.floor)/i,this.viewOptions.precisionLimit);return n=Math.round(n)*i,ig.roundToPrecisionLimit(this.viewOptions.floor+n,this.viewOptions.precisionLimit)}valueToPosition(t){let e=tg.linearValueToPosition;tg.isNullOrUndefined(this.viewOptions.customValueToPosition)?this.viewOptions.logScale&&(e=tg.logValueToPosition):e=this.viewOptions.customValueToPosition;let i=e(t=ig.clampToRange(t,this.viewOptions.floor,this.viewOptions.ceil),this.viewOptions.floor,this.viewOptions.ceil);return tg.isNullOrUndefined(i)&&(i=0),this.viewOptions.rightToLeft&&(i=1-i),i*this.maxHandlePosition}positionToValue(t){let e=t/this.maxHandlePosition;this.viewOptions.rightToLeft&&(e=1-e);let i=tg.linearPositionToValue;tg.isNullOrUndefined(this.viewOptions.customPositionToValue)?this.viewOptions.logScale&&(i=tg.logPositionToValue):i=this.viewOptions.customPositionToValue;const n=i(e,this.viewOptions.floor,this.viewOptions.ceil);return tg.isNullOrUndefined(n)?0:n}getEventXY(t,e){if(t instanceof MouseEvent)return this.viewOptions.vertical?t.clientY:t.clientX;let i=0;const n=t.touches;if(!tg.isNullOrUndefined(e))for(let r=0;r<n.length;r++)if(n[r].identifier===e){i=r;break}return this.viewOptions.vertical?n[i].clientY:n[i].clientX}getEventPosition(t,e){const i=this.elementRef.nativeElement.getBoundingClientRect(),n=this.viewOptions.vertical?i.bottom:i.left;let r=0;return r=this.viewOptions.vertical?-this.getEventXY(t,e)+n:this.getEventXY(t,e)-n,r*this.viewOptions.scale-this.handleHalfDimension}getNearestHandle(t){if(!this.range)return Xm.Min;const e=this.getEventPosition(t),i=Math.abs(e-this.minHandleElement.position),n=Math.abs(e-this.maxHandleElement.position);return i<n?Xm.Min:i>n?Xm.Max:this.viewOptions.rightToLeft?e>this.minHandleElement.position?Xm.Min:Xm.Max:e<this.minHandleElement.position?Xm.Min:Xm.Max}bindEvents(){const t=this.viewOptions.draggableRange;this.viewOptions.onlyBindHandles||this.selectionBarElement.on("mousedown",e=>this.onBarStart(null,t,e,!0,!0,!0)),this.viewOptions.draggableRangeOnly?(this.minHandleElement.on("mousedown",e=>this.onBarStart(Xm.Min,t,e,!0,!0)),this.maxHandleElement.on("mousedown",e=>this.onBarStart(Xm.Max,t,e,!0,!0))):(this.minHandleElement.on("mousedown",t=>this.onStart(Xm.Min,t,!0,!0)),this.range&&this.maxHandleElement.on("mousedown",t=>this.onStart(Xm.Max,t,!0,!0)),this.viewOptions.onlyBindHandles||(this.fullBarElement.on("mousedown",t=>this.onStart(null,t,!0,!0,!0)),this.ticksElement.on("mousedown",t=>this.onStart(null,t,!0,!0,!0,!0)))),this.viewOptions.onlyBindHandles||this.selectionBarElement.onPassive("touchstart",e=>this.onBarStart(null,t,e,!0,!0,!0)),this.viewOptions.draggableRangeOnly?(this.minHandleElement.onPassive("touchstart",e=>this.onBarStart(Xm.Min,t,e,!0,!0)),this.maxHandleElement.onPassive("touchstart",e=>this.onBarStart(Xm.Max,t,e,!0,!0))):(this.minHandleElement.onPassive("touchstart",t=>this.onStart(Xm.Min,t,!0,!0)),this.range&&this.maxHandleElement.onPassive("touchstart",t=>this.onStart(Xm.Max,t,!0,!0)),this.viewOptions.onlyBindHandles||(this.fullBarElement.onPassive("touchstart",t=>this.onStart(null,t,!0,!0,!0)),this.ticksElement.onPassive("touchstart",t=>this.onStart(null,t,!1,!1,!0,!0)))),this.viewOptions.keyboardSupport&&(this.minHandleElement.on("focus",()=>this.onPointerFocus(Xm.Min)),this.range&&this.maxHandleElement.on("focus",()=>this.onPointerFocus(Xm.Max)))}getOptionsInfluencingEventBindings(t){return[t.disabled,t.readOnly,t.draggableRange,t.draggableRangeOnly,t.onlyBindHandles,t.keyboardSupport]}unbindEvents(){this.unsubscribeOnMove(),this.unsubscribeOnEnd();for(const t of this.getAllSliderElements())tg.isNullOrUndefined(t)||t.off()}onBarStart(t,e,i,n,r,s,o){e?this.onDragStart(t,i,n,r):this.onStart(t,i,n,r,s,o)}onStart(t,e,i,n,r,s){e.stopPropagation(),eg.isTouchEvent(e)&&Em.a.hasSupport||e.preventDefault(),this.moving=!1,this.calculateViewDimensions(),tg.isNullOrUndefined(t)&&(t=this.getNearestHandle(e)),this.currentTrackingPointer=t;const o=this.getPointerElement(t);if(o.active=!0,this.viewOptions.keyboardSupport&&o.focus(),i){this.unsubscribeOnMove();const t=t=>this.dragging.active?this.onDragMove(t):this.onMove(t);this.onMoveEventListener=eg.isTouchEvent(e)?this.eventListenerHelper.attachPassiveEventListener(document,"touchmove",t,this.viewOptions.touchEventsInterval):this.eventListenerHelper.attachEventListener(document,"mousemove",t,this.viewOptions.mouseEventsInterval)}if(n){this.unsubscribeOnEnd();const t=t=>this.onEnd(t);this.onEndEventListener=eg.isTouchEvent(e)?this.eventListenerHelper.attachPassiveEventListener(document,"touchend",t):this.eventListenerHelper.attachEventListener(document,"mouseup",t)}this.userChangeStart.emit(this.getChangeContext()),eg.isTouchEvent(e)&&!tg.isNullOrUndefined(e.changedTouches)&&tg.isNullOrUndefined(this.touchId)&&(this.touchId=e.changedTouches[0].identifier),r&&this.onMove(e,!0),s&&this.onEnd(e)}onMove(t,e){let i=null;if(eg.isTouchEvent(t)){const e=t.changedTouches;for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchId){i=e[t];break}if(tg.isNullOrUndefined(i))return}this.viewOptions.animate&&!this.viewOptions.animateOnMove&&this.moving&&(this.sliderElementAnimateClass=!1),this.moving=!0;const n=tg.isNullOrUndefined(i)?this.getEventPosition(t):this.getEventPosition(t,i.identifier);let r;n<=0?r=this.viewOptions.rightToLeft?this.viewOptions.ceil:this.viewOptions.floor:n>=this.maxHandlePosition?r=this.viewOptions.rightToLeft?this.viewOptions.floor:this.viewOptions.ceil:(r=this.positionToValue(n),r=e&&!tg.isNullOrUndefined(this.viewOptions.tickStep)?this.roundStep(r,this.viewOptions.tickStep):this.roundStep(r)),this.positionTrackingHandle(r)}onEnd(t){eg.isTouchEvent(t)&&t.changedTouches[0].identifier!==this.touchId||(this.moving=!1,this.viewOptions.animate&&(this.sliderElementAnimateClass=!0),this.touchId=null,this.viewOptions.keyboardSupport||(this.minHandleElement.active=!1,this.maxHandleElement.active=!1,this.currentTrackingPointer=null),this.dragging.active=!1,this.unsubscribeOnMove(),this.unsubscribeOnEnd(),this.userChangeEnd.emit(this.getChangeContext()))}onPointerFocus(t){const e=this.getPointerElement(t);e.on("blur",()=>this.onPointerBlur(e)),e.on("keydown",t=>this.onKeyboardEvent(t)),e.on("keyup",()=>this.onKeyUp()),e.active=!0,this.currentTrackingPointer=t,this.currentFocusPointer=t,this.firstKeyDown=!0}onKeyUp(){this.firstKeyDown=!0,this.userChangeEnd.emit(this.getChangeContext())}onPointerBlur(t){t.off("blur"),t.off("keydown"),t.off("keyup"),t.active=!1,tg.isNullOrUndefined(this.touchId)&&(this.currentTrackingPointer=null,this.currentFocusPointer=null)}getKeyActions(t){const e=this.viewOptions.ceil-this.viewOptions.floor;let i=t+this.viewOptions.step,n=t-this.viewOptions.step,r=t+e/10,s=t-e/10;this.viewOptions.reversedControls&&(i=t-this.viewOptions.step,n=t+this.viewOptions.step,r=t-e/10,s=t+e/10);const o={UP:i,DOWN:n,LEFT:n,RIGHT:i,PAGEUP:r,PAGEDOWN:s,HOME:this.viewOptions.reversedControls?this.viewOptions.ceil:this.viewOptions.floor,END:this.viewOptions.reversedControls?this.viewOptions.floor:this.viewOptions.ceil};return this.viewOptions.rightToLeft&&(o.LEFT=i,o.RIGHT=n,this.viewOptions.vertical&&(o.UP=n,o.DOWN=i)),o}onKeyboardEvent(t){const e=this.getCurrentTrackingValue(),i=tg.isNullOrUndefined(t.keyCode)?t.which:t.keyCode,n=this.getKeyActions(e)[{38:"UP",40:"DOWN",37:"LEFT",39:"RIGHT",33:"PAGEUP",34:"PAGEDOWN",36:"HOME",35:"END"}[i]];if(tg.isNullOrUndefined(n)||tg.isNullOrUndefined(this.currentTrackingPointer))return;t.preventDefault(),this.firstKeyDown&&(this.firstKeyDown=!1,this.userChangeStart.emit(this.getChangeContext()));const r=ig.clampToRange(n,this.viewOptions.floor,this.viewOptions.ceil),s=this.roundStep(r);if(this.viewOptions.draggableRangeOnly){const t=this.viewHighValue-this.viewLowValue;let e,i;this.currentTrackingPointer===Xm.Min?(e=s,i=s+t,i>this.viewOptions.ceil&&(i=this.viewOptions.ceil,e=i-t)):this.currentTrackingPointer===Xm.Max&&(i=s,e=s-t,e<this.viewOptions.floor&&(e=this.viewOptions.floor,i=e+t)),this.positionTrackingBar(e,i)}else this.positionTrackingHandle(s)}onDragStart(t,e,i,n){const r=this.getEventPosition(e);this.dragging=new cg,this.dragging.active=!0,this.dragging.value=this.positionToValue(r),this.dragging.difference=this.viewHighValue-this.viewLowValue,this.dragging.lowLimit=this.viewOptions.rightToLeft?this.minHandleElement.position-r:r-this.minHandleElement.position,this.dragging.highLimit=this.viewOptions.rightToLeft?r-this.maxHandleElement.position:this.maxHandleElement.position-r,this.onStart(t,e,i,n)}getMinValue(t,e,i){const n=this.viewOptions.rightToLeft;let r=null;return r=e?i?n?this.viewOptions.floor:this.viewOptions.ceil-this.dragging.difference:n?this.viewOptions.ceil-this.dragging.difference:this.viewOptions.floor:this.positionToValue(n?t+this.dragging.lowLimit:t-this.dragging.lowLimit),this.roundStep(r)}getMaxValue(t,e,i){const n=this.viewOptions.rightToLeft;let r=null;return r=e?i?n?this.viewOptions.floor+this.dragging.difference:this.viewOptions.ceil:n?this.viewOptions.ceil:this.viewOptions.floor+this.dragging.difference:n?this.positionToValue(t+this.dragging.lowLimit)+this.dragging.difference:this.positionToValue(t-this.dragging.lowLimit)+this.dragging.difference,this.roundStep(r)}onDragMove(t){const e=this.getEventPosition(t);let i,n,r,s;this.viewOptions.animate&&!this.viewOptions.animateOnMove&&this.moving&&(this.sliderElementAnimateClass=!1),this.moving=!0,this.viewOptions.rightToLeft?(i=this.dragging.lowLimit,n=this.dragging.highLimit,r=this.maxHandleElement,s=this.minHandleElement):(i=this.dragging.highLimit,n=this.dragging.lowLimit,r=this.minHandleElement,s=this.maxHandleElement);const o=e>=this.maxHandlePosition-i;let a,l;if(e<=n){if(0===r.position)return;a=this.getMinValue(e,!0,!1),l=this.getMaxValue(e,!0,!1)}else if(o){if(s.position===this.maxHandlePosition)return;l=this.getMaxValue(e,!0,!0),a=this.getMinValue(e,!0,!0)}else a=this.getMinValue(e,!1,!1),l=this.getMaxValue(e,!1,!1);this.positionTrackingBar(a,l)}positionTrackingBar(t,e){!tg.isNullOrUndefined(this.viewOptions.minLimit)&&t<this.viewOptions.minLimit&&(e=ig.roundToPrecisionLimit((t=this.viewOptions.minLimit)+this.dragging.difference,this.viewOptions.precisionLimit)),!tg.isNullOrUndefined(this.viewOptions.maxLimit)&&e>this.viewOptions.maxLimit&&(t=ig.roundToPrecisionLimit((e=this.viewOptions.maxLimit)-this.dragging.difference,this.viewOptions.precisionLimit)),this.viewLowValue=t,this.viewHighValue=e,this.applyViewChange(),this.updateHandles(Xm.Min,this.valueToPosition(t)),this.updateHandles(Xm.Max,this.valueToPosition(e))}positionTrackingHandle(t){t=this.applyMinMaxLimit(t),this.range&&(this.viewOptions.pushRange?t=this.applyPushRange(t):(this.viewOptions.noSwitching&&(this.currentTrackingPointer===Xm.Min&&t>this.viewHighValue?t=this.applyMinMaxRange(this.viewHighValue):this.currentTrackingPointer===Xm.Max&&t<this.viewLowValue&&(t=this.applyMinMaxRange(this.viewLowValue))),t=this.applyMinMaxRange(t),this.currentTrackingPointer===Xm.Min&&t>this.viewHighValue?(this.viewLowValue=this.viewHighValue,this.applyViewChange(),this.updateHandles(Xm.Min,this.maxHandleElement.position),this.updateAriaAttributes(),this.currentTrackingPointer=Xm.Max,this.minHandleElement.active=!1,this.maxHandleElement.active=!0,this.viewOptions.keyboardSupport&&this.maxHandleElement.focus()):this.currentTrackingPointer===Xm.Max&&t<this.viewLowValue&&(this.viewHighValue=this.viewLowValue,this.applyViewChange(),this.updateHandles(Xm.Max,this.minHandleElement.position),this.updateAriaAttributes(),this.currentTrackingPointer=Xm.Min,this.maxHandleElement.active=!1,this.minHandleElement.active=!0,this.viewOptions.keyboardSupport&&this.minHandleElement.focus()))),this.getCurrentTrackingValue()!==t&&(this.currentTrackingPointer===Xm.Min?(this.viewLowValue=t,this.applyViewChange()):this.currentTrackingPointer===Xm.Max&&(this.viewHighValue=t,this.applyViewChange()),this.updateHandles(this.currentTrackingPointer,this.valueToPosition(t)),this.updateAriaAttributes())}applyMinMaxLimit(t){return!tg.isNullOrUndefined(this.viewOptions.minLimit)&&t<this.viewOptions.minLimit?this.viewOptions.minLimit:!tg.isNullOrUndefined(this.viewOptions.maxLimit)&&t>this.viewOptions.maxLimit?this.viewOptions.maxLimit:t}applyMinMaxRange(t){const e=Math.abs(t-(this.currentTrackingPointer===Xm.Min?this.viewHighValue:this.viewLowValue));if(!tg.isNullOrUndefined(this.viewOptions.minRange)&&e<this.viewOptions.minRange){if(this.currentTrackingPointer===Xm.Min)return ig.roundToPrecisionLimit(this.viewHighValue-this.viewOptions.minRange,this.viewOptions.precisionLimit);if(this.currentTrackingPointer===Xm.Max)return ig.roundToPrecisionLimit(this.viewLowValue+this.viewOptions.minRange,this.viewOptions.precisionLimit)}if(!tg.isNullOrUndefined(this.viewOptions.maxRange)&&e>this.viewOptions.maxRange){if(this.currentTrackingPointer===Xm.Min)return ig.roundToPrecisionLimit(this.viewHighValue-this.viewOptions.maxRange,this.viewOptions.precisionLimit);if(this.currentTrackingPointer===Xm.Max)return ig.roundToPrecisionLimit(this.viewLowValue+this.viewOptions.maxRange,this.viewOptions.precisionLimit)}return t}applyPushRange(t){const e=this.currentTrackingPointer===Xm.Min?this.viewHighValue-t:t-this.viewLowValue,i=tg.isNullOrUndefined(this.viewOptions.minRange)?this.viewOptions.step:this.viewOptions.minRange,n=this.viewOptions.maxRange;return e<i?(this.currentTrackingPointer===Xm.Min?(this.viewHighValue=ig.roundToPrecisionLimit(Math.min(t+i,this.viewOptions.ceil),this.viewOptions.precisionLimit),t=ig.roundToPrecisionLimit(this.viewHighValue-i,this.viewOptions.precisionLimit),this.applyViewChange(),this.updateHandles(Xm.Max,this.valueToPosition(this.viewHighValue))):this.currentTrackingPointer===Xm.Max&&(this.viewLowValue=ig.roundToPrecisionLimit(Math.max(t-i,this.viewOptions.floor),this.viewOptions.precisionLimit),t=ig.roundToPrecisionLimit(this.viewLowValue+i,this.viewOptions.precisionLimit),this.applyViewChange(),this.updateHandles(Xm.Min,this.valueToPosition(this.viewLowValue))),this.updateAriaAttributes()):!tg.isNullOrUndefined(n)&&e>n&&(this.currentTrackingPointer===Xm.Min?(this.viewHighValue=ig.roundToPrecisionLimit(t+n,this.viewOptions.precisionLimit),this.applyViewChange(),this.updateHandles(Xm.Max,this.valueToPosition(this.viewHighValue))):this.currentTrackingPointer===Xm.Max&&(this.viewLowValue=ig.roundToPrecisionLimit(t-n,this.viewOptions.precisionLimit),this.applyViewChange(),this.updateHandles(Xm.Min,this.valueToPosition(this.viewLowValue))),this.updateAriaAttributes()),t}getChangeContext(){const t=new Jm;return t.pointerType=this.currentTrackingPointer,t.value=+this.value,this.range&&(t.highValue=+this.highValue),t}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.H),r.Pb(r.l),r.Pb(r.h),r.Pb(r.B))},t.\u0275cmp=r.Jb({type:t,selectors:[["ngx-slider"]],contentQueries:function(t,e,i){if(1&t&&r.Ib(i,Dm,1),2&t){let t;r.vc(t=r.dc())&&(e.tooltipTemplate=t.first)}},viewQuery:function(t,e){if(1&t&&(r.Pc(Im,1,sg),r.Pc(Pm,1,sg),r.Pc(Om,1,sg),r.Pc(Mm,1,sg),r.Pc(Tm,1,og),r.Pc(Rm,1,og),r.Pc(Vm,1,ag),r.Pc(Fm,1,ag),r.Pc(Lm,1,ag),r.Pc(Um,1,ag),r.Pc(Bm,1,ag),r.Pc(Nm,1,sg)),2&t){let t;r.vc(t=r.dc())&&(e.leftOuterSelectionBarElement=t.first),r.vc(t=r.dc())&&(e.rightOuterSelectionBarElement=t.first),r.vc(t=r.dc())&&(e.fullBarElement=t.first),r.vc(t=r.dc())&&(e.selectionBarElement=t.first),r.vc(t=r.dc())&&(e.minHandleElement=t.first),r.vc(t=r.dc())&&(e.maxHandleElement=t.first),r.vc(t=r.dc())&&(e.floorLabelElement=t.first),r.vc(t=r.dc())&&(e.ceilLabelElement=t.first),r.vc(t=r.dc())&&(e.minHandleLabelElement=t.first),r.vc(t=r.dc())&&(e.maxHandleLabelElement=t.first),r.vc(t=r.dc())&&(e.combinedLabelElement=t.first),r.vc(t=r.dc())&&(e.ticksElement=t.first)}},hostAttrs:[1,"ngx-slider"],hostVars:7,hostBindings:function(t,e){1&t&&r.cc("resize",function(t){return e.onResize(t)},!1,r.zc),2&t&&(r.Eb("disabled",e.sliderElementDisabledAttr),r.Hb("vertical",e.sliderElementVerticalClass)("animate",e.sliderElementAnimateClass)("with-legend",e.sliderElementWithLegendClass))},inputs:{value:"value",highValue:"highValue",options:"options",manualRefresh:"manualRefresh",triggerFocus:"triggerFocus"},outputs:{valueChange:"valueChange",highValueChange:"highValueChange",userChangeStart:"userChangeStart",userChange:"userChange",userChangeEnd:"userChangeEnd"},features:[r.Cb([dg]),r.Bb],decls:29,vars:13,consts:[["ngxSliderElement","",1,"ngx-slider-span","ngx-slider-bar-wrapper","ngx-slider-left-out-selection"],["leftOuterSelectionBar",""],[1,"ngx-slider-span","ngx-slider-bar"],["ngxSliderElement","",1,"ngx-slider-span","ngx-slider-bar-wrapper","ngx-slider-right-out-selection"],["rightOuterSelectionBar",""],["ngxSliderElement","",1,"ngx-slider-span","ngx-slider-bar-wrapper","ngx-slider-full-bar"],["fullBar",""],["ngxSliderElement","",1,"ngx-slider-span","ngx-slider-bar-wrapper","ngx-slider-selection-bar"],["selectionBar",""],[1,"ngx-slider-span","ngx-slider-bar","ngx-slider-selection",3,"ngStyle"],["ngxSliderHandle","",1,"ngx-slider-span","ngx-slider-pointer","ngx-slider-pointer-min",3,"ngStyle"],["minHandle",""],["ngxSliderHandle","",1,"ngx-slider-span","ngx-slider-pointer","ngx-slider-pointer-max",3,"ngStyle"],["maxHandle",""],["ngxSliderLabel","",1,"ngx-slider-span","ngx-slider-bubble","ngx-slider-limit","ngx-slider-floor"],["floorLabel",""],["ngxSliderLabel","",1,"ngx-slider-span","ngx-slider-bubble","ngx-slider-limit","ngx-slider-ceil"],["ceilLabel",""],["ngxSliderLabel","",1,"ngx-slider-span","ngx-slider-bubble","ngx-slider-model-value"],["minHandleLabel",""],["ngxSliderLabel","",1,"ngx-slider-span","ngx-slider-bubble","ngx-slider-model-high"],["maxHandleLabel",""],["ngxSliderLabel","",1,"ngx-slider-span","ngx-slider-bubble","ngx-slider-combined"],["combinedLabel",""],["ngxSliderElement","",1,"ngx-slider-ticks",3,"hidden"],["ticksElement",""],["class","ngx-slider-tick",3,"ngClass","ngStyle",4,"ngFor","ngForOf"],[1,"ngx-slider-tick",3,"ngClass","ngStyle"],[3,"template","tooltip","placement"],["class","ngx-slider-span ngx-slider-tick-value",3,"template","tooltip","placement","content",4,"ngIf"],["class","ngx-slider-span ngx-slider-tick-legend",3,"innerHTML",4,"ngIf"],[1,"ngx-slider-span","ngx-slider-tick-value",3,"template","tooltip","placement","content"],[1,"ngx-slider-span","ngx-slider-tick-legend",3,"innerHTML"]],template:function(t,e){1&t&&(r.Vb(0,"span",0,1),r.Qb(2,"span",2),r.Ub(),r.Vb(3,"span",3,4),r.Qb(5,"span",2),r.Ub(),r.Vb(6,"span",5,6),r.Qb(8,"span",2),r.Ub(),r.Vb(9,"span",7,8),r.Qb(11,"span",9),r.Ub(),r.Qb(12,"span",10,11),r.Qb(14,"span",12,13),r.Qb(16,"span",14,15),r.Qb(18,"span",16,17),r.Qb(20,"span",18,19),r.Qb(22,"span",20,21),r.Qb(24,"span",22,23),r.Vb(26,"span",24,25),r.Ic(28,Km,4,9,"span",26),r.Ub()),2&t&&(r.Db(6),r.Hb("ngx-slider-transparent",e.fullBarTransparentClass),r.Db(3),r.Hb("ngx-slider-draggable",e.selectionBarDraggableClass),r.Db(2),r.nc("ngStyle",e.barStyle),r.Db(1),r.nc("ngStyle",e.minPointerStyle),r.Db(2),r.Fc("display",e.range?"inherit":"none"),r.nc("ngStyle",e.maxPointerStyle),r.Db(12),r.Hb("ngx-slider-ticks-values-under",e.ticksUnderValuesClass),r.nc("hidden",!e.showTicks),r.Db(2),r.nc("ngForOf",e.ticks))},directives:function(){return[sg,bt,og,ag,ct,at,fg,ut]},styles:[".ngx-slider{display:inline-block;position:relative;height:4px;width:100%;margin:35px 0 15px;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;touch-action:pan-y} .ngx-slider.with-legend{margin-bottom:40px} .ngx-slider[disabled]{cursor:not-allowed} .ngx-slider[disabled] .ngx-slider-pointer{cursor:not-allowed;background-color:#d8e0f3} .ngx-slider[disabled] .ngx-slider-draggable{cursor:not-allowed} .ngx-slider[disabled] .ngx-slider-selection{background:#8b91a2} .ngx-slider[disabled] .ngx-slider-tick{cursor:not-allowed} .ngx-slider[disabled] .ngx-slider-tick.ngx-slider-selected{background:#8b91a2} .ngx-slider .ngx-slider-span{white-space:nowrap;position:absolute;display:inline-block} .ngx-slider .ngx-slider-base{width:100%;height:100%;padding:0} .ngx-slider .ngx-slider-bar-wrapper{left:0;box-sizing:border-box;margin-top:-16px;padding-top:16px;width:100%;height:32px;z-index:1} .ngx-slider .ngx-slider-draggable{cursor:move} .ngx-slider .ngx-slider-bar{left:0;width:100%;height:4px;z-index:1;background:#d8e0f3;border-radius:2px} .ngx-slider .ngx-slider-bar-wrapper.ngx-slider-transparent .ngx-slider-bar{background:0 0} .ngx-slider .ngx-slider-bar-wrapper.ngx-slider-left-out-selection .ngx-slider-bar{background:#df002d} .ngx-slider .ngx-slider-bar-wrapper.ngx-slider-right-out-selection .ngx-slider-bar{background:#03a688} .ngx-slider .ngx-slider-selection{z-index:2;background:#0db9f0;border-radius:2px} .ngx-slider .ngx-slider-pointer{cursor:pointer;width:32px;height:32px;top:-14px;background-color:#0db9f0;z-index:3;border-radius:16px} .ngx-slider .ngx-slider-pointer:after{content:'';width:8px;height:8px;position:absolute;top:12px;left:12px;border-radius:4px;background:#fff} .ngx-slider .ngx-slider-pointer:hover:after{background-color:#fff} .ngx-slider .ngx-slider-pointer.ngx-slider-active{z-index:4} .ngx-slider .ngx-slider-pointer.ngx-slider-active:after{background-color:#451aff} .ngx-slider .ngx-slider-bubble{cursor:default;bottom:16px;padding:1px 3px;color:#55637d;font-size:16px} .ngx-slider .ngx-slider-bubble.ngx-slider-limit{color:#55637d} .ngx-slider .ngx-slider-ticks{box-sizing:border-box;width:100%;height:0;position:absolute;left:0;top:-3px;margin:0;z-index:1;list-style:none} .ngx-slider .ngx-slider-ticks-values-under .ngx-slider-tick-value{top:auto;bottom:-36px} .ngx-slider .ngx-slider-tick{text-align:center;cursor:pointer;width:10px;height:10px;background:#d8e0f3;border-radius:50%;position:absolute;top:0;left:0;margin-left:11px} .ngx-slider .ngx-slider-tick.ngx-slider-selected{background:#0db9f0} .ngx-slider .ngx-slider-tick-value{position:absolute;top:-34px;-webkit-transform:translate(-50%,0);transform:translate(-50%,0)} .ngx-slider .ngx-slider-tick-legend{position:absolute;top:24px;-webkit-transform:translate(-50%,0);transform:translate(-50%,0);max-width:50px;white-space:normal} .ngx-slider.vertical{position:relative;width:4px;height:100%;margin:0 20px;padding:0;vertical-align:baseline;touch-action:pan-x} .ngx-slider.vertical .ngx-slider-base{width:100%;height:100%;padding:0} .ngx-slider.vertical .ngx-slider-bar-wrapper{top:auto;left:0;margin:0 0 0 -16px;padding:0 0 0 16px;height:100%;width:32px} .ngx-slider.vertical .ngx-slider-bar{bottom:0;left:auto;width:4px;height:100%} .ngx-slider.vertical .ngx-slider-pointer{left:-14px!important;top:auto;bottom:0} .ngx-slider.vertical .ngx-slider-bubble{left:16px!important;bottom:0} .ngx-slider.vertical .ngx-slider-ticks{height:100%;width:0;left:-3px;top:0;z-index:1} .ngx-slider.vertical .ngx-slider-tick{vertical-align:middle;margin-left:auto;margin-top:11px} .ngx-slider.vertical .ngx-slider-tick-value{left:24px;top:auto;-webkit-transform:translate(0,-28%);transform:translate(0,-28%)} .ngx-slider.vertical .ngx-slider-tick-legend{top:auto;right:24px;-webkit-transform:translate(0,-28%);transform:translate(0,-28%);max-width:none;white-space:nowrap} .ngx-slider.vertical .ngx-slider-ticks-values-under .ngx-slider-tick-value{bottom:auto;left:auto;right:24px} .ngx-slider *{transition:none} .ngx-slider.animate .ngx-slider-bar-wrapper{transition:.3s linear} .ngx-slider.animate .ngx-slider-selection{transition:background-color .3s linear} .ngx-slider.animate .ngx-slider-pointer{transition:.3s linear} .ngx-slider.animate .ngx-slider-bubble{transition:.3s linear} .ngx-slider.animate .ngx-slider-bubble.ngx-slider-limit{transition:opacity .3s linear} .ngx-slider.animate .ngx-slider-bubble.ngx-slider-combined{transition:opacity .3s linear} .ngx-slider.animate .ngx-slider-tick{transition:background-color .3s linear}"]}),t})(),fg=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["ngx-slider-tooltip-wrapper"]],inputs:{template:"template",tooltip:"tooltip",placement:"placement",content:"content"},decls:2,vars:2,consts:[[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"ngx-slider-inner-tooltip"]],template:function(t,e){1&t&&(r.Ic(0,Zm,2,6,"ng-container",0),r.Ic(1,qm,3,3,"ng-container",0)),2&t&&(r.nc("ngIf",e.template),r.Db(1),r.nc("ngIf",!e.template))},directives:[ut,vt],styles:[".ngx-slider-inner-tooltip[_ngcontent-%COMP%]{height:100%}"]}),t})(),mg=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Et]]}),t})();const gg=["trigger"],Ag=["panel"];function bg(t,e){if(1&t&&(r.Vb(0,"span",8),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Lc(t.placeholder)}}function vg(t,e){if(1&t&&(r.Vb(0,"span",12),r.Kc(1),r.Ub()),2&t){const t=r.gc(2);r.Db(1),r.Lc(t.triggerValue)}}function _g(t,e){1&t&&r.lc(0,0,["*ngSwitchCase","true"])}function yg(t,e){if(1&t&&(r.Vb(0,"span",9),r.Ic(1,vg,2,1,"span",10),r.Ic(2,_g,1,0,"ng-content",11),r.Ub()),2&t){const t=r.gc();r.nc("ngSwitch",!!t.customTrigger),r.Db(2),r.nc("ngSwitchCase",!0)}}function wg(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",13),r.Vb(1,"div",14,15),r.cc("@transformPanel.done",function(e){return r.Ac(t),r.gc()._panelDoneAnimatingStream.next(e.toState)})("keydown",function(e){return r.Ac(t),r.gc()._handleKeydown(e)}),r.lc(3,1),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.nc("@transformPanelWrap",void 0),r.Db(1),r.Gb("mat-select-panel ",t._getPanelTheme(),""),r.Fc("transform-origin",t._transformOrigin)("font-size",t._triggerFontSize,"px"),r.nc("ngClass",t.panelClass)("@transformPanel",t.multiple?"showing-multiple":"showing"),r.Eb("id",t.id+"-panel")("aria-multiselectable",t.multiple)("aria-label",t.ariaLabel||null)("aria-labelledby",t._getPanelAriaLabelledby())}}const xg=[[["mat-select-trigger"]],"*"],Cg=["mat-select-trigger","*"],Sg={transformPanelWrap:$r("transformPanelWrap",[Qr("* => void",Jr("@transformPanel",[Xr()],{optional:!0}))]),transformPanel:$r("transformPanel",[qr("void",Zr({transform:"scaleY(0.8)",minWidth:"100%",opacity:0})),qr("showing",Zr({opacity:1,minWidth:"calc(100% + 32px)",transform:"scaleY(1)"})),qr("showing-multiple",Zr({opacity:1,minWidth:"calc(100% + 64px)",transform:"scaleY(1)"})),Qr("void => *",Gr("120ms cubic-bezier(0, 0, 0.2, 1)")),Qr("* => void",Gr("100ms 25ms linear",Zr({opacity:0})))])};let kg=0;const Eg=new r.s("mat-select-scroll-strategy"),Dg=new r.s("MAT_SELECT_CONFIG"),Ig={provide:Eg,deps:[Fr],useFactory:function(t){return()=>t.scrollStrategies.reposition()}};class Pg{constructor(t,e){this.source=t,this.value=e}}class Og{constructor(t,e,i,n,r){this._elementRef=t,this._defaultErrorStateMatcher=e,this._parentForm=i,this._parentFormGroup=n,this.ngControl=r}}const Mg=Da(Ia(ka(Pa(Og)))),Tg=new r.s("MatSelectTrigger");let Rg=(()=>{class t extends Mg{constructor(t,e,i,n,s,o,a,l,c,h,u,d,p,f){var m,g,A;super(s,n,a,l,h),this._viewportRuler=t,this._changeDetectorRef=e,this._ngZone=i,this._dir=o,this._parentFormField=c,this.ngControl=h,this._liveAnnouncer=p,this._defaultOptions=f,this._panelOpen=!1,this._compareWith=(t,e)=>t===e,this._uid="mat-select-"+kg++,this._triggerAriaLabelledBy=null,this._destroy=new _e.a,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+kg++,this._panelDoneAnimatingStream=new _e.a,this._overlayPanelClass=(null===(m=this._defaultOptions)||void 0===m?void 0:m.overlayPanelClass)||"",this._focused=!1,this.controlType="mat-select",this._required=!1,this._multiple=!1,this._disableOptionCentering=null!==(A=null===(g=this._defaultOptions)||void 0===g?void 0:g.disableOptionCentering)&&void 0!==A&&A,this.ariaLabel="",this.optionSelectionChanges=Ol(()=>{const t=this.options;return t?t.changes.pipe(Pn(t),Mn(()=>Object(or.a)(...t.map(t=>t.onSelectionChange)))):this._ngZone.onStable.pipe(Qe(1),Mn(()=>this.optionSelectionChanges))}),this.openedChange=new r.o,this._openedStream=this.openedChange.pipe(He(t=>t),Object(Ge.a)(()=>{})),this._closedStream=this.openedChange.pipe(He(t=>!t),Object(Ge.a)(()=>{})),this.selectionChange=new r.o,this.valueChange=new r.o,this.ngControl&&(this.ngControl.valueAccessor=this),null!=(null==f?void 0:f.typeaheadDebounceInterval)&&(this._typeaheadDebounceInterval=f.typeaheadDebounceInterval),this._scrollStrategyFactory=d,this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=parseInt(u)||0,this.id=this.id}get focused(){return this._focused||this._panelOpen}get placeholder(){return this._placeholder}set placeholder(t){this._placeholder=t,this.stateChanges.next()}get required(){return this._required}set required(t){this._required=ti(t),this.stateChanges.next()}get multiple(){return this._multiple}set multiple(t){this._multiple=ti(t)}get disableOptionCentering(){return this._disableOptionCentering}set disableOptionCentering(t){this._disableOptionCentering=ti(t)}get compareWith(){return this._compareWith}set compareWith(t){this._compareWith=t,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(t){(t!==this._value||this._multiple&&Array.isArray(t))&&(this.options&&this._setSelectionByValue(t),this._value=t)}get typeaheadDebounceInterval(){return this._typeaheadDebounceInterval}set typeaheadDebounceInterval(t){this._typeaheadDebounceInterval=ei(t)}get id(){return this._id}set id(t){this._id=t||this._uid,this.stateChanges.next()}ngOnInit(){this._selectionModel=new Xn(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(mn(),Sn(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(Sn(this._destroy)).subscribe(t=>{t.added.forEach(t=>t.select()),t.removed.forEach(t=>t.deselect())}),this.options.changes.pipe(Pn(null),Sn(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){const t=this._getTriggerAriaLabelledby();if(t!==this._triggerAriaLabelledBy){const e=this._elementRef.nativeElement;this._triggerAriaLabelledBy=t,t?e.setAttribute("aria-labelledby",t):e.removeAttribute("aria-labelledby")}this.ngControl&&this.updateErrorState()}ngOnChanges(t){t.disabled&&this.stateChanges.next(),t.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this._typeaheadDebounceInterval)}ngOnDestroy(){this._destroy.next(),this._destroy.complete(),this.stateChanges.complete()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck())}close(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched())}writeValue(t){this.value=t}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel.selected:this._selectionModel.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){const t=this._selectionModel.selected.map(t=>t.viewValue);return this._isRtl()&&t.reverse(),t.join(", ")}return this._selectionModel.selected[0].viewValue}_isRtl(){return!!this._dir&&"rtl"===this._dir.value}_handleKeydown(t){this.disabled||(this.panelOpen?this._handleOpenKeydown(t):this._handleClosedKeydown(t))}_handleClosedKeydown(t){const e=t.keyCode,i=40===e||38===e||37===e||39===e,n=13===e||32===e,r=this._keyManager;if(!r.isTyping()&&n&&!ke(t)||(this.multiple||t.altKey)&&i)t.preventDefault(),this.open();else if(!this.multiple){const e=this.selected;r.onKeydown(t);const i=this.selected;i&&e!==i&&this._liveAnnouncer.announce(i.viewValue,1e4)}}_handleOpenKeydown(t){const e=this._keyManager,i=t.keyCode,n=40===i||38===i,r=e.isTyping();if(n&&t.altKey)t.preventDefault(),this.close();else if(r||13!==i&&32!==i||!e.activeItem||ke(t))if(!r&&this._multiple&&65===i&&t.ctrlKey){t.preventDefault();const e=this.options.some(t=>!t.disabled&&!t.selected);this.options.forEach(t=>{t.disabled||(e?t.select():t.deselect())})}else{const i=e.activeItemIndex;e.onKeydown(t),this._multiple&&n&&t.shiftKey&&e.activeItem&&e.activeItemIndex!==i&&e.activeItem._selectViaInteraction()}else t.preventDefault(),e.activeItem._selectViaInteraction()}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this.disabled||this.panelOpen||(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_onAttached(){this.overlayDir.positionChange.pipe(Qe(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()})}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this._setSelectionByValue(this.ngControl?this.ngControl.value:this._value),this.stateChanges.next()})}_setSelectionByValue(t){if(this._selectionModel.selected.forEach(t=>t.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&t)Array.isArray(t),t.forEach(t=>this._selectValue(t)),this._sortValues();else{const e=this._selectValue(t);e?this._keyManager.updateActiveItem(e):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectValue(t){const e=this.options.find(e=>{if(this._selectionModel.isSelected(e))return!1;try{return null!=e.value&&this._compareWith(e.value,t)}catch(i){return!1}});return e&&this._selectionModel.select(e),e}_initKeyManager(){this._keyManager=new Ti(this.options).withTypeAhead(this._typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withAllowedModifierKeys(["shiftKey"]),this._keyManager.tabOut.pipe(Sn(this._destroy)).subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.pipe(Sn(this._destroy)).subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):this._panelOpen||this.multiple||!this._keyManager.activeItem||this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){const t=Object(or.a)(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Sn(t)).subscribe(t=>{this._onSelect(t.source,t.isUserInput),t.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Object(or.a)(...this.options.map(t=>t._stateChanges)).pipe(Sn(t)).subscribe(()=>{this._changeDetectorRef.markForCheck(),this.stateChanges.next()})}_onSelect(t,e){const i=this._selectionModel.isSelected(t);null!=t.value||this._multiple?(i!==t.selected&&(t.selected?this._selectionModel.select(t):this._selectionModel.deselect(t)),e&&this._keyManager.setActiveItem(t),this.multiple&&(this._sortValues(),e&&this.focus())):(t.deselect(),this._selectionModel.clear(),null!=this.value&&this._propagateChanges(t.value)),i!==this._selectionModel.isSelected(t)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){const t=this.options.toArray();this._selectionModel.sort((e,i)=>this.sortComparator?this.sortComparator(e,i,t):t.indexOf(e)-t.indexOf(i)),this.stateChanges.next()}}_propagateChanges(t){let e=null;e=this.multiple?this.selected.map(t=>t.value):this.selected?this.selected.value:t,this._value=e,this.valueChange.emit(e),this._onChange(e),this.selectionChange.emit(this._getChangeEvent(e)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){this._keyManager&&(this.empty?this._keyManager.setFirstItemActive():this._keyManager.setActiveItem(this._selectionModel.selected[0]))}_canOpen(){var t;return!this._panelOpen&&!this.disabled&&(null===(t=this.options)||void 0===t?void 0:t.length)>0}focus(t){this._elementRef.nativeElement.focus(t)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;const t=this._getLabelId();return this.ariaLabelledby?t+" "+this.ariaLabelledby:t}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getLabelId(){var t;return(null===(t=this._parentFormField)||void 0===t?void 0:t.getLabelId())||""}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;let t=this._getLabelId()+" "+this._valueId;return this.ariaLabelledby&&(t+=" "+this.ariaLabelledby),t}_panelDoneAnimating(t){this.openedChange.emit(t)}setDescribedByIds(t){this._ariaDescribedby=t.join(" ")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this._panelOpen||!this.empty||this._focused&&!!this._placeholder}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(nr),r.Pb(r.h),r.Pb(r.B),r.Pb($a),r.Pb(r.l),r.Pb(Zn,8),r.Pb(oh,8),r.Pb(_h,8),r.Pb(vu,8),r.Pb(Tc,10),r.ac("tabindex"),r.Pb(Eg),r.Pb(Hi),r.Pb(Dg,8))},t.\u0275dir=r.Kb({type:t,viewQuery:function(t,e){if(1&t&&(r.Pc(gg,1),r.Pc(Ag,1),r.Pc(Nr,1)),2&t){let t;r.vc(t=r.dc())&&(e.trigger=t.first),r.vc(t=r.dc())&&(e.panel=t.first),r.vc(t=r.dc())&&(e.overlayDir=t.first)}},inputs:{ariaLabel:["aria-label","ariaLabel"],id:"id",placeholder:"placeholder",required:"required",multiple:"multiple",disableOptionCentering:"disableOptionCentering",compareWith:"compareWith",value:"value",typeaheadDebounceInterval:"typeaheadDebounceInterval",panelClass:"panelClass",ariaLabelledby:["aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",sortComparator:"sortComparator"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},features:[r.Ab,r.Bb]}),t})(),Vg=(()=>{class t extends Rg{constructor(){super(...arguments),this._scrollTop=0,this._triggerFontSize=0,this._transformOrigin="top",this._offsetY=0,this._positions=[{originX:"start",originY:"top",overlayX:"start",overlayY:"top"},{originX:"start",originY:"bottom",overlayX:"start",overlayY:"bottom"}]}_calculateOverlayScroll(t,e,i){const n=this._getItemHeight();return Math.min(Math.max(0,n*t-e+n/2),i)}ngOnInit(){super.ngOnInit(),this._viewportRuler.change().pipe(Sn(this._destroy)).subscribe(()=>{this.panelOpen&&(this._triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this._changeDetectorRef.markForCheck())})}open(){super._canOpen()&&(super.open(),this._triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this._triggerFontSize=parseInt(getComputedStyle(this.trigger.nativeElement).fontSize||"0"),this._calculateOverlayPosition(),this._ngZone.onStable.pipe(Qe(1)).subscribe(()=>{this._triggerFontSize&&this.overlayDir.overlayRef&&this.overlayDir.overlayRef.overlayElement&&(this.overlayDir.overlayRef.overlayElement.style.fontSize=`${this._triggerFontSize}px`)}))}_scrollOptionIntoView(t){const e=vl(t,this.options,this.optionGroups),i=this._getItemHeight();this.panel.nativeElement.scrollTop=_l((t+e)*i,i,this.panel.nativeElement.scrollTop,256)}_positioningSettled(){this._calculateOverlayOffsetX(),this.panel.nativeElement.scrollTop=this._scrollTop}_panelDoneAnimating(t){this.panelOpen?this._scrollTop=0:(this.overlayDir.offsetX=0,this._changeDetectorRef.markForCheck()),super._panelDoneAnimating(t)}_getChangeEvent(t){return new Pg(this,t)}_calculateOverlayOffsetX(){const t=this.overlayDir.overlayRef.overlayElement.getBoundingClientRect(),e=this._viewportRuler.getViewportSize(),i=this._isRtl(),n=this.multiple?56:32;let r;if(this.multiple)r=40;else if(this.disableOptionCentering)r=16;else{let t=this._selectionModel.selected[0]||this.options.first;r=t&&t.group?32:16}i||(r*=-1);const s=0-(t.left+r-(i?n:0)),o=t.right+r-e.width+(i?0:n);s>0?r+=s+8:o>0&&(r-=o+8),this.overlayDir.offsetX=Math.round(r),this.overlayDir.overlayRef.updatePosition()}_calculateOverlayOffsetY(t,e,i){const n=this._getItemHeight(),r=(n-this._triggerRect.height)/2,s=Math.floor(256/n);let o;return this.disableOptionCentering?0:(o=0===this._scrollTop?t*n:this._scrollTop===i?(t-(this._getItemCount()-s))*n+(n-(this._getItemCount()*n-256)%n):e-n/2,Math.round(-1*o-r))}_checkOverlayWithinViewport(t){const e=this._getItemHeight(),i=this._viewportRuler.getViewportSize(),n=this._triggerRect.top-8,r=i.height-this._triggerRect.bottom-8,s=Math.abs(this._offsetY),o=Math.min(this._getItemCount()*e,256)-s-this._triggerRect.height;o>r?this._adjustPanelUp(o,r):s>n?this._adjustPanelDown(s,n,t):this._transformOrigin=this._getOriginBasedOnOption()}_adjustPanelUp(t,e){const i=Math.round(t-e);this._scrollTop-=i,this._offsetY-=i,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop<=0&&(this._scrollTop=0,this._offsetY=0,this._transformOrigin="50% bottom 0px")}_adjustPanelDown(t,e,i){const n=Math.round(t-e);if(this._scrollTop+=n,this._offsetY+=n,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop>=i)return this._scrollTop=i,this._offsetY=0,void(this._transformOrigin="50% top 0px")}_calculateOverlayPosition(){const t=this._getItemHeight(),e=this._getItemCount(),i=Math.min(e*t,256),n=e*t-i;let r;r=this.empty?0:Math.max(this.options.toArray().indexOf(this._selectionModel.selected[0]),0),r+=vl(r,this.options,this.optionGroups);const s=i/2;this._scrollTop=this._calculateOverlayScroll(r,s,n),this._offsetY=this._calculateOverlayOffsetY(r,s,n),this._checkOverlayWithinViewport(n)}_getOriginBasedOnOption(){const t=this._getItemHeight(),e=(t-this._triggerRect.height)/2;return`50% ${Math.abs(this._offsetY)-e+t/2}px 0px`}_getItemHeight(){return 3*this._triggerFontSize}_getItemCount(){return this.options.length+this.optionGroups.length}}return t.\u0275fac=function(e){return Fg(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-select"]],contentQueries:function(t,e,i){if(1&t&&(r.Ib(i,Tg,1),r.Ib(i,bl,1),r.Ib(i,dl,1)),2&t){let t;r.vc(t=r.dc())&&(e.customTrigger=t.first),r.vc(t=r.dc())&&(e.options=t),r.vc(t=r.dc())&&(e.optionGroups=t)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","true",1,"mat-select"],hostVars:20,hostBindings:function(t,e){1&t&&r.cc("keydown",function(t){return e._handleKeydown(t)})("focus",function(){return e._onFocus()})("blur",function(){return e._onBlur()}),2&t&&(r.Eb("id",e.id)("tabindex",e.tabIndex)("aria-controls",e.panelOpen?e.id+"-panel":null)("aria-expanded",e.panelOpen)("aria-label",e.ariaLabel||null)("aria-required",e.required.toString())("aria-disabled",e.disabled.toString())("aria-invalid",e.errorState)("aria-describedby",e._ariaDescribedby||null)("aria-activedescendant",e._getAriaActiveDescendant()),r.Hb("mat-select-disabled",e.disabled)("mat-select-invalid",e.errorState)("mat-select-required",e.required)("mat-select-empty",e.empty)("mat-select-multiple",e.multiple))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex"},exportAs:["matSelect"],features:[r.Cb([{provide:su,useExisting:t},{provide:al,useExisting:t}]),r.Ab],ngContentSelectors:Cg,decls:9,vars:12,consts:[["cdk-overlay-origin","",1,"mat-select-trigger",3,"click"],["origin","cdkOverlayOrigin","trigger",""],[1,"mat-select-value",3,"ngSwitch"],["class","mat-select-placeholder mat-select-min-line",4,"ngSwitchCase"],["class","mat-select-value-text",3,"ngSwitch",4,"ngSwitchCase"],[1,"mat-select-arrow-wrapper"],[1,"mat-select-arrow"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayMinWidth","cdkConnectedOverlayOffsetY","backdropClick","attach","detach"],[1,"mat-select-placeholder","mat-select-min-line"],[1,"mat-select-value-text",3,"ngSwitch"],["class","mat-select-min-line",4,"ngSwitchDefault"],[4,"ngSwitchCase"],[1,"mat-select-min-line"],[1,"mat-select-panel-wrap"],["role","listbox","tabindex","-1",3,"ngClass","keydown"],["panel",""]],template:function(t,e){if(1&t&&(r.mc(xg),r.Vb(0,"div",0,1),r.cc("click",function(){return e.toggle()}),r.Vb(3,"div",2),r.Ic(4,bg,2,1,"span",3),r.Ic(5,yg,3,2,"span",4),r.Ub(),r.Vb(6,"div",5),r.Qb(7,"div",6),r.Ub(),r.Ub(),r.Ic(8,wg,4,14,"ng-template",7),r.cc("backdropClick",function(){return e.close()})("attach",function(){return e._onAttached()})("detach",function(){return e.close()})),2&t){const t=r.wc(1);r.Eb("aria-owns",e.panelOpen?e.id+"-panel":null),r.Db(3),r.nc("ngSwitch",e.empty),r.Eb("id",e._valueId),r.Db(1),r.nc("ngSwitchCase",!0),r.Db(1),r.nc("ngSwitchCase",!1),r.Db(3),r.nc("cdkConnectedOverlayPanelClass",e._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",e._scrollStrategy)("cdkConnectedOverlayOrigin",t)("cdkConnectedOverlayOpen",e.panelOpen)("cdkConnectedOverlayPositions",e._positions)("cdkConnectedOverlayMinWidth",null==e._triggerRect?null:e._triggerRect.width)("cdkConnectedOverlayOffsetY",e._offsetY)}},directives:[Br,mt,gt,Nr,At,at],styles:['.mat-select{display:inline-block;width:100%;outline:none}.mat-select-trigger{display:inline-table;cursor:pointer;position:relative;box-sizing:border-box}.mat-select-disabled .mat-select-trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-select-value{display:table-cell;max-width:0;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-select-arrow-wrapper{display:table-cell;vertical-align:middle}.mat-form-field-appearance-fill .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-outline .mat-select-arrow-wrapper{transform:translateY(-25%)}.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:none}.mat-select-arrow{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;margin:0 4px}.mat-select-panel-wrap{flex-basis:100%}.mat-select-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;padding-top:0;padding-bottom:0;max-height:256px;min-width:100%;border-radius:4px;outline:0}.cdk-high-contrast-active .mat-select-panel{outline:solid 1px}.mat-select-panel .mat-optgroup-label,.mat-select-panel .mat-option{font-size:inherit;line-height:3em;height:3em}.mat-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-form-field-flex{cursor:pointer}.mat-form-field-type-mat-select .mat-form-field-label{width:calc(100% - 18px)}.mat-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable .mat-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-select-placeholder{color:transparent;-webkit-text-fill-color:transparent;transition:none;display:block}.mat-select-min-line:empty::before{content:" ";white-space:pre;width:1px}\n'],encapsulation:2,data:{animation:[Sg.transformPanelWrap,Sg.transformPanel]},changeDetection:0}),t})();const Fg=r.Xb(Vg);let Lg=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[Ig],imports:[[Et,zr,yl,Sa],rr,yu,yl,Sa]}),t})();class Ug extends Ee.a{notifyNext(t,e,i,n,r){this.destination.next(e)}notifyError(t,e){this.destination.error(t)}notifyComplete(t){this.destination.complete()}}class Bg extends Ee.a{constructor(t,e,i){super(),this.parent=t,this.outerValue=e,this.outerIndex=i,this.index=0}_next(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)}_error(t){this.parent.notifyError(t,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}var Ng=i("SeVD");function jg(t,e,i,n,r=new Bg(t,i,n)){if(!r.closed)return e instanceof Ze.a?e.subscribe(r):Object(Ng.a)(e)(r)}const zg={};function Hg(...t){let e,i;return Object(we.a)(t[t.length-1])&&(i=t.pop()),"function"==typeof t[t.length-1]&&(e=t.pop()),1===t.length&&Object(tn.a)(t[0])&&(t=t[0]),Object(xe.a)(t,i).lift(new Kg(e))}class Kg{constructor(t){this.resultSelector=t}call(t,e){return e.subscribe(new $g(t,this.resultSelector))}}class $g extends Ug{constructor(t,e){super(t),this.resultSelector=e,this.active=0,this.values=[],this.observables=[]}_next(t){this.values.push(zg),this.observables.push(t)}_complete(){const t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(let i=0;i<e;i++)this.add(jg(this,t[i],void 0,i))}}notifyComplete(t){0==(this.active-=1)&&this.destination.complete()}notifyNext(t,e,i){const n=this.values,r=this.toRespond?n[i]===zg?--this.toRespond:this.toRespond:0;n[i]=e,0===r&&(this.resultSelector?this._tryResultSelector(n):this.destination.next(n.slice()))}_tryResultSelector(t){let e;try{e=this.resultSelector.apply(this,t)}catch(i){return void this.destination.error(i)}this.destination.next(e)}}function Gg(t){return e=>e.lift(new Wg(t))}class Wg{constructor(t){this.total=t}call(t,e){return e.subscribe(new Zg(t,this.total))}}class Zg extends Ee.a{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){++this.count>this.total&&this.destination.next(t)}}const qg=new Set;let Yg,Qg=(()=>{class t{constructor(t){this._platform=t,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):Xg}matchMedia(t){return this._platform.WEBKIT&&function(t){if(!qg.has(t))try{Yg||(Yg=document.createElement("style"),Yg.setAttribute("type","text/css"),document.head.appendChild(Yg)),Yg.sheet&&(Yg.sheet.insertRule(`@media ${t} {.fx-query-test{ }}`,0),qg.add(t))}catch(e){console.error(e)}}(t),this._matchMedia(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(ci))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(ci))},token:t,providedIn:"root"}),t})();function Xg(t){return{matches:"all"===t||""===t,media:t,addListener:()=>{},removeListener:()=>{}}}let Jg=(()=>{class t{constructor(t,e){this._mediaMatcher=t,this._zone=e,this._queries=new Map,this._destroySubject=new _e.a}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(t){return tA(ni(t)).some(t=>this._registerQuery(t).mql.matches)}observe(t){let e=Hg(tA(ni(t)).map(t=>this._registerQuery(t).observable));return e=In(e.pipe(Qe(1)),e.pipe(Gg(1),Be(0))),e.pipe(Object(Ge.a)(t=>{const e={matches:!1,breakpoints:{}};return t.forEach(({matches:t,query:i})=>{e.matches=e.matches||t,e.breakpoints[i]=t}),e}))}_registerQuery(t){if(this._queries.has(t))return this._queries.get(t);const e=this._mediaMatcher.matchMedia(t),i={observable:new Ze.a(t=>{const i=e=>this._zone.run(()=>t.next(e));return e.addListener(i),()=>{e.removeListener(i)}}).pipe(Pn(e),Object(Ge.a)(({matches:e})=>({query:t,matches:e})),Sn(this._destroySubject)),mql:e};return this._queries.set(t,i),i}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Qg),r.Zb(r.B))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(Qg),Object(r.Zb)(r.B))},token:t,providedIn:"root"}),t})();function tA(t){return t.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}const eA={tooltipState:$r("state",[qr("initial, void, hidden",Zr({opacity:0,transform:"scale(0)"})),qr("visible",Zr({transform:"scale(1)"})),Qr("* => visible",Gr("200ms cubic-bezier(0, 0, 0.2, 1)",Yr([Zr({opacity:0,transform:"scale(0)",offset:0}),Zr({opacity:.5,transform:"scale(0.99)",offset:.5}),Zr({opacity:1,transform:"scale(1)",offset:1})]))),Qr("* => hidden",Gr("100ms cubic-bezier(0, 0, 0.2, 1)",Zr({opacity:0})))])},iA=Ai({passive:!0}),nA=new r.s("mat-tooltip-scroll-strategy"),rA={provide:nA,deps:[Fr],useFactory:function(t){return()=>t.scrollStrategies.reposition({scrollThrottle:20})}},sA=new r.s("mat-tooltip-default-options",{providedIn:"root",factory:function(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}});let oA=(()=>{class t{constructor(t,e,i,n,r,s,o,a,l,c,h,u){this._overlay=t,this._elementRef=e,this._scrollDispatcher=i,this._viewContainerRef=n,this._ngZone=r,this._platform=s,this._ariaDescriber=o,this._focusMonitor=a,this._dir=c,this._defaultOptions=h,this._position="below",this._disabled=!1,this._viewInitialized=!1,this._pointerExitEventsInitialized=!1,this.showDelay=this._defaultOptions.showDelay,this.hideDelay=this._defaultOptions.hideDelay,this.touchGestures="auto",this._message="",this._passiveListeners=[],this._destroyed=new _e.a,this._handleKeydown=t=>{this._isTooltipVisible()&&27===t.keyCode&&!ke(t)&&(t.preventDefault(),t.stopPropagation(),this._ngZone.run(()=>this.hide(0)))},this._scrollStrategy=l,h&&(h.position&&(this.position=h.position),h.touchGestures&&(this.touchGestures=h.touchGestures)),r.runOutsideAngular(()=>{e.nativeElement.addEventListener("keydown",this._handleKeydown)})}get position(){return this._position}set position(t){t!==this._position&&(this._position=t,this._overlayRef&&(this._updatePosition(),this._tooltipInstance&&this._tooltipInstance.show(0),this._overlayRef.updatePosition()))}get disabled(){return this._disabled}set disabled(t){this._disabled=ti(t),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}get message(){return this._message}set message(t){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message,"tooltip"),this._message=null!=t?String(t).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage(),this._ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip")})}))}get tooltipClass(){return this._tooltipClass}set tooltipClass(t){this._tooltipClass=t,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Sn(this._destroyed)).subscribe(t=>{t?"keyboard"===t&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0))})}ngOnDestroy(){const t=this._elementRef.nativeElement;clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),t.removeEventListener("keydown",this._handleKeydown),this._passiveListeners.forEach(([e,i])=>{t.removeEventListener(e,i,iA)}),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(t,this.message,"tooltip"),this._focusMonitor.stopMonitoring(t)}show(t=this.showDelay){if(this.disabled||!this.message||this._isTooltipVisible()&&!this._tooltipInstance._showTimeoutId&&!this._tooltipInstance._hideTimeoutId)return;const e=this._createOverlay();this._detach(),this._portal=this._portal||new pe(aA,this._viewContainerRef),this._tooltipInstance=e.attach(this._portal).instance,this._tooltipInstance.afterHidden().pipe(Sn(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),this._tooltipInstance.show(t)}hide(t=this.hideDelay){this._tooltipInstance&&this._tooltipInstance.hide(t)}toggle(){this._isTooltipVisible()?this.hide():this.show()}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(){if(this._overlayRef)return this._overlayRef;const t=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),e=this._overlay.position().flexibleConnectedTo(this._elementRef).withTransformOriginOn(".mat-tooltip").withFlexibleDimensions(!1).withViewportMargin(8).withScrollableContainers(t);return e.positionChanges.pipe(Sn(this._destroyed)).subscribe(t=>{this._tooltipInstance&&t.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:e,panelClass:"mat-tooltip-panel",scrollStrategy:this._scrollStrategy()}),this._updatePosition(),this._overlayRef.detachments().pipe(Sn(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(){const t=this._overlayRef.getConfig().positionStrategy,e=this._getOrigin(),i=this._getOverlayPosition();t.withPositions([Object.assign(Object.assign({},e.main),i.main),Object.assign(Object.assign({},e.fallback),i.fallback)])}_getOrigin(){const t=!this._dir||"ltr"==this._dir.value,e=this.position;let i;"above"==e||"below"==e?i={originX:"center",originY:"above"==e?"top":"bottom"}:"before"==e||"left"==e&&t||"right"==e&&!t?i={originX:"start",originY:"center"}:("after"==e||"right"==e&&t||"left"==e&&!t)&&(i={originX:"end",originY:"center"});const{x:n,y:r}=this._invertPosition(i.originX,i.originY);return{main:i,fallback:{originX:n,originY:r}}}_getOverlayPosition(){const t=!this._dir||"ltr"==this._dir.value,e=this.position;let i;"above"==e?i={overlayX:"center",overlayY:"bottom"}:"below"==e?i={overlayX:"center",overlayY:"top"}:"before"==e||"left"==e&&t||"right"==e&&!t?i={overlayX:"end",overlayY:"center"}:("after"==e||"right"==e&&t||"left"==e&&!t)&&(i={overlayX:"start",overlayY:"center"});const{x:n,y:r}=this._invertPosition(i.overlayX,i.overlayY);return{main:i,fallback:{overlayX:n,overlayY:r}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),this._ngZone.onMicrotaskEmpty.pipe(Qe(1),Sn(this._destroyed)).subscribe(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()}))}_setTooltipClass(t){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=t,this._tooltipInstance._markForCheck())}_invertPosition(t,e){return"above"===this.position||"below"===this.position?"top"===e?e="bottom":"bottom"===e&&(e="top"):"end"===t?t="start":"start"===t&&(t="end"),{x:t,y:e}}_setupPointerEnterEventsIfNeeded(){!this._disabled&&this.message&&this._viewInitialized&&!this._passiveListeners.length&&(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",()=>{this._setupPointerExitEventsIfNeeded(),this.show()}]):"off"!==this.touchGestures&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",()=>{this._setupPointerExitEventsIfNeeded(),clearTimeout(this._touchstartTimeout),this._touchstartTimeout=setTimeout(()=>this.show(),500)}])),this._addListeners(this._passiveListeners))}_setupPointerExitEventsIfNeeded(){if(this._pointerExitEventsInitialized)return;this._pointerExitEventsInitialized=!0;const t=[];if(this._platformSupportsMouseEvents())t.push(["mouseleave",()=>this.hide()],["wheel",t=>this._wheelListener(t)]);else if("off"!==this.touchGestures){this._disableNativeGesturesIfNecessary();const e=()=>{clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions.touchendHideDelay)};t.push(["touchend",e],["touchcancel",e])}this._addListeners(t),this._passiveListeners.push(...t)}_addListeners(t){t.forEach(([t,e])=>{this._elementRef.nativeElement.addEventListener(t,e,iA)})}_platformSupportsMouseEvents(){return!this._platform.IOS&&!this._platform.ANDROID}_wheelListener(t){if(this._isTooltipVisible()){const e=(this._document||document).elementFromPoint(t.clientX,t.clientY),i=this._elementRef.nativeElement;e===i||i.contains(e)||this.hide()}}_disableNativeGesturesIfNecessary(){const t=this.touchGestures;if("off"!==t){const e=this._elementRef.nativeElement,i=e.style;("on"===t||"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName)&&(i.userSelect=i.msUserSelect=i.webkitUserSelect=i.MozUserSelect="none"),"on"!==t&&e.draggable||(i.webkitUserDrag="none"),i.touchAction="none",i.webkitTapHighlightColor="transparent"}}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Fr),r.Pb(r.l),r.Pb(er),r.Pb(r.S),r.Pb(r.B),r.Pb(ci),r.Pb(Ii),r.Pb(qi),r.Pb(nA),r.Pb(Zn,8),r.Pb(sA,8),r.Pb(a))},t.\u0275dir=r.Kb({type:t,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-tooltip-trigger"],inputs:{showDelay:["matTooltipShowDelay","showDelay"],hideDelay:["matTooltipHideDelay","hideDelay"],touchGestures:["matTooltipTouchGestures","touchGestures"],position:["matTooltipPosition","position"],disabled:["matTooltipDisabled","disabled"],message:["matTooltip","message"],tooltipClass:["matTooltipClass","tooltipClass"]},exportAs:["matTooltip"]}),t})(),aA=(()=>{class t{constructor(t,e){this._changeDetectorRef=t,this._breakpointObserver=e,this._visibility="initial",this._closeOnInteraction=!1,this._onHide=new _e.a,this._isHandset=this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait), (max-width: 959.98px) and (orientation: landscape)")}show(t){this._hideTimeoutId&&(clearTimeout(this._hideTimeoutId),this._hideTimeoutId=null),this._closeOnInteraction=!0,this._showTimeoutId=setTimeout(()=>{this._visibility="visible",this._showTimeoutId=null,this._markForCheck()},t)}hide(t){this._showTimeoutId&&(clearTimeout(this._showTimeoutId),this._showTimeoutId=null),this._hideTimeoutId=setTimeout(()=>{this._visibility="hidden",this._hideTimeoutId=null,this._markForCheck()},t)}afterHidden(){return this._onHide}isVisible(){return"visible"===this._visibility}ngOnDestroy(){this._onHide.complete()}_animationStart(){this._closeOnInteraction=!1}_animationDone(t){const e=t.toState;"hidden"!==e||this.isVisible()||this._onHide.next(),"visible"!==e&&"hidden"!==e||(this._closeOnInteraction=!0)}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(Jg))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-tooltip-component"]],hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(t,e){1&t&&r.cc("click",function(){return e._handleBodyInteraction()},!1,r.xc)("auxclick",function(){return e._handleBodyInteraction()},!1,r.xc),2&t&&r.Fc("zoom","visible"===e._visibility?1:null)},decls:3,vars:7,consts:[[1,"mat-tooltip",3,"ngClass"]],template:function(t,e){if(1&t&&(r.Vb(0,"div",0),r.cc("@state.start",function(){return e._animationStart()})("@state.done",function(t){return e._animationDone(t)}),r.hc(1,"async"),r.Kc(2),r.Ub()),2&t){let t=null;r.Hb("mat-tooltip-handset",null==(t=r.ic(1,5,e._isHandset))?null:t.matches),r.nc("ngClass",e.tooltipClass)("@state",e._visibility),r.Db(2),r.Lc(e.message)}},directives:[at],pipes:[St],styles:[".mat-tooltip-panel{pointer-events:none !important}.mat-tooltip{color:#fff;border-radius:4px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis}.cdk-high-contrast-active .mat-tooltip{outline:solid 1px}.mat-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}\n"],encapsulation:2,data:{animation:[eA.tooltipState]},changeDetection:0}),t})(),lA=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[rA],imports:[[Ji,Et,zr,Sa],Sa,rr]}),t})();function cA(t,e){if(1&t&&(r.Vb(0,"mat-option",19),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t),r.Db(1),r.Mc(" ",t," ")}}function hA(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-form-field",16),r.Vb(1,"mat-select",17),r.cc("selectionChange",function(e){return r.Ac(t),r.gc(2)._changePageSize(e.value)}),r.Ic(2,cA,2,2,"mat-option",18),r.Ub(),r.Ub()}if(2&t){const t=r.gc(2);r.nc("appearance",t._formFieldAppearance)("color",t.color),r.Db(1),r.nc("value",t.pageSize)("disabled",t.disabled)("aria-label",t._intl.itemsPerPageLabel),r.Db(1),r.nc("ngForOf",t._displayedPageSizeOptions)}}function uA(t,e){if(1&t&&(r.Vb(0,"div",20),r.Kc(1),r.Ub()),2&t){const t=r.gc(2);r.Db(1),r.Lc(t.pageSize)}}function dA(t,e){if(1&t&&(r.Vb(0,"div",12),r.Vb(1,"div",13),r.Kc(2),r.Ub(),r.Ic(3,hA,3,6,"mat-form-field",14),r.Ic(4,uA,2,1,"div",15),r.Ub()),2&t){const t=r.gc();r.Db(2),r.Mc(" ",t._intl.itemsPerPageLabel," "),r.Db(1),r.nc("ngIf",t._displayedPageSizeOptions.length>1),r.Db(1),r.nc("ngIf",t._displayedPageSizeOptions.length<=1)}}function pA(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",21),r.cc("click",function(){return r.Ac(t),r.gc().firstPage()}),r.fc(),r.Vb(1,"svg",7),r.Qb(2,"path",22),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.nc("matTooltip",t._intl.firstPageLabel)("matTooltipDisabled",t._previousButtonsDisabled())("matTooltipPosition","above")("disabled",t._previousButtonsDisabled()),r.Eb("aria-label",t._intl.firstPageLabel)}}function fA(t,e){if(1&t){const t=r.Wb();r.fc(),r.ec(),r.Vb(0,"button",23),r.cc("click",function(){return r.Ac(t),r.gc().lastPage()}),r.fc(),r.Vb(1,"svg",7),r.Qb(2,"path",24),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.nc("matTooltip",t._intl.lastPageLabel)("matTooltipDisabled",t._nextButtonsDisabled())("matTooltipPosition","above")("disabled",t._nextButtonsDisabled()),r.Eb("aria-label",t._intl.lastPageLabel)}}let mA=(()=>{class t{constructor(){this.changes=new _e.a,this.itemsPerPageLabel="Items per page:",this.nextPageLabel="Next page",this.previousPageLabel="Previous page",this.firstPageLabel="First page",this.lastPageLabel="Last page",this.getRangeLabel=(t,e,i)=>{if(0==i||0==e)return`0 of ${i}`;const n=t*e;return`${n+1} \u2013 ${n<(i=Math.max(i,0))?Math.min(n+e,i):n+e} of ${i}`}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(r.Lb)({factory:function(){return new t},token:t,providedIn:"root"}),t})();const gA={provide:mA,deps:[[new r.C,new r.M,mA]],useFactory:function(t){return t||new mA}},AA=new r.s("MAT_PAGINATOR_DEFAULT_OPTIONS");class bA{}const vA=ka(Oa(bA));let _A=(()=>{class t extends vA{constructor(t,e,i){if(super(),this._intl=t,this._changeDetectorRef=e,this._pageIndex=0,this._length=0,this._pageSizeOptions=[],this._hidePageSize=!1,this._showFirstLastButtons=!1,this.page=new r.o,this._intlChanges=t.changes.subscribe(()=>this._changeDetectorRef.markForCheck()),i){const{pageSize:t,pageSizeOptions:e,hidePageSize:n,showFirstLastButtons:r}=i;null!=t&&(this._pageSize=t),null!=e&&(this._pageSizeOptions=e),null!=n&&(this._hidePageSize=n),null!=r&&(this._showFirstLastButtons=r)}}get pageIndex(){return this._pageIndex}set pageIndex(t){this._pageIndex=Math.max(ei(t),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(t){this._length=ei(t),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(t){this._pageSize=Math.max(ei(t),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(t){this._pageSizeOptions=(t||[]).map(t=>ei(t)),this._updateDisplayedPageSizeOptions()}get hidePageSize(){return this._hidePageSize}set hidePageSize(t){this._hidePageSize=ti(t)}get showFirstLastButtons(){return this._showFirstLastButtons}set showFirstLastButtons(t){this._showFirstLastButtons=ti(t)}ngOnInit(){this._initialized=!0,this._updateDisplayedPageSizeOptions(),this._markInitialized()}ngOnDestroy(){this._intlChanges.unsubscribe()}nextPage(){if(!this.hasNextPage())return;const t=this.pageIndex;this.pageIndex++,this._emitPageEvent(t)}previousPage(){if(!this.hasPreviousPage())return;const t=this.pageIndex;this.pageIndex--,this._emitPageEvent(t)}firstPage(){if(!this.hasPreviousPage())return;const t=this.pageIndex;this.pageIndex=0,this._emitPageEvent(t)}lastPage(){if(!this.hasNextPage())return;const t=this.pageIndex;this.pageIndex=this.getNumberOfPages()-1,this._emitPageEvent(t)}hasPreviousPage(){return this.pageIndex>=1&&0!=this.pageSize}hasNextPage(){const t=this.getNumberOfPages()-1;return this.pageIndex<t&&0!=this.pageSize}getNumberOfPages(){return this.pageSize?Math.ceil(this.length/this.pageSize):0}_changePageSize(t){const e=this.pageIndex;this.pageIndex=Math.floor(this.pageIndex*this.pageSize/t)||0,this.pageSize=t,this._emitPageEvent(e)}_nextButtonsDisabled(){return this.disabled||!this.hasNextPage()}_previousButtonsDisabled(){return this.disabled||!this.hasPreviousPage()}_updateDisplayedPageSizeOptions(){this._initialized&&(this.pageSize||(this._pageSize=0!=this.pageSizeOptions.length?this.pageSizeOptions[0]:50),this._displayedPageSizeOptions=this.pageSizeOptions.slice(),-1===this._displayedPageSizeOptions.indexOf(this.pageSize)&&this._displayedPageSizeOptions.push(this.pageSize),this._displayedPageSizeOptions.sort((t,e)=>t-e),this._changeDetectorRef.markForCheck())}_emitPageEvent(t){this.page.emit({previousPageIndex:t,pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(mA),r.Pb(r.h),r.Pb(void 0))},t.\u0275dir=r.Kb({type:t,inputs:{pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",color:"color"},outputs:{page:"page"},features:[r.Ab]}),t})(),yA=(()=>{class t extends _A{constructor(t,e,i){super(t,e,i),i&&null!=i.formFieldAppearance&&(this._formFieldAppearance=i.formFieldAppearance)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(mA),r.Pb(r.h),r.Pb(AA,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-paginator"]],hostAttrs:[1,"mat-paginator"],inputs:{disabled:"disabled"},exportAs:["matPaginator"],features:[r.Ab],decls:14,vars:14,consts:[[1,"mat-paginator-outer-container"],[1,"mat-paginator-container"],["class","mat-paginator-page-size",4,"ngIf"],[1,"mat-paginator-range-actions"],[1,"mat-paginator-range-label"],["mat-icon-button","","type","button","class","mat-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click",4,"ngIf"],["mat-icon-button","","type","button",1,"mat-paginator-navigation-previous",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["viewBox","0 0 24 24","focusable","false",1,"mat-paginator-icon"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],["mat-icon-button","","type","button",1,"mat-paginator-navigation-next",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],["mat-icon-button","","type","button","class","mat-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click",4,"ngIf"],[1,"mat-paginator-page-size"],[1,"mat-paginator-page-size-label"],["class","mat-paginator-page-size-select",3,"appearance","color",4,"ngIf"],["class","mat-paginator-page-size-value",4,"ngIf"],[1,"mat-paginator-page-size-select",3,"appearance","color"],[3,"value","disabled","aria-label","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"mat-paginator-page-size-value"],["mat-icon-button","","type","button",1,"mat-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"],["mat-icon-button","","type","button",1,"mat-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Ic(2,dA,5,3,"div",2),r.Vb(3,"div",3),r.Vb(4,"div",4),r.Kc(5),r.Ub(),r.Ic(6,pA,3,5,"button",5),r.Vb(7,"button",6),r.cc("click",function(){return e.previousPage()}),r.fc(),r.Vb(8,"svg",7),r.Qb(9,"path",8),r.Ub(),r.Ub(),r.ec(),r.Vb(10,"button",9),r.cc("click",function(){return e.nextPage()}),r.fc(),r.Vb(11,"svg",7),r.Qb(12,"path",10),r.Ub(),r.Ub(),r.Ic(13,fA,3,5,"button",11),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(2),r.nc("ngIf",!e.hidePageSize),r.Db(3),r.Mc(" ",e._intl.getRangeLabel(e.pageIndex,e.pageSize,e.length)," "),r.Db(1),r.nc("ngIf",e.showFirstLastButtons),r.Db(1),r.nc("matTooltip",e._intl.previousPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),r.Eb("aria-label",e._intl.previousPageLabel),r.Db(3),r.nc("matTooltip",e._intl.nextPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),r.Eb("aria-label",e._intl.nextPageLabel),r.Db(3),r.nc("ngIf",e.showFirstLastButtons))},directives:[ut,Dl,oA,_u,Vg,ct,bl],styles:[".mat-paginator{display:block}.mat-paginator-outer-container{display:flex}.mat-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap-reverse;width:100%}.mat-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-paginator-page-size{margin-right:0;margin-left:8px}.mat-paginator-page-size-label{margin:0 4px}.mat-paginator-page-size-select{margin:6px 4px 0 4px;width:56px}.mat-paginator-page-size-select.mat-form-field-appearance-outline{width:64px}.mat-paginator-page-size-select.mat-form-field-appearance-fill{width:64px}.mat-paginator-range-label{margin:0 32px 0 24px}.mat-paginator-range-actions{display:flex;align-items:center}.mat-paginator-icon{width:28px;fill:currentColor}[dir=rtl] .mat-paginator-icon{transform:rotate(180deg)}\n"],encapsulation:2,changeDetection:0}),t})(),wA=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[gA],imports:[[Et,Pl,Lg,lA,Sa]]}),t})();function xA(t){return(xA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function CA(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function SA(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function kA(t,e,i){return e&&SA(t.prototype,e),i&&SA(t,i),t}function EA(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&IA(t,e)}function DA(t){return(DA=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function IA(t,e){return(IA=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function PA(t,e){if(null==t)return{};var i,n,r=function(t,e){if(null==t)return{};var i,n,r={},s=Object.keys(t);for(n=0;n<s.length;n++)e.indexOf(i=s[n])>=0||(r[i]=t[i]);return r}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)e.indexOf(i=s[n])>=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(r[i]=t[i])}return r}function OA(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function MA(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var i,n=DA(t);if(e){var r=DA(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return OA(this,i)}}function TA(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=DA(t)););return t}function RA(t,e,i){return(RA="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,i){var n=TA(t,e);if(n){var r=Object.getOwnPropertyDescriptor(n,e);return r.get?r.get.call(i):r.value}})(t,e,i||t)}function VA(t,e,i,n){return(VA="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function(t,e,i,n){var r,s=TA(t,e);if(s){if((r=Object.getOwnPropertyDescriptor(s,e)).set)return r.set.call(n,i),!0;if(!r.writable)return!1}if(r=Object.getOwnPropertyDescriptor(n,e)){if(!r.writable)return!1;r.value=i,Object.defineProperty(n,e,r)}else!function(t,e,i){e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i}(n,e,i);return!0})(t,e,i,n)}function FA(t,e,i,n,r){if(!VA(t,e,i,n||t)&&r)throw new Error("failed to set property");return i}function LA(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var i=[],n=!0,r=!1,s=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done)&&(i.push(o.value),!e||i.length!==e);n=!0);}catch(l){r=!0,s=l}finally{try{n||null==a.return||a.return()}finally{if(r)throw s}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return UA(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?UA(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function UA(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function BA(t){return"string"==typeof t||t instanceof String}function NA(t){switch(t){case"LEFT":return"FORCE_LEFT";case"RIGHT":return"FORCE_RIGHT";default:return t}}function jA(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function zA(t,e){if(e===t)return!0;var i,n=Array.isArray(e),r=Array.isArray(t);if(n&&r){if(e.length!=t.length)return!1;for(i=0;i<e.length;i++)if(!zA(e[i],t[i]))return!1;return!0}if(n!=r)return!1;if(e&&t&&"object"===xA(e)&&"object"===xA(t)){var s=e instanceof Date,o=t instanceof Date;if(s&&o)return e.getTime()==t.getTime();if(s!=o)return!1;var a=e instanceof RegExp,l=t instanceof RegExp;if(a&&l)return e.toString()==t.toString();if(a!=l)return!1;var c=Object.keys(e);for(i=0;i<c.length;i++)if(!Object.prototype.hasOwnProperty.call(t,c[i]))return!1;for(i=0;i<c.length;i++)if(!zA(t[c[i]],e[c[i]]))return!1;return!0}return!(!e||!t||"function"!=typeof e||"function"!=typeof t)&&e.toString()===t.toString()}var HA=function(){function t(e,i,n,r){for(CA(this,t),this.value=e,this.cursorPos=i,this.oldValue=n,this.oldSelection=r;this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start}return kA(t,[{key:"startChangePos",get:function(){return Math.min(this.cursorPos,this.oldSelection.start)}},{key:"insertedCount",get:function(){return this.cursorPos-this.startChangePos}},{key:"inserted",get:function(){return this.value.substr(this.startChangePos,this.insertedCount)}},{key:"removedCount",get:function(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}},{key:"removed",get:function(){return this.oldValue.substr(this.startChangePos,this.removedCount)}},{key:"head",get:function(){return this.value.substring(0,this.startChangePos)}},{key:"tail",get:function(){return this.value.substring(this.startChangePos+this.insertedCount)}},{key:"removeDirection",get:function(){return!this.removedCount||this.insertedCount?"NONE":this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos?"RIGHT":"LEFT"}}]),t}(),KA=function(){function t(e){CA(this,t),Object.assign(this,{inserted:"",rawInserted:"",skip:!1,tailShift:0},e)}return kA(t,[{key:"aggregate",value:function(t){return this.rawInserted+=t.rawInserted,this.skip=this.skip||t.skip,this.inserted+=t.inserted,this.tailShift+=t.tailShift,this}},{key:"offset",get:function(){return this.tailShift+this.inserted.length}}]),t}(),$A=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;CA(this,t),this.value=e,this.from=i,this.stop=n}return kA(t,[{key:"toString",value:function(){return this.value}},{key:"extend",value:function(t){this.value+=String(t)}},{key:"appendTo",value:function(t){return t.append(this.toString(),{tail:!0}).aggregate(t._appendPlaceholder())}},{key:"state",get:function(){return{value:this.value,from:this.from,stop:this.stop}},set:function(t){Object.assign(this,t)}},{key:"shiftBefore",value:function(t){if(this.from>=t||!this.value.length)return"";var e=this.value[0];return this.value=this.value.slice(1),e}}]),t}(),GA=function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new t.InputMask(e,i)},WA=function(){function t(e){CA(this,t),this._value="",this._update(Object.assign({},t.DEFAULTS,e)),this.isInitialized=!0}return kA(t,[{key:"updateOptions",value:function(t){Object.keys(t).length&&this.withValueRefresh(this._update.bind(this,t))}},{key:"_update",value:function(t){Object.assign(this,t)}},{key:"state",get:function(){return{_value:this.value}},set:function(t){this._value=t._value}},{key:"reset",value:function(){this._value=""}},{key:"value",get:function(){return this._value},set:function(t){this.resolve(t)}},{key:"resolve",value:function(t){return this.reset(),this.append(t,{input:!0},""),this.doCommit(),this.value}},{key:"unmaskedValue",get:function(){return this.value},set:function(t){this.reset(),this.append(t,{},""),this.doCommit()}},{key:"typedValue",get:function(){return this.doParse(this.value)},set:function(t){this.value=this.doFormat(t)}},{key:"rawInputValue",get:function(){return this.extractInput(0,this.value.length,{raw:!0})},set:function(t){this.reset(),this.append(t,{raw:!0},""),this.doCommit()}},{key:"isComplete",get:function(){return!0}},{key:"nearestInputPos",value:function(t,e){return t}},{key:"extractInput",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return this.value.slice(t,e)}},{key:"extractTail",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return new $A(this.extractInput(t,e),t)}},{key:"appendTail",value:function(t){return BA(t)&&(t=new $A(String(t))),t.appendTo(this)}},{key:"_appendCharRaw",value:function(t){return t?(this._value+=t,new KA({inserted:t,rawInserted:t})):new KA}},{key:"_appendChar",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,n=this.state,r=this._appendCharRaw(this.doPrepare(t,e),e);if(r.inserted){var s,o=!1!==this.doValidate(e);if(o&&null!=i){var a=this.state;this.overwrite&&(s=i.state,i.shiftBefore(this.value.length));var l=this.appendTail(i);(o=l.rawInserted===i.toString())&&l.inserted&&(this.state=a)}o||(r=new KA,this.state=n,i&&s&&(i.state=s))}return r}},{key:"_appendPlaceholder",value:function(){return new KA}},{key:"append",value:function(t,e,i){if(!BA(t))throw new Error("value should be string");var n=new KA,r=BA(i)?new $A(String(i)):i;e&&e.tail&&(e._beforeTailState=this.state);for(var s=0;s<t.length;++s)n.aggregate(this._appendChar(t[s],e,r));return null!=r&&(n.tailShift+=this.appendTail(r).tailShift),n}},{key:"remove",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return this._value=this.value.slice(0,t)+this.value.slice(e),new KA}},{key:"withValueRefresh",value:function(t){if(this._refreshing||!this.isInitialized)return t();this._refreshing=!0;var e=this.rawInputValue,i=this.value,n=t();return this.rawInputValue=e,this.value&&this.value!==i&&0===i.indexOf(this.value)&&this.append(i.slice(this.value.length),{},""),delete this._refreshing,n}},{key:"runIsolated",value:function(t){if(this._isolated||!this.isInitialized)return t(this);this._isolated=!0;var e=this.state,i=t(this);return this.state=e,delete this._isolated,i}},{key:"doPrepare",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.prepare?this.prepare(t,this,e):t}},{key:"doValidate",value:function(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}},{key:"doCommit",value:function(){this.commit&&this.commit(this.value,this)}},{key:"doFormat",value:function(t){return this.format?this.format(t,this):t}},{key:"doParse",value:function(t){return this.parse?this.parse(t,this):t}},{key:"splice",value:function(t,e,i,n){var r=this.extractTail(t+e),s=this.nearestInputPos(t,n);return new KA({tailShift:s-t}).aggregate(this.remove(s)).aggregate(this.append(i,{input:!0},r))}}]),t}();WA.DEFAULTS={format:function(t){return t},parse:function(t){return t}},GA.Masked=WA;var ZA=WA;function qA(t){if(null==t)throw new Error("mask property should be defined");return t instanceof RegExp?GA.MaskedRegExp:BA(t)?GA.MaskedPattern:t instanceof Date||t===Date?GA.MaskedDate:t instanceof Number||"number"==typeof t||t===Number?GA.MaskedNumber:Array.isArray(t)||t===Array?GA.MaskedDynamic:GA.Masked&&t.prototype instanceof GA.Masked?t:t instanceof Function?GA.MaskedFunction:t instanceof GA.Masked?t.constructor:(console.warn("Mask not found for mask",t),GA.Masked)}function YA(t){if(GA.Masked&&t instanceof GA.Masked)return t;var e=(t=Object.assign({},t)).mask;if(GA.Masked&&e instanceof GA.Masked)return e;var i=qA(e);if(!i)throw new Error("Masked class is not found for provided mask, appropriate module needs to be import manually before creating mask.");return new i(t)}GA.createMask=YA;var QA=YA,XA={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./},JA=function(){function t(e){CA(this,t);var i=e.mask,n=PA(e,["mask"]);this.masked=QA({mask:i}),Object.assign(this,n)}return kA(t,[{key:"reset",value:function(){this._isFilled=!1,this.masked.reset()}},{key:"remove",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return 0===t&&e>=1?(this._isFilled=!1,this.masked.remove(t,e)):new KA}},{key:"value",get:function(){return this.masked.value||(this._isFilled&&!this.isOptional?this.placeholderChar:"")}},{key:"unmaskedValue",get:function(){return this.masked.unmaskedValue}},{key:"isComplete",get:function(){return Boolean(this.masked.value)||this.isOptional}},{key:"_appendChar",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._isFilled)return new KA;var i=this.masked.state,n=this.masked._appendChar(t,e);return n.inserted&&!1===this.doValidate(e)&&(n.inserted=n.rawInserted="",this.masked.state=i),n.inserted||this.isOptional||this.lazy||e.input||(n.inserted=this.placeholderChar),n.skip=!n.inserted&&!this.isOptional,this._isFilled=Boolean(n.inserted),n}},{key:"append",value:function(){var t;return(t=this.masked).append.apply(t,arguments)}},{key:"_appendPlaceholder",value:function(){var t=new KA;return this._isFilled||this.isOptional||(this._isFilled=!0,t.inserted=this.placeholderChar),t}},{key:"extractTail",value:function(){var t;return(t=this.masked).extractTail.apply(t,arguments)}},{key:"appendTail",value:function(){var t;return(t=this.masked).appendTail.apply(t,arguments)}},{key:"extractInput",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,i=arguments.length>2?arguments[2]:void 0;return this.masked.extractInput(t,e,i)}},{key:"nearestInputPos",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"NONE",i=0,n=this.value.length,r=Math.min(Math.max(t,i),n);switch(e){case"LEFT":case"FORCE_LEFT":return this.isComplete?r:i;case"RIGHT":case"FORCE_RIGHT":return this.isComplete?r:n;case"NONE":default:return r}}},{key:"doValidate",value:function(){var t,e;return(t=this.masked).doValidate.apply(t,arguments)&&(!this.parent||(e=this.parent).doValidate.apply(e,arguments))}},{key:"doCommit",value:function(){this.masked.doCommit()}},{key:"state",get:function(){return{masked:this.masked.state,_isFilled:this._isFilled}},set:function(t){this.masked.state=t.masked,this._isFilled=t._isFilled}}]),t}(),tb=function(){function t(e){CA(this,t),Object.assign(this,e),this._value=""}return kA(t,[{key:"value",get:function(){return this._value}},{key:"unmaskedValue",get:function(){return this.isUnmasking?this.value:""}},{key:"reset",value:function(){this._isRawInput=!1,this._value=""}},{key:"remove",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._value.length;return this._value=this._value.slice(0,t)+this._value.slice(e),this._value||(this._isRawInput=!1),new KA}},{key:"nearestInputPos",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"NONE",i=0,n=this._value.length;switch(e){case"LEFT":case"FORCE_LEFT":return i;case"NONE":case"RIGHT":case"FORCE_RIGHT":default:return n}}},{key:"extractInput",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._value.length,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return i.raw&&this._isRawInput&&this._value.slice(t,e)||""}},{key:"isComplete",get:function(){return!0}},{key:"_appendChar",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=new KA;if(this._value)return i;var n=this.char===t[0],r=n&&(this.isUnmasking||e.input||e.raw)&&!e.tail;return r&&(i.rawInserted=this.char),this._value=i.inserted=this.char,this._isRawInput=r&&(e.raw||e.input),i}},{key:"_appendPlaceholder",value:function(){var t=new KA;return this._value||(this._value=t.inserted=this.char),t}},{key:"extractTail",value:function(){return new $A("")}},{key:"appendTail",value:function(t){return BA(t)&&(t=new $A(String(t))),t.appendTo(this)}},{key:"append",value:function(t,e,i){var n=this._appendChar(t,e);return null!=i&&(n.tailShift+=this.appendTail(i).tailShift),n}},{key:"doCommit",value:function(){}},{key:"state",get:function(){return{_value:this._value,_isRawInput:this._isRawInput}},set:function(t){Object.assign(this,t)}}]),t}(),eb=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;CA(this,t),this.chunks=e,this.from=i}return kA(t,[{key:"toString",value:function(){return this.chunks.map(String).join("")}},{key:"extend",value:function(e){if(String(e)){BA(e)&&(e=new $A(String(e)));var i=this.chunks[this.chunks.length-1],n=i&&(i.stop===e.stop||null==e.stop)&&e.from===i.from+i.toString().length;if(e instanceof $A)n?i.extend(e.toString()):this.chunks.push(e);else if(e instanceof t){if(null==e.stop)for(var r;e.chunks.length&&null==e.chunks[0].stop;)(r=e.chunks.shift()).from+=e.from,this.extend(r);e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}}},{key:"appendTo",value:function(e){if(!(e instanceof GA.MaskedPattern))return new $A(this.toString()).appendTo(e);for(var i=new KA,n=0;n<this.chunks.length&&!i.skip;++n){var r=this.chunks[n],s=e._mapPosToBlock(e.value.length),o=r.stop,a=void 0;if(null!=o&&(!s||s.index<=o)&&((r instanceof t||e._stops.indexOf(o)>=0)&&i.aggregate(e._appendPlaceholder(o)),a=r instanceof t&&e._blocks[o]),a){var l=a.appendTail(r);l.skip=!1,i.aggregate(l),e._value+=l.inserted;var c=r.toString().slice(l.rawInserted.length);c&&i.aggregate(e.append(c,{tail:!0}))}else i.aggregate(e.append(r.toString(),{tail:!0}))}return i}},{key:"state",get:function(){return{chunks:this.chunks.map(function(t){return t.state}),from:this.from,stop:this.stop,blockIndex:this.blockIndex}},set:function(e){var i=e.chunks,n=PA(e,["chunks"]);Object.assign(this,n),this.chunks=i.map(function(e){var i="chunks"in e?new t:new $A;return i.state=e,i})}},{key:"shiftBefore",value:function(t){if(this.from>=t||!this.chunks.length)return"";for(var e=t-this.from,i=0;i<this.chunks.length;){var n=this.chunks[i],r=n.shiftBefore(e);if(n.toString()){if(!r)break;++i}else this.chunks.splice(i,1);if(r)return r}return""}}]),t}();GA.MaskedRegExp=function(t){EA(i,t);var e=MA(i);function i(){return CA(this,i),e.apply(this,arguments)}return kA(i,[{key:"_update",value:function(t){t.mask&&(t.validate=function(e){return e.search(t.mask)>=0}),RA(DA(i.prototype),"_update",this).call(this,t)}}]),i}(ZA);var ib=function(t){EA(i,t);var e=MA(i);function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return CA(this,i),t.definitions=Object.assign({},XA,t.definitions),e.call(this,Object.assign({},i.DEFAULTS,t))}return kA(i,[{key:"_update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.definitions=Object.assign({},this.definitions,t.definitions),RA(DA(i.prototype),"_update",this).call(this,t),this._rebuildMask()}},{key:"_rebuildMask",value:function(){var t=this,e=this.definitions;this._blocks=[],this._stops=[],this._maskedBlocks={};var n=this.mask;if(n&&e)for(var r=!1,s=!1,o=0;o<n.length;++o)if(!this.blocks||"continue"!==function(){var e=n.slice(o),i=Object.keys(t.blocks).filter(function(t){return 0===e.indexOf(t)});i.sort(function(t,e){return e.length-t.length});var r=i[0];if(r){var s=QA(Object.assign({parent:t,lazy:t.lazy,placeholderChar:t.placeholderChar,overwrite:t.overwrite},t.blocks[r]));return s&&(t._blocks.push(s),t._maskedBlocks[r]||(t._maskedBlocks[r]=[]),t._maskedBlocks[r].push(t._blocks.length-1)),o+=r.length-1,"continue"}}()){var a=n[o],l=a in e;if(a!==i.STOP_CHAR)if("{"!==a&&"}"!==a)if("["!==a&&"]"!==a){if(a===i.ESCAPE_CHAR){if(++o,!(a=n[o]))break;l=!1}var c=l?new JA({parent:this,lazy:this.lazy,placeholderChar:this.placeholderChar,mask:e[a],isOptional:s}):new tb({char:a,isUnmasking:r});this._blocks.push(c)}else s=!s;else r=!r;else this._stops.push(this._blocks.length)}}},{key:"state",get:function(){return Object.assign({},RA(DA(i.prototype),"state",this),{_blocks:this._blocks.map(function(t){return t.state})})},set:function(t){var e=t._blocks,n=PA(t,["_blocks"]);this._blocks.forEach(function(t,i){return t.state=e[i]}),FA(DA(i.prototype),"state",n,this,!0)}},{key:"reset",value:function(){RA(DA(i.prototype),"reset",this).call(this),this._blocks.forEach(function(t){return t.reset()})}},{key:"isComplete",get:function(){return this._blocks.every(function(t){return t.isComplete})}},{key:"doCommit",value:function(){this._blocks.forEach(function(t){return t.doCommit()}),RA(DA(i.prototype),"doCommit",this).call(this)}},{key:"unmaskedValue",get:function(){return this._blocks.reduce(function(t,e){return t+e.unmaskedValue},"")},set:function(t){FA(DA(i.prototype),"unmaskedValue",t,this,!0)}},{key:"value",get:function(){return this._blocks.reduce(function(t,e){return t+e.value},"")},set:function(t){FA(DA(i.prototype),"value",t,this,!0)}},{key:"appendTail",value:function(t){return RA(DA(i.prototype),"appendTail",this).call(this,t).aggregate(this._appendPlaceholder())}},{key:"_appendCharRaw",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this._mapPosToBlock(this.value.length),n=new KA;if(!i)return n;for(var r=i.index;;++r){var s=this._blocks[r];if(!s)break;var o=s._appendChar(t,e),a=o.skip;if(n.aggregate(o),a||o.rawInserted)break}return n}},{key:"extractTail",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,n=new eb;return e===i||this._forEachBlocksInRange(e,i,function(e,i,r,s){var o=e.extractTail(r,s);o.stop=t._findStopBefore(i),o.from=t._blockStartPos(i),o instanceof eb&&(o.blockIndex=i),n.extend(o)}),n}},{key:"extractInput",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t===e)return"";var n="";return this._forEachBlocksInRange(t,e,function(t,e,r,s){n+=t.extractInput(r,s,i)}),n}},{key:"_findStopBefore",value:function(t){for(var e,i=0;i<this._stops.length;++i){var n=this._stops[i];if(!(n<=t))break;e=n}return e}},{key:"_appendPlaceholder",value:function(t){var e=this,i=new KA;if(this.lazy&&null==t)return i;var n=this._mapPosToBlock(this.value.length);return n?(this._blocks.slice(n.index,null!=t?t:this._blocks.length).forEach(function(n){if(!n.lazy||null!=t){var r=n._appendPlaceholder.apply(n,null!=n._blocks?[n._blocks.length]:[]);e._value+=r.inserted,i.aggregate(r)}}),i):i}},{key:"_mapPosToBlock",value:function(t){for(var e="",i=0;i<this._blocks.length;++i){var n=e.length;if(t<=(e+=this._blocks[i].value).length)return{index:i,offset:t-n}}}},{key:"_blockStartPos",value:function(t){return this._blocks.slice(0,t).reduce(function(t,e){return t+e.value.length},0)}},{key:"_forEachBlocksInRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,i=arguments.length>2?arguments[2]:void 0,n=this._mapPosToBlock(t);if(n){var r=this._mapPosToBlock(e),s=r&&n.index===r.index,o=n.offset,a=r&&s?r.offset:this._blocks[n.index].value.length;if(i(this._blocks[n.index],n.index,o,a),r&&!s){for(var l=n.index+1;l<r.index;++l)i(this._blocks[l],l,0,this._blocks[l].value.length);i(this._blocks[r.index],r.index,0,r.offset)}}}},{key:"remove",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,n=RA(DA(i.prototype),"remove",this).call(this,t,e);return this._forEachBlocksInRange(t,e,function(t,e,i,r){n.aggregate(t.remove(i,r))}),n}},{key:"nearestInputPos",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"NONE",i=this._mapPosToBlock(t)||{index:0,offset:0},n=i.offset,r=i.index,s=this._blocks[r];if(!s)return t;var o=n;0!==o&&o<s.value.length&&(o=s.nearestInputPos(n,NA(e)));var a=o===s.value.length,l=0===o;if(!l&&!a)return this._blockStartPos(r)+o;var c=a?r+1:r;if("NONE"===e){if(c>0){var h=c-1,u=this._blocks[h],d=u.nearestInputPos(0,"NONE");if(!u.value.length||d!==u.value.length)return this._blockStartPos(c)}for(var p=c,f=p;f<this._blocks.length;++f){var m=this._blocks[f],g=m.nearestInputPos(0,"NONE");if(!m.value.length||g!==m.value.length)return this._blockStartPos(f)+g}for(var A=c-1;A>=0;--A){var b=this._blocks[A],v=b.nearestInputPos(0,"NONE");if(!b.value.length||v!==b.value.length)return this._blockStartPos(A)+b.value.length}return t}if("LEFT"===e||"FORCE_LEFT"===e){for(var _,y=c;y<this._blocks.length;++y)if(this._blocks[y].value){_=y;break}if(null!=_){var w=this._blocks[_],x=w.nearestInputPos(0,"RIGHT");if(0===x&&w.unmaskedValue.length)return this._blockStartPos(_)+x}for(var C,S=-1,k=c-1;k>=0;--k){var E=this._blocks[k],D=E.nearestInputPos(E.value.length,"FORCE_LEFT");if(E.value&&0===D||(C=k),0!==D){if(D!==E.value.length)return this._blockStartPos(k)+D;S=k;break}}if("LEFT"===e)for(var I=S+1;I<=Math.min(c,this._blocks.length-1);++I){var P=this._blocks[I],O=P.nearestInputPos(0,"NONE"),M=this._blockStartPos(I)+O;if(M>t)break;if(O!==P.value.length)return M}if(S>=0)return this._blockStartPos(S)+this._blocks[S].value.length;if("FORCE_LEFT"===e||this.lazy&&!this.extractInput()&&!nb(this._blocks[c]))return 0;if(null!=C)return this._blockStartPos(C);for(var T=c;T<this._blocks.length;++T){var R=this._blocks[T],V=R.nearestInputPos(0,"NONE");if(!R.value.length||V!==R.value.length)return this._blockStartPos(T)+V}return 0}if("RIGHT"===e||"FORCE_RIGHT"===e){for(var F,L,U=c;U<this._blocks.length;++U){var B=this._blocks[U],N=B.nearestInputPos(0,"NONE");if(N!==B.value.length){L=this._blockStartPos(U)+N,F=U;break}}if(null!=F&&null!=L){for(var j=F;j<this._blocks.length;++j){var z=this._blocks[j],H=z.nearestInputPos(0,"FORCE_RIGHT");if(H!==z.value.length)return this._blockStartPos(j)+H}return"FORCE_RIGHT"===e?this.value.length:L}for(var K=Math.min(c,this._blocks.length-1);K>=0;--K){var $=this._blocks[K],G=$.nearestInputPos($.value.length,"LEFT");if(0!==G){var W=this._blockStartPos(K)+G;if(W>=t)return W;break}}}return t}},{key:"maskedBlock",value:function(t){return this.maskedBlocks(t)[0]}},{key:"maskedBlocks",value:function(t){var e=this,i=this._maskedBlocks[t];return i?i.map(function(t){return e._blocks[t]}):[]}}]),i}(ZA);function nb(t){if(!t)return!1;var e=t.value;return!e||t.nearestInputPos(0,"NONE")!==e.length}ib.DEFAULTS={lazy:!0,placeholderChar:"_"},ib.STOP_CHAR="`",ib.ESCAPE_CHAR="\\",ib.InputDefinition=JA,ib.FixedDefinition=tb,GA.MaskedPattern=ib;var rb=ib,sb=function(t){EA(i,t);var e=MA(i);function i(){return CA(this,i),e.apply(this,arguments)}return kA(i,[{key:"_matchFrom",get:function(){return this.maxLength-String(this.from).length}},{key:"_update",value:function(t){t=Object.assign({to:this.to||0,from:this.from||0},t);var e=String(t.to).length;null!=t.maxLength&&(e=Math.max(e,t.maxLength)),t.maxLength=e;for(var n=String(t.from).padStart(e,"0"),r=String(t.to).padStart(e,"0"),s=0;s<r.length&&r[s]===n[s];)++s;t.mask=r.slice(0,s).replace(/0/g,"\\0")+"0".repeat(e-s),RA(DA(i.prototype),"_update",this).call(this,t)}},{key:"isComplete",get:function(){return RA(DA(i.prototype),"isComplete",this)&&Boolean(this.value)}},{key:"boundaries",value:function(t){var e="",i="",n=LA(t.match(/^(\D*)(\d*)(\D*)/)||[],3),r=n[1],s=n[2];return s&&(e="0".repeat(r.length)+s,i="9".repeat(r.length)+s),[e=e.padEnd(this.maxLength,"0"),i=i.padEnd(this.maxLength,"9")]}},{key:"doPrepare",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t=RA(DA(i.prototype),"doPrepare",this).call(this,t,e).replace(/\D/g,""),!this.autofix)return t;for(var n=String(this.from).padStart(this.maxLength,"0"),r=String(this.to).padStart(this.maxLength,"0"),s=this.value,o="",a=0;a<t.length;++a){var l=s+o+t[a],c=this.boundaries(l),h=LA(c,2),u=h[0],d=h[1];Number(d)<this.from?o+=n[l.length-1]:Number(u)>this.to?o+=r[l.length-1]:o+=t[a]}return o}},{key:"doValidate",value:function(){var t,e=this.value,n=e.search(/[^0]/);if(-1===n&&e.length<=this._matchFrom)return!0;for(var r=this.boundaries(e),s=LA(r,2),o=s[0],a=s[1],l=arguments.length,c=new Array(l),h=0;h<l;h++)c[h]=arguments[h];return this.from<=Number(a)&&Number(o)<=this.to&&(t=RA(DA(i.prototype),"doValidate",this)).call.apply(t,[this].concat(c))}}]),i}(rb);GA.MaskedRange=sb;var ob=sb,ab=function(t){EA(i,t);var e=MA(i);function i(t){return CA(this,i),e.call(this,Object.assign({},i.DEFAULTS,t))}return kA(i,[{key:"_update",value:function(t){t.mask===Date&&delete t.mask,t.pattern&&(t.mask=t.pattern);var e=t.blocks;t.blocks=Object.assign({},i.GET_DEFAULT_BLOCKS()),t.min&&(t.blocks.Y.from=t.min.getFullYear()),t.max&&(t.blocks.Y.to=t.max.getFullYear()),t.min&&t.max&&t.blocks.Y.from===t.blocks.Y.to&&(t.blocks.m.from=t.min.getMonth()+1,t.blocks.m.to=t.max.getMonth()+1,t.blocks.m.from===t.blocks.m.to&&(t.blocks.d.from=t.min.getDate(),t.blocks.d.to=t.max.getDate())),Object.assign(t.blocks,e),Object.keys(t.blocks).forEach(function(e){var i=t.blocks[e];"autofix"in i||(i.autofix=t.autofix)}),RA(DA(i.prototype),"_update",this).call(this,t)}},{key:"doValidate",value:function(){for(var t,e=this.date,n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return(t=RA(DA(i.prototype),"doValidate",this)).call.apply(t,[this].concat(r))&&(!this.isComplete||this.isDateExist(this.value)&&null!=e&&(null==this.min||this.min<=e)&&(null==this.max||e<=this.max))}},{key:"isDateExist",value:function(t){return this.format(this.parse(t,this),this).indexOf(t)>=0}},{key:"date",get:function(){return this.typedValue},set:function(t){this.typedValue=t}},{key:"typedValue",get:function(){return this.isComplete?RA(DA(i.prototype),"typedValue",this):null},set:function(t){FA(DA(i.prototype),"typedValue",t,this,!0)}}]),i}(rb);ab.DEFAULTS={pattern:"d{.}`m{.}`Y",format:function(t){return[String(t.getDate()).padStart(2,"0"),String(t.getMonth()+1).padStart(2,"0"),t.getFullYear()].join(".")},parse:function(t){var e=LA(t.split("."),3);return new Date(e[2],e[1]-1,e[0])}},ab.GET_DEFAULT_BLOCKS=function(){return{d:{mask:ob,from:1,to:31,maxLength:2},m:{mask:ob,from:1,to:12,maxLength:2},Y:{mask:ob,from:1900,to:9999}}},GA.MaskedDate=ab;var lb=ab,cb=function(){function t(){CA(this,t)}return kA(t,[{key:"selectionStart",get:function(){var t;try{t=this._unsafeSelectionStart}catch(e){}return null!=t?t:this.value.length}},{key:"selectionEnd",get:function(){var t;try{t=this._unsafeSelectionEnd}catch(e){}return null!=t?t:this.value.length}},{key:"select",value:function(t,e){if(null!=t&&null!=e&&(t!==this.selectionStart||e!==this.selectionEnd))try{this._unsafeSelect(t,e)}catch(i){}}},{key:"_unsafeSelect",value:function(t,e){}},{key:"isActive",get:function(){return!1}},{key:"bindEvents",value:function(t){}},{key:"unbindEvents",value:function(){}}]),t}();GA.MaskElement=cb;var hb=cb,ub=function(t){EA(i,t);var e=MA(i);function i(t){var n;return CA(this,i),(n=e.call(this)).input=t,n._handlers={},n}return kA(i,[{key:"rootElement",get:function(){return this.input.getRootNode?this.input.getRootNode():document}},{key:"isActive",get:function(){return this.input===this.rootElement.activeElement}},{key:"_unsafeSelectionStart",get:function(){return this.input.selectionStart}},{key:"_unsafeSelectionEnd",get:function(){return this.input.selectionEnd}},{key:"_unsafeSelect",value:function(t,e){this.input.setSelectionRange(t,e)}},{key:"value",get:function(){return this.input.value},set:function(t){this.input.value=t}},{key:"bindEvents",value:function(t){var e=this;Object.keys(t).forEach(function(n){return e._toggleEventHandler(i.EVENTS_MAP[n],t[n])})}},{key:"unbindEvents",value:function(){var t=this;Object.keys(this._handlers).forEach(function(e){return t._toggleEventHandler(e)})}},{key:"_toggleEventHandler",value:function(t,e){this._handlers[t]&&(this.input.removeEventListener(t,this._handlers[t]),delete this._handlers[t]),e&&(this.input.addEventListener(t,e),this._handlers[t]=e)}}]),i}(hb);ub.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"blur"},GA.HTMLMaskElement=ub;var db=ub,pb=function(t){EA(i,t);var e=MA(i);function i(){return CA(this,i),e.apply(this,arguments)}return kA(i,[{key:"_unsafeSelectionStart",get:function(){var t=this.rootElement,e=t.getSelection&&t.getSelection();return e&&e.anchorOffset}},{key:"_unsafeSelectionEnd",get:function(){var t=this.rootElement,e=t.getSelection&&t.getSelection();return e&&this._unsafeSelectionStart+String(e).length}},{key:"_unsafeSelect",value:function(t,e){if(this.rootElement.createRange){var i=this.rootElement.createRange();i.setStart(this.input.firstChild||this.input,t),i.setEnd(this.input.lastChild||this.input,e);var n=this.rootElement,r=n.getSelection&&n.getSelection();r&&(r.removeAllRanges(),r.addRange(i))}}},{key:"value",get:function(){return this.input.textContent},set:function(t){this.input.textContent=t}}]),i}(db);GA.HTMLContenteditableMaskElement=pb;var fb=pb;GA.InputMask=function(){function t(e,i){CA(this,t),this.el=e instanceof hb?e:e.isContentEditable&&"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName?new fb(e):new db(e),this.masked=QA(i),this._listeners={},this._value="",this._unmaskedValue="",this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}return kA(t,[{key:"mask",get:function(){return this.masked.mask},set:function(t){if(!this.maskEquals(t))if(t instanceof GA.Masked||this.masked.constructor!==qA(t)){var e=QA({mask:t});e.unmaskedValue=this.masked.unmaskedValue,this.masked=e}else this.masked.updateOptions({mask:t})}},{key:"maskEquals",value:function(t){return null==t||t===this.masked.mask||t===Date&&this.masked instanceof lb}},{key:"value",get:function(){return this._value},set:function(t){this.masked.value=t,this.updateControl(),this.alignCursor()}},{key:"unmaskedValue",get:function(){return this._unmaskedValue},set:function(t){this.masked.unmaskedValue=t,this.updateControl(),this.alignCursor()}},{key:"typedValue",get:function(){return this.masked.typedValue},set:function(t){this.masked.typedValue=t,this.updateControl(),this.alignCursor()}},{key:"_bindEvents",value:function(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange})}},{key:"_unbindEvents",value:function(){this.el&&this.el.unbindEvents()}},{key:"_fireEvent",value:function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];var r=this._listeners[t];r&&r.forEach(function(t){return t.apply(void 0,i)})}},{key:"selectionStart",get:function(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}},{key:"cursorPos",get:function(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd},set:function(t){this.el&&this.el.isActive&&(this.el.select(t,t),this._saveSelection())}},{key:"_saveSelection",value:function(){this.value!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}},{key:"updateValue",value:function(){this.masked.value=this.el.value,this._value=this.masked.value}},{key:"updateControl",value:function(){var t=this.masked.unmaskedValue,e=this.masked.value,i=this.unmaskedValue!==t||this.value!==e;this._unmaskedValue=t,this._value=e,this.el.value!==e&&(this.el.value=e),i&&this._fireChangeEvents()}},{key:"updateOptions",value:function(t){var e=t.mask,i=PA(t,["mask"]),n=!this.maskEquals(e),r=!zA(this.masked,i);n&&(this.mask=e),r&&this.masked.updateOptions(i),(n||r)&&this.updateControl()}},{key:"updateCursor",value:function(t){null!=t&&(this.cursorPos=t,this._delayUpdateCursor(t))}},{key:"_delayUpdateCursor",value:function(t){var e=this;this._abortUpdateCursor(),this._changingCursorPos=t,this._cursorChanging=setTimeout(function(){e.el&&(e.cursorPos=e._changingCursorPos,e._abortUpdateCursor())},10)}},{key:"_fireChangeEvents",value:function(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}},{key:"_abortUpdateCursor",value:function(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}},{key:"alignCursor",value:function(){this.cursorPos=this.masked.nearestInputPos(this.cursorPos,"LEFT")}},{key:"alignCursorFriendly",value:function(){this.selectionStart===this.cursorPos&&this.alignCursor()}},{key:"on",value:function(t,e){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(e),this}},{key:"off",value:function(t,e){if(!this._listeners[t])return this;if(!e)return delete this._listeners[t],this;var i=this._listeners[t].indexOf(e);return i>=0&&this._listeners[t].splice(i,1),this}},{key:"_onInput",value:function(t){if(this._inputEvent=t,this._abortUpdateCursor(),!this._selection)return this.updateValue();var e=new HA(this.el.value,this.cursorPos,this.value,this._selection),i=this.masked.rawInputValue,n=this.masked.splice(e.startChangePos,e.removed.length,e.inserted,e.removeDirection).offset,r=this.masked.nearestInputPos(e.startChangePos+n,i===this.masked.rawInputValue?e.removeDirection:"NONE");this.updateControl(),this.updateCursor(r),delete this._inputEvent}},{key:"_onChange",value:function(){this.value!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}},{key:"_onDrop",value:function(t){t.preventDefault(),t.stopPropagation()}},{key:"_onFocus",value:function(t){this.alignCursorFriendly()}},{key:"_onClick",value:function(t){this.alignCursorFriendly()}},{key:"destroy",value:function(){this._unbindEvents(),this._listeners.length=0,delete this.el}}]),t}();var mb=function(t){EA(i,t);var e=MA(i);function i(){return CA(this,i),e.apply(this,arguments)}return kA(i,[{key:"_update",value:function(t){t.enum&&(t.mask="*".repeat(t.enum[0].length)),RA(DA(i.prototype),"_update",this).call(this,t)}},{key:"doValidate",value:function(){for(var t,e=this,n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return this.enum.some(function(t){return t.indexOf(e.unmaskedValue)>=0})&&(t=RA(DA(i.prototype),"doValidate",this)).call.apply(t,[this].concat(r))}}]),i}(rb);GA.MaskedEnum=mb;var gb=mb,Ab=function(t){EA(i,t);var e=MA(i);function i(t){return CA(this,i),e.call(this,Object.assign({},i.DEFAULTS,t))}return kA(i,[{key:"_update",value:function(t){RA(DA(i.prototype),"_update",this).call(this,t),this._updateRegExps()}},{key:"_updateRegExps",value:function(){var t="^"+(this.allowNegative?"[+|\\-]?":""),e=(this.scale?"("+jA(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExpInput=new RegExp(t+"(0|([1-9]+\\d*))?"+e),this._numberRegExp=new RegExp(t+"\\d*"+e),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(jA).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(jA(this.thousandsSeparator),"g")}},{key:"_removeThousandsSeparators",value:function(t){return t.replace(this._thousandsSeparatorRegExp,"")}},{key:"_insertThousandsSeparators",value:function(t){var e=t.split(this.radix);return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),e.join(this.radix)}},{key:"doPrepare",value:function(t){for(var e,n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return(e=RA(DA(i.prototype),"doPrepare",this)).call.apply(e,[this,this._removeThousandsSeparators(t.replace(this._mapToRadixRegExp,this.radix))].concat(r))}},{key:"_separatorsCount",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=0,n=0;n<t;++n)this._value.indexOf(this.thousandsSeparator,n)===n&&(++i,e&&(t+=this.thousandsSeparator.length));return i}},{key:"_separatorsCountFromSlice",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._value;return this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}},{key:"extractInput",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,n=arguments.length>2?arguments[2]:void 0,r=this._adjustRangeWithSeparators(t,e),s=LA(r,2);return t=s[0],e=s[1],this._removeThousandsSeparators(RA(DA(i.prototype),"extractInput",this).call(this,t,e,n))}},{key:"_appendCharRaw",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.thousandsSeparator)return RA(DA(i.prototype),"_appendCharRaw",this).call(this,t,e);var n=e.tail&&e._beforeTailState?e._beforeTailState._value:this._value,r=this._separatorsCountFromSlice(n);this._value=this._removeThousandsSeparators(this.value);var s=RA(DA(i.prototype),"_appendCharRaw",this).call(this,t,e);this._value=this._insertThousandsSeparators(this._value);var o=e.tail&&e._beforeTailState?e._beforeTailState._value:this._value,a=this._separatorsCountFromSlice(o);return s.tailShift+=(a-r)*this.thousandsSeparator.length,s.skip=!s.rawInserted&&t===this.thousandsSeparator,s}},{key:"_findSeparatorAround",value:function(t){if(this.thousandsSeparator){var e=this.value.indexOf(this.thousandsSeparator,t-this.thousandsSeparator.length+1);if(e<=t)return e}return-1}},{key:"_adjustRangeWithSeparators",value:function(t,e){var i=this._findSeparatorAround(t);i>=0&&(t=i);var n=this._findSeparatorAround(e);return n>=0&&(e=n+this.thousandsSeparator.length),[t,e]}},{key:"remove",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,i=this._adjustRangeWithSeparators(t,e),n=LA(i,2);e=n[1];var r=this.value.slice(0,t=n[0]),s=this.value.slice(e),o=this._separatorsCount(r.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(r+s));var a=this._separatorsCountFromSlice(r);return new KA({tailShift:(a-o)*this.thousandsSeparator.length})}},{key:"nearestInputPos",value:function(t,e){if(!this.thousandsSeparator)return t;switch(e){case"NONE":case"LEFT":case"FORCE_LEFT":var i=this._findSeparatorAround(t-1);if(i>=0){var n=i+this.thousandsSeparator.length;if(t<n||this.value.length<=n||"FORCE_LEFT"===e)return i}break;case"RIGHT":case"FORCE_RIGHT":var r=this._findSeparatorAround(t);if(r>=0)return r+this.thousandsSeparator.length}return t}},{key:"doValidate",value:function(t){var e=(t.input?this._numberRegExpInput:this._numberRegExp).test(this._removeThousandsSeparators(this.value));return e&&(e=e&&!isNaN(this.number)&&(null==this.min||this.min>=0||this.min<=this.number)&&(null==this.max||this.max<=0||this.number<=this.max)),e&&RA(DA(i.prototype),"doValidate",this).call(this,t)}},{key:"doCommit",value:function(){if(this.value){var t=this.number,e=t;null!=this.min&&(e=Math.max(e,this.min)),null!=this.max&&(e=Math.min(e,this.max)),e!==t&&(this.unmaskedValue=String(e));var n=this.value;this.normalizeZeros&&(n=this._normalizeZeros(n)),this.padFractionalZeros&&(n=this._padFractionalZeros(n)),this._value=n}RA(DA(i.prototype),"doCommit",this).call(this)}},{key:"_normalizeZeros",value:function(t){var e=this._removeThousandsSeparators(t).split(this.radix);return e[0]=e[0].replace(/^(\D*)(0*)(\d*)/,function(t,e,i,n){return e+n}),t.length&&!/\d$/.test(e[0])&&(e[0]=e[0]+"0"),e.length>1&&(e[1]=e[1].replace(/0*$/,""),e[1].length||(e.length=1)),this._insertThousandsSeparators(e.join(this.radix))}},{key:"_padFractionalZeros",value:function(t){if(!t)return t;var e=t.split(this.radix);return e.length<2&&e.push(""),e[1]=e[1].padEnd(this.scale,"0"),e.join(this.radix)}},{key:"unmaskedValue",get:function(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,".")},set:function(t){FA(DA(i.prototype),"unmaskedValue",t.replace(".",this.radix),this,!0)}},{key:"typedValue",get:function(){return Number(this.unmaskedValue)},set:function(t){FA(DA(i.prototype),"unmaskedValue",String(t),this,!0)}},{key:"number",get:function(){return this.typedValue},set:function(t){this.typedValue=t}},{key:"allowNegative",get:function(){return this.signed||null!=this.min&&this.min<0||null!=this.max&&this.max<0}}]),i}(ZA);Ab.DEFAULTS={radix:",",thousandsSeparator:"",mapToRadix:["."],scale:2,signed:!1,normalizeZeros:!0,padFractionalZeros:!1},GA.MaskedNumber=Ab,GA.MaskedFunction=function(t){EA(i,t);var e=MA(i);function i(){return CA(this,i),e.apply(this,arguments)}return kA(i,[{key:"_update",value:function(t){t.mask&&(t.validate=t.mask),RA(DA(i.prototype),"_update",this).call(this,t)}}]),i}(ZA);var bb=function(t){EA(i,t);var e=MA(i);function i(t){var n;return CA(this,i),(n=e.call(this,Object.assign({},i.DEFAULTS,t))).currentMask=null,n}return kA(i,[{key:"_update",value:function(t){RA(DA(i.prototype),"_update",this).call(this,t),"mask"in t&&(this.compiledMasks=Array.isArray(t.mask)?t.mask.map(function(t){return QA(t)}):[])}},{key:"_appendCharRaw",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this._applyDispatch(t,e);return this.currentMask&&i.aggregate(this.currentMask._appendChar(t,e)),i}},{key:"_applyDispatch",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.tail&&null!=e._beforeTailState?e._beforeTailState._value:this.value,n=this.rawInputValue,r=e.tail&&null!=e._beforeTailState?e._beforeTailState._rawInputValue:n,s=n.slice(r.length),o=this.currentMask,a=new KA,l=o&&o.state;if(this.currentMask=this.doDispatch(t,Object.assign({},e)),this.currentMask)if(this.currentMask!==o){if(this.currentMask.reset(),r){var c=this.currentMask.append(r,{raw:!0});a.tailShift=c.inserted.length-i.length}s&&(a.tailShift+=this.currentMask.append(s,{raw:!0,tail:!0}).tailShift)}else this.currentMask.state=l;return a}},{key:"_appendPlaceholder",value:function(){var t=this._applyDispatch.apply(this,arguments);return this.currentMask&&t.aggregate(this.currentMask._appendPlaceholder()),t}},{key:"doDispatch",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.dispatch(t,this,e)}},{key:"doValidate",value:function(){for(var t,e,n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return(t=RA(DA(i.prototype),"doValidate",this)).call.apply(t,[this].concat(r))&&(!this.currentMask||(e=this.currentMask).doValidate.apply(e,r))}},{key:"reset",value:function(){this.currentMask&&this.currentMask.reset(),this.compiledMasks.forEach(function(t){return t.reset()})}},{key:"value",get:function(){return this.currentMask?this.currentMask.value:""},set:function(t){FA(DA(i.prototype),"value",t,this,!0)}},{key:"unmaskedValue",get:function(){return this.currentMask?this.currentMask.unmaskedValue:""},set:function(t){FA(DA(i.prototype),"unmaskedValue",t,this,!0)}},{key:"typedValue",get:function(){return this.currentMask?this.currentMask.typedValue:""},set:function(t){var e=String(t);this.currentMask&&(this.currentMask.typedValue=t,e=this.currentMask.unmaskedValue),this.unmaskedValue=e}},{key:"isComplete",get:function(){return!!this.currentMask&&this.currentMask.isComplete}},{key:"remove",value:function(){var t,e=new KA;return this.currentMask&&e.aggregate((t=this.currentMask).remove.apply(t,arguments)).aggregate(this._applyDispatch()),e}},{key:"state",get:function(){return Object.assign({},RA(DA(i.prototype),"state",this),{_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(function(t){return t.state}),currentMaskRef:this.currentMask,currentMask:this.currentMask&&this.currentMask.state})},set:function(t){var e=t.compiledMasks,n=t.currentMaskRef,r=t.currentMask,s=PA(t,["compiledMasks","currentMaskRef","currentMask"]);this.compiledMasks.forEach(function(t,i){return t.state=e[i]}),null!=n&&(this.currentMask=n,this.currentMask.state=r),FA(DA(i.prototype),"state",s,this,!0)}},{key:"extractInput",value:function(){var t;return this.currentMask?(t=this.currentMask).extractInput.apply(t,arguments):""}},{key:"extractTail",value:function(){for(var t,e,n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return this.currentMask?(t=this.currentMask).extractTail.apply(t,r):(e=RA(DA(i.prototype),"extractTail",this)).call.apply(e,[this].concat(r))}},{key:"doCommit",value:function(){this.currentMask&&this.currentMask.doCommit(),RA(DA(i.prototype),"doCommit",this).call(this)}},{key:"nearestInputPos",value:function(){for(var t,e,n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return this.currentMask?(t=this.currentMask).nearestInputPos.apply(t,r):(e=RA(DA(i.prototype),"nearestInputPos",this)).call.apply(e,[this].concat(r))}},{key:"overwrite",get:function(){return this.currentMask?this.currentMask.overwrite:RA(DA(i.prototype),"overwrite",this)},set:function(t){console.warn('"overwrite" option is not available in dynamic mask, use this option in siblings')}}]),i}(ZA);bb.DEFAULTS={dispatch:function(t,e,i){if(e.compiledMasks.length){var n=e.rawInputValue,r=e.compiledMasks.map(function(e,r){return e.reset(),e.append(n,{raw:!0}),e.append(t,i),{weight:e.rawInputValue.length,index:r}});return r.sort(function(t,e){return e.weight-t.weight}),e.compiledMasks[r[0].index]}}},GA.MaskedDynamic=bb;var vb={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function _b(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:vb.MASKED,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:vb.MASKED,n=QA(t);return function(t){return n.runIsolated(function(n){return n[e]=t,n[i]})}}GA.PIPE_TYPE=vb,GA.createPipe=_b,GA.pipe=function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];return _b.apply(void 0,i)(t)};try{globalThis.IMask=GA}catch($nt){}let yb=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t.ngInjectableDef=Object(r.Lb)({factory:function(){return new t},token:t,providedIn:"root"}),t})();const wb={provide:rc,useExisting:Object(r.W)(()=>Cb),multi:!0},xb=t=>t.nativeElement;let Cb=(()=>{class t{constructor(t,e,i,n){this._elementRef=t,this._renderer=e,this._factory=i,this._compositionMode=n,this.onTouched=()=>{},this.onChange=()=>{},this.imaskElement=xb,this.accept=new r.o,this.complete=new r.o,this._viewInitialized=!1,this._composing=!1,this._writing=!1,null==this._compositionMode&&(this._compositionMode=!this._isAndroid())}get element(){return this.imaskElement(this._elementRef,this)}get maskValue(){return this.maskRef?"typed"===this.unmask?this.maskRef.typedValue:this.unmask?this.maskRef.unmaskedValue:this.maskRef.value:this.element.value}set maskValue(t){this.maskRef?"typed"===this.unmask?this.maskRef.typedValue=t:this.unmask?this.maskRef.unmaskedValue=t:this.maskRef.value=t:this._renderer.setProperty(this.element,"value",t)}ngAfterViewInit(){this.imask&&this.initMask(),this._viewInitialized=!0}ngOnChanges(t){t.elementRef&&!this.imaskElement&&(this.imaskElement=xb),t.imask&&this._viewInitialized&&(this.imask?this.maskRef?this.maskRef.updateOptions(this.imask):(this.initMask(),this.onChange(this.maskValue)):this.destroyMask())}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}ngOnDestroy(){this.destroyMask(),this.accept.complete(),this.complete.complete()}beginWrite(t){this._writing=!0,this._writingValue=t}endWrite(){return this._writing=!1,this._writingValue}writeValue(t){t=null==t?"":t,this.maskRef?(this.beginWrite(t),(this.maskValue!==t||"string"!=typeof t&&""===this.maskRef.value&&!this.maskRef.el.isActive)&&(this.maskValue=t)):this._renderer.setProperty(this.element,"value",t)}_onAccept(){const t=this.maskValue;this._writing&&t===this.endWrite()||(this.onChange(t),this.accept.emit(t))}_onComplete(){this.complete.emit(this.maskValue)}initMask(){this.maskRef=this._factory.create(this.element,this.imask).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this))}setDisabledState(t){this._renderer.setProperty(this.element,"disabled",t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}_handleInput(t){this.maskRef||(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this._handleInput(t)}_isAndroid(){return/android (\d+)/.test(navigator.userAgent.toLowerCase())}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.H),r.Pb(yb),r.Pb(oc,8))},t.\u0275dir=r.Kb({type:t,selectors:[["","imask",""]],hostBindings:function(t,e){1&t&&r.cc("input",function(t){return e._handleInput(t.target.value)})("blur",function(){return e.onTouched()})("compositionstart",function(){return e._compositionStart()})("compositionend",function(t){return e._compositionEnd(t.target.value)})},inputs:{imaskElement:"imaskElement",imask:"imask",unmask:"unmask"},outputs:{accept:"accept",complete:"complete"},features:[r.Cb([wb]),r.Bb]}),t})(),Sb=(()=>{class t{create(t,e){return GA(t,e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t.ngInjectableDef=Object(r.Lb)({factory:function(){return new t},token:t,providedIn:"root"}),t})(),kb=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[{provide:yb,useClass:Sb}],imports:[[Et]]}),t})(),Eb=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Et,kb],kb]}),t})();const Db=["dialogPopup"],Ib=["hueSlider"],Pb=["alphaSlider"];function Ob(t,e){if(1&t&&r.Qb(0,"div"),2&t){const t=r.gc();r.Gb("arrow arrow-",t.cpUsePosition,""),r.Fc("top",t.arrowTop,"px")}}function Mb(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",26),r.cc("newValue",function(e){return r.Ac(t),r.gc().onColorChange(e)})("dragStart",function(){return r.Ac(t),r.gc().onDragStart("saturation-lightness")})("dragEnd",function(){return r.Ac(t),r.gc().onDragEnd("saturation-lightness")}),r.Qb(1,"div",13),r.Ub()}if(2&t){const t=r.gc();r.Fc("background-color",t.hueSliderColor),r.nc("rgX",1)("rgY",1),r.Db(1),r.Fc("top",null==t.slider?null:t.slider.v,"px")("left",null==t.slider?null:t.slider.s,"px")}}function Tb(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",27),r.cc("click",function(e){r.Ac(t);const i=r.gc();return i.onAddPresetColor(e,i.selectedColor)}),r.Kc(1),r.Ub()}if(2&t){const t=r.gc();r.Fb(t.cpAddColorButtonClass),r.nc("disabled",t.cpPresetColors&&t.cpPresetColors.length>=t.cpMaxPresetColorsLength),r.Db(1),r.Mc(" ",t.cpAddColorButtonText," ")}}function Rb(t,e){1&t&&r.Qb(0,"div",28)}function Vb(t,e){if(1&t){const t=r.Wb();r.Vb(0,"input",34),r.cc("keyup.enter",function(e){return r.Ac(t),r.gc(2).onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc(2).onAlphaInput(e)}),r.Ub()}if(2&t){const t=r.gc(2);r.nc("rg",1)("value",null==t.cmykText?null:t.cmykText.a)}}function Fb(t,e){1&t&&(r.Vb(0,"div"),r.Kc(1,"A"),r.Ub())}function Lb(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",29),r.Vb(1,"div",30),r.Vb(2,"input",31),r.cc("keyup.enter",function(e){return r.Ac(t),r.gc().onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc().onCyanInput(e)}),r.Ub(),r.Vb(3,"input",31),r.cc("keyup.enter",function(e){return r.Ac(t),r.gc().onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc().onMagentaInput(e)}),r.Ub(),r.Vb(4,"input",31),r.cc("keyup.enter",function(e){return r.Ac(t),r.gc().onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc().onYellowInput(e)}),r.Ub(),r.Vb(5,"input",31),r.cc("keyup.enter",function(e){return r.Ac(t),r.gc().onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc().onBlackInput(e)}),r.Ub(),r.Ic(6,Vb,1,2,"input",32),r.Ub(),r.Vb(7,"div",30),r.Vb(8,"div"),r.Kc(9,"C"),r.Ub(),r.Vb(10,"div"),r.Kc(11,"M"),r.Ub(),r.Vb(12,"div"),r.Kc(13,"Y"),r.Ub(),r.Vb(14,"div"),r.Kc(15,"K"),r.Ub(),r.Ic(16,Fb,2,0,"div",33),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.Fc("display",3!==t.format?"none":"block"),r.Db(2),r.nc("rg",100)("value",null==t.cmykText?null:t.cmykText.c),r.Db(1),r.nc("rg",100)("value",null==t.cmykText?null:t.cmykText.m),r.Db(1),r.nc("rg",100)("value",null==t.cmykText?null:t.cmykText.y),r.Db(1),r.nc("rg",100)("value",null==t.cmykText?null:t.cmykText.k),r.Db(1),r.nc("ngIf","disabled"!==t.cpAlphaChannel),r.Db(10),r.nc("ngIf","disabled"!==t.cpAlphaChannel)}}function Ub(t,e){if(1&t){const t=r.Wb();r.Vb(0,"input",34),r.cc("keyup.enter",function(e){return r.Ac(t),r.gc(2).onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc(2).onAlphaInput(e)}),r.Ub()}if(2&t){const t=r.gc(2);r.nc("rg",1)("value",null==t.hslaText?null:t.hslaText.a)}}function Bb(t,e){1&t&&(r.Vb(0,"div"),r.Kc(1,"A"),r.Ub())}function Nb(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",35),r.Vb(1,"div",30),r.Vb(2,"input",36),r.cc("keyup.enter",function(e){return r.Ac(t),r.gc().onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc().onHueInput(e)}),r.Ub(),r.Vb(3,"input",31),r.cc("keyup.enter",function(e){return r.Ac(t),r.gc().onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc().onSaturationInput(e)}),r.Ub(),r.Vb(4,"input",31),r.cc("keyup.enter",function(e){return r.Ac(t),r.gc().onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc().onLightnessInput(e)}),r.Ub(),r.Ic(5,Ub,1,2,"input",32),r.Ub(),r.Vb(6,"div",30),r.Vb(7,"div"),r.Kc(8,"H"),r.Ub(),r.Vb(9,"div"),r.Kc(10,"S"),r.Ub(),r.Vb(11,"div"),r.Kc(12,"L"),r.Ub(),r.Ic(13,Bb,2,0,"div",33),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.Fc("display",2!==t.format?"none":"block"),r.Db(2),r.nc("rg",360)("value",null==t.hslaText?null:t.hslaText.h),r.Db(1),r.nc("rg",100)("value",null==t.hslaText?null:t.hslaText.s),r.Db(1),r.nc("rg",100)("value",null==t.hslaText?null:t.hslaText.l),r.Db(1),r.nc("ngIf","disabled"!==t.cpAlphaChannel),r.Db(8),r.nc("ngIf","disabled"!==t.cpAlphaChannel)}}function jb(t,e){if(1&t){const t=r.Wb();r.Vb(0,"input",34),r.cc("keyup.enter",function(e){return r.Ac(t),r.gc(2).onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc(2).onAlphaInput(e)}),r.Ub()}if(2&t){const t=r.gc(2);r.nc("rg",1)("value",null==t.rgbaText?null:t.rgbaText.a)}}function zb(t,e){1&t&&(r.Vb(0,"div"),r.Kc(1,"A"),r.Ub())}function Hb(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",37),r.Vb(1,"div",30),r.Vb(2,"input",38),r.cc("keyup.enter",function(e){return r.Ac(t),r.gc().onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc().onRedInput(e)}),r.Ub(),r.Vb(3,"input",38),r.cc("keyup.enter",function(e){return r.Ac(t),r.gc().onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc().onGreenInput(e)}),r.Ub(),r.Vb(4,"input",38),r.cc("keyup.enter",function(e){return r.Ac(t),r.gc().onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc().onBlueInput(e)}),r.Ub(),r.Ic(5,jb,1,2,"input",32),r.Ub(),r.Vb(6,"div",30),r.Vb(7,"div"),r.Kc(8,"R"),r.Ub(),r.Vb(9,"div"),r.Kc(10,"G"),r.Ub(),r.Vb(11,"div"),r.Kc(12,"B"),r.Ub(),r.Ic(13,zb,2,0,"div",33),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.Fc("display",1!==t.format?"none":"block"),r.Db(2),r.nc("rg",255)("value",null==t.rgbaText?null:t.rgbaText.r),r.Db(1),r.nc("rg",255)("value",null==t.rgbaText?null:t.rgbaText.g),r.Db(1),r.nc("rg",255)("value",null==t.rgbaText?null:t.rgbaText.b),r.Db(1),r.nc("ngIf","disabled"!==t.cpAlphaChannel),r.Db(8),r.nc("ngIf","disabled"!==t.cpAlphaChannel)}}function Kb(t,e){if(1&t){const t=r.Wb();r.Vb(0,"input",34),r.cc("keyup.enter",function(e){return r.Ac(t),r.gc(2).onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc(2).onAlphaInput(e)}),r.Ub()}if(2&t){const t=r.gc(2);r.nc("rg",1)("value",t.hexAlpha)}}function $b(t,e){1&t&&(r.Vb(0,"div"),r.Kc(1,"A"),r.Ub())}function Gb(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",39),r.Vb(1,"div",30),r.Vb(2,"input",40),r.cc("blur",function(){return r.Ac(t),r.gc().onHexInput(null)})("keyup.enter",function(e){return r.Ac(t),r.gc().onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc().onHexInput(e)}),r.Ub(),r.Ic(3,Kb,1,2,"input",32),r.Ub(),r.Vb(4,"div",30),r.Vb(5,"div"),r.Kc(6,"Hex"),r.Ub(),r.Ic(7,$b,2,0,"div",33),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.Fc("display",0!==t.format?"none":"block"),r.Hb("hex-alpha","forced"===t.cpAlphaChannel),r.Db(2),r.nc("value",t.hexText),r.Db(1),r.nc("ngIf","forced"===t.cpAlphaChannel),r.Db(4),r.nc("ngIf","forced"===t.cpAlphaChannel)}}function Wb(t,e){if(1&t){const t=r.Wb();r.Vb(0,"input",34),r.cc("keyup.enter",function(e){return r.Ac(t),r.gc(2).onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc(2).onAlphaInput(e)}),r.Ub()}if(2&t){const t=r.gc(2);r.nc("rg",1)("value",null==t.hslaText?null:t.hslaText.a)}}function Zb(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",41),r.Vb(1,"div",30),r.Vb(2,"input",31),r.cc("keyup.enter",function(e){return r.Ac(t),r.gc().onAcceptColor(e)})("newValue",function(e){return r.Ac(t),r.gc().onValueInput(e)}),r.Ub(),r.Ic(3,Wb,1,2,"input",32),r.Ub(),r.Vb(4,"div",30),r.Vb(5,"div"),r.Kc(6,"V"),r.Ub(),r.Vb(7,"div"),r.Kc(8,"A"),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.Db(2),r.nc("rg",100)("value",null==t.hslaText?null:t.hslaText.l),r.Db(1),r.nc("ngIf","disabled"!==t.cpAlphaChannel)}}function qb(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",42),r.Vb(1,"span",43),r.cc("click",function(){return r.Ac(t),r.gc().onFormatToggle(-1)}),r.Ub(),r.Vb(2,"span",43),r.cc("click",function(){return r.Ac(t),r.gc().onFormatToggle(1)}),r.Ub(),r.Ub()}}function Yb(t,e){if(1&t){const t=r.Wb();r.Vb(0,"span",50),r.cc("click",function(e){r.Ac(t);const i=r.gc().$implicit;return r.gc(3).onRemovePresetColor(e,i)}),r.Ub()}if(2&t){const t=r.gc(4);r.Fb(t.cpRemoveColorButtonClass)}}function Qb(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",48),r.cc("click",function(){r.Ac(t);const i=e.$implicit;return r.gc(3).setColorFromString(i)}),r.Ic(1,Yb,1,3,"span",49),r.Ub()}if(2&t){const t=e.$implicit,i=r.gc(3);r.Fc("background-color",t),r.Db(1),r.nc("ngIf",i.cpAddColorButton)}}function Xb(t,e){if(1&t&&(r.Vb(0,"div"),r.Ic(1,Qb,2,3,"div",47),r.Ub()),2&t){const t=r.gc(2);r.Fb(t.cpPresetColorsClass),r.Db(1),r.nc("ngForOf",t.cpPresetColors)}}function Jb(t,e){if(1&t&&(r.Vb(0,"div"),r.Kc(1),r.Ub()),2&t){const t=r.gc(2);r.Fb(t.cpPresetEmptyMessageClass),r.Db(1),r.Lc(t.cpPresetEmptyMessage)}}function tv(t,e){if(1&t&&(r.Vb(0,"div",44),r.Qb(1,"hr"),r.Vb(2,"div",45),r.Kc(3),r.Ub(),r.Ic(4,Xb,2,4,"div",46),r.Ic(5,Jb,2,4,"div",46),r.Ub()),2&t){const t=r.gc();r.Db(3),r.Lc(t.cpPresetLabel),r.Db(1),r.nc("ngIf",null==t.cpPresetColors?null:t.cpPresetColors.length),r.Db(1),r.nc("ngIf",!(null!=t.cpPresetColors&&t.cpPresetColors.length)&&t.cpAddColorButton)}}function ev(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",53),r.cc("click",function(e){return r.Ac(t),r.gc(2).onCancelColor(e)}),r.Kc(1),r.Ub()}if(2&t){const t=r.gc(2);r.Fb(t.cpCancelButtonClass),r.Db(1),r.Lc(t.cpCancelButtonText)}}function iv(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",53),r.cc("click",function(e){return r.Ac(t),r.gc(2).onAcceptColor(e)}),r.Kc(1),r.Ub()}if(2&t){const t=r.gc(2);r.Fb(t.cpOKButtonClass),r.Db(1),r.Lc(t.cpOKButtonText)}}function nv(t,e){if(1&t&&(r.Vb(0,"div",51),r.Ic(1,ev,2,4,"button",52),r.Ic(2,iv,2,4,"button",52),r.Ub()),2&t){const t=r.gc();r.Db(1),r.nc("ngIf",t.cpCancelButton),r.Db(1),r.nc("ngIf",t.cpOKButton)}}var rv=function(t){return t[t.HEX=0]="HEX",t[t.RGBA=1]="RGBA",t[t.HSLA=2]="HSLA",t[t.CMYK=3]="CMYK",t}({});class sv{constructor(t,e,i,n){this.r=t,this.g=e,this.b=i,this.a=n}}class ov{constructor(t,e,i,n){this.h=t,this.s=e,this.v=i,this.a=n}}class av{constructor(t,e,i,n){this.h=t,this.s=e,this.l=i,this.a=n}}class lv{constructor(t,e,i,n,r=1){this.c=t,this.m=e,this.y=i,this.k=n,this.a=r}}let cv=(()=>{class t{constructor(){this.newValue=new r.o}inputChange(t){const e=t.target.value;if(void 0===this.rg)this.newValue.emit(e);else{const t=parseFloat(e);this.newValue.emit({v:t,rg:this.rg})}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","text",""]],hostBindings:function(t,e){1&t&&r.cc("input",function(t){return e.inputChange(t)})},inputs:{rg:"rg",text:"text"},outputs:{newValue:"newValue"}}),t})(),hv=(()=>{class t{constructor(t){this.elRef=t,this.dragEnd=new r.o,this.dragStart=new r.o,this.newValue=new r.o,this.listenerMove=t=>this.move(t),this.listenerStop=()=>this.stop()}mouseDown(t){this.start(t)}touchStart(t){this.start(t)}move(t){t.preventDefault(),this.setCursor(t)}start(t){this.setCursor(t),t.stopPropagation(),document.addEventListener("mouseup",this.listenerStop),document.addEventListener("touchend",this.listenerStop),document.addEventListener("mousemove",this.listenerMove),document.addEventListener("touchmove",this.listenerMove),this.dragStart.emit()}stop(){document.removeEventListener("mouseup",this.listenerStop),document.removeEventListener("touchend",this.listenerStop),document.removeEventListener("mousemove",this.listenerMove),document.removeEventListener("touchmove",this.listenerMove),this.dragEnd.emit()}getX(t){const e=this.elRef.nativeElement.getBoundingClientRect();return(void 0!==t.pageX?t.pageX:t.touches[0].pageX)-e.left-window.pageXOffset}getY(t){const e=this.elRef.nativeElement.getBoundingClientRect();return(void 0!==t.pageY?t.pageY:t.touches[0].pageY)-e.top-window.pageYOffset}setCursor(t){const e=this.elRef.nativeElement.offsetWidth,i=this.elRef.nativeElement.offsetHeight,n=Math.max(0,Math.min(this.getX(t),e)),r=Math.max(0,Math.min(this.getY(t),i));void 0!==this.rgX&&void 0!==this.rgY?this.newValue.emit({s:n/e,v:1-r/i,rgX:this.rgX,rgY:this.rgY}):void 0===this.rgX&&void 0!==this.rgY?this.newValue.emit({v:r/i,rgY:this.rgY}):void 0!==this.rgX&&void 0===this.rgY&&this.newValue.emit({v:n/e,rgX:this.rgX})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l))},t.\u0275dir=r.Kb({type:t,selectors:[["","slider",""]],hostBindings:function(t,e){1&t&&r.cc("mousedown",function(t){return e.mouseDown(t)})("touchstart",function(t){return e.touchStart(t)})},inputs:{rgX:"rgX",rgY:"rgY",slider:"slider"},outputs:{dragEnd:"dragEnd",dragStart:"dragStart",newValue:"newValue"}}),t})();class uv{constructor(t,e,i,n){this.h=t,this.s=e,this.v=i,this.a=n}}class dv{constructor(t,e,i,n){this.h=t,this.s=e,this.v=i,this.a=n}}let pv=(()=>{class t{constructor(){this.active=null}setActive(t){this.active&&this.active!==t&&"inline"!==this.active.cpDialogDisplay&&this.active.closeDialog(),this.active=t}hsva2hsla(t){const e=t.h,i=t.s,n=t.v,r=t.a;if(0===n)return new av(e,0,0,r);if(0===i&&1===n)return new av(e,1,1,r);{const t=n*(2-i)/2;return new av(e,n*i/(1-Math.abs(2*t-1)),t,r)}}hsla2hsva(t){const e=Math.min(t.h,1),i=Math.min(t.s,1),n=Math.min(t.l,1),r=Math.min(t.a,1);if(0===n)return new ov(e,0,0,r);{const t=n+i*(1-Math.abs(2*n-1))/2;return new ov(e,2*(t-n)/t,t,r)}}hsvaToRgba(t){let e,i,n;const r=t.h,s=t.s,o=t.v,a=t.a,l=Math.floor(6*r),c=6*r-l,h=o*(1-s),u=o*(1-c*s),d=o*(1-(1-c)*s);switch(l%6){case 0:e=o,i=d,n=h;break;case 1:e=u,i=o,n=h;break;case 2:e=h,i=o,n=d;break;case 3:e=h,i=u,n=o;break;case 4:e=d,i=h,n=o;break;case 5:e=o,i=h,n=u;break;default:e=0,i=0,n=0}return new sv(e,i,n,a)}cmykToRgb(t){return new sv((1-t.c)*(1-t.k),(1-t.m)*(1-t.k),(1-t.y)*(1-t.k),t.a)}rgbaToCmyk(t){const e=1-Math.max(t.r,t.g,t.b);return 1===e?new lv(0,0,0,1,t.a):new lv((1-t.r-e)/(1-e),(1-t.g-e)/(1-e),(1-t.b-e)/(1-e),e,t.a)}rgbaToHsva(t){let e,i;const n=Math.min(t.r,1),r=Math.min(t.g,1),s=Math.min(t.b,1),o=Math.min(t.a,1),a=Math.max(n,r,s),l=Math.min(n,r,s),c=a,h=a-l;if(i=0===a?0:h/a,a===l)e=0;else{switch(a){case n:e=(r-s)/h+(r<s?6:0);break;case r:e=(s-n)/h+2;break;case s:e=(n-r)/h+4;break;default:e=0}e/=6}return new ov(e,i,c,o)}rgbaToHex(t,e){let i="#"+(1<<24|t.r<<16|t.g<<8|t.b).toString(16).substr(1);return e&&(i+=(256|Math.round(255*t.a)).toString(16).substr(1)),i}normalizeCMYK(t){return new lv(t.c/100,t.m/100,t.y/100,t.k/100,t.a)}denormalizeCMYK(t){return new lv(Math.floor(100*t.c),Math.floor(100*t.m),Math.floor(100*t.y),Math.floor(100*t.k),t.a)}denormalizeRGBA(t){return new sv(Math.round(255*t.r),Math.round(255*t.g),Math.round(255*t.b),t.a)}stringToHsva(t="",e=!1){let i=null;t=(t||"").toLowerCase();const n=[{re:/(rgb)a?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*%?,\s*(\d{1,3})\s*%?(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(t){return new sv(parseInt(t[2],10)/255,parseInt(t[3],10)/255,parseInt(t[4],10)/255,isNaN(parseFloat(t[5]))?1:parseFloat(t[5]))}},{re:/(hsl)a?\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(t){return new av(parseInt(t[2],10)/360,parseInt(t[3],10)/100,parseInt(t[4],10)/100,isNaN(parseFloat(t[5]))?1:parseFloat(t[5]))}}];n.push(e?{re:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})?$/,parse:function(t){return new sv(parseInt(t[1],16)/255,parseInt(t[2],16)/255,parseInt(t[3],16)/255,parseInt(t[4]||"FF",16)/255)}}:{re:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})$/,parse:function(t){return new sv(parseInt(t[1],16)/255,parseInt(t[2],16)/255,parseInt(t[3],16)/255,1)}}),n.push({re:/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])$/,parse:function(t){return new sv(parseInt(t[1]+t[1],16)/255,parseInt(t[2]+t[2],16)/255,parseInt(t[3]+t[3],16)/255,1)}});for(const r in n)if(n.hasOwnProperty(r)){const e=n[r],s=e.re.exec(t),o=s&&e.parse(s);if(o)return o instanceof sv?i=this.rgbaToHsva(o):o instanceof av&&(i=this.hsla2hsva(o)),i}return i}outputFormat(t,e,i){switch("auto"===e&&(e=t.a<1?"rgba":"hex"),e){case"hsla":const e=this.hsva2hsla(t),n=new av(Math.round(360*e.h),Math.round(100*e.s),Math.round(100*e.l),Math.round(100*e.a)/100);return t.a<1||"always"===i?"hsla("+n.h+","+n.s+"%,"+n.l+"%,"+n.a+")":"hsl("+n.h+","+n.s+"%,"+n.l+"%)";case"rgba":const r=this.denormalizeRGBA(this.hsvaToRgba(t));return t.a<1||"always"===i?"rgba("+r.r+","+r.g+","+r.b+","+Math.round(100*r.a)/100+")":"rgb("+r.r+","+r.g+","+r.b+")";default:const s="always"===i||"forced"===i;return this.rgbaToHex(this.denormalizeRGBA(this.hsvaToRgba(t)),s)}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),fv=(()=>{class t{constructor(t,e,i){this.elRef=t,this.cdRef=e,this.service=i,this.isIE10=!1,this.dialogArrowSize=10,this.dialogArrowOffset=15,this.dialogInputFields=[rv.HEX,rv.RGBA,rv.HSLA,rv.CMYK],this.useRootViewContainer=!1}handleEsc(t){this.show&&"popup"===this.cpDialogDisplay&&this.onCancelColor(t)}handleEnter(t){this.show&&"popup"===this.cpDialogDisplay&&this.onAcceptColor(t)}ngOnInit(){this.slider=new uv(0,0,0,0),this.sliderDimMax=new dv(this.hueSlider.nativeElement.offsetWidth||140,this.cpWidth,130,this.alphaSlider.nativeElement.offsetWidth||140),this.format=this.cpCmykEnabled?rv.CMYK:"rgba"===this.cpOutputFormat?rv.RGBA:"hsla"===this.cpOutputFormat?rv.HSLA:rv.HEX,this.listenerMouseDown=t=>{this.onMouseDown(t)},this.listenerResize=()=>{this.onResize()},this.openDialog(this.initialColor,!1)}ngOnDestroy(){this.closeDialog()}ngAfterViewInit(){230===this.cpWidth&&"inline"!==this.cpDialogDisplay||(this.sliderDimMax=new dv(this.hueSlider.nativeElement.offsetWidth||140,this.cpWidth,130,this.alphaSlider.nativeElement.offsetWidth||140),this.updateColorPicker(!1),this.cdRef.detectChanges())}openDialog(t,e=!0){this.service.setActive(this),this.width||(this.cpWidth=this.directiveElementRef.nativeElement.offsetWidth),this.height||(this.height=320),this.setInitialColor(t),this.setColorFromString(t,e),this.openColorPicker()}closeDialog(){this.closeColorPicker()}setupDialog(t,e,i,n,r,s,o,a,l,c,h,u,d,p,f,m,g,A,b,v,_,y,w,x,C,S,k,E,D,I,P,O,M,T,R,V){this.setInitialColor(i),this.setColorMode(a),this.isIE10=10===function(){let t="";"undefined"!=typeof navigator&&(t=navigator.userAgent.toLowerCase());const e=t.indexOf("msie ");return e>0&&parseInt(t.substring(e+5,t.indexOf(".",e)),10)}(),this.directiveInstance=t,this.directiveElementRef=e,this.cpDisableInput=u,this.cpCmykEnabled=l,this.cpAlphaChannel=c,this.cpOutputFormat=h,this.cpDialogDisplay=s,this.cpIgnoredElements=d,this.cpSaveClickOutside=p,this.cpCloseClickOutside=f,this.useRootViewContainer=m,this.width=this.cpWidth=parseInt(n,10),this.height=this.cpHeight=parseInt(r,10),this.cpPosition=g,this.cpPositionOffset=parseInt(A,10),this.cpOKButton=S,this.cpOKButtonText=E,this.cpOKButtonClass=k,this.cpCancelButton=D,this.cpCancelButtonText=P,this.cpCancelButtonClass=I,this.fallbackColor=o||"#fff",this.setPresetConfig(v,_),this.cpPresetColorsClass=y,this.cpMaxPresetColorsLength=w,this.cpPresetEmptyMessage=x,this.cpPresetEmptyMessageClass=C,this.cpAddColorButton=O,this.cpAddColorButtonText=T,this.cpAddColorButtonClass=M,this.cpRemoveColorButtonClass=R,this.cpTriggerElement=V,b||(this.dialogArrowOffset=0),"inline"===s&&(this.dialogArrowSize=0,this.dialogArrowOffset=0),"hex"===h&&"always"!==c&&"forced"!==c&&(this.cpAlphaChannel="disabled")}setColorMode(t){switch(t.toString().toUpperCase()){case"1":case"C":case"COLOR":this.cpColorMode=1;break;case"2":case"G":case"GRAYSCALE":this.cpColorMode=2;break;case"3":case"P":case"PRESETS":this.cpColorMode=3;break;default:this.cpColorMode=1}}setInitialColor(t){this.initialColor=t}setPresetConfig(t,e){this.cpPresetLabel=t,this.cpPresetColors=e}setColorFromString(t,e=!0,i=!0){let n;"always"===this.cpAlphaChannel||"forced"===this.cpAlphaChannel?(n=this.service.stringToHsva(t,!0),n||this.hsva||(n=this.service.stringToHsva(t,!1))):n=this.service.stringToHsva(t,!1),n||this.hsva||(n=this.service.stringToHsva(this.fallbackColor,!1)),n&&(this.hsva=n,this.sliderH=this.hsva.h,"hex"===this.cpOutputFormat&&"disabled"===this.cpAlphaChannel&&(this.hsva.a=1),this.updateColorPicker(e,i))}onResize(){"fixed"===this.position?this.setDialogPosition():"inline"!==this.cpDialogDisplay&&this.closeColorPicker()}onDragEnd(t){this.directiveInstance.sliderDragEnd({slider:t,color:this.outputColor})}onDragStart(t){this.directiveInstance.sliderDragStart({slider:t,color:this.outputColor})}onMouseDown(t){!this.show||this.isIE10||"popup"!==this.cpDialogDisplay||t.target===this.directiveElementRef.nativeElement||this.isDescendant(this.elRef.nativeElement,t.target)||this.isDescendant(this.directiveElementRef.nativeElement,t.target)||0!==this.cpIgnoredElements.filter(e=>e===t.target).length||(this.cpSaveClickOutside?this.directiveInstance.colorSelected(this.outputColor):(this.hsva=null,this.setColorFromString(this.initialColor,!1),this.cpCmykEnabled&&this.directiveInstance.cmykChanged(this.cmykColor),this.directiveInstance.colorChanged(this.initialColor),this.directiveInstance.colorCanceled()),this.cpCloseClickOutside&&this.closeColorPicker())}onAcceptColor(t){t.stopPropagation(),this.outputColor&&this.directiveInstance.colorSelected(this.outputColor),"popup"===this.cpDialogDisplay&&this.closeColorPicker()}onCancelColor(t){this.hsva=null,t.stopPropagation(),this.directiveInstance.colorCanceled(),this.setColorFromString(this.initialColor,!0),"popup"===this.cpDialogDisplay&&(this.cpCmykEnabled&&this.directiveInstance.cmykChanged(this.cmykColor),this.directiveInstance.colorChanged(this.initialColor,!0),this.closeColorPicker())}onFormatToggle(t){const e=this.dialogInputFields.length-(this.cpCmykEnabled?0:1),i=((this.dialogInputFields.indexOf(this.format)+t)%e+e)%e;this.format=this.dialogInputFields[i]}onColorChange(t){this.hsva.s=t.s/t.rgX,this.hsva.v=t.v/t.rgY,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"lightness",value:this.hsva.v,color:this.outputColor}),this.directiveInstance.sliderChanged({slider:"saturation",value:this.hsva.s,color:this.outputColor})}onHueChange(t){this.hsva.h=t.v/t.rgX,this.sliderH=this.hsva.h,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"hue",value:this.hsva.h,color:this.outputColor})}onValueChange(t){this.hsva.v=t.v/t.rgX,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"value",value:this.hsva.v,color:this.outputColor})}onAlphaChange(t){this.hsva.a=t.v/t.rgX,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"alpha",value:this.hsva.a,color:this.outputColor})}onHexInput(t){if(null===t)this.updateColorPicker();else{t&&"#"!==t[0]&&(t="#"+t);let e=/^#([a-f0-9]{3}|[a-f0-9]{6})$/gi;"always"===this.cpAlphaChannel&&(e=/^#([a-f0-9]{3}|[a-f0-9]{6}|[a-f0-9]{8})$/gi);const i=e.test(t);i&&(t.length<5&&(t="#"+t.substring(1).split("").map(t=>t+t).join("")),"forced"===this.cpAlphaChannel&&(t+=Math.round(255*this.hsva.a).toString(16)),this.setColorFromString(t,!0,!1)),this.directiveInstance.inputChanged({input:"hex",valid:i,value:t,color:this.outputColor})}}onRedInput(t){const e=this.service.hsvaToRgba(this.hsva),i=!isNaN(t.v)&&t.v>=0&&t.v<=t.rg;i&&(e.r=t.v/t.rg,this.hsva=this.service.rgbaToHsva(e),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"red",valid:i,value:e.r,color:this.outputColor})}onBlueInput(t){const e=this.service.hsvaToRgba(this.hsva),i=!isNaN(t.v)&&t.v>=0&&t.v<=t.rg;i&&(e.b=t.v/t.rg,this.hsva=this.service.rgbaToHsva(e),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"blue",valid:i,value:e.b,color:this.outputColor})}onGreenInput(t){const e=this.service.hsvaToRgba(this.hsva),i=!isNaN(t.v)&&t.v>=0&&t.v<=t.rg;i&&(e.g=t.v/t.rg,this.hsva=this.service.rgbaToHsva(e),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"green",valid:i,value:e.g,color:this.outputColor})}onHueInput(t){const e=!isNaN(t.v)&&t.v>=0&&t.v<=t.rg;e&&(this.hsva.h=t.v/t.rg,this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"hue",valid:e,value:this.hsva.h,color:this.outputColor})}onValueInput(t){const e=!isNaN(t.v)&&t.v>=0&&t.v<=t.rg;e&&(this.hsva.v=t.v/t.rg,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"value",valid:e,value:this.hsva.v,color:this.outputColor})}onAlphaInput(t){const e=!isNaN(t.v)&&t.v>=0&&t.v<=t.rg;e&&(this.hsva.a=t.v/t.rg,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"alpha",valid:e,value:this.hsva.a,color:this.outputColor})}onLightnessInput(t){const e=this.service.hsva2hsla(this.hsva),i=!isNaN(t.v)&&t.v>=0&&t.v<=t.rg;i&&(e.l=t.v/t.rg,this.hsva=this.service.hsla2hsva(e),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"lightness",valid:i,value:e.l,color:this.outputColor})}onSaturationInput(t){const e=this.service.hsva2hsla(this.hsva),i=!isNaN(t.v)&&t.v>=0&&t.v<=t.rg;i&&(e.s=t.v/t.rg,this.hsva=this.service.hsla2hsva(e),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"saturation",valid:i,value:e.s,color:this.outputColor})}onCyanInput(t){!isNaN(t.v)&&t.v>=0&&t.v<=t.rg&&(this.cmyk.c=t.v,this.updateColorPicker(!1,!0,!0)),this.directiveInstance.inputChanged({input:"cyan",valid:!0,value:this.cmyk.c,color:this.outputColor})}onMagentaInput(t){!isNaN(t.v)&&t.v>=0&&t.v<=t.rg&&(this.cmyk.m=t.v,this.updateColorPicker(!1,!0,!0)),this.directiveInstance.inputChanged({input:"magenta",valid:!0,value:this.cmyk.m,color:this.outputColor})}onYellowInput(t){!isNaN(t.v)&&t.v>=0&&t.v<=t.rg&&(this.cmyk.y=t.v,this.updateColorPicker(!1,!0,!0)),this.directiveInstance.inputChanged({input:"yellow",valid:!0,value:this.cmyk.y,color:this.outputColor})}onBlackInput(t){!isNaN(t.v)&&t.v>=0&&t.v<=t.rg&&(this.cmyk.k=t.v,this.updateColorPicker(!1,!0,!0)),this.directiveInstance.inputChanged({input:"black",valid:!0,value:this.cmyk.k,color:this.outputColor})}onAddPresetColor(t,e){t.stopPropagation(),this.cpPresetColors.filter(t=>t===e).length||(this.cpPresetColors=this.cpPresetColors.concat(e),this.directiveInstance.presetColorsChanged(this.cpPresetColors))}onRemovePresetColor(t,e){t.stopPropagation(),this.cpPresetColors=this.cpPresetColors.filter(t=>t!==e),this.directiveInstance.presetColorsChanged(this.cpPresetColors)}openColorPicker(){this.show||(this.show=!0,this.hidden=!0,setTimeout(()=>{this.hidden=!1,this.setDialogPosition(),this.cdRef.detectChanges()},0),this.directiveInstance.stateChanged(!0),this.isIE10||(document.addEventListener("mousedown",this.listenerMouseDown),document.addEventListener("touchstart",this.listenerMouseDown)),window.addEventListener("resize",this.listenerResize))}closeColorPicker(){this.show&&(this.show=!1,this.directiveInstance.stateChanged(!1),this.isIE10||(document.removeEventListener("mousedown",this.listenerMouseDown),document.removeEventListener("touchstart",this.listenerMouseDown)),window.removeEventListener("resize",this.listenerResize),this.cdRef.destroyed||this.cdRef.detectChanges())}updateColorPicker(t=!0,e=!0,i=!1){if(this.sliderDimMax){let n,r,s;2===this.cpColorMode&&(this.hsva.s=0);const o=this.outputColor;if(r=this.service.hsva2hsla(this.hsva),this.cpCmykEnabled?(i?(s=this.service.cmykToRgb(this.service.normalizeCMYK(this.cmyk)),this.hsva=this.service.rgbaToHsva(s)):(s=this.service.hsvaToRgba(this.hsva),this.cmyk=this.service.denormalizeCMYK(this.service.rgbaToCmyk(s))),s=this.service.denormalizeRGBA(s),this.sliderH=this.hsva.h):s=this.service.denormalizeRGBA(this.service.hsvaToRgba(this.hsva)),n=this.service.denormalizeRGBA(this.service.hsvaToRgba(new ov(this.sliderH||this.hsva.h,1,1,1))),e&&(this.hslaText=new av(Math.round(360*r.h),Math.round(100*r.s),Math.round(100*r.l),Math.round(100*r.a)/100),this.rgbaText=new sv(s.r,s.g,s.b,Math.round(100*s.a)/100),this.cpCmykEnabled&&(this.cmykText=new lv(this.cmyk.c,this.cmyk.m,this.cmyk.y,this.cmyk.k,Math.round(100*this.cmyk.a)/100)),this.hexText=this.service.rgbaToHex(s,"always"===this.cpAlphaChannel),this.hexAlpha=this.rgbaText.a),"auto"===this.cpOutputFormat&&this.format!==rv.RGBA&&this.format!==rv.CMYK&&this.hsva.a<1&&(this.format=this.hsva.a<1?rv.RGBA:rv.HEX),this.hueSliderColor="rgb("+n.r+","+n.g+","+n.b+")",this.alphaSliderColor="rgb("+s.r+","+s.g+","+s.b+")",this.outputColor=this.service.outputFormat(this.hsva,this.cpOutputFormat,this.cpAlphaChannel),this.selectedColor=this.service.outputFormat(this.hsva,"rgba",null),this.format!==rv.CMYK)this.cmykColor="";else if("always"===this.cpAlphaChannel||"enabled"===this.cpAlphaChannel||"forced"===this.cpAlphaChannel){const t=Math.round(100*this.cmyk.a)/100;this.cmykColor=`cmyka(${this.cmyk.c},${this.cmyk.m},${this.cmyk.y},${this.cmyk.k},${t})`}else this.cmykColor=`cmyk(${this.cmyk.c},${this.cmyk.m},${this.cmyk.y},${this.cmyk.k})`;this.slider=new uv((this.sliderH||this.hsva.h)*this.sliderDimMax.h-8,this.hsva.s*this.sliderDimMax.s-8,(1-this.hsva.v)*this.sliderDimMax.v-8,this.hsva.a*this.sliderDimMax.a-8),t&&o!==this.outputColor&&(this.cpCmykEnabled&&this.directiveInstance.cmykChanged(this.cmykColor),this.directiveInstance.colorChanged(this.outputColor))}}setDialogPosition(){if("inline"===this.cpDialogDisplay)this.position="relative";else{let t,e="static",i="",n=null,r=null,s=this.directiveElementRef.nativeElement.parentNode;const o=this.dialogElement.nativeElement.offsetHeight;for(;null!==s&&"HTML"!==s.tagName;){if(t=window.getComputedStyle(s),e=t.getPropertyValue("position"),i=t.getPropertyValue("transform"),"static"!==e&&null===n&&(n=s),i&&"none"!==i&&null===r&&(r=s),"fixed"===e){n=r;break}s=s.parentNode}const a=this.createDialogBox(this.directiveElementRef.nativeElement,"fixed"!==e);if(this.useRootViewContainer||"fixed"===e&&(!n||n instanceof HTMLUnknownElement))this.top=a.top,this.left=a.left;else{null===n&&(n=s);const t=this.createDialogBox(n,"fixed"!==e);this.top=a.top-t.top,this.left=a.left-t.left}"fixed"===e&&(this.position="fixed");let l=this.cpPosition;"auto"===this.cpPosition&&(l=function(t,e){let i="right",n="bottom";const{height:r,width:s}=t,{top:o,left:a}=e,l=o+e.height,c=a+e.width,h=o-r<0,u=l+r>(window.innerHeight||document.documentElement.clientHeight),d=a-s<0,p=c+s>(window.innerWidth||document.documentElement.clientWidth);return u&&(n="top"),h&&(n="bottom"),d&&(i="right"),p&&(i="left"),h&&u&&d&&p?["left","right","top","bottom"].reduce((e,i)=>t[e]>t[i]?e:i):d&&p?h?"bottom":u||o>l?"top":"bottom":h&&u?d?"right":p||a>c?"left":"right":`${n}-${i}`}(this.dialogElement.nativeElement.getBoundingClientRect(),this.cpTriggerElement.nativeElement.getBoundingClientRect())),"top"===l?(this.arrowTop=o-1,this.top-=o+this.dialogArrowSize,this.left+=this.cpPositionOffset/100*a.width-this.dialogArrowOffset):"bottom"===l?(this.top+=a.height+this.dialogArrowSize,this.left+=this.cpPositionOffset/100*a.width-this.dialogArrowOffset):"top-left"===l||"left-top"===l?(this.top-=o-a.height+a.height*this.cpPositionOffset/100,this.left-=this.cpWidth+this.dialogArrowSize-2-this.dialogArrowOffset):"top-right"===l||"right-top"===l?(this.top-=o-a.height+a.height*this.cpPositionOffset/100,this.left+=a.width+this.dialogArrowSize-2-this.dialogArrowOffset):"left"===l||"bottom-left"===l||"left-bottom"===l?(this.top+=a.height*this.cpPositionOffset/100-this.dialogArrowOffset,this.left-=this.cpWidth+this.dialogArrowSize-2):(this.top+=a.height*this.cpPositionOffset/100-this.dialogArrowOffset,this.left+=a.width+this.dialogArrowSize-2),this.cpUsePosition=l}}isDescendant(t,e){let i=e.parentNode;for(;null!==i;){if(i===t)return!0;i=i.parentNode}return!1}createDialogBox(t,e){return{top:t.getBoundingClientRect().top+(e?window.pageYOffset:0),left:t.getBoundingClientRect().left+(e?window.pageXOffset:0),width:t.offsetWidth,height:t.offsetHeight}}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.h),r.Pb(pv))},t.\u0275cmp=r.Jb({type:t,selectors:[["color-picker"]],viewQuery:function(t,e){if(1&t&&(r.Pc(Db,3),r.Pc(Ib,3),r.Pc(Pb,3)),2&t){let t;r.vc(t=r.dc())&&(e.dialogElement=t.first),r.vc(t=r.dc())&&(e.hueSlider=t.first),r.vc(t=r.dc())&&(e.alphaSlider=t.first)}},hostBindings:function(t,e){1&t&&r.cc("keyup.esc",function(t){return e.handleEsc(t)},!1,r.yc)("keyup.enter",function(t){return e.handleEnter(t)},!1,r.yc)},decls:28,vars:47,consts:[[1,"color-picker",3,"click"],["dialogPopup",""],[3,"class","top",4,"ngIf"],["class","saturation-lightness",3,"slider","rgX","rgY","background-color","newValue","dragStart","dragEnd",4,"ngIf"],[1,"hue-alpha","box"],[1,"left"],[1,"selected-color-background"],[1,"selected-color"],["type","button",3,"class","disabled","click",4,"ngIf"],[1,"right"],["style","height: 16px;",4,"ngIf"],[1,"hue",3,"slider","rgX","newValue","dragStart","dragEnd"],["hueSlider",""],[1,"cursor"],[1,"value",3,"slider","rgX","newValue","dragStart","dragEnd"],["valueSlider",""],[1,"alpha",3,"slider","rgX","newValue","dragStart","dragEnd"],["alphaSlider",""],["class","cmyk-text",3,"display",4,"ngIf"],["class","hsla-text",3,"display",4,"ngIf"],["class","rgba-text",3,"display",4,"ngIf"],["class","hex-text",3,"hex-alpha","display",4,"ngIf"],["class","value-text",4,"ngIf"],["class","type-policy",4,"ngIf"],["class","preset-area",4,"ngIf"],["class","button-area",4,"ngIf"],[1,"saturation-lightness",3,"slider","rgX","rgY","newValue","dragStart","dragEnd"],["type","button",3,"disabled","click"],[2,"height","16px"],[1,"cmyk-text"],[1,"box"],["type","number","pattern","[0-9]*","min","0","max","100",3,"text","rg","value","keyup.enter","newValue"],["type","number","pattern","[0-9]+([\\.,][0-9]{1,2})?","min","0","max","1","step","0.1",3,"text","rg","value","keyup.enter","newValue",4,"ngIf"],[4,"ngIf"],["type","number","pattern","[0-9]+([\\.,][0-9]{1,2})?","min","0","max","1","step","0.1",3,"text","rg","value","keyup.enter","newValue"],[1,"hsla-text"],["type","number","pattern","[0-9]*","min","0","max","360",3,"text","rg","value","keyup.enter","newValue"],[1,"rgba-text"],["type","number","pattern","[0-9]*","min","0","max","255",3,"text","rg","value","keyup.enter","newValue"],[1,"hex-text"],[3,"text","value","blur","keyup.enter","newValue"],[1,"value-text"],[1,"type-policy"],[1,"type-policy-arrow",3,"click"],[1,"preset-area"],[1,"preset-label"],[3,"class",4,"ngIf"],["class","preset-color",3,"backgroundColor","click",4,"ngFor","ngForOf"],[1,"preset-color",3,"click"],[3,"class","click",4,"ngIf"],[3,"click"],[1,"button-area"],["type","button",3,"class","click",4,"ngIf"],["type","button",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"div",0,1),r.cc("click",function(t){return t.stopPropagation()}),r.Ic(2,Ob,1,5,"div",2),r.Ic(3,Mb,2,8,"div",3),r.Vb(4,"div",4),r.Vb(5,"div",5),r.Qb(6,"div",6),r.Qb(7,"div",7),r.Ic(8,Tb,2,5,"button",8),r.Ub(),r.Vb(9,"div",9),r.Ic(10,Rb,1,0,"div",10),r.Vb(11,"div",11,12),r.cc("newValue",function(t){return e.onHueChange(t)})("dragStart",function(){return e.onDragStart("hue")})("dragEnd",function(){return e.onDragEnd("hue")}),r.Qb(13,"div",13),r.Ub(),r.Vb(14,"div",14,15),r.cc("newValue",function(t){return e.onValueChange(t)})("dragStart",function(){return e.onDragStart("value")})("dragEnd",function(){return e.onDragEnd("value")}),r.Qb(16,"div",13),r.Ub(),r.Vb(17,"div",16,17),r.cc("newValue",function(t){return e.onAlphaChange(t)})("dragStart",function(){return e.onDragStart("alpha")})("dragEnd",function(){return e.onDragEnd("alpha")}),r.Qb(19,"div",13),r.Ub(),r.Ub(),r.Ub(),r.Ic(20,Lb,17,12,"div",18),r.Ic(21,Nb,14,10,"div",19),r.Ic(22,Hb,14,10,"div",20),r.Ic(23,Gb,8,7,"div",21),r.Ic(24,Zb,9,3,"div",22),r.Ic(25,qb,3,0,"div",23),r.Ic(26,tv,6,3,"div",24),r.Ic(27,nv,3,2,"div",25),r.Ub()),2&t&&(r.Fc("display",e.show?"block":"none")("visibility",e.hidden?"hidden":"visible")("top",e.top,"px")("left",e.left,"px")("position",e.position)("height",e.cpHeight,"px")("width",e.cpWidth,"px"),r.Hb("open",e.show),r.Db(2),r.nc("ngIf","popup"==e.cpDialogDisplay),r.Db(1),r.nc("ngIf",1===(e.cpColorMode||1)),r.Db(4),r.Fc("background-color",e.selectedColor),r.Db(1),r.nc("ngIf",e.cpAddColorButton),r.Db(2),r.nc("ngIf","disabled"===e.cpAlphaChannel),r.Db(1),r.Fc("display",1===(e.cpColorMode||1)?"block":"none"),r.nc("rgX",1),r.Db(2),r.Fc("left",null==e.slider?null:e.slider.h,"px"),r.Db(1),r.Fc("display",2===(e.cpColorMode||1)?"block":"none"),r.nc("rgX",1),r.Db(2),r.Fc("right",null==e.slider?null:e.slider.v,"px"),r.Db(1),r.Fc("display","disabled"===e.cpAlphaChannel?"none":"block")("background-color",e.alphaSliderColor),r.nc("rgX",1),r.Db(2),r.Fc("left",null==e.slider?null:e.slider.a,"px"),r.Db(1),r.nc("ngIf",!e.cpDisableInput&&1===(e.cpColorMode||1)),r.Db(1),r.nc("ngIf",!e.cpDisableInput&&1===(e.cpColorMode||1)),r.Db(1),r.nc("ngIf",!e.cpDisableInput&&1===(e.cpColorMode||1)),r.Db(1),r.nc("ngIf",!e.cpDisableInput&&1===(e.cpColorMode||1)),r.Db(1),r.nc("ngIf",!e.cpDisableInput&&2===(e.cpColorMode||1)),r.Db(1),r.nc("ngIf",!e.cpDisableInput&&1===(e.cpColorMode||1)),r.Db(1),r.nc("ngIf",(null==e.cpPresetColors?null:e.cpPresetColors.length)||e.cpAddColorButton),r.Db(1),r.nc("ngIf",e.cpOKButton||e.cpCancelButton))},directives:[ut,hv,cv,ct],styles:['.color-picker{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;background-color:#fff;border:1px solid #777;cursor:default;height:auto;position:absolute;user-select:none;width:230px;z-index:1000}.color-picker *{box-sizing:border-box;font-size:11px;margin:0}.color-picker input{color:#000;font-size:13px;height:26px;min-width:0;text-align:center;width:0}.color-picker input:-moz-submit-invalid,.color-picker input:-moz-ui-invalid,.color-picker input:invalid{box-shadow:none}.color-picker input::-webkit-inner-spin-button,.color-picker input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.color-picker .arrow{border-style:solid;height:0;position:absolute;width:0;z-index:999999}.color-picker .arrow.arrow-top{border-color:#777 transparent transparent;border-width:10px 5px;left:8px}.color-picker .arrow.arrow-bottom{border-color:transparent transparent #777;border-width:10px 5px;left:8px;top:-20px}.color-picker .arrow.arrow-left-top,.color-picker .arrow.arrow-top-left{border-color:transparent transparent transparent #777;border-width:5px 10px;bottom:8px;right:-21px}.color-picker .arrow.arrow-right-top,.color-picker .arrow.arrow-top-right{border-color:transparent #777 transparent transparent;border-width:5px 10px;bottom:8px;left:-20px}.color-picker .arrow.arrow-bottom-left,.color-picker .arrow.arrow-left,.color-picker .arrow.arrow-left-bottom{border-color:transparent transparent transparent #777;border-width:5px 10px;right:-21px;top:8px}.color-picker .arrow.arrow-bottom-right,.color-picker .arrow.arrow-right,.color-picker .arrow.arrow-right-bottom{border-color:transparent #777 transparent transparent;border-width:5px 10px;left:-20px;top:8px}.color-picker .cursor{border:2px solid #222;border-radius:50%;cursor:default;height:16px;position:relative;width:16px}.color-picker .box{display:flex;padding:4px 8px}.color-picker .left{padding:16px 8px;position:relative}.color-picker .right{flex:1 1 auto;padding:12px 8px}.color-picker .button-area{padding:0 16px 16px;text-align:right}.color-picker .button-area button{margin-left:8px}.color-picker .preset-area{padding:4px 15px}.color-picker .preset-area .preset-label{color:#555;font-size:11px;overflow:hidden;padding:4px;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:100%}.color-picker .preset-area .preset-color{border:1px solid #a9a9a9;border-radius:25%;cursor:pointer;display:inline-block;height:18px;margin:4px 6px 8px;position:relative;width:18px}.color-picker .preset-area .preset-empty-message{font-style:italic;margin-bottom:8px;margin-top:4px;min-height:18px;text-align:center}.color-picker .hex-text{font-size:11px;padding:4px 8px;width:100%}.color-picker .hex-text .box{padding:0 24px 8px 8px}.color-picker .hex-text .box div{clear:left;color:#555;flex:1 1 auto;float:left;text-align:center}.color-picker .hex-text .box input{border:1px solid #a9a9a9;flex:1 1 auto;padding:1px}.color-picker .hex-alpha .box div:first-child,.color-picker .hex-alpha .box input:first-child{flex-grow:3;margin-right:8px}.color-picker .cmyk-text,.color-picker .hsla-text,.color-picker .rgba-text,.color-picker .value-text{font-size:11px;padding:4px 8px;width:100%}.color-picker .cmyk-text .box,.color-picker .hsla-text .box,.color-picker .rgba-text .box{padding:0 24px 8px 8px}.color-picker .value-text .box{padding:0 8px 8px}.color-picker .cmyk-text .box div,.color-picker .hsla-text .box div,.color-picker .rgba-text .box div,.color-picker .value-text .box div{color:#555;flex:1 1 auto;margin-right:8px;text-align:center}.color-picker .cmyk-text .box div:last-child,.color-picker .hsla-text .box div:last-child,.color-picker .rgba-text .box div:last-child,.color-picker .value-text .box div:last-child{margin-right:0}.color-picker .cmyk-text .box input,.color-picker .hsla-text .box input,.color-picker .rgba-text .box input,.color-picker .value-text .box input{border:1px solid #a9a9a9;flex:1;float:left;margin:0 8px 0 0;padding:1px}.color-picker .cmyk-text .box input:last-child,.color-picker .hsla-text .box input:last-child,.color-picker .rgba-text .box input:last-child,.color-picker .value-text .box input:last-child{margin-right:0}.color-picker .hue-alpha{align-items:center;margin-bottom:3px}.color-picker .hue{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwkUFWbCCAAAAFxJREFUaN7t0kEKg0AQAME2x83/n2qu5qCgD1iDhCoYdpnbQC9bbY1qVO/jvc6k3ad91s7/7F1/csgPrujuQ17BDYSFsBAWwgJhISyEBcJCWAgLhIWwEBYIi2f7Ar/1TCgFH2X9AAAAAElFTkSuQmCC");direction:ltr}.color-picker .hue,.color-picker .value{background-size:100% 100%;border:none;cursor:pointer;height:16px;margin-bottom:16px;width:100%}.color-picker .value{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAACTklEQVR42u3SYUcrABhA4U2SkmRJMmWSJklKJiWZZpKUJJskKUmaTFImKZOUzMySpGRmliRNJilJSpKSJEtmSpIpmWmSdO736/6D+x7OP3gUCoWCv1cqlSQlJZGcnExKSgqpqamkpaWRnp5ORkYGmZmZqFQqsrKyyM7OJicnh9zcXNRqNXl5eeTn56PRaCgoKKCwsJCioiK0Wi3FxcWUlJRQWlpKWVkZ5eXlVFRUUFlZiU6no6qqiurqampqaqitraWurg69Xk99fT0GgwGj0UhDQwONjY00NTXR3NxMS0sLra2ttLW10d7ejslkwmw209HRQWdnJ11dXXR3d9PT00Nvby99fX309/czMDDA4OAgFouFoaEhrFYrw8PDjIyMMDo6ytjYGDabjfHxcSYmJpicnGRqagq73c709DQzMzPMzs4yNzfH/Pw8DocDp9OJy+XC7XazsLDA4uIiS0tLLC8vs7KywurqKmtra3g8HrxeLz6fD7/fz/r6OhsbG2xubrK1tcX29jaBQICdnR2CwSC7u7vs7e2xv7/PwcEBh4eHHB0dcXx8zMnJCaenp5ydnXF+fs7FxQWXl5dcXV1xfX3Nzc0Nt7e33N3dEQqFuL+/5+HhgXA4TCQS4fHxkaenJ56fn3l5eeH19ZVoNMrb2xvv7+98fHwQi8WIx+N8fn6SSCT4+vri+/ubn58ffn9/+VcKgSWwBJbAElgCS2AJLIElsASWwBJYAktgCSyBJbAElsASWAJLYAksgSWwBJbAElgCS2AJLIElsP4/WH8AmJ5Z6jHS4h8AAAAASUVORK5CYII=");direction:rtl}.color-picker .alpha{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwYQlZMa3gAAAWVJREFUaN7tmEGO6jAQRCsOArHgBpyAJYGjcGocxAm4A2IHpmoWE0eBH+ezmFlNvU06shJ3W6VEelWMUQAIIF9f6qZpimsA1LYtS2uF51/u27YVAFZVRUkEoGHdPV/sIcbIEIIkUdI/9Xa7neyv61+SWFUVAVCSct00TWn2fv6u3+Ecfd3tXzy/0+nEUu+SPjo/kqzrmiQpScN6v98XewfA8/lMkiLJ2WxGSUopcT6fM6U0NX9/frfbjev1WtfrlZfLhYfDQQHG/AIOlnGwjINlHCxjHCzjYJm/TJWdCwquJXseFFzGwDNNeiKMOJTO8xQdDQaeB29+K9efeLaBo9J7vdvtJj1RjFFjfiv7qv95tjx/7leSQgh93e1ffMeIp6O+YQjho/N791t1XVOSSI7N//K+4/GoxWLBx+PB5/Op5XLJ+/3OlJJWqxU3m83ovv5iGf8KjYNlHCxjHCzjYBkHy5gf5gusvQU7U37jTAAAAABJRU5ErkJggg==");background-size:100% 100%;border:none;cursor:pointer;direction:ltr;height:16px;width:100%}.color-picker .type-policy{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAgCAYAAAAffCjxAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAACewAAAnsB01CO3AAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAIASURBVEiJ7ZY9axRRFIafsxMStrLQJpAgpBFhi+C9w1YSo00I6RZ/g9vZpBf/QOr4GyRgkSKNSrAadsZqQGwCkuAWyRZJsySwvhZ7N/vhzrgbLH3Ld8597jlzz50zJokyxXH8DqDVar0qi6v8BbItqSGpEcfxdlmsFWXkvX8AfAVWg3UKPEnT9GKujMzsAFgZsVaCN1VTQd77XUnrgE1kv+6935268WRpzrnHZvYRWC7YvC3pRZZl3wozqtVqiyH9IgjAspkd1Gq1xUJQtVrdB9ZKIAOthdg/Qc65LUk7wNIMoCVJO865rYFhkqjX6/d7vV4GPJwBMqofURS5JEk6FYBer/eeYb/Mo9WwFnPOvQbeAvfuAAK4BN4sAJtAG/gJIElmNuiJyba3EGNmZiPeZuEVmVell/Y/6N+CzDn3AXhEOOo7Hv/3BeAz8IzQkMPnJbuPx1wC+yYJ7/0nYIP5S/0FHKdp+rwCEEXRS/rf5Hl1Gtb2M0iSpCOpCZzPATmX1EySpHMLAsiy7MjMDoHrGSDXZnaYZdnRwBh7J91utwmczAA6CbG3GgPleX4jqUH/a1CktqRGnuc3hSCAMB32gKspkCtgb3KCQMmkjeP4WNJThrNNZval1WptTIsv7JtQ4tmIdRa8qSoEpWl6YWZNoAN0zKxZNPehpLSBZv2t+Q0CJ9lLnARQLAAAAABJRU5ErkJggg==");background-position:50%;background-repeat:no-repeat;background-size:8px 16px;height:24px;position:absolute;right:12px;top:218px;width:16px}.color-picker .type-policy .type-policy-arrow{display:block;height:50%;width:100%}.color-picker .selected-color{border:1px solid #a9a9a9;border-radius:50%;height:40px;left:8px;position:absolute;top:16px;width:40px}.color-picker .selected-color-background{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAh0lEQVRYR+2W0QlAMQgD60zdfwOdqa8TmI/wQMr5K0I5bZLIzLOa2nt37VVVbd+dDx5obgCC3KBLwJ2ff4PnVidkf+ucIhw80HQaCLo3DMH3CRK3iFsmAWVl6hPNDwt8EvNE5q+YuEXcMgkonVM6SdyCoEvAnZ8v1Hjx817MilmxSUB5rdLJDycZgUAZUch/AAAAAElFTkSuQmCC");border-radius:50%;height:40px;width:40px}.color-picker .saturation-lightness{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOYAAACCCAYAAABSD7T3AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwksPWR6lgAAIABJREFUeNrtnVuT47gRrAHN+P//Or/61Y5wONZ7mZ1u3XAeLMjJZGZVgdKsfc5xR3S0RIIUW+CHzCpc2McYo7XGv3ex7UiZd57rjyzzv+v+33X/R/+3r/f7vR386Y+TvKNcf/wdhTLPcv9qU2wZd74uth0t1821jkIZLPcsI/6nWa4XvutquU0Z85mnx80S/ZzgpnLnOtHNt7/ofx1TKXcSNzN/7qbMQ3ju7rNQmMYYd/4s2j9aa+P+gGaMcZrb1M/tdrvf7/d2v99P9/t93O/3cbvdxu12G9frdVwul3E+n8c///nP+2+//Xb66aefxl//+tfx5z//2YK5Al2rgvf4UsbpdGrB52bAvArXpuzjmiqAVSGz5eDmGYXzhbAZmCrnmzddpUU+8Y1dAOYeXCtDUwVwV7YCGH6uAmyMcZ9l5vkUaBPGMUZ7/J5w/792/fvv9Xq93263dr/fTxPECeME8nK5jM/Pz/HTTz/dv337dvrll1/GP/7xj/G3v/1t/OUvfwkVswongjdOp9PzH3U3D3zmWGnZVXn4jCqs7wC2BKP4/8tAzkZsoWx6XrqeHZymvp4ABCBJhTQwKfDT8gzrZCIqi5AhiACjBfEB2rP8/X63MM7f6/V6v9/v7Xa7bYC83W7jcrlsVHIq5ffv30+//fbb+OWXX8ZPP/00/v73v4+ff/75JSvbeu+bL2WMMaFbAlpBNM85QX+ct6qoSqkPAwuQlBVKqGNFSUOAA3Bmu7gC5hNOd15nSwvAOUW7C4giUCV8Sgn5L9hNFIqTsp0GxI0ysioyjAjkY/tGJVEpz+fz+OWXX+7fv38//f777+Pbt2/j119/HT///PP49ddfx8fHRwrmTjV779EXu2px2xhjwtdJZQcAWQIPLPISsMJaSwiD8gzIKrwSyATE5j5nAbR5c1dBUwBlsEWW0h6LqiYsqFPAQxCyRZ3wOSARxmlXMX5k64pQfvv27f75+dk+Pj5OHx8f4/v37+Pbt2/jt99+G9++fRsfHx/jcrmUFLO31gYDWblxRIs/TqfT7ousxJsAxXA2Gc7TA9XdgfdoHbFsj76X2+1WArgI1ageGwA3qupqoHsmcbI6Fu93quggFa9d7LeDtgKfAFHBJ+NEByIkcJ5KervdTmhhGcgJJSZ5vn//fj+fz+18Pp8+Pz/H5+fnmGD+/vvv4/v37+Pj42N8fn6O2+1Ws7JjjP6wraMI5E4RZ8x2vV5TSwkquotV7/d7Tz6HFWsD/qNcdw0CQ3q/321c686TwDVIdbuy73zNldhSHb8I2klZznm+InBS4U6n0302aBFsLhHDAKJVJVglfI9jhvu53W53sLANYNxAiDA6MCeUHx8f9+v12i6XS7tcLqcZW57P5yeY8/fz83Ocz+fnsSmYUyknWEG85WBst9stzSLyMdfr9Qi08iY15UZ0LlDGLhR3o5zK2j7OPUTD0E+nU3tk7Xb/16NFbhloAMuY1zjLUOO3BKeIDe+Z8s3/J4gFo4TM5jPmuRg28foUKKVSwo16TgA5npywcWLHgYl/Pz8/73/605/ab7/91m63W7tcLie0sZj4mao5gTyfz88E0f1+j8EcYzwTPEG2cqjyfHNF0M8fuqEiaOVnRzZZQNh5fwQyHg/HDGfJo89Q1zb/quu5XC6773I2XKfTqd/v9+d3wuqWva/YTdUdEV3fhIv/Viyps6YE3x3r43K5bJQS66zaxVGFsvd+//j4aF+/fm3fv39vt9utff36tf3+++/tdrudvn37ZuNLBaaCMgUzC+rZRiFowxUuJI8YMqcCp9Opq5vagaYU6lGJA1XQqejchw6Cj0Gw5nYBrGw01A2O206n04BGouNNyTfp/FwElhUey6nXrIKw7QQWddxuN2ldL5fL839gSPF8ahu/JvBO48CPSuqMf8Vp9/P53L58+dLu93s7n8/tfr8/39/v9/b5+TkhPJ3P56mQ436/j+/fv+/iSgbzer0+AZx/5+88bv6OMda6S5z6kd21fYC9dxv7cIJJ2d9AOS30fPMzyHiTM8B4DF6XUlYHp4KQW3W+1t77MNB1vGHxWq7Xa7vf78+y5/N5A+H1et29xuP5dbYtyaRu4AksbPq6936fjRzXRxBbPr/b+b18+fKljTHaBBBfn8/n0/1+H1++fBnn8zm0sB8fH5u4cr5GuBhMVk0EEn9RsctgVhM+ixlJtMA23R8B6yysAstBOgFXIKKCMIgToMqNEu2fYMH7ztc732dQKkCj1ytAZtY0Kx8pIr8GGJ+AT3V+2Hirhl++fBmXy2Wz73w+b17P8p+fn8/tUwGVleVkTyUb68DkfayWY4zxNRihU4EpLJPZVrK+u7J4/mgfKqeLW9X2REWlItL1diynbDDb3+jXgYjQqn0rrxWc+NkILP7F7xIbMvx7vV53x40xnlbWJF12ZSag/N0pW6t+ZzmOMzHjajKwDfond78zYTdfq18up97zr2q8v3IioBprRtBl0EZ9og5WBRGOdOHjIjXF7UotFbgOWnXzIJyzYvjG5IYgsmMOxHkz8OsMSrVNWeq5T8DaOcbEv1Od5rbs9aO7YvMet63EkF++fMExq+MRl4/L5bLZN/+ez+fnZ6KazuMqXSQVO5spJXflHAIzes/xJseckRJiDMog9d6VfRrqXMr6KpVV27jRwJacGovOAM1zMdQMnwK1AubK63kdCChvI1C7g0z9nf/D+Xze2Vj8H7Gx4P9duQlsYCrqyN8XqG3Hm/10Oj3jw/n+crlstuM+jPmmxT2dTuPz83Pzt2pn1XsEHX/bnPaVqVmh0xwOt0o6XLLAHePUU203wHfcrspCwmV3TryB5s0Mseeg97x/BwzCjBlbB+pRAPla0BVQuT6V6QHdBlj3d0KG147b+DqxQeUymDO43W4dQar+TIjwmAd0z8/h65vf0/yLv3Pb5XLpru/ydDo9s7ET0I+Pj6dKK9VUEIeKWQWPAOrJ8LKd4vE+t91Y3e7UFlWatg2VwJnb+HPmtvm/sfK59/OaWF3x/eP1UPHvA5DDYDpYXfb0drv1V2DkBkxtw/tEWVVlXWdC9pFYs5/jfh9dS/16vW7s6lTG+TfqsxSJHxkXXq/Xdr1eu4LsfD6P3vsT3N77DkL+zPm5jSdKL4zR3AxQd6rHkLkYlSowsrq7znzu6wSwdsMJOXmA5fBcjxtgMGBYHlr5zokhtsMCTgXLQOW4XC6dEyEMprL8mAQzXRgduix2yZzorxkYsDn3hB1VeMLGsXsVtgl2pW8S3svk0vw7R4hNaHvv4cACl5HFzwIH0Kc6zu4XjDPR/jpAVxWzO1Xk2DDb3vTcxeGU1iWZHkmIDWziWKvirCJ4Dravs6IJ/GG6cTqWdXDy+fArQDVVkLqkVjAoZIITdmmIqXwqa95N3+MGYoZQdRVNO53Y1xRkhO16vY7eu507Ca9lJnbGpxOemQhSw/AQsmmp5zU9BiU8G6wvX76M6/U6Pj4+do0Bz4CpgiknTUeDqwlKBmg3u4OVjrZ1A+rAcgaejWq6eJCvCYFDONSwOgHX4EQRw8lxbzDOdEK6gZ3Hk1b+8g2o1JFtKXyv/fEdTXuWjWXdAZiBp6ADeDrCFiim7B6ZFneeI7Gvm/PMkUDX67W7xI8b0D7/v8dA9qfN5oaCf74WZjH0mf1cmfY1Y0JUFmVrTWu8uzkNcLtEj7u5FXBTkfC6GOA5q8YMxO8KVvF6sAVGdcrUbsKODcQKkLMOMdmlxum642YrPm26AlhZW1YB1R+rrGswE8TaYAWeUMxdf+WjwSvZ2Ef3ytOyfn5+PpVPAaqOn43MtNBqvmjjxbjM4lZjZY4gqNMI5ktaW/sYKNwS+9lFQzGihmMCKPa7+Z0V6Eb0GRmobtpX8JljWu5FMLN5ja6hG9kwQgZqf5+1NH5UxzkFReCdWhJ8XdlGUkxO7HRlYRm4mVO43W7ter12TPJEw/rmEN3L5SKHIWZg9mz+pUoKOYq5bJTJdX2gme1UcxMZQFaEQIlHct32M+Y1BzGkGuzfiyAN9z+ugplZ1symCrDCYYkGxDTpI9RzBy0rHyeDUC1nWaeUaD9n4xkNyYMBDZtzZ3B++fJlY21XFDOcARJlabOyiS3uCpLI9jrZjCDkaVvcCCjwognKShWdzXZWlZMvVTgD8LpqlCLrqgbcB+qYwrgKYpT0ccCqbKyCValkEabn/FynogCrPKfqf51xJ7sGB2ZXcZmxoSOztjx300DZi7a0/2AIR0UlBag9SuDw6KcAzlaB7vHZvWpjK90dyrq6bKyDUZQbR0B05biLQkHIcSUmgIK+SwuqgHCnoio2RQU1yj+BnBy9pphVKLGyC7ZzFK1pxWK+E8IhVCWLN/uLtnUU4ayoYLoaANz8FdtaSvY4pV0BEW2ls61czqllBKpTyKgMAhrZ1cdc1RROtPmvWNkdcKZ7ZKxaWjiPLJMpp7OZKxA+rqG/oJLjxf0pnJlqLoDZo3gyU0mKGys2taKecj/d1C+rJSplBqlTyAqgR+D8KjKlmRL2gtUcAdCtsL+ijCNT1oqqqkH2OHEbG5sDFnUg5Aa+yLou2VU1ptj1S2ZQqv1ORZN9IWzRfgaRBxKoBE8UWyqlJFtrIc0AxNjSjed99CTY/XDfSzCz5M0IZoVEsWnPFNTsl8ooVC1TzbGgqFZNDSgVwKK+1sGDMKqxZCWGVMDysiEr1jVSQJUYwj5iHOlThdHt44SQg9CN+nl8D90NMIgAdgr46JqRiR9I8vRdFvbr17m/yxUMKjNLMiVUADwu2CWGhhi+F55TWM9M9cogzms1dnM4uOF/LAEYWdcqnM7yFmyq3IfwmOROd7Y1iFWtOjoY8To41mTV5IysgFFuRzsbWFGbNIIJCDv1dOo4lZG7jWBwRFtVTKuWyeCByJKOan8oZ3ep9XddNl0tDuaywLz9cXPYeDAA0SpkBO9sbVcTOVWldPv4uyzEkzxHtjvonHoSkFEWNoo1d8DhcQputd2ppNon4BzoAiJ1hBFQg0dVtdbGHHDQWushmNEQukLM2QO1G2Y8bgTXqFhcBJj7EjPgcPts8US8qPpPB/dXznOh5Z438tzH5ec6QgrOKrRRfKmysBmUDB+PhYabMlVPER+GCSITTzr7am2tArH3bgcEzPJm+cr5jJ4NnHNFDVrFXcI5Le9k5Jnw+bedbV+FfRzZIHaOOaOsLY0/7UGs58DjrGwKMIMFIGzOEW1/jGsdAtCN6hEAI4hBe9YXeRROBSVPAVPAqvIM5bx5hVKWAMP6zBRy3iescridVdFBinBxXDnG2GRY2XbCvp1lhvGtO9Bxu5h908XQu42lnSArMFdizMim8uwRCxPGnnOS8lwpnbOiDqTAjsrRN/PcoAScCbaACqVM40ylnjjTBs+bwWlAG23/UKbdkiwKWIQPGzWaczpoSlxPEj822cNWkpS7FyzsDrqpfgpG3jahw2vgbaSQAxuLWZYt7JzyNe8JoZpNAcvDFOdw0wqYT9AK1rZz/DdbSlLPp0ryIxgQJlK9AZlEq7IOXpohg9PIhrCng88JsOxiV4ZWAYfg4sikx/8ky2Z9l862uqwrfscIH8+ugTmVGyiddeVYUgEMn4GZzg14EwIsh9sx2cKKiWXReuOE5gzGOQgdlRKVVdlevqb279Xq0Qnsts2VDaBO0coezsruWtHApu6sKG4IBhN0aGU2kLrMKGRTN3HmbCDwKV14zvkMEDG4QfZVspVlaNU2mhc5TEZ3N1h/zqTheuLpW05ZWTGVjb3dbnNmxKZBnN8JqidaVLKAOyARNLS+MB54Z2+VaqoMLKroVBlngefnTPAcoHNWCSvlfA8CI0HEmBNBnBlXyMrzU7A7WVm94PPqQ2gmqKx+WDGsnvilmcSOBJqOK1nYyAIzuAyesq3UdSK3KfWcYKD95HmfYOU3qser2CtYEUA+FpfqdNvgPBZUBhDrGONRVlQsh8rLcaUCykHG0OOUwTlLBrsh5soEMGezi1E4HRVt1icp5wZEFXdibCkG8Y8vX75sbO4E0iom9z+hjSiOfy3DhpXItpVhE+UGQdvoWjtChmrGHf4YAzKgBNnGtuJxFCeGdhUAfQLLK8kBYAP6gvFJZajMG3Xkycy8KuC0q4Eyymwtwdxdv2M0mIBtK0LKnf640j00Auq4gUkdWGlhs22qJc6dZCsL19oxnlTJG4SYVRIGpD8TPFBuM6OElbS1pldid4mGAyN6ZIupbC5bXJN9fdpbThSxLUaI8IG1XIYBxW3Tjs6KQosKcxfxcQmdnwRGM10GnFcCy2XYunLMyAkdgk4mePiczsLygthcBut6goOqS7YVFXADLjaosB6s6ofcZWAZSIRYqSUkizYwttYab3vUOQ9w2HRxIIg8WwRVeE68xi4UtL3zRphxplzwuZrcqYCq1I3jPI5dnJIygEohMbPqVJSzrwzxBJTs5zN+ReUSgxikPQVF3JVBeNQxbHENrEMNvEdFZVV9lH9+ORGEsNZQpyTNc4C3AG7XF4ngzq+DrO2zbuaaOXgdaFcdkEotoSFBVX2qJ0C8OWZeG4KGlpghA0XfTOPCqV2qqwQ26QWfF2PMLhI2w1lVAa2aPsYd0za25MQRwgcZN6uQDCi+ZxiD4XEM2kZxOT41FnZnaRlcpZouzlRqqdbQVWopQoSB58RV50lBNrHi/AwXS5LrwDVlpY3Fc3ByiYGc52Trist6kOXdwInAQtJpp5QchyaquYOV7Su+fxVMaV3dc0RE2S6mUY0gLt2pMcYqrKIQ9w2l1gpQUMtQYcmmbt5DTNxdhnUCjQqtbK9SUSzvrC0mmhhE1e2FS2+oxypy/ZASutkmtjx3vcBC24PX65nbqkBCRhfjS9kIYPnee8cMagVOhI/3T1fAmdtAWZsCswTJCkQVNa0qWKSKPOpHAUhD9DrbVcyoYkwqhvh17vYAayXLQyKGYdxlUDFp494rBXRjYgO17DDYetNIUj/ezp6S0lnlpEwsWmJMkOwsKXeZKEAjIHn0EQJISaRBcO6UMINz7p/bEjjnw4ft+xmDvksxX4G2rIris7qaeKwAFMP2Oi7n4criuZwtpSUwpfLxSnORSrIqusc5ZFaXysqRWjiZ2DyAWEIL35tVSoQElFACjOeGGSE7AHEQgdo/LSvCOgGBvkxsmDbvlS3Fp5vhaB2TAGqRKrKKMrhLVpaGzEVjZ0OQxDhaCTA+QyRR1d15aQzrJntL3RibsipjG6jlgL4yqbS0sNYg1e84vhbBVrElK64CUcWYXDfKxhpIuxiVJZUxsbMy/uRBKTNRQ4kQ3LdRYLS0rJjRPlTPqY6gdJsEDc+aQXAn+HgsNUCbRuF0Oj0zwnA7bWDkbhO5Ens00qeQhS1laBMl5M/cAaxsLF8rKyql+Tf7ELLEGu/ixiimdCvo0TjfpjKwaggen4eh5v7LokLKbLuyvHhcZG8dhGrEDx7Hg93ZppJF7qBqO3iVveXEDQNInzeoe8Yq6ePaZBZ2JviM3W2UAGotekRCAGq4EkF1X3DOnR11yRsBL1tRa0PVcZiNFXZ2c34FskvomInQQ6lzpJoZbJxk43NwKJFBquJSsrByHydxKOnTxQASBmS3j+JMnsHSla3Ec6K9VWoJVn9zfjwOM7hqYAAqJQwE2a3nA48J2QGegRkpZNivSY+ys3EkKd4oJIwsvIHl3cWgLt5k4NH6OmtLWdpurOkwEMupYc7eMtDRhOcI2ui5JhVIzXzLyto/GAPuZoyo8wkoduVgJglCt7OhGbgID4Mq4si+63zUS1FuFFXFlqyaj2emHlLMcBqYu0FMuR28BbB7lOxRMSiCQXFhCKuwkhZ+pYDiGSgbsKKV8MiSRsuHSIWM9rklRiIlZZuqXjsQK8ooYJMgq3JKWVkhHbhsVxFUzthOWPkYijcbx54IKsSdT+uLr3crGKyoYgFiGR9iBk4kfloUX+JIlQRQqabmpgnhqtpQpb6RVQ1WH5DnrS4hEoGZqaerQ2dhFbz8XePxShmDbo70eISjoorO2vK8SJXI4SUmEU4zWKDzUDtWTYw7xXlbSTEj4FRg7zKnKoGRALv0Gs9Tgc1BpCywGZRQAtqVz2xrBcAMzEpfZwFSa2G5W0QBFjSMapWAEFa3HcGN7CxDzECyIkJ97qwrqWNTWVo876PPsjPkj2wvgroM5lLZKMETKVql/CvnWVFiFa/SzJUQwkoZsr67Y6vlSRV3/2tmNTOY3vnaxYwMuoPKqdzR1w7IqHymlPxaAThfU7Ko2ZXYj4AYJHL+kNdKwRQYESTRa5fsUZ/rVC1TMTyWVyYoqNtuzaHsMyv2tvoarxdfqwYgU1axFo/cnql1FGsqK+uAROV8BX4GU8WcZTATi2q7Qcyi0O0V+GhWBMNRUkn8H1SsWVE5By3Gi0ECqUeJoBfAtDa4amkdXG37AGP5Ggeb84p7UazpoKRzdFzeQ8HkoHGxprKy/Hpm5t12p47J6xTYDEz7uINEXSuxYXvFskYAc+ySxH9sf5ftKzU6IbwVBcUGg5e5FMCEXSErZR0wGayV19woM9guPjTqJdVTqR4uE4nJnLldWVkECCZLd2VLF+xtamex7IpiriSDUpvrpn9lrwGMCHyppMH+ps6LILsuFGUj1XEOXiqbqSHPUKnClpWV68kqtURVNDY4TNaocykoYeTU5ngGEQa/S1DnnE4AeXMcKjHPAmFVjCBENaeyLVNHfr3px8xUstJ94hIpfH4HKE/eDaArK6lSyVVFbdt1gxTIVk3pppVlFXi4pEhVBTObquohU85MLXn1iahvUkHJjSCMc01tLFveVVBx0DodM6jftCu7DOtIzYxrc0qp1JGP2ayYFz2Gb6HvMrO8cnGtV6Gjm3uImSfD2GpWK6uowbZGMxFKQCo1pOMtcMXFpRst+hXGoAomF3sSTBGgTglbBKWwsQ3tZqaYSp0Z1CimRDWFcCJUPYJ00BI5FkKYNoifuQxmN88SWVXWLMaUqqqgC0BmQJR6sk3u9NCf6jYLXxAfqsYEgVLAhRY2AtgtflZNFmFyhxdrLkAdWlk4D88M2ixHyepIdhMHrG/iR1ZGtq0MGpbDbRPYOXeSY1M6Ny4ZstvGSktK+XbFPATj2D371saPEsAMXhXrsZ0km/XStkhhMyBfsa6uXFZe2VCe+YMr1+GKgwrQyNYq1VRrB+EizAow6NsdNKcyVEkYeM73ys6q4kAHp6BiFklTkIrVC5oYV7uzwOGCz4UJ0Stq2lWMJy4wtb+RetL6tZFicnJmBw5UjCvXXMZVJX2MQkbf+XN5EWd78Vz8/JEsMZTBiKNzsm1inLRUQ74H4NidaqI68j5sAFgxcRveC7ieLJXfQYxjZZ2CsiWFewZXJmBIlZ1tdtrX4hSuateKso/RZOtOKW2nmq1oTzeK6dRWAWu2NRVb4hq0SXm1GvtugHrbr5IXqmSktg5CuDE2MSlPwsY5kNE2Wp3AqiZbWVLAxiBF+2iBZbuNj6MB6rsMLC7FyasaYDyo7KkoPyEtw3pEMXfPvxAJi2jAQQgjrz0rLIZSWZlIoNhwd5xK4AR9mYNjWAaLrnuImJeBVN9zBORObVvbr+mTTfFSEJLSRnHo7hEJoIi8MFqjxmvgmF5URZz4zLFgZZ8Ctu2X7ggVccKm9gVxIsOHqxXgNMKnFWZYnf1dBnOhayXq17QwFlWW09eNKyVJFmXqaONGA5aCegMbJ3UUkGY1ic3nKWgjq8qfVYGQG1gRt6rs62a6HiqqUOqdesK5NmX4nGofJoiE1d0dF9lVVkvT1/kEEaaCoYOwFpcVcoLM+7669PxC9rWqktH0sWUYld0VCpuBZ/stVRcGgy9WX2+U1Qthi9SzAqSxzZsy+OiFzBYnySGV6Gku44rD8BCOZBV3BvD5+AKRHNwMEsB6EzHnJpkTAeiUlEGkcECeB6GDZTp5YEJTlvdrknxYjTllMkfNtXwDjM7uVjK5JXUUn43rrqpK2jytaxHW0M5G8DC8rtHMYs7KSgduVQMGTYFqFvVS6rkD3sDJ46afdYFwoq11AOKCBLhvwoUgc8IGANycR6knZrdJPdsuxnyjfd3FovTlRMdEdtOl5CMV5EHsXQBis7TOwvIDZaGj2Vnpbh7cpK63VwYEMLwqbjzyl699sawFFkF1yqjUU31HfC6sW1ZFVFuXVXVgz9keEaw0ys1lWfm+azQAQSWA+hKYVfsZjPncAcUB9oIayy/UZXRNckDGji77GsWbvBo6tPrWPqOyVkBUq+INeqpzNdYs/u0ifh5qmpqIW+33JVSUcwY70KL4U9lYdU6ljtSls7lmfi9g3YzeQfVkaGFaV3ODCnaD2N8wsEDFklE3RzM3ZghdYkWHsszq70FIecnKkVkt8ezMzRq9bkGuKojRLBVSod3Y1yPqKgYW7JRQTPVyy5xIYLjOgxgT52RKJUY1dOrIiRd4futQx/A5AcSmEjz0vFWrkLzvbWAu9HOWbGgxFk1VNTpnBKk6TgwisI/HcxYXP1uAWO72ULFlBTq+aSu2VTUs6hrxM2CF+hEor1VIA9ZmFUaab1lSSgZsVs4sxzHlVLoJHr9H4DhONTkI1XC0/wiY2NoWAG5RlnHFnq6oLccpQddMuJ/O17JVA5OHLi0BqCztq7Y1++ucCd98qLI8MIHBV/cKjxQTme3hFBS3MyCqnDsuym2o80HjvFFTtrURmNaGJsmVahImjTsUXKtQZTAVs7Mvv8/+fzUrZAXcLJ6M4koe6XP0b6SmWWNDzyUpQ8bl+LtWx4tuqZ36cRYV3yuVxPNwvIiqiQCSmu7srgTzR6nkyhpCarXwFy1vGd5iP2cY06lFr5Njhhg1Y6+NB28ftbK83s8rf7kLJbKwDFPbLg25a0AdZJEiqr5phixKMDlRUtcssq1hriLqGoH+zeNgVm9OemjsETV8JdF0NHnkIFxWY1OB4Yrp7rtWJ7NgAAAPXklEQVQ3oNs5nplyVf8u2FoLu1JrHveaZWQjqAkshtFa2gzsSG3Zpkbvg3HafF9slPPlldjFlK80Gysm8Mr4MPhneNWENPGjAIpmilTPATdTRTXlCBYHYAQuPwA36xIpWtGN4q3Y2MhiGsUpuSSnlEJRD8PorC7CFYVw+F51qThgabxsTxWzCGY0ZSsb3lfqAy0OPNjNy8xiQQKsHYFQ2HBZVvVbBuq3m1oWKajqaonsM6uZUr6CjXWNZ0l5E3h3jURma6kP3MJIiy1Lm+kahQq41N2iZja5sjtlLYNZHZrH6qUGm4vMbDp6Rw2CFmvuyFkrBcCyMtFqBaECmsHoK9BZ2LA/lJcRqSaDqnaWbrZdGaz3DLgIvBln4woGztbyJGqslwxkhhHrTjTYFXCtOoKS8uLdofVdAbOylGU6nlYpXWZts4nXBq6WxJitMNokHUJnbnJplQm+aGpY2a5GMV2QD1hRubBPFKdumf5OHkLHz0F9luE5kjBjRa0nFE5CUGqHw32MmjZ6xkgINVnSnZ1VZStK2qKlRaLlQgK7uTq7JFXJwM+3SOEKyhZNI+tJ0I5qMYy9k2qJD7dVWdqKXa0CKNR0Ccjg+B2IYu2fcBZJZkMFgM11r0X92wilghFGgzVnexlqB7xL9mS29SiYUVY2nXOZjNBRsyDsQPRWW5hrZ4XcdC4HVWRbjgJr4sFofK5SzjQ7rhI1UebdPdEbj6sqIvTZQZ5va08rABsAW0UxeWytAk7A2KJ9ZpxzCioB24XFtYAeXYxr6anSqhLgppEqWbGwLunTgrV+IjWlL29ljaAl4EQMGsErp4apeZiquwRXLXAqOCeru32mmydc6oWTSWpFAGdzeTB8RTHVMEtlM90CbbQCYhPjq3egYr1FGdYIQjiuDGZ5zZ/AzobKGOyLxti6c4Rwtv2anyWlLICnlLhxJRXt6A5ebDBWFNONbxWZ2d02mnu4S9YECpeppV1zSWRBWxHYzVIv1CXSouwqqX3jBBBDZdYQbpTQW4ZQlS8r5kH4suSRmg2++3JN10x1PaAmEkmtYlEdeGpJEM6kOuCqCR22oSujj5IV2HdT0zj5prLKTjXFAPjdQlyq7xIBxAQP5yMczG4VxAKw0n6ilZ2QBce2pLulkuxxqnoIzFfgqyqjil9S1VNwBrFmeyeops8yOjZUybZdfS8CuaTIJumzs5tODaNtLpFDQ/PcJGweLhmeL1nB0KqiUDScsiUVD89Di3HtrKtSULw3RLiygZD+7sF8JTObgYsrGvDNUFRGl1iy0Ll1YkUc2aJYMog920I8qW6YDCg1Mqk0JHJFKXkbgbRreI+qpYNOZHrVcDUba7pjsphSJNtK6upgRNAVoOS0mugBeN4bIZgHhuPZ/s1ENaX6KsVr+YNrh1Nb7ipR0PE5zbNRegCbrHRUw6Yf07dLBJl1f8KB9as2V1nNqAsl62LBBhehwalerkHmB1JFIEZKSEusdl5JQj1nJlHXSCF342gJ9CYGrXelknJIXqVP8sD+qtplCR3XH2qfKq0ygMp+KnVkKxNlZ8m2YkIlVMiCnXUwl7qznBKSvQz3m3Pt6oQbXO5b5FixCh/fHxUQW/AEcK6zCNqKQnL9sywqmKuwvqSYzT/aPVNNpVyhvRW21aqciCsjdWvBwILUvh5VyCzbWoC1pJjJ680CWsl+udKB6T5RwG1mlohnlpbg47iz5U9ha0FGtmRLFYBtO99y97Ap0z+ZDTAog6kSLZsMHg/IFkkgp6CpvU2U0cYVSdnmkjwBdOmXbxTWNWzuIbipMioVxEckZEoahSOiy2M3K0jcC1LhVDwaqG0ZvkcWqCnrG4GIxykrqlbWdw6LQyBaZR8HmLRIhQWsHswD42ZXVLNkf9l+FlW0HVQ2lwFsC/Z1FdzlQR0KaPfo+Fdfu+/dwVRICu1CGR7AEIiAhc+AZUF0kOBaPxmUqg4i64vQnU4nFDYJ9Nz+1fVXveH9qmr+kPILx8oKcRV/BFbxbE0JMT0kSD4w6L/lNY8ocsqagVdU3A3MjxhxcGuqzsPH4irpaow1q6OyrVjvp9Npc59E91LldboYVzJWdimWfAW2SNEKcDaX2FmBLLA/uKxlmhh613Is1URQApbKfttwxL02q6Onx5pQxSbPojAg+v5hAnN6LHVRDXIsvKtRjiS0qJUyZTAXVbAK82ElFJWaQdVoqUC1Unt7BVaTQudM6SuqexjQJN4+0icaxv/utbKv83ETbT8H8gjcOKxOJmbUa6OOVXht3dFY6rHv9XoNzFLceEA1o8+pKm0LAHPHZ2rYKjFq0hfZFixsqHJgD3eD5n+U0kb1mFjXkn2lvMSSOsNE/CdIAKF0Sytq6urOHUN5gwg4GZosgbmggM5ucra2qrS2Ig1cbiBBcxYzgzUDNLCvL8GbZXNp6ORy3LmS+Kk83zRIAK6A1ioKa2I9NapIuiUFdfC9766PFZUtqUr6KbWk+zZU1a/ZrIXEztrjTOfz7hwKziCeXIaraHtbZIMz+2pGgazCmw4qWAFvEdhodYp0Xq0pV7G1YWYWbO4qhGq42+Z8BYtrLWvluNPpZAeaFFS1vubPgbgxsqcpnAaszBovKaFoDQ8BGtjfUOl4NAG2nmQV04feJgumvX2fsrQEWZghL0JnVdYkn3DOZIeRN86RqPWCmsvGVqEMRnwxQAxwS8EMYo3IzmY2+BCcLp4MKiuyuhImamlbZFcNoNl7tp+RHd18ZjQIRKyXdFRhN98/hyKqwXWNo7O1wiaXoHN108REZZWEq6grnIfjzeg8jdRf1XEL4kkXa5bBjKxoKaljBjeHlVxQ4GaycpW4lDOAKtnTxHAtOfzOtZwHAM7sqVXkV6yu6kap1nHkXKqWF/4XHqjenNKqBjpR3l1ch3Ejg1+EsgdQhsdG0B4FM9sWAVWpuAyiwTPleZxt9VyZVS2qXfReWqTAilpr9ApoWTjxymit7NwV4JTriZyOA9B0k7HFfULourmKYHVnRQvqGL5HMHdqFcR2qWpmcK6eTwx2dipWrviDilr+fKWq3OWRWdHKwA4eu8wjchbeRzFilqjjZN3ufCpfkJ0/scVpnYk6L0PI77lxdWCZ87WiWm7B/AGquQSnujGKsB8CJmiJq8q1pKIVWyqOiTK66r18BN8r74/AE71fdC3yPS2MxdOpnE1tlVxD9JmVOoggN+r4PjAXVFPa3Eg5jVJGFVUGNolH20GVrUB7BOySWq6WqYQdWR92pcFMYMwckbSgCKCqD67DiiWu1g8MQC9ByfcFqW1L+jL714qNCuznoSxt0da2gtWN1G8F0BK0NN0nuimelUF9dIdAfjO44UT3CjQLoUeLHJFTO3gmpRuIIOvwBQCbqNeo3qtZ9iF6xVK13GRlo4zqimq+CGdTiR1uRY8oqgE02hZBa79kZXPMquxRHKla2saZWN4mRqZUj0vLCKhkjKnqOQHNuSZVJoKvAqS1wpEquvWDC1B2ypwrCPsRMEPVTODMLJMDv6qeKXwi2JYV5Sq4qKyvgGsHCLiuj2jR59V8gMqSJ2FJZRXEHVRHj3sFPrct6OpqlW1GpatQdt0GvwfM6n63InsGVFhJGaBqgqqIV6IsXllZgySPq4R3bnt3wi5cv+cN2yqQLW1T95KYVsWWtKk4cB9W53WQQflQYR6Wl4HaJZjvVE0D5yvq+RKgZCs5qdBEP5sD94cAvQLlSgNaSMAtHx88BuNQ41zdFsX30zKbcs0MLD/ihkpQzl0wiTqKLTfbKmCmyYICnK0IbaieC4CG9iSyLQ7cIMGQwau6TKoq60Apl3WN40LZpca1CKKK9VQyyIEn8w0F8F6CL2h8o3ixGwC7s7EWzCOqmcApYxYD4jsAzVS0sl2t98pA7vrKophCVSonbYpgH6mvSn24pTBV4sdtV3BtMq5k82y+IADvUJ0uAlkCVTxIaPm+UNu/qkV4F1TzHXCGrXIAqItBKypqK99VtAOVs64O4ObX7pHLVCpYHcRmwvLR7TvYAKBBN58LGVzDuFz+hQbWgncQyCZAk+VbsPSouf93261iZgmfCpwRbAvqmSqriU2PwhjaoOyYqtIegVXViTsmyta6bGySpY3gyRrpIyAeaWDDxtpsXwKyalMDKNP7YBXMqEskUsi2uC8FNAPxAKTVfT1o6VzM0E0jF+1rWcUuHvdyg7vgoFplX8HpvHpMCOMRUPHzZkInsqlFKNX/EIO52E0SxSzOwob2VmRLW5D1XIU0rbgM1AzWgyC7fe8G7xUAK/taEBat7luqtyP7EmsaJQOj5F+mrnZfCuYCfBUAWwShyd6pMY/vAHG1UqOYpbI/gy5T0CMKm+UO3gFuC85dgfDVeguPDfITrIBLsLrcgdh3CFgFZjaKJ4Iv3F8ANEqvuxR1tVKOgLoCa1jxboBAkj6v7j/icFbA7f4rfRnQDLRViG13i0vqBQrYVqBbADZT0ZpiHoSzvQpopKIFS3sE1HfBWlHXd0H7LnArqvougMtljHBgZnh3Eoz/BKjLML4Z2Aq0+hEJr9jaVUBbvNzCIUiroC7AWmmFw4o5AK3MtB5VypZMSFgs05JyGVwlwBqsEGAAa2ZU1CjUexXGsE4rKriilBvFzOKKo3AuAroE6QFQU3u8YpNXwS5k+1TZt5UrwouN4KiUEw+k3ZWDp1RXHNRqXb21Ts39945yZSg3VnZFNQ9CF3XeZyr5DgBXKiwCMa2MxeTDYXgP1Fsf9QNKZc0k81RJk3r6EQ3rCmBVyLL75EjZ1pIVDHoFtiOAHoB0BdTVylqBsKKKS+AeBXJVLY+CXASuGvO/Auq7GuEjDfGKg1oKa1z/dmmi9I9SUGNhl0AtfulHAawoYrnSkmNXAVuGEhrEVXvUF+A5Ct2PqNOjDetyna4CmeUolmeXLN4Aq7C5Sj10Q7yjgl+t6CNxSRHmI5X+CpwreYB3Qfdqna4q21KdBuc4GoZsn49ZOOiVinwHqK9WzjvgeweEh2AU5+vtxZ9Cd9Wqkh49V18E5oj6vVyn0RStAyGIO5edXRKd5B0VGVXq2yr3xYp+5Ut+C4QJ4P1N339pQMjRejj4vb/Dcr6rQc3O/0rjmtZpeYCBiCHfCemRbNhbK/pNUPc3wfKy5f2D7OlL3/uPhve/oU4T0F8f+VNM2vyoiv0jK+KHQfdHq+0bncz4oz73/+Y6LbKw1o/5B7eOf1Rl/0du9B9tn/9bvrf/j+v0h6ttn2tp/r/4819y4/zv5391uvzzfwDifz6phT1MPgAAAABJRU5ErkJggg==");background-size:100% 100%;border:none;cursor:pointer;direction:ltr;height:130px;touch-action:manipulation;width:100%}.color-picker .cp-add-color-button-class{background:transparent;border:0;cursor:pointer;display:inline;margin:3px -3px;padding:0;position:absolute}.color-picker .cp-add-color-button-class:hover{text-decoration:underline}.color-picker .cp-add-color-button-class:disabled{color:#999;cursor:not-allowed}.color-picker .cp-add-color-button-class:disabled:hover{text-decoration:none}.color-picker .cp-remove-color-button-class{background:#fff;border-radius:50%;box-shadow:1px 1px 5px #333;cursor:pointer;display:block;height:10px;position:absolute;right:-5px;text-align:center;top:-5px;width:10px}.color-picker .cp-remove-color-button-class:before{bottom:3.5px;content:"x";display:inline-block;font-size:10px;position:relative}'],encapsulation:2}),t})(),mv=(()=>{class t{constructor(t,e,i,n,s,o){this.injector=t,this.cfr=e,this.appRef=i,this.vcRef=n,this.elRef=s,this._service=o,this.dialogCreated=!1,this.ignoreChanges=!1,this.viewAttachedToAppRef=!1,this.cpWidth="230px",this.cpHeight="auto",this.cpToggle=!1,this.cpDisabled=!1,this.cpIgnoredElements=[],this.cpFallbackColor="",this.cpColorMode="color",this.cpCmykEnabled=!1,this.cpOutputFormat="auto",this.cpAlphaChannel="enabled",this.cpDisableInput=!1,this.cpDialogDisplay="popup",this.cpSaveClickOutside=!0,this.cpCloseClickOutside=!0,this.cpUseRootViewContainer=!1,this.cpPosition="auto",this.cpPositionOffset="0%",this.cpPositionRelativeToArrow=!1,this.cpOKButton=!1,this.cpOKButtonText="OK",this.cpOKButtonClass="cp-ok-button-class",this.cpCancelButton=!1,this.cpCancelButtonText="Cancel",this.cpCancelButtonClass="cp-cancel-button-class",this.cpPresetLabel="Preset colors",this.cpPresetColorsClass="cp-preset-colors-class",this.cpMaxPresetColorsLength=6,this.cpPresetEmptyMessage="No colors added",this.cpPresetEmptyMessageClass="preset-empty-message",this.cpAddColorButton=!1,this.cpAddColorButtonText="Add color",this.cpAddColorButtonClass="cp-add-color-button-class",this.cpRemoveColorButtonClass="cp-remove-color-button-class",this.cpInputChange=new r.o(!0),this.cpToggleChange=new r.o(!0),this.cpSliderChange=new r.o(!0),this.cpSliderDragEnd=new r.o(!0),this.cpSliderDragStart=new r.o(!0),this.colorPickerOpen=new r.o(!0),this.colorPickerClose=new r.o(!0),this.colorPickerCancel=new r.o(!0),this.colorPickerSelect=new r.o(!0),this.colorPickerChange=new r.o(!1),this.cpCmykColorChange=new r.o(!0),this.cpPresetColorsChange=new r.o(!0)}handleClick(){this.inputFocus()}handleFocus(){this.inputFocus()}handleInput(t){this.inputChange(t)}ngOnDestroy(){null!=this.cmpRef&&(this.viewAttachedToAppRef&&this.appRef.detachView(this.cmpRef.hostView),this.cmpRef.destroy(),this.cmpRef=null,this.dialog=null)}ngOnChanges(t){t.cpToggle&&!this.cpDisabled&&(t.cpToggle.currentValue?this.openDialog():t.cpToggle.currentValue||this.closeDialog()),t.colorPicker&&(this.dialog&&!this.ignoreChanges&&("inline"===this.cpDialogDisplay&&this.dialog.setInitialColor(t.colorPicker.currentValue),this.dialog.setColorFromString(t.colorPicker.currentValue,!1),this.cpUseRootViewContainer&&"inline"!==this.cpDialogDisplay&&this.cmpRef.changeDetectorRef.detectChanges()),this.ignoreChanges=!1),(t.cpPresetLabel||t.cpPresetColors)&&this.dialog&&this.dialog.setPresetConfig(this.cpPresetLabel,this.cpPresetColors)}openDialog(){if(this.dialogCreated)this.dialog&&this.dialog.openDialog(this.colorPicker);else{let t=this.vcRef;if(this.dialogCreated=!0,this.viewAttachedToAppRef=!1,this.cpUseRootViewContainer&&"inline"!==this.cpDialogDisplay){const e=this.injector.get(this.appRef.componentTypes[0],r.t.NULL);e!==r.t.NULL?(t=e.vcRef||e.viewContainerRef||this.vcRef,t===this.vcRef&&console.warn("You are using cpUseRootViewContainer, but the root component is not exposing viewContainerRef!Please expose it by adding 'public vcRef: ViewContainerRef' to the constructor.")):this.viewAttachedToAppRef=!0}const e=this.cfr.resolveComponentFactory(fv);if(this.viewAttachedToAppRef)this.cmpRef=e.create(this.injector),this.appRef.attachView(this.cmpRef.hostView),document.body.appendChild(this.cmpRef.hostView.rootNodes[0]);else{const i=r.G.fromResolvedProviders([],t.parentInjector);this.cmpRef=t.createComponent(e,0,i,[])}this.cmpRef.instance.setupDialog(this,this.elRef,this.colorPicker,this.cpWidth,this.cpHeight,this.cpDialogDisplay,this.cpFallbackColor,this.cpColorMode,this.cpCmykEnabled,this.cpAlphaChannel,this.cpOutputFormat,this.cpDisableInput,this.cpIgnoredElements,this.cpSaveClickOutside,this.cpCloseClickOutside,this.cpUseRootViewContainer,this.cpPosition,this.cpPositionOffset,this.cpPositionRelativeToArrow,this.cpPresetLabel,this.cpPresetColors,this.cpPresetColorsClass,this.cpMaxPresetColorsLength,this.cpPresetEmptyMessage,this.cpPresetEmptyMessageClass,this.cpOKButton,this.cpOKButtonClass,this.cpOKButtonText,this.cpCancelButton,this.cpCancelButtonClass,this.cpCancelButtonText,this.cpAddColorButton,this.cpAddColorButtonClass,this.cpAddColorButtonText,this.cpRemoveColorButtonClass,this.elRef),this.dialog=this.cmpRef.instance,this.vcRef!==t&&this.cmpRef.changeDetectorRef.detectChanges()}}closeDialog(){this.dialog&&"popup"===this.cpDialogDisplay&&this.dialog.closeDialog()}cmykChanged(t){this.cpCmykColorChange.emit(t)}stateChanged(t){this.cpToggleChange.emit(t),t?this.colorPickerOpen.emit(this.colorPicker):this.colorPickerClose.emit(this.colorPicker)}colorChanged(t,e=!0){this.ignoreChanges=e,this.colorPickerChange.emit(t)}colorSelected(t){this.colorPickerSelect.emit(t)}colorCanceled(){this.colorPickerCancel.emit()}inputFocus(){const t=this.elRef.nativeElement,e=this.cpIgnoredElements.filter(e=>e===t);this.cpDisabled||e.length||("undefined"!=typeof document&&t===document.activeElement?this.openDialog():this.dialog&&this.dialog.show?this.closeDialog():this.openDialog())}inputChange(t){this.dialog?this.dialog.setColorFromString(t.target.value,!0):(this.colorPicker=t.target.value,this.colorPickerChange.emit(this.colorPicker))}inputChanged(t){this.cpInputChange.emit(t)}sliderChanged(t){this.cpSliderChange.emit(t)}sliderDragEnd(t){this.cpSliderDragEnd.emit(t)}sliderDragStart(t){this.cpSliderDragStart.emit(t)}presetColorsChanged(t){this.cpPresetColorsChange.emit(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.t),r.Pb(r.j),r.Pb(r.g),r.Pb(r.S),r.Pb(r.l),r.Pb(pv))},t.\u0275dir=r.Kb({type:t,selectors:[["","colorPicker",""]],hostBindings:function(t,e){1&t&&r.cc("click",function(){return e.handleClick()})("focus",function(){return e.handleFocus()})("input",function(t){return e.handleInput(t)})},inputs:{cpWidth:"cpWidth",cpHeight:"cpHeight",cpToggle:"cpToggle",cpDisabled:"cpDisabled",cpIgnoredElements:"cpIgnoredElements",cpFallbackColor:"cpFallbackColor",cpColorMode:"cpColorMode",cpCmykEnabled:"cpCmykEnabled",cpOutputFormat:"cpOutputFormat",cpAlphaChannel:"cpAlphaChannel",cpDisableInput:"cpDisableInput",cpDialogDisplay:"cpDialogDisplay",cpSaveClickOutside:"cpSaveClickOutside",cpCloseClickOutside:"cpCloseClickOutside",cpUseRootViewContainer:"cpUseRootViewContainer",cpPosition:"cpPosition",cpPositionOffset:"cpPositionOffset",cpPositionRelativeToArrow:"cpPositionRelativeToArrow",cpOKButton:"cpOKButton",cpOKButtonText:"cpOKButtonText",cpOKButtonClass:"cpOKButtonClass",cpCancelButton:"cpCancelButton",cpCancelButtonText:"cpCancelButtonText",cpCancelButtonClass:"cpCancelButtonClass",cpPresetLabel:"cpPresetLabel",cpPresetColorsClass:"cpPresetColorsClass",cpMaxPresetColorsLength:"cpMaxPresetColorsLength",cpPresetEmptyMessage:"cpPresetEmptyMessage",cpPresetEmptyMessageClass:"cpPresetEmptyMessageClass",cpAddColorButton:"cpAddColorButton",cpAddColorButtonText:"cpAddColorButtonText",cpAddColorButtonClass:"cpAddColorButtonClass",cpRemoveColorButtonClass:"cpRemoveColorButtonClass",colorPicker:"colorPicker",cpPresetColors:"cpPresetColors"},outputs:{cpInputChange:"cpInputChange",cpToggleChange:"cpToggleChange",cpSliderChange:"cpSliderChange",cpSliderDragEnd:"cpSliderDragEnd",cpSliderDragStart:"cpSliderDragStart",colorPickerOpen:"colorPickerOpen",colorPickerClose:"colorPickerClose",colorPickerCancel:"colorPickerCancel",colorPickerSelect:"colorPickerSelect",colorPickerChange:"colorPickerChange",cpCmykColorChange:"cpCmykColorChange",cpPresetColorsChange:"cpPresetColorsChange"},exportAs:["ngxColorPicker"],features:[r.Bb]}),t})(),gv=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[pv],imports:[[Et]]}),t})();var Av=i("2Vo4");const bv=(()=>{function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t})();var vv=i("EQ5u");function _v(t,e){let i=!1;return arguments.length>=2&&(i=!0),function(n){return n.lift(new yv(t,e,i))}}class yv{constructor(t,e,i=!1){this.accumulator=t,this.seed=e,this.hasSeed=i}call(t,e){return e.subscribe(new wv(t,this.accumulator,this.seed,this.hasSeed))}}class wv extends Ee.a{constructor(t,e,i,n){super(t),this.accumulator=e,this._seed=i,this.hasSeed=n,this.index=0}get seed(){return this._seed}set seed(t){this.hasSeed=!0,this._seed=t}_next(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)}_tryNext(t){const e=this.index++;let i;try{i=this.accumulator(this.seed,t,e)}catch(n){this.destination.error(n)}this.seed=i,this.destination.next(i)}}function xv(t){return function(e){return 0===t?Ye():e.lift(new Cv(t))}}class Cv{constructor(t){if(this.total=t,this.total<0)throw new We}call(t,e){return e.subscribe(new Sv(t,this.total))}}class Sv extends Ee.a{constructor(t,e){super(t),this.total=e,this.ring=new Array,this.count=0}_next(t){const e=this.ring,i=this.total,n=this.count++;e.length<i?e.push(t):e[n%i]=t}_complete(){const t=this.destination;let e=this.count;if(e>0){const i=this.count>=this.total?this.total:this.count,n=this.ring;for(let r=0;r<i;r++){const r=e++%i;t.next(n[r])}}t.complete()}}function kv(t=Iv){return e=>e.lift(new Ev(t))}class Ev{constructor(t){this.errorFactory=t}call(t,e){return e.subscribe(new Dv(t,this.errorFactory))}}class Dv extends Ee.a{constructor(t,e){super(t),this.errorFactory=e,this.hasValue=!1}_next(t){this.hasValue=!0,this.destination.next(t)}_complete(){if(this.hasValue)return this.destination.complete();{let t;try{t=this.errorFactory()}catch($nt){t=$nt}this.destination.error(t)}}}function Iv(){return new bv}function Pv(t=null){return e=>e.lift(new Ov(t))}class Ov{constructor(t){this.defaultValue=t}call(t,e){return e.subscribe(new Mv(t,this.defaultValue))}}class Mv extends Ee.a{constructor(t,e){super(t),this.defaultValue=e,this.isEmpty=!0}_next(t){this.isEmpty=!1,this.destination.next(t)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}var Tv=i("SpAZ");function Rv(t,e){const i=arguments.length>=2;return n=>n.pipe(t?He((e,i)=>t(e,i,n)):Tv.a,Qe(1),i?Pv(e):kv(()=>new bv))}var Vv=i("x+ZX");class Fv{constructor(t,e){this.id=t,this.url=e}}class Lv extends Fv{constructor(t,e,i="imperative",n=null){super(t,e),this.navigationTrigger=i,this.restoredState=n}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class Uv extends Fv{constructor(t,e,i){super(t,e),this.urlAfterRedirects=i}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class Bv extends Fv{constructor(t,e,i){super(t,e),this.reason=i}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class Nv extends Fv{constructor(t,e,i){super(t,e),this.error=i}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class jv extends Fv{constructor(t,e,i,n){super(t,e),this.urlAfterRedirects=i,this.state=n}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class zv extends Fv{constructor(t,e,i,n){super(t,e),this.urlAfterRedirects=i,this.state=n}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Hv extends Fv{constructor(t,e,i,n,r){super(t,e),this.urlAfterRedirects=i,this.state=n,this.shouldActivate=r}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class Kv extends Fv{constructor(t,e,i,n){super(t,e),this.urlAfterRedirects=i,this.state=n}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class $v extends Fv{constructor(t,e,i,n){super(t,e),this.urlAfterRedirects=i,this.state=n}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Gv{constructor(t){this.route=t}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class Wv{constructor(t){this.route=t}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Zv{constructor(t){this.snapshot=t}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class qv{constructor(t){this.snapshot=t}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Yv{constructor(t){this.snapshot=t}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Qv{constructor(t){this.snapshot=t}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Xv{constructor(t,e,i){this.routerEvent=t,this.position=e,this.anchor=i}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}class Jv{constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e[0]:e}return null}getAll(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}}function t_(t){return new Jv(t)}function e_(t){const e=Error("NavigationCancelingError: "+t);return e.ngNavigationCancelingError=!0,e}function i_(t,e,i){const n=i.path.split("/");if(n.length>t.length)return null;if("full"===i.pathMatch&&(e.hasChildren()||n.length<t.length))return null;const r={};for(let s=0;s<n.length;s++){const e=n[s],i=t[s];if(e.startsWith(":"))r[e.substring(1)]=i;else if(e!==i.path)return null}return{consumed:t.slice(0,n.length),posParams:r}}function n_(t,e){const i=t?Object.keys(t):void 0,n=e?Object.keys(e):void 0;if(!i||!n||i.length!=n.length)return!1;let r;for(let s=0;s<i.length;s++)if(r=i[s],!r_(t[r],e[r]))return!1;return!0}function r_(t,e){if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;const i=[...t].sort(),n=[...e].sort();return i.every((t,e)=>n[e]===t)}return t===e}function s_(t){return Array.prototype.concat.apply([],t)}function o_(t){return t.length>0?t[t.length-1]:null}function a_(t,e){for(const i in t)t.hasOwnProperty(i)&&e(t[i],i)}function l_(t){return Object(r.tb)(t)?t:Object(r.ub)(t)?Object(On.a)(Promise.resolve(t)):Se(t)}function c_(t,e,i){return i?function(t,e){return n_(t,e)}(t.queryParams,e.queryParams)&&h_(t.root,e.root):function(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every(i=>r_(t[i],e[i]))}(t.queryParams,e.queryParams)&&u_(t.root,e.root)}function h_(t,e){if(!g_(t.segments,e.segments))return!1;if(t.numberOfChildren!==e.numberOfChildren)return!1;for(const i in e.children){if(!t.children[i])return!1;if(!h_(t.children[i],e.children[i]))return!1}return!0}function u_(t,e){return d_(t,e,e.segments)}function d_(t,e,i){if(t.segments.length>i.length)return!!g_(t.segments.slice(0,i.length),i)&&!e.hasChildren();if(t.segments.length===i.length){if(!g_(t.segments,i))return!1;for(const i in e.children){if(!t.children[i])return!1;if(!u_(t.children[i],e.children[i]))return!1}return!0}{const n=i.slice(0,t.segments.length),r=i.slice(t.segments.length);return!!g_(t.segments,n)&&!!t.children.primary&&d_(t.children.primary,e,r)}}class p_{constructor(t,e,i){this.root=t,this.queryParams=e,this.fragment=i}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=t_(this.queryParams)),this._queryParamMap}toString(){return v_.serialize(this)}}class f_{constructor(t,e){this.segments=t,this.children=e,this.parent=null,a_(e,(t,e)=>t.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return __(this)}}class m_{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=t_(this.parameters)),this._parameterMap}toString(){return E_(this)}}function g_(t,e){return t.length===e.length&&t.every((t,i)=>t.path===e[i].path)}class A_{}class b_{parse(t){const e=new M_(t);return new p_(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){var e;return`/${y_(t.root,!0)}${function(t){const e=Object.keys(t).map(e=>{const i=t[e];return Array.isArray(i)?i.map(t=>`${x_(e)}=${x_(t)}`).join("&"):`${x_(e)}=${x_(i)}`});return e.length?`?${e.join("&")}`:""}(t.queryParams)}${"string"==typeof t.fragment?`#${e=t.fragment,encodeURI(e)}`:""}`}}const v_=new b_;function __(t){return t.segments.map(t=>E_(t)).join("/")}function y_(t,e){if(!t.hasChildren())return __(t);if(e){const e=t.children.primary?y_(t.children.primary,!1):"",i=[];return a_(t.children,(t,e)=>{"primary"!==e&&i.push(`${e}:${y_(t,!1)}`)}),i.length>0?`${e}(${i.join("//")})`:e}{const e=function(t,e){let i=[];return a_(t.children,(t,n)=>{"primary"===n&&(i=i.concat(e(t,n)))}),a_(t.children,(t,n)=>{"primary"!==n&&(i=i.concat(e(t,n)))}),i}(t,(e,i)=>"primary"===i?[y_(t.children.primary,!1)]:[`${i}:${y_(e,!1)}`]);return 1===Object.keys(t.children).length&&null!=t.children.primary?`${__(t)}/${e[0]}`:`${__(t)}/(${e.join("//")})`}}function w_(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function x_(t){return w_(t).replace(/%3B/gi,";")}function C_(t){return w_(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function S_(t){return decodeURIComponent(t)}function k_(t){return S_(t.replace(/\+/g,"%20"))}function E_(t){return`${C_(t.path)}${e=t.parameters,Object.keys(e).map(t=>`;${C_(t)}=${C_(e[t])}`).join("")}`;var e}const D_=/^[^\/()?;=#]+/;function I_(t){const e=t.match(D_);return e?e[0]:""}const P_=/^[^=?&#]+/,O_=/^[^?&#]+/;class M_{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new f_([],{}):new f_([],this.parseChildren())}parseQueryParams(){const t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(i.primary=new f_(t,e)),i}parseSegment(){const t=I_(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);return this.capture(t),new m_(S_(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=I_(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const t=I_(this.remaining);t&&(i=t,this.capture(i))}t[S_(e)]=S_(i)}parseQueryParam(t){const e=function(t){const e=t.match(P_);return e?e[0]:""}(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const t=function(t){const e=t.match(O_);return e?e[0]:""}(this.remaining);t&&(i=t,this.capture(i))}const n=k_(e),r=k_(i);if(t.hasOwnProperty(n)){let e=t[n];Array.isArray(e)||(e=[e],t[n]=e),e.push(r)}else t[n]=r}parseParens(t){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const i=I_(this.remaining),n=this.remaining[i.length];if("/"!==n&&")"!==n&&";"!==n)throw new Error(`Cannot parse url '${this.url}'`);let r;i.indexOf(":")>-1?(r=i.substr(0,i.indexOf(":")),this.capture(r),this.capture(":")):t&&(r="primary");const s=this.parseChildren();e[r]=1===Object.keys(s).length?s.primary:new f_([],s),this.consumeOptional("//")}return e}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)}capture(t){if(!this.consumeOptional(t))throw new Error(`Expected "${t}".`)}}class T_{constructor(t){this._root=t}get root(){return this._root.value}parent(t){const e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}children(t){const e=R_(t,this._root);return e?e.children.map(t=>t.value):[]}firstChild(t){const e=R_(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=V_(t,this._root);return e.length<2?[]:e[e.length-2].children.map(t=>t.value).filter(e=>e!==t)}pathFromRoot(t){return V_(t,this._root).map(t=>t.value)}}function R_(t,e){if(t===e.value)return e;for(const i of e.children){const e=R_(t,i);if(e)return e}return null}function V_(t,e){if(t===e.value)return[e];for(const i of e.children){const n=V_(t,i);if(n.length)return n.unshift(e),n}return[]}class F_{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}}function L_(t){const e={};return t&&t.children.forEach(t=>e[t.value.outlet]=t),e}class U_ extends T_{constructor(t,e){super(t),this.snapshot=e,K_(this,t)}toString(){return this.snapshot.toString()}}function B_(t,e){const i=function(t,e){const i=new z_([],{},{},"",{},"primary",e,null,t.root,-1,{});return new H_("",new F_(i,[]))}(t,e),n=new Av.a([new m_("",{})]),r=new Av.a({}),s=new Av.a({}),o=new Av.a({}),a=new Av.a(""),l=new N_(n,r,o,a,s,"primary",e,i.root);return l.snapshot=i.root,new U_(new F_(l,[]),i)}class N_{constructor(t,e,i,n,r,s,o,a){this.url=t,this.params=e,this.queryParams=i,this.fragment=n,this.data=r,this.outlet=s,this.component=o,this._futureSnapshot=a}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(Object(Ge.a)(t=>t_(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(Object(Ge.a)(t=>t_(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function j_(t,e="emptyOnly"){const i=t.pathFromRoot;let n=0;if("always"!==e)for(n=i.length-1;n>=1;){const t=i[n],e=i[n-1];if(t.routeConfig&&""===t.routeConfig.path)n--;else{if(e.component)break;n--}}return function(t){return t.reduce((t,e)=>({params:Object.assign(Object.assign({},t.params),e.params),data:Object.assign(Object.assign({},t.data),e.data),resolve:Object.assign(Object.assign({},t.resolve),e._resolvedData)}),{params:{},data:{},resolve:{}})}(i.slice(n))}class z_{constructor(t,e,i,n,r,s,o,a,l,c,h){this.url=t,this.params=e,this.queryParams=i,this.fragment=n,this.data=r,this.outlet=s,this.component=o,this.routeConfig=a,this._urlSegment=l,this._lastPathIndex=c,this._resolve=h}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=t_(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=t_(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(t=>t.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class H_ extends T_{constructor(t,e){super(e),this.url=t,K_(this,e)}toString(){return $_(this._root)}}function K_(t,e){e.value._routerState=t,e.children.forEach(e=>K_(t,e))}function $_(t){const e=t.children.length>0?` { ${t.children.map($_).join(", ")} } `:"";return`${t.value}${e}`}function G_(t){if(t.snapshot){const e=t.snapshot,i=t._futureSnapshot;t.snapshot=i,n_(e.queryParams,i.queryParams)||t.queryParams.next(i.queryParams),e.fragment!==i.fragment&&t.fragment.next(i.fragment),n_(e.params,i.params)||t.params.next(i.params),function(t,e){if(t.length!==e.length)return!1;for(let i=0;i<t.length;++i)if(!n_(t[i],e[i]))return!1;return!0}(e.url,i.url)||t.url.next(i.url),n_(e.data,i.data)||t.data.next(i.data)}else t.snapshot=t._futureSnapshot,t.data.next(t._futureSnapshot.data)}function W_(t,e){var i,n;return n_(t.params,e.params)&&g_(i=t.url,n=e.url)&&i.every((t,e)=>n_(t.parameters,n[e].parameters))&&!(!t.parent!=!e.parent)&&(!t.parent||W_(t.parent,e.parent))}function Z_(t,e,i){if(i&&t.shouldReuseRoute(e.value,i.value.snapshot)){const n=i.value;n._futureSnapshot=e.value;const r=function(t,e,i){return e.children.map(e=>{for(const n of i.children)if(t.shouldReuseRoute(e.value,n.value.snapshot))return Z_(t,e,n);return Z_(t,e)})}(t,e,i);return new F_(n,r)}{const i=t.retrieve(e.value);if(i){const t=i.route;return q_(e,t),t}{const i=new N_(new Av.a((n=e.value).url),new Av.a(n.params),new Av.a(n.queryParams),new Av.a(n.fragment),new Av.a(n.data),n.outlet,n.component,n),r=e.children.map(e=>Z_(t,e));return new F_(i,r)}}var n}function q_(t,e){if(t.value.routeConfig!==e.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(t.children.length!==e.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");e.value._futureSnapshot=t.value;for(let i=0;i<t.children.length;++i)q_(t.children[i],e.children[i])}function Y_(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function Q_(t){return"object"==typeof t&&null!=t&&t.outlets}function X_(t,e,i,n,r){let s={};return n&&a_(n,(t,e)=>{s[e]=Array.isArray(t)?t.map(t=>`${t}`):`${t}`}),new p_(i.root===t?e:J_(i.root,t,e),s,r)}function J_(t,e,i){const n={};return a_(t.children,(t,r)=>{n[r]=t===e?i:J_(t,e,i)}),new f_(t.segments,n)}class ty{constructor(t,e,i){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=i,t&&i.length>0&&Y_(i[0]))throw new Error("Root segment cannot have matrix parameters");const n=i.find(Q_);if(n&&n!==o_(i))throw new Error("{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class ey{constructor(t,e,i){this.segmentGroup=t,this.processChildren=e,this.index=i}}function iy(t,e,i){if(t||(t=new f_([],{})),0===t.segments.length&&t.hasChildren())return ny(t,e,i);const n=function(t,e,i){let n=0,r=e;const s={match:!1,pathIndex:0,commandIndex:0};for(;r<t.segments.length;){if(n>=i.length)return s;const e=t.segments[r],o=i[n];if(Q_(o))break;const a=`${o}`,l=n<i.length-1?i[n+1]:null;if(r>0&&void 0===a)break;if(a&&l&&"object"==typeof l&&void 0===l.outlets){if(!ay(a,l,e))return s;n+=2}else{if(!ay(a,{},e))return s;n++}r++}return{match:!0,pathIndex:r,commandIndex:n}}(t,e,i),r=i.slice(n.commandIndex);if(n.match&&n.pathIndex<t.segments.length){const e=new f_(t.segments.slice(0,n.pathIndex),{});return e.children.primary=new f_(t.segments.slice(n.pathIndex),t.children),ny(e,0,r)}return n.match&&0===r.length?new f_(t.segments,{}):n.match&&!t.hasChildren()?ry(t,e,i):n.match?ny(t,0,r):ry(t,e,i)}function ny(t,e,i){if(0===i.length)return new f_(t.segments,{});{const n=function(t){return Q_(t[0])?t[0].outlets:{primary:t}}(i),r={};return a_(n,(i,n)=>{"string"==typeof i&&(i=[i]),null!==i&&(r[n]=iy(t.children[n],e,i))}),a_(t.children,(t,e)=>{void 0===n[e]&&(r[e]=t)}),new f_(t.segments,r)}}function ry(t,e,i){const n=t.segments.slice(0,e);let r=0;for(;r<i.length;){const s=i[r];if(Q_(s)){const t=sy(s.outlets);return new f_(n,t)}if(0===r&&Y_(i[0])){n.push(new m_(t.segments[e].path,oy(i[0]))),r++;continue}const o=Q_(s)?s.outlets.primary:`${s}`,a=r<i.length-1?i[r+1]:null;o&&a&&Y_(a)?(n.push(new m_(o,oy(a))),r+=2):(n.push(new m_(o,{})),r++)}return new f_(n,{})}function sy(t){const e={};return a_(t,(t,i)=>{"string"==typeof t&&(t=[t]),null!==t&&(e[i]=ry(new f_([],{}),0,t))}),e}function oy(t){const e={};return a_(t,(t,i)=>e[i]=`${t}`),e}function ay(t,e,i){return t==i.path&&n_(e,i.parameters)}class ly{constructor(t,e,i,n){this.routeReuseStrategy=t,this.futureState=e,this.currState=i,this.forwardEvent=n}activate(t){const e=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,i,t),G_(this.futureState.root),this.activateChildRoutes(e,i,t)}deactivateChildRoutes(t,e,i){const n=L_(e);t.children.forEach(t=>{const e=t.value.outlet;this.deactivateRoutes(t,n[e],i),delete n[e]}),a_(n,(t,e)=>{this.deactivateRouteAndItsChildren(t,i)})}deactivateRoutes(t,e,i){const n=t.value,r=e?e.value:null;if(n===r)if(n.component){const r=i.getContext(n.outlet);r&&this.deactivateChildRoutes(t,e,r.children)}else this.deactivateChildRoutes(t,e,i);else r&&this.deactivateRouteAndItsChildren(e,i)}deactivateRouteAndItsChildren(t,e){this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)}detachAndStoreRouteSubtree(t,e){const i=e.getContext(t.value.outlet);if(i&&i.outlet){const e=i.outlet.detach(),n=i.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:e,route:t,contexts:n})}}deactivateRouteAndOutlet(t,e){const i=e.getContext(t.value.outlet),n=i&&t.value.component?i.children:e,r=L_(t);for(const s of Object.keys(r))this.deactivateRouteAndItsChildren(r[s],n);i&&i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated())}activateChildRoutes(t,e,i){const n=L_(e);t.children.forEach(t=>{this.activateRoutes(t,n[t.value.outlet],i),this.forwardEvent(new Qv(t.value.snapshot))}),t.children.length&&this.forwardEvent(new qv(t.value.snapshot))}activateRoutes(t,e,i){const n=t.value,r=e?e.value:null;if(G_(n),n===r)if(n.component){const r=i.getOrCreateContext(n.outlet);this.activateChildRoutes(t,e,r.children)}else this.activateChildRoutes(t,e,i);else if(n.component){const e=i.getOrCreateContext(n.outlet);if(this.routeReuseStrategy.shouldAttach(n.snapshot)){const t=this.routeReuseStrategy.retrieve(n.snapshot);this.routeReuseStrategy.store(n.snapshot,null),e.children.onOutletReAttached(t.contexts),e.attachRef=t.componentRef,e.route=t.route.value,e.outlet&&e.outlet.attach(t.componentRef,t.route.value),cy(t.route)}else{const i=function(t){for(let e=t.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig;if(t&&t.component)return null}return null}(n.snapshot),r=i?i.module.componentFactoryResolver:null;e.attachRef=null,e.route=n,e.resolver=r,e.outlet&&e.outlet.activateWith(n,r),this.activateChildRoutes(t,null,e.children)}}else this.activateChildRoutes(t,null,i)}}function cy(t){G_(t.value),t.children.forEach(cy)}class hy{constructor(t,e){this.routes=t,this.module=e}}function uy(t){return"function"==typeof t}function dy(t){return t instanceof p_}const py=Symbol("INITIAL_VALUE");function fy(){return Mn(t=>Hg(t.map(t=>t.pipe(Qe(1),Pn(py)))).pipe(_v((t,e)=>{let i=!1;return e.reduce((t,n,r)=>{if(t!==py)return t;if(n===py&&(i=!0),!i){if(!1===n)return n;if(r===e.length-1||dy(n))return n}return t},t)},py),He(t=>t!==py),Object(Ge.a)(t=>dy(t)?t:!0===t),Qe(1)))}let my=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["ng-component"]],decls:1,vars:0,template:function(t,e){1&t&&r.Qb(0,"router-outlet")},directives:function(){return[hw]},encapsulation:2}),t})();function gy(t,e=""){for(let i=0;i<t.length;i++){const n=t[i];Ay(n,by(e,n))}}function Ay(t,e){t.children&&gy(t.children,e)}function by(t,e){return e?t||e.path?t&&!e.path?`${t}/`:!t&&e.path?e.path:`${t}/${e.path}`:"":t}function vy(t){const e=t.children&&t.children.map(vy),i=e?Object.assign(Object.assign({},t),{children:e}):Object.assign({},t);return!i.component&&(e||i.loadChildren)&&i.outlet&&"primary"!==i.outlet&&(i.component=my),i}function _y(t){return t.outlet||"primary"}function yy(t,e){const i=t.filter(t=>_y(t)===e);return i.push(...t.filter(t=>_y(t)!==e)),i}const wy={matched:!1,consumedSegments:[],lastChild:0,parameters:{},positionalParamSegments:{}};function xy(t,e,i){var n;if(""===e.path)return"full"===e.pathMatch&&(t.hasChildren()||i.length>0)?Object.assign({},wy):{matched:!0,consumedSegments:[],lastChild:0,parameters:{},positionalParamSegments:{}};const r=(e.matcher||i_)(i,t,e);if(!r)return Object.assign({},wy);const s={};a_(r.posParams,(t,e)=>{s[e]=t.path});const o=r.consumed.length>0?Object.assign(Object.assign({},s),r.consumed[r.consumed.length-1].parameters):s;return{matched:!0,consumedSegments:r.consumed,lastChild:r.consumed.length,parameters:o,positionalParamSegments:null!==(n=r.posParams)&&void 0!==n?n:{}}}function Cy(t,e,i,n,r="corrected"){if(i.length>0&&function(t,e,i){return i.some(i=>Sy(t,e,i)&&"primary"!==_y(i))}(t,i,n)){const r=new f_(e,function(t,e,i,n){const r={};r.primary=n,n._sourceSegment=t,n._segmentIndexShift=e.length;for(const s of i)if(""===s.path&&"primary"!==_y(s)){const i=new f_([],{});i._sourceSegment=t,i._segmentIndexShift=e.length,r[_y(s)]=i}return r}(t,e,n,new f_(i,t.children)));return r._sourceSegment=t,r._segmentIndexShift=e.length,{segmentGroup:r,slicedSegments:[]}}if(0===i.length&&function(t,e,i){return i.some(i=>Sy(t,e,i))}(t,i,n)){const s=new f_(t.segments,function(t,e,i,n,r,s){const o={};for(const a of n)if(Sy(t,i,a)&&!r[_y(a)]){const i=new f_([],{});i._sourceSegment=t,i._segmentIndexShift="legacy"===s?t.segments.length:e.length,o[_y(a)]=i}return Object.assign(Object.assign({},r),o)}(t,e,i,n,t.children,r));return s._sourceSegment=t,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:i}}const s=new f_(t.segments,t.children);return s._sourceSegment=t,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:i}}function Sy(t,e,i){return(!(t.hasChildren()||e.length>0)||"full"!==i.pathMatch)&&""===i.path}function ky(t,e,i,n){return!!(_y(t)===n||"primary"!==n&&Sy(e,i,t))&&("**"===t.path||xy(e,t,i).matched)}function Ey(t,e,i){return 0===e.length&&!t.children[i]}class Dy{constructor(t){this.segmentGroup=t||null}}class Iy{constructor(t){this.urlTree=t}}function Py(t){return new Ze.a(e=>e.error(new Dy(t)))}function Oy(t){return new Ze.a(e=>e.error(new Iy(t)))}function My(t){return new Ze.a(e=>e.error(new Error(`Only absolute redirects can have named outlets. redirectTo: '${t}'`)))}class Ty{constructor(t,e,i,n,s){this.configLoader=e,this.urlSerializer=i,this.urlTree=n,this.config=s,this.allowRedirects=!0,this.ngModule=t.get(r.z)}apply(){const t=Cy(this.urlTree.root,[],[],this.config).segmentGroup,e=new f_(t.segments,t.children);return this.expandSegmentGroup(this.ngModule,this.config,e,"primary").pipe(Object(Ge.a)(t=>this.createUrlTree(Ry(t),this.urlTree.queryParams,this.urlTree.fragment))).pipe(qd(t=>{if(t instanceof Iy)return this.allowRedirects=!1,this.match(t.urlTree);if(t instanceof Dy)throw this.noMatchError(t);throw t}))}match(t){return this.expandSegmentGroup(this.ngModule,this.config,t.root,"primary").pipe(Object(Ge.a)(e=>this.createUrlTree(Ry(e),t.queryParams,t.fragment))).pipe(qd(t=>{if(t instanceof Dy)throw this.noMatchError(t);throw t}))}noMatchError(t){return new Error(`Cannot match any routes. URL Segment: '${t.segmentGroup}'`)}createUrlTree(t,e,i){const n=t.segments.length>0?new f_([],{primary:t}):t;return new p_(n,e,i)}expandSegmentGroup(t,e,i,n){return 0===i.segments.length&&i.hasChildren()?this.expandChildren(t,e,i).pipe(Object(Ge.a)(t=>new f_([],t))):this.expandSegment(t,i,e,i.segments,n,!0)}expandChildren(t,e,i){const n=[];for(const r of Object.keys(i.children))"primary"===r?n.unshift(r):n.push(r);return Object(On.a)(n).pipe(np(n=>{const r=i.children[n],s=yy(e,n);return this.expandSegmentGroup(t,s,r,n).pipe(Object(Ge.a)(t=>({segment:t,outlet:n})))}),_v((t,e)=>(t[e.outlet]=e.segment,t),{}),function(t,e){const i=arguments.length>=2;return n=>n.pipe(t?He((e,i)=>t(e,i,n)):Tv.a,xv(1),i?Pv(e):kv(()=>new bv))}())}expandSegment(t,e,i,n,r,s){return Object(On.a)(i).pipe(np(o=>this.expandSegmentAgainstRoute(t,e,i,o,n,r,s).pipe(qd(t=>{if(t instanceof Dy)return Se(null);throw t}))),Rv(t=>!!t),qd((t,i)=>{if(t instanceof bv||"EmptyError"===t.name){if(Ey(e,n,r))return Se(new f_([],{}));throw new Dy(e)}throw t}))}expandSegmentAgainstRoute(t,e,i,n,r,s,o){return ky(n,e,r,s)?void 0===n.redirectTo?this.matchSegmentAgainstRoute(t,e,n,r,s):o&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,i,n,r,s):Py(e):Py(e)}expandSegmentAgainstRouteUsingRedirect(t,e,i,n,r,s){return"**"===n.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,i,n,s):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,i,n,r,s)}expandWildCardWithParamsAgainstRouteUsingRedirect(t,e,i,n){const r=this.applyRedirectCommands([],i.redirectTo,{});return i.redirectTo.startsWith("/")?Oy(r):this.lineralizeSegments(i,r).pipe(Object(ip.a)(i=>{const r=new f_(i,{});return this.expandSegment(t,r,e,i,n,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(t,e,i,n,r,s){const{matched:o,consumedSegments:a,lastChild:l,positionalParamSegments:c}=xy(e,n,r);if(!o)return Py(e);const h=this.applyRedirectCommands(a,n.redirectTo,c);return n.redirectTo.startsWith("/")?Oy(h):this.lineralizeSegments(n,h).pipe(Object(ip.a)(n=>this.expandSegment(t,e,i,n.concat(r.slice(l)),s,!1)))}matchSegmentAgainstRoute(t,e,i,n,r){if("**"===i.path)return i.loadChildren?(i._loadedConfig?Se(i._loadedConfig):this.configLoader.load(t.injector,i)).pipe(Object(Ge.a)(t=>(i._loadedConfig=t,new f_(n,{})))):Se(new f_(n,{}));const{matched:s,consumedSegments:o,lastChild:a}=xy(e,i,n);if(!s)return Py(e);const l=n.slice(a);return this.getChildConfig(t,i,n).pipe(Object(ip.a)(t=>{const n=t.module,s=t.routes,{segmentGroup:a,slicedSegments:c}=Cy(e,o,l,s),h=new f_(a.segments,a.children);if(0===c.length&&h.hasChildren())return this.expandChildren(n,s,h).pipe(Object(Ge.a)(t=>new f_(o,t)));if(0===s.length&&0===c.length)return Se(new f_(o,{}));const u=_y(i)===r;return this.expandSegment(n,h,s,c,u?"primary":r,!0).pipe(Object(Ge.a)(t=>new f_(o.concat(t.segments),t.children)))}))}getChildConfig(t,e,i){return e.children?Se(new hy(e.children,t)):e.loadChildren?void 0!==e._loadedConfig?Se(e._loadedConfig):this.runCanLoadGuards(t.injector,e,i).pipe(Object(ip.a)(i=>i?this.configLoader.load(t.injector,e).pipe(Object(Ge.a)(t=>(e._loadedConfig=t,t))):function(t){return new Ze.a(e=>e.error(e_(`Cannot load children because the guard of the route "path: '${t.path}'" returned false`)))}(e))):Se(new hy([],t))}runCanLoadGuards(t,e,i){const n=e.canLoad;return n&&0!==n.length?Se(n.map(n=>{const r=t.get(n);let s;if(function(t){return t&&uy(t.canLoad)}(r))s=r.canLoad(e,i);else{if(!uy(r))throw new Error("Invalid CanLoad guard");s=r(e,i)}return l_(s)})).pipe(fy(),Pe(t=>{if(!dy(t))return;const e=e_(`Redirecting to "${this.urlSerializer.serialize(t)}"`);throw e.url=t,e}),Object(Ge.a)(t=>!0===t)):Se(!0)}lineralizeSegments(t,e){let i=[],n=e.root;for(;;){if(i=i.concat(n.segments),0===n.numberOfChildren)return Se(i);if(n.numberOfChildren>1||!n.children.primary)return My(t.redirectTo);n=n.children.primary}}applyRedirectCommands(t,e,i){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),t,i)}applyRedirectCreatreUrlTree(t,e,i,n){const r=this.createSegmentGroup(t,e.root,i,n);return new p_(r,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const i={};return a_(t,(t,n)=>{if("string"==typeof t&&t.startsWith(":")){const r=t.substring(1);i[n]=e[r]}else i[n]=t}),i}createSegmentGroup(t,e,i,n){const r=this.createSegments(t,e.segments,i,n);let s={};return a_(e.children,(e,r)=>{s[r]=this.createSegmentGroup(t,e,i,n)}),new f_(r,s)}createSegments(t,e,i,n){return e.map(e=>e.path.startsWith(":")?this.findPosParam(t,e,n):this.findOrReturn(e,i))}findPosParam(t,e,i){const n=i[e.path.substring(1)];if(!n)throw new Error(`Cannot redirect to '${t}'. Cannot find '${e.path}'.`);return n}findOrReturn(t,e){let i=0;for(const n of e){if(n.path===t.path)return e.splice(i),n;i++}return t}}function Ry(t){const e={};for(const i of Object.keys(t.children)){const n=Ry(t.children[i]);(n.segments.length>0||n.hasChildren())&&(e[i]=n)}return function(t){if(1===t.numberOfChildren&&t.children.primary){const e=t.children.primary;return new f_(t.segments.concat(e.segments),e.children)}return t}(new f_(t.segments,e))}class Vy{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class Fy{constructor(t,e){this.component=t,this.route=e}}function Ly(t,e,i){const n=t._root;return By(n,e?e._root:null,i,[n.value])}function Uy(t,e,i){const n=function(t){if(!t)return null;for(let e=t.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig}return null}(e);return(n?n.module.injector:i).get(t)}function By(t,e,i,n,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=L_(e);return t.children.forEach(t=>{!function(t,e,i,n,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=t.value,o=e?e.value:null,a=i?i.getContext(t.value.outlet):null;if(o&&s.routeConfig===o.routeConfig){const l=function(t,e,i){if("function"==typeof i)return i(t,e);switch(i){case"pathParamsChange":return!g_(t.url,e.url);case"pathParamsOrQueryParamsChange":return!g_(t.url,e.url)||!n_(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!W_(t,e)||!n_(t.queryParams,e.queryParams);case"paramsChange":default:return!W_(t,e)}}(o,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new Vy(n)):(s.data=o.data,s._resolvedData=o._resolvedData),By(t,e,s.component?a?a.children:null:i,n,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new Fy(a.outlet.component,o))}else o&&Ny(e,a,r),r.canActivateChecks.push(new Vy(n)),By(t,null,s.component?a?a.children:null:i,n,r)}(t,s[t.value.outlet],i,n.concat([t.value]),r),delete s[t.value.outlet]}),a_(s,(t,e)=>Ny(t,i.getContext(e),r)),r}function Ny(t,e,i){const n=L_(t),r=t.value;a_(n,(t,n)=>{Ny(t,r.component?e?e.children.getContext(n):null:e,i)}),i.canDeactivateChecks.push(new Fy(r.component&&e&&e.outlet&&e.outlet.isActivated?e.outlet.component:null,r))}class jy{}function zy(t){return new Ze.a(e=>e.error(t))}class Hy{constructor(t,e,i,n,r,s){this.rootComponentType=t,this.config=e,this.urlTree=i,this.url=n,this.paramsInheritanceStrategy=r,this.relativeLinkResolution=s}recognize(){const t=Cy(this.urlTree.root,[],[],this.config.filter(t=>void 0===t.redirectTo),this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,t,"primary");if(null===e)return null;const i=new z_([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},"primary",this.rootComponentType,null,this.urlTree.root,-1,{}),n=new F_(i,e),r=new H_(this.url,n);return this.inheritParamsAndData(r._root),r}inheritParamsAndData(t){const e=t.value,i=j_(e,this.paramsInheritanceStrategy);e.params=Object.freeze(i.params),e.data=Object.freeze(i.data),t.children.forEach(t=>this.inheritParamsAndData(t))}processSegmentGroup(t,e,i){return 0===e.segments.length&&e.hasChildren()?this.processChildren(t,e):this.processSegment(t,e,e.segments,i)}processChildren(t,e){const i=[];for(const r of Object.keys(e.children)){const n=e.children[r],s=yy(t,r),o=this.processSegmentGroup(s,n,r);if(null===o)return null;i.push(...o)}const n=function(t){const e=[];for(const i of t){if(!Ky(i)){e.push(i);continue}const t=e.find(t=>i.value.routeConfig===t.value.routeConfig);void 0!==t?t.children.push(...i.children):e.push(i)}return e}(i);return n.sort((t,e)=>"primary"===t.value.outlet?-1:"primary"===e.value.outlet?1:t.value.outlet.localeCompare(e.value.outlet)),n}processSegment(t,e,i,n){for(const r of t){const t=this.processSegmentAgainstRoute(r,e,i,n);if(null!==t)return t}return Ey(e,i,n)?[]:null}processSegmentAgainstRoute(t,e,i,n){if(t.redirectTo||!ky(t,e,i,n))return null;let r,s=[],o=[];if("**"===t.path){const n=i.length>0?o_(i).parameters:{};r=new z_(i,n,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,Wy(t),_y(t),t.component,t,$y(e),Gy(e)+i.length,Zy(t))}else{const n=xy(e,t,i);if(!n.matched)return null;s=n.consumedSegments,o=i.slice(n.lastChild),r=new z_(s,n.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,Wy(t),_y(t),t.component,t,$y(e),Gy(e)+s.length,Zy(t))}const a=function(t){return t.children?t.children:t.loadChildren?t._loadedConfig.routes:[]}(t),{segmentGroup:l,slicedSegments:c}=Cy(e,s,o,a.filter(t=>void 0===t.redirectTo),this.relativeLinkResolution);if(0===c.length&&l.hasChildren()){const t=this.processChildren(a,l);return null===t?null:[new F_(r,t)]}if(0===a.length&&0===c.length)return[new F_(r,[])];const h=_y(t)===n,u=this.processSegment(a,l,c,h?"primary":n);return null===u?null:[new F_(r,u)]}}function Ky(t){const e=t.value.routeConfig;return e&&""===e.path&&void 0===e.redirectTo}function $y(t){let e=t;for(;e._sourceSegment;)e=e._sourceSegment;return e}function Gy(t){let e=t,i=e._segmentIndexShift?e._segmentIndexShift:0;for(;e._sourceSegment;)e=e._sourceSegment,i+=e._segmentIndexShift?e._segmentIndexShift:0;return i-1}function Wy(t){return t.data||{}}function Zy(t){return t.resolve||{}}function qy(t){return Mn(e=>{const i=t(e);return i?Object(On.a)(i).pipe(Object(Ge.a)(()=>e)):Se(e)})}class Yy extends class{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}{}const Qy=new r.s("ROUTES");class Xy{constructor(t,e,i,n){this.loader=t,this.compiler=e,this.onLoadStartListener=i,this.onLoadEndListener=n}load(t,e){if(e._loader$)return e._loader$;this.onLoadStartListener&&this.onLoadStartListener(e);const i=this.loadModuleFactory(e.loadChildren).pipe(Object(Ge.a)(i=>{this.onLoadEndListener&&this.onLoadEndListener(e);const n=i.create(t);return new hy(s_(n.injector.get(Qy,void 0,r.r.Self|r.r.Optional)).map(vy),n)}),qd(t=>{throw e._loader$=void 0,t}));return e._loader$=new vv.a(i,()=>new _e.a).pipe(Object(Vv.a)()),e._loader$}loadModuleFactory(t){return"string"==typeof t?Object(On.a)(this.loader.load(t)):l_(t()).pipe(Object(ip.a)(t=>t instanceof r.x?Se(t):Object(On.a)(this.compiler.compileModuleAsync(t))))}}class Jy{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.children=new tw,this.attachRef=null}}class tw{constructor(){this.contexts=new Map}onChildOutletCreated(t,e){const i=this.getOrCreateContext(t);i.outlet=e,this.contexts.set(t,i)}onChildOutletDestroyed(t){const e=this.getContext(t);e&&(e.outlet=null)}onOutletDeactivated(){const t=this.contexts;return this.contexts=new Map,t}onOutletReAttached(t){this.contexts=t}getOrCreateContext(t){let e=this.getContext(t);return e||(e=new Jy,this.contexts.set(t,e)),e}getContext(t){return this.contexts.get(t)||null}}class ew{shouldProcessUrl(t){return!0}extract(t){return t}merge(t,e){return t}}function iw(t){throw t}function nw(t,e,i){return e.parse("/")}function rw(t,e){return Se(null)}let sw=(()=>{class t{constructor(t,e,i,n,s,o,a,l){this.rootComponentType=t,this.urlSerializer=e,this.rootContexts=i,this.location=n,this.config=l,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.disposed=!1,this.lastLocationChangeInfo=null,this.navigationId=0,this.isNgZoneEnabled=!1,this.events=new _e.a,this.errorHandler=iw,this.malformedUriErrorHandler=nw,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:rw,afterPreactivation:rw},this.urlHandlingStrategy=new ew,this.routeReuseStrategy=new Yy,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="corrected",this.ngModule=s.get(r.z),this.console=s.get(r.bb);const c=s.get(r.B);this.isNgZoneEnabled=c instanceof r.B&&r.B.isInAngularZone(),this.resetConfig(l),this.currentUrlTree=new p_(new f_([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new Xy(o,a,t=>this.triggerEvent(new Gv(t)),t=>this.triggerEvent(new Wv(t))),this.routerState=B_(this.currentUrlTree,this.rootComponentType),this.transitions=new Av.a({id:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}setupNavigations(t){const e=this.events;return t.pipe(He(t=>0!==t.id),Object(Ge.a)(t=>Object.assign(Object.assign({},t),{extractedUrl:this.urlHandlingStrategy.extract(t.rawUrl)})),Mn(t=>{let i=!1,n=!1;return Se(t).pipe(Pe(t=>{this.currentNavigation={id:t.id,initialUrl:t.currentRawUrl,extractedUrl:t.extractedUrl,trigger:t.source,extras:t.extras,previousNavigation:this.lastSuccessfulNavigation?Object.assign(Object.assign({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),Mn(t=>{const i=!this.navigated||t.extractedUrl.toString()!==this.browserUrlTree.toString();if(("reload"===this.onSameUrlNavigation||i)&&this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl))return Se(t).pipe(Mn(t=>{const i=this.transitions.getValue();return e.next(new Lv(t.id,this.serializeUrl(t.extractedUrl),t.source,t.restoredState)),i!==this.transitions.getValue()?qe:Promise.resolve(t)}),(n=this.ngModule.injector,r=this.configLoader,s=this.urlSerializer,o=this.config,Mn(t=>function(t,e,i,n,r){return new Ty(t,e,i,n,r).apply()}(n,r,s,t.extractedUrl,o).pipe(Object(Ge.a)(e=>Object.assign(Object.assign({},t),{urlAfterRedirects:e}))))),Pe(t=>{this.currentNavigation=Object.assign(Object.assign({},this.currentNavigation),{finalUrl:t.urlAfterRedirects})}),function(t,e,i,n,r){return Object(ip.a)(s=>function(t,e,i,n,r="emptyOnly",s="legacy"){try{const o=new Hy(t,e,i,n,r,s).recognize();return null===o?zy(new jy):Se(o)}catch($nt){return zy($nt)}}(t,e,s.urlAfterRedirects,i(s.urlAfterRedirects),n,r).pipe(Object(Ge.a)(t=>Object.assign(Object.assign({},s),{targetSnapshot:t}))))}(this.rootComponentType,this.config,t=>this.serializeUrl(t),this.paramsInheritanceStrategy,this.relativeLinkResolution),Pe(t=>{"eager"===this.urlUpdateStrategy&&(t.extras.skipLocationChange||this.setBrowserUrl(t.urlAfterRedirects,!!t.extras.replaceUrl,t.id,t.extras.state),this.browserUrlTree=t.urlAfterRedirects);const i=new jv(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.next(i)}));var n,r,s,o;if(i&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)){const{id:i,extractedUrl:n,source:r,restoredState:s,extras:o}=t,a=new Lv(i,this.serializeUrl(n),r,s);e.next(a);const l=B_(n,this.rootComponentType).snapshot;return Se(Object.assign(Object.assign({},t),{targetSnapshot:l,urlAfterRedirects:n,extras:Object.assign(Object.assign({},o),{skipLocationChange:!1,replaceUrl:!1})}))}return this.rawUrlTree=t.rawUrl,this.browserUrlTree=t.urlAfterRedirects,t.resolve(null),qe}),qy(t=>{const{targetSnapshot:e,id:i,extractedUrl:n,rawUrl:r,extras:{skipLocationChange:s,replaceUrl:o}}=t;return this.hooks.beforePreactivation(e,{navigationId:i,appliedUrlTree:n,rawUrlTree:r,skipLocationChange:!!s,replaceUrl:!!o})}),Pe(t=>{const e=new zv(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}),Object(Ge.a)(t=>Object.assign(Object.assign({},t),{guards:Ly(t.targetSnapshot,t.currentSnapshot,this.rootContexts)})),function(t,e){return Object(ip.a)(i=>{const{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=i;return 0===o.length&&0===s.length?Se(Object.assign(Object.assign({},i),{guardsResult:!0})):function(t,e,i,n){return Object(On.a)(t).pipe(Object(ip.a)(t=>function(t,e,i,n,r){const s=e&&e.routeConfig?e.routeConfig.canDeactivate:null;return s&&0!==s.length?Se(s.map(s=>{const o=Uy(s,e,r);let a;if(function(t){return t&&uy(t.canDeactivate)}(o))a=l_(o.canDeactivate(t,e,i,n));else{if(!uy(o))throw new Error("Invalid CanDeactivate guard");a=l_(o(t,e,i,n))}return a.pipe(Rv())})).pipe(fy()):Se(!0)}(t.component,t.route,i,e,n)),Rv(t=>!0!==t,!0))}(o,n,r,t).pipe(Object(ip.a)(i=>i&&"boolean"==typeof i?function(t,e,i,n){return Object(On.a)(e).pipe(np(e=>In(function(t,e){return null!==t&&e&&e(new Zv(t)),Se(!0)}(e.route.parent,n),function(t,e){return null!==t&&e&&e(new Yv(t)),Se(!0)}(e.route,n),function(t,e,i){const n=e[e.length-1],r=e.slice(0,e.length-1).reverse().map(t=>function(t){const e=t.routeConfig?t.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:t,guards:e}:null}(t)).filter(t=>null!==t).map(e=>Ol(()=>Se(e.guards.map(r=>{const s=Uy(r,e.node,i);let o;if(function(t){return t&&uy(t.canActivateChild)}(s))o=l_(s.canActivateChild(n,t));else{if(!uy(s))throw new Error("Invalid CanActivateChild guard");o=l_(s(n,t))}return o.pipe(Rv())})).pipe(fy())));return Se(r).pipe(fy())}(t,e.path,i),function(t,e,i){const n=e.routeConfig?e.routeConfig.canActivate:null;return n&&0!==n.length?Se(n.map(n=>Ol(()=>{const r=Uy(n,e,i);let s;if(function(t){return t&&uy(t.canActivate)}(r))s=l_(r.canActivate(e,t));else{if(!uy(r))throw new Error("Invalid CanActivate guard");s=l_(r(e,t))}return s.pipe(Rv())}))).pipe(fy()):Se(!0)}(t,e.route,i))),Rv(t=>!0!==t,!0))}(n,s,t,e):Se(i)),Object(Ge.a)(t=>Object.assign(Object.assign({},i),{guardsResult:t})))})}(this.ngModule.injector,t=>this.triggerEvent(t)),Pe(t=>{if(dy(t.guardsResult)){const e=e_(`Redirecting to "${this.serializeUrl(t.guardsResult)}"`);throw e.url=t.guardsResult,e}const e=new Hv(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot,!!t.guardsResult);this.triggerEvent(e)}),He(t=>{if(!t.guardsResult){this.resetUrlToCurrentUrlTree();const i=new Bv(t.id,this.serializeUrl(t.extractedUrl),"");return e.next(i),t.resolve(!1),!1}return!0}),qy(t=>{if(t.guards.canActivateChecks.length)return Se(t).pipe(Pe(t=>{const e=new Kv(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}),Mn(t=>{let i=!1;return Se(t).pipe((n=this.paramsInheritanceStrategy,r=this.ngModule.injector,Object(ip.a)(t=>{const{targetSnapshot:e,guards:{canActivateChecks:i}}=t;if(!i.length)return Se(t);let s=0;return Object(On.a)(i).pipe(np(t=>function(t,e,i,n){return function(t,e,i,n){const r=Object.keys(t);if(0===r.length)return Se({});const s={};return Object(On.a)(r).pipe(Object(ip.a)(r=>function(t,e,i,n){const r=Uy(t,e,n);return l_(r.resolve?r.resolve(e,i):r(e,i))}(t[r],e,i,n).pipe(Pe(t=>{s[r]=t}))),xv(1),Object(ip.a)(()=>Object.keys(s).length===r.length?Se(s):qe))}(t._resolve,t,e,n).pipe(Object(Ge.a)(e=>(t._resolvedData=e,t.data=Object.assign(Object.assign({},t.data),j_(t,i).resolve),null)))}(t.route,e,n,r)),Pe(()=>s++),xv(1),Object(ip.a)(e=>s===i.length?Se(t):qe))})),Pe({next:()=>i=!0,complete:()=>{if(!i){const i=new Bv(t.id,this.serializeUrl(t.extractedUrl),"At least one route resolver didn't emit any value.");e.next(i),t.resolve(!1)}}}));var n,r}),Pe(t=>{const e=new $v(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}))}),qy(t=>{const{targetSnapshot:e,id:i,extractedUrl:n,rawUrl:r,extras:{skipLocationChange:s,replaceUrl:o}}=t;return this.hooks.afterPreactivation(e,{navigationId:i,appliedUrlTree:n,rawUrlTree:r,skipLocationChange:!!s,replaceUrl:!!o})}),Object(Ge.a)(t=>{const e=function(t,e,i){const n=Z_(t,e._root,i?i._root:void 0);return new U_(n,e)}(this.routeReuseStrategy,t.targetSnapshot,t.currentRouterState);return Object.assign(Object.assign({},t),{targetRouterState:e})}),Pe(t=>{this.currentUrlTree=t.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,t.rawUrl),this.routerState=t.targetRouterState,"deferred"===this.urlUpdateStrategy&&(t.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,!!t.extras.replaceUrl,t.id,t.extras.state),this.browserUrlTree=t.urlAfterRedirects)}),(r=this.rootContexts,s=this.routeReuseStrategy,o=t=>this.triggerEvent(t),Object(Ge.a)(t=>(new ly(s,t.targetRouterState,t.currentRouterState,o).activate(r),t))),Pe({next(){i=!0},complete(){i=!0}}),Xd(()=>{if(!i&&!n){this.resetUrlToCurrentUrlTree();const i=new Bv(t.id,this.serializeUrl(t.extractedUrl),`Navigation ID ${t.id} is not equal to the current navigation id ${this.navigationId}`);e.next(i),t.resolve(!1)}this.currentNavigation=null}),qd(i=>{if(n=!0,(r=i)&&r.ngNavigationCancelingError){const n=dy(i.url);n||(this.navigated=!0,this.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl));const r=new Bv(t.id,this.serializeUrl(t.extractedUrl),i.message);e.next(r),n?setTimeout(()=>{const e=this.urlHandlingStrategy.merge(i.url,this.rawUrlTree);this.scheduleNavigation(e,"imperative",null,{skipLocationChange:t.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy},{resolve:t.resolve,reject:t.reject,promise:t.promise})},0):t.resolve(!1)}else{this.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl);const n=new Nv(t.id,this.serializeUrl(t.extractedUrl),i);e.next(n);try{t.resolve(this.errorHandler(i))}catch(s){t.reject(s)}}var r;return qe}));var r,s,o}))}resetRootComponentType(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType}getTransition(){const t=this.transitions.value;return t.urlAfterRedirects=this.browserUrlTree,t}setTransition(t){this.transitions.next(Object.assign(Object.assign({},this.getTransition()),t))}initialNavigation(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(t=>{const e=this.extractLocationChangeInfoFromEvent(t);this.shouldScheduleNavigation(this.lastLocationChangeInfo,e)&&setTimeout(()=>{const{source:t,state:i,urlTree:n}=e,r={replaceUrl:!0};if(i){const t=Object.assign({},i);delete t.navigationId,0!==Object.keys(t).length&&(r.state=t)}this.scheduleNavigation(n,t,i,r)},0),this.lastLocationChangeInfo=e}))}extractLocationChangeInfoFromEvent(t){var e;return{source:"popstate"===t.type?"popstate":"hashchange",urlTree:this.parseUrl(t.url),state:(null===(e=t.state)||void 0===e?void 0:e.navigationId)?t.state:null,transitionId:this.getTransition().id}}shouldScheduleNavigation(t,e){if(!t)return!0;const i=e.urlTree.toString()===t.urlTree.toString();return!(e.transitionId===t.transitionId&&i&&("hashchange"===e.source&&"popstate"===t.source||"popstate"===e.source&&"hashchange"===t.source))}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.currentNavigation}triggerEvent(t){this.events.next(t)}resetConfig(t){gy(t),this.config=t.map(vy),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.transitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(t,e={}){const{relativeTo:i,queryParams:n,fragment:r,queryParamsHandling:s,preserveFragment:o}=e,a=i||this.routerState.root,l=o?this.currentUrlTree.fragment:r;let c=null;switch(s){case"merge":c=Object.assign(Object.assign({},this.currentUrlTree.queryParams),n);break;case"preserve":c=this.currentUrlTree.queryParams;break;default:c=n||null}return null!==c&&(c=this.removeEmptyProps(c)),function(t,e,i,n,r){if(0===i.length)return X_(e.root,e.root,e,n,r);const s=function(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new ty(!0,0,t);let e=0,i=!1;const n=t.reduce((t,n,r)=>{if("object"==typeof n&&null!=n){if(n.outlets){const e={};return a_(n.outlets,(t,i)=>{e[i]="string"==typeof t?t.split("/"):t}),[...t,{outlets:e}]}if(n.segmentPath)return[...t,n.segmentPath]}return"string"!=typeof n?[...t,n]:0===r?(n.split("/").forEach((n,r)=>{0==r&&"."===n||(0==r&&""===n?i=!0:".."===n?e++:""!=n&&t.push(n))}),t):[...t,n]},[]);return new ty(i,e,n)}(i);if(s.toRoot())return X_(e.root,new f_([],{}),e,n,r);const o=function(t,e,i){if(t.isAbsolute)return new ey(e.root,!0,0);if(-1===i.snapshot._lastPathIndex){const t=i.snapshot._urlSegment;return new ey(t,t===e.root,0)}const n=Y_(t.commands[0])?0:1;return function(t,e,i){let n=t,r=e,s=i;for(;s>r;){if(s-=r,n=n.parent,!n)throw new Error("Invalid number of '../'");r=n.segments.length}return new ey(n,!1,r-s)}(i.snapshot._urlSegment,i.snapshot._lastPathIndex+n,t.numberOfDoubleDots)}(s,e,t),a=o.processChildren?ny(o.segmentGroup,o.index,s.commands):iy(o.segmentGroup,o.index,s.commands);return X_(o.segmentGroup,a,e,n,r)}(a,this.currentUrlTree,t,c,l)}navigateByUrl(t,e={skipLocationChange:!1}){const i=dy(t)?t:this.parseUrl(t),n=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(n,"imperative",null,e)}navigate(t,e={skipLocationChange:!1}){return function(t){for(let e=0;e<t.length;e++){const i=t[e];if(null==i)throw new Error(`The requested path contains ${i} segment at index ${e}`)}}(t),this.navigateByUrl(this.createUrlTree(t,e),e)}serializeUrl(t){return this.urlSerializer.serialize(t)}parseUrl(t){let e;try{e=this.urlSerializer.parse(t)}catch($nt){e=this.malformedUriErrorHandler($nt,this.urlSerializer,t)}return e}isActive(t,e){if(dy(t))return c_(this.currentUrlTree,t,e);const i=this.parseUrl(t);return c_(this.currentUrlTree,i,e)}removeEmptyProps(t){return Object.keys(t).reduce((e,i)=>{const n=t[i];return null!=n&&(e[i]=n),e},{})}processNavigations(){this.navigations.subscribe(t=>{this.navigated=!0,this.lastSuccessfulId=t.id,this.events.next(new Uv(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(this.currentUrlTree))),this.lastSuccessfulNavigation=this.currentNavigation,this.currentNavigation=null,t.resolve(!0)},t=>{this.console.warn("Unhandled Navigation Error: ")})}scheduleNavigation(t,e,i,n,r){if(this.disposed)return Promise.resolve(!1);const s=this.getTransition(),o="imperative"!==e&&"imperative"===(null==s?void 0:s.source),a=(this.lastSuccessfulId===s.id||this.currentNavigation?s.rawUrl:s.urlAfterRedirects).toString()===t.toString();if(o&&a)return Promise.resolve(!0);let l,c,h;r?(l=r.resolve,c=r.reject,h=r.promise):h=new Promise((t,e)=>{l=t,c=e});const u=++this.navigationId;return this.setTransition({id:u,source:e,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:t,extras:n,resolve:l,reject:c,promise:h,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),h.catch(t=>Promise.reject(t))}setBrowserUrl(t,e,i,n){const r=this.urlSerializer.serialize(t);n=n||{},this.location.isCurrentPathEqualTo(r)||e?this.location.replaceState(r,"",Object.assign(Object.assign({},n),{navigationId:i})):this.location.go(r,"",Object.assign(Object.assign({},n),{navigationId:i}))}resetStateAndUrl(t,e,i){this.routerState=t,this.currentUrlTree=e,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,i),this.resetUrlToCurrentUrlTree()}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",{navigationId:this.lastSuccessfulId})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.Q),r.Zb(A_),r.Zb(tw),r.Zb(w),r.Zb(r.t),r.Zb(r.y),r.Zb(r.i),r.Zb(void 0))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),ow=(()=>{class t{constructor(t,e,i,n,r){this.router=t,this.route=e,this.commands=[],this.onChanges=new _e.a,null==i&&n.setAttribute(r.nativeElement,"tabindex","0")}ngOnChanges(t){this.onChanges.next(this)}set routerLink(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]}onClick(){const t={skipLocationChange:lw(this.skipLocationChange),replaceUrl:lw(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,t),!0}get urlTree(){return this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:lw(this.preserveFragment)})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(sw),r.Pb(N_),r.ac("tabindex"),r.Pb(r.H),r.Pb(r.l))},t.\u0275dir=r.Kb({type:t,selectors:[["","routerLink","",5,"a",5,"area"]],hostBindings:function(t,e){1&t&&r.cc("click",function(){return e.onClick()})},inputs:{routerLink:"routerLink",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state",relativeTo:"relativeTo"},features:[r.Bb]}),t})(),aw=(()=>{class t{constructor(t,e,i){this.router=t,this.route=e,this.locationStrategy=i,this.commands=[],this.onChanges=new _e.a,this.subscription=t.events.subscribe(t=>{t instanceof Uv&&this.updateTargetUrlAndHref()})}set routerLink(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]}ngOnChanges(t){this.updateTargetUrlAndHref(),this.onChanges.next(this)}ngOnDestroy(){this.subscription.unsubscribe()}onClick(t,e,i,n,r){if(0!==t||e||i||n||r)return!0;if("string"==typeof this.target&&"_self"!=this.target)return!0;const s={skipLocationChange:lw(this.skipLocationChange),replaceUrl:lw(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,s),!1}updateTargetUrlAndHref(){this.href=this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree))}get urlTree(){return this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:lw(this.preserveFragment)})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(sw),r.Pb(N_),r.Pb(A))},t.\u0275dir=r.Kb({type:t,selectors:[["a","routerLink",""],["area","routerLink",""]],hostVars:2,hostBindings:function(t,e){1&t&&r.cc("click",function(t){return e.onClick(t.button,t.ctrlKey,t.shiftKey,t.altKey,t.metaKey)}),2&t&&(r.Yb("href",e.href,r.Dc),r.Eb("target",e.target))},inputs:{routerLink:"routerLink",target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state",relativeTo:"relativeTo"},features:[r.Bb]}),t})();function lw(t){return""===t||!!t}let cw=(()=>{class t{constructor(t,e,i,n,r,s){this.router=t,this.element=e,this.renderer=i,this.cdr=n,this.link=r,this.linkWithHref=s,this.classes=[],this.isActive=!1,this.routerLinkActiveOptions={exact:!1},this.routerEventsSubscription=t.events.subscribe(t=>{t instanceof Uv&&this.update()})}ngAfterContentInit(){Se(this.links.changes,this.linksWithHrefs.changes,Se(null)).pipe(Object(Dn.a)()).subscribe(t=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){var t;null===(t=this.linkInputChangesSubscription)||void 0===t||t.unsubscribe();const e=[...this.links.toArray(),...this.linksWithHrefs.toArray(),this.link,this.linkWithHref].filter(t=>!!t).map(t=>t.onChanges);this.linkInputChangesSubscription=Object(On.a)(e).pipe(Object(Dn.a)()).subscribe(t=>{this.isActive!==this.isLinkActive(this.router)(t)&&this.update()})}set routerLinkActive(t){const e=Array.isArray(t)?t:t.split(" ");this.classes=e.filter(t=>!!t)}ngOnChanges(t){this.update()}ngOnDestroy(){var t;this.routerEventsSubscription.unsubscribe(),null===(t=this.linkInputChangesSubscription)||void 0===t||t.unsubscribe()}update(){this.links&&this.linksWithHrefs&&this.router.navigated&&Promise.resolve().then(()=>{const t=this.hasActiveLinks();this.isActive!==t&&(this.isActive=t,this.cdr.markForCheck(),this.classes.forEach(e=>{t?this.renderer.addClass(this.element.nativeElement,e):this.renderer.removeClass(this.element.nativeElement,e)}))})}isLinkActive(t){return e=>t.isActive(e.urlTree,this.routerLinkActiveOptions.exact)}hasActiveLinks(){const t=this.isLinkActive(this.router);return this.link&&t(this.link)||this.linkWithHref&&t(this.linkWithHref)||this.links.some(t)||this.linksWithHrefs.some(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(sw),r.Pb(r.l),r.Pb(r.H),r.Pb(r.h),r.Pb(ow,8),r.Pb(aw,8))},t.\u0275dir=r.Kb({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(t,e,i){if(1&t&&(r.Ib(i,ow,1),r.Ib(i,aw,1)),2&t){let t;r.vc(t=r.dc())&&(e.links=t),r.vc(t=r.dc())&&(e.linksWithHrefs=t)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",routerLinkActive:"routerLinkActive"},exportAs:["routerLinkActive"],features:[r.Bb]}),t})(),hw=(()=>{class t{constructor(t,e,i,n,s){this.parentContexts=t,this.location=e,this.resolver=i,this.changeDetector=s,this.activated=null,this._activatedRoute=null,this.activateEvents=new r.o,this.deactivateEvents=new r.o,this.name=n||"primary",t.onChildOutletCreated(this.name,this)}ngOnDestroy(){this.parentContexts.onChildOutletDestroyed(this.name)}ngOnInit(){if(!this.activated){const t=this.parentContexts.getContext(this.name);t&&t.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.resolver||null))}}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();const t=this.activated;return this.activated=null,this._activatedRoute=null,t}attach(t,e){this.activated=t,this._activatedRoute=e,this.location.insert(t.hostView)}deactivate(){if(this.activated){const t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}}activateWith(t,e){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=t;const i=(e=e||this.resolver).resolveComponentFactory(t._futureSnapshot.routeConfig.component),n=this.parentContexts.getOrCreateContext(this.name).children,r=new uw(t,n,this.location.injector);this.activated=this.location.createComponent(i,this.location.length,r),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(tw),r.Pb(r.S),r.Pb(r.j),r.ac("name"),r.Pb(r.h))},t.\u0275dir=r.Kb({type:t,selectors:[["router-outlet"]],outputs:{activateEvents:"activate",deactivateEvents:"deactivate"},exportAs:["outlet"]}),t})();class uw{constructor(t,e,i){this.route=t,this.childContexts=e,this.parent=i}get(t,e){return t===N_?this.route:t===tw?this.childContexts:this.parent.get(t,e)}}class dw{}class pw{preload(t,e){return e().pipe(qd(()=>Se(null)))}}class fw{preload(t,e){return Se(null)}}let mw=(()=>{class t{constructor(t,e,i,n,r){this.router=t,this.injector=n,this.preloadingStrategy=r,this.loader=new Xy(e,i,e=>t.triggerEvent(new Gv(e)),e=>t.triggerEvent(new Wv(e)))}setUpPreloading(){this.subscription=this.router.events.pipe(He(t=>t instanceof Uv),np(()=>this.preload())).subscribe(()=>{})}preload(){const t=this.injector.get(r.z);return this.processRoutes(t,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(t,e){const i=[];for(const n of e)if(n.loadChildren&&!n.canLoad&&n._loadedConfig){const t=n._loadedConfig;i.push(this.processRoutes(t.module,t.routes))}else n.loadChildren&&!n.canLoad?i.push(this.preloadConfig(t,n)):n.children&&i.push(this.processRoutes(t,n.children));return Object(On.a)(i).pipe(Object(Dn.a)(),Object(Ge.a)(t=>{}))}preloadConfig(t,e){return this.preloadingStrategy.preload(e,()=>(e._loadedConfig?Se(e._loadedConfig):this.loader.load(t.injector,e)).pipe(Object(ip.a)(t=>(e._loadedConfig=t,this.processRoutes(t.module,t.routes)))))}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(sw),r.Zb(r.y),r.Zb(r.i),r.Zb(r.t),r.Zb(dw))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),gw=(()=>{class t{constructor(t,e,i={}){this.router=t,this.viewportScroller=e,this.options=i,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},i.scrollPositionRestoration=i.scrollPositionRestoration||"disabled",i.anchorScrolling=i.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.router.events.subscribe(t=>{t instanceof Lv?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=t.navigationTrigger,this.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof Uv&&(this.lastId=t.id,this.scheduleScrollEvent(t,this.router.parseUrl(t.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.router.events.subscribe(t=>{t instanceof Xv&&(t.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(t.position):t.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(t.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(t,e){this.router.triggerEvent(new Xv(t,"popstate"===this.lastSource?this.store[this.restoredId]:null,e))}ngOnDestroy(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(sw),r.Zb(It),r.Zb(void 0))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();const Aw=new r.s("ROUTER_CONFIGURATION"),bw=new r.s("ROUTER_FORROOT_GUARD"),vw=[w,{provide:A_,useClass:b_},{provide:sw,useFactory:function(t,e,i,n,r,s,a,l={},c,h){const u=new sw(null,t,e,i,n,r,s,s_(a));if(c&&(u.urlHandlingStrategy=c),h&&(u.routeReuseStrategy=h),function(t,e){t.errorHandler&&(e.errorHandler=t.errorHandler),t.malformedUriErrorHandler&&(e.malformedUriErrorHandler=t.malformedUriErrorHandler),t.onSameUrlNavigation&&(e.onSameUrlNavigation=t.onSameUrlNavigation),t.paramsInheritanceStrategy&&(e.paramsInheritanceStrategy=t.paramsInheritanceStrategy),t.relativeLinkResolution&&(e.relativeLinkResolution=t.relativeLinkResolution),t.urlUpdateStrategy&&(e.urlUpdateStrategy=t.urlUpdateStrategy)}(l,u),l.enableTracing){const t=o();u.events.subscribe(e=>{t.logGroup(`Router Event: ${e.constructor.name}`),t.log(e.toString()),t.log(e),t.logGroupEnd()})}return u},deps:[A_,tw,w,r.t,r.y,r.i,Qy,Aw,[class{},new r.C],[class{},new r.C]]},tw,{provide:N_,useFactory:function(t){return t.routerState.root},deps:[sw]},{provide:r.y,useClass:r.N},mw,fw,pw,{provide:Aw,useValue:{enableTracing:!1}}];function _w(){return new r.A("Router",sw)}let yw=(()=>{class t{constructor(t,e){}static forRoot(e,i){return{ngModule:t,providers:[vw,Sw(e),{provide:bw,useFactory:Cw,deps:[[sw,new r.C,new r.M]]},{provide:Aw,useValue:i||{}},{provide:A,useFactory:xw,deps:[l,[new r.q(v),new r.C],Aw]},{provide:gw,useFactory:ww,deps:[sw,It,Aw]},{provide:dw,useExisting:i&&i.preloadingStrategy?i.preloadingStrategy:fw},{provide:r.A,multi:!0,useFactory:_w},[kw,{provide:r.d,multi:!0,useFactory:Ew,deps:[kw]},{provide:Iw,useFactory:Dw,deps:[kw]},{provide:r.b,multi:!0,useExisting:Iw}]]}}static forChild(e){return{ngModule:t,providers:[Sw(e)]}}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(bw,8),r.Zb(sw,8))},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({}),t})();function ww(t,e,i){return i.scrollOffset&&e.setOffset(i.scrollOffset),new gw(t,e,i)}function xw(t,e,i={}){return i.useHash?new y(t,e):new _(t,e)}function Cw(t){return"guarded"}function Sw(t){return[{provide:r.a,multi:!0,useValue:t},{provide:Qy,multi:!0,useValue:t}]}let kw=(()=>{class t{constructor(t){this.injector=t,this.initNavigation=!1,this.resultOfPreactivationDone=new _e.a}appInitializer(){return this.injector.get(h,Promise.resolve(null)).then(()=>{let t=null;const e=new Promise(e=>t=e),i=this.injector.get(sw),n=this.injector.get(Aw);return"disabled"===n.initialNavigation?(i.setUpLocationChangeListener(),t(!0)):"enabled"===n.initialNavigation||"enabledBlocking"===n.initialNavigation?(i.hooks.afterPreactivation=()=>this.initNavigation?Se(null):(this.initNavigation=!0,t(!0),this.resultOfPreactivationDone),i.initialNavigation()):t(!0),e})}bootstrapListener(t){const e=this.injector.get(Aw),i=this.injector.get(mw),n=this.injector.get(gw),s=this.injector.get(sw),o=this.injector.get(r.g);t===o.components[0]&&("enabledNonBlocking"!==e.initialNavigation&&void 0!==e.initialNavigation||s.initialNavigation(),i.setUpPreloading(),n.init(),s.resetRootComponentType(o.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.t))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();function Ew(t){return t.appInitializer.bind(t)}function Dw(t){return t.bootstrapListener.bind(t)}const Iw=new r.s("Router Initializer"),Pw=["stepHolder"],Ow=["stepContainer"];function Mw(t,e){if(1&t&&r.Qb(0,"joyride-arrow",17),2&t){const t=r.gc();r.Fc("top",t.arrowTopPosition,"px")("left",t.arrowLeftPosition,"px"),r.nc("position",t.arrowPosition)}}function Tw(t,e){1&t&&r.Rb(0)}function Rw(t,e){if(1&t&&(r.Kc(0),r.hc(1,"async")),2&t){const t=r.gc();r.Mc(" ",r.ic(1,1,t.text)," ")}}function Vw(t,e){1&t&&r.Rb(0)}function Fw(t,e){if(1&t&&(r.Vb(0,"div",20),r.Kc(1),r.Ub()),2&t){const t=r.gc(2);r.Db(1),r.Lc(t.counter)}}function Lw(t,e){if(1&t&&(r.Vb(0,"div",18),r.Ic(1,Vw,1,0,"ng-container",9),r.Ic(2,Fw,2,1,"ng-template",null,19,r.Jc),r.Ub()),2&t){const t=r.wc(3),e=r.gc();r.Db(1),r.nc("ngTemplateOutlet",e.customCounter?e.customCounter:t)("ngTemplateOutletContext",e.counterData)}}function Uw(t,e){1&t&&r.Rb(0)}function Bw(t,e){if(1&t&&(r.Vb(0,"joyride-button",24),r.Kc(1),r.hc(2,"async"),r.Ub()),2&t){const t=r.gc(2);r.nc("color",t.themeColor),r.Db(1),r.Lc(r.ic(2,2,t.prevText))}}function Nw(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",21),r.cc("click",function(){return r.Ac(t),r.gc().prev()}),r.Ic(1,Uw,1,0,"ng-container",22),r.Ic(2,Bw,3,4,"ng-template",null,23,r.Jc),r.Ub()}if(2&t){const t=r.wc(3),e=r.gc();r.Db(1),r.nc("ngTemplateOutlet",e.customPrevButton?e.customPrevButton:t)}}function jw(t,e){1&t&&r.Rb(0)}function zw(t,e){if(1&t&&(r.Vb(0,"joyride-button",27),r.Kc(1),r.hc(2,"async"),r.Ub()),2&t){const t=r.gc(2);r.nc("color",t.themeColor),r.Db(1),r.Lc(r.ic(2,2,t.nextText))}}function Hw(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",25),r.cc("click",function(){return r.Ac(t),r.gc().next()}),r.Ic(1,jw,1,0,"ng-container",22),r.Ic(2,zw,3,4,"ng-template",null,26,r.Jc),r.Ub()}if(2&t){const t=r.wc(3),e=r.gc();r.Db(1),r.nc("ngTemplateOutlet",e.customNextButton?e.customNextButton:t)}}function Kw(t,e){1&t&&r.Rb(0)}function $w(t,e){if(1&t&&(r.Vb(0,"joyride-button",30),r.Kc(1),r.hc(2,"async"),r.Ub()),2&t){const t=r.gc(2);r.nc("color",t.themeColor),r.Db(1),r.Lc(r.ic(2,2,t.doneText))}}function Gw(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",28),r.cc("click",function(){return r.Ac(t),r.gc().close()}),r.Ic(1,Kw,1,0,"ng-container",22),r.Ic(2,$w,3,4,"ng-template",null,29,r.Jc),r.Ub()}if(2&t){const t=r.wc(3),e=r.gc();r.Db(1),r.nc("ngTemplateOutlet",e.customDoneButton?e.customDoneButton:t)}}const Ww=function(t,e,i){return{"background-color":t,color:e,"border-color":i}},Zw=["*"];class qw{constructor(){this.title=new $n,this.text=new $n}}const Yw={prev:Se("prev"),next:Se("next"),done:Se("done"),close:Se(null)};let Qw=(()=>{let t=class{constructor(){this.themeColor="#3b5560",this.stepDefaultPosition="bottom",this.logsEnabled=!1,this.showCounter=!0,this.showPrevButton=!0,this.stepsOrder=[]}setOptions(t){this.stepsOrder=t.steps,this.stepDefaultPosition=t.stepDefaultPosition?t.stepDefaultPosition:this.stepDefaultPosition,this.logsEnabled=void 0!==t.logsEnabled?t.logsEnabled:this.logsEnabled,this.showCounter=void 0!==t.showCounter?t.showCounter:this.showCounter,this.showPrevButton=void 0!==t.showPrevButton?t.showPrevButton:this.showPrevButton,this.themeColor=t.themeColor?t.themeColor:this.themeColor,this.firstStep=t.startWith,this.waitingTime=void 0!==t.waitingTime?t.waitingTime:1,this.setCustomText(void 0!==t.customTexts?t.customTexts:Yw)}getBackdropColor(){return this.hexToRgb(this.themeColor)}getThemeColor(){return this.themeColor}getStepDefaultPosition(){return this.stepDefaultPosition}getStepsOrder(){return this.stepsOrder}getFirstStep(){return this.firstStep}getWaitingTime(){return this.waitingTime}areLogsEnabled(){return this.logsEnabled}isCounterVisible(){return this.showCounter}isPrevButtonVisible(){return this.showPrevButton}getCustomTexts(){return this.customTexts}setCustomText(t){let e,i,n,r;e=t.prev?t.prev:Yw.prev,i=t.next?t.next:Yw.next,n=t.done?t.done:Yw.done,r=t.close?t.close:Yw.close,this.customTexts={prev:this.toObservable(e),next:this.toObservable(i),done:this.toObservable(n),close:this.toObservable(r)}}toObservable(t){return t instanceof Ze.a?t:Se(t)}hexToRgb(t){t=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(t,e,i,n)=>e+e+i+i+n+n);const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?`${parseInt(e[1],16)}, ${parseInt(e[2],16)}, ${parseInt(e[3],16)}`:null}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})();const Xw="ngx-joyride:::";let Jw=(()=>{let t=class{constructor(t){this.optionService=t}debug(t,e=""){this.optionService.areLogsEnabled()&&console.debug(Xw+t,e)}info(t,e=""){this.optionService.areLogsEnabled()&&console.info(Xw+t,e)}warn(t,e=""){this.optionService.areLogsEnabled()&&console.warn(Xw+t,e)}error(t,e=""){this.optionService.areLogsEnabled()&&console.error(Xw+t,e)}};return t.\u0275fac=function(e){return new(e||t)(r.Zb(Qw))},t.\u0275prov=r.Lb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})();class tx extends Error{constructor(t){super(t),Object.setPrototypeOf(this,tx.prototype)}}class ex extends Error{constructor(t){super(t),Object.setPrototypeOf(this,ex.prototype)}}class ix extends Error{constructor(t){super(t),Object.setPrototypeOf(this,ix.prototype)}}var nx=function(t){return t.NEXT="NEXT",t.PREV="PREV",t}({});let rx=(()=>{let t=class{constructor(t,e){this.stepOptions=t,this.logger=e,this.tempSteps=[],this.currentStepIndex=-2,this.stepHasBeenModified=new _e.a}getFirstStepIndex(){const t=this.stepOptions.getFirstStep();let e=this.stepOptions.getStepsOrder().indexOf(t);return e<0&&(e=0,void 0!==t&&this.logger.warn(`The step ${t} does not exist. Check in your step list if it's present.`)),e}init(){this.logger.info("Initializing the steps array."),this.steps=[],this.currentStepIndex=this.getFirstStepIndex()-1,this.stepOptions.getStepsOrder().forEach(t=>this.steps.push({id:t,step:null}))}addStep(t){if(this.tempSteps.filter(e=>e.name===t.name).length>0){let e=this.tempSteps.findIndex(e=>e.name===t.name);this.tempSteps[e]=t}else this.logger.info(`Adding step ${t.name} to the steps list.`),this.tempSteps.push(t)}get(t){if(t===nx.NEXT?this.currentStepIndex++:this.currentStepIndex--,this.currentStepIndex<0||this.currentStepIndex>=this.steps.length)throw new ix("The first or last step of the tour cannot be found!");const e=this.getStepName(this.steps[this.currentStepIndex].id),i=this.tempSteps.findIndex(t=>t.name===e);let n=this.tempSteps[i];return this.steps[this.currentStepIndex].step=n,null==n&&this.logger.warn(`Step ${this.steps[this.currentStepIndex].id} not found in the DOM. Check if it's hidden by *ngIf directive.`),n}getStepRoute(t){let e;return e=t===nx.NEXT?this.steps[this.currentStepIndex+1]?this.steps[this.currentStepIndex+1].id:null:this.steps[this.currentStepIndex-1]?this.steps[this.currentStepIndex-1].id:null,e&&e.includes("@")?e.split("@")[1]:""}updatePosition(t,e){let i=this.getStepIndex(t);this.steps[i].step?(this.steps[i].step.position=e,this.stepHasBeenModified.next(this.steps[i].step)):this.logger.warn(`Trying to modify the position of ${t} to ${e}. Step not found!Is this step located in a different route?`)}getStepNumber(t){return this.getStepIndex(t)+1}getStepsCount(){return this.stepOptions.getStepsOrder().length}getStepIndex(t){const e=this.steps.map(t=>t.id.includes("@")?t.id.split("@")[0]:t.id).findIndex(e=>t===e);if(-1===e)throw new tx(`The step with name: ${t} does not exist in the step list.`);return e}getStepName(t){return t&&t.includes("@")?t.split("@")[0]:t}};return t.\u0275fac=function(e){return new(e||t)(r.Zb(Qw),r.Zb(Jw))},t.\u0275prov=r.Lb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})(),sx=(()=>{let t=class{constructor(t){this.platformId=t,this.fakeDocument={body:{},documentElement:{}},this.fakeWindow={document:this.fakeDocument,navigator:{}}}getNativeWindow(){return Dt(this.platformId)?window:this.fakeWindow}getNativeDocument(){return Dt(this.platformId)?document:this.fakeDocument}};return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.D))},t.\u0275prov=r.Lb({token:t,factory:function(e){return t.\u0275fac(e)}}),t=Object(ue.b)([Object(ue.c)(0,Object(r.q)(r.D))],t),t})(),ox=(()=>{let t=class{setPrevButton(t){this._prevButton=t}getPrevButton(){return this._prevButton}setNextButton(t){this._nextButton=t}getNextButton(){return this._nextButton}setDoneButton(t){this._doneButton=t}getDoneButton(){return this._doneButton}setCounter(t){this._counter=t}getCounter(){return this._counter}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})(),ax=(()=>{let t=class{constructor(t,e,i,n,s,o){this.joyrideStepsContainer=t,this.viewContainerRef=e,this.domService=i,this.router=n,this.templateService=s,this.platformId=o,this.stepPosition="NO_POSITION",this.prev=new r.o,this.next=new r.o,this.done=new r.o,this.subscriptions=[],this.windowRef=this.domService.getNativeWindow(),this.step=new qw}ngAfterViewInit(){if(Dt(this.platformId)){if(this.prevTemplate&&this.templateService.setPrevButton(this.prevTemplate),this.nextTemplate&&this.templateService.setNextButton(this.nextTemplate),this.doneTemplate&&this.templateService.setDoneButton(this.doneTemplate),this.counterTemplate&&this.templateService.setCounter(this.counterTemplate),this.step.position=this.stepPosition,this.step.targetViewContainer=this.viewContainerRef,this.setAsyncFields(this.step),this.step.stepContent=this.stepContent,this.step.stepContentParams=this.stepContentParams,this.step.nextClicked=this.next,this.step.prevCliked=this.prev,this.step.tourDone=this.done,!this.name)throw new tx("All the steps should have the 'joyrideStep' property set with a custom name.");this.step.name=this.name,this.step.route="/"===this.router.url.substr(0,1)?this.router.url.substr(1):this.router.url,this.step.transformCssStyle=this.windowRef.getComputedStyle(this.viewContainerRef.element.nativeElement).transform,this.step.isElementOrAncestorFixed=this.isElementFixed(this.viewContainerRef.element)||this.isAncestorsFixed(this.viewContainerRef.element.nativeElement.parentElement),this.joyrideStepsContainer.addStep(this.step)}}ngOnChanges(t){(t.title||t.text)&&this.setAsyncFields(this.step)}isElementFixed(t){return"fixed"===this.windowRef.getComputedStyle(t.nativeElement).position}setAsyncFields(t){this.title instanceof Ze.a?this.subscriptions.push(this.title.subscribe(e=>{t.title.next(e)})):t.title.next(this.title),this.text instanceof Ze.a?this.subscriptions.push(this.text.subscribe(e=>{t.text.next(e)})):t.text.next(this.text)}isAncestorsFixed(t){if(!t||!t.parentElement)return!1;let e="fixed"===this.windowRef.getComputedStyle(t.parentElement).position;return"BODY"===t.nodeName?e:!!e||this.isAncestorsFixed(t.parentElement)}ngOnDestroy(){this.subscriptions.forEach(t=>{t.unsubscribe()})}};return t.\u0275fac=function(e){return new(e||t)(r.Pb(rx),r.Pb(r.S),r.Pb(sx),r.Pb(sw),r.Pb(ox),r.Pb(r.D))},t.\u0275dir=r.Kb({type:t,selectors:[["joyrideStep"],["","joyrideStep",""]],inputs:{stepPosition:"stepPosition",name:["joyrideStep","name"],nextStep:"nextStep",title:"title",text:"text",stepContent:"stepContent",stepContentParams:"stepContentParams",prevTemplate:"prevTemplate",nextTemplate:"nextTemplate",doneTemplate:"doneTemplate",counterTemplate:"counterTemplate"},outputs:{prev:"prev",next:"next",done:"done"},features:[r.Bb]}),t=Object(ue.b)([Object(ue.c)(5,Object(r.q)(r.D))],t),t})(),lx=(()=>{let t=class{constructor(t){this.DOMService=t,this.setDocumentHeight(),document.elementsFromPoint||(document.elementsFromPoint=this.elementsFromPoint.bind(this))}getElementFixedTop(t){return t.nativeElement.getBoundingClientRect().top}getElementFixedLeft(t){return t.nativeElement.getBoundingClientRect().left}getElementAbsoluteTop(t){const e=this.getScrollOffsets();return t.nativeElement.getBoundingClientRect().top+e.y}getElementAbsoluteLeft(t){const e=this.getScrollOffsets();return t.nativeElement.getBoundingClientRect().left+e.x}setDocumentHeight(){this.documentHeight=this.calculateDocumentHeight()}getDocumentHeight(){return this.documentHeight}isParentScrollable(t){return this.getFirstScrollableParent(t.nativeElement)!==this.DOMService.getNativeDocument().body}isElementBeyondOthers(t,e,i){const n=e?this.getElementFixedLeft(t):this.getElementAbsoluteLeft(t),r=e?this.getElementFixedTop(t):this.getElementAbsoluteTop(t),s=n+t.nativeElement.getBoundingClientRect().width-1,o=r+t.nativeElement.getBoundingClientRect().height-1,a=this.DOMService.getNativeDocument().elementsFromPoint(n,r),l=this.DOMService.getNativeDocument().elementsFromPoint(s,o);return 0===a.length&&0===l.length?1:this.getFirstElementWithoutKeyword(a,i)!==t.nativeElement||this.getFirstElementWithoutKeyword(l,i)!==t.nativeElement?2:3}scrollIntoView(t,e){const i=this.getFirstScrollableParent(t.nativeElement),n=e?this.getElementFixedTop(t):this.getElementAbsoluteTop(t);i!==this.DOMService.getNativeDocument().body?i.scrollTo?i.scrollTo(0,n-150):i.scrollTop=n-150:this.DOMService.getNativeWindow().scrollTo(0,n-150)}scrollToTheTop(t){const e=this.getFirstScrollableParent(t.nativeElement);e!==this.DOMService.getNativeDocument().body?e.scrollTo?e.scrollTo(0,0):e.scrollTop=0:this.DOMService.getNativeWindow().scrollTo(0,0)}scrollToTheBottom(t){const e=this.getFirstScrollableParent(t.nativeElement);e!==this.DOMService.getNativeDocument().body?e.scrollTo?e.scrollTo(0,this.DOMService.getNativeDocument().body.scrollHeight):e.scrollTop=e.scrollHeight-e.clientHeight:this.DOMService.getNativeWindow().scrollTo(0,this.DOMService.getNativeDocument().body.scrollHeight)}getFirstScrollableParent(t){const e=/(auto|scroll|overlay)/,i=(t,e)=>this.DOMService.getNativeWindow().getComputedStyle(t,null).getPropertyValue(e),n=t=>t&&t!==this.DOMService.getNativeDocument().body?(t=>e.test(i(t,"overflow")+i(t,"overflow-y")+i(t,"overflow-x")))(t)?t:n(t.parentNode):this.DOMService.getNativeDocument().body;return n(t)}calculateDocumentHeight(){const t=this.DOMService.getNativeDocument();return Math.max(t.body.scrollHeight,t.documentElement.scrollHeight,t.body.offsetHeight,t.documentElement.offsetHeight,t.body.clientHeight,t.documentElement.clientHeight)}getScrollOffsets(){const t=this.DOMService.getNativeWindow(),e=this.DOMService.getNativeDocument();return null!=t.pageXOffset?{x:t.pageXOffset,y:t.pageYOffset}:"CSS1Compat"==e.compatMode?{x:e.documentElement.scrollLeft,y:e.documentElement.scrollTop}:{x:e.body.scrollLeft,y:e.body.scrollTop}}elementsFromPoint(t,e){var i=[],n=void 0;do{const r=this.DOMService.getNativeDocument().elementFromPoint(t,e);r&&n!==r?(i.push(n=r),n.style.pointerEvents="none"):n=!1}while(n);return i.forEach(function(t){return t.style.pointerEvents="all"}),i}getFirstElementWithoutKeyword(t,e){for(;t[0]&&t[0].classList.toString().includes(e);)t.shift();return t[0]}};return t.\u0275fac=function(e){return new(e||t)(r.Zb(sx))},t.\u0275prov=r.Lb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})(),cx=(()=>{let t=class{constructor(t,e,i){this.documentService=t,this.optionsService=e,this.rendererFactory=i,this.lastXScroll=0,this.lastYScroll=0,this.setRenderer()}setRenderer(){this.renderer=this.rendererFactory.createRenderer(null,null)}draw(t){this.elementRef=t.targetViewContainer,this.targetAbsoluteTop=this.getTargetTotalTop(t),this.targetAbsoluteLeft=this.getTargetTotalLeft(t),this.currentBackdropContainer=this.renderer.createElement("div"),this.renderer.addClass(this.currentBackdropContainer,"backdrop-container"),this.renderer.setStyle(this.currentBackdropContainer,"position","fixed"),this.renderer.setStyle(this.currentBackdropContainer,"top","0px"),this.renderer.setStyle(this.currentBackdropContainer,"left","0px"),this.renderer.setStyle(this.currentBackdropContainer,"width","100%"),this.renderer.setStyle(this.currentBackdropContainer,"height","100%"),this.renderer.setStyle(this.currentBackdropContainer,"z-index","1000"),this.renderer.setAttribute(this.currentBackdropContainer,"id","backdrop-"+t.name),this.backdropContent=this.renderer.createElement("div"),this.renderer.addClass(this.backdropContent,"backdrop-content"),this.renderer.setStyle(this.backdropContent,"position","relative"),this.renderer.setStyle(this.backdropContent,"height","100%"),this.renderer.setStyle(this.backdropContent,"display","flex"),this.renderer.setStyle(this.backdropContent,"flex-direction","column"),this.renderer.appendChild(this.currentBackdropContainer,this.backdropContent),this.backdropTop=this.renderer.createElement("div"),this.renderer.addClass(this.backdropTop,"joyride-backdrop"),this.renderer.addClass(this.backdropTop,"backdrop-top"),this.renderer.setStyle(this.backdropTop,"width","100%"),this.renderer.setStyle(this.backdropTop,"height",this.targetAbsoluteTop-this.lastYScroll+"px"),this.renderer.setStyle(this.backdropTop,"flex-shrink","0"),this.renderer.setStyle(this.backdropTop,"background-color",`rgba(${this.optionsService.getBackdropColor()}, 0.7)`),this.renderer.appendChild(this.backdropContent,this.backdropTop),this.backdropMiddleContainer=this.renderer.createElement("div"),this.renderer.addClass(this.backdropMiddleContainer,"backdrop-middle-container"),this.renderer.setStyle(this.backdropMiddleContainer,"height",this.elementRef.element.nativeElement.offsetHeight+"px"),this.renderer.setStyle(this.backdropMiddleContainer,"width","100%"),this.renderer.setStyle(this.backdropMiddleContainer,"flex-shrink","0"),this.renderer.appendChild(this.backdropContent,this.backdropMiddleContainer),this.backdropMiddleContent=this.renderer.createElement("div"),this.renderer.addClass(this.backdropMiddleContent,"backdrop-middle-content"),this.renderer.setStyle(this.backdropMiddleContent,"display","flex"),this.renderer.setStyle(this.backdropMiddleContent,"width","100%"),this.renderer.setStyle(this.backdropMiddleContent,"height","100%"),this.renderer.appendChild(this.backdropMiddleContainer,this.backdropMiddleContent),this.leftBackdrop=this.renderer.createElement("div"),this.renderer.addClass(this.leftBackdrop,"joyride-backdrop"),this.renderer.addClass(this.leftBackdrop,"backdrop-left"),this.renderer.setStyle(this.leftBackdrop,"flex-shrink","0"),this.renderer.setStyle(this.leftBackdrop,"width",this.targetAbsoluteLeft-this.lastXScroll+"px"),this.renderer.setStyle(this.leftBackdrop,"background-color",`rgba(${this.optionsService.getBackdropColor()}, 0.7)`),this.renderer.appendChild(this.backdropMiddleContent,this.leftBackdrop),this.targetBackdrop=this.renderer.createElement("div"),this.renderer.addClass(this.targetBackdrop,"backdrop-target"),this.renderer.setStyle(this.targetBackdrop,"flex-shrink","0"),this.renderer.setStyle(this.targetBackdrop,"width",this.elementRef.element.nativeElement.offsetWidth+"px"),this.renderer.appendChild(this.backdropMiddleContent,this.targetBackdrop),this.rightBackdrop=this.renderer.createElement("div"),this.renderer.addClass(this.rightBackdrop,"joyride-backdrop"),this.renderer.addClass(this.rightBackdrop,"backdrop-right"),this.renderer.setStyle(this.rightBackdrop,"width","100%"),this.renderer.setStyle(this.rightBackdrop,"background-color",`rgba(${this.optionsService.getBackdropColor()}, 0.7)`),this.renderer.appendChild(this.backdropMiddleContent,this.rightBackdrop),this.backdropBottom=this.renderer.createElement("div"),this.renderer.addClass(this.backdropBottom,"joyride-backdrop"),this.renderer.addClass(this.backdropBottom,"backdrop-bottom"),this.renderer.setStyle(this.backdropBottom,"width","100%"),this.renderer.setStyle(this.backdropBottom,"height","100%"),this.renderer.setStyle(this.backdropBottom,"background-color",`rgba(${this.optionsService.getBackdropColor()}, 0.7)`),this.renderer.appendChild(this.backdropContent,this.backdropBottom),this.removeLastBackdrop(),this.drawCurrentBackdrop(),this.lastBackdropContainer=this.currentBackdropContainer}remove(){this.removeLastBackdrop()}redrawTarget(t){this.targetAbsoluteLeft=this.getTargetTotalLeft(t),this.targetAbsoluteTop=this.getTargetTotalTop(t),this.handleVerticalScroll(t),this.handleHorizontalScroll(t)}getTargetTotalTop(t){let e=t.targetViewContainer;return t.isElementOrAncestorFixed?this.documentService.getElementFixedTop(e.element):this.documentService.getElementAbsoluteTop(e.element)}getTargetTotalLeft(t){let e=t.targetViewContainer;return t.isElementOrAncestorFixed?this.documentService.getElementFixedLeft(e.element):this.documentService.getElementAbsoluteLeft(e.element)}redraw(t,e){this.lastYScroll!==e.scrollY&&(this.lastYScroll=e.scrollY,this.elementRef&&this.handleVerticalScroll(t)),this.lastXScroll!==e.scrollX&&(this.lastXScroll=e.scrollX,this.elementRef&&this.handleHorizontalScroll(t))}handleHorizontalScroll(t){let e=t.isElementOrAncestorFixed?this.targetAbsoluteLeft:this.targetAbsoluteLeft-this.lastXScroll;e>=0?(this.renderer.setStyle(this.leftBackdrop,"width",e+"px"),this.renderer.setStyle(this.targetBackdrop,"width",this.elementRef.element.nativeElement.offsetWidth+"px")):this.handleTargetPartialWidth(e)}handleTargetPartialWidth(t){this.renderer.setStyle(this.leftBackdrop,"width","0px");let e=this.elementRef.element.nativeElement.offsetWidth+t;this.renderer.setStyle(this.targetBackdrop,"width",e>=0?e+"px":"0px")}handleVerticalScroll(t){let e=t.isElementOrAncestorFixed?this.targetAbsoluteTop:this.targetAbsoluteTop-this.lastYScroll;e>=0?(this.renderer.setStyle(this.backdropTop,"height",e+"px"),this.renderer.setStyle(this.backdropMiddleContainer,"height",this.elementRef.element.nativeElement.offsetHeight+"px")):this.handleTargetPartialHeight(e)}handleTargetPartialHeight(t){this.renderer.setStyle(this.backdropTop,"height","0px");let e=this.elementRef.element.nativeElement.offsetHeight+t;this.renderer.setStyle(this.backdropMiddleContainer,"height",e>=0?e+"px":"0px")}removeLastBackdrop(){this.lastBackdropContainer&&(this.renderer.removeChild(document.body,this.lastBackdropContainer),this.lastBackdropContainer=void 0)}drawCurrentBackdrop(){this.renderer.appendChild(document.body,this.currentBackdropContainer)}};return t.\u0275fac=function(e){return new(e||t)(r.Zb(lx),r.Zb(Qw),r.Zb(r.I))},t.\u0275prov=r.Lb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})(),hx=(()=>{let t=class{constructor(t,e){this.rendererFactory=t,this.DOMService=e,this.scrollEvent=new _e.a,this.resizeEvent=new _e.a,this.renderer=t.createRenderer(null,null)}startListeningScrollEvents(){this.scrollUnlisten=this.renderer.listen("document","scroll",t=>{this.scrollEvent.next({scrollX:this.DOMService.getNativeWindow().pageXOffset,scrollY:this.DOMService.getNativeWindow().pageYOffset})})}startListeningResizeEvents(){this.resizeUnlisten=this.renderer.listen("window","resize",t=>{this.resizeEvent.next(t)})}stopListeningScrollEvents(){this.scrollUnlisten()}stopListeningResizeEvents(){this.resizeUnlisten()}};return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.I),r.Zb(sx))},t.\u0275prov=r.Lb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})(),ux=(()=>{let t=class{constructor(t,e,i,n,r,s,o,a){this.injector=t,this.stepsContainerService=e,this.eventListenerService=i,this.documentService=n,this.renderer=r,this.logger=s,this.optionsService=o,this.templateService=a,this.stepWidth=200,this.stepHeight=200,this.showArrow=!0,this.arrowSize=Ax,this.subscriptions=[]}ngOnInit(){this.joyrideStepService=this.injector.get(bx),this.documentHeight=this.documentService.getDocumentHeight(),this.subscriptions.push(this.subscribeToResizeEvents()),this.title=this.step.title.asObservable(),this.text=this.step.text.asObservable(),this.setCustomTemplates(),this.setCustomTexts(),this.counter=this.getCounter(),this.isCounterVisible=this.optionsService.isCounterVisible(),this.isPrevButtonVisible=this.optionsService.isPrevButtonVisible(),this.themeColor=this.optionsService.getThemeColor(),this.text&&this.text.subscribe(t=>this.checkRedraw(t)),this.title&&this.title.subscribe(t=>this.checkRedraw(t))}ngAfterViewInit(){if(this.isCustomized())this.renderer.setStyle(this.stepContainer.nativeElement,"max-width","90vw"),this.updateStepDimensions();else{this.renderer.setStyle(this.stepContainer.nativeElement,"max-width","400px");let t=this.getDimensionsByAspectRatio(this.stepContainer.nativeElement.clientWidth,this.stepContainer.nativeElement.clientHeight,1.212);t=this.adjustDimensions(t.width,t.height),this.stepWidth=t.width,this.stepHeight=t.height,this.renderer.setStyle(this.stepContainer.nativeElement,"width",this.stepWidth+"px"),this.renderer.setStyle(this.stepContainer.nativeElement,"height",this.stepHeight+"px")}this.drawStep()}checkRedraw(t){null!=t&&setTimeout(()=>{this.redrawStep()},2)}isCustomized(){return this.step.stepContent||this.templateService.getCounter()||this.templateService.getPrevButton()||this.templateService.getNextButton()||this.templateService.getDoneButton()}setCustomTexts(){const t=this.optionsService.getCustomTexts();this.prevText=t.prev,this.nextText=t.next,this.doneText=t.done}drawStep(){let t=this.step.isElementOrAncestorFixed?"fixed":"absolute";this.renderer.setStyle(this.stepHolder.nativeElement,"position",t),this.renderer.setStyle(this.stepHolder.nativeElement,"transform",this.step.transformCssStyle),this.targetWidth=this.step.targetViewContainer.element.nativeElement.getBoundingClientRect().width,this.targetHeight=this.step.targetViewContainer.element.nativeElement.getBoundingClientRect().height,this.targetAbsoluteLeft="fixed"===t?this.documentService.getElementFixedLeft(this.step.targetViewContainer.element):this.documentService.getElementAbsoluteLeft(this.step.targetViewContainer.element),this.targetAbsoluteTop="fixed"===t?this.documentService.getElementFixedTop(this.step.targetViewContainer.element):this.documentService.getElementAbsoluteTop(this.step.targetViewContainer.element),this.setStepStyle()}getCounter(){let t=this.stepsContainerService.getStepNumber(this.step.name),e=this.stepsContainerService.getStepsCount();return this.counterData={step:t,total:e},t+"/"+e}setCustomTemplates(){this.customContent=this.step.stepContent,this.ctx=this.step.stepContentParams,this.customPrevButton=this.templateService.getPrevButton(),this.customNextButton=this.templateService.getNextButton(),this.customDoneButton=this.templateService.getDoneButton(),this.customCounter=this.templateService.getCounter()}prev(){this.joyrideStepService.prev()}next(){this.joyrideStepService.next()}close(){this.joyrideStepService.close()}isFirstStep(){return 1===this.stepsContainerService.getStepNumber(this.step.name)}isLastStep(){return this.stepsContainerService.getStepNumber(this.step.name)===this.stepsContainerService.getStepsCount()}setStepStyle(){switch(this.step.position){case"top":this.setStyleTop();break;case"bottom":this.setStyleBottom();break;case"right":this.setStyleRight();break;case"left":this.setStyleLeft();break;case"center":this.setStyleCenter();break;default:this.setStyleBottom()}}setStyleTop(){this.stepsContainerService.updatePosition(this.step.name,"top"),this.topPosition=this.targetAbsoluteTop-gx-this.stepHeight,this.stepAbsoluteTop=this.targetAbsoluteTop-gx-this.stepHeight,this.arrowTopPosition=this.stepHeight,this.leftPosition=this.targetWidth/2-this.stepWidth/2+this.targetAbsoluteLeft,this.stepAbsoluteLeft=this.targetWidth/2-this.stepWidth/2+this.targetAbsoluteLeft,this.arrowLeftPosition=this.stepWidth/2-this.arrowSize,this.adjustLeftPosition(),this.adjustRightPosition(),this.arrowPosition="bottom",this.autofixTopPosition()}setStyleRight(){this.stepsContainerService.updatePosition(this.step.name,"right"),this.topPosition=this.targetAbsoluteTop+this.targetHeight/2-this.stepHeight/2,this.stepAbsoluteTop=this.targetAbsoluteTop+this.targetHeight/2-this.stepHeight/2,this.arrowTopPosition=this.stepHeight/2-this.arrowSize,this.leftPosition=this.targetAbsoluteLeft+this.targetWidth+gx,this.stepAbsoluteLeft=this.targetAbsoluteLeft+this.targetWidth+gx,this.arrowLeftPosition=-this.arrowSize,this.adjustTopPosition(),this.adjustBottomPosition(),this.arrowPosition="left",this.autofixRightPosition()}setStyleBottom(){this.stepsContainerService.updatePosition(this.step.name,"bottom"),this.topPosition=this.targetAbsoluteTop+this.targetHeight+gx,this.stepAbsoluteTop=this.targetAbsoluteTop+this.targetHeight+gx,this.arrowTopPosition=-this.arrowSize,this.arrowLeftPosition=this.stepWidth/2-this.arrowSize,this.leftPosition=this.targetWidth/2-this.stepWidth/2+this.targetAbsoluteLeft,this.stepAbsoluteLeft=this.targetWidth/2-this.stepWidth/2+this.targetAbsoluteLeft,this.adjustLeftPosition(),this.adjustRightPosition(),this.arrowPosition="top",this.autofixBottomPosition()}setStyleLeft(){this.stepsContainerService.updatePosition(this.step.name,"left"),this.topPosition=this.targetAbsoluteTop+this.targetHeight/2-this.stepHeight/2,this.stepAbsoluteTop=this.targetAbsoluteTop+this.targetHeight/2-this.stepHeight/2,this.arrowTopPosition=this.stepHeight/2-this.arrowSize,this.leftPosition=this.targetAbsoluteLeft-this.stepWidth-gx,this.stepAbsoluteLeft=this.targetAbsoluteLeft-this.stepWidth-gx,this.arrowLeftPosition=this.stepWidth,this.adjustTopPosition(),this.adjustBottomPosition(),this.arrowPosition="right",this.autofixLeftPosition()}setStyleCenter(){this.renderer.setStyle(this.stepHolder.nativeElement,"position","fixed"),this.renderer.setStyle(this.stepHolder.nativeElement,"top","50%"),this.renderer.setStyle(this.stepHolder.nativeElement,"left","50%"),this.updateStepDimensions(),this.renderer.setStyle(this.stepHolder.nativeElement,"transform",`translate(-${this.stepWidth/2}px, -${this.stepHeight/2}px)`),this.showArrow=!1}adjustLeftPosition(){this.leftPosition<0&&(this.arrowLeftPosition=this.arrowLeftPosition+this.leftPosition-2,this.leftPosition=2)}adjustRightPosition(){let t=document.body.clientWidth;if(this.stepAbsoluteLeft+this.stepWidth>t){let e=this.leftPosition-(this.stepAbsoluteLeft+this.stepWidth+5-t),i=e-this.leftPosition;this.leftPosition=e,this.arrowLeftPosition=this.arrowLeftPosition-i}}adjustTopPosition(){this.stepAbsoluteTop<0&&(this.arrowTopPosition=this.arrowTopPosition+this.topPosition-2,this.topPosition=2)}adjustBottomPosition(){if(this.stepAbsoluteTop+this.stepHeight>this.documentHeight){let t=this.topPosition-(this.stepAbsoluteTop+this.stepHeight+5-this.documentHeight),e=t-this.topPosition;this.topPosition=t,this.arrowTopPosition=this.arrowTopPosition-e}}autofixTopPosition(){this.positionAlreadyFixed?this.logger.warn("No step positions found for this step. The step will be centered."):this.targetAbsoluteTop-this.stepHeight-this.arrowSize<0&&(this.positionAlreadyFixed=!0,this.setStyleRight())}autofixRightPosition(){this.targetAbsoluteLeft+this.targetWidth+this.stepWidth+this.arrowSize>document.body.clientWidth&&this.setStyleBottom()}autofixBottomPosition(){this.targetAbsoluteTop+this.stepHeight+this.arrowSize+this.targetHeight>this.documentHeight&&this.setStyleLeft()}autofixLeftPosition(){this.targetAbsoluteLeft-this.stepWidth-this.arrowSize<0&&this.setStyleTop()}subscribeToResizeEvents(){return this.eventListenerService.resizeEvent.subscribe(()=>{this.redrawStep()})}redrawStep(){this.updateStepDimensions(),this.drawStep()}getDimensionsByAspectRatio(t,e,i){let n=(t+e)/(1+i);return{width:n*i,height:n}}adjustDimensions(t,e){let i=t,n=e;return t>400?(i=400,n=t*e/i):t<200&&(i=200,n=200/1.212),{width:i,height:n}}updateStepDimensions(){this.stepWidth=this.stepContainer.nativeElement.clientWidth,this.stepHeight=this.stepContainer.nativeElement.clientHeight}ngOnDestroy(){this.subscriptions.forEach(t=>{t.unsubscribe()})}};return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.t),r.Pb(rx),r.Pb(hx),r.Pb(lx),r.Pb(r.H),r.Pb(Jw),r.Pb(Qw),r.Pb(ox))},t.\u0275cmp=r.Jb({type:t,selectors:[["joyride-step"]],viewQuery:function(t,e){if(1&t&&(r.Pc(Pw,3),r.Pc(Ow,3)),2&t){let t;r.vc(t=r.dc())&&(e.stepHolder=t.first),r.vc(t=r.dc())&&(e.stepContainer=t.first)}},inputs:{step:"step"},decls:21,vars:17,consts:[[1,"joyride-step__holder",3,"id"],["stepHolder",""],["class","joyride-step__arrow",3,"position","top","left",4,"ngIf"],[1,"joyride-step__container"],["stepContainer",""],[1,"joyride-step__close",3,"click"],[1,"joyride-step__header"],[1,"joyride-step__title"],[1,"joyride-step__body"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["defaultContent",""],[1,"joyride-step__footer"],["class","joyride-step__counter-container",4,"ngIf"],[1,"joyride-step__buttons-container"],["class","joyride-step__prev-container joyride-step__button",3,"click",4,"ngIf"],["class","joyride-step__next-container joyride-step__button",3,"click",4,"ngIf","ngIfElse"],["doneButton",""],[1,"joyride-step__arrow",3,"position"],[1,"joyride-step__counter-container"],["defaultCounter",""],[1,"joyride-step__counter"],[1,"joyride-step__prev-container","joyride-step__button",3,"click"],[4,"ngTemplateOutlet"],["defaultPrevButton",""],[1,"joyride-step__prev-button",3,"color"],[1,"joyride-step__next-container","joyride-step__button",3,"click"],["defaulNextButton",""],[3,"color"],[1,"joyride-step__done-container","joyride-step__button",3,"click"],["defaultDoneButton",""],[1,"joyride-step__done-button",3,"color"]],template:function(t,e){if(1&t&&(r.Vb(0,"div",0,1),r.Ic(2,Mw,1,5,"joyride-arrow",2),r.Vb(3,"div",3,4),r.Vb(5,"joy-close-button",5),r.cc("click",function(){return e.close()}),r.Ub(),r.Vb(6,"div",6),r.Vb(7,"div",7),r.Kc(8),r.hc(9,"async"),r.Ub(),r.Ub(),r.Vb(10,"div",8),r.Ic(11,Tw,1,0,"ng-container",9),r.Ic(12,Rw,2,3,"ng-template",null,10,r.Jc),r.Ub(),r.Vb(14,"div",11),r.Ic(15,Lw,4,2,"div",12),r.Vb(16,"div",13),r.Ic(17,Nw,4,1,"div",14),r.Ic(18,Hw,4,1,"div",15),r.Ic(19,Gw,4,1,"ng-template",null,16,r.Jc),r.Ub(),r.Ub(),r.Ub(),r.Ub()),2&t){const t=r.wc(13),i=r.wc(20);r.Fc("top",e.topPosition,"px")("left",e.leftPosition,"px"),r.nc("id","joyride-step-"+e.step.name),r.Db(2),r.nc("ngIf",e.showArrow),r.Db(5),r.Fc("color",e.themeColor),r.Db(1),r.Lc(r.ic(9,15,e.title)),r.Db(3),r.nc("ngTemplateOutlet",e.customContent?e.customContent:t)("ngTemplateOutletContext",e.ctx),r.Db(4),r.nc("ngIf",e.isCounterVisible),r.Db(2),r.nc("ngIf",e.isPrevButtonVisible&&!e.isFirstStep()),r.Db(1),r.nc("ngIf",!e.isLastStep())("ngIfElse",i)}},directives:function(){return[ut,fx,vt,dx,px]},pipes:function(){return[St]},styles:[".joyride-step__holder{position:absolute;font-family:Arial,Helvetica,sans-serif;font-size:16px;z-index:1001}.joyride-step__arrow{position:absolute;left:40px;z-index:1002}.joyride-step__container{box-sizing:border-box;position:relative;color:#000;background-color:#fff;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-pack:justify;justify-content:space-between;padding:10px;box-shadow:0 0 30px 1px #000}.joyride-step__header{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;padding:8px}.joyride-step__title{font-weight:700;font-size:20px}.joyride-step__close{position:absolute;right:10px;top:10px;width:14px;height:14px;cursor:pointer}.joyride-step__body{text-align:left;padding:10px 8px}.joyride-step__footer{display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-pack:justify;justify-content:space-between;-webkit-box-align:center;align-items:center;padding-left:8px}.joyride-step__buttons-container{display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}.joyride-step__button:first-child{margin-right:2.5px}.joyride-step__button:last-child{margin-left:2.5px}.joyride-step__counter{font-weight:700;font-size:14px}.joyride-step__counter-container{margin-right:10px}"],encapsulation:2}),t})(),dx=(()=>{let t=class{constructor(){this.position="top"}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["joyride-arrow"]],inputs:{position:"position"},decls:1,vars:8,template:function(t,e){1&t&&r.Qb(0,"div"),2&t&&r.Hb("joyride-arrow__top","top"==e.position)("joyride-arrow__bottom","bottom"==e.position)("joyride-arrow__left","left"==e.position)("joyride-arrow__right","right"==e.position)},styles:[".joyride-arrow__top{border-left:11px solid transparent;border-right:11px solid transparent;border-bottom:11px solid #fff}.joyride-arrow__bottom{border-left:11px solid transparent;border-right:11px solid transparent;border-top:11px solid #fff}.joyride-arrow__right{border-left:11px solid #fff;border-bottom:11px solid transparent;border-top:11px solid transparent}.joyride-arrow__left{border-right:11px solid #fff;border-top:11px solid transparent;border-bottom:11px solid transparent}"],encapsulation:2}),t})(),px=(()=>{let t=class{constructor(){this.clicked=new r.o}onClick(){this.clicked.emit()}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["joyride-button"]],inputs:{color:"color"},outputs:{clicked:"clicked"},ngContentSelectors:Zw,decls:2,vars:5,consts:[[1,"joyride-button",3,"ngStyle","mouseleave","mouseover","click"]],template:function(t,e){1&t&&(r.mc(),r.Vb(0,"button",0),r.cc("mouseleave",function(){return e.hover=!1})("mouseover",function(){return e.hover=!0})("click",function(){return e.onClick()}),r.lc(1),r.Ub()),2&t&&r.nc("ngStyle",r.uc(1,Ww,e.hover?"#fff":e.color,e.hover?e.color:"#fff",e.hover?e.color:"transparent"))},directives:[bt],styles:[".joyride-button[_ngcontent-%COMP%]{text-transform:uppercase;border:2px solid transparent;outline:0;padding:6px 12px;font-size:12px;font-weight:700;color:#fff;background-color:#3b5560;cursor:pointer}.joyride-button[_ngcontent-%COMP%]:hover{color:#3b5560;border:2px solid #3b5560;background-color:#fff}"]}),t})(),fx=(()=>{let t=class{};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["joy-close-button"]],decls:3,vars:0,consts:[["viewBox","0 0 25 25","xmlns","http://www.w3.org/2000/svg"],["x1","1","y1","24","x2","24","y2","1","stroke","black","stroke-width","3"],["x1","1","y1","1","x2","24","y2","24","stroke","black","stroke-width","3"]],template:function(t,e){1&t&&(r.fc(),r.Vb(0,"svg",0),r.Qb(1,"line",1),r.Qb(2,"line",2),r.Ub())},encapsulation:2}),t})(),mx=(()=>{let t=class{constructor(t,e,i){this.componentFactoryResolver=t,this.appRef=e,this.injector=i,this.refMap={}}draw(t){const e=this.componentFactoryResolver.resolveComponentFactory(ux).create(this.injector);this.appRef.attachView(e.hostView),document.body.appendChild(e.hostView.rootNodes[0]);const i=e.instance;i.step=t,e.changeDetectorRef.detectChanges(),t.stepInstance=i,this.refMap[t.name]=e}remove(t){this.appRef.detachView(this.refMap[t.name].hostView),this.refMap[t.name].destroy()}};return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.j),r.Zb(r.g),r.Zb(r.t))},t.\u0275prov=r.Lb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})();const gx=15,Ax=10;let bx=(()=>{let t=class{constructor(t,e,i,n,r,s,o,a,l){this.backDropService=t,this.eventListener=e,this.stepsContainerService=i,this.documentService=n,this.DOMService=r,this.stepDrawerService=s,this.optionsService=o,this.router=a,this.logger=l,this.winTopPosition=0,this.winBottomPosition=0,this.stepsObserver=new $n,this.initViewportPositions(),this.subscribeToScrollEvents(),this.subscribeToResizeEvents()}initViewportPositions(){this.winTopPosition=0,this.winBottomPosition=this.DOMService.getNativeWindow().innerHeight-20}subscribeToScrollEvents(){this.eventListener.startListeningScrollEvents(),this.eventListener.scrollEvent.subscribe(t=>{this.winTopPosition=t.scrollY,this.winBottomPosition=this.winTopPosition+this.DOMService.getNativeWindow().innerHeight-20,this.currentStep&&this.backDropService.redraw(this.currentStep,t)})}subscribeToResizeEvents(){this.eventListener.resizeEvent.subscribe(()=>{this.currentStep&&this.backDropService.redrawTarget(this.currentStep)})}drawStep(t){t.position="NO_POSITION"===t.position?this.optionsService.getStepDefaultPosition():t.position,this.stepDrawerService.draw(t)}startTour(){return this.stepsObserver=new $n,this.stepsContainerService.init(),this.documentService.setDocumentHeight(),this.tryShowStep(nx.NEXT),this.eventListener.startListeningResizeEvents(),this.subscribeToStepsUpdates(),this.stepsObserver.asObservable()}close(){this.removeCurrentStep(),this.notifyTourIsFinished(),this.DOMService.getNativeWindow().scrollTo(0,0),this.eventListener.stopListeningResizeEvents(),this.backDropService.remove()}prev(){this.removeCurrentStep(),this.currentStep.prevCliked.emit(),this.tryShowStep(nx.PREV)}next(){this.removeCurrentStep(),this.currentStep.nextClicked.emit(),this.tryShowStep(nx.NEXT)}navigateToStepPage(t){let e=this.stepsContainerService.getStepRoute(t);e&&this.router.navigate([e])}subscribeToStepsUpdates(){this.stepsContainerService.stepHasBeenModified.subscribe(t=>{this.currentStep&&this.currentStep.name===t.name&&(this.currentStep=t)})}tryShowStep(t){this.navigateToStepPage(t);const e=this.optionsService.getWaitingTime();e>100&&this.backDropService.remove(),setTimeout(()=>{try{this.showStep(t)}catch(e){if(e instanceof ex)this.tryShowStep(t);else{if(!(e instanceof ix))throw new Error(e);this.logger.error("Forcing the tour closure: First or Last step not found in the DOM."),this.close()}}},e)}showStep(t){if(this.currentStep=this.stepsContainerService.get(t),null==this.currentStep)throw new ex("");this.scrollIfElementBeyondOtherElements(),this.backDropService.draw(this.currentStep),this.drawStep(this.currentStep),this.scrollIfStepAndTargetAreNotVisible(),this.notifyStepClicked(t)}notifyStepClicked(t){let e={number:this.stepsContainerService.getStepNumber(this.currentStep.name),name:this.currentStep.name,route:this.currentStep.route,actionType:t};this.stepsObserver.next(e)}notifyTourIsFinished(){this.currentStep&&this.currentStep.tourDone.emit(),this.stepsObserver.complete()}removeCurrentStep(){this.currentStep&&this.stepDrawerService.remove(this.currentStep)}scrollIfStepAndTargetAreNotVisible(){this.scrollWhenTargetOrStepAreHiddenBottom(),this.scrollWhenTargetOrStepAreHiddenTop()}scrollWhenTargetOrStepAreHiddenBottom(){let t=this.getMaxTargetAndStepBottomPosition();t>this.winBottomPosition&&this.DOMService.getNativeWindow().scrollBy(0,t-this.winBottomPosition)}scrollWhenTargetOrStepAreHiddenTop(){let t=this.getMaxTargetAndStepTopPosition();t<this.winTopPosition&&this.DOMService.getNativeWindow().scrollBy(0,t-this.winTopPosition)}getMaxTargetAndStepBottomPosition(){let t=this.documentService.getElementAbsoluteTop(this.currentStep.targetViewContainer.element);return"top"===this.currentStep.position?t+this.currentStep.stepInstance.targetHeight:"bottom"===this.currentStep.position?t+this.currentStep.stepInstance.targetHeight+this.currentStep.stepInstance.stepHeight+Ax+gx:"right"===this.currentStep.position||"left"===this.currentStep.position?Math.max(t+this.currentStep.stepInstance.targetHeight,t+this.currentStep.stepInstance.targetHeight/2+this.currentStep.stepInstance.stepHeight/2):void 0}getMaxTargetAndStepTopPosition(){let t=this.documentService.getElementAbsoluteTop(this.currentStep.targetViewContainer.element);return"top"===this.currentStep.position?t-(this.currentStep.stepInstance.stepHeight+Ax+gx):"bottom"===this.currentStep.position?t:"right"===this.currentStep.position||"left"===this.currentStep.position?Math.min(t,t+this.currentStep.stepInstance.targetHeight/2-this.currentStep.stepInstance.stepHeight/2):void 0}scrollIfElementBeyondOtherElements(){2===this.isElementBeyondOthers()&&this.documentService.scrollToTheTop(this.currentStep.targetViewContainer.element),2===this.isElementBeyondOthers()&&this.documentService.scrollToTheBottom(this.currentStep.targetViewContainer.element),1===this.isElementBeyondOthers()&&this.documentService.isParentScrollable(this.currentStep.targetViewContainer.element)&&this.documentService.scrollIntoView(this.currentStep.targetViewContainer.element,this.currentStep.isElementOrAncestorFixed),1===this.isElementBeyondOthers()&&this.documentService.isParentScrollable(this.currentStep.targetViewContainer.element)&&this.currentStep.targetViewContainer.element.nativeElement.scrollIntoView()}isElementBeyondOthers(){return this.documentService.isElementBeyondOthers(this.currentStep.targetViewContainer.element,this.currentStep.isElementOrAncestorFixed,"backdrop")}};return t.\u0275fac=function(e){return new(e||t)(r.Zb(cx),r.Zb(hx),r.Zb(rx),r.Zb(lx),r.Zb(sx),r.Zb(mx),r.Zb(Qw),r.Zb(sw),r.Zb(Jw))},t.\u0275prov=r.Lb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})();class vx{}let _x=(()=>{let t=class{constructor(t,e,i){this.platformId=t,this.stepService=e,this.optionsService=i,this.tourInProgress=!1}startTour(t){return Dt(this.platformId)?(this.tourInProgress||(this.tourInProgress=!0,t&&this.optionsService.setOptions(t),this.tour$=this.stepService.startTour().pipe(Xd(()=>this.tourInProgress=!1)),this.tour$.subscribe()),this.tour$):Se(new vx)}closeTour(){this.isTourInProgress()&&this.stepService.close()}isTourInProgress(){return this.tourInProgress}};return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.D),r.Zb(bx),r.Zb(Qw))},t.\u0275prov=r.Lb({token:t,factory:function(e){return t.\u0275fac(e)}}),t=Object(ue.b)([Object(ue.c)(0,Object(r.q)(r.D))],t),t})();var yx;const wx=yw.forChild([]);let xx=(()=>{let t=yx=class{static forRoot(){return{ngModule:yx,providers:[_x,bx,rx,cx,hx,lx,Qw,mx,sx,Jw,ox]}}static forChild(){return{ngModule:yx,providers:[]}}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Et,wx]]}),t})();class Cx{constructor(t,e,i){this.project=t,this.concurrent=e,this.scheduler=i}call(t,e){return e.subscribe(new Sx(t,this.project,this.concurrent,this.scheduler))}}class Sx extends bn.b{constructor(t,e,i,n){super(t),this.project=e,this.concurrent=i,this.scheduler=n,this.index=0,this.active=0,this.hasCompleted=!1,i<Number.POSITIVE_INFINITY&&(this.buffer=[])}static dispatch(t){const{subscriber:e,result:i,value:n,index:r}=t;e.subscribeToProjection(i,n,r)}_next(t){const e=this.destination;if(e.closed)return void this._complete();const i=this.index++;if(this.active<this.concurrent){e.next(t);try{const{project:e}=this,n=e(t,i);this.scheduler?this.destination.add(this.scheduler.schedule(Sx.dispatch,0,{subscriber:this,result:n,value:t,index:i})):this.subscribeToProjection(n,t,i)}catch($nt){e.error($nt)}}else this.buffer.push(t)}subscribeToProjection(t,e,i){this.active++,this.destination.add(Object(bn.c)(t,new bn.a(this)))}_complete(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()}notifyNext(t){this._next(t)}notifyComplete(){const t=this.buffer;this.active--,t&&t.length>0&&this._next(t.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()}}class kx{}let Ex=(()=>{class t extends kx{tick(t){return Se(0).pipe(function(t,e=Number.POSITIVE_INFINITY,i){return e=(e||0)<1?Number.POSITIVE_INFINITY:e,n=>n.lift(new Cx(t,e,i))}(()=>{const e=Date.now(),i=Math.round(Math.abs(e-t)/1e3),n=i<60?1e3:i<3600?6e4:i<86400?36e5:0;return n?wn(n):Ye()}),Gg(1))}}return t.\u0275fac=function(e){return Dx(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();const Dx=r.Xb(Ex);let Ix=(()=>{class t{constructor(){this.changes=new _e.a}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();class Px{}let Ox=(()=>{class t extends Px{format(t){const{suffix:e,value:i,unit:n}=function(t){const e=Date.now(),i=Math.round(Math.abs(e-t)/1e3),n=t<e?"ago":"from now",[r,s]=i<60?[Math.round(i),"second"]:i<3600?[Math.round(i/60),"minute"]:i<86400?[Math.round(i/3600),"hour"]:i<604800?[Math.round(i/86400),"day"]:i<2592e3?[Math.round(i/604800),"week"]:i<31536e3?[Math.round(i/2592e3),"month"]:[Math.round(i/31536e3),"year"];return{value:r,unit:s,suffix:n}}(t);return this.parse(i,n,e)}parse(t,e,i){return 1!==t&&(e+="s"),t+" "+e+" "+i}}return t.\u0275fac=function(e){return Mx(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();const Mx=r.Xb(Ox);let Tx=(()=>{class t{constructor(t,e,i,n){this.clock=n,this.live=!0,this.stateChanges=new _e.a,t&&(this.intlSubscription=t.changes.subscribe(()=>this.stateChanges.next())),this.stateChanges.subscribe(()=>{this.value=i.format(this.date),e.markForCheck()})}transform(t,...e){const i=function(t){const e=new Date(t);if(!Number.isNaN(e.valueOf()))return e;const i=String(t).match(/\d+/g);if(null===i||i.length<=2)return e;{const[t,e,...n]=i.map(t=>parseInt(t,10));return new Date(Date.UTC(t,e-1,...n))}}(t).valueOf();let n;if(n=null!=e[0]?null!=(r=e[0])&&"false"!=`${r}`:this.live,this.date===i&&this.live===n)return this.value;var r;if(this.date=i,this.live=n,!this.date)throw new SyntaxError(`Wrong parameter in TimeagoPipe. Expected a valid date, received: ${t}`);return this.clockSubscription&&(this.clockSubscription.unsubscribe(),this.clockSubscription=void 0),this.clockSubscription=this.clock.tick(this.date).pipe(He(()=>this.live,this)).subscribe(()=>this.stateChanges.next()),this.stateChanges.next(),this.value}ngOnDestroy(){this.intlSubscription&&(this.intlSubscription.unsubscribe(),this.intlSubscription=void 0),this.clockSubscription&&(this.clockSubscription.unsubscribe(),this.clockSubscription=void 0),this.stateChanges.complete()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Ix,8),r.bc(),r.Pb(Px),r.Pb(kx))},t.\u0275pipe=r.Ob({name:"timeago",type:t,pure:!1}),t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),Rx=(()=>{class t{static forRoot(e={}){return{ngModule:t,providers:[e.clock||{provide:kx,useClass:Ex},e.intl||[],e.formatter||{provide:Px,useClass:Ox}]}}static forChild(e={}){return{ngModule:t,providers:[e.clock||{provide:kx,useClass:Ex},e.intl||[],e.formatter||{provide:Px,useClass:Ox}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({}),t})();var Vx=function(t,e){return(Vx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function Fx(t,e){function i(){this.constructor=t}Vx(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var Lx,Ux=function(){return(Ux=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function Bx(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],n=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Nx(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,r,s=i.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=s.next()).done;)o.push(n.value)}catch(a){r={error:a}}finally{try{n&&!n.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o}function jx(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Nx(arguments[e]));return t}!function(t){t.Ok="ok",t.Exited="exited",t.Crashed="crashed",t.Abnormal="abnormal"}(Lx||(Lx={}));var zx=i("9/Zf"),Hx=i("kdvv"),Kx=Object(zx.e)(),$x="Sentry Logger ",Gx=function(){function t(){this._enabled=!1}return t.prototype.disable=function(){this._enabled=!1},t.prototype.enable=function(){this._enabled=!0},t.prototype.log=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._enabled&&Object(zx.c)(function(){Kx.console.log($x+"[Log]: "+t.join(" "))})},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._enabled&&Object(zx.c)(function(){Kx.console.warn($x+"[Warn]: "+t.join(" "))})},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._enabled&&Object(zx.c)(function(){Kx.console.error($x+"[Error]: "+t.join(" "))})},t}();Kx.__SENTRY__=Kx.__SENTRY__||{};var Wx,Zx=Kx.__SENTRY__.logger||(Kx.__SENTRY__.logger=new Gx),qx=i("+A1k"),Yx=i("9AQC");!function(t){t.PENDING="PENDING",t.RESOLVED="RESOLVED",t.REJECTED="REJECTED"}(Wx||(Wx={}));var Qx=function(){function t(t){var e=this;this._state=Wx.PENDING,this._handlers=[],this._resolve=function(t){e._setResult(Wx.RESOLVED,t)},this._reject=function(t){e._setResult(Wx.REJECTED,t)},this._setResult=function(t,i){e._state===Wx.PENDING&&(Object(Yx.m)(i)?i.then(e._resolve,e._reject):(e._state=t,e._value=i,e._executeHandlers()))},this._attachHandler=function(t){e._handlers=e._handlers.concat(t),e._executeHandlers()},this._executeHandlers=function(){if(e._state!==Wx.PENDING){var t=e._handlers.slice();e._handlers=[],t.forEach(function(t){t.done||(e._state===Wx.RESOLVED&&t.onfulfilled&&t.onfulfilled(e._value),e._state===Wx.REJECTED&&t.onrejected&&t.onrejected(e._value),t.done=!0)})}};try{t(this._resolve,this._reject)}catch($nt){this._reject($nt)}}return t.resolve=function(e){return new t(function(t){t(e)})},t.reject=function(e){return new t(function(t,i){i(e)})},t.all=function(e){return new t(function(i,n){if(Array.isArray(e))if(0!==e.length){var r=e.length,s=[];e.forEach(function(e,o){t.resolve(e).then(function(t){s[o]=t,0==(r-=1)&&i(s)}).then(null,n)})}else i([]);else n(new TypeError("Promise.all requires an array as input."))})},t.prototype.then=function(e,i){var n=this;return new t(function(t,r){n._attachHandler({done:!1,onfulfilled:function(i){if(e)try{return void t(e(i))}catch($nt){return void r($nt)}else t(i)},onrejected:function(e){if(i)try{return void t(i(e))}catch($nt){return void r($nt)}else r(e)}})})},t.prototype.catch=function(t){return this.then(function(t){return t},t)},t.prototype.finally=function(e){var i=this;return new t(function(t,n){var r,s;return i.then(function(t){s=!1,r=t,e&&e()},function(t){s=!0,r=t,e&&e()}).then(function(){s?n(r):t(r)})})},t.prototype.toString=function(){return"[object SyncPromise]"},t}(),Xx=function(){function t(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._user={},this._tags={},this._extra={},this._contexts={}}return t.clone=function(e){var i=new t;return e&&(i._breadcrumbs=jx(e._breadcrumbs),i._tags=Ux({},e._tags),i._extra=Ux({},e._extra),i._contexts=Ux({},e._contexts),i._user=e._user,i._level=e._level,i._span=e._span,i._session=e._session,i._transactionName=e._transactionName,i._fingerprint=e._fingerprint,i._eventProcessors=jx(e._eventProcessors)),i},t.prototype.addScopeListener=function(t){this._scopeListeners.push(t)},t.prototype.addEventProcessor=function(t){return this._eventProcessors.push(t),this},t.prototype.setUser=function(t){return this._user=t||{},this._session&&this._session.update({user:t}),this._notifyScopeListeners(),this},t.prototype.getUser=function(){return this._user},t.prototype.setTags=function(t){return this._tags=Ux(Ux({},this._tags),t),this._notifyScopeListeners(),this},t.prototype.setTag=function(t,e){var i;return this._tags=Ux(Ux({},this._tags),((i={})[t]=e,i)),this._notifyScopeListeners(),this},t.prototype.setExtras=function(t){return this._extra=Ux(Ux({},this._extra),t),this._notifyScopeListeners(),this},t.prototype.setExtra=function(t,e){var i;return this._extra=Ux(Ux({},this._extra),((i={})[t]=e,i)),this._notifyScopeListeners(),this},t.prototype.setFingerprint=function(t){return this._fingerprint=t,this._notifyScopeListeners(),this},t.prototype.setLevel=function(t){return this._level=t,this._notifyScopeListeners(),this},t.prototype.setTransactionName=function(t){return this._transactionName=t,this._notifyScopeListeners(),this},t.prototype.setTransaction=function(t){return this.setTransactionName(t)},t.prototype.setContext=function(t,e){var i;return null===e?delete this._contexts[t]:this._contexts=Ux(Ux({},this._contexts),((i={})[t]=e,i)),this._notifyScopeListeners(),this},t.prototype.setSpan=function(t){return this._span=t,this._notifyScopeListeners(),this},t.prototype.getSpan=function(){return this._span},t.prototype.getTransaction=function(){var t,e,i,n,r=this.getSpan();return(null===(t=r)||void 0===t?void 0:t.transaction)?null===(e=r)||void 0===e?void 0:e.transaction:(null===(n=null===(i=r)||void 0===i?void 0:i.spanRecorder)||void 0===n?void 0:n.spans[0])?r.spanRecorder.spans[0]:void 0},t.prototype.setSession=function(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this},t.prototype.getSession=function(){return this._session},t.prototype.update=function(e){if(!e)return this;if("function"==typeof e){var i=e(this);return i instanceof t?i:this}return e instanceof t?(this._tags=Ux(Ux({},this._tags),e._tags),this._extra=Ux(Ux({},this._extra),e._extra),this._contexts=Ux(Ux({},this._contexts),e._contexts),e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint)):Object(Yx.h)(e)&&(e=e,this._tags=Ux(Ux({},this._tags),e.tags),this._extra=Ux(Ux({},this._extra),e.extra),this._contexts=Ux(Ux({},this._contexts),e.contexts),e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint)),this},t.prototype.clear=function(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this},t.prototype.addBreadcrumb=function(t,e){var i=Ux({timestamp:Object(Hx.a)()},t);return this._breadcrumbs=void 0!==e&&e>=0?jx(this._breadcrumbs,[i]).slice(-e):jx(this._breadcrumbs,[i]),this._notifyScopeListeners(),this},t.prototype.clearBreadcrumbs=function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this},t.prototype.applyToEvent=function(t,e){var i;if(this._extra&&Object.keys(this._extra).length&&(t.extra=Ux(Ux({},this._extra),t.extra)),this._tags&&Object.keys(this._tags).length&&(t.tags=Ux(Ux({},this._tags),t.tags)),this._user&&Object.keys(this._user).length&&(t.user=Ux(Ux({},this._user),t.user)),this._contexts&&Object.keys(this._contexts).length&&(t.contexts=Ux(Ux({},this._contexts),t.contexts)),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span){t.contexts=Ux({trace:this._span.getTraceContext()},t.contexts);var n=null===(i=this._span.transaction)||void 0===i?void 0:i.name;n&&(t.tags=Ux({transaction:n},t.tags))}return this._applyFingerprint(t),t.breadcrumbs=jx(t.breadcrumbs||[],this._breadcrumbs),t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,this._notifyEventProcessors(jx(Jx(),this._eventProcessors),t,e)},t.prototype._notifyEventProcessors=function(t,e,i,n){var r=this;return void 0===n&&(n=0),new Qx(function(s,o){var a=t[n];if(null===e||"function"!=typeof a)s(e);else{var l=a(Ux({},e),i);Object(Yx.m)(l)?l.then(function(e){return r._notifyEventProcessors(t,e,i,n+1).then(s)}).then(null,o):r._notifyEventProcessors(t,l,i,n+1).then(s).then(null,o)}})},t.prototype._notifyScopeListeners=function(){var t=this;this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(function(e){e(t)}),this._notifyingListeners=!1)},t.prototype._applyFingerprint=function(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint},t}();function Jx(){var t=Object(zx.e)();return t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.globalEventProcessors=t.__SENTRY__.globalEventProcessors||[],t.__SENTRY__.globalEventProcessors}function tC(t){Jx().push(t)}function eC(t){try{for(var e=t,i=[],n=0,r=0,s=" > ".length,o=void 0;e&&n++<5&&!("html"===(o=iC(e))||n>1&&r+i.length*s+o.length>=80);)i.push(o),r+=o.length,e=e.parentNode;return i.reverse().join(" > ")}catch(a){return"<unknown>"}}function iC(t){var e,i,n,r,s,o=t,a=[];if(!o||!o.tagName)return"";if(a.push(o.tagName.toLowerCase()),o.id&&a.push("#"+o.id),(e=o.className)&&Object(Yx.k)(e))for(i=e.split(/\s+/),s=0;s<i.length;s++)a.push("."+i[s]);var l=["type","name","title","alt"];for(s=0;s<l.length;s++)(r=o.getAttribute(n=l[s]))&&a.push("["+n+'="'+r+'"]');return a.join("")}var nC=function(){function t(){this._hasWeakSet="function"==typeof WeakSet,this._inner=this._hasWeakSet?new WeakSet:[]}return t.prototype.memoize=function(t){if(this._hasWeakSet)return!!this._inner.has(t)||(this._inner.add(t),!1);for(var e=0;e<this._inner.length;e++)if(this._inner[e]===t)return!0;return this._inner.push(t),!1},t.prototype.unmemoize=function(t){if(this._hasWeakSet)this._inner.delete(t);else for(var e=0;e<this._inner.length;e++)if(this._inner[e]===t){this._inner.splice(e,1);break}},t}();function rC(t){try{return t&&"function"==typeof t&&t.name||"<anonymous>"}catch($nt){return"<anonymous>"}}var sC=i("+924");function oC(t,e,i){if(e in t){var n=t[e],r=i(n);if("function"==typeof r)try{r.prototype=r.prototype||{},Object.defineProperties(r,{__sentry_original__:{enumerable:!1,value:n}})}catch(s){}t[e]=r}}function aC(t){if(Object(Yx.d)(t)){var e=t,i={message:e.message,name:e.name,stack:e.stack};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(i[n]=e[n]);return i}if(Object(Yx.f)(t)){var r=t,s={};s.type=r.type;try{s.target=Object(Yx.c)(r.target)?eC(r.target):Object.prototype.toString.call(r.target)}catch(o){s.target="<unknown>"}try{s.currentTarget=Object(Yx.c)(r.currentTarget)?eC(r.currentTarget):Object.prototype.toString.call(r.currentTarget)}catch(o){s.currentTarget="<unknown>"}for(var n in"undefined"!=typeof CustomEvent&&Object(Yx.g)(t,CustomEvent)&&(s.detail=r.detail),r)Object.prototype.hasOwnProperty.call(r,n)&&(s[n]=r);return s}return t}function lC(t,e,i){void 0===e&&(e=3),void 0===i&&(i=102400);var n,r=uC(t,e);return n=JSON.stringify(r),~-encodeURI(n).split(/%..|./).length>i?lC(t,e-1,i):r}function cC(t,e){return"domain"===e&&t&&"object"==typeof t&&t._events?"[Domain]":"domainEmitter"===e?"[DomainEmitter]":"undefined"!=typeof global&&t===global?"[Global]":"undefined"!=typeof window&&t===window?"[Window]":"undefined"!=typeof document&&t===document?"[Document]":Object(Yx.l)(t)?"[SyntheticEvent]":"number"==typeof t&&t!=t?"[NaN]":void 0===t?"[undefined]":"function"==typeof t?"[Function: "+rC(t)+"]":"symbol"==typeof t?"["+String(t)+"]":"bigint"==typeof t?"[BigInt: "+String(t)+"]":t}function hC(t,e,i,n){if(void 0===i&&(i=1/0),void 0===n&&(n=new nC),0===i)return function(t){var e=Object.prototype.toString.call(t);if("string"==typeof t)return t;if("[object Object]"===e)return"[Object]";if("[object Array]"===e)return"[Array]";var i=cC(t);return Object(Yx.i)(i)?i:e}(e);if(null!=e&&"function"==typeof e.toJSON)return e.toJSON();var r=cC(e,t);if(Object(Yx.i)(r))return r;var s=aC(e),o=Array.isArray(e)?[]:{};if(n.memoize(e))return"[Circular ~]";for(var a in s)Object.prototype.hasOwnProperty.call(s,a)&&(o[a]=hC(a,s[a],i-1,n));return n.unmemoize(e),o}function uC(t,e){try{return JSON.parse(JSON.stringify(t,function(t,i){return hC(t,i,e)}))}catch(i){return"**non-serializable**"}}function dC(t,e){void 0===e&&(e=40);var i=Object.keys(aC(t));if(i.sort(),!i.length)return"[object has no keys]";if(i[0].length>=e)return Object(sC.d)(i[0],e);for(var n=i.length;n>0;n--){var r=i.slice(0,n).join(", ");if(!(r.length>e))return n===i.length?r:Object(sC.d)(r,e)}return""}function pC(t){var e,i;if(Object(Yx.h)(t)){var n=t,r={};try{for(var s=Bx(Object.keys(n)),o=s.next();!o.done;o=s.next()){var a=o.value;void 0!==n[a]&&(r[a]=pC(n[a]))}}catch(l){e={error:l}}finally{try{o&&!o.done&&(i=s.return)&&i.call(s)}finally{if(e)throw e.error}}return r}return Array.isArray(t)?t.map(pC):t}var fC=function(){function t(t){this.errors=0,this.sid=Object(zx.i)(),this.timestamp=Date.now(),this.started=Date.now(),this.duration=0,this.status=Lx.Ok,this.init=!0,t&&this.update(t)}return t.prototype.update=function(t){void 0===t&&(t={}),t.user&&(t.user.ip_address&&(this.ipAddress=t.user.ip_address),t.did||(this.did=t.user.id||t.user.email||t.user.username)),this.timestamp=t.timestamp||Date.now(),t.sid&&(this.sid=32===t.sid.length?t.sid:Object(zx.i)()),void 0!==t.init&&(this.init=t.init),t.did&&(this.did=""+t.did),"number"==typeof t.started&&(this.started=t.started),this.duration="number"==typeof t.duration?t.duration:this.timestamp-this.started,t.release&&(this.release=t.release),t.environment&&(this.environment=t.environment),t.ipAddress&&(this.ipAddress=t.ipAddress),t.userAgent&&(this.userAgent=t.userAgent),"number"==typeof t.errors&&(this.errors=t.errors),t.status&&(this.status=t.status)},t.prototype.close=function(t){t?this.update({status:t}):this.status===Lx.Ok?this.update({status:Lx.Exited}):this.update()},t.prototype.toJSON=function(){return pC({sid:""+this.sid,init:this.init,started:new Date(this.started).toISOString(),timestamp:new Date(this.timestamp).toISOString(),status:this.status,errors:this.errors,did:"number"==typeof this.did||"string"==typeof this.did?""+this.did:void 0,duration:this.duration,attrs:pC({release:this.release,environment:this.environment,ip_address:this.ipAddress,user_agent:this.userAgent})})},t}(),mC=function(){function t(t,e,i){void 0===e&&(e=new Xx),void 0===i&&(i=3),this._version=i,this._stack=[{}],this.getStackTop().scope=e,this.bindClient(t)}return t.prototype.isOlderThan=function(t){return this._version<t},t.prototype.bindClient=function(t){this.getStackTop().client=t,t&&t.setupIntegrations&&t.setupIntegrations()},t.prototype.pushScope=function(){var t=Xx.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:t}),t},t.prototype.popScope=function(){return!(this.getStack().length<=1||!this.getStack().pop())},t.prototype.withScope=function(t){var e=this.pushScope();try{t(e)}finally{this.popScope()}},t.prototype.getClient=function(){return this.getStackTop().client},t.prototype.getScope=function(){return this.getStackTop().scope},t.prototype.getStack=function(){return this._stack},t.prototype.getStackTop=function(){return this._stack[this._stack.length-1]},t.prototype.captureException=function(t,e){var i=this._lastEventId=Object(zx.i)(),n=e;if(!e){var r=void 0;try{throw new Error("Sentry syntheticException")}catch(t){r=t}n={originalException:t,syntheticException:r}}return this._invokeClient("captureException",t,Ux(Ux({},n),{event_id:i})),i},t.prototype.captureMessage=function(t,e,i){var n=this._lastEventId=Object(zx.i)(),r=i;if(!i){var s=void 0;try{throw new Error(t)}catch(o){s=o}r={originalException:t,syntheticException:s}}return this._invokeClient("captureMessage",t,e,Ux(Ux({},r),{event_id:n})),n},t.prototype.captureEvent=function(t,e){var i=this._lastEventId=Object(zx.i)();return this._invokeClient("captureEvent",t,Ux(Ux({},e),{event_id:i})),i},t.prototype.lastEventId=function(){return this._lastEventId},t.prototype.addBreadcrumb=function(t,e){var i=this.getStackTop(),n=i.scope,r=i.client;if(n&&r){var s=r.getOptions&&r.getOptions()||{},o=s.beforeBreadcrumb,a=void 0===o?null:o,l=s.maxBreadcrumbs,c=void 0===l?100:l;if(!(c<=0)){var h=Object(Hx.a)(),u=Ux({timestamp:h},t),d=a?Object(zx.c)(function(){return a(u,e)}):u;null!==d&&n.addBreadcrumb(d,Math.min(c,100))}}},t.prototype.setUser=function(t){var e=this.getScope();e&&e.setUser(t)},t.prototype.setTags=function(t){var e=this.getScope();e&&e.setTags(t)},t.prototype.setExtras=function(t){var e=this.getScope();e&&e.setExtras(t)},t.prototype.setTag=function(t,e){var i=this.getScope();i&&i.setTag(t,e)},t.prototype.setExtra=function(t,e){var i=this.getScope();i&&i.setExtra(t,e)},t.prototype.setContext=function(t,e){var i=this.getScope();i&&i.setContext(t,e)},t.prototype.configureScope=function(t){var e=this.getStackTop(),i=e.scope;i&&e.client&&t(i)},t.prototype.run=function(t){var e=AC(this);try{t(this)}finally{AC(e)}},t.prototype.getIntegration=function(t){var e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(i){return Zx.warn("Cannot retrieve integration "+t.id+" from the current Hub"),null}},t.prototype.startSpan=function(t){return this._callExtensionMethod("startSpan",t)},t.prototype.startTransaction=function(t,e){return this._callExtensionMethod("startTransaction",t,e)},t.prototype.traceHeaders=function(){return this._callExtensionMethod("traceHeaders")},t.prototype.captureSession=function(t){if(void 0===t&&(t=!1),t)return this.endSession();this._sendSessionUpdate()},t.prototype.endSession=function(){var t,e,i,n,r;null===(i=null===(e=null===(t=this.getStackTop())||void 0===t?void 0:t.scope)||void 0===e?void 0:e.getSession())||void 0===i||i.close(),this._sendSessionUpdate(),null===(r=null===(n=this.getStackTop())||void 0===n?void 0:n.scope)||void 0===r||r.setSession()},t.prototype.startSession=function(t){var e=this.getStackTop(),i=e.scope,n=e.client,r=n&&n.getOptions()||{},s=new fC(Ux(Ux({release:r.release,environment:r.environment},i&&{user:i.getUser()}),t));if(i){var o=i.getSession&&i.getSession();o&&o.status===Lx.Ok&&o.update({status:Lx.Exited}),this.endSession(),i.setSession(s)}return s},t.prototype._sendSessionUpdate=function(){var t=this.getStackTop(),e=t.scope,i=t.client;if(e){var n=e.getSession&&e.getSession();n&&i&&i.captureSession&&i.captureSession(n)}},t.prototype._invokeClient=function(t){for(var e,i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];var r=this.getStackTop(),s=r.scope,o=r.client;o&&o[t]&&(e=o)[t].apply(e,jx(i,[s]))},t.prototype._callExtensionMethod=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];var n=gC(),r=n.__SENTRY__;if(r&&r.extensions&&"function"==typeof r.extensions[t])return r.extensions[t].apply(this,e);Zx.warn("Extension method "+t+" couldn't be found, doing nothing.")},t}();function gC(){var t=Object(zx.e)();return t.__SENTRY__=t.__SENTRY__||{extensions:{},hub:void 0},t}function AC(t){var e=gC(),i=_C(e);return yC(e,t),i}function bC(){var t=gC();return vC(t)&&!_C(t).isOlderThan(3)||yC(t,new mC),Object(qx.b)()?function(t){var e,i,n;try{var r=null===(n=null===(i=null===(e=gC().__SENTRY__)||void 0===e?void 0:e.extensions)||void 0===i?void 0:i.domain)||void 0===n?void 0:n.active;if(!r)return _C(t);if(!vC(r)||_C(r).isOlderThan(3)){var s=_C(t).getStackTop();yC(r,new mC(s.client,Xx.clone(s.scope)))}return _C(r)}catch(o){return _C(t)}}(t):_C(t)}function vC(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function _C(t){return t&&t.__SENTRY__&&t.__SENTRY__.hub||(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=new mC),t.__SENTRY__.hub}function yC(t,e){return!!t&&(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=e,!0)}function wC(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];var n=bC();if(n&&n[t])return n[t].apply(n,jx(e));throw new Error("No hub defined or "+t+" was not found on the hub, please open a bug report.")}function xC(t,e){var i;try{throw new Error("Sentry syntheticException")}catch(t){i=t}return wC("captureException",t,{captureContext:e,originalException:t,syntheticException:i})}function CC(t){wC("addBreadcrumb",t)}function SC(t){wC("withScope",t)}var kC=function(t){return t.Maintenance="MaintenanceError",t.NotFound="NotFoundError",t.Unauthorized="UnauthorizedError",t.Unknown="UnknownError",t}({});Error,Error,Error,Error;class EC{constructor(t,e){this.x=t%18,this.y=e%18,this.x<0?this.x+=18:Object.is(this.x,-0)&&(this.x=0),this.y<0?this.y+=18:Object.is(this.y,-0)&&(this.y=0),this.id=`${this.x}/${this.y}`}}function DC([t,e,i,n]){const r=[];if(t>i)r.push([IC(t),PC(e),IC(180),PC(n)]),r.push([IC(-180),PC(e),IC(i),PC(n)]);else{const s=IC(t),o=IC(i),a=PC(e),l=PC(n);r.push([s,a,o,l])}const s=[];return r.forEach(([t,e,i,n])=>{for(let r=e;r<=n;r++)for(let e=t;e<=i;e++)s.push(new EC(e,r))}),s}function IC(t){return Math.floor((t+180)/20)}function PC(t){return Math.floor((t+90)/10)}var OC=function(){function t(){this.disposed=!1}return t.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},t.prototype.disposeInternal=function(){},t}(),MC=function(){function t(t){this.type=t,this.target=null}return t.prototype.preventDefault=function(){this.propagationStopped=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t}();function TC(t,e){return t>e?1:t<e?-1:0}function RC(t,e){return t.indexOf(e)>=0}function VC(t,e,i){var n=t.length;if(t[0]<=e)return 0;if(e<=t[n-1])return n-1;var r=void 0;if(i>0){for(r=1;r<n;++r)if(t[r]<e)return r-1}else if(i<0){for(r=1;r<n;++r)if(t[r]<=e)return r}else for(r=1;r<n;++r){if(t[r]==e)return r;if(t[r]<e)return t[r-1]-e<e-t[r]?r-1:r}return n-1}function FC(t,e,i){for(;e<i;){var n=t[e];t[e]=t[i],t[i]=n,++e,--i}}function LC(t,e){for(var i=Array.isArray(e)?e:[e],n=i.length,r=0;r<n;r++)t[t.length]=i[r]}function UC(t,e){var i=t.length;if(i!==e.length)return!1;for(var n=0;n<i;n++)if(t[n]!==e[n])return!1;return!0}function BC(){return!0}function NC(){return!1}function jC(){}var zC="function"==typeof Object.assign?Object.assign:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(t),n=1,r=arguments.length;n<r;++n){var s=arguments[n];if(null!=s)for(var o in s)s.hasOwnProperty(o)&&(i[o]=s[o])}return i};function HC(t){for(var e in t)delete t[e]}var KC="function"==typeof Object.values?Object.values:function(t){var e=[];for(var i in t)e.push(t[i]);return e};function $C(t){var e;for(e in t)return!1;return!e}var GC=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),WC=function(t){function e(e){var i=t.call(this)||this;return i.eventTarget_=e,i.pendingRemovals_=null,i.dispatching_=null,i.listeners_=null,i}return GC(e,t),e.prototype.addEventListener=function(t,e){if(t&&e){var i=this.listeners_||(this.listeners_={}),n=i[t]||(i[t]=[]);-1===n.indexOf(e)&&n.push(e)}},e.prototype.dispatchEvent=function(t){var e="string"==typeof t?new MC(t):t,i=e.type;e.target||(e.target=this.eventTarget_||this);var n,r=this.listeners_&&this.listeners_[i];if(r){var s=this.dispatching_||(this.dispatching_={}),o=this.pendingRemovals_||(this.pendingRemovals_={});i in s||(s[i]=0,o[i]=0),++s[i];for(var a=0,l=r.length;a<l;++a)if(!1===(n="handleEvent"in r[a]?r[a].handleEvent(e):r[a].call(this,e))||e.propagationStopped){n=!1;break}if(--s[i],0===s[i]){var c=o[i];for(delete o[i];c--;)this.removeEventListener(i,jC);delete s[i]}return n}},e.prototype.disposeInternal=function(){this.listeners_&&HC(this.listeners_)},e.prototype.getListeners=function(t){return this.listeners_&&this.listeners_[t]||void 0},e.prototype.hasListener=function(t){return!!this.listeners_&&(t?t in this.listeners_:Object.keys(this.listeners_).length>0)},e.prototype.removeEventListener=function(t,e){var i=this.listeners_&&this.listeners_[t];if(i){var n=i.indexOf(e);-1!==n&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[n]=jC,++this.pendingRemovals_[t]):(i.splice(n,1),0===i.length&&delete this.listeners_[t]))}},e}(OC);function ZC(){return function(){throw new Error("Unimplemented abstract method.")}()}var qC=0;function YC(t){return t.ol_uid||(t.ol_uid=String(++qC))}function QC(t){return Math.pow(t,3)}function XC(t){return 1-QC(1-t)}function JC(t){return 3*t*t-2*t*t*t}function tS(t){return t}var eS=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),iS=function(t){function e(e,i,n){var r=t.call(this)||this,s=n||{};return r.tileCoord=e,r.state=i,r.interimTile=null,r.hifi=!0,r.key="",r.transition_=void 0===s.transition?250:s.transition,r.transitionStarts_={},r}return eS(e,t),e.prototype.changed=function(){this.dispatchEvent("change")},e.prototype.release=function(){},e.prototype.getKey=function(){return this.key+"/"+this.tileCoord},e.prototype.getInterimTile=function(){if(!this.interimTile)return this;var t=this.interimTile;do{if(2==t.getState())return this.transition_=0,t;t=t.interimTile}while(t);return this},e.prototype.refreshInterimChain=function(){if(this.interimTile){var t=this.interimTile,e=this;do{if(2==t.getState()){t.interimTile=null;break}1==t.getState()?e=t:0==t.getState()?e.interimTile=t.interimTile:e=t,t=e.interimTile}while(t)}},e.prototype.getTileCoord=function(){return this.tileCoord},e.prototype.getState=function(){return this.state},e.prototype.setState=function(t){if(3!==this.state&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()},e.prototype.load=function(){ZC()},e.prototype.getAlpha=function(t,e){if(!this.transition_)return 1;var i=this.transitionStarts_[t];if(i){if(-1===i)return 1}else this.transitionStarts_[t]=i=e;var n=e-i+1e3/60;return n>=this.transition_?1:QC(n/this.transition_)},e.prototype.inTransition=function(t){return!!this.transition_&&-1!==this.transitionStarts_[t]},e.prototype.endTransition=function(t){this.transition_&&(this.transitionStarts_[t]=-1)},e}(WC),nS="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",rS=-1!==nS.indexOf("firefox"),sS=(-1!==nS.indexOf("safari")&&nS.indexOf("chrom"),-1!==nS.indexOf("webkit")&&-1==nS.indexOf("edge")),oS=-1!==nS.indexOf("macintosh"),aS="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,lS="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,cS="undefined"!=typeof Image&&Image.prototype.decode,hS=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch(i){}return t}();function uS(t,e,i){var n=i&&i.length?i.shift():lS?new OffscreenCanvas(t||300,e||300):document.createElement("canvas");return t&&(n.width=t),e&&(n.height=e),n.getContext("2d")}function dS(t){var e=t.offsetWidth,i=getComputedStyle(t);return e+(parseInt(i.marginLeft,10)+parseInt(i.marginRight,10))}function pS(t){var e=t.offsetHeight,i=getComputedStyle(t);return e+(parseInt(i.marginTop,10)+parseInt(i.marginBottom,10))}function fS(t,e){var i=e.parentNode;i&&i.replaceChild(t,e)}function mS(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}function gS(t){for(;t.lastChild;)t.removeChild(t.lastChild)}var AS=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),bS=function(t){function e(e,i,n,r){var s=t.call(this)||this;return s.extent=e,s.pixelRatio_=n,s.resolution=i,s.state=r,s}return AS(e,t),e.prototype.changed=function(){this.dispatchEvent("change")},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){return ZC()},e.prototype.getPixelRatio=function(){return this.pixelRatio_},e.prototype.getResolution=function(){return this.resolution},e.prototype.getState=function(){return this.state},e.prototype.load=function(){ZC()},e}(WC),vS=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),_S=function(t){function e(e){var i=this,n="Assertion failed. See https://openlayers.org/en/v"+"6.5.0".split("-")[0]+"/doc/errors/#"+e+" for details.";return(i=t.call(this,n)||this).code=e,i.name="AssertionError",i.message=n,i}return vS(e,t),e}(Error);function yS(t,e){if(!t)throw new _S(e)}function wS(t){for(var e=[1/0,1/0,-1/0,-1/0],i=0,n=t.length;i<n;++i)FS(e,t[i]);return e}function xS(t,e,i){return i?(i[0]=t[0]-e,i[1]=t[1]-e,i[2]=t[2]+e,i[3]=t[3]+e,i):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function CS(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function SS(t,e,i){var n,r;return(n=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0)*n+(r=i<t[1]?t[1]-i:t[3]<i?i-t[3]:0)*r}function kS(t,e){return DS(t,e[0],e[1])}function ES(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function DS(t,e,i){return t[0]<=e&&e<=t[2]&&t[1]<=i&&i<=t[3]}function IS(t,e){var i=e[0],n=e[1],r=0;return i<t[0]?r|=16:i>t[2]&&(r|=4),n<t[1]?r|=8:n>t[3]&&(r|=2),0===r&&(r=1),r}function PS(t,e,i,n,r){return r?(r[0]=t,r[1]=e,r[2]=i,r[3]=n,r):[t,e,i,n]}function OS(t){return PS(1/0,1/0,-1/0,-1/0,t)}function MS(t,e){var i=t[0],n=t[1];return PS(i,n,i,n,e)}function TS(t,e,i,n,r){return LS(OS(r),t,e,i,n)}function RS(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function VS(t,e){return e[0]<t[0]&&(t[0]=e[0]),e[2]>t[2]&&(t[2]=e[2]),e[1]<t[1]&&(t[1]=e[1]),e[3]>t[3]&&(t[3]=e[3]),t}function FS(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function LS(t,e,i,n,r){for(;i<n;i+=r)US(t,e[i],e[i+1]);return t}function US(t,e,i){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],i),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],i)}function BS(t,e){var i;return(i=e(jS(t)))||(i=e(zS(t)))||(i=e(qS(t)))?i:(i=e(ZS(t)))||!1}function NS(t){var e=0;return XS(t)||(e=YS(t)*GS(t)),e}function jS(t){return[t[0],t[1]]}function zS(t){return[t[2],t[1]]}function HS(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function KS(t,e){var i;return"bottom-left"===e?i=jS(t):"bottom-right"===e?i=zS(t):"top-left"===e?i=ZS(t):"top-right"===e?i=qS(t):yS(!1,13),i}function $S(t,e,i,n,r){var s=e*n[0]/2,o=e*n[1]/2,a=Math.cos(i),l=Math.sin(i),c=s*a,h=s*l,u=o*a,d=o*l,p=t[0],f=t[1],m=p-c+d,g=p-c-d,A=p+c-d,b=p+c+d,v=f-h-u,_=f-h+u,y=f+h+u,w=f+h-u;return PS(Math.min(m,g,A,b),Math.min(v,_,y,w),Math.max(m,g,A,b),Math.max(v,_,y,w),r)}function GS(t){return t[3]-t[1]}function WS(t,e,i){var n=i||[1/0,1/0,-1/0,-1/0];return QS(t,e)?(n[0]=t[0]>e[0]?t[0]:e[0],n[1]=t[1]>e[1]?t[1]:e[1],n[2]=t[2]<e[2]?t[2]:e[2],n[3]=t[3]<e[3]?t[3]:e[3]):OS(n),n}function ZS(t){return[t[0],t[3]]}function qS(t){return[t[2],t[3]]}function YS(t){return t[2]-t[0]}function QS(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function XS(t){return t[2]<t[0]||t[3]<t[1]}function JS(t,e){var i=(t[2]-t[0])/2*(e-1),n=(t[3]-t[1])/2*(e-1);t[0]-=i,t[2]+=i,t[1]-=n,t[3]+=n}function tk(t,e,i,n,r){if(n&&n!==t&&(i=i.bind(n)),r){var s=i;i=function(){t.removeEventListener(e,i),s.apply(this,arguments)}}var o={target:t,type:e,listener:i};return t.addEventListener(e,i),o}function ek(t,e,i,n){return tk(t,e,i,n,!0)}function ik(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),HC(t))}var nk=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function rk(t,e,i){var n=t;if(n.src&&cS){var r=n.decode(),s=!0;return r.then(function(){s&&e()}).catch(function(t){s&&("EncodingError"===t.name&&"Invalid image type."===t.message?e():i())}),function(){s=!1}}var o=[ek(n,"load",e),ek(n,"error",i)];return function(){o.forEach(ik)}}!function(t){function e(e,i,n,r,s,o){var a=t.call(this,e,i,n,0)||this;return a.src_=r,a.image_=new Image,null!==s&&(a.image_.crossOrigin=s),a.unlisten_=null,a.state=0,a.imageLoadFunction_=o,a}nk(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){this.state=3,this.unlistenImage_(),this.changed()},e.prototype.handleImageLoad_=function(){void 0===this.resolution&&(this.resolution=GS(this.extent)/this.image_.height),this.state=2,this.unlistenImage_(),this.changed()},e.prototype.load=function(){0!=this.state&&3!=this.state||(this.state=1,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=rk(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.setImage=function(t){this.image_=t},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}(bS);var sk=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ok=function(t){function e(e,i,n,r,s,o){var a=t.call(this,e,i,o)||this;return a.crossOrigin_=r,a.src_=n,a.key=n,a.image_=new Image,null!==r&&(a.image_.crossOrigin=r),a.unlisten_=null,a.tileLoadFunction_=s,a}return sk(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){var t;this.state=3,this.unlistenImage_(),this.image_=((t=uS(1,1)).fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas),this.changed()},e.prototype.handleImageLoad_=function(){var t=this.image_;this.state=t.naturalWidth&&t.naturalHeight?2:4,this.unlistenImage_(),this.changed()},e.prototype.load=function(){3==this.state&&(this.state=0,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),0==this.state&&(this.state=1,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=rk(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(iS),ak={DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},lk={};lk[ak.DEGREES]=2*Math.PI*6370997/360,lk[ak.FEET]=.3048,lk[ak.METERS]=1,lk[ak.USFEET]=1200/3937;var ck=ak,hk=function(){function t(t){this.code_=t.code,this.units_=t.units,this.extent_=void 0!==t.extent?t.extent:null,this.worldExtent_=void 0!==t.worldExtent?t.worldExtent:null,this.axisOrientation_=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.global_=void 0!==t.global&&t.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}return t.prototype.canWrapX=function(){return this.canWrapX_},t.prototype.getCode=function(){return this.code_},t.prototype.getExtent=function(){return this.extent_},t.prototype.getUnits=function(){return this.units_},t.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||lk[this.units_]},t.prototype.getWorldExtent=function(){return this.worldExtent_},t.prototype.getAxisOrientation=function(){return this.axisOrientation_},t.prototype.isGlobal=function(){return this.global_},t.prototype.setGlobal=function(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)},t.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},t.prototype.setDefaultTileGrid=function(t){this.defaultTileGrid_=t},t.prototype.setExtent=function(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)},t.prototype.setWorldExtent=function(t){this.worldExtent_=t},t.prototype.setGetPointResolution=function(t){this.getPointResolutionFunc_=t},t.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_},t}();function uk(t,e,i){return Math.min(Math.max(t,e),i)}var dk="cosh"in Math?Math.cosh:function(t){var e=Math.exp(t);return(e+1/e)/2},pk="log2"in Math?Math.log2:function(t){return Math.log(t)*Math.LOG2E};function fk(t,e,i,n,r,s){var o=r-i,a=s-n;if(0!==o||0!==a){var l=((t-i)*o+(e-n)*a)/(o*o+a*a);l>1?(i=r,n=s):l>0&&(i+=o*l,n+=a*l)}return mk(t,e,i,n)}function mk(t,e,i,n){var r=i-t,s=n-e;return r*r+s*s}function gk(t){return 180*t/Math.PI}function Ak(t){return t*Math.PI/180}function bk(t,e){var i=t%e;return i*e<0?i+e:i}function vk(t,e,i){return t+i*(e-t)}var _k,yk,wk,xk=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ck=6378137*Math.PI,Sk=[-Ck,-Ck,Ck,Ck],kk=[-180,-85,180,85],Ek=6378137*Math.log(Math.tan(Math.PI/2)),Dk=function(t){function e(e){return t.call(this,{code:e,units:ck.METERS,extent:Sk,global:!0,worldExtent:kk,getPointResolution:function(t,e){return t/dk(e[1]/6378137)}})||this}return xk(e,t),e}(hk),Ik=[new Dk("EPSG:3857"),new Dk("EPSG:102100"),new Dk("EPSG:102113"),new Dk("EPSG:900913"),new Dk("http://www.opengis.net/gml/srs/epsg.xml#3857")],Pk=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ok=[-180,-90,180,90],Mk=6378137*Math.PI/180,Tk=function(t){function e(e,i){return t.call(this,{code:e,units:ck.DEGREES,extent:Ok,axisOrientation:i,global:!0,metersPerUnit:Mk,worldExtent:Ok})||this}return Pk(e,t),e}(hk),Rk=[new Tk("CRS:84"),new Tk("EPSG:4326","neu"),new Tk("urn:ogc:def:crs:OGC:1.3:CRS84"),new Tk("urn:ogc:def:crs:OGC:2:84"),new Tk("http://www.opengis.net/gml/srs/epsg.xml#4326","neu")],Vk={},Fk={};function Lk(t,e,i){var n=t.getCode(),r=e.getCode();n in Fk||(Fk[n]={}),Fk[n][r]=i}function Uk(t,e,i){var n=i||6371008.8,r=Ak(t[1]),s=Ak(e[1]),o=(s-r)/2,a=Ak(e[0]-t[0])/2,l=Math.sin(o)*Math.sin(o)+Math.sin(a)*Math.sin(a)*Math.cos(r)*Math.cos(s);return 2*n*Math.atan2(Math.sqrt(l),Math.sqrt(1-l))}function Bk(t,e){for(var i=0,n=0,r=t.length;n<r-1;++n)i+=Uk(t[n],t[n+1],e);return i}function Nk(t,e){var i=e||{},n=i.radius||6371008.8,r=i.projection||"EPSG:3857",s=t.getType();"GeometryCollection"!==s&&(t=t.clone().transform(r,"EPSG:4326"));var o,a,l,c,h,u,d=0;switch(s){case"Point":case"MultiPoint":break;case"LineString":case"LinearRing":d=Bk(o=t.getCoordinates(),n);break;case"MultiLineString":case"Polygon":for(l=0,c=(o=t.getCoordinates()).length;l<c;++l)d+=Bk(o[l],n);break;case"MultiPolygon":for(l=0,c=(o=t.getCoordinates()).length;l<c;++l)for(h=0,u=(a=o[l]).length;h<u;++h)d+=Bk(a[h],n);break;case"GeometryCollection":var p=t.getGeometries();for(l=0,c=p.length;l<c;++l)d+=Nk(p[l],e);break;default:throw new Error("Unsupported geometry type: "+s)}return d}function jk(t,e,i,n){var r=n||6371008.8,s=Ak(t[1]),o=Ak(t[0]),a=e/r,l=Math.asin(Math.sin(s)*Math.cos(a)+Math.cos(s)*Math.sin(a)*Math.cos(i));return[gk(o+Math.atan2(Math.sin(i)*Math.sin(a)*Math.cos(s),Math.cos(a)-Math.sin(s)*Math.sin(l))),gk(l)]}function zk(t,e,i){var n=void 0!==i?t.toFixed(i):""+t,r=n.indexOf(".");return(r=-1===r?n.length:r)>e?n:new Array(1+e-r).join("0")+n}function Hk(t,e){var i,n,r=e[0],s=e[1],o=r[0],a=r[1],l=s[0],c=s[1],h=l-o,u=c-a,d=0===h&&0===u?0:(h*(t[0]-o)+u*(t[1]-a))/(h*h+u*u||0);return d<=0?(i=o,n=a):d>=1?(i=l,n=c):(i=o+d*h,n=a+d*u),[i,n]}function Kk(t,e,i){var n=bk(e+180,360)-180,r=Math.abs(3600*n),s=i||0,o=Math.pow(10,s),a=Math.floor(r/3600),l=Math.floor((r-3600*a)/60),c=r-3600*a-60*l;return(c=Math.ceil(c*o)/o)>=60&&(c=0,l+=1),l>=60&&(l=0,a+=1),a+"\xb0 "+zk(l,2)+"\u2032 "+zk(c,2,s)+"\u2033"+(0==n?"":" "+t.charAt(n<0?1:0))}function $k(t,e){for(var i=!0,n=t.length-1;n>=0;--n)if(t[n]!=e[n]){i=!1;break}return i}function Gk(t,e){var i=Math.cos(e),n=Math.sin(e),r=t[1]*i+t[0]*n;return t[0]=t[0]*i-t[1]*n,t[1]=r,t}function Wk(t,e){var i=t[0]-e[0],n=t[1]-e[1];return i*i+n*n}function Zk(t,e){return Math.sqrt(Wk(t,e))}function qk(t,e){return Wk(t,Hk(t,e))}function Yk(t,e){return t?Kk("NS",t[1],e)+" "+Kk("EW",t[0],e):""}function Qk(t,e){if(e.canWrapX()){var i=YS(e.getExtent()),n=function(t,e,i){var n=e.getExtent(),r=0;if(e.canWrapX()&&(t[0]<n[0]||t[0]>n[2])){var s=i||YS(n);r=Math.floor((t[0]-n[0])/s)}return r}(t,e,i);n&&(t[0]-=n*i)}return t}function Xk(t,e,i){var n;if(void 0!==e){for(var r=0,s=t.length;r<s;++r)e[r]=t[r];n=e}else n=t.slice();return n}function Jk(t,e,i){if(void 0!==e&&t!==e){for(var n=0,r=t.length;n<r;++n)e[n]=t[n];t=e}return t}function tE(t){!function(t,e){Vk[t]=e}(t.getCode(),t),Lk(t,t,Xk)}function eE(t){return"string"==typeof t?Vk[e=t]||Vk[e.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null:t||null;var e}function iE(t,e,i,n){var r,s=(t=eE(t)).getPointResolutionFunc();if(s)r=s(e,i),n&&n!==t.getUnits()&&(a=t.getMetersPerUnit())&&(r=r*a/lk[n]);else{var o=t.getUnits();if(o==ck.DEGREES&&!n||n==ck.DEGREES)r=e;else{var a,l=lE(t,eE("EPSG:4326"));if(l===Jk&&o!==ck.DEGREES)r=e*t.getMetersPerUnit();else{var c=[i[0]-e/2,i[1],i[0]+e/2,i[1],i[0],i[1]-e/2,i[0],i[1]+e/2];r=(Uk((c=l(c,c,2)).slice(0,2),c.slice(2,4))+Uk(c.slice(4,6),c.slice(6,8)))/2}void 0!==(a=n?lk[n]:t.getMetersPerUnit())&&(r/=a)}}return r}function nE(t){!function(t){t.forEach(tE)}(t),t.forEach(function(e){t.forEach(function(t){e!==t&&Lk(e,t,Xk)})})}function rE(t,e){return t?"string"==typeof t?eE(t):t:eE(e)}function sE(t,e){return hE(t,"EPSG:4326",void 0!==e?e:"EPSG:3857")}function oE(t,e){var i=hE(t,void 0!==e?e:"EPSG:3857","EPSG:4326"),n=i[0];return(n<-180||n>180)&&(i[0]=bk(n+180,360)-180),i}function aE(t,e){if(t===e)return!0;var i=t.getUnits()===e.getUnits();return(t.getCode()===e.getCode()||lE(t,e)===Xk)&&i}function lE(t,e){var i,n,r,s=(i=t.getCode(),n=e.getCode(),i in Fk&&n in Fk[i]&&(r=Fk[i][n]),r);return s||(s=Jk),s}function cE(t,e){return lE(eE(t),eE(e))}function hE(t,e,i){return cE(e,i)(t,void 0,t.length)}function uE(t,e,i,n){return function(t,e,i,n){var r=[];if(n>1)for(var s=t[2]-t[0],o=t[3]-t[1],a=0;a<n;++a)r.push(t[0]+s*a/n,t[1],t[2],t[1]+o*a/n,t[2]-s*a/n,t[3],t[0],t[3]-o*a/n);else r=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]];e(r,r,2);for(var l=[],c=[],h=(a=0,r.length);a<h;a+=2)l.push(r[a]),c.push(r[a+1]);return function(t,e,i){return PS(Math.min.apply(null,t),Math.min.apply(null,e),Math.max.apply(null,t),Math.max.apply(null,e),undefined)}(l,c)}(t,cE(e,i),0,n)}function dE(t,e){return t}function pE(t,e){return t}function fE(t,e){return t}function mE(t,e){return t}nE(Ik),nE(Rk),_k=Ik,yk=function(t,e,i){var n=t.length,r=i>1?i:2,s=e;void 0===s&&(s=r>2?t.slice():new Array(n));for(var o=0;o<n;o+=r){s[o]=Ck*t[o]/180;var a=6378137*Math.log(Math.tan(Math.PI*(+t[o+1]+90)/360));a>Ek?a=Ek:a<-Ek&&(a=-Ek),s[o+1]=a}return s},wk=function(t,e,i){var n=t.length,r=i>1?i:2,s=e;void 0===s&&(s=r>2?t.slice():new Array(n));for(var o=0;o<n;o+=r)s[o]=180*t[o]/Ck,s[o+1]=360*Math.atan(Math.exp(t[o+1]/6378137))/Math.PI-90;return s},Rk.forEach(function(t){_k.forEach(function(e){Lk(t,e,yk),Lk(e,t,wk)})});var gE,AE=function(){function t(t,e,i,n,r,s){this.sourceProj_=t,this.targetProj_=e;var o={},a=cE(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){var e=t[0]+"/"+t[1];return o[e]||(o[e]=a(t)),o[e]},this.maxSourceExtent_=n,this.errorThresholdSquared_=r*r,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!n&&!!this.sourceProj_.getExtent()&&YS(n)==YS(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?YS(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?YS(this.targetProj_.getExtent()):null;var l=ZS(i),c=qS(i),h=zS(i),u=jS(i),d=this.transformInv_(l),p=this.transformInv_(c),f=this.transformInv_(h),m=this.transformInv_(u),g=10+(s?Math.max(0,Math.ceil(pk(NS(i)/(s*s*256*256)))):0);if(this.addQuad_(l,c,h,u,d,p,f,m,g),this.wrapsXInSource_){var A=1/0;this.triangles_.forEach(function(t,e,i){A=Math.min(A,t.source[0][0],t.source[1][0],t.source[2][0])}),this.triangles_.forEach((function(t){if(Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-A>this.sourceWorldWidth_/2){var e=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];e[0][0]-A>this.sourceWorldWidth_/2&&(e[0][0]-=this.sourceWorldWidth_),e[1][0]-A>this.sourceWorldWidth_/2&&(e[1][0]-=this.sourceWorldWidth_),e[2][0]-A>this.sourceWorldWidth_/2&&(e[2][0]-=this.sourceWorldWidth_);var i=Math.min(e[0][0],e[1][0],e[2][0]);Math.max(e[0][0],e[1][0],e[2][0])-i<this.sourceWorldWidth_/2&&(t.source=e)}}).bind(this))}o={}}return t.prototype.addTriangle_=function(t,e,i,n,r,s){this.triangles_.push({source:[n,r,s],target:[t,e,i]})},t.prototype.addQuad_=function(t,e,i,n,r,s,o,a,l){var c=wS([r,s,o,a]),h=this.sourceWorldWidth_?YS(c)/this.sourceWorldWidth_:null,u=this.sourceWorldWidth_,d=this.sourceProj_.canWrapX()&&h>.5&&h<1,p=!1;if(l>0&&(this.targetProj_.isGlobal()&&this.targetWorldWidth_&&(p=YS(wS([t,e,i,n]))/this.targetWorldWidth_>.25||p),!d&&this.sourceProj_.isGlobal()&&h&&(p=h>.25||p)),!(!p&&this.maxSourceExtent_&&isFinite(c[0])&&isFinite(c[1])&&isFinite(c[2])&&isFinite(c[3]))||QS(c,this.maxSourceExtent_)){var f=0;if(!(p||isFinite(r[0])&&isFinite(r[1])&&isFinite(s[0])&&isFinite(s[1])&&isFinite(o[0])&&isFinite(o[1])&&isFinite(a[0])&&isFinite(a[1])))if(l>0)p=!0;else if(1!=(f=(isFinite(r[0])&&isFinite(r[1])?0:8)+(isFinite(s[0])&&isFinite(s[1])?0:4)+(isFinite(o[0])&&isFinite(o[1])?0:2)+(isFinite(a[0])&&isFinite(a[1])?0:1))&&2!=f&&4!=f&&8!=f)return;if(l>0){if(!p){var m,g=this.transformInv_([(t[0]+i[0])/2,(t[1]+i[1])/2]);m=d?(bk(r[0],u)+bk(o[0],u))/2-bk(g[0],u):(r[0]+o[0])/2-g[0];var A=(r[1]+o[1])/2-g[1];p=m*m+A*A>this.errorThresholdSquared_}if(p){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){var b=[(e[0]+i[0])/2,(e[1]+i[1])/2],v=this.transformInv_(b),_=[(n[0]+t[0])/2,(n[1]+t[1])/2],y=this.transformInv_(_);this.addQuad_(t,e,b,_,r,s,v,y,l-1),this.addQuad_(_,b,i,n,y,v,o,a,l-1)}else{var w=[(t[0]+e[0])/2,(t[1]+e[1])/2],x=this.transformInv_(w),C=[(i[0]+n[0])/2,(i[1]+n[1])/2],S=this.transformInv_(C);this.addQuad_(t,w,C,n,r,x,S,a,l-1),this.addQuad_(w,e,i,C,x,s,o,S,l-1)}return}}if(d){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&f)&&this.addTriangle_(t,i,n,r,o,a),0==(14&f)&&this.addTriangle_(t,i,e,r,o,s),f&&(0==(13&f)&&this.addTriangle_(e,n,t,s,a,r),0==(7&f)&&this.addTriangle_(e,n,i,s,a,o))}},t.prototype.calculateSourceExtent=function(){var t=[1/0,1/0,-1/0,-1/0];return this.triangles_.forEach(function(e,i,n){var r=e.source;FS(t,r[0]),FS(t,r[1]),FS(t,r[2])}),t},t.prototype.getTriangles=function(){return this.triangles_},t}(),bE={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1};function vE(t,e,i,n,r){t.beginPath(),t.moveTo(0,0),t.lineTo(e,i),t.lineTo(n,r),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,n)+1,Math.max(i,r)),t.restore()}function _E(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function yE(t,e,i,n){var r=hE(i,e,t),s=iE(e,n,i),o=e.getMetersPerUnit();void 0!==o&&(s*=o);var a=t.getMetersPerUnit();void 0!==a&&(s/=a);var l=t.getExtent();if(!l||kS(l,r)){var c=iE(t,s,r)/s;isFinite(c)&&c>0&&(s/=c)}return s}var wE=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),xE=function(t){function e(e,i,n,r,s,o,a,l,c,h,u,d){var p=t.call(this,s,0)||this;p.renderEdges_=void 0!==u&&u,p.contextOptions_=d,p.pixelRatio_=a,p.gutter_=l,p.canvas_=null,p.sourceTileGrid_=i,p.targetTileGrid_=r,p.wrappedTileCoord_=o||s,p.sourceTiles_=[],p.sourcesListenerKeys_=null,p.sourceZ_=0;var f=r.getTileCoordExtent(p.wrappedTileCoord_),m=p.targetTileGrid_.getExtent(),g=p.sourceTileGrid_.getExtent(),A=m?WS(f,m):f;if(0===NS(A))return p.state=4,p;var b=e.getExtent();b&&(g=g?WS(g,b):b);var v=r.getResolution(p.wrappedTileCoord_[0]),_=function(t,e,i,n){var r=HS(i),s=yE(t,e,r,n);return(!isFinite(s)||s<=0)&&BS(i,function(i){return s=yE(t,e,i,n),isFinite(s)&&s>0}),s}(e,n,A,v);if(!isFinite(_)||_<=0)return p.state=4,p;if(p.triangulation_=new AE(e,n,A,g,_*(void 0!==h?h:.5),v),0===p.triangulation_.getTriangles().length)return p.state=4,p;p.sourceZ_=i.getZForResolution(_);var y=p.triangulation_.calculateSourceExtent();if(g&&(e.canWrapX()?(y[1]=uk(y[1],g[1],g[3]),y[3]=uk(y[3],g[1],g[3])):y=WS(y,g)),NS(y)){for(var w=i.getTileRangeForExtentAndZ(y,p.sourceZ_),x=w.minX;x<=w.maxX;x++)for(var C=w.minY;C<=w.maxY;C++){var S=c(p.sourceZ_,x,C,a);S&&p.sourceTiles_.push(S)}0===p.sourceTiles_.length&&(p.state=4)}else p.state=4;return p}return wE(e,t),e.prototype.getImage=function(){return this.canvas_},e.prototype.reproject_=function(){var t=[];if(this.sourceTiles_.forEach((function(e,i,n){e&&2==e.getState()&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}).bind(this)),this.sourceTiles_.length=0,0===t.length)this.state=3;else{var e=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(e),n="number"==typeof i?i:i[0],r="number"==typeof i?i:i[1],s=this.targetTileGrid_.getResolution(e),o=this.sourceTileGrid_.getResolution(this.sourceZ_),a=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=function(t,e,i,n,r,s,o,a,l,c,h,u){var d=uS(Math.round(i*t),Math.round(i*e));if(zC(d,u),0===l.length)return d.canvas;function p(t){return Math.round(t*i)/i}d.scale(i,i),d.globalCompositeOperation="lighter";var f=[1/0,1/0,-1/0,-1/0];l.forEach(function(t,e,i){VS(f,t.extent)});var m=YS(f),g=GS(f),A=uS(Math.round(i*m/n),Math.round(i*g/n));zC(A,u);var b=i/n;l.forEach(function(t,e,i){var n=t.extent[0]-f[0],r=-(t.extent[3]-f[3]),s=YS(t.extent),o=GS(t.extent);t.image.width>0&&t.image.height>0&&A.drawImage(t.image,c,c,t.image.width-2*c,t.image.height-2*c,n*b,r*b,s*b,o*b)});var v=ZS(o);return a.getTriangles().forEach(function(t,e,r){var o=t.source,a=t.target,l=o[0][0],c=o[0][1],h=o[1][0],m=o[1][1],g=o[2][0],b=o[2][1],_=p((a[0][0]-v[0])/s),y=p(-(a[0][1]-v[1])/s),w=p((a[1][0]-v[0])/s),x=p(-(a[1][1]-v[1])/s),C=p((a[2][0]-v[0])/s),S=p(-(a[2][1]-v[1])/s),k=l,E=c;l=0,c=0;var D=function(t){for(var e=t.length,i=0;i<e;i++){for(var n=i,r=Math.abs(t[i][i]),s=i+1;s<e;s++){var o=Math.abs(t[s][i]);o>r&&(r=o,n=s)}if(0===r)return null;var a=t[n];t[n]=t[i],t[i]=a;for(var l=i+1;l<e;l++)for(var c=-t[l][i]/t[i][i],h=i;h<e+1;h++)i==h?t[l][h]=0:t[l][h]+=c*t[i][h]}for(var u=new Array(e),d=e-1;d>=0;d--){u[d]=t[d][e]/t[d][d];for(var p=d-1;p>=0;p--)t[p][e]-=t[p][d]*u[d]}return u}([[h-=k,m-=E,0,0,w-_],[g-=k,b-=E,0,0,C-_],[0,0,h,m,x-y],[0,0,g,b,S-y]]);if(D){if(d.save(),d.beginPath(),function(){if(void 0===gE){var t=document.createElement("canvas").getContext("2d");t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",vE(t,4,5,4,0),vE(t,4,5,0,5);var e=t.getImageData(0,0,3,3).data;gE=_E(e,0)||_E(e,4)||_E(e,8)}return gE}()||u===bE){d.moveTo(w,x);for(var I=_-w,P=y-x,O=0;O<4;O++)d.lineTo(w+p((O+1)*I/4),x+p(O*P/3)),3!=O&&d.lineTo(w+p((O+1)*I/4),x+p((O+1)*P/3));d.lineTo(C,S)}else d.moveTo(w,x),d.lineTo(_,y),d.lineTo(C,S);d.clip(),d.transform(D[0],D[2],D[1],D[3],_,y),d.translate(f[0]-k,f[3]-E),d.scale(n/i,-n/i),d.drawImage(A.canvas,0,0),d.restore()}}),h&&(d.save(),d.globalCompositeOperation="source-over",d.strokeStyle="black",d.lineWidth=1,a.getTriangles().forEach(function(t,e,i){var n=t.target,r=(n[0][0]-v[0])/s,o=-(n[0][1]-v[1])/s,a=(n[1][0]-v[0])/s,l=-(n[1][1]-v[1])/s,c=(n[2][0]-v[0])/s,h=-(n[2][1]-v[1])/s;d.beginPath(),d.moveTo(a,l),d.lineTo(r,o),d.lineTo(c,h),d.closePath(),d.stroke()}),d.restore()),d.canvas}(n,r,this.pixelRatio_,o,this.sourceTileGrid_.getExtent(),s,a,this.triangulation_,t,this.gutter_,this.renderEdges_,this.contextOptions_),this.state=2}this.changed()},e.prototype.load=function(){if(0==this.state){this.state=1,this.changed();var t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach((function(e,i,n){var r=e.getState();if(0==r||1==r){t++;var s=tk(e,"change",function(i){var n=e.getState();2!=n&&3!=n&&4!=n||(ik(s),0==--t&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(s)}}).bind(this)),this.sourceTiles_.forEach(function(t,e,i){0==t.getState()&&t.load()}),0===t&&setTimeout(this.reproject_.bind(this),0)}},e.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(ik),this.sourcesListenerKeys_=null},e}(iS),CE=function(){function t(t){this.highWaterMark=void 0!==t?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}return t.prototype.canExpireCache=function(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark},t.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},t.prototype.containsKey=function(t){return this.entries_.hasOwnProperty(t)},t.prototype.forEach=function(t){for(var e=this.oldest_;e;)t(e.value_,e.key_,this),e=e.newer},t.prototype.get=function(t,e){var i=this.entries_[t];return yS(void 0!==i,15),i===this.newest_||(i===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.newest_,this.newest_.newer=i,this.newest_=i),i.value_},t.prototype.remove=function(t){var e=this.entries_[t];return yS(void 0!==e,15),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_},t.prototype.getCount=function(){return this.count_},t.prototype.getKeys=function(){var t,e=new Array(this.count_),i=0;for(t=this.newest_;t;t=t.older)e[i++]=t.key_;return e},t.prototype.getValues=function(){var t,e=new Array(this.count_),i=0;for(t=this.newest_;t;t=t.older)e[i++]=t.value_;return e},t.prototype.peekLast=function(){return this.oldest_.value_},t.prototype.peekLastKey=function(){return this.oldest_.key_},t.prototype.peekFirstKey=function(){return this.newest_.key_},t.prototype.pop=function(){var t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_},t.prototype.replace=function(t,e){this.get(t),this.entries_[t].value_=e},t.prototype.set=function(t,e){yS(!(t in this.entries_),16);var i={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[t]=i,++this.count_},t.prototype.setSize=function(t){this.highWaterMark=t},t}();function SE(t,e,i,n){return void 0!==n?(n[0]=t,n[1]=e,n[2]=i,n):[t,e,i]}function kE(t,e,i){return t+"/"+e+"/"+i}function EE(t){return kE(t[0],t[1],t[2])}function DE(t){return(t[1]<<t[0])+t[2]}var IE=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),PE=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return IE(e,t),e.prototype.expireCache=function(t){for(;this.canExpireCache()&&!(this.peekLast().getKey()in t);)this.pop().release()},e.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=(e=this.peekFirstKey(),e.split("/").map(Number))[0];this.forEach((function(e){e.tileCoord[0]!==t&&(this.remove(EE(e.tileCoord)),e.release())}).bind(this))}var e},e}(CE),OE=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function ME(t){if(Array.isArray(t))for(var e=0,i=t.length;e<i;++e)ik(t[e]);else ik(t)}var TE=function(t){function e(){var e=t.call(this)||this;return e.revision_=0,e}return OE(e,t),e.prototype.changed=function(){++this.revision_,this.dispatchEvent("change")},e.prototype.getRevision=function(){return this.revision_},e.prototype.on=function(t,e){if(Array.isArray(t)){for(var i=t.length,n=new Array(i),r=0;r<i;++r)n[r]=tk(this,t[r],e);return n}return tk(this,t,e)},e.prototype.once=function(t,e){var i;if(Array.isArray(t)){var n=t.length;i=new Array(n);for(var r=0;r<n;++r)i[r]=ek(this,t[r],e)}else i=ek(this,t,e);return e.ol_key=i,i},e.prototype.un=function(t,e){var i=e.ol_key;if(i)ME(i);else if(Array.isArray(t))for(var n=0,r=t.length;n<r;++n)this.removeEventListener(t[n],e);else this.removeEventListener(t,e)},e}(WC),RE=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),VE=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r.key=i,r.oldValue=n,r}return RE(e,t),e}(MC),FE=function(t){function e(e){var i=t.call(this)||this;return YC(i),i.values_=null,void 0!==e&&i.setProperties(e),i}return RE(e,t),e.prototype.get=function(t){var e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e},e.prototype.getKeys=function(){return this.values_&&Object.keys(this.values_)||[]},e.prototype.getProperties=function(){return this.values_&&zC({},this.values_)||{}},e.prototype.hasProperties=function(){return!!this.values_},e.prototype.notify=function(t,e){var i;i=UE(t),this.dispatchEvent(new VE(i,t,e)),this.dispatchEvent(new VE(i="propertychange",t,e))},e.prototype.set=function(t,e,i){var n=this.values_||(this.values_={});if(i)n[t]=e;else{var r=n[t];n[t]=e,r!==e&&this.notify(t,r)}},e.prototype.setProperties=function(t,e){for(var i in t)this.set(i,t[i],e)},e.prototype.applyProperties=function(t){t.values_&&zC(this.values_||(this.values_={}),t.values_)},e.prototype.unset=function(t,e){if(this.values_&&t in this.values_){var i=this.values_[t];delete this.values_[t],$C(this.values_)&&(this.values_=null),e||this.notify(t,i)}},e}(TE),LE={};function UE(t){return LE.hasOwnProperty(t)?LE[t]:LE[t]="change:"+t}var BE=FE,NE=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function jE(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}var zE=function(t){function e(e){var i=t.call(this)||this;return i.projection_=eE(e.projection),i.attributions_=jE(e.attributions),i.attributionsCollapsible_=void 0===e.attributionsCollapsible||e.attributionsCollapsible,i.loading=!1,i.state_=void 0!==e.state?e.state:"ready",i.wrapX_=void 0!==e.wrapX&&e.wrapX,i}return NE(e,t),e.prototype.getAttributions=function(){return this.attributions_},e.prototype.getAttributionsCollapsible=function(){return this.attributionsCollapsible_},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolutions=function(){return ZC()},e.prototype.getState=function(){return this.state_},e.prototype.getWrapX=function(){return this.wrapX_},e.prototype.getContextOptions=function(){},e.prototype.refresh=function(){this.changed()},e.prototype.setAttributions=function(t){this.attributions_=jE(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(BE),HE=function(){function t(t,e,i,n){this.minX=t,this.maxX=e,this.minY=i,this.maxY=n}return t.prototype.contains=function(t){return this.containsXY(t[1],t[2])},t.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY},t.prototype.containsXY=function(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY},t.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY},t.prototype.extend=function(t){t.minX<this.minX&&(this.minX=t.minX),t.maxX>this.maxX&&(this.maxX=t.maxX),t.minY<this.minY&&(this.minY=t.minY),t.maxY>this.maxY&&(this.maxY=t.maxY)},t.prototype.getHeight=function(){return this.maxY-this.minY+1},t.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},t.prototype.getWidth=function(){return this.maxX-this.minX+1},t.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY},t}();function KE(t,e,i,n,r){return void 0!==r?(r.minX=t,r.maxX=e,r.minY=i,r.maxY=n,r):new HE(t,e,i,n)}var $E=HE;function GE(t,e,i){return void 0===i&&(i=[0,0]),i[0]=t[0]+2*e,i[1]=t[1]+2*e,i}function WE(t,e,i){return void 0===i&&(i=[0,0]),i[0]=t[0]*e+.5|0,i[1]=t[1]*e+.5|0,i}function ZE(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}var qE=[0,0,0],YE=function(){function t(t){var e;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,yS(function(t,e,i){var n=function(t,e){return e-t}||TC;return t.every(function(e,i){if(0===i)return!0;var r=n(t[i-1],e);return!(r>0||0===r)})}(this.resolutions_),17),!t.origins)for(var i=0,n=this.resolutions_.length-1;i<n;++i)if(e){if(this.resolutions_[i]/this.resolutions_[i+1]!==e){e=void 0;break}}else e=this.resolutions_[i]/this.resolutions_[i+1];this.zoomFactor_=e,this.maxZoom=this.resolutions_.length-1,this.origin_=void 0!==t.origin?t.origin:null,this.origins_=null,void 0!==t.origins&&(this.origins_=t.origins,yS(this.origins_.length==this.resolutions_.length,20));var r=t.extent;void 0===r||this.origin_||this.origins_||(this.origin_=ZS(r)),yS(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,void 0!==t.tileSizes&&(this.tileSizes_=t.tileSizes,yS(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=void 0!==t.tileSize?t.tileSize:this.tileSizes_?null:256,yS(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=void 0!==r?r:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],void 0!==t.sizes?this.fullTileRanges_=t.sizes.map(function(t,e){var i=new $E(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1));if(r){var n=this.getTileRangeForExtentAndZ(r,e);i.minX=Math.max(n.minX,i.minX),i.maxX=Math.min(n.maxX,i.maxX),i.minY=Math.max(n.minY,i.minY),i.maxY=Math.min(n.maxY,i.maxY)}return i},this):r&&this.calculateTileRanges_(r)}return t.prototype.forEachTileCoord=function(t,e,i){for(var n=this.getTileRangeForExtentAndZ(t,e),r=n.minX,s=n.maxX;r<=s;++r)for(var o=n.minY,a=n.maxY;o<=a;++o)i([e,r,o])},t.prototype.forEachTileCoordParentTileRange=function(t,e,i,n){var r,s,o=null,a=t[0]-1;for(2===this.zoomFactor_?(r=t[1],s=t[2]):o=this.getTileCoordExtent(t,n);a>=this.minZoom;){if(e(a,2===this.zoomFactor_?KE(r=Math.floor(r/2),r,s=Math.floor(s/2),s,i):this.getTileRangeForExtentAndZ(o,a,i)))return!0;--a}return!1},t.prototype.getExtent=function(){return this.extent_},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.getMinZoom=function(){return this.minZoom},t.prototype.getOrigin=function(t){return this.origin_?this.origin_:this.origins_[t]},t.prototype.getResolution=function(t){return this.resolutions_[t]},t.prototype.getResolutions=function(){return this.resolutions_},t.prototype.getTileCoordChildTileRange=function(t,e,i){if(t[0]<this.maxZoom){if(2===this.zoomFactor_){var n=2*t[1],r=2*t[2];return KE(n,n+1,r,r+1,e)}var s=this.getTileCoordExtent(t,i);return this.getTileRangeForExtentAndZ(s,t[0]+1,e)}return null},t.prototype.getTileRangeExtent=function(t,e,i){var n=this.getOrigin(t),r=this.getResolution(t),s=ZE(this.getTileSize(t),this.tmpSize_);return PS(n[0]+e.minX*s[0]*r,n[1]+e.minY*s[1]*r,n[0]+(e.maxX+1)*s[0]*r,n[1]+(e.maxY+1)*s[1]*r,i)},t.prototype.getTileRangeForExtentAndZ=function(t,e,i){var n=qE;this.getTileCoordForXYAndZ_(t[0],t[3],e,!1,n);var r=n[1],s=n[2];return this.getTileCoordForXYAndZ_(t[2],t[1],e,!0,n),KE(r,n[1],s,n[2],i)},t.prototype.getTileCoordCenter=function(t){var e=this.getOrigin(t[0]),i=this.getResolution(t[0]),n=ZE(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*n[0]*i,e[1]-(t[2]+.5)*n[1]*i]},t.prototype.getTileCoordExtent=function(t,e){var i=this.getOrigin(t[0]),n=this.getResolution(t[0]),r=ZE(this.getTileSize(t[0]),this.tmpSize_),s=i[0]+t[1]*r[0]*n,o=i[1]-(t[2]+1)*r[1]*n;return PS(s,o,s+r[0]*n,o+r[1]*n,e)},t.prototype.getTileCoordForCoordAndResolution=function(t,e,i){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,i)},t.prototype.getTileCoordForXYAndResolution_=function(t,e,i,n,r){var s=this.getZForResolution(i),o=i/this.getResolution(s),a=this.getOrigin(s),l=ZE(this.getTileSize(s),this.tmpSize_),c=n?.5:0,h=Math.floor((t-a[0])/i+(n?.5:0)),u=Math.floor((a[1]-e)/i+c),d=o*h/l[0],p=o*u/l[1];return n?(d=Math.ceil(d)-1,p=Math.ceil(p)-1):(d=Math.floor(d),p=Math.floor(p)),SE(s,d,p,r)},t.prototype.getTileCoordForXYAndZ_=function(t,e,i,n,r){var s=this.getOrigin(i),o=this.getResolution(i),a=ZE(this.getTileSize(i),this.tmpSize_),l=n?.5:0,c=Math.floor((t-s[0])/o+(n?.5:0)),h=Math.floor((s[1]-e)/o+l),u=c/a[0],d=h/a[1];return n?(u=Math.ceil(u)-1,d=Math.ceil(d)-1):(u=Math.floor(u),d=Math.floor(d)),SE(i,u,d,r)},t.prototype.getTileCoordForCoordAndZ=function(t,e,i){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,i)},t.prototype.getTileCoordResolution=function(t){return this.resolutions_[t[0]]},t.prototype.getTileSize=function(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]},t.prototype.getFullTileRange=function(t){return this.fullTileRanges_?this.fullTileRanges_[t]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,t):null},t.prototype.getZForResolution=function(t,e){return uk(VC(this.resolutions_,t,e||0),this.minZoom,this.maxZoom)},t.prototype.calculateTileRanges_=function(t){for(var e=this.resolutions_.length,i=new Array(e),n=this.minZoom;n<e;++n)i[n]=this.getTileRangeForExtentAndZ(t,n);this.fullTileRanges_=i},t}();function QE(t){var e=t.getDefaultTileGrid();return e||(e=function(t,e,i,n){return s=XE(r=JE(t),void 0,void 0),new YE({extent:r,origin:KS(r,"top-left"),resolutions:s,tileSize:void 0});var r,s}(t),t.setDefaultTileGrid(e)),e}function XE(t,e,i,n){for(var r=void 0!==e?e:42,s=GS(t),o=YS(t),a=ZE(void 0!==i?i:256),l=n>0?n:Math.max(o/a[0],s/a[1]),c=r+1,h=new Array(c),u=0;u<c;++u)h[u]=l/Math.pow(2,u);return h}function JE(t){var e=(t=eE(t)).getExtent();if(!e){var i=180*lk[ck.DEGREES]/t.getMetersPerUnit();e=PS(-i,-i,i,i)}return e}var tD=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),eD=function(t){function e(e){var i=t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:e.projection,state:e.state,wrapX:e.wrapX})||this;i.opaque_=void 0!==e.opaque&&e.opaque,i.tilePixelRatio_=void 0!==e.tilePixelRatio?e.tilePixelRatio:1,i.tileGrid=void 0!==e.tileGrid?e.tileGrid:null;var n=e.tileGrid;return n&&ZE(n.getTileSize(n.getMinZoom()),[256,256]),i.tileCache=new PE(e.cacheSize||0),i.tmpSize=[0,0],i.key_=e.key||"",i.tileOptions={transition:e.transition},i.zDirection=e.zDirection?e.zDirection:0,i}return tD(e,t),e.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},e.prototype.expireCache=function(t,e){var i=this.getTileCacheForProjection(t);i&&i.expireCache(e)},e.prototype.forEachLoadedTile=function(t,e,i,n){var r=this.getTileCacheForProjection(t);if(!r)return!1;for(var s,o,a,l=!0,c=i.minX;c<=i.maxX;++c)for(var h=i.minY;h<=i.maxY;++h)o=kE(e,c,h),a=!1,r.containsKey(o)&&(a=2===(s=r.get(o)).getState())&&(a=!1!==n(s)),a||(l=!1);return l},e.prototype.getGutterForProjection=function(t){return 0},e.prototype.getKey=function(){return this.key_},e.prototype.setKey=function(t){this.key_!==t&&(this.key_=t,this.changed())},e.prototype.getOpaque=function(t){return this.opaque_},e.prototype.getResolutions=function(){return this.tileGrid.getResolutions()},e.prototype.getTile=function(t,e,i,n,r){return ZC()},e.prototype.getTileGrid=function(){return this.tileGrid},e.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:QE(t)},e.prototype.getTileCacheForProjection=function(t){return yS(aE(this.getProjection(),t),68),this.tileCache},e.prototype.getTilePixelRatio=function(t){return this.tilePixelRatio_},e.prototype.getTilePixelSize=function(t,e,i){var n=this.getTileGridForProjection(i),r=this.getTilePixelRatio(e),s=ZE(n.getTileSize(t),this.tmpSize);return 1==r?s:WE(s,r,this.tmpSize)},e.prototype.getTileCoordForTileUrlFunction=function(t,e){var i=void 0!==e?e:this.getProjection(),n=this.getTileGridForProjection(i);return this.getWrapX()&&i.isGlobal()&&(t=function(t,e,i){var n=e[0],r=t.getTileCoordCenter(e),s=JE(i);if(kS(s,r))return e;var o=YS(s),a=Math.ceil((s[0]-r[0])/o);return r[0]+=o*a,t.getTileCoordForCoordAndZ(r,n)}(n,t,i)),function(t,e){var i=t[0],n=t[1],r=t[2];if(e.getMinZoom()>i||i>e.getMaxZoom())return!1;var s=e.getFullTileRange(i);return!s||s.containsXY(n,r)}(t,n)?t:null},e.prototype.clear=function(){this.tileCache.clear()},e.prototype.refresh=function(){this.clear(),t.prototype.refresh.call(this)},e.prototype.updateCacheSize=function(t,e){var i=this.getTileCacheForProjection(e);t>i.highWaterMark&&(i.highWaterMark=t)},e.prototype.useTile=function(t,e,i,n){},e}(zE),iD=function(t){function e(e,i){var n=t.call(this,e)||this;return n.tile=i,n}return tD(e,t),e}(MC),nD=eD;function rD(t,e){var i=/\{z\}/g,n=/\{x\}/g,r=/\{y\}/g,s=/\{-y\}/g;return function(o,a,l){return o?t.replace(i,o[0].toString()).replace(n,o[1].toString()).replace(r,o[2].toString()).replace(s,function(){var t=e.getFullTileRange(o[0]);return yS(t,55),(t.getHeight()-o[2]-1).toString()}):void 0}}var sD=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),oD=function(t){function e(i){var n=t.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,opaque:i.opaque,projection:i.projection,state:i.state,tileGrid:i.tileGrid,tilePixelRatio:i.tilePixelRatio,wrapX:i.wrapX,transition:i.transition,key:i.key,attributionsCollapsible:i.attributionsCollapsible,zDirection:i.zDirection})||this;return n.generateTileUrlFunction_=n.tileUrlFunction===e.prototype.tileUrlFunction,n.tileLoadFunction=i.tileLoadFunction,i.tileUrlFunction&&(n.tileUrlFunction=i.tileUrlFunction),n.urls=null,i.urls?n.setUrls(i.urls):i.url&&n.setUrl(i.url),n.tileLoadingKeys_={},n}return sD(e,t),e.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},e.prototype.getTileUrlFunction=function(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction},e.prototype.getUrls=function(){return this.urls},e.prototype.handleTileChange=function(t){var e,i=t.target,n=YC(i),r=i.getState();1==r?(this.tileLoadingKeys_[n]=!0,e="tileloadstart"):n in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[n],e=3==r?"tileloaderror":2==r?"tileloadend":void 0),null!=e&&this.dispatchEvent(new iD(e,i))},e.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},e.prototype.setTileUrlFunction=function(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==e?this.setKey(e):this.changed()},e.prototype.setUrl=function(t){var e=function(t){var e=[],i=/\{([a-z])-([a-z])\}/.exec(t);if(i){var n=i[1].charCodeAt(0),r=i[2].charCodeAt(0),s=void 0;for(s=n;s<=r;++s)e.push(t.replace(i[0],String.fromCharCode(s)));return e}if(i=/\{(\d+)-(\d+)\}/.exec(t)){for(var o=parseInt(i[2],10),a=parseInt(i[1],10);a<=o;a++)e.push(t.replace(i[0],a.toString()));return e}return e.push(t),e}(t);this.urls=e,this.setUrls(e)},e.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(function(t,e){for(var i=t.length,n=new Array(i),r=0;r<i;++r)n[r]=rD(t[r],e);return function(t){return 1===t.length?t[0]:function(e,i,n){if(e){var r=bk(DE(e),t.length);return t[r](e,i,n)}}}(n)}(t,this.tileGrid),e):this.setKey(e)},e.prototype.tileUrlFunction=function(t,e,i){},e.prototype.useTile=function(t,e,i){var n=kE(t,e,i);this.tileCache.containsKey(n)&&this.tileCache.get(n)},e}(nD),aD=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function lD(t,e){t.getImage().src=e}var cD=function(t){function e(e){var i=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:lD,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})||this;return i.crossOrigin=void 0!==e.crossOrigin?e.crossOrigin:null,i.tileClass=void 0!==e.tileClass?e.tileClass:ok,i.tileCacheForProjection={},i.tileGridForProjection={},i.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,i.contextOptions_=!1===e.imageSmoothing?bE:void 0,i.renderReprojectionEdges_=!1,i}return aD(e,t),e.prototype.canExpireCache=function(){if(this.tileCache.canExpireCache())return!0;for(var t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1},e.prototype.expireCache=function(t,e){var i=this.getTileCacheForProjection(t);for(var n in this.tileCache.expireCache(this.tileCache==i?e:{}),this.tileCacheForProjection){var r=this.tileCacheForProjection[n];r.expireCache(r==i?e:{})}},e.prototype.getContextOptions=function(){return this.contextOptions_},e.prototype.getGutterForProjection=function(t){return this.getProjection()&&t&&!aE(this.getProjection(),t)?0:this.getGutter()},e.prototype.getGutter=function(){return 0},e.prototype.getKey=function(){return t.prototype.getKey.call(this)+(this.contextOptions_?"\n"+JSON.stringify(this.contextOptions_):"")},e.prototype.getOpaque=function(e){return!(this.getProjection()&&e&&!aE(this.getProjection(),e))&&t.prototype.getOpaque.call(this,e)},e.prototype.getTileGridForProjection=function(t){var e=this.getProjection();if(!this.tileGrid||e&&!aE(e,t)){var i=YC(t);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=QE(t)),this.tileGridForProjection[i]}return this.tileGrid},e.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();if(!e||aE(e,t))return this.tileCache;var i=YC(t);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new PE(this.tileCache.highWaterMark)),this.tileCacheForProjection[i]},e.prototype.createTile_=function(t,e,i,n,r,s){var o=[t,e,i],a=this.getTileCoordForTileUrlFunction(o,r),l=a?this.tileUrlFunction(a,n,r):void 0,c=new this.tileClass(o,void 0!==l?0:4,void 0!==l?l:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return c.key=s,c.addEventListener("change",this.handleTileChange.bind(this)),c},e.prototype.getTile=function(t,e,i,n,r){var s=this.getProjection();if(s&&r&&!aE(s,r)){var o=this.getTileCacheForProjection(r),a=[t,e,i],l=void 0,c=EE(a);o.containsKey(c)&&(l=o.get(c));var h=this.getKey();if(l&&l.key==h)return l;var u=this.getTileGridForProjection(s),d=this.getTileGridForProjection(r),p=this.getTileCoordForTileUrlFunction(a,r),f=new xE(s,u,r,d,a,p,this.getTilePixelRatio(n),this.getGutter(),(function(t,e,i,n){return this.getTileInternal(t,e,i,n,s)}).bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.contextOptions_);return f.key=h,l?(f.interimTile=l,f.refreshInterimChain(),o.replace(c,f)):o.set(c,f),f}return this.getTileInternal(t,e,i,n,s||r)},e.prototype.getTileInternal=function(t,e,i,n,r){var s=null,o=kE(t,e,i),a=this.getKey();if(this.tileCache.containsKey(o)){if((s=this.tileCache.get(o)).key!=a){var l=s;(s=this.createTile_(t,e,i,n,r,a)).interimTile=0==l.getState()?l.interimTile:l,s.refreshInterimChain(),this.tileCache.replace(o,s)}}else s=this.createTile_(t,e,i,n,r,a),this.tileCache.set(o,s);return s},e.prototype.setRenderReprojectionEdges=function(t){if(this.renderReprojectionEdges_!=t){for(var e in this.renderReprojectionEdges_=t,this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}},e.prototype.setTileGridForProjection=function(t,e){var i=eE(t);if(i){var n=YC(i);n in this.tileGridForProjection||(this.tileGridForProjection[n]=e)}},e}(oD),hD=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),uD=function(t){function e(e){var i=e||{},n=void 0!==i.projection?i.projection:"EPSG:3857",r=void 0!==i.tileGrid?i.tileGrid:function(t){var e=t||{},i=e.extent||eE("EPSG:3857").getExtent(),n={extent:i,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:XE(i,e.maxZoom,e.tileSize,e.maxResolution)};return new YE(n)}({extent:JE(n),maxResolution:i.maxResolution,maxZoom:i.maxZoom,minZoom:i.minZoom,tileSize:i.tileSize});return t.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,imageSmoothing:i.imageSmoothing,opaque:i.opaque,projection:n,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileGrid:r,tileLoadFunction:i.tileLoadFunction,tilePixelRatio:i.tilePixelRatio,tileUrlFunction:i.tileUrlFunction,url:i.url,urls:i.urls,wrapX:void 0===i.wrapX||i.wrapX,transition:i.transition,attributionsCollapsible:i.attributionsCollapsible,zDirection:i.zDirection})||this}return hD(e,t),e}(cD),dD=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),pD=function(t){function e(e){var i=e||{};return t.call(this,{attributions:void 0!==i.attributions?i.attributions:['&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.'],attributionsCollapsible:!1,cacheSize:i.cacheSize,crossOrigin:void 0!==i.crossOrigin?i.crossOrigin:"anonymous",imageSmoothing:i.imageSmoothing,maxZoom:void 0!==i.maxZoom?i.maxZoom:19,opaque:void 0===i.opaque||i.opaque,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileLoadFunction:i.tileLoadFunction,transition:i.transition,url:void 0!==i.url?i.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png",wrapX:i.wrapX})||this}return dD(e,t),e}(uD),fD=i("AytR");const mD='\xa9 <a href="http://openstreetmap.org">OpenStreetMap</a> contributors.',gD=[{label:"OpenStreetMap",source:new pD({url:fD.a.osmURL,crossOrigin:"anonymous",attributions:mD})},{label:"Gray",source:new uD({url:fD.a.grayURL,crossOrigin:"anonymous",attributions:mD})},{label:"Dark",source:new uD({url:fD.a.darkURL,crossOrigin:"anonymous",attributions:mD})},{label:"Terrain",source:new uD({url:fD.a.terrainURL,crossOrigin:"anonymous",attributions:mD})},{label:"Orthophotos",source:new uD({url:fD.a.topoimageryURL,crossOrigin:"anonymous",attributions:'<span title="Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community">\xa9 Esri</span>'})},{label:"SHOM",source:new uD({url:fD.a.shomURL,crossOrigin:"anonymous",attributions:"\xa9 SHOM"})}];class AD{constructor(t={}){Object.assign(this,t)}}const bD=[{label:"15 minutes",value:900},{label:"30 minutes",value:1800},{label:"1 heure",value:3600},{label:"2 heures",value:7200},{label:"6 heures",value:21600},{label:"12 heures",value:43200},{label:"24 heures",value:86400},{label:"2 jours",value:172800},{label:"1 semaine",value:604800},{label:"1 mois",value:2592e3}].reverse(),vD=bD.reduce((t,e)=>(t[e.value]=e.label,t),{}),_D={left:"#2ecb6f",middle:"#fddb21",right:"#f31717"},yD=[{label:"15 minutes",value:900},{label:"30 minutes",value:1800},{label:"1 heure",value:3600},{label:"2 heures",value:7200},{label:"6 heures",value:21600},{label:"12 heures",value:43200},{label:"24 heures",value:86400},{label:"2 jours",value:0}].reverse(),wD=yD.reduce((t,e)=>(t[e.value]=e.label,t),{}),xD={left:"#efefef",middle:"#bebebe",right:"#5d5d5d"},CD=[{key:"portsOfCall",label:"Escales"},{key:"voyages",label:"Voyages"},{key:"voyageGroups",label:"Synth\xe8se des voyages"}],SD=CD[0].key,kD=[{key:"unavailable",name:"Unavailable",min:0,max:0},{key:"reserved",name:"Reserved",min:1,max:29},{key:"fishing",name:"Fishing",min:30,max:30},{key:"towing",name:"Towing",min:31,max:32},{key:"dredger",name:"Dredger",min:33,max:33},{key:"diving",name:"Dive Vessel",min:34,max:34},{key:"military",name:"Military Ops",min:35,max:35},{key:"sailing",name:"Sailing Vessel",min:36,max:36},{key:"leisure",name:"Pleasure Craft",min:37,max:37},{key:"highspeed",name:"High Speed Craft",min:40,max:49},{key:"port",name:"Pilot Vessel",min:50,max:55},{key:"sar",name:"Search and Rescue Vessel",min:51,max:51},{key:"tug",name:"Tug",min:52,max:52},{key:"port_tender",name:"Port Tender",min:53,max:53},{key:"anti-pollution",name:"Anti-pollution",min:54,max:54},{key:"law_enforcement",name:"Law Enforcement",min:55,max:55},{key:"medical",name:"Medical",min:58,max:58},{key:"noncombatant",name:"Noncombatant ship",min:59,max:59},{key:"passenger",name:"Passenger",min:60,max:69},{key:"cargo",name:"Cargo",min:70,max:79},{key:"tanker",name:"Tanker",min:80,max:89},{key:"other",name:"Other",min:90,max:99}],ED=kD.reduce((t,e)=>{for(let i=e.min;i<=e.max;i++)t[i]=e.name;return t},{}),DD=(kD.reduce((t,e)=>{for(let i=e.min;i<=e.max;i++)t[i]=e.key;return t},{}),kD.reduce((t,e)=>(t[e.key]=e,t),{})),ID=(new Date).getFullYear();function PD(t){return Object(ue.a)(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}function OD(t){const e=typeof t;if("string"===e||"number"===e||"boolean"===e||null==t)return t;if(t instanceof Array)return t.map(OD);if(t instanceof Date)return new Date(t.getTime());if("object"===e)return Object.keys(t).reduce((e,i)=>(e[i]=OD(t[i]),e),{});throw new Error(`unknown object type: ${e}`)}function MD(t){return t instanceof Array?t.map(MD):t?new t.constructor(t):t}function TD(t){return null==t?"":t.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function RD(t){return null!==t&&isFinite(t)}function VD(t){return Math.round(10*t)/10}function FD(t){return null!=t}function LD(t){return t<10?`0${t}`:t}function UD(t){return t?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"):""}function BD(t){return t?`"${null==t?void 0:t.replace(/"/g,'\\"')}"`:""}function ND(t){return btoa(unescape(encodeURIComponent(t)))}function jD(t){return decodeURIComponent(escape(atob(t)))}function zD(){return{shipTypes:[],shipFlags:[],shipIdentifier:"",fleets:[],shipDeparture:"",shipDestination:"",shipStatus:[],shipSpeed:{min:0,max:100},shipLength:{min:0,max:500},shipWidth:{min:0,max:100},shipDraught:{min:0,max:30},shipYearofbuild:{min:1874,max:ID},shipYearofbuildIncludeNulls:!0,shipCourse:{min:0,max:360},transparencyThreshold:3600,shipLastPositionTimestampThreshold:21600}}function HD(t){return OD({shipTypes:t.shipTypes,shipFlags:t.shipFlags,shipIdentifier:t.shipIdentifier,fleets:t.fleets,shipDeparture:t.shipDeparture,shipDestination:t.shipDestination,shipStatus:t.shipStatus,shipSpeed:t.shipSpeed,shipLength:t.shipLength,shipWidth:t.shipWidth,shipDraught:t.shipDraught,shipYearofbuild:t.shipYearofbuild,shipYearofbuildIncludeNulls:t.shipYearofbuildIncludeNulls,shipCourse:t.shipCourse,shipLastPositionTimestampThreshold:t.shipLastPositionTimestampThreshold,transparencyThreshold:t.transparencyThreshold})}function KD(t,e){return t.shipTypes===e.shipTypes&&t.shipFlags===e.shipFlags&&t.shipIdentifier===e.shipIdentifier&&t.fleets===e.fleets&&t.shipDeparture===e.shipDeparture&&t.shipDestination===e.shipDestination&&t.shipStatus===e.shipStatus&&t.shipSpeed===e.shipSpeed&&t.shipLength===e.shipLength&&t.shipWidth===e.shipWidth&&t.shipDraught===e.shipDraught&&t.shipYearofbuild===e.shipYearofbuild&&t.shipYearofbuildIncludeNulls===e.shipYearofbuildIncludeNulls&&t.shipCourse===e.shipCourse&&t.shipLastPositionTimestampThreshold===e.shipLastPositionTimestampThreshold&&t.transparencyThreshold===e.transparencyThreshold}class $D{constructor(t={}){this.shipIdentifier="",this.shipDeparture="",this.shipDestination="",this.colorMode="shipType",this.alertRules=[],this.eventTypes=[],this.minimumTimestampThreshold=604800,this.importantTimestampThreshold=3600,this.now=Math.floor(Date.now()/1e3),this.frozenTimestamp=0,this.absoluteTransparencyThresholdTimestamp=0,this.absoluteVisibilityThresholdTimestamp=0,this.absoluteMinimumTimestamp=0,this.absoluteImportantTimestamp=0,this.colorModeShipType=!0,this.colorModeAllShips=!1,this.colorModeResultsOnly=!1,this.isMissingColorFilterConfiguration=!1,this.shipTypesCache={},this.shipFlagsCache={},this.fleetsShipsCache=[],this.shipDestinations=[],this.selectedShips=new Set,this.restrictedShips=new Set,Object.assign(this,zD(),t),this.refresh()}refresh(){return this.now=this.frozenTimestamp||Math.floor(Date.now()/1e3),this.absoluteTransparencyThresholdTimestamp=this.now-(this.transparencyThreshold>0?this.transparencyThreshold:this.now),this.absoluteVisibilityThresholdTimestamp=this.now-(this.shipLastPositionTimestampThreshold>0?this.shipLastPositionTimestampThreshold:this.now),this.absoluteMinimumTimestamp=this.now-(this.minimumTimestampThreshold>0?this.minimumTimestampThreshold:this.now),this.absoluteImportantTimestamp=this.now-(this.importantTimestampThreshold>0?this.importantTimestampThreshold:this.now),this.colorModeShipType="shipType"===this.colorMode,this.colorModeAllShips="allShips"===this.colorMode,this.colorModeResultsOnly="resultsOnly"===this.colorMode,this.isMissingColorFilterConfiguration=!this.colorModeShipType&&0===this.alertRules.length&&0===this.eventTypes.length,this.shipTypesCache=this.shipTypes.reduce((t,e)=>{const i=DD[e];for(let n=i.min;n<=i.max;n++)t[n]=i.name;return t},{}),this.shipFlagsCache=this.shipFlags.reduce((t,e)=>(t[e]=!0,t),{}),this.shipDestinations=this.shipDestination.split(",").filter(t=>t.length>0).map(t=>t.trim()),this.shipDepartures=this.shipDeparture.split(",").filter(t=>t.length>0).map(t=>t.trim()),this}freezeTimestamp(t){this.frozenTimestamp=t}}const GD=[{key:"shipType",label:"Par type de navire"},{key:"allShips",label:"R\xe9sultats et autres navires"},{key:"resultsOnly",label:"R\xe9sultats seulement"}];class WD{constructor(t=null){this.rules=[],this.showReadAlerts=!0,this.showFalsePositiveAlerts=!1,Object.assign(this,t)}static New(t=null){return new WD(t)}}class ZD{constructor(t,e){this.lon=t,this.lat=e>90?90:e<-90?-90:e}}class qD{constructor(t,e){this.bottomLeft=t,this.topRight=e}static fromOLExtent(t){const[e,i,n,r]=uE(t,"EPSG:3857","EPSG:4326");return new qD(new ZD(e,i),new ZD(n,r))}static New(t,e,i,n){return new qD(new ZD(t,e),new ZD(i,n))}scale(t){const e=(this.topRight.lat-this.bottomLeft.lat)/2,i=(this.topRight.lon-this.bottomLeft.lon)/2,n=this.bottomLeft.lon+i,r=this.bottomLeft.lat+e;return new qD(new ZD(n-t*i,r-t*e),new ZD(n+t*i,r+t*e))}restrict(t){const e=this.topRight.lon>t.topRight.lon?t.topRight.lon:this.topRight.lon,i=this.topRight.lat>t.topRight.lat?t.topRight.lat:this.topRight.lat;return new qD(new ZD(this.bottomLeft.lon<t.bottomLeft.lon?t.bottomLeft.lon:this.bottomLeft.lon,this.bottomLeft.lat<t.bottomLeft.lat?t.bottomLeft.lat:this.bottomLeft.lat),new ZD(e,i))}getPolygon(){const t=YD(this.bottomLeft.lon),e=YD(this.topRight.lon);return XD(t,this.bottomLeft.lat,e,this.topRight.lat)}getBoundedPolygons(){const t=YD(this.bottomLeft.lon),e=YD(this.topRight.lon);return Math.abs(this.topRight.lon-this.bottomLeft.lon)>=359?[XD(-180,this.bottomLeft.lat,0,this.topRight.lat),XD(0,this.bottomLeft.lat,180,this.topRight.lat)]:t>e?[XD(t,this.bottomLeft.lat,180,this.topRight.lat),XD(-180,this.bottomLeft.lat,e,this.topRight.lat)].map(t=>QD(t)).flat():[this.getPolygon()].map(t=>QD(t)).flat()}toExtent(){return[...sE([this.bottomLeft.lon,this.bottomLeft.lat]),...sE([this.topRight.lon,this.topRight.lat])]}containsPosition(t,e){return this.bottomLeft.lat<=e&&e<=this.topRight.lat&&this.bottomLeft.lon<=t&&t<=this.topRight.lon}addPoint(t,e){t<this.bottomLeft.lon?this.bottomLeft.lon=t:t>this.topRight.lon&&(this.topRight.lon=t),e<this.bottomLeft.lat?this.bottomLeft.lat=e:e>this.topRight.lat&&(this.topRight.lat=e)}toString(){return`${this.bottomLeft.lon},${this.bottomLeft.lat}:${this.topRight.lon},${this.topRight.lat}`}toStringImage(){return`${Math.round(this.bottomLeft.lon)}, ${Math.round(this.bottomLeft.lat)} |_ \u203e| ${Math.round(this.topRight.lon)}, ${Math.round(this.topRight.lat)}`}toURLPath(){return`${this.bottomLeft.lat}/${this.topRight.lat}/${this.bottomLeft.lon}/${this.topRight.lon}`}toLatLonExtent(){return[this.bottomLeft.lon,this.bottomLeft.lat,this.topRight.lon,this.topRight.lat]}}function YD(t){return t<-180||t>180?bk(t+180,360)-180:t}function QD(t){const e=t[0][0],i=t[1][0],n=t[0][1],r=t[2][1];if(Math.abs(i-e)>180){const t=e+(i-e)/2;return[XD(e,n,t,r),XD(t,n,i,r)]}return[t]}function XD(t,e,i,n){return[[t,e],[i,e],[i,n],[t,n],[t,e]]}class JD{constructor(t={}){this.value=0,this.isCustom=!1,this.isRelative=!1,Object.assign(this,t)}refresh(){const t=MD(this);return this.isCustom||(t.end=Math.floor(Date.now()/1e3),t.start=t.end-t.value),t}shift(t){return this.setCustom(this.start+t,this.end+t)}extend(t){return t>0?this.setCustom(this.start,this.end+t):this.setCustom(this.start+t,this.end)}setCustom(t,e){const i=MD(this);return i.key="custom",i.isCustom=!0,i.start=t,i.end=e,i.value=e-t,i}setRelative(t){const e=MD(this);return e.isRelative=!0,e.start=t-this.value,e.end=t,e}}const tI=[new JD({key:"custom",label:"personnalis\xe9",isCustom:!0,value:0}),new JD({key:"last_hour",label:"la derni\xe8re heure",value:3600}),new JD({key:"last_3_hours",label:"les 3 derni\xe8res heures",value:10800}),new JD({key:"last_6_hours",label:"les 6 derni\xe8res heures",value:21600}),new JD({key:"last_12_hours",label:"les 12 derni\xe8res heures",value:43200}),new JD({key:"last_day",label:"le dernier jour",value:86400}),new JD({key:"last_2_days",label:"les 2 derniers jours",value:172800}),new JD({key:"last_week",label:"la derni\xe8re semaine",value:604800}),new JD({key:"last_month",label:"le dernier mois",value:2592e3}),new JD({key:"last_3_months",label:"les 3 derniers mois",value:7776e3})],eI=tI.find(t=>"last_day"===t.key),iI=tI.reduce((t,e)=>(t[e.key]=e,t),{});function nI(t,e){if(t.length<1)return t;FD(e)&&Math.abs(t[0][0]-e[0])>180&&(t[0][0]+=e[0]>0?360:-360);for(let i=1;i<t.length;i++)Math.abs(t[i][0]-t[i-1][0])>180&&(t[i][0]+=t[i-1][0]>0?360:-360);return t}function rI(t){return function(t){let e=t.split("N "),i="N ";if(1===e.length&&(e=t.split("S "),i="S ",1===e.length))throw new Error(`Invalid DMS format: ${t}`);return e[0].length<9&&(e[0]=`0${e[0]}`),e[1].length<11&&(e[1]=`${"0".repeat(11-e[1].length)}${e[1]}`),`${e[0]}${i}${e[1]}`}(Yk(t).replace(/ /g,"").replace(/N/g,"N ").replace(/S/g,"S "))}function sI(t){return[t[1],t[0]]}function oI(t,e){return Math.abs(t[0]-e[0])<1e-12&&Math.abs(t[1]-e[1])<1e-12}function aI([t,e],[i,n]){let r=Math.atan2(n-e,i-t);return r<0&&(r+=2*Math.PI),r}const lI=[{id:"shipType",execute(t){var e,i;(null===(i=null===(e=t.mapConfig)||void 0===e?void 0:e.shipFilter)||void 0===i?void 0:i.colorMode)&&(t.mapConfig.shipFilter.colorMode="shipType")}},{id:"defaultTimeRangeToLastDay",execute(t){t.defaultTimeRange=eI.key}},{id:"3_restrictedAreas",execute(t){var e;(null===(e=t.mapConfig)||void 0===e?void 0:e.restrictedArea)&&(t.mapConfig.restrictedAreas=DC(qD.New.apply(null,t.mapConfig.restrictedArea).toLatLonExtent()).map(t=>t.id),delete t.mapConfig.restrictedArea)}},{id:"4",execute(t){var e;if(null===(e=t.geolocationConfig)||void 0===e?void 0:e.fixedLocation){const{lon:e,lat:i}=t.geolocationConfig.fixedLocation;t.geolocationConfig.fixedLocation=rI([e,i])}}},{id:"5",execute(t){var e;(null===(e=t.mapConfig)||void 0===e?void 0:e.shipRefreshInterval)<3e4&&(t.mapConfig.shipRefreshInterval=3e4)}}];let cI=(()=>{class t{constructor(){this.devMode=!1,this.showReadAlerts=!0,this.showFalsePositiveAlerts=!1,this.eventsFilter={},this.defaultTimeRange=eI.key,this.migrations=[],this.lastView=null,this.alertsFilter=new WD,this.adminManageUsersPageSize=10,this.adminManageUsersSort={},this.load(),this.devMode&&(window.config=this)}set(t,e){this[t]=e,this.save()}load(){try{Object.assign(this,JSON.parse(localStorage.getItem("anais-config")))}catch($nt){console.error("could not load config from localstorage",$nt),localStorage.removeItem("anais-config")}this.runMigrations()}save(){localStorage.setItem("anais-config",JSON.stringify(this))}runMigrations(){let t=!1;lI.forEach(e=>{if(!this.migrations.includes(e.id))try{e.execute(this),this.migrations.push(e.id),t=!0}catch($nt){console.error(`error with migration \`${e.id}\``,$nt)}}),t&&this.save()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),hI=(()=>{class t{constructor(t){this.configService=t,this.shipFilter$=new Av.a(new $D),this.hasActiveShipFilters$=new Av.a(!1),this.shipRefreshInterval$=new Av.a(3e4),this.hidePositionsInLowZooms$=new Av.a(!1),this.highHexagonsResolution$=new Av.a(!1),this.detailedShipTraces$=new Av.a(!1),this.debugH3Trace$=new Av.a(!1),this.restrictedAreas$=new Av.a(null),this.restrictedAreaLonLat$=new Av.a(null),this.showMarineTrafficPhotos$=new Av.a(!0),this.showMarineTrafficDeparture$=new Av.a(!1),this.limitMinimumZoom$=new Av.a(!0),this.zoomOnLocationEvents$=new Av.a(!0),this.longitudeCenter$=new Av.a(0),this.enableRiskAssessmentButton$=new Av.a(!1),this.preloadMapTiles$=new Av.a(!1),this.manualMapFetch$=new Av.a(!1),this.tooltipsOpacity$=new Av.a(1),this.useUTCDates$=new Av.a(!1),this.baseLayer$=new Av.a(gD[0]),this.showShipsLayer$=new Av.a(!0),this.showAircraftsLayer$=new Av.a(!1),this.showAnnotationsLayer$=new Av.a(!0),this.showHexagonsLayer$=new Av.a(!1),this.showMaritimeBoundariesLayer$=new Av.a(!1),this.show36NqLimitsLayer$=new Av.a(!1),this.showEEZLayer$=new Av.a(!1),this.showSARLayer$=new Av.a(!1),this.showMRCCLayer$=new Av.a(!1),this.showTrailsLayer$=new Av.a(!0),this.showPortsLayer$=new Av.a(!1),this.showOpenSeaMapLayer$=new Av.a(!1),this.showSubcablesLayer$=new Av.a(!1),this.enableMultiSelectionMode$=new Av.a(!1),this.showPermanentTooltips$=new Av.a(!1),this.showMiniPermanentTooltips$=new Av.a(!1),this.showOtherShips$=new Av.a(!0),this.showFleetShipsOnly$=new Av.a(!0),this.portsOfCallDisplayMode$=new Av.a(SD),this.expandLloydsPanel$=new Av.a(!1),this.movesSearchIncludeIncompletePassages$=new Av.a(!1),this.enableHistoryModeExtrapolation$=new Av.a(!1),this.loadMapConfig(),this.shipFilter$.pipe(Gg(1)).subscribe(()=>{this.saveMapConfig()}),this.shipFilter$.subscribe(t=>{this.hasActiveShipFilters$.next(t.shipTypes.length>0||t.shipFlags.length>0||t.shipDestinations.length>0||t.shipDepartures.length>0||t.shipStatus.length>0||0!==t.shipSpeed.min||100!==t.shipSpeed.max||0!==t.shipLength.min||500!==t.shipLength.max||0!==t.shipWidth.min||100!==t.shipWidth.max||0!==t.shipDraught.min||30!==t.shipDraught.max||1874!==t.shipYearofbuild.min||t.shipYearofbuild.max!==ID||0!==t.shipCourse.min||360!==t.shipCourse.max||t.fleets.length>0||t.shipIdentifier.length>0)})}loadMapConfig(){const t=this.config=this.configService.mapConfig;t&&(FD(t.shipFilter)&&this.shipFilter$.next(new $D(t.shipFilter)),FD(t.shipRefreshInterval)&&this.shipRefreshInterval$.next(t.shipRefreshInterval),FD(t.hidePositionsInLowZooms)&&this.hidePositionsInLowZooms$.next(t.hidePositionsInLowZooms),FD(t.detailedShipTraces)&&this.detailedShipTraces$.next(t.detailedShipTraces),FD(t.highHexagonsResolution)&&this.highHexagonsResolution$.next(t.highHexagonsResolution),FD(t.debugH3Trace)&&this.debugH3Trace$.next(t.debugH3Trace),FD(t.restrictedAreaLonLat)&&this.restrictedAreaLonLat$.next(t.restrictedAreaLonLat),FD(t.restrictedAreas)&&this.restrictedAreas$.next(t.restrictedAreas),FD(t.showMarineTrafficPhotos)&&this.showMarineTrafficPhotos$.next(t.showMarineTrafficPhotos),FD(t.showMarineTrafficDeparture)&&this.showMarineTrafficDeparture$.next(t.showMarineTrafficDeparture),FD(t.limitMinimumZoom)&&this.limitMinimumZoom$.next(t.limitMinimumZoom),FD(t.zoomOnLocationEvents)&&this.zoomOnLocationEvents$.next(t.zoomOnLocationEvents),FD(t.longitudeCenter)&&this.longitudeCenter$.next(t.longitudeCenter),FD(t.enableRiskAssessmentButton)&&this.enableRiskAssessmentButton$.next(t.enableRiskAssessmentButton),FD(t.preloadMapTiles)&&this.preloadMapTiles$.next(t.preloadMapTiles),FD(t.manualMapFetch)&&this.manualMapFetch$.next(t.manualMapFetch),FD(t.tooltipsOpacity)&&this.tooltipsOpacity$.next(t.tooltipsOpacity),FD(t.useUTCDates)&&this.useUTCDates$.next(t.useUTCDates),FD(t.baseLayer)&&this.baseLayer$.next(gD.find(e=>e.label===t.baseLayer)||this.baseLayer$.value),FD(t.showShipsLayer)&&this.showShipsLayer$.next(t.showShipsLayer),FD(t.showAircraftsLayer)&&this.showAircraftsLayer$.next(t.showAircraftsLayer),FD(t.showAnnotationsLayer)&&this.showAnnotationsLayer$.next(t.showAnnotationsLayer),FD(t.showHexagonsLayer)&&this.showHexagonsLayer$.next(t.showHexagonsLayer),FD(t.showMaritimeBoundariesLayer)&&this.showMaritimeBoundariesLayer$.next(t.showMaritimeBoundariesLayer),FD(t.show36NqLimitsLayer)&&this.show36NqLimitsLayer$.next(t.show36NqLimitsLayer),FD(t.showEEZLayer)&&this.showEEZLayer$.next(t.showEEZLayer),FD(t.showSARLayer)&&this.showSARLayer$.next(t.showSARLayer),FD(t.showMRCCLayer)&&this.showMRCCLayer$.next(t.showMRCCLayer),FD(t.showTrailsLayer)&&this.showTrailsLayer$.next(t.showTrailsLayer),FD(t.showPortsLayer)&&this.showPortsLayer$.next(t.showPortsLayer),FD(t.showOpenSeaMapLayer)&&this.showOpenSeaMapLayer$.next(t.showOpenSeaMapLayer),FD(t.showSubcablesLayer)&&this.showSubcablesLayer$.next(t.showSubcablesLayer),FD(t.enableMultiSelectionMode)&&this.enableMultiSelectionMode$.next(t.enableMultiSelectionMode),FD(t.showPermanentTooltips)&&this.showPermanentTooltips$.next(t.showPermanentTooltips),FD(t.showMiniPermanentTooltips)&&this.showMiniPermanentTooltips$.next(t.showMiniPermanentTooltips),FD(t.showOtherShips)&&this.showOtherShips$.next(t.showOtherShips),FD(t.showFleetShipsOnly)&&this.showFleetShipsOnly$.next(t.showFleetShipsOnly),FD(t.portsOfCallDisplayMode)&&this.portsOfCallDisplayMode$.next(t.portsOfCallDisplayMode),FD(t.expandLloydsPanel)&&this.expandLloydsPanel$.next(t.expandLloydsPanel),FD(t.movesSearchIncludeIncompletePassages)&&this.movesSearchIncludeIncompletePassages$.next(t.movesSearchIncludeIncompletePassages),FD(t.enableHistoryModeExtrapolation)&&this.enableHistoryModeExtrapolation$.next(t.enableHistoryModeExtrapolation))}saveMapConfig(){const t=this.config=new AD({shipFilter:this.shipFilter$.value,shipRefreshInterval:this.shipRefreshInterval$.value,hidePositionsInLowZooms:this.hidePositionsInLowZooms$.value,detailedShipTraces:this.detailedShipTraces$.value,highHexagonsResolution:this.highHexagonsResolution$.value,debugH3Trace:this.debugH3Trace$.value,restrictedAreaLonLat:this.restrictedAreaLonLat$.value,restrictedAreas:this.restrictedAreas$.value,showMarineTrafficPhotos:this.showMarineTrafficPhotos$.value,showMarineTrafficDeparture:this.showMarineTrafficDeparture$.value,limitMinimumZoom:this.limitMinimumZoom$.value,zoomOnLocationEvents:this.zoomOnLocationEvents$.value,longitudeCenter:this.longitudeCenter$.value,enableRiskAssessmentButton:this.enableRiskAssessmentButton$.value,preloadMapTiles:this.preloadMapTiles$.value,manualMapFetch:this.manualMapFetch$.value,tooltipsOpacity:this.tooltipsOpacity$.value,useUTCDates:this.useUTCDates$.value,baseLayer:this.baseLayer$.value.label,showShipsLayer:this.showShipsLayer$.value,showAircraftsLayer:this.showAircraftsLayer$.value,showAnnotationsLayer:this.showAnnotationsLayer$.value,showHexagonsLayer:this.showHexagonsLayer$.value,showMaritimeBoundariesLayer:this.showMaritimeBoundariesLayer$.value,show36NqLimitsLayer:this.show36NqLimitsLayer$.value,showEEZLayer:this.showEEZLayer$.value,showSARLayer:this.showSARLayer$.value,showMRCCLayer:this.showMRCCLayer$.value,showTrailsLayer:this.showTrailsLayer$.value,showPortsLayer:this.showPortsLayer$.value,showOpenSeaMapLayer:this.showOpenSeaMapLayer$.value,showSubcablesLayer:this.showSubcablesLayer$.value,enableMultiSelectionMode:this.enableMultiSelectionMode$.value,showPermanentTooltips:this.showPermanentTooltips$.value,showMiniPermanentTooltips:this.showMiniPermanentTooltips$.value,showOtherShips:this.showOtherShips$.value,showFleetShipsOnly:this.showFleetShipsOnly$.value,portsOfCallDisplayMode:this.portsOfCallDisplayMode$.value,expandLloydsPanel:this.expandLloydsPanel$.value,movesSearchIncludeIncompletePassages:this.movesSearchIncludeIncompletePassages$.value,enableHistoryModeExtrapolation:this.enableHistoryModeExtrapolation$.value});this.configService.set("mapConfig",t)}resetShipFilter(){const t=new $D;this.shipFilter$.next(t)}refreshAndNotifyShipFilter(){this.shipFilter$.value.refresh(),this.shipFilter$.next(this.shipFilter$.value)}updateBatch(t){Object.assign(this.shipFilter$.value,t),this.refreshAndNotifyShipFilter()}updateAlertRulesFilter(t){this.shipFilter$.value.alertRules=t,this.refreshAndNotifyShipFilter(),this.configService.set("alertRulesFilter",t)}updateColorMode(t){this.shipFilter$.value.colorMode=t,this.refreshAndNotifyShipFilter()}updateShipTypesFilter(t){this.shipFilter$.value.shipTypes=t,this.refreshAndNotifyShipFilter()}updateShipFlagsFilter(t){this.shipFilter$.value.shipFlags=t,this.refreshAndNotifyShipFilter()}updateShipIdsFilter(t){this.shipFilter$.value.restrictedShips=new Set(t),this.refreshAndNotifyShipFilter()}updateSelectedShipsFilter(t){this.shipFilter$.value.selectedShips=new Set(t),this.refreshAndNotifyShipFilter()}freezeTimestamp(t){this.shipFilter$.value.frozenTimestamp=t,this.refreshAndNotifyShipFilter()}updateShipDestinationFilter(t){this.shipFilter$.value.shipDestination=t.toUpperCase(),this.refreshAndNotifyShipFilter()}updateShipDepartureFilter(t){this.shipFilter$.value.shipDeparture=t.toUpperCase(),this.refreshAndNotifyShipFilter()}updateShipIdentifierFilter(t){this.shipFilter$.value.shipIdentifier=t.toUpperCase(),this.refreshAndNotifyShipFilter()}updateShipStatusFilter(t){this.shipFilter$.value.shipStatus=t,this.refreshAndNotifyShipFilter()}updateShipSpeedFilter(t){this.shipFilter$.value.shipSpeed=t,this.refreshAndNotifyShipFilter()}updateShipLengthFilter(t){this.shipFilter$.value.shipLength=t,this.refreshAndNotifyShipFilter()}updateShipWidthFilter(t){this.shipFilter$.value.shipWidth=t,this.refreshAndNotifyShipFilter()}updateShipDraughtFilter(t){this.shipFilter$.value.shipDraught=t,this.refreshAndNotifyShipFilter()}updateShipYearofbuildFilter(t){this.shipFilter$.value.shipYearofbuild=t,this.refreshAndNotifyShipFilter()}updateShipYearofbuildIncludeNullsFilter(t){this.shipFilter$.value.shipYearofbuildIncludeNulls=t,this.refreshAndNotifyShipFilter()}updateShipCourseFilter(t){this.shipFilter$.value.shipCourse=t,this.refreshAndNotifyShipFilter()}updateFleetsFilter(t){this.shipFilter$.value.fleets=t,this.refreshAndNotifyShipFilter()}updateEventTypesFilter(t){this.shipFilter$.value.eventTypes=t,this.refreshAndNotifyShipFilter()}updateTimestampThresholds(t,e){this.shipFilter$.value.minimumTimestampThreshold=t,this.shipFilter$.value.importantTimestampThreshold=e,this.refreshAndNotifyShipFilter()}updateShipRefreshInterval(t){this.shipRefreshInterval$.next(t),this.saveMapConfig()}updateHidePositionsInLowZooms(t){this.hidePositionsInLowZooms$.next(t),this.saveMapConfig()}toggleDetailedShipTraces(){this.detailedShipTraces$.next(!this.detailedShipTraces$.value),this.saveMapConfig()}updateHighHexagonsResolution(t){this.highHexagonsResolution$.next(t),this.saveMapConfig()}updateDebugH3Trace(t){this.debugH3Trace$.next(t),this.saveMapConfig()}updateRestrictedAreas(t){this.restrictedAreaLonLat$.next(t),this.restrictedAreas$.next(t?DC(t).map(t=>t.id):null),this.saveMapConfig()}updateShowMarineTrafficPhotos(t){this.showMarineTrafficPhotos$.next(t),this.saveMapConfig()}updateShowMarineTrafficDeparture(t){this.showMarineTrafficDeparture$.next(t),this.saveMapConfig()}updateLimitMinimumZoom(t){this.limitMinimumZoom$.next(t),this.saveMapConfig()}updateZoomOnLocationEvents(t){this.zoomOnLocationEvents$.next(t),this.saveMapConfig()}updateLongitudeCenter(t){this.longitudeCenter$.next(t),this.saveMapConfig()}updateEnableRiskAssessmentButton(t){this.enableRiskAssessmentButton$.next(t),this.saveMapConfig()}updatePreloadMapTiles(t){this.preloadMapTiles$.next(t),this.saveMapConfig()}updateManualMapFetch(t){this.manualMapFetch$.next(t),this.saveMapConfig()}updateTooltipsOpacity(t){this.tooltipsOpacity$.next(t),this.saveMapConfig()}updateUseUTCDates(t){this.useUTCDates$.next(t),this.saveMapConfig()}toggleShipsColorMode(){this.updateColorMode("shipType"===this.shipFilter$.value.colorMode?"allShips":"shipType")}updateVisibilityThresholds(t,e){this.shipFilter$.value.shipLastPositionTimestampThreshold=t,this.shipFilter$.value.transparencyThreshold=e,this.refreshAndNotifyShipFilter()}updateBaseLayer(t){this.baseLayer$.next(t),this.saveMapConfig()}toggleShipsLayer(){this.showShipsLayer$.next(!this.showShipsLayer$.value),this.saveMapConfig()}toggleAircraftsLayer(){this.showAircraftsLayer$.next(!this.showAircraftsLayer$.value),this.saveMapConfig()}toggleAnnotationsLayer(){this.showAnnotationsLayer$.next(!this.showAnnotationsLayer$.value),this.saveMapConfig()}toggleHexagonsLayer(){this.showHexagonsLayer$.next(!this.showHexagonsLayer$.value),this.saveMapConfig()}toggleMultiSelectionMode(){this.enableMultiSelectionMode$.next(!this.enableMultiSelectionMode$.value),this.saveMapConfig()}toggleOpenSeaMapLayer(){this.showOpenSeaMapLayer$.next(!this.showOpenSeaMapLayer$.value),this.saveMapConfig()}toggleSubcablesLayer(){this.showSubcablesLayer$.next(!this.showSubcablesLayer$.value),this.saveMapConfig()}toggleShipTooltips(){this.showPermanentTooltips$.value?this.showMiniPermanentTooltips$.value?this.showMiniPermanentTooltips$.next(!1):(this.showPermanentTooltips$.next(!1),this.showMiniPermanentTooltips$.next(!0)):this.showPermanentTooltips$.next(!0),this.saveMapConfig()}toggleTrailsLayer(){this.showTrailsLayer$.next(!this.showTrailsLayer$.value),this.saveMapConfig()}toggleMaritimeBoundariesLayer(){this.showMaritimeBoundariesLayer$.next(!this.showMaritimeBoundariesLayer$.value),this.saveMapConfig()}toggle36NqLimitsLayer(){this.show36NqLimitsLayer$.next(!this.show36NqLimitsLayer$.value),this.saveMapConfig()}toggleEEZLayer(){this.showEEZLayer$.next(!this.showEEZLayer$.value),this.saveMapConfig()}toggleSARLayer(){this.showSARLayer$.next(!this.showSARLayer$.value),this.saveMapConfig()}toggleMRCCLayer(){this.showMRCCLayer$.next(!this.showMRCCLayer$.value),this.saveMapConfig()}toggleOtherShips(){this.showOtherShips$.next(!this.showOtherShips$.value),this.saveMapConfig()}togglePortsLayer(){this.showPortsLayer$.next(!this.showPortsLayer$.value),this.saveMapConfig()}toggleFleetShipsOnly(){this.showFleetShipsOnly$.next(!this.showFleetShipsOnly$.value),this.saveMapConfig()}updatePortsOfCallDisplayMode(t){this.portsOfCallDisplayMode$.next(t),this.saveMapConfig()}toggleExpandLloydsPanel(){this.expandLloydsPanel$.next(!this.expandLloydsPanel$.value),this.saveMapConfig()}toggleMovesSearchIncludeIncompletePassages(){this.movesSearchIncludeIncompletePassages$.next(!this.movesSearchIncludeIncompletePassages$.value),this.saveMapConfig()}toggleEnableHistoryModeExtrapolation(){this.enableHistoryModeExtrapolation$.next(!this.enableHistoryModeExtrapolation$.value),this.saveMapConfig()}clear(){this.showShipsLayer$.next(!0),this.showAircraftsLayer$.next(!1),this.showHexagonsLayer$.next(!1),this.enableMultiSelectionMode$.next(!1),this.showPermanentTooltips$.next(!1),this.showMiniPermanentTooltips$.next(!0),this.showTrailsLayer$.next(!0),this.showOtherShips$.next(!0),this.showFleetShipsOnly$.next(!0),this.showMaritimeBoundariesLayer$.next(!1),this.showSARLayer$.next(!1),this.showMRCCLayer$.next(!1),this.showPortsLayer$.next(!1),this.portsOfCallDisplayMode$.next(SD),this.showOpenSeaMapLayer$.next(!1),this.showSubcablesLayer$.next(!1),this.expandLloydsPanel$.next(!1)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(cI))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();class uI{constructor(t){Object.assign(this,t)}}class dI{constructor(t){Object.assign(this,t)}}let pI=(()=>{class t{constructor(t,e){this.configService=t,this.mapConfigService=e,this.view$=new Av.a(null),this.pointerMove$=new _e.a,this.locateEvents$=new _e.a,this.fitEvents$=new _e.a,this.zoomEvents$=new _e.a,this.pingLocation$=new _e.a,this.hasBooted=!1}init(){this.locateEvents$.pipe(Rv()).subscribe(()=>{this.hasBooted=!0})}destroy(){this.hasBooted=!1}centerOn(t,e){if(!RD(t[0])||!RD(t[1]))throw new Error(`centerOn: can't center on malformed location: ${t.toString()}`);this.locateEvents$.next(new dI({center:t,zoom:e}))}centerOnLonLat(t,e){this.centerOn(sE(t),e)}locate(t){this.centerOnLonLat(t,10)}resetToDefaultView(){const t=this.configService.lastView;t?this.centerOn(t.center,t.zoom):this.centerOnLonLat([8.3825684,40.4385859],7)}fitOn(t,e=1e3){this.fitEvents$.next(new uI({polygon:t,duration:e}))}zoomByDelta(t){this.zoomEvents$.next(t)}updateViewState(t){this.view$.next(t)}emitPointerMoveEvent(t){this.pointerMove$.next(t)}locateFit(t){if(this.pingLocation(t),this.mapConfigService.zoomOnLocationEvents$.value)this.locate(t);else{const[e,i]=sE(t),n=this.view$.value;let[r,s,o,a]=n.extent;if(r<e&&e<o&&s<i&&i<a);else{e<r&&(r=e),e>o&&(o=e),i<s&&(s=i),i>a&&(a=i);const l=$S(n.center,n.maxResolution,0,n.viewportSize.map(t=>t-200)),c=l[3]-l[1];o-r<l[2]-l[0]&&a-s<c?this.fitOn([r,s,o,a]):this.centerOnLonLat(t)}}}pingLocation(t){this.pingLocation$.next(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(cI),r.Zb(hI))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function fI(t,e=Ue){var i;const n=(i=t)instanceof Date&&!isNaN(+i)?+t-e.now():Math.abs(t);return t=>t.lift(new mI(n,e))}class mI{constructor(t,e){this.delay=t,this.scheduler=e}call(t,e){return e.subscribe(new gI(t,this.delay,this.scheduler))}}class gI extends Ee.a{constructor(t,e,i){super(t),this.delay=e,this.scheduler=i,this.queue=[],this.active=!1,this.errored=!1}static dispatch(t){const e=t.source,i=e.queue,n=t.scheduler,r=t.destination;for(;i.length>0&&i[0].time-n.now()<=0;)i.shift().notification.observe(r);if(i.length>0){const e=Math.max(0,i[0].time-n.now());this.schedule(t,e)}else this.unsubscribe(),e.active=!1}_schedule(t){this.active=!0,this.destination.add(t.schedule(gI.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))}scheduleNotification(t){if(!0===this.errored)return;const e=this.scheduler,i=new AI(e.now()+this.delay,t);this.queue.push(i),!1===this.active&&this._schedule(e)}_next(t){this.scheduleNotification(Nn.createNext(t))}_error(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()}_complete(){this.scheduleNotification(Nn.createComplete()),this.unsubscribe()}}class AI{constructor(t,e){this.time=t,this.notification=e}}let bI=(()=>{class t{constructor(t){this.mapConfigService=t,this.timestamp$=new Av.a(0),this.timestamp$.pipe(Gg(1),fI(0)).subscribe(t=>{this.mapConfigService.freezeTimestamp(t)})}setTimestampToNow(){this.setTimestamp(this.getCurrentTimestamp())}setTimestamp(t){t=Math.min(t,this.getCurrentTimestamp()),this.timestamp$.next(t)}incrementTimestamp(t){this.setTimestamp(this.timestamp$.value+t)}resetTimestamp(){this.setTimestamp(0)}getCurrentTimestamp(){return Math.ceil(Date.now()/1e3)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(hI))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),vI=(()=>{class t{constructor(t,e,i,n){this.router=t,this.configService=e,this.historyService=i,this.mapService=n,this.previousUrl=void 0,this.currentUrl=void 0,this.route$=new Av.a(""),this.viewURL$=new Av.a(""),this.router.events.subscribe(t=>{t instanceof Uv&&(this.currentUrl&&(this.previousUrl=this.currentUrl),this.currentUrl=t.urlAfterRedirects,this.route$.next(this.currentUrl))}),Hg([this.mapService.view$.pipe(Gg(1)),this.historyService.timestamp$]).pipe(Be(500)).subscribe(([t,e])=>{let i=t.toURL();e&&(i+=`,${new Date(1e3*e).toISOString()}`),this.viewURL$.next(i),this.configService.set("lastView",t.toLocateEvent())})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(sw),r.Zb(cI),r.Zb(bI),r.Zb(pI))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();var _I=i("C3FG");let yI=(()=>{class t{constructor(t,e,i,n,r){this.errorHandler=t,this.mapConfigService=e,this.mapService=i,this.routeService=n,this.workerService=r,this.initialized=!1,this.user$=new Av.a(null),this.user$.subscribe(t=>{!function(t){wC("setUser",t)}(t?{id:t.id,email:t.email}:null)}),this.errorHandler.unauthorizedError$.subscribe(()=>{var t;this.clearAuthentication();let e=this.routeService.currentUrl;("/"===e||e.startsWith("/@"))&&(e=null===(t=this.mapService.view$.value)||void 0===t?void 0:t.toURL()),location.href="/login?expired="+(e?"&redirect="+e:"")})}init(){return Object(ue.a)(this,void 0,void 0,function*(){try{this.user$.next(yield this.workerService.authentication.getUserInfos())}catch(t){if(t.name!==kC.Unauthorized&&t.name!==kC.Maintenance)throw t}this.initialized=!0})}isAuthenticated(){return null!==this.user$.value}isAdmin(){return this.isAuthenticated()&&"admin"===this.user$.value.profile}getUserId(){return this.isAuthenticated()&&this.user$.value.id}login(t){return Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.authentication.login(t),this.mapConfigService.resetShipFilter(),this.user$.next(yield this.workerService.authentication.getUserInfos())})}logout(){return Object(ue.a)(this,void 0,void 0,function*(){try{yield this.workerService.authentication.logout()}finally{this.clearAuthentication()}})}clearAuthentication(){this.user$.next(null)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.n),r.Zb(hI),r.Zb(pI),r.Zb(vI),r.Zb(_I.a))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),wI=(()=>{class t{constructor(t){this.data=t}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(jl))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-confirm-dialog"]],decls:11,vars:4,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["mat-dialog-actions",""],[1,"u-flex"],["mat-button","","color","warn","title","Oui",3,"mat-dialog-close"],["mat-button","","title","Non",3,"mat-dialog-close"]],template:function(t,e){1&t&&(r.Vb(0,"h1",0),r.Kc(1),r.Ub(),r.Vb(2,"div",1),r.Vb(3,"p"),r.Kc(4),r.Ub(),r.Ub(),r.Vb(5,"div",2),r.Qb(6,"div",3),r.Vb(7,"button",4),r.Kc(8,"Oui"),r.Ub(),r.Vb(9,"button",5),r.Kc(10,"Non"),r.Ub(),r.Ub()),2&t&&(r.Db(1),r.Lc(e.data.title),r.Db(3),r.Lc(e.data.message),r.Db(3),r.nc("mat-dialog-close",!0),r.Db(2),r.nc("mat-dialog-close",!1))},directives:[ql,Yl,Ql,Dl,Zl],encapsulation:2,changeDetection:0}),t})();function xI(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",1),r.Vb(1,"button",2),r.cc("click",function(){return r.Ac(t),r.gc().action()}),r.Kc(2),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.Db(2),r.Lc(t.data.action)}}function CI(t,e){}const SI=new r.s("MatSnackBarData");class kI{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}const EI=Math.pow(2,31)-1;class DI{constructor(t,e){this._overlayRef=e,this._afterDismissed=new _e.a,this._afterOpened=new _e.a,this._onAction=new _e.a,this._dismissedByAction=!1,this.containerInstance=t,this.onAction().subscribe(()=>this.dismiss()),t._onExit.subscribe(()=>this._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete())}closeWithAction(){this.dismissWithAction()}_dismissAfter(t){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(t,EI))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}}let II=(()=>{class t{constructor(t,e){this.snackBarRef=t,this.data=e}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(DI),r.Pb(SI))},t.\u0275cmp=r.Jb({type:t,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-simple-snackbar"],decls:3,vars:2,consts:[["class","mat-simple-snackbar-action",4,"ngIf"],[1,"mat-simple-snackbar-action"],["mat-button","",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"span"),r.Kc(1),r.Ub(),r.Ic(2,xI,3,1,"div",0)),2&t&&(r.Db(1),r.Lc(e.data.message),r.Db(1),r.nc("ngIf",e.hasAction))},directives:[ut,Dl],styles:[".mat-simple-snackbar{display:flex;justify-content:space-between;align-items:center;line-height:20px;opacity:1}.mat-simple-snackbar-action{flex-shrink:0;margin:-8px -8px -8px 8px}.mat-simple-snackbar-action button{max-height:36px;min-width:0}[dir=rtl] .mat-simple-snackbar-action{margin-left:-8px;margin-right:8px}\n"],encapsulation:2,changeDetection:0}),t})();const PI={snackBarState:$r("state",[qr("void, hidden",Zr({transform:"scale(0.8)",opacity:0})),qr("visible",Zr({transform:"scale(1)",opacity:1})),Qr("* => visible",Gr("150ms cubic-bezier(0, 0, 0.2, 1)")),Qr("* => void, * => hidden",Gr("75ms cubic-bezier(0.4, 0.0, 1, 1)",Zr({opacity:0})))])};let OI=(()=>{class t extends ge{constructor(t,e,i,n,r){super(),this._ngZone=t,this._elementRef=e,this._changeDetectorRef=i,this._platform=n,this.snackBarConfig=r,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new _e.a,this._onExit=new _e.a,this._onEnter=new _e.a,this._animationState="void",this.attachDomPortal=t=>(this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachDomPortal(t)),this._live="assertive"!==r.politeness||r.announcementMessage?"off"===r.politeness?"off":"polite":"assertive",this._platform.FIREFOX&&("polite"===this._live&&(this._role="status"),"assertive"===this._live&&(this._role="alert"))}attachComponentPortal(t){return this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachComponentPortal(t)}attachTemplatePortal(t){return this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachTemplatePortal(t)}onAnimationEnd(t){const{fromState:e,toState:i}=t;if(("void"===i&&"void"!==e||"hidden"===i)&&this._completeExit(),"visible"===i){const t=this._onEnter;this._ngZone.run(()=>{t.next(),t.complete()})}}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce())}exit(){return this._animationState="hidden",this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId),this._onExit}ngOnDestroy(){this._destroyed=!0,this._completeExit()}_completeExit(){this._ngZone.onMicrotaskEmpty.pipe(Qe(1)).subscribe(()=>{this._onExit.next(),this._onExit.complete()})}_applySnackBarClasses(){const t=this._elementRef.nativeElement,e=this.snackBarConfig.panelClass;e&&(Array.isArray(e)?e.forEach(e=>t.classList.add(e)):t.classList.add(e)),"center"===this.snackBarConfig.horizontalPosition&&t.classList.add("mat-snack-bar-center"),"top"===this.snackBarConfig.verticalPosition&&t.classList.add("mat-snack-bar-top")}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{const t=this._elementRef.nativeElement.querySelector("[aria-hidden]"),e=this._elementRef.nativeElement.querySelector("[aria-live]");if(t&&e){let i=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&t.contains(document.activeElement)&&(i=document.activeElement),t.removeAttribute("aria-hidden"),e.appendChild(t),null==i||i.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.B),r.Pb(r.l),r.Pb(r.h),r.Pb(ci),r.Pb(kI))},t.\u0275cmp=r.Jb({type:t,selectors:[["snack-bar-container"]],viewQuery:function(t,e){if(1&t&&r.Pc(be,3),2&t){let t;r.vc(t=r.dc())&&(e._portalOutlet=t.first)}},hostAttrs:[1,"mat-snack-bar-container"],hostVars:1,hostBindings:function(t,e){1&t&&r.Gc("@state.done",function(t){return e.onAnimationEnd(t)}),2&t&&r.Hc("@state",e._animationState)},features:[r.Ab],decls:3,vars:2,consts:[["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Ic(1,CI,0,0,"ng-template",1),r.Ub(),r.Qb(2,"div")),2&t&&(r.Db(2),r.Eb("aria-live",e._live)("role",e._role))},directives:[be],styles:[".mat-snack-bar-container{border-radius:4px;box-sizing:border-box;display:block;margin:24px;max-width:33vw;min-width:344px;padding:14px 16px;min-height:48px;transform-origin:center}.cdk-high-contrast-active .mat-snack-bar-container{border:solid 1px}.mat-snack-bar-handset{width:100%}.mat-snack-bar-handset .mat-snack-bar-container{margin:8px;max-width:100%;min-width:0;width:100%}\n"],encapsulation:2,data:{animation:[PI.snackBarState]}}),t})(),MI=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[zr,ve,Et,Pl,Sa],Sa]}),t})();const TI=new r.s("mat-snack-bar-default-options",{providedIn:"root",factory:function(){return new kI}});let RI=(()=>{class t{constructor(t,e,i,n,r,s){this._overlay=t,this._live=e,this._injector=i,this._breakpointObserver=n,this._parentSnackBar=r,this._defaultConfig=s,this._snackBarRefAtThisLevel=null,this.simpleSnackBarComponent=II,this.snackBarContainerComponent=OI,this.handsetCssClass="mat-snack-bar-handset"}get _openedSnackBarRef(){const t=this._parentSnackBar;return t?t._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(t){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=t:this._snackBarRefAtThisLevel=t}openFromComponent(t,e){return this._attach(t,e)}openFromTemplate(t,e){return this._attach(t,e)}open(t,e="",i){const n=Object.assign(Object.assign({},this._defaultConfig),i);return n.data={message:t,action:e},n.announcementMessage===t&&(n.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,n)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(t,e){const i=r.t.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:kI,useValue:e}]}),n=new pe(this.snackBarContainerComponent,e.viewContainerRef,i),s=t.attach(n);return s.instance.snackBarConfig=e,s.instance}_attach(t,e){const i=Object.assign(Object.assign(Object.assign({},new kI),this._defaultConfig),e),n=this._createOverlay(i),s=this._attachSnackBarContainer(n,i),o=new DI(s,n);if(t instanceof r.O){const e=new fe(t,null,{$implicit:i.data,snackBarRef:o});o.instance=s.attachTemplatePortal(e)}else{const e=this._createInjector(i,o),n=new pe(t,void 0,e),r=s.attachComponentPortal(n);o.instance=r.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(Sn(n.detachments())).subscribe(t=>{const e=n.overlayElement.classList;t.matches?e.add(this.handsetCssClass):e.remove(this.handsetCssClass)}),i.announcementMessage&&s._onAnnounce.subscribe(()=>{this._live.announce(i.announcementMessage,i.politeness)}),this._animateSnackBar(o,i),this._openedSnackBarRef=o,this._openedSnackBarRef}_animateSnackBar(t,e){t.afterDismissed().subscribe(()=>{this._openedSnackBarRef==t&&(this._openedSnackBarRef=null),e.announcementMessage&&this._live.clear()}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{t.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):t.containerInstance.enter(),e.duration&&e.duration>0&&t.afterOpened().subscribe(()=>t._dismissAfter(e.duration))}_createOverlay(t){const e=new br;e.direction=t.direction;let i=this._overlay.position().global();const n="rtl"===t.direction,r="left"===t.horizontalPosition||"start"===t.horizontalPosition&&!n||"end"===t.horizontalPosition&&n,s=!r&&"center"!==t.horizontalPosition;return r?i.left("0"):s?i.right("0"):i.centerHorizontally(),"top"===t.verticalPosition?i.top("0"):i.bottom("0"),e.positionStrategy=i,this._overlay.create(e)}_createInjector(t,e){return r.t.create({parent:t&&t.viewContainerRef&&t.viewContainerRef.injector||this._injector,providers:[{provide:DI,useValue:e},{provide:SI,useValue:t.data}]})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(Fr),r.Zb(Hi),r.Zb(r.t),r.Zb(Jg),r.Zb(t,12),r.Zb(TI))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(Fr),Object(r.Zb)(Hi),Object(r.Zb)(r.p),Object(r.Zb)(Jg),Object(r.Zb)(t,12),Object(r.Zb)(TI))},token:t,providedIn:MI}),t})(),VI=(()=>{class t{constructor(t,e,i){this.ngZone=t,this.dialog=e,this.snackBar=i,this.drawingMode$=new Av.a(!1),this.errors$=new _e.a,this.errors$.pipe(wm(1e3,Le,{leading:!0,trailing:!0})).subscribe(t=>{this.ngZone.run(()=>{this.snackBar.open(t,"Fermer",{panelClass:"error-snack-bar",duration:4e3})})})}success(t){this.snackBar.open(t,"Fermer")}error(t){this.errors$.next(t)}confirm(t){this.dialog.open(wI,{data:{title:t.title,message:t.message}}).afterClosed().subscribe(t.action)}confirmAsync(t){return Object(ue.a)(this,void 0,void 0,function*(){return new Promise(e=>{this.dialog.open(wI,{data:{title:t.title,message:t.message}}).afterClosed().subscribe(t=>{e(t)})})})}setDrawingMode(t){this.drawingMode$.next(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.B),r.Zb(Gl),r.Zb(RI))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),FI=(()=>{class t{constructor(t,e,i){this.authenticationService=t,this.router=e,this.uiService=i}canActivateChild(t,e){return Object(ue.a)(this,void 0,void 0,function*(){return!!this.authenticationService.isAdmin()||(this.uiService.error("Vous n'avez pas les permissions requises."),yield this.router.navigateByUrl("/"),!1)})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(yI),r.Zb(sw),r.Zb(VI))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const LI=[{label:"15 minutes",value:900},{label:"30 minutes",value:1800},{label:"1 heure",value:3600},{label:"2 heures",value:7200},{label:"6 heures",value:21600},{label:"12 heures",value:43200},{label:"24 heures",value:86400},{label:"2 jours",value:172800},{label:"1 semaine",value:604800},{label:"2 semaines",value:1209600},{label:"1 mois",value:2592e3},{label:"3 mois",value:7776e3}],UI=LI.reduce((t,e)=>(t[e.value]=e.label,t),{});var BI=function(t){return t.RealTime="realTime",t.PastAndRealTime="pastAndRealTime",t.Past="past",t}({});function NI(t){t.speed||(t.speed={enable:!1,min:0,max:100}),t.erraticRoute||(t.erraticRoute={enable:!1}),t.transhipment||(t.transhipment={enable:!1}),t.aisInterruption||(t.aisInterruption={enable:!1}),t.passageInZone||(t.passageInZone={enable:!1,sequential:!1,timeWindow:LI.find(t=>"1 mois"===t.label).value,passages:[]}),t.spoofing||(t.spoofing={enable:!1}),t.identifier||(t.identifier={enable:!1,identifiers:[]}),t.fleet||(t.fleet={enable:!1,fleets:[]}),t.flag||(t.flag={enable:!1,flags:[]}),t.type||(t.type={enable:!1,types:[]}),t.time||(t.time={type:BI.RealTime,since:null,to:null}),t.zone||(t.zone={enable:!0,zones:[]})}const jI=[{name:"Afghanistan",iso2:"af",iso3:"afg"},{name:"Afrique du Sud",iso2:"za",iso3:"zaf"},{name:"\xceles \xc5land",iso2:"ax",iso3:"ala"},{name:"Albanie",iso2:"al",iso3:"alb"},{name:"Alg\xe9rie",iso2:"dz",iso3:"dza"},{name:"Allemagne",iso2:"de",iso3:"deu"},{name:"Andorre",iso2:"ad",iso3:"and"},{name:"Angola",iso2:"ao",iso3:"ago"},{name:"Anguilla",iso2:"ai",iso3:"aia"},{name:"Antarctique",iso2:"aq",iso3:"ata"},{name:"Antigua-et-Barbuda",iso2:"ag",iso3:"atg"},{name:"Arabie saoudite",iso2:"sa",iso3:"sau"},{name:"Argentine",iso2:"ar",iso3:"arg"},{name:"Arm\xe9nie",iso2:"am",iso3:"arm"},{name:"Aruba",iso2:"aw",iso3:"abw"},{name:"Australie",iso2:"au",iso3:"aus"},{name:"Autriche",iso2:"at",iso3:"aut"},{name:"Azerba\xefdjan",iso2:"az",iso3:"aze"},{name:"Bahamas",iso2:"bs",iso3:"bhs"},{name:"Bahre\xefn",iso2:"bh",iso3:"bhr"},{name:"Bangladesh",iso2:"bd",iso3:"bgd"},{name:"Barbade",iso2:"bb",iso3:"brb"},{name:"Bi\xe9lorussie",iso2:"by",iso3:"blr"},{name:"Belgique",iso2:"be",iso3:"bel"},{name:"Belize",iso2:"bz",iso3:"blz"},{name:"B\xe9nin",iso2:"bj",iso3:"ben"},{name:"Bermudes",iso2:"bm",iso3:"bmu"},{name:"Bhoutan",iso2:"bt",iso3:"btn"},{name:"Bolivie",iso2:"bo",iso3:"bol"},{name:"Pays-Bas carib\xe9ens",iso2:"bq",iso3:"bes"},{name:"Bosnie-Herz\xe9govine",iso2:"ba",iso3:"bih"},{name:"Botswana",iso2:"bw",iso3:"bwa"},{name:"\xcele Bouvet",iso2:"bv",iso3:"bvt"},{name:"Br\xe9sil",iso2:"br",iso3:"bra"},{name:"Brunei",iso2:"bn",iso3:"brn"},{name:"Bulgarie",iso2:"bg",iso3:"bgr"},{name:"Burkina Faso",iso2:"bf",iso3:"bfa"},{name:"Burundi",iso2:"bi",iso3:"bdi"},{name:"\xceles Ca\xefmans",iso2:"ky",iso3:"cym"},{name:"Cambodge",iso2:"kh",iso3:"khm"},{name:"Cameroun",iso2:"cm",iso3:"cmr"},{name:"Canada",iso2:"ca",iso3:"can"},{name:"Cap-Vert",iso2:"cv",iso3:"cpv"},{name:"R\xe9publique centrafricaine",iso2:"cf",iso3:"caf"},{name:"Chili",iso2:"cl",iso3:"chl"},{name:"Chine",iso2:"cn",iso3:"chn"},{name:"\xcele Christmas",iso2:"cx",iso3:"cxr"},{name:"Chypre (pays)",iso2:"cy",iso3:"cyp"},{name:"\xceles Cocos",iso2:"cc",iso3:"cck"},{name:"Colombie",iso2:"co",iso3:"col"},{name:"Comores (pays)",iso2:"km",iso3:"com"},{name:"R\xe9publique du Congo",iso2:"cg",iso3:"cog"},{name:"R\xe9publique d\xe9mocratique du Congo",iso2:"cd",iso3:"cod"},{name:"\xceles Cook",iso2:"ck",iso3:"cok"},{name:"Cor\xe9e du Sud",iso2:"kr",iso3:"kor"},{name:"Cor\xe9e du Nord",iso2:"kp",iso3:"prk"},{name:"Costa Rica",iso2:"cr",iso3:"cri"},{name:"C\xf4te d'Ivoire",iso2:"ci",iso3:"civ"},{name:"Croatie",iso2:"hr",iso3:"hrv"},{name:"Cuba",iso2:"cu",iso3:"cub"},{name:"Cura\xe7ao",iso2:"cw",iso3:"cuw"},{name:"Danemark",iso2:"dk",iso3:"dnk"},{name:"Djibouti",iso2:"dj",iso3:"dji"},{name:"R\xe9publique dominicaine",iso2:"do",iso3:"dom"},{name:"Dominique",iso2:"dm",iso3:"dma"},{name:"\xc9gypte",iso2:"eg",iso3:"egy"},{name:"Salvador",iso2:"sv",iso3:"slv"},{name:"\xc9mirats arabes unis",iso2:"ae",iso3:"are"},{name:"\xc9quateur (pays)",iso2:"ec",iso3:"ecu"},{name:"\xc9rythr\xe9e",iso2:"er",iso3:"eri"},{name:"Espagne",iso2:"es",iso3:"esp"},{name:"Estonie",iso2:"ee",iso3:"est"},{name:"\xc9tats-Unis",iso2:"us",iso3:"usa"},{name:"\xc9thiopie",iso2:"et",iso3:"eth"},{name:"Malouines",iso2:"fk",iso3:"flk"},{name:"\xceles F\xe9ro\xe9",iso2:"fo",iso3:"fro"},{name:"Fidji",iso2:"fj",iso3:"fji"},{name:"Finlande",iso2:"fi",iso3:"fin"},{name:"France",iso2:"fr",iso3:"fra"},{name:"Gabon",iso2:"ga",iso3:"gab"},{name:"Gambie",iso2:"gm",iso3:"gmb"},{name:"G\xe9orgie (pays)",iso2:"ge",iso3:"geo"},{name:"G\xe9orgie du Sud-et-les \xeeles Sandwich du Sud",iso2:"gs",iso3:"sgs"},{name:"Ghana",iso2:"gh",iso3:"gha"},{name:"Gibraltar",iso2:"gi",iso3:"gib"},{name:"Gr\xe8ce",iso2:"gr",iso3:"grc"},{name:"Grenade (pays)",iso2:"gd",iso3:"grd"},{name:"Groenland",iso2:"gl",iso3:"grl"},{name:"Guadeloupe",iso2:"gp",iso3:"glp"},{name:"Guam",iso2:"gu",iso3:"gum"},{name:"Guatemala",iso2:"gt",iso3:"gtm"},{name:"Guernesey",iso2:"gg",iso3:"ggy"},{name:"Guin\xe9e",iso2:"gn",iso3:"gin"},{name:"Guin\xe9e-Bissau",iso2:"gw",iso3:"gnb"},{name:"Guin\xe9e \xe9quatoriale",iso2:"gq",iso3:"gnq"},{name:"Guyana",iso2:"gy",iso3:"guy"},{name:"Guyane",iso2:"gf",iso3:"guf"},{name:"Ha\xefti",iso2:"ht",iso3:"hti"},{name:"\xceles Heard-et-MacDonald",iso2:"hm",iso3:"hmd"},{name:"Honduras",iso2:"hn",iso3:"hnd"},{name:"Hong Kong",iso2:"hk",iso3:"hkg"},{name:"Hongrie",iso2:"hu",iso3:"hun"},{name:"\xcele de Man",iso2:"im",iso3:"imn"},{name:"\xceles mineures \xe9loign\xe9es des \xc9tats-Unis",iso2:"um",iso3:"umi"},{name:"\xceles Vierges britanniques",iso2:"vg",iso3:"vgb"},{name:"\xceles Vierges des \xc9tats-Unis",iso2:"vi",iso3:"vir"},{name:"Inde",iso2:"in",iso3:"ind"},{name:"Indon\xe9sie",iso2:"id",iso3:"idn"},{name:"Iran",iso2:"ir",iso3:"irn"},{name:"Irak",iso2:"iq",iso3:"irq"},{name:"Irlande (pays)",iso2:"ie",iso3:"irl"},{name:"Islande",iso2:"is",iso3:"isl"},{name:"Isra\xebl",iso2:"il",iso3:"isr"},{name:"Italie",iso2:"it",iso3:"ita"},{name:"Jama\xefque",iso2:"jm",iso3:"jam"},{name:"Japon",iso2:"jp",iso3:"jpn"},{name:"Jersey",iso2:"je",iso3:"jey"},{name:"Jordanie",iso2:"jo",iso3:"jor"},{name:"Kazakhstan",iso2:"kz",iso3:"kaz"},{name:"Kenya",iso2:"ke",iso3:"ken"},{name:"Kirghizistan",iso2:"kg",iso3:"kgz"},{name:"Kiribati",iso2:"ki",iso3:"kir"},{name:"Kowe\xeft",iso2:"kw",iso3:"kwt"},{name:"Laos",iso2:"la",iso3:"lao"},{name:"Lesotho",iso2:"ls",iso3:"lso"},{name:"Lettonie",iso2:"lv",iso3:"lva"},{name:"Liban",iso2:"lb",iso3:"lbn"},{name:"Liberia",iso2:"lr",iso3:"lbr"},{name:"Libye",iso2:"ly",iso3:"lby"},{name:"Liechtenstein",iso2:"li",iso3:"lie"},{name:"Lituanie",iso2:"lt",iso3:"ltu"},{name:"Luxembourg (pays)",iso2:"lu",iso3:"lux"},{name:"Macao",iso2:"mo",iso3:"mac"},{name:"Mac\xe9doine du Nord",iso2:"mk",iso3:"mkd"},{name:"Madagascar",iso2:"mg",iso3:"mdg"},{name:"Malaisie",iso2:"my",iso3:"mys"},{name:"Malawi",iso2:"mw",iso3:"mwi"},{name:"Maldives",iso2:"mv",iso3:"mdv"},{name:"Mali",iso2:"ml",iso3:"mli"},{name:"Malte",iso2:"mt",iso3:"mlt"},{name:"\xceles Mariannes du Nord",iso2:"mp",iso3:"mnp"},{name:"Maroc",iso2:"ma",iso3:"mar"},{name:"\xceles Marshall (pays)",iso2:"mh",iso3:"mhl"},{name:"Martinique",iso2:"mq",iso3:"mtq"},{name:"Maurice (pays)",iso2:"mu",iso3:"mus"},{name:"Mauritanie",iso2:"mr",iso3:"mrt"},{name:"Mayotte",iso2:"yt",iso3:"myt"},{name:"Mexique",iso2:"mx",iso3:"mex"},{name:"\xc9tats f\xe9d\xe9r\xe9s de Micron\xe9sie (pays)",iso2:"fm",iso3:"fsm"},{name:"Moldavie",iso2:"md",iso3:"mda"},{name:"Monaco",iso2:"mc",iso3:"mco"},{name:"Mongolie",iso2:"mn",iso3:"mng"},{name:"Mont\xe9n\xe9gro",iso2:"me",iso3:"mne"},{name:"Montserrat",iso2:"ms",iso3:"msr"},{name:"Mozambique",iso2:"mz",iso3:"moz"},{name:"Birmanie",iso2:"mm",iso3:"mmr"},{name:"Namibie",iso2:"na",iso3:"nam"},{name:"Nauru",iso2:"nr",iso3:"nru"},{name:"N\xe9pal",iso2:"np",iso3:"npl"},{name:"Nicaragua",iso2:"ni",iso3:"nic"},{name:"Niger",iso2:"ne",iso3:"ner"},{name:"Nigeria",iso2:"ng",iso3:"nga"},{name:"Niue",iso2:"nu",iso3:"niu"},{name:"\xcele Norfolk",iso2:"nf",iso3:"nfk"},{name:"Norv\xe8ge",iso2:"no",iso3:"nor"},{name:"Nouvelle-Cal\xe9donie",iso2:"nc",iso3:"ncl"},{name:"Nouvelle-Z\xe9lande",iso2:"nz",iso3:"nzl"},{name:"Territoire britannique de l'oc\xe9an Indien",iso2:"io",iso3:"iot"},{name:"Oman",iso2:"om",iso3:"omn"},{name:"Ouganda",iso2:"ug",iso3:"uga"},{name:"Ouzb\xe9kistan",iso2:"uz",iso3:"uzb"},{name:"Pakistan",iso2:"pk",iso3:"pak"},{name:"Palaos",iso2:"pw",iso3:"plw"},{name:"Palestine",iso2:"ps",iso3:"pse"},{name:"Panama",iso2:"pa",iso3:"pan"},{name:"Papouasie-Nouvelle-Guin\xe9e",iso2:"pg",iso3:"png"},{name:"Paraguay",iso2:"py",iso3:"pry"},{name:"Pays-Bas",iso2:"nl",iso3:"nld"},{name:"P\xe9rou",iso2:"pe",iso3:"per"},{name:"Philippines",iso2:"ph",iso3:"phl"},{name:"\xceles Pitcairn",iso2:"pn",iso3:"pcn"},{name:"Pologne",iso2:"pl",iso3:"pol"},{name:"Polyn\xe9sie fran\xe7aise",iso2:"pf",iso3:"pyf"},{name:"Porto Rico",iso2:"pr",iso3:"pri"},{name:"Portugal",iso2:"pt",iso3:"prt"},{name:"Qatar",iso2:"qa",iso3:"qat"},{name:"La R\xe9union",iso2:"re",iso3:"reu"},{name:"Roumanie",iso2:"ro",iso3:"rou"},{name:"Royaume-Uni",iso2:"gb",iso3:"gbr"},{name:"Russie",iso2:"ru",iso3:"rus"},{name:"Rwanda",iso2:"rw",iso3:"rwa"},{name:"R\xe9publique arabe sahraouie d\xe9mocratique",iso2:"eh",iso3:"esh"},{name:"Saint-Barth\xe9lemy",iso2:"bl",iso3:"blm"},{name:"Saint-Christophe-et-Ni\xe9v\xe8s",iso2:"kn",iso3:"kna"},{name:"Saint-Marin",iso2:"sm",iso3:"smr"},{name:"Saint-Martin",iso2:"mf",iso3:"maf"},{name:"Saint-Martin",iso2:"sx",iso3:"sxm"},{name:"Saint-Pierre-et-Miquelon",iso2:"pm",iso3:"spm"},{name:"Saint-Si\xe8ge (\xc9tat de la Cit\xe9 du Vatican)",iso2:"va",iso3:"vat"},{name:"Saint-Vincent-et-les-Grenadines",iso2:"vc",iso3:"vct"},{name:"Sainte-H\xe9l\xe8ne, Ascension et Tristan da Cunha",iso2:"sh",iso3:"shn"},{name:"Sainte-Lucie",iso2:"lc",iso3:"lca"},{name:"Salomon",iso2:"sb",iso3:"slb"},{name:"Samoa",iso2:"ws",iso3:"wsm"},{name:"Samoa am\xe9ricaines",iso2:"as",iso3:"asm"},{name:"Sao Tom\xe9-et-Principe",iso2:"st",iso3:"stp"},{name:"S\xe9n\xe9gal",iso2:"sn",iso3:"sen"},{name:"Serbie",iso2:"rs",iso3:"srb"},{name:"Seychelles",iso2:"sc",iso3:"syc"},{name:"Sierra Leone",iso2:"sl",iso3:"sle"},{name:"Singapour",iso2:"sg",iso3:"sgp"},{name:"Slovaquie",iso2:"sk",iso3:"svk"},{name:"Slov\xe9nie",iso2:"si",iso3:"svn"},{name:"Somalie",iso2:"so",iso3:"som"},{name:"Soudan",iso2:"sd",iso3:"sdn"},{name:"Soudan du Sud",iso2:"ss",iso3:"ssd"},{name:"Sri Lanka",iso2:"lk",iso3:"lka"},{name:"Su\xe8de",iso2:"se",iso3:"swe"},{name:"Suisse",iso2:"ch",iso3:"che"},{name:"Suriname",iso2:"sr",iso3:"sur"},{name:"Svalbard et ile Jan Mayen",iso2:"sj",iso3:"sjm"},{name:"Eswatini",iso2:"sz",iso3:"swz"},{name:"Syrie",iso2:"sy",iso3:"syr"},{name:"Tadjikistan",iso2:"tj",iso3:"tjk"},{name:"Ta\xefwan / (R\xe9publique de Chine (Ta\xefwan))",iso2:"tw",iso3:"twn"},{name:"Tanzanie",iso2:"tz",iso3:"tza"},{name:"Tchad",iso2:"td",iso3:"tcd"},{name:"Tch\xe9quie",iso2:"cz",iso3:"cze"},{name:"Terres australes et antarctiques fran\xe7aises",iso2:"tf",iso3:"atf"},{name:"Tha\xeflande",iso2:"th",iso3:"tha"},{name:"Timor oriental",iso2:"tl",iso3:"tls"},{name:"Togo",iso2:"tg",iso3:"tgo"},{name:"Tokelau",iso2:"tk",iso3:"tkl"},{name:"Tonga",iso2:"to",iso3:"ton"},{name:"Trinit\xe9-et-Tobago",iso2:"tt",iso3:"tto"},{name:"Tunisie",iso2:"tn",iso3:"tun"},{name:"Turkm\xe9nistan",iso2:"tm",iso3:"tkm"},{name:"\xceles Turques-et-Ca\xefques",iso2:"tc",iso3:"tca"},{name:"Turquie",iso2:"tr",iso3:"tur"},{name:"Tuvalu",iso2:"tv",iso3:"tuv"},{name:"Ukraine",iso2:"ua",iso3:"ukr"},{name:"Uruguay",iso2:"uy",iso3:"ury"},{name:"Vanuatu",iso2:"vu",iso3:"vut"},{name:"Venezuela",iso2:"ve",iso3:"ven"},{name:"Vi\xeat Nam",iso2:"vn",iso3:"vnm"},{name:"Wallis-et-Futuna",iso2:"wf",iso3:"wlf"},{name:"Y\xe9men",iso2:"ye",iso3:"yem"},{name:"Zambie",iso2:"zm",iso3:"zmb"},{name:"Zimbabwe",iso2:"zw",iso3:"zwe"}].map(t=>(t.flag=t.iso2,t.searchValue=TD(t.name),t)).sort((t,e)=>Intl.Collator().compare(t.name,e.name)),zI=Object.values(jI).reduce((t,e)=>(t[e.flag]=e.name,t),{});function HI(t,e){var i;const n=t;return t.criteria.zone&&(n.criteria.zone.zones=t.criteria.zone.zones.map(t=>e[t])),t.criteria.passageInZone&&(n.criteria.passageInZone.passages=t.criteria.passageInZone.passages.map(t=>({zone:e[t.zone]}))),n.criteria.zone?n.criteria.zone.enable=!0:n.criteria.zone={enable:!0,zones:[]},n.validZone=(null===(i=n.criteria.zone)||void 0===i?void 0:i.zones.length)>0,NI(n.criteria),n}function KI(t){const e=OD(t);return t.criteria.zone&&(e.criteria.zone.zones=t.criteria.zone.zones.map(t=>t.id)),t.criteria.passageInZone&&(e.criteria.passageInZone.passages=t.criteria.passageInZone.passages.map(t=>({zone:t.zone.id}))),e}var $I=function(t){var e,i=void 0!==(t=t||{})?t:{},n={};for(e in i)i.hasOwnProperty(e)&&(n[e]=i[e]);var r,s=[],o="";document.currentScript&&(o=document.currentScript.src),o=0!==o.indexOf("blob:")?o.substr(0,o.lastIndexOf("/")+1):"",r=function(t,e,i){var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=function(){if(200==n.status||0==n.status&&n.response)e(n.response);else{var r=Z(t);r?e(r.buffer):i()}},n.onerror=i,n.send(null)};var a=i.print||console.log.bind(console),l=i.printErr||console.warn.bind(console);for(e in n)n.hasOwnProperty(e)&&(i[e]=n[e]);n=null,i.arguments&&(s=i.arguments);var c=0,h=function(){return c},u=!1;function d(t){var e=i["_"+t];return e||at("Assertion failed: Cannot call unknown function "+t+", make sure it is exported"),e}function p(t,e,i,n,r){var s={string:function(t){var e=0;if(null!=t&&0!==t){var i=1+(t.length<<2);!function(t,e,i){!function(t,e,i,n){if(!(n>0))return 0;for(var r=i+n-1,s=0;s<t.length;++s){var o=t.charCodeAt(s);if(o>=55296&&o<=57343&&(o=65536+((1023&o)<<10)|1023&t.charCodeAt(++s)),o<=127){if(i>=r)break;e[i++]=o}else if(o<=2047){if(i+1>=r)break;e[i++]=192|o>>6,e[i++]=128|63&o}else if(o<=65535){if(i+2>=r)break;e[i++]=224|o>>12,e[i++]=128|o>>6&63,e[i++]=128|63&o}else{if(i+3>=r)break;e[i++]=240|o>>18,e[i++]=128|o>>12&63,e[i++]=128|o>>6&63,e[i++]=128|63&o}}e[i]=0}(t,g,e,i)}(t,e=J(i),i)}return e},array:function(t){var e=J(t.length);return function(t,e){m.set(t,e)}(t,e),e}},o=d(t),a=[],l=0;if(n)for(var c=0;c<n.length;c++){var h=s[i[c]];h?(0===l&&(l=et()),a[c]=h(n[c])):a[c]=n[c]}var u=o.apply(null,a);return u=function(t){return"string"===e?w(t):"boolean"===e?Boolean(t):t}(u),0!==l&&tt(l),u}var f,m,g,A,b,v,_,y="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function w(t,e){return t?function(t,e,i){for(var n=e+i,r=e;t[r]&&!(r>=n);)++r;if(r-e>16&&t.subarray&&y)return y.decode(t.subarray(e,r));for(var s="";e<r;){var o=t[e++];if(128&o){var a=63&t[e++];if(192!=(224&o)){var l=63&t[e++];if((o=224==(240&o)?(15&o)<<12|a<<6|l:(7&o)<<18|a<<12|l<<6|63&t[e++])<65536)s+=String.fromCharCode(o);else{var c=o-65536;s+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else s+=String.fromCharCode((31&o)<<6|a)}else s+=String.fromCharCode(o)}return s}(g,t,e):""}function x(t,e){return t%e>0&&(t+=e-t%e),t}function C(t){f=t,i.HEAP8=m=new Int8Array(t),i.HEAP16=A=new Int16Array(t),i.HEAP32=b=new Int32Array(t),i.HEAPU8=g=new Uint8Array(t),i.HEAPU16=new Uint16Array(t),i.HEAPU32=new Uint32Array(t),i.HEAPF32=v=new Float32Array(t),i.HEAPF64=_=new Float64Array(t)}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");var S=i.TOTAL_MEMORY||33554432;function k(t){for(;t.length>0;){var e=t.shift();if("function"!=typeof e){var n=e.func;"number"==typeof n?void 0===e.arg?i.dynCall_v(n):i.dynCall_vi(n,e.arg):n(void 0===e.arg?null:e.arg)}else e()}}S=(f=i.buffer?i.buffer:new ArrayBuffer(S)).byteLength,C(f),b[6004]=5266928;var E=[],D=[],I=[],P=[],O=Math.abs,M=Math.ceil,T=Math.floor,R=Math.min,V=0,F=null,L=null;i.preloadedImages={},i.preloadedAudios={};var U,B,N=null,j="data:application/octet-stream;base64,";function z(t){return String.prototype.startsWith?t.startsWith(j):0===t.indexOf(j)}function H(t){return t.replace(/\b__Z[\w\d_]+/g,function(t){return t==t?t:t+" ["+t+"]"})}function K(){var t=new Error;if(!t.stack){try{throw new Error(0)}catch($nt){t=$nt}if(!t.stack)return"(no stack trace available)"}return t.stack.toString()}function $(){return m.length}function G(t){try{var e=new ArrayBuffer(t);if(e.byteLength!=t)return;return new Int8Array(e).set(m),X(e),C(e),1}catch($nt){}}N="data:application/octet-stream;base64,AAAAAAAAAAACAAAAAwAAAAEAAAAFAAAABAAAAAYAAAAAAAAAAAAAAAAAAAABAAAAAgAAAAMAAAAEAAAABQAAAAYAAAABAAAABAAAAAMAAAAGAAAABQAAAAIAAAAAAAAAAgAAAAMAAAABAAAABAAAAAYAAAAAAAAABQAAAAMAAAAGAAAABAAAAAUAAAAAAAAAAQAAAAIAAAAEAAAABQAAAAYAAAAAAAAAAgAAAAMAAAABAAAABQAAAAIAAAAAAAAAAQAAAAMAAAAGAAAABAAAAAYAAAAAAAAABQAAAAIAAAABAAAABAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAgAAAAMAAAAAAAAAAAAAAAIAAAAAAAAAAQAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAABgAAAAAAAAAFAAAAAAAAAAAAAAAEAAAABQAAAAAAAAAAAAAAAAAAAAIAAAAAAAAABgAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAAAAAACAAAAAwAAAAQAAAAFAAAABgAAAAAAAAABAAAAAwAAAAQAAAAFAAAABgAAAAAAAAABAAAAAgAAAAQAAAAFAAAABgAAAAAAAAABAAAAAgAAAAMAAAAFAAAABgAAAAAAAAABAAAAAgAAAAMAAAAEAAAABgAAAAAAAAABAAAAAgAAAAMAAAAEAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAADAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAACAAAAAgAAAAAAAAAAAAAABgAAAAAAAAADAAAAAgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAUAAAAEAAAAAAAAAAEAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAEAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAUAAAACAAAABAAAAAMAAAAIAAAAAQAAAAcAAAAGAAAACQAAAAAAAAADAAAAAgAAAAIAAAAGAAAACgAAAAsAAAAAAAAAAQAAAAUAAAADAAAADQAAAAEAAAAHAAAABAAAAAwAAAAAAAAABAAAAH8AAAAPAAAACAAAAAMAAAAAAAAADAAAAAUAAAACAAAAEgAAAAoAAAAIAAAAAAAAABAAAAAGAAAADgAAAAsAAAARAAAAAQAAAAkAAAACAAAABwAAABUAAAAJAAAAEwAAAAMAAAANAAAAAQAAAAgAAAAFAAAAFgAAABAAAAAEAAAAAAAAAA8AAAAJAAAAEwAAAA4AAAAUAAAAAQAAAAcAAAAGAAAACgAAAAsAAAAYAAAAFwAAAAUAAAACAAAAEgAAAAsAAAARAAAAFwAAABkAAAACAAAABgAAAAoAAAAMAAAAHAAAAA0AAAAaAAAABAAAAA8AAAADAAAADQAAABoAAAAVAAAAHQAAAAMAAAAMAAAABwAAAA4AAAB/AAAAEQAAABsAAAAJAAAAFAAAAAYAAAAPAAAAFgAAABwAAAAfAAAABAAAAAgAAAAMAAAAEAAAABIAAAAhAAAAHgAAAAgAAAAFAAAAFgAAABEAAAALAAAADgAAAAYAAAAjAAAAGQAAABsAAAASAAAAGAAAAB4AAAAgAAAABQAAAAoAAAAQAAAAEwAAACIAAAAUAAAAJAAAAAcAAAAVAAAACQAAABQAAAAOAAAAEwAAAAkAAAAoAAAAGwAAACQAAAAVAAAAJgAAABMAAAAiAAAADQAAAB0AAAAHAAAAFgAAABAAAAApAAAAIQAAAA8AAAAIAAAAHwAAABcAAAAYAAAACwAAAAoAAAAnAAAAJQAAABkAAAAYAAAAfwAAACAAAAAlAAAACgAAABcAAAASAAAAGQAAABcAAAARAAAACwAAAC0AAAAnAAAAIwAAABoAAAAqAAAAHQAAACsAAAAMAAAAHAAAAA0AAAAbAAAAKAAAACMAAAAuAAAADgAAABQAAAARAAAAHAAAAB8AAAAqAAAALAAAAAwAAAAPAAAAGgAAAB0AAAArAAAAJgAAAC8AAAANAAAAGgAAABUAAAAeAAAAIAAAADAAAAAyAAAAEAAAABIAAAAhAAAAHwAAACkAAAAsAAAANQAAAA8AAAAWAAAAHAAAACAAAAAeAAAAGAAAABIAAAA0AAAAMgAAACUAAAAhAAAAHgAAADEAAAAwAAAAFgAAABAAAAApAAAAIgAAABMAAAAmAAAAFQAAADYAAAAkAAAAMwAAACMAAAAuAAAALQAAADgAAAARAAAAGwAAABkAAAAkAAAAFAAAACIAAAATAAAANwAAACgAAAA2AAAAJQAAACcAAAA0AAAAOQAAABgAAAAXAAAAIAAAACYAAAB/AAAAIgAAADMAAAAdAAAALwAAABUAAAAnAAAAJQAAABkAAAAXAAAAOwAAADkAAAAtAAAAKAAAABsAAAAkAAAAFAAAADwAAAAuAAAANwAAACkAAAAxAAAANQAAAD0AAAAWAAAAIQAAAB8AAAAqAAAAOgAAACsAAAA+AAAAHAAAACwAAAAaAAAAKwAAAD4AAAAvAAAAQAAAABoAAAAqAAAAHQAAACwAAAA1AAAAOgAAAEEAAAAcAAAAHwAAACoAAAAtAAAAJwAAACMAAAAZAAAAPwAAADsAAAA4AAAALgAAADwAAAA4AAAARAAAABsAAAAoAAAAIwAAAC8AAAAmAAAAKwAAAB0AAABFAAAAMwAAAEAAAAAwAAAAMQAAAB4AAAAhAAAAQwAAAEIAAAAyAAAAMQAAAH8AAAA9AAAAQgAAACEAAAAwAAAAKQAAADIAAAAwAAAAIAAAAB4AAABGAAAAQwAAADQAAAAzAAAARQAAADYAAABHAAAAJgAAAC8AAAAiAAAANAAAADkAAABGAAAASgAAACAAAAAlAAAAMgAAADUAAAA9AAAAQQAAAEsAAAAfAAAAKQAAACwAAAA2AAAARwAAADcAAABJAAAAIgAAADMAAAAkAAAANwAAACgAAAA2AAAAJAAAAEgAAAA8AAAASQAAADgAAABEAAAAPwAAAE0AAAAjAAAALgAAAC0AAAA5AAAAOwAAAEoAAABOAAAAJQAAACcAAAA0AAAAOgAAAH8AAAA+AAAATAAAACwAAABBAAAAKgAAADsAAAA/AAAATgAAAE8AAAAnAAAALQAAADkAAAA8AAAASAAAAEQAAABQAAAAKAAAADcAAAAuAAAAPQAAADUAAAAxAAAAKQAAAFEAAABLAAAAQgAAAD4AAAArAAAAOgAAACoAAABSAAAAQAAAAEwAAAA/AAAAfwAAADgAAAAtAAAATwAAADsAAABNAAAAQAAAAC8AAAA+AAAAKwAAAFQAAABFAAAAUgAAAEEAAAA6AAAANQAAACwAAABWAAAATAAAAEsAAABCAAAAQwAAAFEAAABVAAAAMQAAADAAAAA9AAAAQwAAAEIAAAAyAAAAMAAAAFcAAABVAAAARgAAAEQAAAA4AAAAPAAAAC4AAABaAAAATQAAAFAAAABFAAAAMwAAAEAAAAAvAAAAWQAAAEcAAABUAAAARgAAAEMAAAA0AAAAMgAAAFMAAABXAAAASgAAAEcAAABZAAAASQAAAFsAAAAzAAAARQAAADYAAABIAAAAfwAAAEkAAAA3AAAAUAAAADwAAABYAAAASQAAAFsAAABIAAAAWAAAADYAAABHAAAANwAAAEoAAABOAAAAUwAAAFwAAAA0AAAAOQAAAEYAAABLAAAAQQAAAD0AAAA1AAAAXgAAAFYAAABRAAAATAAAAFYAAABSAAAAYAAAADoAAABBAAAAPgAAAE0AAAA/AAAARAAAADgAAABdAAAATwAAAFoAAABOAAAASgAAADsAAAA5AAAAXwAAAFwAAABPAAAATwAAAE4AAAA/AAAAOwAAAF0AAABfAAAATQAAAFAAAABEAAAASAAAADwAAABjAAAAWgAAAFgAAABRAAAAVQAAAF4AAABlAAAAPQAAAEIAAABLAAAAUgAAAGAAAABUAAAAYgAAAD4AAABMAAAAQAAAAFMAAAB/AAAASgAAAEYAAABkAAAAVwAAAFwAAABUAAAARQAAAFIAAABAAAAAYQAAAFkAAABiAAAAVQAAAFcAAABlAAAAZgAAAEIAAABDAAAAUQAAAFYAAABMAAAASwAAAEEAAABoAAAAYAAAAF4AAABXAAAAUwAAAGYAAABkAAAAQwAAAEYAAABVAAAAWAAAAEgAAABbAAAASQAAAGMAAABQAAAAaQAAAFkAAABhAAAAWwAAAGcAAABFAAAAVAAAAEcAAABaAAAATQAAAFAAAABEAAAAagAAAF0AAABjAAAAWwAAAEkAAABZAAAARwAAAGkAAABYAAAAZwAAAFwAAABTAAAATgAAAEoAAABsAAAAZAAAAF8AAABdAAAATwAAAFoAAABNAAAAbQAAAF8AAABqAAAAXgAAAFYAAABRAAAASwAAAGsAAABoAAAAZQAAAF8AAABcAAAATwAAAE4AAABtAAAAbAAAAF0AAABgAAAAaAAAAGIAAABuAAAATAAAAFYAAABSAAAAYQAAAH8AAABiAAAAVAAAAGcAAABZAAAAbwAAAGIAAABuAAAAYQAAAG8AAABSAAAAYAAAAFQAAABjAAAAUAAAAGkAAABYAAAAagAAAFoAAABxAAAAZAAAAGYAAABTAAAAVwAAAGwAAAByAAAAXAAAAGUAAABmAAAAawAAAHAAAABRAAAAVQAAAF4AAABmAAAAZQAAAFcAAABVAAAAcgAAAHAAAABkAAAAZwAAAFsAAABhAAAAWQAAAHQAAABpAAAAbwAAAGgAAABrAAAAbgAAAHMAAABWAAAAXgAAAGAAAABpAAAAWAAAAGcAAABbAAAAcQAAAGMAAAB0AAAAagAAAF0AAABjAAAAWgAAAHUAAABtAAAAcQAAAGsAAAB/AAAAZQAAAF4AAABzAAAAaAAAAHAAAABsAAAAZAAAAF8AAABcAAAAdgAAAHIAAABtAAAAbQAAAGwAAABdAAAAXwAAAHUAAAB2AAAAagAAAG4AAABiAAAAaAAAAGAAAAB3AAAAbwAAAHMAAABvAAAAYQAAAG4AAABiAAAAdAAAAGcAAAB3AAAAcAAAAGsAAABmAAAAZQAAAHgAAABzAAAAcgAAAHEAAABjAAAAdAAAAGkAAAB1AAAAagAAAHkAAAByAAAAcAAAAGQAAABmAAAAdgAAAHgAAABsAAAAcwAAAG4AAABrAAAAaAAAAHgAAAB3AAAAcAAAAHQAAABnAAAAdwAAAG8AAABxAAAAaQAAAHkAAAB1AAAAfwAAAG0AAAB2AAAAcQAAAHkAAABqAAAAdgAAAHgAAABsAAAAcgAAAHUAAAB5AAAAbQAAAHcAAABvAAAAcwAAAG4AAAB5AAAAdAAAAHgAAAB4AAAAcwAAAHIAAABwAAAAeQAAAHcAAAB2AAAAeQAAAHQAAAB4AAAAdwAAAHUAAABxAAAAdgAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAEAAAAFAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAIAAAAFAAAAAQAAAAAAAAD/////AQAAAAAAAAADAAAABAAAAAIAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAUAAAABAAAAAAAAAAAAAAABAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAAFAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAQAAAAFAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAADAAAAAAAAAAAAAAABAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAABAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAADAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAADAAAABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAAAAAAAAAAABAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAMAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAADAAAAAQAAAAAAAAABAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAMAAAABAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAMAAAABAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAADAAAABQAAAAEAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAEAAAABQAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAgAAAAUAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAMAAAABAAAAAAAAAAEAAAAAAAAABQAAAAAAAAAAAAAABQAAAAUAAAAAAAAAAAAAAP////8BAAAAAAAAAAMAAAAEAAAAAgAAAAAAAAAAAAAAAQAAAAAAAAAAAAAABQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAABQAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAQAAAP//////////AQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAMAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAIAAAAAAAAAAAAAAAEAAAACAAAABgAAAAQAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAABwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAoAAAACAAAAAAAAAAAAAAABAAAAAQAAAAUAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAIAAAAAAAAAAAAAAAEAAAADAAAABwAAAAYAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAHAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAABAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAOAAAAAgAAAAAAAAAAAAAAAQAAAAAAAAAJAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAwAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAgAAAAAAAAAAAAAAAQAAAAQAAAAIAAAACgAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAsAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAJAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAACAAAAAAAAAAAAAAABAAAACwAAAA8AAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA4AAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAgAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAFAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAACAAAAAAAAAAAAAAABAAAADAAAABAAAAAMAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAPAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAEAAAAKAAAAEwAAAAgAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAJAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAgAAAAAAAAAAAAAAAQAAAA0AAAARAAAADQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAABEAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAATAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAABMAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQAAAAIAAAAAAAAAAAAAAAEAAAAOAAAAEgAAAA8AAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAPAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAABIAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAATAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABMAAAACAAAAAAAAAAAAAAABAAAA//////////8TAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABMAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAASAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABIAAAAAAAAAGAAAAAAAAAAhAAAAAAAAAB4AAAAAAAAAIAAAAAMAAAAxAAAAAQAAADAAAAADAAAAMgAAAAMAAAAIAAAAAAAAAAUAAAAFAAAACgAAAAUAAAAWAAAAAAAAABAAAAAAAAAAEgAAAAAAAAApAAAAAQAAACEAAAAAAAAAHgAAAAAAAAAEAAAAAAAAAAAAAAAFAAAAAgAAAAUAAAAPAAAAAQAAAAgAAAAAAAAABQAAAAUAAAAfAAAAAQAAABYAAAAAAAAAEAAAAAAAAAACAAAAAAAAAAYAAAAAAAAADgAAAAAAAAAKAAAAAAAAAAsAAAAAAAAAEQAAAAMAAAAYAAAAAQAAABcAAAADAAAAGQAAAAMAAAAAAAAAAAAAAAEAAAAFAAAACQAAAAUAAAAFAAAAAAAAAAIAAAAAAAAABgAAAAAAAAASAAAAAQAAAAoAAAAAAAAACwAAAAAAAAAEAAAAAQAAAAMAAAAFAAAABwAAAAUAAAAIAAAAAQAAAAAAAAAAAAAAAQAAAAUAAAAQAAAAAQAAAAUAAAAAAAAAAgAAAAAAAAAHAAAAAAAAABUAAAAAAAAAJgAAAAAAAAAJAAAAAAAAABMAAAAAAAAAIgAAAAMAAAAOAAAAAQAAABQAAAADAAAAJAAAAAMAAAADAAAAAAAAAA0AAAAFAAAAHQAAAAUAAAABAAAAAAAAAAcAAAAAAAAAFQAAAAAAAAAGAAAAAQAAAAkAAAAAAAAAEwAAAAAAAAAEAAAAAgAAAAwAAAAFAAAAGgAAAAUAAAAAAAAAAQAAAAMAAAAAAAAADQAAAAUAAAACAAAAAQAAAAEAAAAAAAAABwAAAAAAAAAaAAAAAAAAACoAAAAAAAAAOgAAAAAAAAAdAAAAAAAAACsAAAAAAAAAPgAAAAMAAAAmAAAAAQAAAC8AAAADAAAAQAAAAAMAAAAMAAAAAAAAABwAAAAFAAAALAAAAAUAAAANAAAAAAAAABoAAAAAAAAAKgAAAAAAAAAVAAAAAQAAAB0AAAAAAAAAKwAAAAAAAAAEAAAAAwAAAA8AAAAFAAAAHwAAAAUAAAADAAAAAQAAAAwAAAAAAAAAHAAAAAUAAAAHAAAAAQAAAA0AAAAAAAAAGgAAAAAAAAAfAAAAAAAAACkAAAAAAAAAMQAAAAAAAAAsAAAAAAAAADUAAAAAAAAAPQAAAAMAAAA6AAAAAQAAAEEAAAADAAAASwAAAAMAAAAPAAAAAAAAABYAAAAFAAAAIQAAAAUAAAAcAAAAAAAAAB8AAAAAAAAAKQAAAAAAAAAqAAAAAQAAACwAAAAAAAAANQAAAAAAAAAEAAAABAAAAAgAAAAFAAAAEAAAAAUAAAAMAAAAAQAAAA8AAAAAAAAAFgAAAAUAAAAaAAAAAQAAABwAAAAAAAAAHwAAAAAAAAAyAAAAAAAAADAAAAAAAAAAMQAAAAMAAAAgAAAAAAAAAB4AAAADAAAAIQAAAAMAAAAYAAAAAwAAABIAAAADAAAAEAAAAAMAAABGAAAAAAAAAEMAAAAAAAAAQgAAAAMAAAA0AAAAAwAAADIAAAAAAAAAMAAAAAAAAAAlAAAAAwAAACAAAAAAAAAAHgAAAAMAAABTAAAAAAAAAFcAAAADAAAAVQAAAAMAAABKAAAAAwAAAEYAAAAAAAAAQwAAAAAAAAA5AAAAAQAAADQAAAADAAAAMgAAAAAAAAAZAAAAAAAAABcAAAAAAAAAGAAAAAMAAAARAAAAAAAAAAsAAAADAAAACgAAAAMAAAAOAAAAAwAAAAYAAAADAAAAAgAAAAMAAAAtAAAAAAAAACcAAAAAAAAAJQAAAAMAAAAjAAAAAwAAABkAAAAAAAAAFwAAAAAAAAAbAAAAAwAAABEAAAAAAAAACwAAAAMAAAA/AAAAAAAAADsAAAADAAAAOQAAAAMAAAA4AAAAAwAAAC0AAAAAAAAAJwAAAAAAAAAuAAAAAwAAACMAAAADAAAAGQAAAAAAAAAkAAAAAAAAABQAAAAAAAAADgAAAAMAAAAiAAAAAAAAABMAAAADAAAACQAAAAMAAAAmAAAAAwAAABUAAAADAAAABwAAAAMAAAA3AAAAAAAAACgAAAAAAAAAGwAAAAMAAAA2AAAAAwAAACQAAAAAAAAAFAAAAAAAAAAzAAAAAwAAACIAAAAAAAAAEwAAAAMAAABIAAAAAAAAADwAAAADAAAALgAAAAMAAABJAAAAAwAAADcAAAAAAAAAKAAAAAAAAABHAAAAAwAAADYAAAADAAAAJAAAAAAAAABAAAAAAAAAAC8AAAAAAAAAJgAAAAMAAAA+AAAAAAAAACsAAAADAAAAHQAAAAMAAAA6AAAAAwAAACoAAAADAAAAGgAAAAMAAABUAAAAAAAAAEUAAAAAAAAAMwAAAAMAAABSAAAAAwAAAEAAAAAAAAAALwAAAAAAAABMAAAAAwAAAD4AAAAAAAAAKwAAAAMAAABhAAAAAAAAAFkAAAADAAAARwAAAAMAAABiAAAAAwAAAFQAAAAAAAAARQAAAAAAAABgAAAAAwAAAFIAAAADAAAAQAAAAAAAAABLAAAAAAAAAEEAAAAAAAAAOgAAAAMAAAA9AAAAAAAAADUAAAADAAAALAAAAAMAAAAxAAAAAwAAACkAAAADAAAAHwAAAAMAAABeAAAAAAAAAFYAAAAAAAAATAAAAAMAAABRAAAAAwAAAEsAAAAAAAAAQQAAAAAAAABCAAAAAwAAAD0AAAAAAAAANQAAAAMAAABrAAAAAAAAAGgAAAADAAAAYAAAAAMAAABlAAAAAwAAAF4AAAAAAAAAVgAAAAAAAABVAAAAAwAAAFEAAAADAAAASwAAAAAAAAA5AAAAAAAAADsAAAAAAAAAPwAAAAMAAABKAAAAAAAAAE4AAAADAAAATwAAAAMAAABTAAAAAwAAAFwAAAADAAAAXwAAAAMAAAAlAAAAAAAAACcAAAADAAAALQAAAAMAAAA0AAAAAAAAADkAAAAAAAAAOwAAAAAAAABGAAAAAwAAAEoAAAAAAAAATgAAAAMAAAAYAAAAAAAAABcAAAADAAAAGQAAAAMAAAAgAAAAAwAAACUAAAAAAAAAJwAAAAMAAAAyAAAAAwAAADQAAAAAAAAAOQAAAAAAAAAuAAAAAAAAADwAAAAAAAAASAAAAAMAAAA4AAAAAAAAAEQAAAADAAAAUAAAAAMAAAA/AAAAAwAAAE0AAAADAAAAWgAAAAMAAAAbAAAAAAAAACgAAAADAAAANwAAAAMAAAAjAAAAAAAAAC4AAAAAAAAAPAAAAAAAAAAtAAAAAwAAADgAAAAAAAAARAAAAAMAAAAOAAAAAAAAABQAAAADAAAAJAAAAAMAAAARAAAAAwAAABsAAAAAAAAAKAAAAAMAAAAZAAAAAwAAACMAAAAAAAAALgAAAAAAAABHAAAAAAAAAFkAAAAAAAAAYQAAAAMAAABJAAAAAAAAAFsAAAADAAAAZwAAAAMAAABIAAAAAwAAAFgAAAADAAAAaQAAAAMAAAAzAAAAAAAAAEUAAAADAAAAVAAAAAMAAAA2AAAAAAAAAEcAAAAAAAAAWQAAAAAAAAA3AAAAAwAAAEkAAAAAAAAAWwAAAAMAAAAmAAAAAAAAAC8AAAADAAAAQAAAAAMAAAAiAAAAAwAAADMAAAAAAAAARQAAAAMAAAAkAAAAAwAAADYAAAAAAAAARwAAAAAAAABgAAAAAAAAAGgAAAAAAAAAawAAAAMAAABiAAAAAAAAAG4AAAADAAAAcwAAAAMAAABhAAAAAwAAAG8AAAADAAAAdwAAAAMAAABMAAAAAAAAAFYAAAADAAAAXgAAAAMAAABSAAAAAAAAAGAAAAAAAAAAaAAAAAAAAABUAAAAAwAAAGIAAAAAAAAAbgAAAAMAAAA6AAAAAAAAAEEAAAADAAAASwAAAAMAAAA+AAAAAwAAAEwAAAAAAAAAVgAAAAMAAABAAAAAAwAAAFIAAAAAAAAAYAAAAAAAAABVAAAAAAAAAFcAAAAAAAAAUwAAAAMAAABlAAAAAAAAAGYAAAADAAAAZAAAAAMAAABrAAAAAwAAAHAAAAADAAAAcgAAAAMAAABCAAAAAAAAAEMAAAADAAAARgAAAAMAAABRAAAAAAAAAFUAAAAAAAAAVwAAAAAAAABeAAAAAwAAAGUAAAAAAAAAZgAAAAMAAAAxAAAAAAAAADAAAAADAAAAMgAAAAMAAAA9AAAAAwAAAEIAAAAAAAAAQwAAAAMAAABLAAAAAwAAAFEAAAAAAAAAVQAAAAAAAABfAAAAAAAAAFwAAAAAAAAAUwAAAAAAAABPAAAAAAAAAE4AAAAAAAAASgAAAAMAAAA/AAAAAQAAADsAAAADAAAAOQAAAAMAAABtAAAAAAAAAGwAAAAAAAAAZAAAAAUAAABdAAAAAQAAAF8AAAAAAAAAXAAAAAAAAABNAAAAAQAAAE8AAAAAAAAATgAAAAAAAAB1AAAABAAAAHYAAAAFAAAAcgAAAAUAAABqAAAAAQAAAG0AAAAAAAAAbAAAAAAAAABaAAAAAQAAAF0AAAABAAAAXwAAAAAAAABaAAAAAAAAAE0AAAAAAAAAPwAAAAAAAABQAAAAAAAAAEQAAAAAAAAAOAAAAAMAAABIAAAAAQAAADwAAAADAAAALgAAAAMAAABqAAAAAAAAAF0AAAAAAAAATwAAAAUAAABjAAAAAQAAAFoAAAAAAAAATQAAAAAAAABYAAAAAQAAAFAAAAAAAAAARAAAAAAAAAB1AAAAAwAAAG0AAAAFAAAAXwAAAAUAAABxAAAAAQAAAGoAAAAAAAAAXQAAAAAAAABpAAAAAQAAAGMAAAABAAAAWgAAAAAAAABpAAAAAAAAAFgAAAAAAAAASAAAAAAAAABnAAAAAAAAAFsAAAAAAAAASQAAAAMAAABhAAAAAQAAAFkAAAADAAAARwAAAAMAAABxAAAAAAAAAGMAAAAAAAAAUAAAAAUAAAB0AAAAAQAAAGkAAAAAAAAAWAAAAAAAAABvAAAAAQAAAGcAAAAAAAAAWwAAAAAAAAB1AAAAAgAAAGoAAAAFAAAAWgAAAAUAAAB5AAAAAQAAAHEAAAAAAAAAYwAAAAAAAAB3AAAAAQAAAHQAAAABAAAAaQAAAAAAAAB3AAAAAAAAAG8AAAAAAAAAYQAAAAAAAABzAAAAAAAAAG4AAAAAAAAAYgAAAAMAAABrAAAAAQAAAGgAAAADAAAAYAAAAAMAAAB5AAAAAAAAAHQAAAAAAAAAZwAAAAUAAAB4AAAAAQAAAHcAAAAAAAAAbwAAAAAAAABwAAAAAQAAAHMAAAAAAAAAbgAAAAAAAAB1AAAAAQAAAHEAAAAFAAAAaQAAAAUAAAB2AAAAAQAAAHkAAAAAAAAAdAAAAAAAAAByAAAAAQAAAHgAAAABAAAAdwAAAAAAAAByAAAAAAAAAHAAAAAAAAAAawAAAAAAAABkAAAAAAAAAGYAAAAAAAAAZQAAAAMAAABTAAAAAQAAAFcAAAADAAAAVQAAAAMAAAB2AAAAAAAAAHgAAAAAAAAAcwAAAAUAAABsAAAAAQAAAHIAAAAAAAAAcAAAAAAAAABcAAAAAQAAAGQAAAAAAAAAZgAAAAAAAAB1AAAAAAAAAHkAAAAFAAAAdwAAAAUAAABtAAAAAQAAAHYAAAAAAAAAeAAAAAAAAABfAAAAAQAAAGwAAAABAAAAcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAEAAAABAAAAAAAAAAAAAAABAAAAAAAAAAEAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAB+ogX28rbpPxqumpJv+fM/165tC4ns9D+XaEnTqUsEQFrOtNlC4PA/3U+0XG6P9b9TdUUBxTTjP4PUp8ex1ty/B1rD/EN43z+lcDi6LLrZP/a45NWEHMY/oJ5ijLDZ+j/xw3rjxWPjP2B8A46ioQdAotff3wla2z+FMSpA1jj+v6b5Y1mtPbS/cIu8K0F457/2esiyJpDNv98k5Ts2NeA/pvljWa09tD88ClUJ60MDQPZ6yLImkM0/4ONKxa0UBcD2uOTVhBzGv5G7JRxGave/8cN648Vj47+HCwtkjAXIv6LX398JWtu/qyheaCAL9D9TdUUBxTTjv4gyTxslhwVAB1rD/EN4378EH/28teoFwH6iBfbytum/F6ztFYdK/r/Xrm0Liez0vwcS6wNGWeO/Ws602ULg8L9TCtRLiLT8P8pi5RexJsw/BlIKPVwR5T95Wyu0/QjnP5PjoT7YYcu/mBhKZ6zrwj8wRYS7NebuP3qW6geh+Ls/SLrixebL3r+pcyymN9XrPwmkNHp7xec/GWNMZVAA17+82s+x2BLiPwn2ytbJ9ek/LgEH1sMS1j8yp/2LhTfeP+SnWwtQBbu/d38gkp5X7z8ytsuHaADGPzUYObdf1+m/7IauECWhwz+cjSACjzniP76Z+wUhN9K/1+GEKzup67+/GYr/04baPw6idWOvsuc/ZedTWsRa5b/EJQOuRzi0v/OncYhHPes/h49PixY53j+i8wWfC03Nvw2idWOvsue/ZedTWsRa5T/EJQOuRzi0P/KncYhHPeu/iY9PixY53r+i8wWfC03NP9anWwtQBbs/d38gkp5X778ytsuHaADGvzUYObdf1+k/74auECWhw7+cjSACjzniv8CZ+wUhN9I/1uGEKzup6z+/GYr/04bavwmkNHp7xee/F2NMZVAA1z+82s+x2BLivwr2ytbJ9em/KwEH1sMS1r8yp/2LhTfev81i5RexJsy/BlIKPVwR5b95Wyu0/Qjnv5DjoT7YYcs/nBhKZ6zrwr8wRYS7Nebuv3OW6geh+Lu/SLrixebL3j+pcyymN9Xrv8rHIFfWehZAMBwUdlo0DECTUc17EOb2PxpVB1SWChdAzjbhb9pTDUDQhmdvECX5P9FlMKCC9+g/IIAzjELgE0DajDngMv8GQFhWDmDPjNs/y1guLh96EkAxPi8k7DIEQJCc4URlhRhA3eLKKLwkEECqpNAyTBD/P6xpjXcDiwVAFtl//cQm4z+Ibt3XKiYTQM7mCLUb3QdAoM1t8yVv7D8aLZv2Nk8UQEAJPV5nQwxAtSsfTCoE9z9TPjXLXIIWQBVanC5W9AtAYM3d7Adm9j++5mQz1FoWQBUThyaVBghAwH5muQsV7T89Q1qv82MUQJoWGOfNuBdAzrkClkmwDkDQjKq77t37Py+g0dtitsE/ZwAMTwVPEUBojepluNwBQGYbtuW+t9w/HNWIJs6MEkDTNuQUSlgEQKxktPP5TcQ/ixbLB8JjEUCwuWjXMQYCQAS/R09FkRdAowpiZjhhDkB7LmlczD/7P01iQmhhsAVAnrtTwDy84z/Z6jfQ2TgTQChOCXMnWwpAhrW3daoz8z/HYJvVPI4VQLT3ik5FcA5Angi7LOZd+z+NNVzDy5gXQBXdvVTFUA1AYNMgOeYe+T8+qHXGCwkXQKQTOKwa5AJA8gFVoEMW0T+FwzJyttIRQAEAAAD/////BwAAAP////8xAAAA/////1cBAAD/////YQkAAP////+nQQAA/////5HLAQD/////95AMAP/////B9lcAAAAAAAAAAAAAAAAAAgAAAP////8OAAAA/////2IAAAD/////rgIAAP/////CEgAA/////06DAAD/////IpcDAP/////uIRkA/////4LtrwAAAAAAAAAAAAAAAAAAAAAAAgAAAP//////////AQAAAAMAAAD//////////////////////////////////////////////////////////////////////////wEAAAAAAAAAAgAAAP///////////////wMAAAD//////////////////////////////////////////////////////////////////////////wEAAAAAAAAAAgAAAP///////////////wMAAAD//////////////////////////////////////////////////////////////////////////wEAAAAAAAAAAgAAAP///////////////wMAAAD//////////////////////////////////////////////////////////wIAAAD//////////wEAAAAAAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA/////////////////////wEAAAD///////////////8CAAAA////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD///////////////////////////////8CAAAA////////////////AQAAAP////////////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAAAQAAAP//////////AgAAAP//////////////////////////////////////////////////////////AwAAAP///////////////wIAAAAAAAAAAQAAAP//////////////////////////////////////////////////////////////////////////AwAAAP///////////////wIAAAAAAAAAAQAAAP//////////////////////////////////////////////////////////////////////////AwAAAP///////////////wIAAAAAAAAAAQAAAP//////////////////////////////////////////////////////////////////////////AwAAAAEAAAD//////////wIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAgAAAAAAAAACAAAAAQAAAAEAAAACAAAAAgAAAAAAAAAFAAAABQAAAAAAAAACAAAAAgAAAAMAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAIAAAABAAAAAgAAAAIAAAACAAAAAAAAAAUAAAAGAAAAAAAAAAIAAAACAAAAAwAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAAAAAAAAgAAAAEAAAADAAAAAgAAAAIAAAAAAAAABQAAAAcAAAAAAAAAAgAAAAIAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAgAAAAAAAAACAAAAAQAAAAQAAAACAAAAAgAAAAAAAAAFAAAACAAAAAAAAAACAAAAAgAAAAMAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAACAAAAAAAAAAIAAAABAAAAAAAAAAIAAAACAAAAAAAAAAUAAAAJAAAAAAAAAAIAAAACAAAAAwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAIAAAACAAAAAAAAAAMAAAAOAAAAAgAAAAAAAAACAAAAAwAAAAAAAAAAAAAAAgAAAAIAAAADAAAABgAAAAAAAAAAAAAAAAAAAAAAAAALAAAAAgAAAAIAAAAAAAAAAwAAAAoAAAACAAAAAAAAAAIAAAADAAAAAQAAAAAAAAACAAAAAgAAAAMAAAAHAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAACAAAAAgAAAAAAAAADAAAACwAAAAIAAAAAAAAAAgAAAAMAAAACAAAAAAAAAAIAAAACAAAAAwAAAAgAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAIAAAACAAAAAAAAAAMAAAAMAAAAAgAAAAAAAAACAAAAAwAAAAMAAAAAAAAAAgAAAAIAAAADAAAACQAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAgAAAAIAAAAAAAAAAwAAAA0AAAACAAAAAAAAAAIAAAADAAAABAAAAAAAAAACAAAAAgAAAAMAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAACAAAAAgAAAAAAAAADAAAABgAAAAIAAAAAAAAAAgAAAAMAAAAPAAAAAAAAAAIAAAACAAAAAwAAAAsAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAIAAAACAAAAAAAAAAMAAAAHAAAAAgAAAAAAAAACAAAAAwAAABAAAAAAAAAAAgAAAAIAAAADAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAgAAAAIAAAAAAAAAAwAAAAgAAAACAAAAAAAAAAIAAAADAAAAEQAAAAAAAAACAAAAAgAAAAMAAAANAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAACAAAAAgAAAAAAAAADAAAACQAAAAIAAAAAAAAAAgAAAAMAAAASAAAAAAAAAAIAAAACAAAAAwAAAA4AAAAAAAAAAAAAAAAAAAAAAAAACQAAAAIAAAACAAAAAAAAAAMAAAAFAAAAAgAAAAAAAAACAAAAAwAAABMAAAAAAAAAAgAAAAIAAAADAAAADwAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAgAAAAAAAAACAAAAAQAAABMAAAACAAAAAgAAAAAAAAAFAAAACgAAAAAAAAACAAAAAgAAAAMAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABEAAAACAAAAAAAAAAIAAAABAAAADwAAAAIAAAACAAAAAAAAAAUAAAALAAAAAAAAAAIAAAACAAAAAwAAABEAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAIAAAAAAAAAAgAAAAEAAAAQAAAAAgAAAAIAAAAAAAAABQAAAAwAAAAAAAAAAgAAAAIAAAADAAAAEgAAAAAAAAAAAAAAAAAAAAAAAAATAAAAAgAAAAAAAAACAAAAAQAAABEAAAACAAAAAgAAAAAAAAAFAAAADQAAAAAAAAACAAAAAgAAAAMAAAATAAAAAAAAAAAAAAAAAAAAAAAAAA8AAAACAAAAAAAAAAIAAAABAAAAEgAAAAIAAAACAAAAAAAAAAUAAAAOAAAAAAAAAAIAAAACAAAAAwAAAAIAAAABAAAAAAAAAAEAAAACAAAAAAAAAAAAAAACAAAAAQAAAAAAAAABAAAAAgAAAAEAAAAAAAAAAgAAAAAAAAAFAAAABAAAAAAAAAABAAAABQAAAAAAAAAAAAAABQAAAAQAAAAAAAAAAQAAAAUAAAAEAAAAAAAAAAUAAAAAAAAAAgAAAAEAAAAAAAAAAQAAAAIAAAAAAAAAAAAAAAIAAAABAAAAAAAAAAEAAAACAAAAAQAAAAAAAAACAAAAAgAAAAAAAAABAAAAAAAAAAAAAAAFAAAABAAAAAAAAAABAAAABQAAAAAAAAAAAAAABQAAAAQAAAAAAAAAAQAAAAUAAAAEAAAAAAAAAAUAAAAFAAAAAAAAAAEAAAAAAAAAAAAAAMuhRbbsNlBBYqHW9OmHIkF9XBuqnS31QAK37uYhNMhAOSo3UUupm0DC+6pc6JxvQHV9eseEEEJAzURsCyqlFEB8BQ4NMJjnPyy3tBoS97o/xawXQznRjj89J2K2CZxhP6vX43RIIDQ/S8isgygEBz+LvFHQkmzaPjFFFO7wMq4+AADMLkTtjkIAAOgkJqxhQgAAU7B0MjRCAADwpBcVB0IAAACYP2HaQQAAAIn/Ja5BzczM4Eg6gUHNzMxMU7BTQTMzMzNfgCZBAAAAAEi3+UAAAAAAwGPNQDMzMzMzy6BAmpmZmZkxc0AzMzMzM/NFQDMzMzMzMxlAzczMzMzM7D+ygXSx2U6RQKimJOvQKnpA23hmONTHY0A/AGcxyudNQNb3K647mzZA+S56rrwWIUAm4kUQ+9UJQKre9hGzh/M/BLvoy9WG3T+LmqMf8VHGP2m3nYNV37A/gbFHcyeCmT+cBPWBckiDP61tZACjKW0/q2RbYVUYVj8uDypVyLNAP6jGS5cA5zBBwcqhBdCNGUEGEhQ/JVEDQT6WPnRbNO1AB/AWSJgT1kDfUWNCNLDAQNk+5C33OqlAchWL34QSk0DKvtDIrNV8QNF0G3kFzGVASSeWhBl6UED+/0mNGuk4QGjA/dm/1CJALPLPMql6DEDSHoDrwpP1P2jouzWST+A/egAAAAAAAABKAwAAAAAAAPoWAAAAAAAAyqAAAAAAAAB6ZQQAAAAAAErGHgAAAAAA+mvXAAAAAADK8+MFAAAAAHqqOykAAAAASqmhIAEAAAD6oGvkBwAAAMpm8T43AAAAes+ZuIIBAABKrDQMkwoAAPq1cFUFSgAAyvkUViUGAgAAAAAAAwAAAAYAAAACAAAABQAAAAEAAAAEAAAAAAAAAAAAAAAFAAAAAwAAAAEAAAAGAAAABAAAAAIAAAAAAAAAAAAAAP////8AAAAAAAAAAAAAAAAAAAAAAAAAAP////////////////////////////////////8AAAAA/////wAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAP////8AAAAAAAAAAAEAAAABAAAAAAAAAAAAAAD/////AAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAA/////wUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAP////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////AAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////////////////////////////wAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAUAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////////////////////////////8AAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAQAAAAEAAAAAAAAAAQAAAAAAAAAFAAAAAQAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAEAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAAAAAAABAAEAAAEBAAAAAAABAAAAAQAAAAEAAQAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAACAAAAAQAAAAMAAAAOAAAABgAAAAsAAAACAAAABwAAAAEAAAAYAAAABQAAAAoAAAABAAAABgAAAAAAAAAmAAAABwAAAAwAAAADAAAACAAAAAIAAAAxAAAACQAAAA4AAAAAAAAABQAAAAQAAAA6AAAACAAAAA0AAAAEAAAACQAAAAMAAAA/AAAACwAAAAYAAAAPAAAACgAAABAAAABIAAAADAAAAAcAAAAQAAAACwAAABEAAABTAAAACgAAAAUAAAATAAAADgAAAA8AAABhAAAADQAAAAgAAAARAAAADAAAABIAAABrAAAADgAAAAkAAAASAAAADQAAABMAAAB1AAAADwAAABMAAAARAAAAEgAAABAAAAAHAAAABwAAAAEAAAACAAAABAAAAAMAAAAAAAAAAAAAAAcAAAADAAAAAQAAAAIAAAAFAAAABAAAAAAAAAAAAAAAYWxnb3MuYwBfcG9seWZpbGxJbnRlcm5hbABhZGphY2VudEZhY2VEaXJbdG1wRmlqay5mYWNlXVtmaWprLmZhY2VdID09IEtJAGZhY2VpamsuYwBfZmFjZUlqa1BlbnRUb0dlb0JvdW5kYXJ5AGFkamFjZW50RmFjZURpcltjZW50ZXJJSksuZmFjZV1bZmFjZTJdID09IEtJAF9mYWNlSWprVG9HZW9Cb3VuZGFyeQBwb2x5Z29uLT5uZXh0ID09IE5VTEwAbGlua2VkR2VvLmMAYWRkTmV3TGlua2VkUG9seWdvbgBuZXh0ICE9IE5VTEwAbG9vcCAhPSBOVUxMAGFkZE5ld0xpbmtlZExvb3AAcG9seWdvbi0+Zmlyc3QgPT0gTlVMTABhZGRMaW5rZWRMb29wAGNvb3JkICE9IE5VTEwAYWRkTGlua2VkQ29vcmQAbG9vcC0+Zmlyc3QgPT0gTlVMTABpbm5lckxvb3BzICE9IE5VTEwAbm9ybWFsaXplTXVsdGlQb2x5Z29uAGJib3hlcyAhPSBOVUxMAGNhbmRpZGF0ZXMgIT0gTlVMTABmaW5kUG9seWdvbkZvckhvbGUAY2FuZGlkYXRlQkJveGVzICE9IE5VTEwAcmV2RGlyICE9IElOVkFMSURfRElHSVQAbG9jYWxpai5jAGgzVG9Mb2NhbElqawBiYXNlQ2VsbCAhPSBvcmlnaW5CYXNlQ2VsbAAhKG9yaWdpbk9uUGVudCAmJiBpbmRleE9uUGVudCkAcGVudGFnb25Sb3RhdGlvbnMgPj0gMABkaXJlY3Rpb25Sb3RhdGlvbnMgPj0gMABiYXNlQ2VsbCA9PSBvcmlnaW5CYXNlQ2VsbABiYXNlQ2VsbCAhPSBJTlZBTElEX0JBU0VfQ0VMTABsb2NhbElqa1RvSDMAIV9pc0Jhc2VDZWxsUGVudGFnb24oYmFzZUNlbGwpAGJhc2VDZWxsUm90YXRpb25zID49IDAAd2l0aGluUGVudGFnb25Sb3RhdGlvbnMgPj0gMABncmFwaC0+YnVja2V0cyAhPSBOVUxMAHZlcnRleEdyYXBoLmMAaW5pdFZlcnRleEdyYXBoAG5vZGUgIT0gTlVMTABhZGRWZXJ0ZXhOb2Rl";var W="function"==typeof atob?atob:function(t){var e,i,n,r,s,o,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l="",c=0;t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{n=a.indexOf(t.charAt(c++)),e=(15&(r=a.indexOf(t.charAt(c++))))<<4|(s=a.indexOf(t.charAt(c++)))>>2,i=(3&s)<<6|(o=a.indexOf(t.charAt(c++))),l+=String.fromCharCode(n<<2|r>>4),64!==s&&(l+=String.fromCharCode(e)),64!==o&&(l+=String.fromCharCode(i))}while(c<t.length);return l};function Z(t){if(z(t))return function(t){try{for(var e=W(t),i=new Uint8Array(e.length),n=0;n<e.length;++n)i[n]=e.charCodeAt(n);return i}catch(r){throw new Error("Converting base64 string to bytes failed.")}}(t.slice(j.length))}var q,Y,Q=function(t,e,i){var n=new t.Int8Array(i),r=new t.Int32Array(i),s=(new t.Uint8Array(i),new t.Float32Array(i),new t.Float64Array(i)),o=0|e.p,a=t.Math.floor,l=t.Math.abs,c=t.Math.sqrt,h=t.Math.pow,u=t.Math.cos,d=t.Math.sin,p=t.Math.tan,f=t.Math.acos,m=t.Math.asin,g=t.Math.atan,A=t.Math.atan2,b=t.Math.ceil,v=t.Math.imul,_=t.Math.min,y=t.Math.clz32,w=e.b,x=e.c,C=e.d,S=e.e,k=e.f,E=e.g,D=e.h,I=e.i,P=24048;function O(t,e,i,n){var r,s;0|M(t|=0,e|=0,i|=0,n|=0,0)&&(De(0|n,0,(s=1+(0|v(3*i|0,i+1|0))|0)<<3|0),(r=0|ve(s,4))&&(T(t,e,i,n,r,s,0),be(r)))}function M(t,e,i,n,s){e|=0,i|=0,s|=0;var o,a,l=0,c=0,h=0,u=0,d=0,p=0,f=0;if(o=P,P=P+16|0,a=o,r[(l=n|=0)>>2]=t|=0,r[l+4>>2]=e,(l=0!=(0|s))&&(r[s>>2]=0),0|Rt(t,e))return P=o,1;r[a>>2]=0;t:do{if((0|i)>=1)if(l)for(d=0,p=1,f=1,c=0,l=t;;){if(!(c|d)){if(0==(0|(l=0|R(l,e,4,a)))&0==(0|(e=0|x()))){l=2;break t}if(0|Rt(l,e)){l=1;break t}}if(0==(0|(l=0|R(l,e,0|r[16+(d<<2)>>2],a)))&0==(0|(e=0|x()))){l=2;break t}if(r[(t=n+(f<<3)|0)>>2]=l,r[t+4>>2]=e,r[s+(f<<2)>>2]=p,t=(0|(c=c+1|0))==(0|p),u=6==(0|(h=d+1|0)),0|Rt(l,e)){l=1;break t}if((0|(p=p+(u&t&1)|0))>(0|i)){l=0;break}d=t?u?0:h:d,f=f+1|0,c=t?0:c}else for(d=0,p=1,f=1,c=0,l=t;;){if(!(c|d)){if(0==(0|(l=0|R(l,e,4,a)))&0==(0|(e=0|x()))){l=2;break t}if(0|Rt(l,e)){l=1;break t}}if(0==(0|(l=0|R(l,e,0|r[16+(d<<2)>>2],a)))&0==(0|(e=0|x()))){l=2;break t}if(r[(t=n+(f<<3)|0)>>2]=l,r[t+4>>2]=e,t=(0|(c=c+1|0))==(0|p),u=6==(0|(h=d+1|0)),0|Rt(l,e)){l=1;break t}if((0|(p=p+(u&t&1)|0))>(0|i)){l=0;break}d=t?u?0:h:d,f=f+1|0,c=t?0:c}else l=0}while(0);return P=o,0|l}function T(t,e,i,n,s,o,a){i|=0,n|=0,s|=0,o|=0,a|=0;var l,c,h=0,u=0,d=0,p=0,f=0;if(c=P,P=P+16|0,l=c,0==(0|(t|=0))&0==(0|(e|=0)))P=c;else{if(h=0|we(0|t,0|e,0|o,((0|o)<0)<<31>>31|0),x(),!(0==(0|(f=0|r[(p=u=n+(h<<3)|0)>>2]))&0==(0|(p=0|r[p+4>>2]))|(d=(0|f)==(0|t)&(0|p)==(0|e))))do{d=(0|(p=0|r[(f=u=n+((h=(h+1|0)%(0|o)|0)<<3)|0)>>2]))==(0|t)&(0|(f=0|r[f+4>>2]))==(0|e)}while(!(0==(0|p)&0==(0|f)|d));h=s+(h<<2)|0,d&&(0|r[h>>2])<=(0|a)||(r[(f=u)>>2]=t,r[f+4>>2]=e,r[h>>2]=a,(0|a)>=(0|i)||(f=a+1|0,r[l>>2]=0,T(p=0|R(t,e,2,l),0|x(),i,n,s,o,f),r[l>>2]=0,T(p=0|R(t,e,3,l),0|x(),i,n,s,o,f),r[l>>2]=0,T(p=0|R(t,e,1,l),0|x(),i,n,s,o,f),r[l>>2]=0,T(p=0|R(t,e,5,l),0|x(),i,n,s,o,f),r[l>>2]=0,T(p=0|R(t,e,4,l),0|x(),i,n,s,o,f),r[l>>2]=0,T(p=0|R(t,e,6,l),0|x(),i,n,s,o,f))),P=c}}function R(t,e,i,n){t|=0,e|=0,i|=0;var s,o,a=0,l=0,c=0,h=0,u=0,d=0,p=0;if((0|r[(n|=0)>>2])>0){a=0;do{i=0|lt(i),a=a+1|0}while((0|a)<(0|r[n>>2]))}s=0|xe(0|t,0|e,45),x(),o=127&s,l=0|Vt(t,e),a=0|xe(0|t,0|e,52),x(),a&=15;t:do{if(a)for(;;){if(d=0|xe(0|t,0|e,0|(u=3*(15-a|0)|0)),x(),d&=7,p=0==(0|Nt(a)),a=a+-1|0,h=0|Ce(7,0,0|u),e&=~(0|x()),t=(u=0|Ce(0|r[(p?464:48)+(28*d|0)+(i<<2)>>2],0,0|u))|t&~h,e|=0|x(),!(i=0|r[(p?672:256)+(28*d|0)+(i<<2)>>2])){i=0;break t}if(!a){c=6;break}}else c=6}while(0);6==(0|c)&&(t|=d=0|Ce(0|(p=0|r[880+(28*o|0)+(i<<2)>>2]),0,45),e=0|x()|-1040385&e,i=0|r[4304+(28*o|0)+(i<<2)>>2],127==(127&p|0)&&(p=0|Ce(0|r[880+(28*o|0)+20>>2],0,45),e=0|x()|-1040385&e,i=0|r[4304+(28*o|0)+20>>2],t=0|Lt(p|t,e),e=0|x(),r[n>>2]=1+(0|r[n>>2]))),c=0|xe(0|t,0|e,45),x(),c&=127;t:do{if(0|F(c)){e:do{if(1==(0|Vt(t,e))){if((0|o)!=(0|c)){if(0|N(c,0|r[7728+(28*o|0)>>2])){t=0|Bt(t,e),l=1,e=0|x();break}t=0|Lt(t,e),l=1,e=0|x();break}switch(0|l){case 5:t=0|Bt(t,e),e=0|x(),r[n>>2]=5+(0|r[n>>2]),l=0;break e;case 3:t=0|Lt(t,e),e=0|x(),r[n>>2]=1+(0|r[n>>2]),l=0;break e;default:return p=0,w(0|(d=0)),0|p}}else l=0}while(0);if((0|i)>0){a=0;do{t=0|Ft(t,e),e=0|x(),a=a+1|0}while((0|a)!=(0|i))}if((0|o)!=(0|c)){if(!(0|L(c))){if(0!=(0|l)|5!=(0|Vt(t,e)))break;r[n>>2]=1+(0|r[n>>2]);break}switch(127&s){case 8:case 118:break t}3!=(0|Vt(t,e))&&(r[n>>2]=1+(0|r[n>>2]))}}else if((0|i)>0){a=0;do{t=0|Lt(t,e),e=0|x(),a=a+1|0}while((0|a)!=(0|i))}}while(0);return r[n>>2]=((0|r[n>>2])+i|0)%6|0,p=t,w(0|(d=e)),0|p}function V(t,e,i,n,o,a){i|=0,n|=0,o|=0,a|=0;var l,c,h,u,d,p,f,m,g,A=0,b=0,v=0,_=0,y=0,w=0,C=0,S=0,k=0,E=0,D=0,I=0,O=0,M=0;if(g=P,P=P+48|0,(0|(A=0|r[(t|=0)>>2]))<=0)return P=g,0;l=t+4|0,c=8+(p=g+32|0)|0,h=8+(f=g+16|0)|0,u=(m=g)+8|0,d=((0|(e|=0))<0)<<31>>31,D=0;t:for(;;){r[p>>2]=r[(k=(b=0|r[l>>2])+(D<<4)|0)>>2],r[p+4>>2]=r[k+4>>2],r[p+8>>2]=r[k+8>>2],r[p+12>>2]=r[k+12>>2],(0|D)==(A+-1|0)?(r[f>>2]=r[b>>2],r[f+4>>2]=r[b+4>>2],r[f+8>>2]=r[b+8>>2],r[f+12>>2]=r[b+12>>2]):(r[f>>2]=r[(k=b+(D+1<<4)|0)>>2],r[f+4>>2]=r[k+4>>2],r[f+8>>2]=r[k+8>>2],r[f+12>>2]=r[k+12>>2]),k=0|G(p,f,i);e:do{if((0|k)>0){E=+(0|k),S=0;i:for(;;){s[m>>3]=+s[p>>3]*(M=+(k-S|0))/E+ +s[f>>3]*(O=+(0|S))/E,s[u>>3]=+s[c>>3]*M/E+ +s[h>>3]*O/E,b=0|we(0|(w=0|jt(m,i)),0|(C=0|x()),0|e,0|d),x(),_=0|r[(v=A=a+(b<<3)|0)>>2],v=0|r[v+4>>2];n:do{if(0==(0|_)&0==(0|v))I=14;else for(y=0;;){if((0|y)>(0|e)){A=1;break n}if((0|_)==(0|w)&(0|v)==(0|C)){A=7;break n}if(0==(0|(_=0|r[(v=A=a+((b=(b+1|0)%(0|e)|0)<<3)|0)>>2]))&0==(0|(v=0|r[v+4>>2]))){I=14;break}y=y+1|0}}while(0);switch(14==(0|I)&&(I=0,0==(0|w)&0==(0|C)?A=7:(r[A>>2]=w,r[A+4>>2]=C,r[(y=o+((A=0|r[n>>2])<<3)|0)>>2]=w,r[y+4>>2]=C,r[n>>2]=A+1,A=0)),7&A){case 7:case 0:break;default:break i}if((0|k)<=(0|(S=S+1|0))){I=8;break e}}if(0|A){A=-1,I=20;break t}}else I=8}while(0);if(8==(0|I)&&(I=0),(0|(D=D+1|0))>=(0|(A=0|r[t>>2]))){A=0,I=20;break}}return 20==(0|I)?(P=g,0|A):0}function F(t){return 0|r[7728+(28*(t|=0)|0)+16>>2]}function L(t){return 4==(0|(t|=0))|117==(0|t)|0}function U(t){return 0|r[11152+(216*(0|r[(t|=0)>>2])|0)+(72*(0|r[t+4>>2])|0)+(24*(0|r[t+8>>2])|0)+(r[t+12>>2]<<3)>>2]}function B(t){return 0|r[11152+(216*(0|r[(t|=0)>>2])|0)+(72*(0|r[t+4>>2])|0)+(24*(0|r[t+8>>2])|0)+(r[t+12>>2]<<3)+4>>2]}function N(t,e){return(0|r[7728+(28*(t|=0)|0)+20>>2])==(0|(e|=0))?0|(e=1):0|(e=(0|r[7728+(28*t|0)+24>>2])==(0|e))}function j(t,e){return 0|r[880+(28*(t|=0)|0)+((e|=0)<<2)>>2]}function z(t,e){return(0|r[880+(28*(t|=0)|0)>>2])==(0|(e|=0))?0|(e=0):(0|r[880+(28*t|0)+4>>2])==(0|e)?0|(e=1):(0|r[880+(28*t|0)+8>>2])==(0|e)?0|(e=2):(0|r[880+(28*t|0)+12>>2])==(0|e)?0|(e=3):(0|r[880+(28*t|0)+16>>2])==(0|e)?0|(e=4):(0|r[880+(28*t|0)+20>>2])==(0|e)?0|(e=5):0|((0|r[880+(28*t|0)+24>>2])==(0|e)?6:7)}function H(t){return+s[16+(t|=0)>>3]<+s[t+24>>3]|0}function K(t,e){var i,n,r=0;return(r=+s[(e|=0)>>3])>=+s[8+(t|=0)>>3]&&r<=+s[t>>3]?(e=(n=+s[e+8>>3])>=(r=+s[t+24>>3]),t=n<=(i=+s[t+16>>3])&1,i<r?e&&(t=1):e||(t=0),0|(e=0!=(0|t))):0|(e=0)}function $(t,e){t|=0,e|=0;var i,n,o,a,c,h,u=0,d=0;a=P,P=P+288|0,i=a+264|0,n=a+96|0,d=(u=o=a)+96|0;do{r[u>>2]=0,u=u+4|0}while((0|u)<(0|d));return Gt(e,o),Kt(d=0|r[(u=o)>>2],u=0|r[u+4>>2],i),$t(d,u,n),c=+Dt(i,n+8|0),s[i>>3]=+s[t>>3],s[(u=i+8|0)>>3]=+s[t+16>>3],s[n>>3]=+s[t+8>>3],s[(d=n+8|0)>>3]=+s[t+24>>3],h=+Dt(i,n),d=~~+b(+h*h/+Se(+ +l(+(+s[u>>3]-+s[d>>3])/(+s[i>>3]-+s[n>>3])),3)/(c*(2.59807621135*c)*.8)),P=a,0|(0==(0|d)?1:d)}function G(t,e,i){t|=0,e|=0,i|=0;var n,s,o,a,l,c=0,h=0;a=P,P=P+288|0,n=a+264|0,s=a+96|0,h=(c=o=a)+96|0;do{r[c>>2]=0,c=c+4|0}while((0|c)<(0|h));return Gt(i,o),Kt(c=0|r[(h=o)>>2],h=0|r[h+4>>2],n),$t(c,h,s),l=+Dt(n,s+8|0),h=~~+b(+ +Dt(t,e)/(2*l)),P=a,0|(0==(0|h)?1:h)}function W(t,e,i,n){i|=0,n|=0,r[(t|=0)>>2]=e|=0,r[t+4>>2]=i,r[t+8>>2]=n}function Z(t,e){t|=0;var i,n,o,a,c=0,h=0,u=0,d=0,p=0,f=0,m=0;r[(a=8+(e|=0)|0)>>2]=0,d=+l(+(n=+s[t>>3])),d+=.5*(p=+l(+(o=+s[t+8>>3]))/.8660254037844386),d-=+(0|(c=~~d)),p-=+(0|(t=~~p));do{if(d<.5){if(d<.3333333333333333){if(r[e>>2]=c,p<.5*(d+1)){r[e+4>>2]=t;break}r[e+4>>2]=t=t+1|0;break}if(r[e+4>>2]=t=(1&!(p<(m=1-d)))+t|0,m<=p&p<2*d){r[e>>2]=c=c+1|0;break}r[e>>2]=c;break}if(!(d<.6666666666666666)){if(r[e>>2]=c=c+1|0,p<.5*d){r[e+4>>2]=t;break}r[e+4>>2]=t=t+1|0;break}if(p<1-d){if(r[e+4>>2]=t,2*d-1<p){r[e>>2]=c;break}}else r[e+4>>2]=t=t+1|0;r[e>>2]=c=c+1|0}while(0);do{if(n<0){if(1&t){c=~~(+(0|c)-(2*(+((f=0|_e(0|c,((0|c)<0)<<31>>31|0,0|(f=(t+1|0)/2|0),((0|f)<0)<<31>>31|0))>>>0)+4294967296*+(0|x()))+1)),r[e>>2]=c;break}c=~~(+(0|c)-2*(+((f=0|_e(0|c,((0|c)<0)<<31>>31|0,0|(f=(0|t)/2|0),((0|f)<0)<<31>>31|0))>>>0)+4294967296*+(0|x()))),r[e>>2]=c;break}}while(0);f=e+4|0,o<0&&(r[e>>2]=c=c-((1|t<<1)/2|0)|0,r[f>>2]=t=0-t|0),h=t-c|0,(0|c)<0?(u=0-c|0,r[f>>2]=h,r[a>>2]=u,r[e>>2]=0,t=h,c=0):u=0,(0|t)<0&&(r[e>>2]=c=c-t|0,r[a>>2]=u=u-t|0,r[f>>2]=0,t=0),i=c-u|0,h=t-u|0,(0|u)<0&&(r[e>>2]=i,r[f>>2]=h,r[a>>2]=0,t=h,c=i,u=0),(0|(h=(0|u)<(0|(h=(0|t)<(0|c)?t:c))?u:h))<=0||(r[e>>2]=c-h,r[f>>2]=t-h,r[a>>2]=u-h)}function q(t){var e,i=0,n=0,s=0,o=0,a=0;n=0|r[(e=4+(t|=0)|0)>>2],(0|(i=0|r[t>>2]))<0&&(r[e>>2]=n=n-i|0,r[(a=t+8|0)>>2]=(0|r[a>>2])-i,r[t>>2]=0,i=0),(0|n)<0?(r[t>>2]=i=i-n|0,r[(a=t+8|0)>>2]=o=(0|r[a>>2])-n|0,r[e>>2]=0,n=0):(a=o=t+8|0,o=0|r[o>>2]),(0|o)<0&&(r[t>>2]=i=i-o|0,r[e>>2]=n=n-o|0,r[a>>2]=0,o=0),(0|(s=(0|o)<(0|(s=(0|n)<(0|i)?n:i))?o:s))<=0||(r[t>>2]=i-s,r[e>>2]=n-s,r[a>>2]=o-s)}function Y(t,e){var i,n;s[(e|=0)>>3]=+((0|r[(t|=0)>>2])-(n=0|r[t+8>>2])|0)-.5*(i=+((0|r[t+4>>2])-n|0)),s[e+8>>3]=.8660254037844386*i}function Q(t,e,i){r[(i|=0)>>2]=(0|r[(e|=0)>>2])+(0|r[(t|=0)>>2]),r[i+4>>2]=(0|r[e+4>>2])+(0|r[t+4>>2]),r[i+8>>2]=(0|r[e+8>>2])+(0|r[t+8>>2])}function X(t,e,i){r[(i|=0)>>2]=(0|r[(t|=0)>>2])-(0|r[(e|=0)>>2]),r[i+4>>2]=(0|r[t+4>>2])-(0|r[e+4>>2]),r[i+8>>2]=(0|r[t+8>>2])-(0|r[e+8>>2])}function J(t,e){var i,n=0;n=0|v(0|r[(t|=0)>>2],e|=0),r[t>>2]=n,i=0|v(0|r[(n=t+4|0)>>2],e),r[n>>2]=i,e=0|v(0|r[(t=t+8|0)>>2],e),r[t>>2]=e}function tt(t){var e,i,n,s=0,o=0,a=0,l=0;t=(t=(o=(0|(l=(0|r[8+(t|=0)>>2])-((n=(0|(i=0|r[t>>2]))<0)?i:0)+((e=(0|(a=(0|r[t+4>>2])-(n?i:0)|0))<0)?0-a|0:0)|0))<0)?0:l)-((a=(0|(o=(0|t)<(0|(o=(0|(s=(e?0:a)-(o?l:0)|0))<(0|(l=(n?0:i)-(e?a:0)-(o?l:0)|0))?s:l))?t:o))>0)?o:0)|0,s=s-(a?o:0)|0;t:do{switch(l-(a?o:0)|0){case 0:switch(0|s){case 0:return 0|(0==(0|t)?0:1==(0|t)?1:7);case 1:return 0|(0==(0|t)?2:1==(0|t)?3:7);default:break t}case 1:switch(0|s){case 0:return 0|(0==(0|t)?4:1==(0|t)?5:7);case 1:if(t)break t;return 6;default:break t}}}while(0);return 7}function et(t){var e,i,n=0,s=0,o=0,a=0,l=0;o=0|ge(+((3*(n=(0|r[(t|=0)>>2])-(s=0|r[(e=t+8|0)>>2])|0)|0)-(s=(0|r[(i=t+4|0)>>2])-s|0)|0)/7),r[t>>2]=o,n=0|ge(+((s<<1)+n|0)/7),r[i>>2]=n,r[e>>2]=0,s=n-o|0,(0|o)<0?(l=0-o|0,r[i>>2]=s,r[e>>2]=l,r[t>>2]=0,n=s,o=0,s=l):s=0,(0|n)<0&&(r[t>>2]=o=o-n|0,r[e>>2]=s=s-n|0,r[i>>2]=0,n=0),l=o-s|0,a=n-s|0,(0|s)<0?(r[t>>2]=l,r[i>>2]=a,r[e>>2]=0,n=a,a=l,s=0):a=o,(0|(o=(0|s)<(0|(o=(0|n)<(0|a)?n:a))?s:o))<=0||(r[t>>2]=a-o,r[i>>2]=n-o,r[e>>2]=s-o)}function it(t){var e,i,n=0,s=0,o=0,a=0,l=0;o=0|ge(+(((n=(0|r[(t|=0)>>2])-(s=0|r[(e=t+8|0)>>2])|0)<<1)+(s=(0|r[(i=t+4|0)>>2])-s|0)|0)/7),r[t>>2]=o,n=0|ge(+((3*s|0)-n|0)/7),r[i>>2]=n,r[e>>2]=0,s=n-o|0,(0|o)<0?(l=0-o|0,r[i>>2]=s,r[e>>2]=l,r[t>>2]=0,n=s,o=0,s=l):s=0,(0|n)<0&&(r[t>>2]=o=o-n|0,r[e>>2]=s=s-n|0,r[i>>2]=0,n=0),l=o-s|0,a=n-s|0,(0|s)<0?(r[t>>2]=l,r[i>>2]=a,r[e>>2]=0,n=a,a=l,s=0):a=o,(0|(o=(0|s)<(0|(o=(0|n)<(0|a)?n:a))?s:o))<=0||(r[t>>2]=a-o,r[i>>2]=n-o,r[e>>2]=s-o)}function nt(t){var e,i,n,s=0,o=0,a=0,l=0;a=0|r[(n=8+(t|=0)|0)>>2],r[t>>2]=l=(o=0|r[(i=t+4|0)>>2])+(3*(s=0|r[t>>2])|0)|0,r[i>>2]=o=a+(3*o|0)|0,r[n>>2]=s=(3*a|0)+s|0,a=o-l|0,(0|l)<0?(s=s-l|0,r[i>>2]=a,r[n>>2]=s,r[t>>2]=0,o=a,a=0):a=l,(0|o)<0&&(r[t>>2]=a=a-o|0,r[n>>2]=s=s-o|0,r[i>>2]=0,o=0),e=a-s|0,l=o-s|0,(0|s)<0?(r[t>>2]=e,r[i>>2]=l,r[n>>2]=0,a=e,s=0):l=o,(0|(o=(0|s)<(0|(o=(0|l)<(0|a)?l:a))?s:o))<=0||(r[t>>2]=a-o,r[i>>2]=l-o,r[n>>2]=s-o)}function rt(t){var e,i,n,s=0,o=0,a=0,l=0;a=(3*(s=0|r[(i=4+(t|=0)|0)>>2])|0)+(l=0|r[t>>2])|0,r[t>>2]=l=(o=0|r[(n=t+8|0)>>2])+(3*l|0)|0,r[i>>2]=a,r[n>>2]=s=(3*o|0)+s|0,o=a-l|0,(0|l)<0?(s=s-l|0,r[i>>2]=o,r[n>>2]=s,r[t>>2]=0,l=0):o=a,(0|o)<0&&(r[t>>2]=l=l-o|0,r[n>>2]=s=s-o|0,r[i>>2]=0,o=0),e=l-s|0,a=o-s|0,(0|s)<0?(r[t>>2]=e,r[i>>2]=a,r[n>>2]=0,l=e,s=0):a=o,(0|(o=(0|s)<(0|(o=(0|a)<(0|l)?a:l))?s:o))<=0||(r[t>>2]=l-o,r[i>>2]=a-o,r[n>>2]=s-o)}function st(t,e){t|=0;var i,n,s,o=0,a=0,l=0;((e|=0)-1|0)>>>0>=6||(r[t>>2]=l=(0|r[15472+(12*e|0)>>2])+(0|r[t>>2])|0,r[(s=t+4|0)>>2]=a=(0|r[15472+(12*e|0)+4>>2])+(0|r[s>>2])|0,r[(n=t+8|0)>>2]=e=(0|r[15472+(12*e|0)+8>>2])+(0|r[n>>2])|0,o=a-l|0,(0|l)<0?(e=e-l|0,r[s>>2]=o,r[n>>2]=e,r[t>>2]=0,a=0):(o=a,a=l),(0|o)<0&&(r[t>>2]=a=a-o|0,r[n>>2]=e=e-o|0,r[s>>2]=0,o=0),i=a-e|0,l=o-e|0,(0|e)<0?(r[t>>2]=i,r[s>>2]=l,r[n>>2]=0,a=i,e=0):l=o,(0|(o=(0|e)<(0|(o=(0|l)<(0|a)?l:a))?e:o))<=0||(r[t>>2]=a-o,r[s>>2]=l-o,r[n>>2]=e-o))}function ot(t){var e,i,n,s=0,o=0,a=0,l=0;a=(s=0|r[(i=4+(t|=0)|0)>>2])+(l=0|r[t>>2])|0,r[t>>2]=l=(o=0|r[(n=t+8|0)>>2])+l|0,r[i>>2]=a,r[n>>2]=s=o+s|0,o=a-l|0,(0|l)<0?(s=s-l|0,r[i>>2]=o,r[n>>2]=s,r[t>>2]=0,a=0):(o=a,a=l),(0|o)<0&&(r[t>>2]=a=a-o|0,r[n>>2]=s=s-o|0,r[i>>2]=0,o=0),e=a-s|0,l=o-s|0,(0|s)<0?(r[t>>2]=e,r[i>>2]=l,r[n>>2]=0,a=e,s=0):l=o,(0|(o=(0|s)<(0|(o=(0|l)<(0|a)?l:a))?s:o))<=0||(r[t>>2]=a-o,r[i>>2]=l-o,r[n>>2]=s-o)}function at(t){var e,i,n,s=0,o=0,a=0,l=0;o=0|r[(n=8+(t|=0)|0)>>2],r[t>>2]=l=(a=0|r[(i=t+4|0)>>2])+(s=0|r[t>>2])|0,r[i>>2]=a=o+a|0,r[n>>2]=s=o+s|0,o=a-l|0,(0|l)<0?(s=s-l|0,r[i>>2]=o,r[n>>2]=s,r[t>>2]=0,a=0):(o=a,a=l),(0|o)<0&&(r[t>>2]=a=a-o|0,r[n>>2]=s=s-o|0,r[i>>2]=0,o=0),e=a-s|0,l=o-s|0,(0|s)<0?(r[t>>2]=e,r[i>>2]=l,r[n>>2]=0,a=e,s=0):l=o,(0|(o=(0|s)<(0|(o=(0|l)<(0|a)?l:a))?s:o))<=0||(r[t>>2]=a-o,r[i>>2]=l-o,r[n>>2]=s-o)}function lt(t){switch(0|(t|=0)){case 1:t=5;break;case 5:t=4;break;case 4:t=6;break;case 6:t=2;break;case 2:t=3;break;case 3:t=1}return 0|t}function ct(t){switch(0|(t|=0)){case 1:t=3;break;case 3:t=2;break;case 2:t=6;break;case 6:t=4;break;case 4:t=5;break;case 5:t=1}return 0|t}function ht(t){var e,i,n,s=0,o=0,a=0,l=0;a=0|r[(n=8+(t|=0)|0)>>2],r[t>>2]=l=(o=0|r[(i=t+4|0)>>2])+((s=0|r[t>>2])<<1)|0,r[i>>2]=o=a+(o<<1)|0,r[n>>2]=s=(a<<1)+s|0,a=o-l|0,(0|l)<0?(s=s-l|0,r[i>>2]=a,r[n>>2]=s,r[t>>2]=0,o=a,a=0):a=l,(0|o)<0&&(r[t>>2]=a=a-o|0,r[n>>2]=s=s-o|0,r[i>>2]=0,o=0),e=a-s|0,l=o-s|0,(0|s)<0?(r[t>>2]=e,r[i>>2]=l,r[n>>2]=0,a=e,s=0):l=o,(0|(o=(0|s)<(0|(o=(0|l)<(0|a)?l:a))?s:o))<=0||(r[t>>2]=a-o,r[i>>2]=l-o,r[n>>2]=s-o)}function ut(t){var e,i,n,s=0,o=0,a=0,l=0;a=((s=0|r[(i=4+(t|=0)|0)>>2])<<1)+(l=0|r[t>>2])|0,r[t>>2]=l=(o=0|r[(n=t+8|0)>>2])+(l<<1)|0,r[i>>2]=a,r[n>>2]=s=(o<<1)+s|0,o=a-l|0,(0|l)<0?(s=s-l|0,r[i>>2]=o,r[n>>2]=s,r[t>>2]=0,l=0):o=a,(0|o)<0&&(r[t>>2]=l=l-o|0,r[n>>2]=s=s-o|0,r[i>>2]=0,o=0),e=l-s|0,a=o-s|0,(0|s)<0?(r[t>>2]=e,r[i>>2]=a,r[n>>2]=0,l=e,s=0):a=o,(0|(o=(0|s)<(0|(o=(0|a)<(0|l)?a:l))?s:o))<=0||(r[t>>2]=l-o,r[i>>2]=a-o,r[n>>2]=s-o)}function dt(t,e){var i,n,s,o=0,a=0,l=0;return e=(e=(t=(0|(l=((s=(0|(n=(0|r[(t|=0)>>2])-(0|r[(e|=0)>>2])|0))<0)?0-n|0:0)+(0|r[t+8>>2])-(0|r[e+8>>2])+((i=(0|(a=(0|r[t+4>>2])-(0|r[e+4>>2])-(s?n:0)|0))<0)?0-a|0:0)|0))<0)?0:l)-((a=(0|(t=(0|e)<(0|(t=(0|(o=(i?0:a)-(t?l:0)|0))<(0|(l=(s?0:n)-(i?a:0)-(t?l:0)|0))?o:l))?e:t))>0)?t:0)|0,o=o-(a?t:0)|0,0|((0|(t=(0|(t=l-(a?t:0)|0))>-1?t:0-t|0))>(0|(e=(0|(o=(0|o)>-1?o:0-o|0))>(0|(e=(0|e)>-1?e:0-e|0))?o:e))?t:e)}function pt(t,e){var i;r[(e|=0)>>2]=(0|r[(t|=0)>>2])-(i=0|r[t+8>>2]),r[e+4>>2]=(0|r[t+4>>2])-i}function ft(t,e){var i,n,s,o=0,a=0,l=0;r[(e|=0)>>2]=a=0|r[(t|=0)>>2],r[(n=e+4|0)>>2]=t=0|r[t+4>>2],r[(s=e+8|0)>>2]=0,o=t-a|0,(0|a)<0?(t=0-a|0,r[n>>2]=o,r[s>>2]=t,r[e>>2]=0,a=0):(o=t,t=0),(0|o)<0&&(r[e>>2]=a=a-o|0,r[s>>2]=t=t-o|0,r[n>>2]=0,o=0),i=a-t|0,l=o-t|0,(0|t)<0?(r[e>>2]=i,r[n>>2]=l,r[s>>2]=0,o=l,l=i,t=0):l=a,(0|(a=(0|t)<(0|(a=(0|o)<(0|l)?o:l))?t:a))<=0||(r[e>>2]=l-a,r[n>>2]=o-a,r[s>>2]=t-a)}function mt(t){var e,i,n,s;r[(t|=0)>>2]=i=(s=0|r[(e=t+8|0)>>2])-(0|r[t>>2])|0,r[(n=t+4|0)>>2]=t=(0|r[n>>2])-s|0,r[e>>2]=0-(t+i)}function gt(t){var e,i,n=0,s=0,o=0,a=0,l=0;r[(t|=0)>>2]=n=0-(s=0|r[t>>2])|0,r[(e=t+8|0)>>2]=0,a=(o=0|r[(i=t+4|0)>>2])+s|0,(0|s)>0?(r[i>>2]=a,r[e>>2]=s,r[t>>2]=0,n=0,o=a):s=0,(0|o)<0?(r[t>>2]=l=n-o|0,r[e>>2]=s=s-o|0,r[i>>2]=0,a=l-s|0,n=0-s|0,(0|s)<0?(r[t>>2]=a,r[i>>2]=n,r[e>>2]=0,o=n,s=0):(o=0,a=l)):a=n,(0|(n=(0|s)<(0|(n=(0|o)<(0|a)?o:a))?s:n))<=0||(r[t>>2]=a-n,r[i>>2]=o-n,r[e>>2]=s-n)}function At(t,e,i,n){e|=0,i|=0,n|=0;var o,a=0,l=0,c=0,h=0;if(o=P,P=P+32|0,function(t,e){e|=0;var i,n,r=0;i=+u(+(r=+s[(t|=0)>>3])),r=+d(+r),s[e+16>>3]=r,n=i*+u(+(r=+s[t+8>>3])),s[e>>3]=n,r=i*+d(+r),s[e+8>>3]=r}(t|=0,l=o),r[i>>2]=0,a=+le(15888,l),(c=+le(15912,l))<a&&(r[i>>2]=1,a=c),(c=+le(15936,l))<a&&(r[i>>2]=2,a=c),(c=+le(15960,l))<a&&(r[i>>2]=3,a=c),(c=+le(15984,l))<a&&(r[i>>2]=4,a=c),(c=+le(16008,l))<a&&(r[i>>2]=5,a=c),(c=+le(16032,l))<a&&(r[i>>2]=6,a=c),(c=+le(16056,l))<a&&(r[i>>2]=7,a=c),(c=+le(16080,l))<a&&(r[i>>2]=8,a=c),(c=+le(16104,l))<a&&(r[i>>2]=9,a=c),(c=+le(16128,l))<a&&(r[i>>2]=10,a=c),(c=+le(16152,l))<a&&(r[i>>2]=11,a=c),(c=+le(16176,l))<a&&(r[i>>2]=12,a=c),(c=+le(16200,l))<a&&(r[i>>2]=13,a=c),(c=+le(16224,l))<a&&(r[i>>2]=14,a=c),(c=+le(16248,l))<a&&(r[i>>2]=15,a=c),(c=+le(16272,l))<a&&(r[i>>2]=16,a=c),(c=+le(16296,l))<a&&(r[i>>2]=17,a=c),(c=+le(16320,l))<a&&(r[i>>2]=18,a=c),(c=+le(16344,l))<a&&(r[i>>2]=19,a=c),(c=+f(+(1-.5*a)))<1e-16)return r[n>>2]=0,r[n+4>>2]=0,r[n+8>>2]=0,r[n+12>>2]=0,void(P=o);if(a=+kt((a=+s[16368+(24*(i=0|r[i>>2])|0)>>3])-+kt(+function(t,e){var i,n,r,o,a;return t|=0,a=(n=+u(+(o=+s[(e|=0)>>3])))*+d(+(r=+s[e+8>>3]-+s[t+8>>3])),i=+s[t>>3],+ +A(+a,+(+d(+o)*+u(+i)-+u(+r)*(n*+d(+i))))}(15568+(i<<4)|0,t))),h=0|Nt(e)?+kt(a+-.3334731722518321):a,a=+p(+c)/.381966011250105,(0|e)>0){l=0;do{a*=2.6457513110645907,l=l+1|0}while((0|l)!=(0|e))}c=+u(+h)*a,s[n>>3]=c,h=+d(+h)*a,s[n+8>>3]=h,P=o}function bt(t,e,i,n,o){e|=0,i|=0,n|=0,o|=0;var a=0,h=0;if((a=+function(t){var e,i;return+ +c(+((i=+s[(t|=0)>>3])*i+(e=+s[t+8>>3])*e))}(t|=0))<1e-16)return r[o>>2]=r[(e=15568+(e<<4)|0)>>2],r[o+4>>2]=r[e+4>>2],r[o+8>>2]=r[e+8>>2],void(r[o+12>>2]=r[e+12>>2]);if(h=+A(+ +s[t+8>>3],+ +s[t>>3]),(0|i)>0){t=0;do{a/=2.6457513110645907,t=t+1|0}while((0|t)!=(0|i))}n?(a/=3,i=0==(0|Nt(i)),a=+g(.381966011250105*(i?a:a/2.6457513110645907))):(a=+g(.381966011250105*a),0|Nt(i)&&(h=+kt(h+.3334731722518321))),function(t,e,i,n){t|=0,e=+e,n|=0;var o=0,a=0,c=0,h=0;if((i=+i)<1e-16)return r[n>>2]=r[t>>2],r[n+4>>2]=r[t+4>>2],r[n+8>>2]=r[t+8>>2],void(r[n+12>>2]=r[t+12>>2]);a=e<0?e+6.283185307179586:e,a=e>=6.283185307179586?a+-6.283185307179586:a;do{if(!(a<1e-16)){if(o=+l(+(a+-3.141592653589793))<1e-16,e=+s[t>>3],o){s[n>>3]=e-=i,o=n;break}if(c=+u(+i),i=+d(+i),e=c*+d(+e)+ +u(+a)*(i*+u(+e)),e=+m(+((e=e>1?1:e)<-1?-1:e)),s[n>>3]=e,+l(+(e+-1.5707963267948966))<1e-16)return s[n>>3]=1.5707963267948966,void(s[n+8>>3]=0);if(+l(+(e+1.5707963267948966))<1e-16)return s[n>>3]=-1.5707963267948966,void(s[n+8>>3]=0);if(h=+u(+e),a=i*+d(+a)/h,i=+s[t>>3],e=(c-+d(+e)*+d(+i))/+u(+i)/h,(e=+s[t+8>>3]+ +A(+((c=a>1?1:a)<-1?-1:c),+((e=e>1?1:e)<-1?-1:e)))>3.141592653589793)do{e+=-6.283185307179586}while(e>3.141592653589793);if(e<-3.141592653589793)do{e+=6.283185307179586}while(e<-3.141592653589793);return void(s[n+8>>3]=e)}s[n>>3]=e=+s[t>>3]+i,o=n}while(0);if(+l(+(e+-1.5707963267948966))<1e-16)return s[o>>3]=1.5707963267948966,void(s[n+8>>3]=0);if(+l(+(e+1.5707963267948966))<1e-16)return s[o>>3]=-1.5707963267948966,void(s[n+8>>3]=0);if((e=+s[t+8>>3])>3.141592653589793)do{e+=-6.283185307179586}while(e>3.141592653589793);if(e<-3.141592653589793)do{e+=6.283185307179586}while(e<-3.141592653589793);s[n+8>>3]=e}(15568+(e<<4)|0,+kt(+s[16368+(24*e|0)>>3]-h),a,o)}function vt(t,e,i){var n,s;e|=0,i|=0,n=P,P=P+16|0,Y(4+(t|=0)|0,s=n),bt(s,0|r[t>>2],e,0,i),P=n}function _t(t,e,i,n,o){t|=0,i|=0,n|=0,o|=0;var a,l,c,h,u,d,p,f,m,g,A,b,v,_,y,w,x,S,k,E,D,I,O=0,M=0,T=0,R=0,V=0,F=0;if(I=P,P=P+272|0,R=I+240|0,k=I,E=I+224|0,D=I+208|0,A=I+176|0,b=I+160|0,v=I+192|0,_=I+144|0,y=I+128|0,w=I+112|0,x=I+96|0,S=I+80|0,r[(O=I+256|0)>>2]=e|=0,r[R>>2]=r[t>>2],r[R+4>>2]=r[t+4>>2],r[R+8>>2]=r[t+8>>2],r[R+12>>2]=r[t+12>>2],yt(R,O,k),r[o>>2]=0,(0|(R=n+i+(5==(0|n)&1)|0))<=(0|i))P=I;else{l=E+4|0,c=A+4|0,h=i+5|0,u=16848+((a=0|r[O>>2])<<2)|0,d=16928+(a<<2)|0,p=y+8|0,f=w+8|0,m=x+8|0,g=D+4|0,T=i;t:for(;;){r[D>>2]=r[(M=k+(((0|T)%5|0)<<4)|0)>>2],r[D+4>>2]=r[M+4>>2],r[D+8>>2]=r[M+8>>2],r[D+12>>2]=r[M+12>>2];do{}while(2==(0|wt(D,a,0,1)));if((0|T)>(0|i)&0!=(0|Nt(e))){if(r[A>>2]=r[D>>2],r[A+4>>2]=r[D+4>>2],r[A+8>>2]=r[D+8>>2],r[A+12>>2]=r[D+12>>2],Y(l,b),r[A>>2]=r[18608+(80*(n=0|r[A>>2])|0)+(20*(O=0|r[17008+(80*n|0)+(r[E>>2]<<2)>>2])|0)>>2],(0|(M=0|r[18608+(80*n|0)+(20*O|0)+16>>2]))>0){t=0;do{ot(c),t=t+1|0}while((0|t)<(0|M))}switch(r[v>>2]=r[(M=18608+(80*n|0)+(20*O|0)+4|0)>>2],r[v+4>>2]=r[M+4>>2],r[v+8>>2]=r[M+8>>2],J(v,3*(0|r[u>>2])|0),Q(c,v,c),q(c),Y(c,_),s[y>>3]=3*(V=+(0|r[d>>2])),s[p>>3]=0,s[w>>3]=F=-1.5*V,s[f>>3]=2.598076211353316*V,s[x>>3]=F,s[m>>3]=-2.598076211353316*V,0|r[17008+(80*(0|r[A>>2])|0)+(r[D>>2]<<2)>>2]){case 1:t=w,n=y;break;case 3:t=x,n=w;break;case 2:t=y,n=x;break;default:t=12;break t}oe(b,_,n,t,S),bt(S,0|r[A>>2],a,1,o+8+(r[o>>2]<<4)|0),r[o>>2]=1+(0|r[o>>2])}if((0|T)<(0|h)&&(Y(g,A),bt(A,0|r[D>>2],a,1,o+8+(r[o>>2]<<4)|0),r[o>>2]=1+(0|r[o>>2])),r[E>>2]=r[D>>2],r[E+4>>2]=r[D+4>>2],r[E+8>>2]=r[D+8>>2],r[E+12>>2]=r[D+12>>2],(0|(T=T+1|0))>=(0|R)){t=3;break}}3!=(0|t)?12==(0|t)&&C(22474,22521,581,22531):P=I}}function yt(t,e,i){t|=0,e|=0,i|=0;var n,s=0,o=0,a=0,l=0,c=0;n=P,P=P+128|0,o=n,l=20208,c=60+(a=s=n+64|0)|0;do{r[a>>2]=r[l>>2],a=a+4|0,l=l+4|0}while((0|a)<(0|c));l=20272,c=(a=o)+60|0;do{r[a>>2]=r[l>>2],a=a+4|0,l=l+4|0}while((0|a)<(0|c));s=(c=0==(0|Nt(0|r[e>>2])))?s:o,ht(o=t+4|0),ut(o),0|Nt(0|r[e>>2])&&(rt(o),r[e>>2]=1+(0|r[e>>2])),r[i>>2]=r[t>>2],Q(o,s,e=i+4|0),q(e),r[i+16>>2]=r[t>>2],Q(o,s+12|0,e=i+20|0),q(e),r[i+32>>2]=r[t>>2],Q(o,s+24|0,e=i+36|0),q(e),r[i+48>>2]=r[t>>2],Q(o,s+36|0,e=i+52|0),q(e),r[i+64>>2]=r[t>>2],Q(o,s+48|0,i=i+68|0),q(i),P=n}function wt(t,e,i,n){i|=0;var s,o,a,l,c,h,u,d=0,p=0,f=0,m=0;if(h=P,P=P+32|0,c=h+12|0,o=h,m=0|r[16928+((e|=0)<<2)>>2],m=(l=0!=(0|(n|=0)))?3*m|0:m,d=0|r[(u=4+(t|=0)|0)>>2],s=0|r[(a=t+8|0)>>2],l){if((0|(d=s+d+(n=0|r[(p=t+12|0)>>2])|0))==(0|m))return P=h,1;f=p}else d=s+d+(n=0|r[(f=t+12|0)>>2])|0;if((0|d)<=(0|m))return P=h,0;do{if((0|n)>0){if(n=0|r[t>>2],(0|s)>0){p=18608+(80*n|0)+60|0,n=t;break}n=18608+(80*n|0)+40|0,i?(W(c,m,0,0),X(u,c,o),at(o),Q(o,c,u),p=n,n=t):(p=n,n=t)}else p=18608+(80*(0|r[t>>2])|0)+20|0,n=t}while(0);if(r[n>>2]=r[p>>2],(0|r[(d=p+16|0)>>2])>0){n=0;do{ot(u),n=n+1|0}while((0|n)<(0|r[d>>2]))}return r[c>>2]=r[(t=p+4|0)>>2],r[c+4>>2]=r[t+4>>2],r[c+8>>2]=r[t+8>>2],e=0|r[16848+(e<<2)>>2],J(c,l?3*e|0:e),Q(u,c,u),q(u),P=h,0|(l&&((0|r[a>>2])+(0|r[u>>2])+(0|r[f>>2])|0)==(0|m)?1:2)}function xt(t,e){t|=0,e|=0;var i=0;do{i=0|wt(t,e,0,1)}while(2==(0|i));return 0|i}function Ct(t,e,i,n,o){t|=0,i|=0,n|=0,o|=0;var a,l,c,h,u,d,p,f,m,g,A,b,v,_,y,w,x,S,k=0,E=0,D=0,I=0,O=0;if(S=P,P=P+240|0,_=S+208|0,y=S,w=S+192|0,x=S+176|0,m=S+160|0,g=S+144|0,A=S+128|0,b=S+112|0,v=S+96|0,r[(k=S+224|0)>>2]=e|=0,r[_>>2]=r[t>>2],r[_+4>>2]=r[t+4>>2],r[_+8>>2]=r[t+8>>2],r[_+12>>2]=r[t+12>>2],St(_,k,y),r[o>>2]=0,(0|(f=n+i+(6==(0|n)&1)|0))<=(0|i))P=S;else{l=i+6|0,c=16928+((a=0|r[k>>2])<<2)|0,h=g+8|0,u=A+8|0,d=b+8|0,p=w+4|0,E=0,D=i,n=-1;t:for(;;){if(r[w>>2]=r[(t=y+((k=(0|D)%6|0)<<4)|0)>>2],r[w+4>>2]=r[t+4>>2],r[w+8>>2]=r[t+8>>2],r[w+12>>2]=r[t+12>>2],t=E,E=0|wt(w,a,0,1),(0|D)>(0|i)&0!=(0|Nt(e))&&1!=(0|t)&&(0|r[w>>2])!=(0|n)){switch(Y(y+(((k+5|0)%6|0)<<4)+4|0,x),Y(y+(k<<4)+4|0,m),s[g>>3]=3*(I=+(0|r[c>>2])),s[h>>3]=0,s[A>>3]=O=-1.5*I,s[u>>3]=2.598076211353316*I,s[b>>3]=O,s[d>>3]=-2.598076211353316*I,0|r[17008+(80*(k=0|r[_>>2])|0)+(((0|n)==(0|k)?0|r[w>>2]:n)<<2)>>2]){case 1:t=A,n=g;break;case 3:t=b,n=A;break;case 2:t=g,n=b;break;default:t=8;break t}oe(x,m,n,t,v),0|ae(x,v)||0|ae(m,v)||(bt(v,0|r[_>>2],a,1,o+8+(r[o>>2]<<4)|0),r[o>>2]=1+(0|r[o>>2]))}if((0|D)<(0|l)&&(Y(p,x),bt(x,0|r[w>>2],a,1,o+8+(r[o>>2]<<4)|0),r[o>>2]=1+(0|r[o>>2])),(0|(D=D+1|0))>=(0|f)){t=3;break}n=0|r[w>>2]}3!=(0|t)?8==(0|t)&&C(22557,22521,746,22602):P=S}}function St(t,e,i){t|=0,e|=0,i|=0;var n,s=0,o=0,a=0,l=0,c=0;n=P,P=P+160|0,o=n,l=20336,c=72+(a=s=n+80|0)|0;do{r[a>>2]=r[l>>2],a=a+4|0,l=l+4|0}while((0|a)<(0|c));l=20416,c=(a=o)+72|0;do{r[a>>2]=r[l>>2],a=a+4|0,l=l+4|0}while((0|a)<(0|c));s=(c=0==(0|Nt(0|r[e>>2])))?s:o,ht(o=t+4|0),ut(o),0|Nt(0|r[e>>2])&&(rt(o),r[e>>2]=1+(0|r[e>>2])),r[i>>2]=r[t>>2],Q(o,s,e=i+4|0),q(e),r[i+16>>2]=r[t>>2],Q(o,s+12|0,e=i+20|0),q(e),r[i+32>>2]=r[t>>2],Q(o,s+24|0,e=i+36|0),q(e),r[i+48>>2]=r[t>>2],Q(o,s+36|0,e=i+52|0),q(e),r[i+64>>2]=r[t>>2],Q(o,s+48|0,e=i+68|0),q(e),r[i+80>>2]=r[t>>2],Q(o,s+60|0,i=i+84|0),q(i),P=n}function kt(t){var e;return e=(t=+t)<0?t+6.283185307179586:t,+(t>=6.283185307179586?e+-6.283185307179586:e)}function Et(t,e){return+l(+(+s[(t|=0)>>3]-+s[(e|=0)>>3]))<17453292519943298e-27?0|(e=+l(+(+s[t+8>>3]-+s[e+8>>3]))<17453292519943298e-27):0|(e=0)}function Dt(t,e){var i,n,r,o=0;return o=(r=+d(.5*((n=+s[(e|=0)>>3])-(i=+s[(t|=0)>>3]))))*r+(o=+d(.5*(+s[e+8>>3]-+s[t+8>>3])))*(+u(+n)*+u(+i)*o),2*+A(+ +c(+o),+ +c(+(1-o)))*6371.007180918475}function It(t,e,i){i|=0;var n,r,o,a,l=0,h=0,f=0,m=0,b=0,v=0;return b=+d(.5*((v=+s[(e|=0)>>3])-(o=+s[(t|=0)>>3]))),m=+d(.5*((f=+s[e+8>>3])-(r=+s[t+8>>3]))),n=+u(+o),a=+u(+v),m=2*+A(+ +c(+(m=b*b+m*(a*n*m))),+ +c(+(1-m))),v=+d(.5*((b=+s[i>>3])-v)),f=+d(.5*((l=+s[i+8>>3])-f)),h=+u(+b),f=2*+A(+ +c(+(f=v*v+f*(a*h*f))),+ +c(+(1-f))),b=+d(.5*(o-b)),l=+d(.5*(r-l)),l=2*+A(+ +c(+(l=b*b+l*(n*h*l))),+ +c(+(1-l))),4*+g(+ +c(+ +p(.5*(h=.5*(m+f+l)))*+p(.5*(h-m))*+p(.5*(h-f))*+p(.5*(h-l))))}function Pt(t,e){return e=0|xe(0|(t|=0),0|(e|=0),45),x(),127&e|0}function Ot(t,e){var i=0,n=0,r=0,s=0,o=0,a=0;if(!(!0&134217728==(-16777216&(e|=0)|0)))return 0;if(o=0|xe(0|(t|=0),0|e,45),x(),(o&=127)>>>0>121)return 0;i=0|xe(0|t,0|e,52),x(),i&=15;do{if(0|i){for(r=1,n=0;;){if(s=0|xe(0|t,0|e,3*(15-r|0)|0),x(),0!=(0|(s&=7))&(1^n)){if(1==(0|s)&0!=(0|F(o))){a=0,n=13;break}n=1}if(7==(0|s)){a=0,n=13;break}if(!(r>>>0<i>>>0)){n=9;break}r=r+1|0}if(9==(0|n)){if(15!=(0|i))break;return 1}if(13==(0|n))return 0|a}}while(0);for(;;){if(a=0|xe(0|t,0|e,3*(14-i|0)|0),x(),!(7==(7&a|0)&!0)){a=0,n=13;break}if(!(i>>>0<14)){a=1,n=13;break}i=i+1|0}return 13==(0|n)?0|a:0}function Mt(t,e,i){i|=0;var n=0,r=0;if(n=0|xe(0|(t|=0),0|(e|=0),52),x(),(0|(n&=15))>=(0|i)){if((0|n)!=(0|i))if(i>>>0<=15){if(t|=r=0|Ce(0|i,0,52),e=0|x()|-15728641&e,(0|n)>(0|i))do{r=0|Ce(7,0,3*(14-i|0)|0),i=i+1|0,t|=r,e=0|x()|e}while((0|i)<(0|n))}else e=0,t=0}else e=0,t=0;return w(0|e),0|t}function Tt(t,e,i,n){i|=0,n|=0;var s,o=0,a=0,l=0,c=0,h=0,u=0;if(l=0|xe(0|(t|=0),0|(e|=0),52),x(),(0|i)<16&(0|(l&=15))<=(0|i)){if((0|l)==(0|i))return r[(i=n)>>2]=t,void(r[i+4>>2]=e);if(s=(0|(h=0|ee(7,i-l|0)))/7|0,c=0|xe(0|t,0|e,45),x(),0|F(127&c)){t:do{if(l)for(a=1;;){if(o=0|xe(0|t,0|e,3*(15-a|0)|0),x(),0|(o&=7))break t;if(!(a>>>0<l>>>0)){o=0;break}a=a+1|0}else o=0}while(0);a=0==(0|o)}else a=0;if(u=0|Ce(l+1|0,0,52),o=0|x()|-15728641&e,Tt(e=(u|t)&~(e=0|Ce(7,0,0|(c=3*(14-l|0)|0))),l=o&~(0|x()),i,n),o=n+(s<<3)|0,!a)return Tt((u=0|Ce(1,0,0|c))|e,0|x()|l,i,o),u=o+(s<<3)|0,Tt((h=0|Ce(2,0,0|c))|e,0|x()|l,i,u),u=u+(s<<3)|0,Tt((h=0|Ce(3,0,0|c))|e,0|x()|l,i,u),u=u+(s<<3)|0,Tt((h=0|Ce(4,0,0|c))|e,0|x()|l,i,u),u=u+(s<<3)|0,Tt((h=0|Ce(5,0,0|c))|e,0|x()|l,i,u),void Tt((h=0|Ce(6,0,0|c))|e,0|x()|l,i,u+(s<<3)|0);a=o+(s<<3)|0,(0|h)>6&&(De(0|o,0,8+(u=(a>>>0>(h=o+8|0)>>>0?a:h)+-1+(0-o)|0)&-8|0),o=h+(u>>>3<<3)|0),Tt((u=0|Ce(2,0,0|c))|e,0|x()|l,i,o),u=o+(s<<3)|0,Tt((h=0|Ce(3,0,0|c))|e,0|x()|l,i,u),u=u+(s<<3)|0,Tt((h=0|Ce(4,0,0|c))|e,0|x()|l,i,u),u=u+(s<<3)|0,Tt((h=0|Ce(5,0,0|c))|e,0|x()|l,i,u),Tt((h=0|Ce(6,0,0|c))|e,0|x()|l,i,u+(s<<3)|0)}}function Rt(t,e){var i=0,n=0,r=0;if(r=0|xe(0|(t|=0),0|(e|=0),45),x(),!(0|F(127&r)))return 0;r=0|xe(0|t,0|e,52),x(),r&=15;t:do{if(r)for(n=1;;){if(i=0|xe(0|t,0|e,3*(15-n|0)|0),x(),0|(i&=7))break t;if(!(n>>>0<r>>>0)){i=0;break}n=n+1|0}else i=0}while(0);return 0|0==(0|i)&1}function Vt(t,e){var i=0,n=0,r=0;if(r=0|xe(0|(t|=0),0|(e|=0),52),x(),!(r&=15))return 0;for(n=1;;){if(i=0|xe(0|t,0|e,3*(15-n|0)|0),x(),0|(i&=7)){n=5;break}if(!(n>>>0<r>>>0)){i=0,n=5;break}n=n+1|0}return 5==(0|n)?0|i:0}function Ft(t,e){var i=0,n=0,r=0,s=0,o=0,a=0,l=0;if(l=0|xe(0|(t|=0),0|(e|=0),52),x(),!(l&=15))return l=t,w(0|(a=e)),0|l;for(a=1,i=0;;){n=0|Ce(7,0,0|(s=3*(15-a|0)|0)),r=0|x(),o=0|xe(0|t,0|e,0|s),x(),t=(s=0|Ce(0|lt(7&o),0,0|s))|t&~n,e=(o=0|x())|e&~r;t:do{if(!i)if(0==(s&n|0)&0==(o&r|0))i=0;else if(n=0|xe(0|t,0|e,52),x(),n&=15){i=1;e:for(;;){switch(o=0|xe(0|t,0|e,3*(15-i|0)|0),x(),7&o){case 1:break e;case 0:break;default:i=1;break t}if(!(i>>>0<n>>>0)){i=1;break t}i=i+1|0}for(i=1;;){if(r=0|xe(0|t,0|e,0|(o=3*(15-i|0)|0)),x(),s=0|Ce(7,0,0|o),e&=~(0|x()),t=t&~s|(o=0|Ce(0|lt(7&r),0,0|o)),e=0|e|x(),!(i>>>0<n>>>0)){i=1;break}i=i+1|0}}else i=1}while(0);if(!(a>>>0<l>>>0))break;a=a+1|0}return w(0|e),0|t}function Lt(t,e){var i=0,n=0,r=0,s=0,o=0;if(n=0|xe(0|(t|=0),0|(e|=0),52),x(),!(n&=15))return n=t,w(0|(i=e)),0|n;for(i=1;o=0|xe(0|t,0|e,0|(s=3*(15-i|0)|0)),x(),r=0|Ce(7,0,0|s),e&=~(0|x()),t=(s=0|Ce(0|lt(7&o),0,0|s))|t&~r,e=0|x()|e,i>>>0<n>>>0;)i=i+1|0;return w(0|e),0|t}function Ut(t,e){var i=0,n=0,r=0,s=0,o=0,a=0,l=0;if(l=0|xe(0|(t|=0),0|(e|=0),52),x(),!(l&=15))return l=t,w(0|(a=e)),0|l;for(a=1,i=0;;){n=0|Ce(7,0,0|(s=3*(15-a|0)|0)),r=0|x(),o=0|xe(0|t,0|e,0|s),x(),t=(s=0|Ce(0|ct(7&o),0,0|s))|t&~n,e=(o=0|x())|e&~r;t:do{if(!i)if(0==(s&n|0)&0==(o&r|0))i=0;else if(n=0|xe(0|t,0|e,52),x(),n&=15){i=1;e:for(;;){switch(o=0|xe(0|t,0|e,3*(15-i|0)|0),x(),7&o){case 1:break e;case 0:break;default:i=1;break t}if(!(i>>>0<n>>>0)){i=1;break t}i=i+1|0}for(i=1;;){if(s=0|Ce(7,0,0|(r=3*(15-i|0)|0)),o=e&~(0|x()),e=0|xe(0|t,0|e,0|r),x(),t=t&~s|(e=0|Ce(0|ct(7&e),0,0|r)),e=0|o|x(),!(i>>>0<n>>>0)){i=1;break}i=i+1|0}}else i=1}while(0);if(!(a>>>0<l>>>0))break;a=a+1|0}return w(0|e),0|t}function Bt(t,e){var i=0,n=0,r=0,s=0,o=0;if(n=0|xe(0|(t|=0),0|(e|=0),52),x(),!(n&=15))return n=t,w(0|(i=e)),0|n;for(i=1;s=0|Ce(7,0,0|(o=3*(15-i|0)|0)),r=e&~(0|x()),e=0|xe(0|t,0|e,0|o),x(),t=(e=0|Ce(0|ct(7&e),0,0|o))|t&~s,e=0|x()|r,i>>>0<n>>>0;)i=i+1|0;return w(0|e),0|t}function Nt(t){return 0|(0|(t|=0))%2}function jt(t,e){var i,n;return t|=0,n=P,P=P+16|0,i=n,(e|=0)>>>0<=15&&2146435072!=(2146435072&r[t+4>>2]|0)&&2146435072!=(2146435072&r[t+8+4>>2]|0)?(function(t,e,i){var n,r;n=P,P=P+16|0,At(t|=0,e|=0,i|=0,r=n),Z(r,i+4|0),P=n}(t,e,i),e=0|function(t,e){t|=0;var i,n=0,s=0,o=0,a=0,l=0,c=0,h=0,u=0;if(i=P,P=P+64|0,c=i+40|0,s=i+24|0,o=i+12|0,a=i,Ce(0|(e|=0),0,52),n=134225919|x(),!e)return(0|r[t+4>>2])>2||(0|r[t+8>>2])>2||(0|r[t+12>>2])>2?(c=0,w(0|(l=0)),P=i,0|c):(Ce(0|U(t),0,45),l=0|x()|n,c=-1,w(0|l),P=i,0|c);if(r[c>>2]=r[t>>2],r[c+4>>2]=r[t+4>>2],r[c+8>>2]=r[t+8>>2],r[c+12>>2]=r[t+12>>2],l=c+4|0,(0|e)>0)for(t=-1;r[s>>2]=r[l>>2],r[s+4>>2]=r[l+4>>2],r[s+8>>2]=r[l+8>>2],1&e?(et(l),r[o>>2]=r[l>>2],r[o+4>>2]=r[l+4>>2],r[o+8>>2]=r[l+8>>2],nt(o)):(it(l),r[o>>2]=r[l>>2],r[o+4>>2]=r[l+4>>2],r[o+8>>2]=r[l+8>>2],rt(o)),X(s,o,a),q(a),h=0|Ce(7,0,0|(u=3*(15-e|0)|0)),n&=~(0|x()),t=(u=0|Ce(0|tt(a),0,0|u))|t&~h,n=0|x()|n,(0|e)>1;)e=e+-1|0;else t=-1;t:do{if((0|r[l>>2])<=2&&(0|r[c+8>>2])<=2&&(0|r[c+12>>2])<=2){if(e=0|Ce(0|(s=0|U(c)),0,45),e|=t,t=0|x()|-1040385&n,a=0|B(c),!(0|F(s))){if((0|a)<=0)break;for(o=0;;){if(s=0|xe(0|e,0|t,52),x(),s&=15)for(n=1;c=0|xe(0|e,0|t,0|(u=3*(15-n|0)|0)),x(),h=0|Ce(7,0,0|u),t&=~(0|x()),e=e&~h|(u=0|Ce(0|lt(7&c),0,0|u)),t=0|t|x(),n>>>0<s>>>0;)n=n+1|0;if((0|(o=o+1|0))==(0|a))break t}}o=0|xe(0|e,0|t,52),x(),o&=15;e:do{if(o){n=1;i:for(;;){switch(u=0|xe(0|e,0|t,3*(15-n|0)|0),x(),7&u){case 1:break i;case 0:break;default:break e}if(!(n>>>0<o>>>0))break e;n=n+1|0}if(0|N(s,0|r[c>>2]))for(n=1;h=0|Ce(7,0,0|(c=3*(15-n|0)|0)),u=t&~(0|x()),t=0|xe(0|e,0|t,0|c),x(),e=e&~h|(t=0|Ce(0|ct(7&t),0,0|c)),t=0|u|x(),n>>>0<o>>>0;)n=n+1|0;else for(n=1;c=0|xe(0|e,0|t,0|(u=3*(15-n|0)|0)),x(),h=0|Ce(7,0,0|u),t&=~(0|x()),e=e&~h|(u=0|Ce(0|lt(7&c),0,0|u)),t=0|t|x(),n>>>0<o>>>0;)n=n+1|0}}while(0);if((0|a)>0){n=0;do{e=0|Ft(e,t),t=0|x(),n=n+1|0}while((0|n)!=(0|a))}}else e=0,t=0}while(0);return u=e,w(0|(h=t)),P=i,0|u}(i,e),t=0|x()):(t=0,e=0),w(0|t),P=n,0|e}function zt(t,e,i){var n,s=0,o=0,a=0;if(n=4+(i|=0)|0,o=0|xe(0|(t|=0),0|(e|=0),52),x(),o&=15,a=0|xe(0|t,0|e,45),x(),s=0==(0|o),0|F(127&a)){if(s)return 1;s=1}else{if(s)return 0;s=0==(0|r[n>>2])&&0==(0|r[i+8>>2])?0!=(0|r[i+12>>2])&1:1}for(i=1;1&i?nt(n):rt(n),a=0|xe(0|t,0|e,3*(15-i|0)|0),x(),st(n,7&a),i>>>0<o>>>0;)i=i+1|0;return 0|s}function Ht(t,e,i){i|=0;var n,s,o=0,a=0,l=0,c=0,h=0,u=0;s=P,P=P+16|0,n=s,u=0|xe(0|(t|=0),0|(e|=0),45),x(),u&=127;t:do{if(0!=(0|F(u))&&(l=0|xe(0|t,0|e,52),x(),0!=(0|(l&=15)))){o=1;e:for(;;){switch(h=0|xe(0|t,0|e,3*(15-o|0)|0),x(),7&h){case 5:break e;case 0:break;default:o=e;break t}if(!(o>>>0<l>>>0)){o=e;break t}o=o+1|0}for(a=1,o=e;c=0|Ce(7,0,0|(e=3*(15-a|0)|0)),h=o&~(0|x()),o=0|xe(0|t,0|o,0|e),x(),t=t&~c|(o=0|Ce(0|ct(7&o),0,0|e)),o=0|h|x(),a>>>0<l>>>0;)a=a+1|0}else o=e}while(0);if(r[i>>2]=r[(h=7728+(28*u|0)|0)>>2],r[i+4>>2]=r[h+4>>2],r[i+8>>2]=r[h+8>>2],r[i+12>>2]=r[h+12>>2],0|zt(t,o,i)){if(r[n>>2]=r[(c=i+4|0)>>2],r[n+4>>2]=r[c+4>>2],r[n+8>>2]=r[c+8>>2],l=0|xe(0|t,0|o,52),x(),h=15&l,1&l?(rt(c),l=h+1|0):l=h,0|F(u)){t:do{if(h)for(e=1;;){if(a=0|xe(0|t,0|o,3*(15-e|0)|0),x(),0|(a&=7)){o=a;break t}if(!(e>>>0<h>>>0)){o=0;break}e=e+1|0}else o=0}while(0);o=4==(0|o)&1}else o=0;if(0|wt(i,l,o,0)){if(0|F(u))do{}while(0!=(0|wt(i,l,0,0)));(0|l)!=(0|h)&&it(c)}else(0|l)!=(0|h)&&(r[c>>2]=r[n>>2],r[c+4>>2]=r[n+4>>2],r[c+8>>2]=r[n+8>>2]);P=s}else P=s}function Kt(t,e,i){var n,r;i|=0,n=P,P=P+16|0,Ht(t|=0,e|=0,r=n),e=0|xe(0|t,0|e,52),x(),vt(r,15&e,i),P=n}function $t(t,e,i){i|=0;var n,r,s=0,o=0;r=P,P=P+16|0,Ht(t|=0,e|=0,n=r),s=0|xe(0|t,0|e,45),x(),s=0==(0|F(127&s)),o=0|xe(0|t,0|e,52),x(),o&=15;t:do{if(!s){if(0|o)for(s=1;;){if(!(0==((0|Ce(7,0,3*(15-s|0)|0))&t|0)&0==((0|x())&e|0)))break t;if(!(s>>>0<o>>>0))break;s=s+1|0}return _t(n,o,0,5,i),void(P=r)}}while(0);Ct(n,o,0,6,i),P=r}function Gt(t,e){e|=0;var i,n=0,s=0,o=0,a=0,l=0,c=0;if(Ce(0|(t|=0),0,52),i=134225919|x(),(0|t)<1){s=0,n=0;do{0|F(s)&&(Ce(0|s,0,45),l=0|i|x(),r[(t=e+(n<<3)|0)>>2]=-1,r[t+4>>2]=l,n=n+1|0),s=s+1|0}while(122!=(0|s))}else{l=0,n=0;do{if(0|F(l)){for(Ce(0|l,0,45),s=1,o=-1,a=0|i|x();o&=~(c=0|Ce(7,0,3*(15-s|0)|0)),a&=~(0|x()),(0|s)!=(0|t);)s=s+1|0;r[(c=e+(n<<3)|0)>>2]=o,r[c+4>>2]=a,n=n+1|0}l=l+1|0}while(122!=(0|l))}}function Wt(t,e,i,n){var s,o,a=0,l=0,c=0,h=0;if(s=P,P=P+64|0,o=s,(0|(t|=0))==(0|(i|=0))&(0|(e|=0))==(0|(n|=0))|!1|134217728!=(2013265920&e|0)|!1|134217728!=(2013265920&n|0))return P=s,0;if(a=0|xe(0|t,0|e,52),x(),a&=15,l=0|xe(0|i,0|n,52),x(),(0|a)!=(15&l|0))return P=s,0;if(l=a+-1|0,a>>>0>1&&(h=0|Mt(t,e,l),c=0|x(),(0|h)==(0|(l=0|Mt(i,n,l)))&(0|c)==(0|x()))){if(a=0|xe(0|t,0|e,0|(l=3*(15^a)|0)),x(),a&=7,l=0|xe(0|i,0|n,0|l),x(),0==(0|a)|0==(0|(l&=7)))return P=s,1;if((0|r[21136+(a<<2)>>2])==(0|l))return P=s,1;if((0|r[21168+(a<<2)>>2])==(0|l))return P=s,1}l=(a=o)+56|0;do{r[a>>2]=0,a=a+4|0}while((0|a)<(0|l));return O(t,e,1,o),a=(0|r[(h=o)>>2])==(0|i)&&(0|r[h+4>>2])==(0|n)||(0|r[(h=o+8|0)>>2])==(0|i)&&(0|r[h+4>>2])==(0|n)||(0|r[(h=o+16|0)>>2])==(0|i)&&(0|r[h+4>>2])==(0|n)||(0|r[(h=o+24|0)>>2])==(0|i)&&(0|r[h+4>>2])==(0|n)||(0|r[(h=o+32|0)>>2])==(0|i)&&(0|r[h+4>>2])==(0|n)||(0|r[(h=o+40|0)>>2])==(0|i)&&(0|r[h+4>>2])==(0|n)?1:1&((0|r[(a=o+48|0)>>2])==(0|i)?(0|r[a+4>>2])==(0|n):0),P=s,0|a}function Zt(t,e,i){i|=0;var n,s,o,a,l=0;if(o=P,P=P+16|0,s=o,l=0|xe(0|(t|=0),0|(e|=0),56),x(),-1==(0|(e=0|function(t,e,i){i|=0;var n,s=0;return s=0|Rt(t|=0,e|=0),(i+-1|0)>>>0>5||1==(0|i)&(n=0!=(0|s))?-1:(s=0|function(t,e){var i,n,s,o,a=0,l=0,c=0,h=0;if(s=P,P=P+32|0,n=s,Ht(t|=0,e|=0,i=s+16|0),c=0|Pt(t,e),o=0|Vt(t,e),function(t,e){r[(e|=0)>>2]=r[(t=7728+(28*(t|=0)|0)|0)>>2],r[e+4>>2]=r[t+4>>2],r[e+8>>2]=r[t+8>>2],r[e+12>>2]=r[t+12>>2]}(c,n),e=0|function(t,e){t|=0;var i=0,n=0;if((e|=0)>>>0>20)return-1;do{if((0|r[11152+(216*e|0)>>2])!=(0|t))if((0|r[11152+(216*e|0)+8>>2])!=(0|t))if((0|r[11152+(216*e|0)+16>>2])!=(0|t))if((0|r[11152+(216*e|0)+24>>2])!=(0|t))if((0|r[11152+(216*e|0)+32>>2])!=(0|t))if((0|r[11152+(216*e|0)+40>>2])!=(0|t))if((0|r[11152+(216*e|0)+48>>2])!=(0|t))if((0|r[11152+(216*e|0)+56>>2])!=(0|t))if((0|r[11152+(216*e|0)+64>>2])!=(0|t))if((0|r[11152+(216*e|0)+72>>2])!=(0|t))if((0|r[11152+(216*e|0)+80>>2])!=(0|t))if((0|r[11152+(216*e|0)+88>>2])!=(0|t))if((0|r[11152+(216*e|0)+96>>2])!=(0|t))if((0|r[11152+(216*e|0)+104>>2])!=(0|t))if((0|r[11152+(216*e|0)+112>>2])!=(0|t))if((0|r[11152+(216*e|0)+120>>2])!=(0|t))if((0|r[11152+(216*e|0)+128>>2])!=(0|t)){if((0|r[11152+(216*e|0)+136>>2])!=(0|t)){if((0|r[11152+(216*e|0)+144>>2])==(0|t)){t=0,i=2,n=0;break}if((0|r[11152+(216*e|0)+152>>2])==(0|t)){t=0,i=2,n=1;break}if((0|r[11152+(216*e|0)+160>>2])==(0|t)){t=0,i=2,n=2;break}if((0|r[11152+(216*e|0)+168>>2])==(0|t)){t=1,i=2,n=0;break}if((0|r[11152+(216*e|0)+176>>2])==(0|t)){t=1,i=2,n=1;break}if((0|r[11152+(216*e|0)+184>>2])==(0|t)){t=1,i=2,n=2;break}if((0|r[11152+(216*e|0)+192>>2])==(0|t)){t=2,i=2,n=0;break}if((0|r[11152+(216*e|0)+200>>2])==(0|t)){t=2,i=2,n=1;break}if((0|r[11152+(216*e|0)+208>>2])==(0|t)){t=2,i=2,n=2;break}return-1}t=2,i=1,n=2}else t=2,i=1,n=1;else t=2,i=1,n=0;else t=1,i=1,n=2;else t=1,i=1,n=1;else t=1,i=1,n=0;else t=0,i=1,n=2;else t=0,i=1,n=1;else t=0,i=1,n=0;else t=2,i=0,n=2;else t=2,i=0,n=1;else t=2,i=0,n=0;else t=1,i=0,n=2;else t=1,i=0,n=1;else t=1,i=0,n=0;else t=0,i=0,n=2;else t=0,i=0,n=1;else t=0,i=0,n=0}while(0);return 0|r[11152+(216*e|0)+(72*i|0)+(24*t|0)+(n<<3)+4>>2]}(c,0|r[i>>2]),!(0|F(c)))return P=s,0|e;switch(0|c){case 4:t=0,a=14;break;case 14:t=1,a=14;break;case 24:t=2,a=14;break;case 38:t=3,a=14;break;case 49:t=4,a=14;break;case 58:t=5,a=14;break;case 63:t=6,a=14;break;case 72:t=7,a=14;break;case 83:t=8,a=14;break;case 97:t=9,a=14;break;case 107:t=10,a=14;break;case 117:t=11,a=14;break;default:h=0,l=0}return 14==(0|a)&&(h=0|r[22096+(24*t|0)+8>>2],l=0|r[22096+(24*t|0)+16>>2]),(0|(t=0|r[i>>2]))!=(0|r[n>>2])&&(c=0|L(c))|(0|(t=0|r[i>>2]))==(0|l)&&(e=(e+1|0)%6|0),3==(0|o)&(0|t)==(0|l)?(P=s,0|(e+5|0)%6):5==(0|o)&(0|t)==(0|h)?(P=s,0|(e+1|0)%6):(P=s,0|e)}(t,e),n?0|(i=(5-s+(0|r[22384+(i<<2)>>2])|0)%5|0):0|(i=(6-s+(0|r[22416+(i<<2)>>2])|0)%6|0))}(n=(a=!0&268435456==(2013265920&e|0))?t:0,t=a?-2130706433&e|134217728:0,7&l))))return r[i>>2]=0,void(P=o);Ht(n,t,s),l=0|xe(0|n,0|t,52),x(),l&=15,0|Rt(n,t)?_t(s,l,e,2,i):Ct(s,l,e,2,i),P=o}function qt(t){t|=0;var e,i,n=0;return(e=0|ve(1,12))||C(22691,22646,49,22704),0|(n=0|r[(i=t+4|0)>>2])?(r[(n=n+8|0)>>2]=e,r[i>>2]=e,0|e):(0|r[t>>2]&&C(22721,22646,61,22744),r[(n=t)>>2]=e,r[i>>2]=e,0|e)}function Yt(t,e){var i,n;return t|=0,e|=0,(n=0|Ae(24))||C(22758,22646,78,22772),r[n>>2]=r[e>>2],r[n+4>>2]=r[e+4>>2],r[n+8>>2]=r[e+8>>2],r[n+12>>2]=r[e+12>>2],r[n+16>>2]=0,0|(i=0|r[(e=t+4|0)>>2])?(r[i+16>>2]=n,r[e>>2]=n,0|n):(0|r[t>>2]&&C(22787,22646,82,22772),r[t>>2]=n,r[e>>2]=n,0|n)}function Qt(t){var e,i,n=0,o=0,a=0,c=0,h=0,u=0,d=0,p=0,f=0,m=0,g=0,A=0,b=0,v=0,_=0,y=0,w=0,x=0,S=0,k=0,E=0,D=0,I=0,P=0,O=0,M=0,T=0,R=0,V=0,F=0;if(0|r[(c=8+(t|=0)|0)>>2])return 1;if(!(a=0|r[t>>2]))return 0;n=a,o=0;do{o=o+1|0,n=0|r[n+8>>2]}while(0!=(0|n));if(o>>>0<2)return 0;(i=0|Ae(o<<2))||C(22807,22646,317,22826),(e=0|Ae(o<<5))||C(22848,22646,321,22826),r[t>>2]=0,r[(D=t+4|0)>>2]=0,r[c>>2]=0,o=0,R=0,E=0,g=0;t:for(;;){if(m=0|r[a>>2]){h=0,u=m;do{if(n=u,+l(+((p=+s[u+8>>3])-(d=+s[(c=(f=0==(0|(u=0|r[u+16>>2])))?m:u)+8>>3])))>3.141592653589793){F=14;break}h+=(d-p)*(+s[n>>3]+ +s[c>>3])}while(!f);if(14==(0|F)){F=0,h=0,n=m;do{h+=(+s[n>>3]+ +s[(M=0==(0|(M=0|r[(T=n+16|0)>>2]))?m:M)>>3])*(((S=+s[M+8>>3])<0?S+6.283185307179586:S)-((k=+s[n+8>>3])<0?k+6.283185307179586:k)),n=0|r[(0==(0|n)?a:T)>>2]}while(0!=(0|n))}h>0?(r[i+(R<<2)>>2]=a,R=R+1|0,c=E,n=g):F=19}else F=19;if(19==(0|F)){F=0;do{if(!o){if(g){c=D,u=g+8|0,n=a,o=t;break}if(0|r[t>>2]){F=27;break t}c=D,u=t,n=a,o=t;break}if(0|r[(n=o+8|0)>>2]){F=21;break t}if(!(o=0|ve(1,12))){F=23;break t}r[n>>2]=o,c=o+4|0,u=o,n=g}while(0);if(r[u>>2]=a,r[c>>2]=a,u=e+(E<<5)|0,f=0|r[a>>2]){for(s[(m=e+(E<<5)+8|0)>>3]=17976931348623157e292,s[(g=e+(E<<5)+24|0)>>3]=17976931348623157e292,s[u>>3]=-17976931348623157e292,s[(A=e+(E<<5)+16|0)>>3]=-17976931348623157e292,w=17976931348623157e292,x=-17976931348623157e292,c=0,b=f,p=17976931348623157e292,_=17976931348623157e292,y=-17976931348623157e292,d=-17976931348623157e292;h=+s[b>>3],k=+s[b+8>>3],S=+s[((v=0==(0|(b=0|r[b+16>>2])))?f:b)+8>>3],h<p&&(s[m>>3]=h,p=h),k<_&&(s[g>>3]=k,_=k),h>y?s[u>>3]=h:h=y,k>d&&(s[A>>3]=k,d=k),w=k>0&k<w?k:w,x=k<0&k>x?k:x,c|=+l(+(k-S))>3.141592653589793,!v;)y=h;c&&(s[A>>3]=x,s[g>>3]=w)}else r[u>>2]=0,r[u+4>>2]=0,r[u+8>>2]=0,r[u+12>>2]=0,r[u+16>>2]=0,r[u+20>>2]=0,r[u+24>>2]=0,r[u+28>>2]=0;c=E+1|0}if(a=0|r[(T=a+8|0)>>2],r[T>>2]=0,!a){F=45;break}E=c,g=n}if(21==(0|F))C(22624,22646,35,22658);else if(23==(0|F))C(22678,22646,37,22658);else if(27==(0|F))C(22721,22646,61,22744);else if(45==(0|F)){t:do{if((0|R)>0){for(T=0==(0|c),O=c<<2,M=0==(0|t),P=0,n=0;;){if(I=0|r[i+(P<<2)>>2],T)F=73;else{if(!(E=0|Ae(O))){F=50;break}if(!(D=0|Ae(O))){F=52;break}e:do{if(M)o=0;else{for(c=0,o=0,u=t;0|Xt(0|r[u>>2],a=e+(c<<5)|0,0|r[I>>2])?(r[E+(o<<2)>>2]=u,r[D+(o<<2)>>2]=a,v=o+1|0):v=o,u=0|r[u+8>>2];)c=c+1|0,o=v;if((0|v)>0)if(a=0|r[E>>2],1==(0|v))o=a;else for(A=0,b=-1,o=a,g=a;;){for(f=0|r[g>>2],a=0,u=0;m=(0|(c=0|r[r[E+(u<<2)>>2]>>2]))==(0|f)?a:a+(1&(0|Xt(c,0|r[D+(u<<2)>>2],0|r[f>>2])))|0,(0|(u=u+1|0))!=(0|v);)a=m;if(o=(c=(0|m)>(0|b))?g:o,(0|(a=A+1|0))==(0|v))break e;A=a,b=c?m:b,g=0|r[E+(a<<2)>>2]}else o=0}}while(0);if(be(E),be(D),o){if(a=0|r[(c=o+4|0)>>2])o=a+8|0;else if(0|r[o>>2]){F=70;break}r[o>>2]=I,r[c>>2]=I}else F=73}if(73==(0|F)){if(F=0,0|(n=0|r[I>>2]))do{D=n,n=0|r[n+16>>2],be(D)}while(0!=(0|n));be(I),n=2}if((0|(P=P+1|0))>=(0|R)){V=n;break t}}50==(0|F)?C(22863,22646,249,22882):52==(0|F)?C(22901,22646,252,22882):70==(0|F)&&C(22721,22646,61,22744)}else V=0}while(0);return be(i),be(e),0|V}return 0}function Xt(t,e,i){t|=0;var n,o=0,a=0,l=0,c=0,h=0,u=0,d=0;if(!(0|K(e|=0,i|=0)))return 0;if(e=0|H(e),n=+s[i>>3],o=e&(o=+s[i+8>>3])<0?o+6.283185307179586:o,!(t=0|r[t>>2]))return 0;if(e){e=0,i=t;t:for(;;){for(;c=+s[i>>3],u=+s[i+8>>3],a=+s[(d=0==(0|(d=0|r[(i=i+16|0)>>2]))?t:d)+8>>3],c>(l=+s[d>>3])?(h=c,c=u):(h=l,l=c,c=a,a=u),n<l|n>h;)if(!(i=0|r[i>>2])){i=22;break t}if(o=(c=c<0?c+6.283185307179586:c)==o|(u=a<0?a+6.283185307179586:a)==o?o+-2220446049250313e-31:o,((u+=(n-l)/(h-l)*(c-u))<0?u+6.283185307179586:u)>o&&(e^=1),!(i=0|r[i>>2])){i=22;break}}if(22==(0|i))return 0|e}else{e=0,i=t;t:for(;;){for(;c=+s[i>>3],u=+s[i+8>>3],a=+s[(d=0==(0|(d=0|r[(i=i+16|0)>>2]))?t:d)+8>>3],c>(l=+s[d>>3])?(h=c,c=u):(h=l,l=c,c=a,a=u),n<l|n>h;)if(!(i=0|r[i>>2])){i=22;break t}if(a+(n-l)/(h-l)*(c-a)>(o=c==o|a==o?o+-2220446049250313e-31:o)&&(e^=1),!(i=0|r[i>>2])){i=22;break}}if(22==(0|i))return 0|e}return 0}function Jt(t,e,i,s,o){i|=0,s|=0,o|=0;var a,l,c,h,u,d=0,p=0,f=0,m=0,g=0,A=0,b=0,v=0,_=0;if(h=P,P=P+32|0,u=h+16|0,c=h,d=0|xe(0|(t|=0),0|(e|=0),52),x(),d&=15,b=0|xe(0|i,0|s,52),x(),(0|d)!=(15&b|0))return P=h,1;if(g=0|xe(0|t,0|e,45),x(),g&=127,A=0|xe(0|i,0|s,45),x(),b=(0|g)!=(0|(A&=127))){if(7==(0|(f=0|z(g,A))))return P=h,2;7==(0|(m=0|z(A,g)))?C(22925,22949,151,22959):(v=f,p=m)}else v=0,p=0;a=0|F(g),l=0|F(A),r[u>>2]=0,r[u+4>>2]=0,r[u+8>>2]=0,r[u+12>>2]=0;do{if(v){if(f=(0|(A=0|r[4304+(28*g|0)+(v<<2)>>2]))>0,l)if(f){g=0,m=i,f=s;do{m=0|Ut(m,f),f=0|x(),1==(0|(p=0|ct(p)))&&(p=0|ct(1)),g=g+1|0}while((0|g)!=(0|A));A=p,g=m,m=f}else A=p,g=i,m=s;else if(f){g=0,m=i,f=s;do{m=0|Bt(m,f),f=0|x(),p=0|ct(p),g=g+1|0}while((0|g)!=(0|A));A=p,g=m,m=f}else A=p,g=i,m=s;if(zt(g,m,u),b||C(22972,22949,181,22959),(f=0!=(0|a))&(p=0!=(0|l))&&C(22999,22949,182,22959),f){if(p=0|Vt(t,e),0|n[22032+(7*p|0)+v>>0]){d=3;break}g=m=0|r[21200+(28*p|0)+(v<<2)>>2],_=26}else if(p){if(p=0|Vt(g,m),0|n[22032+(7*p|0)+A>>0]){d=4;break}g=0,m=0|r[21200+(28*A|0)+(p<<2)>>2],_=26}else p=0;if(26==(0|_))if((0|m)<=-1&&C(23030,22949,212,22959),(0|g)<=-1&&C(23053,22949,213,22959),(0|m)>0){f=u+4|0,p=0;do{at(f),p=p+1|0}while((0|p)!=(0|m));p=g}else p=g;if(r[c>>2]=0,r[c+4>>2]=0,r[c+8>>2]=0,st(c,v),0|d)for(;0|Nt(d)?nt(c):rt(c),(0|d)>1;)d=d+-1|0;if((0|p)>0){d=0;do{at(c),d=d+1|0}while((0|d)!=(0|p))}Q(_=u+4|0,c,_),q(_),_=50}else if(zt(i,s,u),0!=(0|a)&0!=(0|l))if((0|A)!=(0|g)&&C(23077,22949,243,22959),p=0|Vt(t,e),d=0|Vt(i,s),0|n[22032+(7*p|0)+d>>0])d=5;else if((0|(p=0|r[21200+(28*p|0)+(d<<2)>>2]))>0){f=u+4|0,d=0;do{at(f),d=d+1|0}while((0|d)!=(0|p));_=50}else _=50;else _=50}while(0);return 50==(0|_)&&(r[o>>2]=r[(d=u+4|0)>>2],r[o+4>>2]=r[d+4>>2],r[o+8>>2]=r[d+8>>2],d=0),P=h,0|d}function te(t,e,i,n){i|=0,n|=0;var s,o,a=0,l=0,c=0,h=0,u=0,d=0,p=0,f=0,m=0,g=0,A=0,b=0,v=0;if(o=P,P=P+48|0,c=o+36|0,h=o+24|0,u=o+12|0,d=o,l=0|xe(0|(t|=0),0|(e|=0),52),x(),l&=15,f=0|xe(0|t,0|e,45),x(),s=0|F(f&=127),Ce(0|l,0,52),A=134225919|x(),r[(g=n)>>2]=-1,r[g+4>>2]=A,!l)return(0|r[i>>2])>1||(0|r[i+4>>2])>1||(0|r[i+8>>2])>1||127==(0|(a=0|j(f,0|tt(i))))?(P=o,0|(A=1)):(m=0|Ce(0|a,0,45),g=0|x(),g|=-1040385&r[(f=n)+4>>2],r[(A=n)>>2]=r[f>>2]|m,r[A+4>>2]=g,P=o,0|(A=0));for(r[c>>2]=r[i>>2],r[c+4>>2]=r[i+4>>2],r[c+8>>2]=r[i+8>>2];r[h>>2]=r[c>>2],r[h+4>>2]=r[c+4>>2],r[h+8>>2]=r[c+8>>2],0|Nt(l)?(et(c),r[u>>2]=r[c>>2],r[u+4>>2]=r[c+4>>2],r[u+8>>2]=r[c+8>>2],nt(u)):(it(c),r[u>>2]=r[c>>2],r[u+4>>2]=r[c+4>>2],r[u+8>>2]=r[c+8>>2],rt(u)),X(h,u,d),q(d),b=0|r[(g=n)>>2],g=0|r[g+4>>2],i=0|Ce(7,0,0|(v=3*(15-l|0)|0)),g&=~(0|x()),v=0|Ce(0|tt(d),0,0|v),g=0|x()|g,r[(A=n)>>2]=v|b&~i,r[A+4>>2]=g,(0|l)>1;)l=l+-1|0;t:do{if((0|r[c>>2])<=1&&(0|r[c+4>>2])<=1&&(0|r[c+8>>2])<=1){d=127==(0|(h=0|j(f,l=0|tt(c))))?0:0|F(h);e:do{if(l){if(s){if(c=21408+(28*(0|Vt(t,e))|0)+(l<<2)|0,(0|(c=0|r[c>>2]))>0){i=0;do{l=0|lt(l),i=i+1|0}while((0|i)!=(0|c))}if(1==(0|l)){a=3;break t}127==(0|(i=0|j(f,l)))&&C(23104,22949,376,23134),0|F(i)?C(23147,22949,377,23134):(m=c,p=l,a=i)}else m=0,p=l,a=h;if((0|(u=0|r[4304+(28*f|0)+(p<<2)>>2]))<=-1&&C(23178,22949,384,23134),!d){if((0|m)<=-1&&C(23030,22949,417,23134),0|m){l=0,i=0|r[(c=n)>>2],c=0|r[c+4>>2];do{i=0|Lt(i,c),c=0|x(),r[(v=n)>>2]=i,r[v+4>>2]=c,l=l+1|0}while((0|l)<(0|m))}if((0|u)<=0){l=54;break}for(l=0,i=0|r[(c=n)>>2],c=0|r[c+4>>2];;)if(i=0|Lt(i,c),c=0|x(),r[(v=n)>>2]=i,r[v+4>>2]=c,(0|(l=l+1|0))==(0|u)){l=54;break e}}if(7==(0|(h=0|z(a,f)))&&C(22925,22949,393,23134),i=0|r[(l=n)>>2],l=0|r[l+4>>2],(0|u)>0){c=0;do{i=0|Lt(i,l),l=0|x(),r[(v=n)>>2]=i,r[v+4>>2]=l,c=c+1|0}while((0|c)!=(0|u))}if(i=0|Vt(i,l),v=0|L(a),(0|(i=0|r[(v?21824:21616)+(28*h|0)+(i<<2)>>2]))<=-1&&C(23030,22949,412,23134),i){l=0,c=0|r[(h=n)>>2],h=0|r[h+4>>2];do{c=0|Ft(c,h),h=0|x(),r[(v=n)>>2]=c,r[v+4>>2]=h,l=l+1|0}while((0|l)<(0|i));l=54}else l=54}else if(0!=(0|s)&0!=(0|d))if(l=21408+(28*(v=0|Vt(t,e))|0)+((0|Vt(0|r[(l=n)>>2],0|r[l+4>>2]))<<2)|0,(0|(l=0|r[l>>2]))<=-1&&C(23201,22949,433,23134),l){a=0,i=0|r[(c=n)>>2],c=0|r[c+4>>2];do{i=0|Lt(i,c),c=0|x(),r[(v=n)>>2]=i,r[v+4>>2]=c,a=a+1|0}while((0|a)<(0|l));a=h,l=54}else a=h,l=55;else a=h,l=54}while(0);if(54==(0|l)&&d&&(l=55),55==(0|l)&&1==(0|Vt(0|r[(v=n)>>2],0|r[v+4>>2]))){a=4;break}A=0|r[(v=n)>>2],v=-1040385&r[v+4>>2],b=0|Ce(0|a,0,45),v=0|v|x(),r[(a=n)>>2]=A|b,r[a+4>>2]=v,a=0}else a=2}while(0);return P=o,0|a}function ee(t,e){var i=0;if(!(e|=0))return 1;i=t|=0,t=1;do{t=0|v(0==(1&e|0)?1:i,t),e>>=1,i=0|v(i,i)}while(0!=(0|e));return 0|t}function ie(t,e,i){t|=0;var n,o,a,l=0,c=0,h=0,u=0,d=0,p=0,f=0;if(!(0|K(e|=0,i|=0)))return 0;if(e=0|H(e),o=+s[i>>3],l=e&(l=+s[i+8>>3])<0?l+6.283185307179586:l,(0|(a=0|r[t>>2]))<=0)return 0;if(n=0|r[t+4>>2],e){e=0,i=-1,t=0;t:for(;;){for(f=t;p=+s[n+(f<<4)+8>>3],c=+s[n+((t=(i+2|0)%(0|a)|0)<<4)+8>>3],(u=+s[n+(f<<4)>>3])>(h=+s[n+(t<<4)>>3])?(d=u,u=p):(d=h,h=u,u=c,c=p),o<h|o>d;){if(!((0|(i=f+1|0))<(0|a))){i=22;break t}t=f,f=i,i=t}if(l=(u=u<0?u+6.283185307179586:u)==l|(p=c<0?c+6.283185307179586:c)==l?l+-2220446049250313e-31:l,((p+=(o-h)/(d-h)*(u-p))<0?p+6.283185307179586:p)>l&&(e^=1),(0|(t=f+1|0))>=(0|a)){i=22;break}i=f}if(22==(0|i))return 0|e}else{e=0,i=-1,t=0;t:for(;;){for(f=t;p=+s[n+(f<<4)+8>>3],c=+s[n+((t=(i+2|0)%(0|a)|0)<<4)+8>>3],(u=+s[n+(f<<4)>>3])>(h=+s[n+(t<<4)>>3])?(d=u,u=p):(d=h,h=u,u=c,c=p),o<h|o>d;){if(!((0|(i=f+1|0))<(0|a))){i=22;break t}t=f,f=i,i=t}if(c+(o-h)/(d-h)*(u-c)>(l=u==l|c==l?l+-2220446049250313e-31:l)&&(e^=1),(0|(t=f+1|0))>=(0|a)){i=22;break}i=f}if(22==(0|i))return 0|e}return 0}function ne(t,e){e|=0;var i,n,o,a,c,h=0,u=0,d=0,p=0,f=0,m=0,g=0,A=0,b=0,v=0,_=0,y=0;if(!(n=0|r[(t|=0)>>2]))return r[e>>2]=0,r[e+4>>2]=0,r[e+8>>2]=0,r[e+12>>2]=0,r[e+16>>2]=0,r[e+20>>2]=0,r[e+24>>2]=0,void(r[e+28>>2]=0);if(s[(o=e+8|0)>>3]=17976931348623157e292,s[(a=e+24|0)>>3]=17976931348623157e292,s[e>>3]=-17976931348623157e292,s[(c=e+16|0)>>3]=-17976931348623157e292,!((0|n)<=0)){for(i=0|r[t+4>>2],A=17976931348623157e292,b=-17976931348623157e292,v=0,t=-1,p=17976931348623157e292,f=17976931348623157e292,g=-17976931348623157e292,u=-17976931348623157e292,_=0;m=+s[i+(_<<4)+8>>3],d=+s[i+(((0|(t=t+2|0))==(0|n)?0:t)<<4)+8>>3],(h=+s[i+(_<<4)>>3])<p&&(s[o>>3]=h,p=h),m<f&&(s[a>>3]=m,f=m),h>g?s[e>>3]=h:h=g,m>u&&(s[c>>3]=m,u=m),A=m>0&m<A?m:A,b=m<0&m>b?m:b,v|=+l(+(m-d))>3.141592653589793,(0|(t=_+1|0))!=(0|n);)y=_,g=h,_=t,t=y;v&&(s[c>>3]=b,s[a>>3]=A)}}function re(t,e){e|=0;var i,n=0,o=0,a=0,c=0,h=0,u=0,d=0,p=0,f=0,m=0,g=0,A=0,b=0,v=0,_=0,y=0,w=0,x=0,C=0,S=0,k=0;if(b=0|r[(t|=0)>>2]){if(s[(v=e+8|0)>>3]=17976931348623157e292,s[(_=e+24|0)>>3]=17976931348623157e292,s[e>>3]=-17976931348623157e292,s[(y=e+16|0)>>3]=-17976931348623157e292,(0|b)>0){for(a=0|r[t+4>>2],g=17976931348623157e292,A=-17976931348623157e292,o=0,n=-1,d=17976931348623157e292,p=17976931348623157e292,m=-17976931348623157e292,h=-17976931348623157e292,w=0;f=+s[a+(w<<4)+8>>3],u=+s[a+(((0|(S=n+2|0))==(0|b)?0:S)<<4)+8>>3],(c=+s[a+(w<<4)>>3])<d&&(s[v>>3]=c,d=c),f<p&&(s[_>>3]=f,p=f),c>m?s[e>>3]=c:c=m,f>h&&(s[y>>3]=f,h=f),g=f>0&f<g?f:g,A=f<0&f>A?f:A,o|=+l(+(f-u))>3.141592653589793,(0|(n=w+1|0))!=(0|b);)S=w,m=c,w=n,n=S;o&&(s[y>>3]=A,s[_>>3]=g)}}else r[e>>2]=0,r[e+4>>2]=0,r[e+8>>2]=0,r[e+12>>2]=0,r[e+16>>2]=0,r[e+20>>2]=0,r[e+24>>2]=0,r[e+28>>2]=0;if(!((0|(n=0|r[(S=t+8|0)>>2]))<=0)){i=t+12|0,C=0;do{if(o=C,_=e+((C=C+1|0)<<5)|0,y=0|r[(a=0|r[i>>2])+(o<<3)>>2]){if(s[(w=e+(C<<5)+8|0)>>3]=17976931348623157e292,s[(t=e+(C<<5)+24|0)>>3]=17976931348623157e292,s[_>>3]=-17976931348623157e292,s[(x=e+(C<<5)+16|0)>>3]=-17976931348623157e292,(0|y)>0){for(b=0|r[a+(o<<3)+4>>2],g=17976931348623157e292,A=-17976931348623157e292,a=0,o=-1,v=0,d=17976931348623157e292,p=17976931348623157e292,f=-17976931348623157e292,h=-17976931348623157e292;m=+s[b+(v<<4)+8>>3],u=+s[b+(((0|(o=o+2|0))==(0|y)?0:o)<<4)+8>>3],(c=+s[b+(v<<4)>>3])<d&&(s[w>>3]=c,d=c),m<p&&(s[t>>3]=m,p=m),c>f?s[_>>3]=c:c=f,m>h&&(s[x>>3]=m,h=m),g=m>0&m<g?m:g,A=m<0&m>A?m:A,a|=+l(+(m-u))>3.141592653589793,(0|(o=v+1|0))!=(0|y);)k=v,v=o,f=c,o=k;a&&(s[x>>3]=A,s[t>>3]=g)}}else r[_>>2]=0,r[_+4>>2]=0,r[_+8>>2]=0,r[_+12>>2]=0,r[_+16>>2]=0,r[_+20>>2]=0,r[_+24>>2]=0,r[_+28>>2]=0,n=0|r[S>>2]}while((0|C)<(0|n))}}function se(t,e,i){var n,s=0;if(!(0|ie(t|=0,e|=0,i|=0)))return 0;if((0|r[(n=t+8|0)>>2])<=0)return 1;for(s=t+12|0,t=0;;){if(0|ie((0|r[s>>2])+(t<<3)|0,e+((t=t+1|0)<<5)|0,i)){t=0,s=6;break}if((0|t)>=(0|r[n>>2])){t=1,s=6;break}}return 6==(0|s)?0|t:0}function oe(t,e,i,n,r){var o,a,l,c,h,u,d,p=0;s[(r|=0)>>3]=(c=+s[(t|=0)>>3])+(l=+s[(e|=0)>>3]-c)*(p=((p=+s[(n|=0)>>3]-(u=+s[(i|=0)>>3]))*((a=+s[t+8>>3])-(d=+s[i+8>>3]))-(c-u)*(h=+s[n+8>>3]-d))/(l*h-(o=+s[e+8>>3]-a)*p)),s[r+8>>3]=a+o*p}function ae(t,e){return+s[(t|=0)>>3]!=+s[(e|=0)>>3]?0|(e=0):0|(e=+s[t+8>>3]==+s[e+8>>3])}function le(t,e){var i,n,r;return+((r=+s[(t|=0)>>3]-+s[(e|=0)>>3])*r+(n=+s[t+8>>3]-+s[e+8>>3])*n+(i=+s[t+16>>3]-+s[e+16>>3])*i)}function ce(t,e,i){t|=0,i|=0;var n=0;(0|(e|=0))>0?(n=0|ve(e,4),r[t>>2]=n,n||C(23230,23253,40,23267)):r[t>>2]=0,r[t+4>>2]=e,r[t+8>>2]=0,r[t+12>>2]=i}function he(t){var e,i,n,o=0,a=0,c=0,u=0;e=4+(t|=0)|0,i=t+12|0,n=t+8|0;t:for(;;){for(a=0|r[e>>2],o=0;;){if((0|o)>=(0|a))break t;if(u=0|r[(c=0|r[t>>2])+(o<<2)>>2])break;o=o+1|0}o=c+(~~(+l(+ +h(10,+ +(15-(0|r[i>>2])|0))*(+s[u>>3]+ +s[u+8>>3]))%+(0|a))>>>0<<2)|0,a=0|r[o>>2];e:do{if(0|a){if(c=u+32|0,(0|a)==(0|u))r[o>>2]=r[c>>2];else{if(!(o=0|r[(a=a+32|0)>>2]))break;for(;(0|o)!=(0|u);)if(!(o=0|r[(a=o+32|0)>>2]))break e;r[a>>2]=r[c>>2]}be(u),r[n>>2]=(0|r[n>>2])-1}}while(0)}be(0|r[t>>2])}function ue(t){var e,i=0,n=0;for(e=0|r[4+(t|=0)>>2],n=0;;){if((0|n)>=(0|e)){i=0,n=4;break}if(i=0|r[(0|r[t>>2])+(n<<2)>>2]){n=4;break}n=n+1|0}return 4==(0|n)?0|i:0}function de(t,e){e|=0;var i=0,n=0,o=0,a=0;if(i=~~(+l(+ +h(10,+ +(15-(0|r[12+(t|=0)>>2])|0))*(+s[e>>3]+ +s[e+8>>3]))%+(0|r[t+4>>2]))>>>0,!(n=0|r[(i=(0|r[t>>2])+(i<<2)|0)>>2]))return 1;a=e+32|0;do{if((0|n)!=(0|e)){if(!(i=0|r[n+32>>2]))return 1;for(o=i;;){if((0|o)==(0|e)){o=8;break}if(!(i=0|r[o+32>>2])){i=1,o=10;break}n=o,o=i}if(8==(0|o)){r[n+32>>2]=r[a>>2];break}if(10==(0|o))return 0|i}else r[i>>2]=r[a>>2]}while(0);return be(e),r[(a=t+8|0)>>2]=(0|r[a>>2])-1,0}function pe(t,e,i){t|=0,e|=0,i|=0;var n,o=0,a=0,c=0;(n=0|Ae(40))||C(23283,23253,98,23296),r[n>>2]=r[e>>2],r[n+4>>2]=r[e+4>>2],r[n+8>>2]=r[e+8>>2],r[n+12>>2]=r[e+12>>2],r[(a=n+16|0)>>2]=r[i>>2],r[a+4>>2]=r[i+4>>2],r[a+8>>2]=r[i+8>>2],r[a+12>>2]=r[i+12>>2],r[n+32>>2]=0,a=~~(+l(+ +h(10,+ +(15-(0|r[t+12>>2])|0))*(+s[e>>3]+ +s[e+8>>3]))%+(0|r[t+4>>2]))>>>0,o=0|r[(a=(0|r[t>>2])+(a<<2)|0)>>2];do{if(o){for(;!(0|Et(o,e)&&0|Et(o+16|0,i));)if(!(0|r[(o=0==(0|(a=0|r[o+32>>2]))?o:a)+32>>2])){c=10;break}if(10==(0|c)){r[o+32>>2]=n;break}return be(n),0|o}r[a>>2]=n}while(0);return r[(c=t+8|0)>>2]=1+(0|r[c>>2]),0|n}function fe(t,e,i){e|=0,i|=0;var n=0,o=0;if(o=~~(+l(+ +h(10,+ +(15-(0|r[12+(t|=0)>>2])|0))*(+s[e>>3]+ +s[e+8>>3]))%+(0|r[t+4>>2]))>>>0,!(o=0|r[(0|r[t>>2])+(o<<2)>>2]))return 0;if(!i){for(t=o;;){if(0|Et(t,e)){n=10;break}if(!(t=0|r[t+32>>2])){t=0,n=10;break}}if(10==(0|n))return 0|t}for(t=o;;){if(0|Et(t,e)&&0|Et(t+16|0,i)){n=10;break}if(!(t=0|r[t+32>>2])){t=0,n=10;break}}return 10==(0|n)?0|t:0}function me(t,e){e|=0;var i;if(i=~~(+l(+ +h(10,+ +(15-(0|r[12+(t|=0)>>2])|0))*(+s[e>>3]+ +s[e+8>>3]))%+(0|r[t+4>>2]))>>>0,!(t=0|r[(0|r[t>>2])+(i<<2)>>2]))return 0;for(;;){if(0|Et(t,e)){e=5;break}if(!(t=0|r[t+32>>2])){t=0,e=5;break}}return 5==(0|e)?0|t:0}function ge(t){return 0|~~+function(t){return+ +Ie(+(t=+t))}(t=+t)}function Ae(t){t|=0;var e,i=0,n=0,s=0,o=0,a=0,l=0,c=0,h=0,u=0,d=0,p=0,f=0,m=0,g=0,A=0,b=0,v=0,_=0,y=0,w=0;e=P,P=P+16|0,f=e;do{if(t>>>0<245){if(3&(n=(p=0|r[5829])>>>(t=(u=t>>>0<11?16:t+11&-8)>>>3))|0)return(0|(a=0|r[(o=8+(s=0|r[(n=8+(t=23356+((i=(1&n^1)+t|0)<<1<<2)|0)|0)>>2])|0)>>2]))==(0|t)?r[5829]=p&~(1<<i):(r[a+12>>2]=t,r[n>>2]=a),r[s+4>>2]=3|(w=i<<3),r[(w=s+w+4|0)>>2]=1|r[w>>2],P=e,0|o;if(u>>>0>(d=0|r[5831])>>>0){if(0|n)return i=((i=n<<t&((i=2<<t)|0-i))&0-i)-1|0,(0|(n=0|r[(c=8+(a=0|r[(t=8+(i=23356+((s=((n=(i>>>=c=i>>>12&16)>>>5&8)|c|(a=(i>>>=n)>>>2&4)|(t=(i>>>=a)>>>1&2)|(s=(i>>>=t)>>>1&1))+(i>>>s)|0)<<1<<2)|0)|0)>>2])|0)>>2]))==(0|i)?r[5829]=t=p&~(1<<s):(r[n+12>>2]=i,r[t>>2]=n,t=p),l=(w=s<<3)-u|0,r[a+4>>2]=3|u,r[4+(o=a+u|0)>>2]=1|l,r[a+w>>2]=l,0|d&&(s=0|r[5834],n=23356+((i=d>>>3)<<1<<2)|0,t&(i=1<<i)?i=0|r[(t=n+8|0)>>2]:(r[5829]=t|i,i=n,t=n+8|0),r[t>>2]=s,r[i+12>>2]=s,r[s+8>>2]=i,r[s+12>>2]=n),r[5831]=l,r[5834]=o,P=e,0|c;if(a=0|r[5830]){for(n=(a&0-a)-1|0,n=h=0|r[23620+(((s=(n>>>=o=n>>>12&16)>>>5&8)|o|(l=(n>>>=s)>>>2&4)|(c=(n>>>=l)>>>1&2)|(h=(n>>>=c)>>>1&1))+(n>>>h)<<2)>>2],c=h,h=(-8&r[h+4>>2])-u|0;(t=0|r[n+16>>2])||(t=0|r[n+20>>2]);)n=t,c=(o=(l=(-8&r[t+4>>2])-u|0)>>>0<h>>>0)?t:c,h=o?l:h;if((l=c+u|0)>>>0>c>>>0){o=0|r[c+24>>2],i=0|r[c+12>>2];do{if((0|i)==(0|c)){if(!(i=0|r[(t=c+20|0)>>2])&&!(i=0|r[(t=c+16|0)>>2])){n=0;break}for(;;)if(n=0|r[(s=i+20|0)>>2])i=n,t=s;else{if(!(n=0|r[(s=i+16|0)>>2]))break;i=n,t=s}r[t>>2]=0,n=i}else r[12+(n=0|r[c+8>>2])>>2]=i,r[i+8>>2]=n,n=i}while(0);do{if(0|o){if((0|c)==(0|r[(t=23620+((i=0|r[c+28>>2])<<2)|0)>>2])){if(r[t>>2]=n,!n){r[5830]=a&~(1<<i);break}}else if(r[((0|r[(w=o+16|0)>>2])==(0|c)?w:o+20|0)>>2]=n,!n)break;r[n+24>>2]=o,0|(i=0|r[c+16>>2])&&(r[n+16>>2]=i,r[i+24>>2]=n),0|(i=0|r[c+20>>2])&&(r[n+20>>2]=i,r[i+24>>2]=n)}}while(0);return h>>>0<16?(r[c+4>>2]=3|(w=h+u|0),r[(w=c+w+4|0)>>2]=1|r[w>>2]):(r[c+4>>2]=3|u,r[l+4>>2]=1|h,r[l+h>>2]=h,0|d&&(s=0|r[5834],n=23356+((i=d>>>3)<<1<<2)|0,(i=1<<i)&p?i=0|r[(t=n+8|0)>>2]:(r[5829]=i|p,i=n,t=n+8|0),r[t>>2]=s,r[i+12>>2]=s,r[s+8>>2]=i,r[s+12>>2]=n),r[5831]=h,r[5834]=l),P=e,0|c+8}p=u}else p=u}else p=u}else if(t>>>0<=4294967231)if(u=-8&(t=t+11|0),s=0|r[5830]){o=0-u|0,h=(t>>>=8)?u>>>0>16777215?31:u>>>(7+(h=14-((c=(520192+(A=t<<(p=(t+1048320|0)>>>16&8))|0)>>>16&4)|p|(h=(245760+(A<<=c)|0)>>>16&2))+(A<<h>>>15)|0)|0)&1|h<<1:0,n=0|r[23620+(h<<2)>>2];t:do{if(n)for(t=0,c=u<<(31==(0|h)?0:25-(h>>>1)|0),a=0;;){if((l=(-8&r[n+4>>2])-u|0)>>>0<o>>>0){if(!l){t=n,o=0,A=65;break t}t=n,o=l}if(a=0==(0|(A=0|r[n+20>>2]))|(0|A)==(0|(n=0|r[n+16+(c>>>31<<2)>>2]))?a:A,!n){n=a,A=61;break}c<<=1}else n=0,t=0,A=61}while(0);if(61==(0|A)){if(0==(0|n)&0==(0|t)){if(!(t=((t=2<<h)|0-t)&s)){p=u;break}p=(t&0-t)-1|0,t=0,n=0|r[23620+(((a=(p>>>=l=p>>>12&16)>>>5&8)|l|(c=(p>>>=a)>>>2&4)|(h=(p>>>=c)>>>1&2)|(n=(p>>>=h)>>>1&1))+(p>>>n)<<2)>>2]}n?A=65:(c=t,l=o)}if(65==(0|A))for(a=n;;){if(o=(n=(p=(-8&r[a+4>>2])-u|0)>>>0<o>>>0)?p:o,t=n?a:t,(n=0|r[a+16>>2])||(n=0|r[a+20>>2]),!n){c=t,l=o;break}a=n}if(0!=(0|c)&&l>>>0<((0|r[5831])-u|0)>>>0&&(d=c+u|0)>>>0>c>>>0){a=0|r[c+24>>2],i=0|r[c+12>>2];do{if((0|i)==(0|c)){if(!(i=0|r[(t=c+20|0)>>2])&&!(i=0|r[(t=c+16|0)>>2])){i=0;break}for(;;)if(n=0|r[(o=i+20|0)>>2])i=n,t=o;else{if(!(n=0|r[(o=i+16|0)>>2]))break;i=n,t=o}r[t>>2]=0}else r[12+(w=0|r[c+8>>2])>>2]=i,r[i+8>>2]=w}while(0);do{if(a){if((0|c)==(0|r[(n=23620+((t=0|r[c+28>>2])<<2)|0)>>2])){if(r[n>>2]=i,!i){r[5830]=s&=~(1<<t);break}}else if(r[((0|r[(w=a+16|0)>>2])==(0|c)?w:a+20|0)>>2]=i,!i)break;r[i+24>>2]=a,0|(t=0|r[c+16>>2])&&(r[i+16>>2]=t,r[t+24>>2]=i),(t=0|r[c+20>>2])&&(r[i+20>>2]=t,r[t+24>>2]=i)}}while(0);t:do{if(l>>>0<16)r[c+4>>2]=3|(w=l+u|0),r[(w=c+w+4|0)>>2]=1|r[w>>2];else{if(r[c+4>>2]=3|u,r[d+4>>2]=1|l,r[d+l>>2]=l,i=l>>>3,l>>>0<256){n=23356+(i<<1<<2)|0,(t=0|r[5829])&(i=1<<i)?i=0|r[(t=n+8|0)>>2]:(r[5829]=t|i,i=n,t=n+8|0),r[t>>2]=d,r[i+12>>2]=d,r[d+8>>2]=i,r[d+12>>2]=n;break}if(i=23620+((n=(i=l>>>8)?l>>>0>16777215?31:l>>>(7+(n=14-((_=(520192+(w=i<<(y=(i+1048320|0)>>>16&8))|0)>>>16&4)|y|(n=(245760+(w<<=_)|0)>>>16&2))+(w<<n>>>15)|0)|0)&1|n<<1:0)<<2)|0,r[d+28>>2]=n,r[4+(t=d+16|0)>>2]=0,r[t>>2]=0,!(s&(t=1<<n))){r[5830]=s|t,r[i>>2]=d,r[d+24>>2]=i,r[d+12>>2]=d,r[d+8>>2]=d;break}i=0|r[i>>2];e:do{if((-8&r[i+4>>2]|0)!=(0|l)){for(s=l<<(31==(0|n)?0:25-(n>>>1)|0);t=0|r[(n=i+16+(s>>>31<<2)|0)>>2];){if((-8&r[t+4>>2]|0)==(0|l)){i=t;break e}s<<=1,i=t}r[n>>2]=d,r[d+24>>2]=i,r[d+12>>2]=d,r[d+8>>2]=d;break t}}while(0);r[12+(w=0|r[(y=i+8|0)>>2])>>2]=d,r[y>>2]=d,r[d+8>>2]=w,r[d+12>>2]=i,r[d+24>>2]=0}}while(0);return P=e,0|c+8}p=u}else p=u;else p=-1}while(0);if((n=0|r[5831])>>>0>=p>>>0)return t=0|r[5834],(i=n-p|0)>>>0>15?(r[5834]=w=t+p|0,r[5831]=i,r[w+4>>2]=1|i,r[t+n>>2]=i,r[t+4>>2]=3|p):(r[5831]=0,r[5834]=0,r[t+4>>2]=3|n,r[(w=t+n+4|0)>>2]=1|r[w>>2]),P=e,0|t+8;if((l=0|r[5832])>>>0>p>>>0)return r[5832]=_=l-p|0,r[5835]=y=(w=0|r[5835])+p|0,r[y+4>>2]=1|_,r[w+4>>2]=3|p,P=e,0|w+8;if(0|r[5947]?t=0|r[5949]:(r[5949]=4096,r[5948]=4096,r[5950]=-1,r[5951]=-1,r[5952]=0,r[5940]=0,r[5947]=-16&f^1431655768,t=4096),c=p+48|0,(u=(a=t+(h=p+47|0)|0)&(o=0-t|0))>>>0<=p>>>0)return P=e,0;if(0|(t=0|r[5939])&&(f=(d=0|r[5937])+u|0)>>>0<=d>>>0|f>>>0>t>>>0)return P=e,0;t:do{if(4&r[5940])i=0,A=143;else{n=0|r[5835];e:do{if(n){for(s=23764;!((f=0|r[s>>2])>>>0<=n>>>0&&(f+(0|r[s+4>>2])|0)>>>0>n>>>0);){if(!(t=0|r[s+8>>2])){A=128;break e}s=t}if((i=a-l&o)>>>0<2147483647)if((0|(t=0|Pe(0|i)))==((0|r[s>>2])+(0|r[s+4>>2])|0)){if(-1!=(0|t)){l=i,a=t,A=145;break t}}else s=t,A=136;else i=0}else A=128}while(0);do{if(128==(0|A))if(-1!=(0|(n=0|Pe(0)))&&(g=(i=(0==((g=(m=0|r[5948])-1|0)&(i=n)|0)?0:(g+i&0-m)-i|0)+u|0)+(m=0|r[5937])|0,i>>>0>p>>>0&i>>>0<2147483647)){if(0|(f=0|r[5939])&&g>>>0<=m>>>0|g>>>0>f>>>0){i=0;break}if((0|(t=0|Pe(0|i)))==(0|n)){l=i,a=n,A=145;break t}s=t,A=136}else i=0}while(0);do{if(136==(0|A)){if(n=0-i|0,!(c>>>0>i>>>0&i>>>0<2147483647&-1!=(0|s))){if(-1==(0|s)){i=0;break}l=i,a=s,A=145;break t}if((t=h-i+(t=0|r[5949])&0-t)>>>0>=2147483647){l=i,a=s,A=145;break t}if(-1==(0|Pe(0|t))){Pe(0|n),i=0;break}l=t+i|0,a=s,A=145;break t}}while(0);r[5940]=4|r[5940],A=143}}while(0);if(143==(0|A)&&u>>>0<2147483647&&!(-1==(0|(_=0|Pe(0|u)))|1^(v=(b=(g=0|Pe(0))-_|0)>>>0>(p+40|0)>>>0)|_>>>0<g>>>0&-1!=(0|_)&-1!=(0|g)^1)&&(l=v?b:i,a=_,A=145),145==(0|A)){r[5937]=i=(0|r[5937])+l|0,i>>>0>(0|r[5938])>>>0&&(r[5938]=i),h=0|r[5835];t:do{if(h){for(i=23764;;){if((0|a)==((t=0|r[i>>2])+(n=0|r[i+4>>2])|0)){A=154;break}if(!(s=0|r[i+8>>2]))break;i=s}if(154==(0|A)&&(y=i+4|0,0==(8&r[i+12>>2]|0))&&a>>>0>h>>>0&t>>>0<=h>>>0){r[y>>2]=n+l,y=h+(_=0==(7&(_=h+8|0)|0)?0:0-_&7)|0,_=(w=(0|r[5832])+l|0)-_|0,r[5835]=y,r[5832]=_,r[y+4>>2]=1|_,r[h+w+4>>2]=40,r[5836]=r[5951];break}for(a>>>0<(0|r[5833])>>>0&&(r[5833]=a),n=a+l|0,i=23764;;){if((0|r[i>>2])==(0|n)){A=162;break}if(!(t=0|r[i+8>>2]))break;i=t}if(162==(0|A)&&0==(8&r[i+12>>2]|0)){r[i>>2]=a,r[(d=i+4|0)>>2]=(0|r[d>>2])+l,u=(d=a+(0==(7&(d=a+8|0)|0)?0:0-d&7)|0)+p|0,c=(i=n+(0==(7&(i=n+8|0)|0)?0:0-i&7)|0)-d-p|0,r[d+4>>2]=3|p;e:do{if((0|h)==(0|i))r[5832]=w=(0|r[5832])+c|0,r[5835]=u,r[u+4>>2]=1|w;else{if((0|r[5834])==(0|i)){r[5831]=w=(0|r[5831])+c|0,r[5834]=u,r[u+4>>2]=1|w,r[u+w>>2]=w;break}if(1==(3&(t=0|r[i+4>>2])|0)){l=-8&t,s=t>>>3;i:do{if(t>>>0<256){if((0|(n=0|r[i+12>>2]))==(0|(t=0|r[i+8>>2]))){r[5829]=r[5829]&~(1<<s);break}r[t+12>>2]=n,r[n+8>>2]=t;break}a=0|r[i+24>>2],t=0|r[i+12>>2];do{if((0|t)==(0|i)){if(t=0|r[(s=4+(n=i+16|0)|0)>>2])n=s;else if(!(t=0|r[n>>2])){t=0;break}for(;;)if(s=0|r[(o=t+20|0)>>2])t=s,n=o;else{if(!(s=0|r[(o=t+16|0)>>2]))break;t=s,n=o}r[n>>2]=0}else r[12+(w=0|r[i+8>>2])>>2]=t,r[t+8>>2]=w}while(0);if(!a)break;s=23620+((n=0|r[i+28>>2])<<2)|0;do{if((0|r[s>>2])==(0|i)){if(r[s>>2]=t,0|t)break;r[5830]=r[5830]&~(1<<n);break i}if(r[((0|r[(w=a+16|0)>>2])==(0|i)?w:a+20|0)>>2]=t,!t)break i}while(0);if(r[t+24>>2]=a,0|(s=0|r[(n=i+16|0)>>2])&&(r[t+16>>2]=s,r[s+24>>2]=t),!(n=0|r[n+4>>2]))break;r[t+20>>2]=n,r[n+24>>2]=t}while(0);i=i+l|0,o=l+c|0}else o=c;if(r[(i=i+4|0)>>2]=-2&r[i>>2],r[u+4>>2]=1|o,r[u+o>>2]=o,i=o>>>3,o>>>0<256){n=23356+(i<<1<<2)|0,(t=0|r[5829])&(i=1<<i)?i=0|r[(t=n+8|0)>>2]:(r[5829]=t|i,i=n,t=n+8|0),r[t>>2]=u,r[i+12>>2]=u,r[u+8>>2]=i,r[u+12>>2]=n;break}i=o>>>8;do{if(i){if(o>>>0>16777215){s=31;break}s=o>>>(7+(s=14-((_=(520192+(w=i<<(y=(i+1048320|0)>>>16&8))|0)>>>16&4)|y|(s=(245760+(w<<=_)|0)>>>16&2))+(w<<s>>>15)|0)|0)&1|s<<1}else s=0}while(0);if(i=23620+(s<<2)|0,r[u+28>>2]=s,r[4+(t=u+16|0)>>2]=0,r[t>>2]=0,!((t=0|r[5830])&(n=1<<s))){r[5830]=t|n,r[i>>2]=u,r[u+24>>2]=i,r[u+12>>2]=u,r[u+8>>2]=u;break}i=0|r[i>>2];i:do{if((-8&r[i+4>>2]|0)!=(0|o)){for(s=o<<(31==(0|s)?0:25-(s>>>1)|0);t=0|r[(n=i+16+(s>>>31<<2)|0)>>2];){if((-8&r[t+4>>2]|0)==(0|o)){i=t;break i}s<<=1,i=t}r[n>>2]=u,r[u+24>>2]=i,r[u+12>>2]=u,r[u+8>>2]=u;break e}}while(0);r[12+(w=0|r[(y=i+8|0)>>2])>>2]=u,r[y>>2]=u,r[u+8>>2]=w,r[u+12>>2]=i,r[u+24>>2]=0}}while(0);return P=e,0|d+8}for(i=23764;!((t=0|r[i>>2])>>>0<=h>>>0&&(w=t+(0|r[i+4>>2])|0)>>>0>h>>>0);)i=0|r[i+8>>2];i=(t=(t=(o=w+-47|0)+(0==(7&(t=o+8|0)|0)?0:0-t&7)|0)>>>0<(o=h+16|0)>>>0?h:t)+8|0,y=a+(_=0==(7&(_=a+8|0)|0)?0:0-_&7)|0,_=(n=l+-40|0)-_|0,r[5835]=y,r[5832]=_,r[y+4>>2]=1|_,r[a+n+4>>2]=40,r[5836]=r[5951],r[(n=t+4|0)>>2]=27,r[i>>2]=r[5941],r[i+4>>2]=r[5942],r[i+8>>2]=r[5943],r[i+12>>2]=r[5944],r[5941]=a,r[5942]=l,r[5944]=0,r[5943]=i,i=t+24|0;do{y=i,r[(i=i+4|0)>>2]=7}while((y+8|0)>>>0<w>>>0);if((0|t)!=(0|h)){if(a=t-h|0,r[n>>2]=-2&r[n>>2],r[h+4>>2]=1|a,r[t>>2]=a,i=a>>>3,a>>>0<256){n=23356+(i<<1<<2)|0,(t=0|r[5829])&(i=1<<i)?i=0|r[(t=n+8|0)>>2]:(r[5829]=t|i,i=n,t=n+8|0),r[t>>2]=h,r[i+12>>2]=h,r[h+8>>2]=i,r[h+12>>2]=n;break}if(n=23620+((s=(i=a>>>8)?a>>>0>16777215?31:a>>>(7+(s=14-((_=(520192+(w=i<<(y=(i+1048320|0)>>>16&8))|0)>>>16&4)|y|(s=(245760+(w<<=_)|0)>>>16&2))+(w<<s>>>15)|0)|0)&1|s<<1:0)<<2)|0,r[h+28>>2]=s,r[h+20>>2]=0,r[o>>2]=0,!((i=0|r[5830])&(t=1<<s))){r[5830]=i|t,r[n>>2]=h,r[h+24>>2]=n,r[h+12>>2]=h,r[h+8>>2]=h;break}i=0|r[n>>2];e:do{if((-8&r[i+4>>2]|0)!=(0|a)){for(s=a<<(31==(0|s)?0:25-(s>>>1)|0);t=0|r[(n=i+16+(s>>>31<<2)|0)>>2];){if((-8&r[t+4>>2]|0)==(0|a)){i=t;break e}s<<=1,i=t}r[n>>2]=h,r[h+24>>2]=i,r[h+12>>2]=h,r[h+8>>2]=h;break t}}while(0);r[12+(w=0|r[(y=i+8|0)>>2])>>2]=h,r[y>>2]=h,r[h+8>>2]=w,r[h+12>>2]=i,r[h+24>>2]=0}}else 0==(0|(w=0|r[5833]))|a>>>0<w>>>0&&(r[5833]=a),r[5941]=a,r[5942]=l,r[5944]=0,r[5838]=r[5947],r[5837]=-1,r[5842]=23356,r[5841]=23356,r[5844]=23364,r[5843]=23364,r[5846]=23372,r[5845]=23372,r[5848]=23380,r[5847]=23380,r[5850]=23388,r[5849]=23388,r[5852]=23396,r[5851]=23396,r[5854]=23404,r[5853]=23404,r[5856]=23412,r[5855]=23412,r[5858]=23420,r[5857]=23420,r[5860]=23428,r[5859]=23428,r[5862]=23436,r[5861]=23436,r[5864]=23444,r[5863]=23444,r[5866]=23452,r[5865]=23452,r[5868]=23460,r[5867]=23460,r[5870]=23468,r[5869]=23468,r[5872]=23476,r[5871]=23476,r[5874]=23484,r[5873]=23484,r[5876]=23492,r[5875]=23492,r[5878]=23500,r[5877]=23500,r[5880]=23508,r[5879]=23508,r[5882]=23516,r[5881]=23516,r[5884]=23524,r[5883]=23524,r[5886]=23532,r[5885]=23532,r[5888]=23540,r[5887]=23540,r[5890]=23548,r[5889]=23548,r[5892]=23556,r[5891]=23556,r[5894]=23564,r[5893]=23564,r[5896]=23572,r[5895]=23572,r[5898]=23580,r[5897]=23580,r[5900]=23588,r[5899]=23588,r[5902]=23596,r[5901]=23596,r[5904]=23604,r[5903]=23604,y=a+(_=0==(7&(_=a+8|0)|0)?0:0-_&7)|0,_=(w=l+-40|0)-_|0,r[5835]=y,r[5832]=_,r[y+4>>2]=1|_,r[a+w+4>>2]=40,r[5836]=r[5951]}while(0);if((i=0|r[5832])>>>0>p>>>0)return r[5832]=_=i-p|0,r[5835]=y=(w=0|r[5835])+p|0,r[y+4>>2]=1|_,r[w+4>>2]=3|p,P=e,0|w+8}return r[(w=23312)>>2]=12,P=e,0}function be(t){var e=0,i=0,n=0,s=0,o=0,a=0,l=0,c=0;if(t|=0){s=0|r[5833],c=(i=t+-8|0)+(e=-8&(t=0|r[t+-4>>2]))|0;do{if(1&t)l=i,a=i;else{if(!(3&t))return;if(o=(n=0|r[i>>2])+e|0,(a=i+(0-n)|0)>>>0<s>>>0)return;if((0|r[5834])==(0|a)){if(3!=(3&(e=0|r[(t=c+4|0)>>2])|0)){l=a,e=o;break}return r[5831]=o,r[t>>2]=-2&e,r[a+4>>2]=1|o,void(r[a+o>>2]=o)}if(i=n>>>3,n>>>0<256){if((0|(e=0|r[a+12>>2]))==(0|(t=0|r[a+8>>2]))){r[5829]=r[5829]&~(1<<i),l=a,e=o;break}r[t+12>>2]=e,r[e+8>>2]=t,l=a,e=o;break}s=0|r[a+24>>2],t=0|r[a+12>>2];do{if((0|t)==(0|a)){if(t=0|r[(i=4+(e=a+16|0)|0)>>2])e=i;else if(!(t=0|r[e>>2])){t=0;break}for(;;)if(i=0|r[(n=t+20|0)>>2])t=i,e=n;else{if(!(i=0|r[(n=t+16|0)>>2]))break;t=i,e=n}r[e>>2]=0}else r[12+(l=0|r[a+8>>2])>>2]=t,r[t+8>>2]=l}while(0);if(s){if((0|r[(i=23620+((e=0|r[a+28>>2])<<2)|0)>>2])==(0|a)){if(r[i>>2]=t,!t){r[5830]=r[5830]&~(1<<e),l=a,e=o;break}}else if(r[((0|r[(l=s+16|0)>>2])==(0|a)?l:s+20|0)>>2]=t,!t){l=a,e=o;break}r[t+24>>2]=s,0|(i=0|r[(e=a+16|0)>>2])&&(r[t+16>>2]=i,r[i+24>>2]=t),(e=0|r[e+4>>2])?(r[t+20>>2]=e,r[e+24>>2]=t,l=a,e=o):(l=a,e=o)}else l=a,e=o}}while(0);if(!(a>>>0>=c>>>0)&&1&(n=0|r[(t=c+4|0)>>2])){if(2&n)r[t>>2]=-2&n,r[l+4>>2]=1|e,r[a+e>>2]=e,s=e;else{if((0|r[5835])==(0|c)){if(r[5832]=c=(0|r[5832])+e|0,r[5835]=l,r[l+4>>2]=1|c,(0|l)!=(0|r[5834]))return;return r[5834]=0,void(r[5831]=0)}if((0|r[5834])==(0|c))return r[5831]=c=(0|r[5831])+e|0,r[5834]=a,r[l+4>>2]=1|c,void(r[a+c>>2]=c);s=(-8&n)+e|0,i=n>>>3;do{if(n>>>0<256){if((0|(t=0|r[c+12>>2]))==(0|(e=0|r[c+8>>2]))){r[5829]=r[5829]&~(1<<i);break}r[e+12>>2]=t,r[t+8>>2]=e;break}o=0|r[c+24>>2],t=0|r[c+12>>2];do{if((0|t)==(0|c)){if(t=0|r[(i=4+(e=c+16|0)|0)>>2])e=i;else if(!(t=0|r[e>>2])){i=0;break}for(;;)if(i=0|r[(n=t+20|0)>>2])t=i,e=n;else{if(!(i=0|r[(n=t+16|0)>>2]))break;t=i,e=n}r[e>>2]=0,i=t}else r[12+(i=0|r[c+8>>2])>>2]=t,r[t+8>>2]=i,i=t}while(0);if(0|o){if((0|r[(e=23620+((t=0|r[c+28>>2])<<2)|0)>>2])==(0|c)){if(r[e>>2]=i,!i){r[5830]=r[5830]&~(1<<t);break}}else if(r[((0|r[(n=o+16|0)>>2])==(0|c)?n:o+20|0)>>2]=i,!i)break;r[i+24>>2]=o,0|(e=0|r[(t=c+16|0)>>2])&&(r[i+16>>2]=e,r[e+24>>2]=i),0|(t=0|r[t+4>>2])&&(r[i+20>>2]=t,r[t+24>>2]=i)}}while(0);if(r[l+4>>2]=1|s,r[a+s>>2]=s,(0|l)==(0|r[5834]))return void(r[5831]=s)}if(t=s>>>3,s>>>0<256)return i=23356+(t<<1<<2)|0,(e=0|r[5829])&(t=1<<t)?t=0|r[(e=i+8|0)>>2]:(r[5829]=e|t,t=i,e=i+8|0),r[e>>2]=l,r[t+12>>2]=l,r[l+8>>2]=t,void(r[l+12>>2]=i);t=23620+((n=(t=s>>>8)?s>>>0>16777215?31:s>>>(7+(n=14-((o=(520192+(c=t<<(a=(t+1048320|0)>>>16&8))|0)>>>16&4)|a|(n=(245760+(c<<=o)|0)>>>16&2))+(c<<n>>>15)|0)|0)&1|n<<1:0)<<2)|0,r[l+28>>2]=n,r[l+20>>2]=0,r[l+16>>2]=0,e=0|r[5830],i=1<<n;t:do{if(e&i){t=0|r[t>>2];e:do{if((-8&r[t+4>>2]|0)!=(0|s)){for(n=s<<(31==(0|n)?0:25-(n>>>1)|0);e=0|r[(i=t+16+(n>>>31<<2)|0)>>2];){if((-8&r[e+4>>2]|0)==(0|s)){t=e;break e}n<<=1,t=e}r[i>>2]=l,r[l+24>>2]=t,r[l+12>>2]=l,r[l+8>>2]=l;break t}}while(0);r[12+(c=0|r[(a=t+8|0)>>2])>>2]=l,r[a>>2]=l,r[l+8>>2]=c,r[l+12>>2]=t,r[l+24>>2]=0}else r[5830]=e|i,r[t>>2]=l,r[l+24>>2]=t,r[l+12>>2]=l,r[l+8>>2]=l}while(0);if(r[5837]=c=(0|r[5837])-1|0,!(0|c)){for(t=23772;t=0|r[t>>2];)t=t+8|0;r[5837]=-1}}}}function ve(t,e){e|=0;var i=0;return(t|=0)?(i=0|v(e,t),(e|t)>>>0>65535&&(i=(0|(i>>>0)/(t>>>0))==(0|e)?i:-1)):i=0,(t=0|Ae(i))&&3&r[t+-4>>2]?(De(0|t,0,0|i),0|t):0|t}function _e(t,e,i,n){return 0|(w(0|(n=(e|=0)-(n|=0)-((i|=0)>>>0>(t|=0)>>>0|0)>>>0)),t-i>>>0|0)}function ye(t){return 0|((t|=0)?31-(0|y(t^t-1))|0:32)}function we(t,e,i,n){var s,o;return o=P,P=P+16|0,function(t,e,i,n,s){s|=0;var o=0,a=0,l=0,c=0,h=0,u=0,d=0,p=0,f=0,m=0;if(u=t|=0,a=i|=0,l=p=n|=0,!(h=c=e|=0))return o=0!=(0|s),l?o?(r[s>>2]=0|t,r[s+4>>2]=0&e,s=0,0|(w(0|(p=0)),s)):(s=0,0|(w(0|(p=0)),s)):(o&&(r[s>>2]=(u>>>0)%(a>>>0),r[s+4>>2]=0),s=(u>>>0)/(a>>>0)>>>0,0|(w(0|(p=0)),s));o=0==(0|l);do{if(a){if(!o){if((o=(0|y(0|l))-(0|y(0|h))|0)>>>0<=31){a=d=o+1|0,t=u>>>(d>>>0)&(e=o-31>>31)|h<<(l=31-o|0),e&=h>>>(d>>>0),o=0,l=u<<l;break}return s?(r[s>>2]=0|t,r[s+4>>2]=c|0&e,s=0,0|(w(0|(p=0)),s)):(s=0,0|(w(0|(p=0)),s))}if((o=a-1|0)&a|0){a=l=33+(0|y(0|a))-(0|y(0|h))|0,t=(d=32-l|0)-1>>31&h>>>((f=l-32|0)>>>0)|(h<<d|u>>>(l>>>0))&(e=f>>31),e&=h>>>(l>>>0),o=u<<(m=64-l|0)&(c=d>>31),l=(h<<m|u>>>(f>>>0))&c|u<<d&l-33>>31;break}return 0|s&&(r[s>>2]=o&u,r[s+4>>2]=0),1==(0|a)?(m=0|t,0|(w(0|(f=c|0&e)),m)):(f=h>>>((m=0|ye(0|a))>>>0)|0,m=h<<32-m|u>>>(m>>>0)|0,0|(w(0|f),m))}if(o)return 0|s&&(r[s>>2]=(h>>>0)%(a>>>0),r[s+4>>2]=0),m=(h>>>0)/(a>>>0)>>>0,0|(w(0|(f=0)),m);if(!u)return 0|s&&(r[s>>2]=0,r[s+4>>2]=(h>>>0)%(l>>>0)),m=(h>>>0)/(l>>>0)>>>0,0|(w(0|(f=0)),m);if(!((o=l-1|0)&l))return 0|s&&(r[s>>2]=0|t,r[s+4>>2]=o&h|0&e),f=0,m=h>>>((0|ye(0|l))>>>0),0|(w(0|f),m);if((o=(0|y(0|l))-(0|y(0|h))|0)>>>0<=30){a=e=o+1|0,t=h<<(l=31-o|0)|u>>>(e>>>0),e=h>>>(e>>>0),o=0,l=u<<l;break}return s?(r[s>>2]=0|t,r[s+4>>2]=c|0&e,m=0,0|(w(0|(f=0)),m)):(m=0,0|(w(0|(f=0)),m))}while(0);if(a){h=0|function(t,e,i,n){return 0|(w((e|=0)+(n|=0)+((i=(t|=0)+(i|=0)>>>0)>>>0<t>>>0|0)>>>0|0),0|i)}(0|(d=0|i),0|(u=p|0&n),-1,-1),i=0|x(),c=l,l=0;do{n=c,c=o>>>31|c<<1,o=l|o<<1,_e(0|h,0|i,0|(n=t<<1|n>>>31|0),0|(p=t>>>31|e<<1|0)),l=1&(f=(m=0|x())>>31|((0|m)<0?-1:0)<<1),t=0|_e(0|n,0|p,f&d|0,(((0|m)<0?-1:0)>>31|((0|m)<0?-1:0)<<1)&u|0),e=0|x(),a=a-1|0}while(0!=(0|a));h=c,c=0}else h=l,c=0,l=0;a=0,0|s&&(r[s>>2]=t,r[s+4>>2]=e),m=-2&(o<<1|0)|l,w(0|(f=(0|o)>>>31|(h|a)<<1|0&(a<<1|o>>>31)|c))}(t|=0,e|=0,i|=0,n|=0,s=0|o),P=o,0|(w(0|r[s+4>>2]),0|r[s>>2])}function xe(t,e,i){return t|=0,e|=0,(0|(i|=0))<32?(w(e>>>i|0),t>>>i|(e&(1<<i)-1)<<32-i):(w(0),e>>>i-32|0)}function Ce(t,e,i){return t|=0,(0|(i|=0))<32?(w((e|=0)<<i|(t&(1<<i)-1<<32-i)>>>32-i|0),t<<i):(w(t<<i-32|0),0)}function Se(t,e){return e=+e,(t=+t)!=t?+e:e!=e?+t:+_(+t,+e)}function ke(t){return(t=+t)>=0?+a(t+.5):+b(t-.5)}function Ee(t,e,i){t|=0,e|=0;var s,o,a=0;if((0|(i|=0))>=8192)return E(0|t,0|e,0|i),0|t;if(o=0|t,s=t+i|0,(3&t)==(3&e)){for(;3&t;){if(!i)return 0|o;n[t>>0]=0|n[e>>0],t=t+1|0,e=e+1|0,i=i-1|0}for(a=(i=-4&s|0)-64|0;(0|t)<=(0|a);)r[t>>2]=r[e>>2],r[t+4>>2]=r[e+4>>2],r[t+8>>2]=r[e+8>>2],r[t+12>>2]=r[e+12>>2],r[t+16>>2]=r[e+16>>2],r[t+20>>2]=r[e+20>>2],r[t+24>>2]=r[e+24>>2],r[t+28>>2]=r[e+28>>2],r[t+32>>2]=r[e+32>>2],r[t+36>>2]=r[e+36>>2],r[t+40>>2]=r[e+40>>2],r[t+44>>2]=r[e+44>>2],r[t+48>>2]=r[e+48>>2],r[t+52>>2]=r[e+52>>2],r[t+56>>2]=r[e+56>>2],r[t+60>>2]=r[e+60>>2],t=t+64|0,e=e+64|0;for(;(0|t)<(0|i);)r[t>>2]=r[e>>2],t=t+4|0,e=e+4|0}else for(i=s-4|0;(0|t)<(0|i);)n[t>>0]=0|n[e>>0],n[t+1>>0]=0|n[e+1>>0],n[t+2>>0]=0|n[e+2>>0],n[t+3>>0]=0|n[e+3>>0],t=t+4|0,e=e+4|0;for(;(0|t)<(0|s);)n[t>>0]=0|n[e>>0],t=t+1|0,e=e+1|0;return 0|o}function De(t,e,i){e|=0;var s,o=0,a=0,l=0;if(s=(t|=0)+(i|=0)|0,e&=255,(0|i)>=67){for(;3&t;)n[t>>0]=e,t=t+1|0;for(l=e|e<<8|e<<16|e<<24,a=(o=-4&s|0)-64|0;(0|t)<=(0|a);)r[t>>2]=l,r[t+4>>2]=l,r[t+8>>2]=l,r[t+12>>2]=l,r[t+16>>2]=l,r[t+20>>2]=l,r[t+24>>2]=l,r[t+28>>2]=l,r[t+32>>2]=l,r[t+36>>2]=l,r[t+40>>2]=l,r[t+44>>2]=l,r[t+48>>2]=l,r[t+52>>2]=l,r[t+56>>2]=l,r[t+60>>2]=l,t=t+64|0;for(;(0|t)<(0|o);)r[t>>2]=l,t=t+4|0}for(;(0|t)<(0|s);)n[t>>0]=e,t=t+1|0;return s-i|0}function Ie(t){return(t=+t)>=0?+a(t+.5):+b(t-.5)}function Pe(t){var e,i,n;return t|=0,n=0|k(),(0|t)>0&(0|(e=(i=0|r[o>>2])+t|0))<(0|i)|(0|e)<0?(I(0|e),S(12),-1):(0|e)>(0|n)&&!(0|D(0|e))?(S(12),-1):(r[o>>2]=e,0|i)}return{___uremdi3:we,_bitshift64Lshr:xe,_bitshift64Shl:Ce,_calloc:ve,_cellAreaKm2:function(t,e){var i,n,s,o=0;if(s=P,P=P+192|0,n=s,Kt(t|=0,e|=0,i=s+168|0),$t(t,e,n),(0|(e=0|r[n>>2]))>0){if(o=+It(n+8|0,n+8+((1!=(0|e)&1)<<4)|0,i)+0,1!=(0|e)){t=1;do{o+=+It(n+8+(t<<4)|0,n+8+(((0|(t=t+1|0))%(0|e)|0)<<4)|0,i)}while((0|t)<(0|e))}}else o=0;return P=s,6371.007180918475*o*6371.007180918475},_cellAreaM2:function(t,e){var i,n,s,o=0;if(s=P,P=P+192|0,n=s,Kt(t|=0,e|=0,i=s+168|0),$t(t,e,n),(0|(e=0|r[n>>2]))>0){if(o=+It(n+8|0,n+8+((1!=(0|e)&1)<<4)|0,i)+0,1!=(0|e)){t=1;do{o+=+It(n+8+(t<<4)|0,n+8+(((0|(t=t+1|0))%(0|e)|0)<<4)|0,i)}while((0|t)<(0|e))}}else o=0;return P=s,6371.007180918475*o*6371.007180918475*1e3*1e3},_cellAreaRads2:function(t,e){var i,n,s,o=0;if(s=P,P=P+192|0,n=s,Kt(t|=0,e|=0,i=s+168|0),$t(t,e,n),(0|(e=0|r[n>>2]))<=0)return P=s,+(o=0);if(o=+It(n+8|0,n+8+((1!=(0|e)&1)<<4)|0,i)+0,1==(0|e))return P=s,+o;t=1;do{o+=+It(n+8+(t<<4)|0,n+8+(((0|(t=t+1|0))%(0|e)|0)<<4)|0,i)}while((0|t)<(0|e));return P=s,+o},_compact:function(t,e,i){e|=0;var n,s=0,o=0,a=0,l=0,c=0,h=0,u=0,d=0,p=0,f=0,m=0,g=0,A=0,b=0,v=0,_=0,y=0,w=0,C=0,S=0,k=0;if(!(i|=0))return 0;if(s=0|r[(o=t|=0)>>2],!0&0==(15728640&(o=0|r[o+4>>2])|0)){if((0|i)<=0)return 0;if(r[(S=e)>>2]=s,r[S+4>>2]=o,1==(0|i))return 0;s=1;do{C=0|r[4+(w=t+(s<<3)|0)>>2],r[(S=e+(s<<3)|0)>>2]=r[w>>2],r[S+4>>2]=C,s=s+1|0}while((0|s)!=(0|i));return 0}if(!(C=0|Ae(w=i<<3)))return-3;if(Ee(0|C,0|t,0|w),!(n=0|ve(i,8)))return be(C),-3;s=i;t:for(;;){_=0|xe(0|(d=0|r[(l=C)>>2]),0|(l=0|r[l+4>>2]),52),x(),y=(_&=15)-1|0,v=(0|s)>0;e:do{if(v){if(b=((0|s)<0)<<31>>31,g=0|Ce(0|y,0,52),A=0|x(),y>>>0>15)for(o=0,t=d,i=l;;){if(!(0==(0|t)&0==(0|i))){if(a=0|xe(0|t,0|i,52),x(),c=(0|(a&=15))<(0|y),a=(0|a)==(0|y),i=0|we(0|(u=c?0:a?t:0),0|(t=c?0:a?i:0),0|s,0|b),x(),0==(0|(h=0|r[(c=a=n+(i<<3)|0)>>2]))&0==(0|(c=0|r[c+4>>2])))i=u;else for(g=0,m=i,f=c,i=u;;){if((0|g)>(0|s)){S=41;break t}if((0|h)==(0|i)&(-117440513&f|0)==(0|t)){u=0|xe(0|h,0|f,56),x(),p=1+(u&=7)|0,A=0|xe(0|h,0|f,45),x();i:do{if(0|F(127&A)){if(h=0|xe(0|h,0|f,52),x(),!(h&=15)){c=6;break}for(c=1;;){if(!(0==((A=0|Ce(7,0,3*(15-c|0)|0))&i|0)&0==((0|x())&t|0))){c=7;break i}if(!(c>>>0<h>>>0)){c=6;break}c=c+1|0}}else c=7}while(0);if((u+2|0)>>>0>c>>>0){S=51;break t}A=0|Ce(0|p,0,56),t=0|x()|-117440513&t,r[(c=a)>>2]=0,r[c+4>>2]=0,c=m,i|=A}else c=(m+1|0)%(0|s)|0;if(0==(0|(h=0|r[(f=a=n+(c<<3)|0)>>2]))&0==(0|(f=0|r[f+4>>2])))break;g=g+1|0,m=c}r[(A=a)>>2]=i,r[A+4>>2]=t}if((0|(o=o+1|0))>=(0|s))break e;t=0|r[(i=C+(o<<3)|0)>>2],i=0|r[i+4>>2]}for(o=0,t=d,i=l;;){if(!(0==(0|t)&0==(0|i))){if(c=0|xe(0|t,0|i,52),x(),(0|(c&=15))>=(0|y)){if((0|c)!=(0|y)&&(t|=g,i=-15728641&i|A,c>>>0>=_>>>0)){a=y;do{m=0|Ce(7,0,3*(14-a|0)|0),a=a+1|0,t|=m,i=0|x()|i}while(a>>>0<c>>>0)}}else t=0,i=0;if(c=0|we(0|t,0|i,0|s,0|b),x(),!(0==(0|(u=0|r[(h=a=n+(c<<3)|0)>>2]))&0==(0|(h=0|r[h+4>>2]))))for(m=0;;){if((0|m)>(0|s)){S=41;break t}if((0|u)==(0|t)&(-117440513&h|0)==(0|i)){p=0|xe(0|u,0|h,56),x(),f=1+(p&=7)|0,k=0|xe(0|u,0|h,45),x();i:do{if(0|F(127&k)){if(u=0|xe(0|u,0|h,52),x(),!(u&=15)){h=6;break}for(h=1;;){if(!(0==((k=0|Ce(7,0,3*(15-h|0)|0))&t|0)&0==((0|x())&i|0))){h=7;break i}if(!(h>>>0<u>>>0)){h=6;break}h=h+1|0}}else h=7}while(0);if((p+2|0)>>>0>h>>>0){S=51;break t}k=0|Ce(0|f,0,56),i=0|x()|-117440513&i,r[(f=a)>>2]=0,r[f+4>>2]=0,t|=k}else c=(c+1|0)%(0|s)|0;if(0==(0|(u=0|r[(h=a=n+(c<<3)|0)>>2]))&0==(0|(h=0|r[h+4>>2])))break;m=m+1|0}r[(k=a)>>2]=t,r[k+4>>2]=i}if((0|(o=o+1|0))>=(0|s))break e;t=0|r[(i=C+(o<<3)|0)>>2],i=0|r[i+4>>2]}}}while(0);if((s+5|0)>>>0<11){S=99;break}if(!(A=0|ve((0|s)/6|0,8))){S=58;break}e:do{if(v){m=0,f=0;do{if(!(0==(0|(o=0|r[(t=c=n+(m<<3)|0)>>2]))&0==(0|(t=0|r[t+4>>2])))){h=0|xe(0|o,0|t,56),x(),i=1+(h&=7)|0,u=-117440513&t,k=0|xe(0|o,0|t,45),x();i:do{if(0|F(127&k)){if(p=0|xe(0|o,0|t,52),x(),0|(p&=15))for(a=1;;){if(!(0==(o&(k=0|Ce(7,0,3*(15-a|0)|0))|0)&0==(u&(0|x())|0)))break i;if(!(a>>>0

>>0))break;a=a+1|0}o|=t=0|Ce(0|i,0,56),t=0|x()|u,r[(i=c)>>2]=o,r[i+4>>2]=t,i=h+2|0}}while(0);7==(0|i)&&(r[(k=A+(f<<3)|0)>>2]=o,r[k+4>>2]=-117440513&t,f=f+1|0)}m=m+1|0}while((0|m)!=(0|s));if(v){if(g=((0|s)<0)<<31>>31,p=0|Ce(0|y,0,52),m=0|x(),y>>>0>15)for(t=0,o=0;;){do{if(!(0==(0|d)&0==(0|l))){for(h=0|xe(0|d,0|l,52),x(),a=(0|(h&=15))<(0|y),h=(0|h)==(0|y),a=0|we(0|(c=a?0:h?d:0),0|(h=a?0:h?l:0),0|s,0|g),x(),i=0;;){if((0|i)>(0|s)){S=98;break t}if((-117440513&(u=0|r[4+(k=n+(a<<3)|0)>>2])|0)==(0|h)&&(0|r[k>>2])==(0|c)){S=70;break}if((0|r[(k=n+((a=(a+1|0)%(0|s)|0)<<3)|0)>>2])==(0|c)&&(0|r[k+4>>2])==(0|h))break;i=i+1|0}if(70==(0|S)&&(S=0,!0&100663296==(117440512&u|0)))break;r[(k=e+(o<<3)|0)>>2]=d,r[k+4>>2]=l,o=o+1|0}}while(0);if((0|(t=t+1|0))>=(0|s)){s=f;break e}d=0|r[(l=C+(t<<3)|0)>>2],l=0|r[l+4>>2]}for(t=0,o=0;;){do{if(!(0==(0|d)&0==(0|l))){if(h=0|xe(0|d,0|l,52),x(),(0|(h&=15))>=(0|y))if((0|h)!=(0|y))if(i=d|p,a=-15728641&l|m,h>>>0<_>>>0)h=a;else{c=y;do{k=0|Ce(7,0,3*(14-c|0)|0),c=c+1|0,i|=k,a=0|x()|a}while(c>>>0<h>>>0);h=a}else i=d,h=l;else i=0,h=0;for(c=0|we(0|i,0|h,0|s,0|g),x(),a=0;;){if((0|a)>(0|s)){S=98;break t}if((-117440513&(u=0|r[4+(k=n+(c<<3)|0)>>2])|0)==(0|h)&&(0|r[k>>2])==(0|i)){S=93;break}if((0|r[(k=n+((c=(c+1|0)%(0|s)|0)<<3)|0)>>2])==(0|i)&&(0|r[k+4>>2])==(0|h))break;a=a+1|0}if(93==(0|S)&&(S=0,!0&100663296==(117440512&u|0)))break;r[(k=e+(o<<3)|0)>>2]=d,r[k+4>>2]=l,o=o+1|0}}while(0);if((0|(t=t+1|0))>=(0|s)){s=f;break e}d=0|r[(l=C+(t<<3)|0)>>2],l=0|r[l+4>>2]}}else o=0,s=f}else o=0,s=0}while(0);if(De(0|n,0,0|w),Ee(0|C,0|A,s<<3|0),be(A),!s)break;e=e+(o<<3)|0}return 41==(0|S)?(be(C),be(n),0|(k=-1)):51==(0|S)?(be(C),be(n),0|(k=-2)):58==(0|S)?(be(C),be(n),0|(k=-3)):98==(0|S)?(be(A),be(C),be(n),0|(k=-1)):(99==(0|S)&&Ee(0|e,0|C,s<<3|0),be(C),be(n),0|(k=0))},_destroyLinkedPolygon:function(t){var e=0,i=0,n=0,s=0;if(t|=0)for(n=1;;){if(0|(e=0|r[t>>2]))do{if(0|(i=0|r[e>>2]))do{s=i,i=0|r[i+16>>2],be(s)}while(0!=(0|i));s=e,e=0|r[e+8>>2],be(s)}while(0!=(0|e));if(e=t,t=0|r[t+8>>2],n||be(e),!t)break;n=0}},_edgeLengthKm:function(t){return+ +s[20752+((t|=0)<<3)>>3]},_edgeLengthM:function(t){return+ +s[20880+((t|=0)<<3)>>3]},_emscripten_replace_memory:function(t){return n=new Int8Array(t),new Uint8Array(t),r=new Int32Array(t),new Float32Array(t),s=new Float64Array(t),i=t,!0},_exactEdgeLengthKm:function(t,e){var i,n,o=0,a=0,l=0,h=0,p=0,f=0;if(n=P,P=P+176|0,Zt(t|=0,e|=0,i=n),(0|(t=0|r[i>>2]))<=1)return P=n,+(l=0);e=t+-1|0,t=0,o=0,a=+s[i+8>>3],l=+s[i+16>>3];do{p=a,h=l,h=(f=+d(.5*((a=+s[i+8+((t=t+1|0)<<4)>>3])-p)))*f+(h=+d(.5*((l=+s[i+8+(t<<4)+8>>3])-h)))*(+u(+p)*+u(+a)*h),o+=2*+A(+ +c(+h),+ +c(+(1-h)))}while((0|t)!=(0|e));return P=n,+(f=6371.007180918475*o)},_exactEdgeLengthM:function(t,e){var i,n,o=0,a=0,l=0,h=0,p=0,f=0;if(n=P,P=P+176|0,Zt(t|=0,e|=0,i=n),(0|(t=0|r[i>>2]))<=1)return P=n,+(l=0);e=t+-1|0,t=0,o=0,a=+s[i+8>>3],l=+s[i+16>>3];do{p=a,h=l,h=(f=+d(.5*((a=+s[i+8+((t=t+1|0)<<4)>>3])-p)))*f+(h=+d(.5*((l=+s[i+8+(t<<4)+8>>3])-h)))*(+u(+p)*+u(+a)*h),o+=2*+A(+ +c(+h),+ +c(+(1-h)))}while((0|t)!=(0|e));return P=n,+(f=6371.007180918475*o*1e3)},_exactEdgeLengthRads:function(t,e){var i,n,o=0,a=0,l=0,h=0,p=0,f=0;if(n=P,P=P+176|0,Zt(t|=0,e|=0,i=n),(0|(t=0|r[i>>2]))<=1)return P=n,+(l=0);e=t+-1|0,t=0,o=0,a=+s[i+8>>3],l=+s[i+16>>3];do{p=a,h=l,h=(f=+d(.5*((a=+s[i+8+((t=t+1|0)<<4)>>3])-p)))*f+(h=+d(.5*((l=+s[i+8+(t<<4)+8>>3])-h)))*(+u(+a)*+u(+p)*h),o+=2*+A(+ +c(+h),+ +c(+(1-h)))}while((0|t)<(0|e));return P=n,+o},_experimentalH3ToLocalIj:function(t,e,i,n,r){var s,o;return r|=0,o=P,P=P+16|0,(t=0|Jt(t|=0,e|=0,i|=0,n|=0,s=o))||(pt(s,r),t=0),P=o,0|t},_experimentalLocalIjToH3:function(t,e,i,n){var r,s;return t|=0,e|=0,n|=0,r=P,P=P+16|0,ft(i|=0,s=r),n=0|te(t,e,s,n),P=r,0|n},_free:be,_geoToH3:jt,_getDestinationH3IndexFromUnidirectionalEdge:function(t,e){t|=0;var i,n,s=0;return i=P,P=P+16|0,s=i,!0&268435456==(2013265920&(e|=0)|0)?(n=0|xe(0|t,0|e,56),x(),r[s>>2]=0,s=0|R(t,-2130706433&e|134217728,7&n,s),e=0|x(),w(0|e),P=i,0|s):(s=0,w(0|(e=0)),P=i,0|s)},_getH3IndexesFromUnidirectionalEdge:function(t,e,i){t|=0;var n,s,o,a,l=0;o=P,P=P+16|0,n=o,s=-2130706433&(e|=0)|134217728,r[(l=i|=0)>>2]=(a=!0&268435456==(2013265920&e|0))?t:0,r[l+4>>2]=a?s:0,a?(e=0|xe(0|t,0|e,56),x(),r[n>>2]=0,t=0|R(t,s,7&e,n),e=0|x()):(t=0,e=0),r[(l=i+8|0)>>2]=t,r[l+4>>2]=e,P=o},_getH3UnidirectionalEdge:function(t,e,i,n){var s,o,a=0,l=0,c=0,h=0,u=0;if(o=P,P=P+16|0,s=o,!(0|Wt(t|=0,e|=0,i|=0,n|=0)))return h=0,w(0|(c=0)),P=o,0|h;for(c=-2130706433&e,a=(a=0==(0|Rt(t,e)))?1:2;r[s>>2]=0,l=a+1|0,!((0|(u=0|R(t,e,a,s)))==(0|i)&(0|x())==(0|n));){if(!(l>>>0<7)){a=0,t=0,h=6;break}a=l}return 6==(0|h)?(w(0|a),P=o,0|t):(u=0|Ce(0|a,0,56),h=0|c|x()|268435456,u|=t,w(0|h),P=o,0|u)},_getH3UnidirectionalEdgeBoundary:Zt,_getH3UnidirectionalEdgesFromHexagon:function(t,e,i){i|=0;var n,s=0;n=0==(0|Rt(t|=0,e|=0)),e&=-2130706433,r[(s=i)>>2]=n?t:0,r[s+4>>2]=n?285212672|e:0,r[(s=i+8|0)>>2]=t,r[s+4>>2]=301989888|e,r[(s=i+16|0)>>2]=t,r[s+4>>2]=318767104|e,r[(s=i+24|0)>>2]=t,r[s+4>>2]=335544320|e,r[(s=i+32|0)>>2]=t,r[s+4>>2]=352321536|e,r[(i=i+40|0)>>2]=t,r[i+4>>2]=369098752|e},_getOriginH3IndexFromUnidirectionalEdge:function(t,e){var i;return t|=0,w(0|((i=!0&268435456==(2013265920&(e|=0)|0))?-2130706433&e|134217728:0)),0|(i?t:0)},_getPentagonIndexes:Gt,_getRes0Indexes:function(t){t|=0;var e=0,i=0,n=0;e=0;do{Ce(0|e,0,45),n=134225919|x(),r[(i=t+(e<<3)|0)>>2]=-1,r[i+4>>2]=n,e=e+1|0}while(122!=(0|e))},_h3Distance:function(t,e,i,n){var r,s,o;return i|=0,n|=0,o=P,P=P+32|0,s=o,t=0==(0|Jt(t|=0,e|=0,t,e,r=o+12|0))&&0==(0|Jt(t,e,i,n,s))?0|dt(r,s):-1,P=o,0|t},_h3GetBaseCell:Pt,_h3GetFaces:function t(e,i,n){n|=0;var s,o=0,a=0,l=0,c=0,h=0,u=0,d=0,p=0;s=P,P=P+128|0,d=s+112|0,l=s+96|0,p=s,a=0|xe(0|(e|=0),0|(i|=0),52),x(),r[d>>2]=h=15&a,c=0|xe(0|e,0|i,45),x(),c&=127;t:do{if(0|F(c)){if(0|h)for(o=1;;){if(!(0==((u=0|Ce(7,0,3*(15-o|0)|0))&e|0)&0==((0|x())&i|0))){a=0;break t}if(!(o>>>0<h>>>0))break;o=o+1|0}if(!(1&a))return u=0|Ce(h+1|0,0,52),p=0|x()|-15728641&i,t((u|e)&~(d=0|Ce(7,0,3*(14-h|0)|0)),p&~(0|x()),n),void(P=s);a=1}else a=0}while(0);Ht(e,i,l),a?(yt(l,d,p),u=5):(St(l,d,p),u=6);t:do{if(0|F(c))if(h)for(o=1;;){if(!(0==((c=0|Ce(7,0,3*(15-o|0)|0))&e|0)&0==((0|x())&i|0))){o=8;break t}if(!(o>>>0<h>>>0)){o=20;break}o=o+1|0}else o=20;else o=8}while(0);if(De(0|n,-1,0|o),a){a=0;do{for(xt(l=p+(a<<4)|0,0|r[d>>2]),l=0|r[l>>2],o=0;!(-1==(0|(h=0|r[(c=n+(o<<2)|0)>>2]))|(0|h)==(0|l));)o=o+1|0;r[c>>2]=l,a=a+1|0}while((0|a)!=(0|u))}else{a=0;do{for(wt(l=p+(a<<4)|0,0|r[d>>2],0,1),l=0|r[l>>2],o=0;!(-1==(0|(h=0|r[(c=n+(o<<2)|0)>>2]))|(0|h)==(0|l));)o=o+1|0;r[c>>2]=l,a=a+1|0}while((0|a)!=(0|u))}P=s},_h3IndexesAreNeighbors:Wt,_h3IsPentagon:Rt,_h3IsResClassIII:function(t,e){return e=0|xe(0|(t|=0),0|(e|=0),52),x(),1&e|0},_h3IsValid:Ot,_h3Line:function(t,e,i,n,s){i|=0,n|=0,s|=0;var o,a,c=0,h=0,u=0,d=0,p=0,f=0,m=0,g=0,A=0,b=0,v=0,_=0,y=0,w=0,x=0,C=0;if(o=P,P=P+48|0,h=o+12|0,a=o,0==(0|Jt(t|=0,e|=0,t,e,c=o+24|0))&&0==(0|Jt(t,e,i,n,h))){if((0|(x=0|dt(c,h)))<0)return P=o,0|x;for(r[c>>2]=0,r[c+4>>2]=0,r[c+8>>2]=0,r[h>>2]=0,r[h+4>>2]=0,r[h+8>>2]=0,Jt(t,e,t,e,c),Jt(t,e,i,n,h),mt(c),mt(h),x?(w=c,i=f=0|r[c>>2],n=m=0|r[(_=c+4|0)>>2],c=g=0|r[(y=c+8|0)>>2],b=+((0|r[h>>2])-f|0)/(A=+(0|x)),v=+((0|r[h+4>>2])-m|0)/A,A=+((0|r[h+8>>2])-g|0)/A):(_=n=c+4|0,y=g=c+8|0,w=c,i=0|r[c>>2],n=0|r[n>>2],c=0|r[g>>2],b=0,v=0,A=0),r[a>>2]=i,r[(g=a+4|0)>>2]=n,r[(m=a+8|0)>>2]=c,f=0;;){C=b*(d=+(0|f))+ +(0|i),u=v*d+ +(0|r[_>>2]),d=A*d+ +(0|r[y>>2]),n=~~+ke(+C),h=~~+ke(+u),i=~~+ke(+d),C=+l(+(+(0|n)-C)),u=+l(+(+(0|h)-u)),d=+l(+(+(0|i)-d));do{if(!(C>u&C>d)){if(p=0-n|0,u>d){c=p-i|0;break}c=h,i=p-h|0;break}n=0-(h+i)|0,c=h}while(0);if(r[a>>2]=n,r[g>>2]=c,r[m>>2]=i,gt(a),te(t,e,a,s+(f<<3)|0),(0|f)==(0|x))break;f=f+1|0,i=0|r[w>>2]}return P=o,0}return P=o,-1},_h3LineSize:function(t,e,i,n){var r,s,o;return i|=0,n|=0,o=P,P=P+32|0,s=o,t=0==(0|Jt(t|=0,e|=0,t,e,r=o+12|0))&&0==(0|Jt(t,e,i,n,s))?0|dt(r,s):-1,P=o,(t>>>31^1)+t|0},_h3SetToLinkedGeo:function(t,e,i){i|=0;var n,s,o,a=0;if(o=P,P=P+32|0,n=o,function(t,e,i){t|=0,i|=0;var n,s,o=0,a=0,l=0,c=0,h=0;if(s=P,P=P+176|0,n=s,(0|(e|=0))<1)return ce(i,0,0),void(P=s);c=0|xe(0|r[(c=t)>>2],0|r[c+4>>2],52),x(),ce(i,(0|e)>6?e:6,15&c),c=0;do{if($t(0|r[(o=t+(c<<3)|0)>>2],0|r[o+4>>2],n),(0|(o=0|r[n>>2]))>0){h=0;do{l=n+8+(h<<4)|0,(a=0|fe(i,o=n+8+(((0|(h=h+1|0))%(0|o)|0)<<4)|0,l))?de(i,a):pe(i,l,o),o=0|r[n>>2]}while((0|h)<(0|o))}c=c+1|0}while((0|c)!=(0|e));P=s}(t|=0,e|=0,s=o+16|0),r[i>>2]=0,r[i+4>>2]=0,r[i+8>>2]=0,!(t=0|ue(s)))return Qt(i),he(s),void(P=o);do{e=0|qt(i);do{Yt(e,t),r[n>>2]=r[(a=t+16|0)>>2],r[n+4>>2]=r[a+4>>2],r[n+8>>2]=r[a+8>>2],r[n+12>>2]=r[a+12>>2],de(s,t),t=0|me(s,n)}while(0!=(0|t));t=0|ue(s)}while(0!=(0|t));Qt(i),he(s),P=o},_h3ToCenterChild:function(t,e,i){i|=0;var n=0,r=0;if(n=0|xe(0|(t|=0),0|(e|=0),52),x(),(0|i)<16&(0|(n&=15))<=(0|i)){if((0|n)!=(0|i)&&(t|=r=0|Ce(0|i,0,52),e=0|x()|-15728641&e,(0|n)<(0|i)))do{r=0|Ce(7,0,3*(14-n|0)|0),n=n+1|0,t&=~r,e&=~(0|x())}while((0|n)<(0|i))}else e=0,t=0;return w(0|e),0|t},_h3ToChildren:Tt,_h3ToGeo:Kt,_h3ToGeoBoundary:$t,_h3ToParent:Mt,_h3UnidirectionalEdgeIsValid:function(t,e){var i=0;if(!(!0&268435456==(2013265920&(e|=0)|0)))return 0;switch(i=0|xe(0|(t|=0),0|e,56),x(),7&i){case 0:case 7:return 0}return!0&16777216==(117440512&e|0)&0!=(0|Rt(t,i=-2130706433&e|134217728))?0|(i=0):0|(i=0|Ot(t,i))},_hexAreaKm2:function(t){return+ +s[20496+((t|=0)<<3)>>3]},_hexAreaM2:function(t){return+ +s[20624+((t|=0)<<3)>>3]},_hexRing:function(t,e,i,n){t|=0,e|=0,n|=0;var s,o=0,a=0,l=0,c=0,h=0,u=0,d=0;if(s=P,P=P+16|0,d=s,!(i|=0))return r[(d=n)>>2]=t,r[d+4>>2]=e,P=s,0;r[d>>2]=0;t:do{if(0|Rt(t,e))t=1;else{if(a=(0|i)>0){o=0,u=t;do{if(0==(0|(u=0|R(u,e,4,d)))&0==(0|(e=0|x()))){t=2;break t}if(o=o+1|0,0|Rt(u,e)){t=1;break t}}while((0|o)<(0|i));if(r[(h=n)>>2]=u,r[h+4>>2]=e,h=i+-1|0,a){a=0,l=1,o=u,t=e;do{if(0==(0|(o=0|R(o,t,2,d)))&0==(0|(t=0|x()))){t=2;break t}if(r[(c=n+(l<<3)|0)>>2]=o,r[c+4>>2]=t,l=l+1|0,0|Rt(o,t)){t=1;break t}a=a+1|0}while((0|a)<(0|i));c=0,a=l;do{if(0==(0|(o=0|R(o,t,3,d)))&0==(0|(t=0|x()))){t=2;break t}if(r[(l=n+(a<<3)|0)>>2]=o,r[l+4>>2]=t,a=a+1|0,0|Rt(o,t)){t=1;break t}c=c+1|0}while((0|c)<(0|i));l=0;do{if(0==(0|(o=0|R(o,t,1,d)))&0==(0|(t=0|x()))){t=2;break t}if(r[(c=n+(a<<3)|0)>>2]=o,r[c+4>>2]=t,a=a+1|0,0|Rt(o,t)){t=1;break t}l=l+1|0}while((0|l)<(0|i));l=0;do{if(0==(0|(o=0|R(o,t,5,d)))&0==(0|(t=0|x()))){t=2;break t}if(r[(c=n+(a<<3)|0)>>2]=o,r[c+4>>2]=t,a=a+1|0,0|Rt(o,t)){t=1;break t}l=l+1|0}while((0|l)<(0|i));l=0;do{if(0==(0|(o=0|R(o,t,4,d)))&0==(0|(t=0|x()))){t=2;break t}if(r[(c=n+(a<<3)|0)>>2]=o,r[c+4>>2]=t,a=a+1|0,0|Rt(o,t)){t=1;break t}l=l+1|0}while((0|l)<(0|i));for(l=0;;){if(0==(0|(o=0|R(o,t,6,d)))&0==(0|(t=0|x()))){t=2;break t}if((0|l)!=(0|h)){if(r[(c=n+(a<<3)|0)>>2]=o,r[c+4>>2]=t,0|Rt(o,t)){t=1;break t}a=a+1|0}if((0|(l=l+1|0))>=(0|i)){l=u,a=e;break}}}else l=u,o=u,a=e,t=e}else r[(l=n)>>2]=t,r[l+4>>2]=e,l=t,o=t,a=e,t=e;t=1&((0|l)!=(0|o)|(0|a)!=(0|t))}}while(0);return P=s,0|t},_i64Subtract:_e,_kRing:O,_kRingDistances:function(t,e,i,n,r){var s;if(0|M(t|=0,e|=0,i|=0,n|=0,r|=0)){if(De(0|n,0,(s=1+(0|v(3*i|0,i+1|0))|0)<<3|0),0|r)return De(0|r,0,s<<2|0),void T(t,e,i,n,r,s,0);(r=0|ve(s,4))&&(T(t,e,i,n,r,s,0),be(r))}},_llvm_minnum_f64:Se,_llvm_round_f64:ke,_malloc:Ae,_maxFaceCount:function(t,e){var i=0,n=0;if(n=0|xe(0|(t|=0),0|(e|=0),45),x(),!(0|F(127&n)))return 2;if(n=0|xe(0|t,0|e,52),x(),!(n&=15))return 5;for(i=1;;){if(!(0==((0|Ce(7,0,3*(15-i|0)|0))&t|0)&0==((0|x())&e|0))){i=2,t=6;break}if(!(i>>>0<n>>>0)){i=5,t=6;break}i=i+1|0}return 6==(0|t)?0|i:0},_maxH3ToChildrenSize:function(t,e,i){return i|=0,t=0|xe(0|(t|=0),0|(e|=0),52),x(),(0|i)<16&(0|(t&=15))<=(0|i)?0|(i=0|ee(7,i-t|0)):0|(i=0)},_maxKringSize:function(t){return 1+(0|v(3*(t|=0)|0,t+1|0))|0},_maxPolyfillSize:function(t,e){e|=0;var i,n=0,s=0,o=0,a=0,l=0;if(i=P,P=P+48|0,o=i+8|0,a=0|r[4+(l=t|=0)>>2],r[(n=s=i)>>2]=r[l>>2],r[n+4>>2]=a,ne(s,o),o=0|$(o,e),e=0|r[s>>2],(0|(s=0|r[t+8>>2]))<=0)return P=i,0|(l=(a=(0|o)<(0|(l=e)))?l:o)+12;n=0|r[t+12>>2],t=0;do{e=(0|r[n+(t<<3)>>2])+e|0,t=t+1|0}while((0|t)<(0|s));return P=i,0|(l=(l=(0|o)<(0|e))?e:o)+12},_maxUncompactSize:function(t,e,i){t|=0;var n=0,s=0,o=0,a=0;if((0|(e|=0))<=0)return 0;if((0|(i|=0))>=16){for(n=0;;){if(!(0==(0|r[(a=t+(n<<3)|0)>>2])&0==(0|r[a+4>>2]))){n=-1,s=13;break}if((0|(n=n+1|0))>=(0|e)){n=0,s=13;break}}if(13==(0|s))return 0|n}n=0,a=0;t:for(;;){o=0|r[(s=t+(a<<3)|0)>>2],s=0|r[s+4>>2];do{if(!(0==(0|o)&0==(0|s))){if(s=0|xe(0|o,0|s,52),x(),(0|(s&=15))>(0|i)){n=-1,s=13;break t}if((0|s)==(0|i)){n=n+1|0;break}n=(0|ee(7,i-s|0))+n|0;break}}while(0);if((0|(a=a+1|0))>=(0|e)){s=13;break}}return 13==(0|s)?0|n:0},_memcpy:Ee,_memset:De,_numHexagons:function(t){var e;return t=0|r[(e=21008+((t|=0)<<3)|0)>>2],w(0|r[e+4>>2]),0|t},_pentagonIndexCount:function(){return 12},_pointDistKm:Dt,_pointDistM:function(t,e){var i,n,r,o=0;return o=(r=+d(.5*((n=+s[(e|=0)>>3])-(i=+s[(t|=0)>>3]))))*r+(o=+d(.5*(+s[e+8>>3]-+s[t+8>>3])))*(+u(+n)*+u(+i)*o),2*+A(+ +c(+o),+ +c(+(1-o)))*6371.007180918475*1e3},_pointDistRads:function(t,e){var i,n,r,o=0;return o=(r=+d(.5*((n=+s[(e|=0)>>3])-(i=+s[(t|=0)>>3]))))*r+(o=+d(.5*(+s[e+8>>3]-+s[t+8>>3])))*(+u(+n)*+u(+i)*o),2*+A(+ +c(+o),+ +c(+(1-o)))},_polyfill:function(t,e,i){var n,s=0,o=0,a=0,l=0,c=0;if(n=P,P=P+48|0,s=n+8|0,o=n,0|function(t,e,i){e|=0,i|=0;var n,s,o,a,l,c,h=0,u=0,d=0,p=0,f=0,m=0,g=0,A=0,b=0,v=0,_=0,y=0,w=0,S=0,k=0,E=0,D=0,I=0,O=0,R=0,F=0,L=0,U=0,B=0;if(l=P,P=P+112|0,s=l+80|0,m=l+72|0,o=l,a=l+56|0,(c=0|Ae(32+(r[(g=8+(t|=0)|0)>>2]<<5)|0))||C(22848,22448,800,22456),re(t,c),h=0|r[(d=t)+4>>2],r[(f=m)>>2]=r[d>>2],r[f+4>>2]=h,ne(m,s),f=0|$(s,e),h=0|r[m>>2],(0|(d=0|r[g>>2]))>0){p=0|r[t+12>>2],u=0;do{h=(0|r[p+(u<<3)>>2])+h|0,u=u+1|0}while((0|u)!=(0|d))}if(u=0|ve(n=(f=(0|f)<(0|h)?h:f)+12|0,8),A=0|ve(n,8),r[s>>2]=0,B=0|r[(U=t)+4>>2],r[(h=m)>>2]=r[U>>2],r[h+4>>2]=B,0|(h=0|V(m,n,e,s,u,A)))return be(u),be(A),be(c),P=l,0|h;t:do{if((0|r[g>>2])>0){for(d=t+12|0,h=0;p=0|V((0|r[d>>2])+(h<<3)|0,n,e,s,u,A),h=h+1|0,!(0|p);)if((0|h)>=(0|r[g>>2]))break t;return be(u),be(A),be(c),P=l,0|p}}while(0);(0|f)>-12&&De(0|A,0,((0|n)>1?n:1)<<3|0);t:do{if((0|r[s>>2])>0){B=((0|n)<0)<<31>>31,I=u,O=A,R=u,F=u,L=A,U=u,h=u,S=u,k=A,E=A,D=A,u=A;e:for(;;){for(w=0|r[s>>2],_=0,y=0,d=0;;){f=(p=o)+56|0;do{r[p>>2]=0,p=p+4|0}while((0|p)<(0|f));if(0|M(m=0|r[(e=I+(_<<3)|0)>>2],e=0|r[e+4>>2],1,o,0)){f=(p=o)+56|0;do{r[p>>2]=0,p=p+4|0}while((0|p)<(0|f));0|(p=0|ve(7,4))&&(T(m,e,1,o,p,7,0),be(p))}v=0;do{A=0|r[(b=o+(v<<3)|0)>>2],b=0|r[b+4>>2];i:do{if(!(0==(0|A)&0==(0|b))){if(m=0|we(0|A,0|b,0|n,0|B),x(),!(0==(0|(e=0|r[(f=p=i+(m<<3)|0)>>2]))&0==(0|(f=0|r[f+4>>2]))))for(g=0;;){if((0|g)>(0|n))break e;if((0|e)==(0|A)&(0|f)==(0|b))break i;if(0==(0|(e=0|r[(f=p=i+((m=(m+1|0)%(0|n)|0)<<3)|0)>>2]))&0==(0|(f=0|r[f+4>>2])))break;g=g+1|0}0==(0|A)&0==(0|b)||(Kt(A,b,a),0|se(t,c,a)&&(r[(g=p)>>2]=A,r[g+4>>2]=b,r[(g=O+(d<<3)|0)>>2]=A,r[g+4>>2]=b,d=d+1|0))}}while(0);v=v+1|0}while(v>>>0<7);if((0|(y=y+1|0))>=(0|w))break;_=_+1|0}if((0|w)>0&&De(0|R,0,w<<3|0),r[s>>2]=d,!((0|d)>0))break t;A=u,b=D,v=U,_=E,y=k,w=O,u=S,D=h,E=F,k=R,S=A,h=b,U=L,L=v,F=_,R=y,O=I,I=w}return be(F),be(L),be(c),P=l,-1}h=A}while(0);return be(c),be(u),be(h),P=l,0}(t|=0,e|=0,i|=0)){if(a=0|r[(c=t)+4>>2],r[(l=o)>>2]=r[c>>2],r[l+4>>2]=a,ne(o,s),l=0|$(s,e),e=0|r[o>>2],(0|(a=0|r[t+8>>2]))>0){o=0|r[t+12>>2],s=0;do{e=(0|r[o+(s<<3)>>2])+e|0,s=s+1|0}while((0|s)!=(0|a))}(0|(e=(0|l)<(0|e)?e:l))<=-12||De(0|i,0,8+(((0|(c=e+11|0))>0?c:0)<<3)|0),P=n}else P=n},_res0IndexCount:function(){return 122},_round:Ie,_sbrk:Pe,_sizeOfCoordIJ:function(){return 8},_sizeOfGeoBoundary:function(){return 168},_sizeOfGeoCoord:function(){return 16},_sizeOfGeoPolygon:function(){return 16},_sizeOfGeofence:function(){return 8},_sizeOfH3Index:function(){return 8},_sizeOfLinkedGeoPolygon:function(){return 12},_uncompact:function(t,e,i,n,s){t|=0,i|=0,n|=0;var o=0,a=0,l=0,c=0,h=0,u=0;if((0|(e|=0))<=0)return 0;if((0|(s|=0))>=16){for(o=0;;){if(!(0==(0|r[(u=t+(o<<3)|0)>>2])&0==(0|r[u+4>>2]))){o=14;break}if((0|(o=o+1|0))>=(0|e)){a=0,o=16;break}}if(14==(0|o))return 0|((0|n)>0?-2:-1);if(16==(0|o))return 0|a}o=0,u=0;t:for(;;){a=0|r[(l=h=t+(u<<3)|0)>>2],l=0|r[l+4>>2];do{if(!(0==(0|a)&0==(0|l))){if((0|o)>=(0|n)){a=-1,o=16;break t}if(c=0|xe(0|a,0|l,52),x(),(0|(c&=15))>(0|s)){a=-2,o=16;break t}if((0|c)==(0|s)){r[(h=i+(o<<3)|0)>>2]=a,r[h+4>>2]=l,o=o+1|0;break}if((0|(a=(0|ee(7,s-c|0))+o|0))>(0|n)){a=-1,o=16;break t}Tt(0|r[h>>2],0|r[h+4>>2],s,i+(o<<3)|0),o=a}}while(0);if((0|(u=u+1|0))>=(0|e)){a=0,o=16;break}}return 16==(0|o)?0|a:0},establishStackSpace:function(t,e){P=t|=0},stackAlloc:function(t){var e;return e=P,P=15+(P=P+(t|=0)|0)&-16,0|e},stackRestore:function(t){P=t|=0},stackSave:function(){return 0|P}}}({Math,Int8Array,Int32Array,Uint8Array,Float32Array,Float64Array},{a:at,b:function(t){c=t},c:h,d:function(t,e,i,n){at("Assertion failed: "+w(t)+", at: "+[e?w(e):"unknown filename",i,n?w(n):"unknown function"])},e:function(t){return i.___errno_location&&(b[i.___errno_location()>>2]=t),t},f:$,g:function(t,e,i){g.set(g.subarray(e,e+i),t)},h:function(t){var e=$();if(t>2130706432)return!1;for(var i=Math.max(e,16777216);i<t;)i=i<=536870912?x(2*i,16777216):Math.min(x((3*i+2147483648)/4,16777216),2130706432);return!!G(i)},i:function(t){at("OOM")},j:function(t){return t},k:H,l:G,m:K,n:function(){var t=K();return i.extraStackTrace&&(t+="\n"+i.extraStackTrace()),H(t)},o:24032,p:24016},f),X=(i.___uremdi3=Q.___uremdi3,i._bitshift64Lshr=Q._bitshift64Lshr,i._bitshift64Shl=Q._bitshift64Shl,i._calloc=Q._calloc,i._cellAreaKm2=Q._cellAreaKm2,i._cellAreaM2=Q._cellAreaM2,i._cellAreaRads2=Q._cellAreaRads2,i._compact=Q._compact,i._destroyLinkedPolygon=Q._destroyLinkedPolygon,i._edgeLengthKm=Q._edgeLengthKm,i._edgeLengthM=Q._edgeLengthM,i._emscripten_replace_memory=Q._emscripten_replace_memory),J=(i._exactEdgeLengthKm=Q._exactEdgeLengthKm,i._exactEdgeLengthM=Q._exactEdgeLengthM,i._exactEdgeLengthRads=Q._exactEdgeLengthRads,i._experimentalH3ToLocalIj=Q._experimentalH3ToLocalIj,i._experimentalLocalIjToH3=Q._experimentalLocalIjToH3,i._free=Q._free,i._geoToH3=Q._geoToH3,i._getDestinationH3IndexFromUnidirectionalEdge=Q._getDestinationH3IndexFromUnidirectionalEdge,i._getH3IndexesFromUnidirectionalEdge=Q._getH3IndexesFromUnidirectionalEdge,i._getH3UnidirectionalEdge=Q._getH3UnidirectionalEdge,i._getH3UnidirectionalEdgeBoundary=Q._getH3UnidirectionalEdgeBoundary,i._getH3UnidirectionalEdgesFromHexagon=Q._getH3UnidirectionalEdgesFromHexagon,i._getOriginH3IndexFromUnidirectionalEdge=Q._getOriginH3IndexFromUnidirectionalEdge,i._getPentagonIndexes=Q._getPentagonIndexes,i._getRes0Indexes=Q._getRes0Indexes,i._h3Distance=Q._h3Distance,i._h3GetBaseCell=Q._h3GetBaseCell,i._h3GetFaces=Q._h3GetFaces,i._h3IndexesAreNeighbors=Q._h3IndexesAreNeighbors,i._h3IsPentagon=Q._h3IsPentagon,i._h3IsResClassIII=Q._h3IsResClassIII,i._h3IsValid=Q._h3IsValid,i._h3Line=Q._h3Line,i._h3LineSize=Q._h3LineSize,i._h3SetToLinkedGeo=Q._h3SetToLinkedGeo,i._h3ToCenterChild=Q._h3ToCenterChild,i._h3ToChildren=Q._h3ToChildren,i._h3ToGeo=Q._h3ToGeo,i._h3ToGeoBoundary=Q._h3ToGeoBoundary,i._h3ToParent=Q._h3ToParent,i._h3UnidirectionalEdgeIsValid=Q._h3UnidirectionalEdgeIsValid,i._hexAreaKm2=Q._hexAreaKm2,i._hexAreaM2=Q._hexAreaM2,i._hexRing=Q._hexRing,i._i64Subtract=Q._i64Subtract,i._kRing=Q._kRing,i._kRingDistances=Q._kRingDistances,i._llvm_minnum_f64=Q._llvm_minnum_f64,i._llvm_round_f64=Q._llvm_round_f64,i._malloc=Q._malloc,i._maxFaceCount=Q._maxFaceCount,i._maxH3ToChildrenSize=Q._maxH3ToChildrenSize,i._maxKringSize=Q._maxKringSize,i._maxPolyfillSize=Q._maxPolyfillSize,i._maxUncompactSize=Q._maxUncompactSize,i._memcpy=Q._memcpy,i._memset=Q._memset,i._numHexagons=Q._numHexagons,i._pentagonIndexCount=Q._pentagonIndexCount,i._pointDistKm=Q._pointDistKm,i._pointDistM=Q._pointDistM,i._pointDistRads=Q._pointDistRads,i._polyfill=Q._polyfill,i._res0IndexCount=Q._res0IndexCount,i._round=Q._round,i._sbrk=Q._sbrk,i._sizeOfCoordIJ=Q._sizeOfCoordIJ,i._sizeOfGeoBoundary=Q._sizeOfGeoBoundary,i._sizeOfGeoCoord=Q._sizeOfGeoCoord,i._sizeOfGeoPolygon=Q._sizeOfGeoPolygon,i._sizeOfGeofence=Q._sizeOfGeofence,i._sizeOfH3Index=Q._sizeOfH3Index,i._sizeOfLinkedGeoPolygon=Q._sizeOfLinkedGeoPolygon,i._uncompact=Q._uncompact,i.establishStackSpace=Q.establishStackSpace,i.stackAlloc=Q.stackAlloc),tt=i.stackRestore=Q.stackRestore,et=i.stackSave=Q.stackSave;if(i.asm=Q,i.cwrap=function(t,e,i,n){var r=(i=i||[]).every(function(t){return"number"===t});return"string"!==e&&r&&!n?d(t):function(){return p(t,e,i,arguments)}},i.setValue=function(t,e,i,n){switch("*"===(i=i||"i8").charAt(i.length-1)&&(i="i32"),i){case"i1":case"i8":m[t>>0]=e;break;case"i16":A[t>>1]=e;break;case"i32":b[t>>2]=e;break;case"i64":B=[e>>>0,(U=e,+O(U)>=1?U>0?(0|R(+T(U/4294967296),4294967295))>>>0:~~+M((U-+(~~U>>>0))/4294967296)>>>0:0)],b[t>>2]=B[0],b[t+4>>2]=B[1];break;case"float":v[t>>2]=e;break;case"double":_[t>>3]=e;break;default:at("invalid type for setValue: "+i)}},i.getValue=function(t,e,i){switch("*"===(e=e||"i8").charAt(e.length-1)&&(e="i32"),e){case"i1":case"i8":return m[t>>0];case"i16":return A[t>>1];case"i32":case"i64":return b[t>>2];case"float":return v[t>>2];case"double":return _[t>>3];default:at("invalid type for getValue: "+e)}return null},i.getTempRet0=h,N){z(N)||(q=N,N=i.locateFile?i.locateFile(q,o):o+q),V++,i.monitorRunDependencies&&i.monitorRunDependencies(V);var it=function(t){t.byteLength&&(t=new Uint8Array(t)),g.set(t,8),i.memoryInitializerRequest&&delete i.memoryInitializerRequest.response,function(t){if(V--,i.monitorRunDependencies&&i.monitorRunDependencies(V),0==V&&(null!==F&&(clearInterval(F),F=null),L)){var e=L;L=null,e()}}()},nt=function(){r(N,it,function(){throw"could not load memory initializer "+N})},rt=Z(N);if(rt)it(rt.buffer);else if(i.memoryInitializerRequest){var st=function(){var t=i.memoryInitializerRequest,e=t.response;if(200!==t.status&&0!==t.status){var n=Z(i.memoryInitializerRequestURL);if(!n)return console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+t.status+", retrying "+N),void nt();e=n.buffer}it(e)};i.memoryInitializerRequest.response?setTimeout(st,0):i.memoryInitializerRequest.addEventListener("load",st)}else nt()}function ot(t){function e(){Y||(Y=!0,u||(k(D),k(I),i.onRuntimeInitialized&&i.onRuntimeInitialized(),function(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)t=i.postRun.shift(),P.unshift(t);var t;k(P)}()))}t=t||s,V>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)t=i.preRun.shift(),E.unshift(t);var t;k(E)}(),V>0||(i.setStatus?(i.setStatus("Running..."),setTimeout(function(){setTimeout(function(){i.setStatus("")},1),e()},1)):e()))}function at(t){throw i.onAbort&&i.onAbort(t),a(t+=""),l(t),u=!0,"abort("+t+"). Build with -s ASSERTIONS=1 for more info."}if(L=function t(){Y||ot(),Y||(L=t)},i.run=ot,i.abort=at,i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return ot(),t}("object"==typeof $I?$I:{}),GI="number",WI={};[["sizeOfH3Index",GI],["sizeOfGeoCoord",GI],["sizeOfGeoBoundary",GI],["sizeOfGeoPolygon",GI],["sizeOfGeofence",GI],["sizeOfLinkedGeoPolygon",GI],["sizeOfCoordIJ",GI],["h3IsValid","number",["number","number"]],["geoToH3","number",[GI,GI,"number"]],["h3ToGeo",null,["number","number",GI]],["h3ToGeoBoundary",null,["number","number",GI]],["maxKringSize",GI,[GI]],["kRing",null,["number","number",GI,GI]],["kRingDistances",null,["number","number",GI,GI,GI]],["hexRing",null,["number","number",GI,GI]],["maxPolyfillSize",GI,[GI,"number"]],["polyfill",null,[GI,"number",GI]],["h3SetToLinkedGeo",null,[GI,GI,GI]],["destroyLinkedPolygon",null,[GI]],["compact",GI,[GI,GI,GI]],["uncompact",GI,[GI,GI,GI,GI,"number"]],["maxUncompactSize",GI,[GI,GI,"number"]],["h3IsPentagon","number",["number","number"]],["h3IsResClassIII","number",["number","number"]],["h3GetBaseCell",GI,["number","number"]],["maxFaceCount",GI,["number","number"]],["h3GetFaces",null,["number","number",GI]],["h3ToParent","number",["number","number","number"]],["h3ToChildren",null,["number","number","number",GI]],["h3ToCenterChild","number",["number","number","number"]],["maxH3ToChildrenSize",GI,["number","number","number"]],["h3IndexesAreNeighbors","number",["number","number","number","number"]],["getH3UnidirectionalEdge","number",["number","number","number","number"]],["getOriginH3IndexFromUnidirectionalEdge","number",["number","number"]],["getDestinationH3IndexFromUnidirectionalEdge","number",["number","number"]],["h3UnidirectionalEdgeIsValid","number",["number","number"]],["getH3IndexesFromUnidirectionalEdge",null,["number","number",GI]],["getH3UnidirectionalEdgesFromHexagon",null,["number","number",GI]],["getH3UnidirectionalEdgeBoundary",null,["number","number",GI]],["h3Distance",GI,["number","number","number","number"]],["h3Line",GI,["number","number","number","number",GI]],["h3LineSize",GI,["number","number","number","number"]],["experimentalH3ToLocalIj",GI,["number","number","number","number",GI]],["experimentalLocalIjToH3",GI,["number","number",GI,GI]],["hexAreaM2",GI,["number"]],["hexAreaKm2",GI,["number"]],["edgeLengthM",GI,["number"]],["edgeLengthKm",GI,["number"]],["pointDistM",GI,[GI,GI]],["pointDistKm",GI,[GI,GI]],["pointDistRads",GI,[GI,GI]],["cellAreaM2",GI,["number","number"]],["cellAreaKm2",GI,["number","number"]],["cellAreaRads2",GI,["number","number"]],["exactEdgeLengthM",GI,["number","number"]],["exactEdgeLengthKm",GI,["number","number"]],["exactEdgeLengthRads",GI,["number","number"]],["numHexagons",GI,["number"]],["getRes0Indexes",null,[GI]],["res0IndexCount",GI],["getPentagonIndexes",null,[GI,GI]],["pentagonIndexCount",GI]].forEach(function(t){WI[t[0]]=$I.cwrap.apply($I,t)});var ZI=WI.sizeOfH3Index(),qI=WI.sizeOfGeoCoord(),YI=WI.sizeOfGeoBoundary(),QI=WI.sizeOfGeoPolygon(),XI=WI.sizeOfGeofence();WI.sizeOfLinkedGeoPolygon(),WI.sizeOfCoordIJ();var JI=/[^0-9a-fA-F]/;function tP(t){if(Array.isArray(t)&&2===t.length&&Number.isInteger(t[0])&&Number.isInteger(t[1]))return t;if("string"!=typeof t||JI.test(t))return[0,0];var e=parseInt(t.substring(0,t.length-8),16);return[parseInt(t.substring(t.length-8),16),e]}function eP(t){if(t>=0)return t.toString(16);var e=nP(8,(t&=2147483647).toString(16));return(parseInt(e[0],16)+8).toString(16)+e.substring(1)}function iP(t,e){return eP(e)+nP(8,eP(t))}function nP(t,e){for(var i=t-e.length,n="",r=0;r<i;r++)n+="0";return n+e}function rP(t,e,i){for(var n=t.length,r=$I._calloc(n,qI),s=i?1:0,o=i?0:1,a=0;a<2*n;a+=2)$I.HEAPF64.set([t[a/2][s],t[a/2][o]].map(yP),r/8+a);return $I.HEAPU32.set([n,r],e/4),e}function sP(t){var e=function(t){return[t,$I.getTempRet0()]}(t),i=e[1];return i?iP(e[0],i):null}function oP(t,e){void 0===e&&(e=0);var i=$I.getValue(t+4*e*2,"i32"),n=$I.getValue(t+4*(2*e+1),"i32");return n?iP(i,n):null}function aP(t,e){for(var i=[],n=0;n<e;n++){var r=oP(t,n);null!==r&&i.push(r)}return i}function lP(t){return 180*$I.getValue(t,"double")/Math.PI}function cP(t){return[lP(t),lP(t+8)]}function hP(t){return[lP(t+8),lP(t)]}function uP(t,e,i){for(var n=$I.getValue(t,"i32"),r=t+8,s=[],o=e?hP:cP,a=0;a<2*n;a+=2)s.push(o(r+8*a));return i&&s.push(s[0]),s}function dP(t){var e=$I._malloc(qI),i=tP(t);WI.h3ToGeo(i[0],i[1],e);var n=cP(e);return $I._free(e),n}function pP(t,e){var i=$I._malloc(YI),n=tP(t);WI.h3ToGeoBoundary(n[0],n[1],i);var r=uP(i,e,e);return $I._free(i),r}function fP(t,e){var i=tP(t);return sP(WI.h3ToParent(i[0],i[1],e))}function mP(t,e,i){if(function(t){if("number"!=typeof t||t<0||t>15||Math.floor(t)!==t)throw new Error("Invalid resolution: "+t)}(e),i=Boolean(i),0===t.length||0===t[0].length)return[];"number"==typeof t[0][0]&&(t=[t]);var n=function(t,e){var i,n=t.length-1,r=$I._calloc(QI),s=0+XI,o=s+4;if(rP(t[0],r+0,e),n>0){i=$I._calloc(n,XI);for(var a=0;a<n;a++)rP(t[a+1],i+XI*a,e)}return $I.setValue(r+s,n,"i32"),$I.setValue(r+o,i,"i32"),r}(t,i),r=WI.maxPolyfillSize(n,e),s=$I._calloc(r,ZI);WI.polyfill(n,e,s);var o=aP(s,r);return $I._free(s),function(t){var e=0+XI,i=e+4;$I._free($I.getValue(t+0+4,"i8*"));var n=$I.getValue(t+e,"i32");if(n>0){for(var r=$I.getValue(t+i,"i32"),s=0;s<n;s++)$I._free($I.getValue(r+XI*s+4,"i8*"));$I._free(r)}$I._free(t)}(n),o}function gP(t){var e=tP(t);return sP(WI.getOriginH3IndexFromUnidirectionalEdge(e[0],e[1]))}function AP(t){var e=tP(t);return sP(WI.getDestinationH3IndexFromUnidirectionalEdge(e[0],e[1]))}function bP(t){var e=tP(t);return Boolean(WI.h3UnidirectionalEdgeIsValid(e[0],e[1]))}function vP(t){var e=tP(t),i=e[0],n=e[1],r=$I._calloc(2,ZI);WI.getH3IndexesFromUnidirectionalEdge(i,n,r);var s=aP(r,2);return $I._free(r),s}function _P(t,e){var i=$I._malloc(YI),n=tP(t);WI.getH3UnidirectionalEdgeBoundary(n[0],n[1],i);var r=uP(i,e);return $I._free(i),r}function yP(t){return t*Math.PI/180}function wP(t){let e=null;const i=t.map(t=>{const i=nI(pP(t,!0),e);return e=i[i.length-1],i}).map(t=>t.reduce((t,e)=>(e[0]<t.minLongitude&&(t.minLongitude=e[0]),e[0]>t.maxLongitude&&(t.maxLongitude=e[0]),e[1]<t.minLatitude&&(t.minLatitude=e[1]),e[1]>t.maxLatitude&&(t.maxLatitude=e[1]),t),{minLongitude:Number.MAX_SAFE_INTEGER,maxLongitude:Number.MIN_SAFE_INTEGER,minLatitude:Number.MAX_SAFE_INTEGER,maxLatitude:Number.MIN_SAFE_INTEGER})).reduce((t,e)=>(e.minLongitude<t.minLongitude&&(t.minLongitude=e.minLongitude),e.maxLongitude>t.maxLongitude&&(t.maxLongitude=e.maxLongitude),e.minLatitude<t.minLatitude&&(t.minLatitude=e.minLatitude),e.maxLatitude>t.maxLatitude&&(t.maxLatitude=e.maxLatitude),t),{minLongitude:Number.MAX_SAFE_INTEGER,maxLongitude:Number.MIN_SAFE_INTEGER,minLatitude:Number.MAX_SAFE_INTEGER,maxLatitude:Number.MIN_SAFE_INTEGER});return[...sE([i.minLongitude,i.minLatitude]),...sE([i.maxLongitude,i.maxLatitude])]}function xP(t){const e=+`0x${t.substr(1)}`;return[Math.round(e/65536)/256,Math.round(e/256%256)/256,Math.round(e%256)/256]}function CP(t){const e=+`0x${t.substr(1)}`;return[Math.round(e/65536),Math.round(e/256%256),Math.round(e%256)]}function SP(t,e){const i=+`0x${t.substr(1)}`,n=Math.min(Math.max(Math.round(i/65536)-e,0),255).toString(16),r=Math.min(Math.max(Math.round(i/256%256)-e,0),255).toString(16),s=Math.min(Math.max(Math.round(i%256)-e,0),255).toString(16);return`#${[1===n.length?`0${n}`:n,1===r.length?`0${r}`:r,1===s.length?`0${s}`:s].join("")}`}let kP=(()=>{class t{constructor(t){this.workerService=t,this.zones$=new Av.a([]),this.zonesById={},this.selectedZone$=new Av.a(null)}refreshZones(){return Object(ue.a)(this,void 0,void 0,function*(){const t=yield this.workerService.zones.list();return this.zonesById=t.reduce((t,e)=>(t[e.id]=e,t),{}),this.zones$.next(t),t})}clear(){this.zones$.next([])}createZone(t){return Object(ue.a)(this,void 0,void 0,function*(){const e=yield this.workerService.zones.create(t);return yield this.refreshZones(),e})}updateZone(t){return Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.zones.update(t),yield this.refreshZones()})}deleteZone(t){return Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.zones.delete(t),yield this.refreshZones()})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(_I.a))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const EP=["#ffffff",[255,255,255]];let DP=(()=>{class t{constructor(t,e,i,n){this.mapConfigService=t,this.mapService=e,this.workerService=i,this.zonesService=n,this.alertRules$=new Av.a([]),this.selectedAlertRuleId$=new Av.a(null),this.selectedAlertRule$=new Av.a(null),this.alertRulesNamesByZoneId={},this.alertRuleColorsById={},this.alertRules$.subscribe(t=>{this.alertRulesNamesByZoneId=t.reduce((t,e)=>{var i,n;const r=null===(i=e.criteria.zone)||void 0===i?void 0:i.zones;(null==r?void 0:r.length)&&r.forEach(i=>{let n=t[i.id];n||(n=t[i.id]=[]),n.push(e.name)});const s=null===(n=e.criteria.passageInZone)||void 0===n?void 0:n.passages;return(null==s?void 0:s.length)&&s.forEach(i=>{let n=t[i.zone.id];n||(n=t[i.zone.id]=[]),n.push(e.name)}),t},{}),this.alertRuleColorsById=t.reduce((t,e)=>(t[e.id]=[e.color,CP(e.color)],t),{})})}refreshAlertRules(){return Object(ue.a)(this,void 0,void 0,function*(){const t=(yield this.workerService.alertRules.list()).map(t=>HI(t,this.zonesService.zonesById));return this.alertRules$.next(t),t})}clear(){this.alertRules$.next([])}selectAlertRule(t){return Object(ue.a)(this,void 0,void 0,function*(){this.selectedAlertRuleId$.next(t);const e=HI(yield this.workerService.alertRules.get(t),this.zonesService.zonesById);if(!this.selectedAlertRule$.value||e.id!==this.selectedAlertRule$.value.id){const t=function(t){return[].concat(t.criteria.passageInZone.enable?t.criteria.passageInZone.passages.flatMap(t=>t.zone.h3indexes):[]).concat(t.criteria.zone.enable?t.criteria.zone.zones.flatMap(t=>t.h3indexes):[])}(e);this.mapService.hasBooted?t.length>0&&this.mapService.fitOn(wP(t)):(this.mapService.resetToDefaultView(),t.length>0&&setTimeout(()=>{this.mapService.fitOn(wP(t),0)},50))}return this.selectedAlertRule$.next(e),e})}deselectAlertRule(){this.selectedAlertRuleId$.next(null),this.selectedAlertRule$.next(null)}updateAlertRulesFilter(t){this.mapConfigService.updateAlertRulesFilter(t)}createAlertRule(t){return Object(ue.a)(this,void 0,void 0,function*(){const e=yield this.workerService.alertRules.create(KI(t));return yield this.refreshAlertRules(),e})}updateAlertRule(t){return Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.alertRules.update(KI(t)),yield this.refreshAlertRules()})}deleteAlertRule(t){return Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.alertRules.delete(t),yield this.refreshAlertRules()})}getAlertRuleColor(t){return this.alertRuleColorsById[t]||EP}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(hI),r.Zb(pI),r.Zb(_I.a),r.Zb(kP))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),IP=(()=>{class t{constructor(){this.alerts$=new Av.a([])}updateAlerts(t){this.alerts$.next(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const PP=[{key:"LineString",name:"Ligne"},{key:"Point",name:"Point"},{key:"Polygon",name:"Zone"}];var OP=function(t){return t.Aircraft="aircraft",t.AircraftPosition="aircraft-position",t.Alert="alert",t.Annotation="annotation",t.Event="event",t.Ship="ship",t.ShipPosition="ship-position",t.H3Element="h3element",t}({});let MP=(()=>{class t{constructor(t){this.workerService=t,this.annotations$=new Av.a([]),this.editedAnnotation$=new Av.a(null),this.editedAnnotationGeomType$=new Av.a("Point"),this.editedAnnotation$.pipe(Gg(1),He(t=>t&&!!t.geom),Object(Ge.a)(t=>t.geom.type),mn()).subscribe(t=>{this.editedAnnotationGeomType$.next(t)})}refreshAnnotations(){return Object(ue.a)(this,void 0,void 0,function*(){const t=yield this.workerService.annotations.list();return this.annotations$.next(t),t})}clear(){this.annotations$.next([])}createNewAnnotation(t){const e={kind:OP.Annotation,name:"",description:"",color:"#c3267d",geom:t};t&&(e.lon=t.coordinates[0],e.lat=t.coordinates[1]),this.editedAnnotation$.next(e)}updateEditedAnnotationGeom(t){const e=this.editedAnnotation$.value;e.geom=t,this.editedAnnotation$.next(e)}editAnnotation(t){this.editedAnnotation$.next(OD(t))}refreshEditedAnnotation(){this.editedAnnotation$.next(this.editedAnnotation$.value)}cancelEditing(){this.editedAnnotation$.next(null),this.annotations$.next(this.annotations$.value)}saveEditedAnnotation(){return Object(ue.a)(this,void 0,void 0,function*(){const t=this.editedAnnotation$.value;t.id?yield this.workerService.annotations.update(t):yield this.workerService.annotations.create(t),yield this.refreshAnnotations(),this.editedAnnotation$.next(null)})}deleteAnnotation(t){return Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.annotations.delete(t),yield this.refreshAnnotations()})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(_I.a))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),TP=(()=>{class t{constructor(){this.drawingZoneMode$=new Av.a(!1),this.drawingZoneHexagonsCache={},this.hexagons$=new Av.a([]),this.selectHexagon$=new _e.a,this.selectHexagon$.subscribe(t=>{this.drawingZoneHexagonsCache[t]?(CC({category:"app",message:"drawing: unselect-hexagon"}),delete this.drawingZoneHexagonsCache[t]):(CC({category:"app",message:"drawing: select-hexagon"}),this.drawingZoneHexagonsCache[t]=!0),this.updateZones(Object.keys(this.drawingZoneHexagonsCache))})}updateZones(t){0===t.length&&0===this.hexagons$.value.length||this.hexagons$.next(t)}clearZones(){this.updateZones([])}editZone(t){return this.drawingZoneMode$.next(!0),this.drawingZoneHexagonsCache={},t.forEach(t=>{this.drawingZoneHexagonsCache[t]=!0}),this.hexagons$.next(t),this.hexagons$}stopEditingZone(){this.drawingZoneMode$.next(!1),this.clearZones()}selectHexagon(t){this.selectHexagon$.next(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const RP=[{label:"Perte signal AIS",color:SP("#ff272d",20)},{label:"Changement d'informations",color:SP("#e1cf15",20)},{label:"Spoofing",color:SP("#ff29ff",20)},{label:"Position tr\xe8s \xe9loign\xe9e",color:SP("#0623c9",20)},{label:"Position d\xe9cal\xe9e",color:SP("#a07149",20)},{label:"Entr\xe9e/Sortie de zone",color:SP("#78f48b",20)},{label:"Route erratique",color:SP("#f78851",20)},{label:"Transbordement",color:SP("#5910d0",20)}],VP=[{key:1,label:"Perte signal AIS",color:"#ff272d"},{key:101,label:"Modification infos navire",color:"#e1cf15"},{key:102,label:"IMO invalide",color:"#ff29ff"},{key:103,label:"Callsign invalide",color:"#ff29ff"},{key:110,label:"Spoofing",color:"#ff29ff"},{key:201,label:"Modification infos voyage",color:"#e1cf15"},{key:301,label:"Position tr\xe8s \xe9loign\xe9e",color:"#0623c9"},{key:302,label:"Modification statut",color:"#e1cf15"},{key:307,label:"Position d\xe9cal\xe9e",color:"#a07149"},{key:401,label:"Entr\xe9e zone",color:"#78f48b"},{key:402,label:"Sortie zone",color:"#78f48b"},{key:403,label:"Route erratique",color:"#f78851"},{key:404,label:"Transbordement",color:"#5910d0"}];VP.forEach(t=>{t.textColor=SP(t.color,20)});const FP=VP.reduce((t,e)=>(t[e.key]=e.label,t),{}),LP=VP.reduce((t,e)=>(t[e.key]=e,t),{});var UP=function(t){return t[t.AISCommLoss=1]="AISCommLoss",t[t.ShipIdChanged=101]="ShipIdChanged",t[t.InvalidImo=102]="InvalidImo",t[t.InvalidCallsign=103]="InvalidCallsign",t[t.Spoofing=110]="Spoofing",t[t.VoyageChanged=201]="VoyageChanged",t[t.VoyageDestination=202]="VoyageDestination",t[t.VoyageETA=203]="VoyageETA",t[t.PositionDubious=301]="PositionDubious",t[t.StatusChanged=302]="StatusChanged",t[t.VectorCheck=307]="VectorCheck",t[t.MoveZoneEntry=401]="MoveZoneEntry",t[t.MoveZoneExit=402]="MoveZoneExit",t[t.MoveErratic=403]="MoveErratic",t[t.MoveMeetingAtSea=404]="MoveMeetingAtSea",t}({});class BP{constructor(t,e,i,n){this.bufferTimeSpan=t,this.bufferCreationInterval=e,this.maxBufferSize=i,this.scheduler=n}call(t,e){return e.subscribe(new jP(t,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))}}class NP{constructor(){this.buffer=[]}}class jP extends Ee.a{constructor(t,e,i,n,r){super(t),this.bufferTimeSpan=e,this.bufferCreationInterval=i,this.maxBufferSize=n,this.scheduler=r,this.contexts=[];const s=this.openContext();if(this.timespanOnly=null==i||i<0,this.timespanOnly)this.add(s.closeAction=r.schedule(zP,e,{subscriber:this,context:s,bufferTimeSpan:e}));else{const t={bufferTimeSpan:e,bufferCreationInterval:i,subscriber:this,scheduler:r};this.add(s.closeAction=r.schedule(KP,e,{subscriber:this,context:s})),this.add(r.schedule(HP,i,t))}}_next(t){const e=this.contexts,i=e.length;let n;for(let r=0;r<i;r++){const i=e[r],s=i.buffer;s.push(t),s.length==this.maxBufferSize&&(n=i)}n&&this.onBufferFull(n)}_error(t){this.contexts.length=0,super._error(t)}_complete(){const{contexts:t,destination:e}=this;for(;t.length>0;){const i=t.shift();e.next(i.buffer)}super._complete()}_unsubscribe(){this.contexts=null}onBufferFull(t){this.closeContext(t);const e=t.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){t=this.openContext();const e=this.bufferTimeSpan;this.add(t.closeAction=this.scheduler.schedule(zP,e,{subscriber:this,context:t,bufferTimeSpan:e}))}}openContext(){const t=new NP;return this.contexts.push(t),t}closeContext(t){this.destination.next(t.buffer);const e=this.contexts;(e?e.indexOf(t):-1)>=0&&e.splice(e.indexOf(t),1)}}function zP(t){const e=t.subscriber,i=t.context;i&&e.closeContext(i),e.closed||(t.context=e.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function HP(t){const{bufferCreationInterval:e,bufferTimeSpan:i,subscriber:n,scheduler:r}=t,s=n.openContext();n.closed||(n.add(s.closeAction=r.schedule(KP,i,{subscriber:n,context:s})),this.schedule(t,e))}function KP(t){const{subscriber:e,context:i}=t;e.closeContext(i)}let $P=(()=>{class t{constructor(){this.events$=new Av.a([])}clear(){this.events$.next([])}updateEvents(t){this.events$.next(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),GP=(()=>{class t{constructor(){this.trails$=new Av.a([])}clear(){this.trails$.next([])}updateTrails(t){this.trails$.next(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),WP=(()=>{class t{constructor(){this.active$=new Av.a(!1)}toggleMeasureMode(){this.active$.next(!this.active$.value)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function ZP(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function qP(t){ZP(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"==typeof t&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}function YP(t){ZP(1,arguments);var e=qP(t);return!isNaN(e)}var QP={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function XP(t){return function(e){var i=e||{},n=i.width?String(i.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}var JP={date:XP({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:XP({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:XP({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},tO={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function eO(t){return function(e,i){var n,r=i||{};if("formatting"===(r.context?String(r.context):"standalone")&&t.formattingValues){var s=t.defaultFormattingWidth||t.defaultWidth,o=r.width?String(r.width):s;n=t.formattingValues[o]||t.formattingValues[s]}else{var a=t.defaultWidth,l=r.width?String(r.width):t.defaultWidth;n=t.values[l]||t.values[a]}return n[t.argumentCallback?t.argumentCallback(e):e]}}function iO(t){return function(e,i){var n=String(e),r=i||{},s=r.width,o=n.match(s&&t.matchPatterns[s]||t.matchPatterns[t.defaultMatchWidth]);if(!o)return null;var a,l=o[0],c=s&&t.parsePatterns[s]||t.parsePatterns[t.defaultParseWidth];return a="[object Array]"===Object.prototype.toString.call(c)?function(t,e){for(var i=0;i<t.length;i++)if(t[i].test(l))return i}(c):function(t,e){for(var i in t)if(t.hasOwnProperty(i)&&t[i].test(l))return i}(c),a=t.valueCallback?t.valueCallback(a):a,{value:a=r.valueCallback?r.valueCallback(a):a,rest:n.slice(l.length)}}}var nO,rO={code:"en-US",formatDistance:function(t,e,i){var n;return i=i||{},n="string"==typeof QP[t]?QP[t]:1===e?QP[t].one:QP[t].other.replace("{{count}}",e),i.addSuffix?i.comparison>0?"in "+n:n+" ago":n},formatLong:JP,formatRelative:function(t,e,i,n){return tO[t]},localize:{ordinalNumber:function(t,e){var i=Number(t),n=i%100;if(n>20||n<10)switch(n%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},era:eO({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:eO({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return Number(t)-1}}),month:eO({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:eO({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:eO({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(nO={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t,e){var i=String(t),n=e||{},r=i.match(nO.matchPattern);if(!r)return null;var s=r[0],o=i.match(nO.parsePattern);if(!o)return null;var a=nO.valueCallback?nO.valueCallback(o[0]):o[0];return{value:a=n.valueCallback?n.valueCallback(a):a,rest:i.slice(s.length)}}),era:iO({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:iO({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:iO({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:iO({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:iO({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function sO(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function oO(t,e){ZP(2,arguments);var i=qP(t).getTime(),n=sO(e);return new Date(i+n)}function aO(t,e){ZP(2,arguments);var i=sO(e);return oO(t,-i)}function lO(t,e){for(var i=t<0?"-":"",n=Math.abs(t).toString();n.length<e;)n="0"+n;return i+n}function cO(t){ZP(1,arguments);var e=1,i=qP(t),n=i.getUTCDay(),r=(n<e?7:0)+n-e;return i.setUTCDate(i.getUTCDate()-r),i.setUTCHours(0,0,0,0),i}function hO(t){ZP(1,arguments);var e=qP(t),i=e.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(i+1,0,4),n.setUTCHours(0,0,0,0);var r=cO(n),s=new Date(0);s.setUTCFullYear(i,0,4),s.setUTCHours(0,0,0,0);var o=cO(s);return e.getTime()>=r.getTime()?i+1:e.getTime()>=o.getTime()?i:i-1}function uO(t){ZP(1,arguments);var e=hO(t),i=new Date(0);i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0);var n=cO(i);return n}function dO(t){ZP(1,arguments);var e=qP(t),i=cO(e).getTime()-uO(e).getTime();return Math.round(i/6048e5)+1}function pO(t,e){ZP(1,arguments);var i=e||{},n=i.locale,r=n&&n.options&&n.options.weekStartsOn,s=null==r?0:sO(r),o=null==i.weekStartsOn?s:sO(i.weekStartsOn);if(!(o>=0&&o<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var a=qP(t),l=a.getUTCDay(),c=(l<o?7:0)+l-o;return a.setUTCDate(a.getUTCDate()-c),a.setUTCHours(0,0,0,0),a}function fO(t,e){ZP(1,arguments);var i=qP(t,e),n=i.getUTCFullYear(),r=e||{},s=r.locale,o=s&&s.options&&s.options.firstWeekContainsDate,a=null==o?1:sO(o),l=null==r.firstWeekContainsDate?a:sO(r.firstWeekContainsDate);if(!(l>=1&&l<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=new Date(0);c.setUTCFullYear(n+1,0,l),c.setUTCHours(0,0,0,0);var h=pO(c,e),u=new Date(0);u.setUTCFullYear(n,0,l),u.setUTCHours(0,0,0,0);var d=pO(u,e);return i.getTime()>=h.getTime()?n+1:i.getTime()>=d.getTime()?n:n-1}function mO(t,e){ZP(1,arguments);var i=e||{},n=i.locale,r=n&&n.options&&n.options.firstWeekContainsDate,s=null==r?1:sO(r),o=null==i.firstWeekContainsDate?s:sO(i.firstWeekContainsDate),a=fO(t,e),l=new Date(0);l.setUTCFullYear(a,0,o),l.setUTCHours(0,0,0,0);var c=pO(l,e);return c}function gO(t,e){ZP(1,arguments);var i=qP(t),n=pO(i,e).getTime()-mO(i,e).getTime();return Math.round(n/6048e5)+1}function AO(t,e){var i=t>0?"-":"+",n=Math.abs(t),r=Math.floor(n/60),s=n%60;if(0===s)return i+String(r);var o=e||"";return i+String(r)+o+lO(s,2)}function bO(t,e){return t%60==0?(t>0?"-":"+")+lO(Math.abs(t)/60,2):vO(t,e)}function vO(t,e){var i=e||"",n=t>0?"-":"+",r=Math.abs(t);return n+lO(Math.floor(r/60),2)+i+lO(r%60,2)}var _O={G:function(t,e,i){var n=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(n,{width:"abbreviated"});case"GGGGG":return i.era(n,{width:"narrow"});case"GGGG":default:return i.era(n,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var n=t.getUTCFullYear();return i.ordinalNumber(n>0?n:1-n,{unit:"year"})}return function(t,e){var i=t.getUTCFullYear(),n=i>0?i:1-i;return lO("yy"===e?n%100:n,e.length)}(t,e)},Y:function(t,e,i,n){var r=fO(t,n),s=r>0?r:1-r;return"YY"===e?lO(s%100,2):"Yo"===e?i.ordinalNumber(s,{unit:"year"}):lO(s,e.length)},R:function(t,e){return lO(hO(t),e.length)},u:function(t,e){return lO(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var n=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return lO(n,2);case"Qo":return i.ordinalNumber(n,{unit:"quarter"});case"QQQ":return i.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(n,{width:"wide",context:"formatting"})}},q:function(t,e,i){var n=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return lO(n,2);case"qo":return i.ordinalNumber(n,{unit:"quarter"});case"qqq":return i.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(n,{width:"wide",context:"standalone"})}},M:function(t,e,i){var n=t.getUTCMonth();switch(e){case"M":case"MM":return function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):lO(i+1,2)}(t,e);case"Mo":return i.ordinalNumber(n+1,{unit:"month"});case"MMM":return i.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(n,{width:"wide",context:"formatting"})}},L:function(t,e,i){var n=t.getUTCMonth();switch(e){case"L":return String(n+1);case"LL":return lO(n+1,2);case"Lo":return i.ordinalNumber(n+1,{unit:"month"});case"LLL":return i.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(n,{width:"wide",context:"standalone"})}},w:function(t,e,i,n){var r=gO(t,n);return"wo"===e?i.ordinalNumber(r,{unit:"week"}):lO(r,e.length)},I:function(t,e,i){var n=dO(t);return"Io"===e?i.ordinalNumber(n,{unit:"week"}):lO(n,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):function(t,e){return lO(t.getUTCDate(),e.length)}(t,e)},D:function(t,e,i){var n=function(t){ZP(1,arguments);var e=qP(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var n=e.getTime();return Math.floor((i-n)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(n,{unit:"dayOfYear"}):lO(n,e.length)},E:function(t,e,i){var n=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(n,{width:"short",context:"formatting"});case"EEEE":default:return i.day(n,{width:"wide",context:"formatting"})}},e:function(t,e,i,n){var r=t.getUTCDay(),s=(r-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return lO(s,2);case"eo":return i.ordinalNumber(s,{unit:"day"});case"eee":return i.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(r,{width:"short",context:"formatting"});case"eeee":default:return i.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,i,n){var r=t.getUTCDay(),s=(r-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return lO(s,e.length);case"co":return i.ordinalNumber(s,{unit:"day"});case"ccc":return i.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(r,{width:"narrow",context:"standalone"});case"cccccc":return i.day(r,{width:"short",context:"standalone"});case"cccc":default:return i.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,i){var n=t.getUTCDay(),r=0===n?7:n;switch(e){case"i":return String(r);case"ii":return lO(r,e.length);case"io":return i.ordinalNumber(r,{unit:"day"});case"iii":return i.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(n,{width:"short",context:"formatting"});case"iiii":default:return i.day(n,{width:"wide",context:"formatting"})}},a:function(t,e,i){var n=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(t,e,i){var n,r=t.getUTCHours();switch(n=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(t,e,i){var n,r=t.getUTCHours();switch(n=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var n=t.getUTCHours()%12;return 0===n&&(n=12),i.ordinalNumber(n,{unit:"hour"})}return function(t,e){return lO(t.getUTCHours()%12||12,e.length)}(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):function(t,e){return lO(t.getUTCHours(),e.length)}(t,e)},K:function(t,e,i){var n=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(n,{unit:"hour"}):lO(n,e.length)},k:function(t,e,i){var n=t.getUTCHours();return 0===n&&(n=24),"ko"===e?i.ordinalNumber(n,{unit:"hour"}):lO(n,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):function(t,e){return lO(t.getUTCMinutes(),e.length)}(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):function(t,e){return lO(t.getUTCSeconds(),e.length)}(t,e)},S:function(t,e){return function(t,e){var i=e.length,n=t.getUTCMilliseconds();return lO(Math.floor(n*Math.pow(10,i-3)),e.length)}(t,e)},X:function(t,e,i,n){var r=(n._originalDate||t).getTimezoneOffset();if(0===r)return"Z";switch(e){case"X":return bO(r);case"XXXX":case"XX":return vO(r);case"XXXXX":case"XXX":default:return vO(r,":")}},x:function(t,e,i,n){var r=(n._originalDate||t).getTimezoneOffset();switch(e){case"x":return bO(r);case"xxxx":case"xx":return vO(r);case"xxxxx":case"xxx":default:return vO(r,":")}},O:function(t,e,i,n){var r=(n._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+AO(r,":");case"OOOO":default:return"GMT"+vO(r,":")}},z:function(t,e,i,n){var r=(n._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+AO(r,":");case"zzzz":default:return"GMT"+vO(r,":")}},t:function(t,e,i,n){return lO(Math.floor((n._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,n){return lO((n._originalDate||t).getTime(),e.length)}};function yO(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}}function wO(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}}var xO={p:wO,P:function(t,e){var i,n=t.match(/(P+)(p+)?/),r=n[1],s=n[2];if(!s)return yO(t,e);switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",yO(r,e)).replace("{{time}}",wO(s,e))}};function CO(t){return t.getTime()%6e4}function SO(t){var e=new Date(t.getTime()),i=Math.ceil(e.getTimezoneOffset());return e.setSeconds(0,0),6e4*i+(i>0?(6e4+CO(e))%6e4:CO(e))}var kO=["D","DD"],EO=["YY","YYYY"];function DO(t){return-1!==kO.indexOf(t)}function IO(t){return-1!==EO.indexOf(t)}function PO(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://git.io/fxCyr"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://git.io/fxCyr"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://git.io/fxCyr"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://git.io/fxCyr"))}var OO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,MO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,TO=/^'([^]*?)'?$/,RO=/''/g,VO=/[a-zA-Z]/;function FO(t,e,i){ZP(2,arguments);var n=String(e),r=i||{},s=r.locale||rO,o=s.options&&s.options.firstWeekContainsDate,a=null==o?1:sO(o),l=null==r.firstWeekContainsDate?a:sO(r.firstWeekContainsDate);if(!(l>=1&&l<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=s.options&&s.options.weekStartsOn,h=null==c?0:sO(c),u=null==r.weekStartsOn?h:sO(r.weekStartsOn);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!s.localize)throw new RangeError("locale must contain localize property");if(!s.formatLong)throw new RangeError("locale must contain formatLong property");var d=qP(t);if(!YP(d))throw new RangeError("Invalid time value");var p=SO(d),f=aO(d,p),m={firstWeekContainsDate:l,weekStartsOn:u,locale:s,_originalDate:d},g=n.match(MO).map(function(t){var e=t[0];return"p"===e||"P"===e?(0,xO[e])(t,s.formatLong,m):t}).join("").match(OO).map(function(i){if("''"===i)return"'";var n=i[0];if("'"===n)return LO(i);var o=_O[n];if(o)return!r.useAdditionalWeekYearTokens&&IO(i)&&PO(i,e,t),!r.useAdditionalDayOfYearTokens&&DO(i)&&PO(i,e,t),o(f,i,s.localize,m);if(n.match(VO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");return i}).join("");return g}function LO(t){return t.match(TO)[1].replace(RO,"'")}function UO(t){if(t<0)return`/!\\ Dur\xe9e n\xe9gative ${UO(-t)}`;if(t<60)return"moins d'une minute";const e=Math.floor(t/86400),i=Math.floor(t%86400/3600),n=Math.floor(t%3600/60),r=[];return e>=1&&r.push(`${e} jour${e>1?"s":""}`),i>=1&&r.push(`${i} heure${i>1?"s":""}`),r.length<2&&0!==n&&r.push(`${n} minute${n>1?"s":""}`),`${r.join(", ")}`}function BO(t){if(t<0)return`/!\\ Dur\xe9e n\xe9gative ${BO(-t)}`;if(t<60)return"< 1m";const e=Math.floor(t/86400),i=Math.floor(t%86400/3600),n=Math.floor(t%3600/60),r=[];return e>=1&&r.push(`${e}j`),i>=1&&r.push(`${i}h`),r.length<2&&0!==n&&r.push(`${n}m`),`${r.join(" ")}`}function NO(t){return Math.floor(t.getTime()/1e3)}function jO(t){return FO(t,"dd/MM/yyyy")}function zO(t){return FO(t,"yyyy-MM-dd")}function HO(t){return new Date(t).toISOString().substr(0,19)}let KO=(()=>{class t{constructor(){this.active$=new Av.a(!1),this.selectedPIM$=new Av.a(null),this.nextStartDate$=new Av.a(NO(new Date)),this.nextSpeed$=new Av.a(10)}togglePIMMode(){this.active$.next(!this.active$.value)}selectPIM(t){this.selectedPIM$.next(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const $O=jI.reduce((t,e)=>(t[e.flag]=e,t),{}),GO={flag:"undefined",iso2:"undefined",iso3:"undefined",name:"Inconnu",searchValue:""};function WO(t){return null!==(e=$O[t])&&void 0!==e?e:GO;var e}const ZO=Object.entries({201:["AL","ALB","","Albania"],202:["AD","AND","","Andorra"],203:["AT","AUT","","Austria"],204:["PT","PRT","PT-20","Azores"],205:["BE","BEL","","Belgium"],206:["BY","BLR","","Belarus"],207:["BG","BGR","","Bulgaria"],208:["VA","VAT","","Vatican City State"],209:["CY","CYP","","Cyprus"],210:["CY","CYP","","Cyprus"],211:["DE","DEU","","Germany"],212:["CY","CYP","","Cyprus"],213:["GE","GEO","","Georgia"],214:["MD","MDA","","Moldova"],215:["MT","MLT","","Malta"],216:["AM","ARM","","Armenia"],218:["DE","DEU","","Germany"],219:["DK","DNK","","Denmark"],220:["DK","DNK","","Denmark"],224:["ES","ESP","","Spain"],225:["ES","ESP","","Spain"],226:["FR","FRA","","France"],227:["FR","FRA","","France"],228:["FR","FRA","","France"],229:["MT","MLT","","Malta"],230:["FI","FIN","","Finland"],231:["FO","FRO","","Faroe Islands"],232:["GB","GBR","","United Kingdom"],233:["GB","GBR","","United Kingdom"],234:["GB","GBR","","United Kingdom"],235:["GB","GBR","","United Kingdom"],236:["GI","GIB","","Gibraltar"],237:["GR","GRC","","Greece"],238:["HR","HRV","","Croatia"],239:["GR","GRC","","Greece"],240:["GR","GRC","","Greece"],241:["GR","GRC","","Greece"],242:["MA","MAR","","Morocco"],243:["HU","HUN","","Hungary"],244:["NL","NLD","","Netherlands"],245:["NL","NLD","","Netherlands"],246:["NL","NLD","","Netherlands"],247:["IT","ITA","","Italy"],248:["MT","MLT","","Malta"],249:["MT","MLT","","Malta"],250:["IE","IRL","","Ireland"],251:["IS","ISL","","Iceland"],252:["LI","LIE","","Liechtenstein"],253:["LU","LUX","","Luxembourg"],254:["MC","MCO","","Monaco"],255:["PT","PRT","PT-30","Madeira"],256:["MT","MLT","","Malta"],257:["NO","NOR","","Norway"],258:["NO","NOR","","Norway"],259:["NO","NOR","","Norway"],261:["PL","POL","","Poland"],262:["ME","MNE","","Montenegro"],263:["PT","PRT","","Portugal"],264:["RO","ROU","","Romania"],265:["SE","SWE","","Sweden"],266:["SE","SWE","","Sweden"],267:["SK","SVK","","Slovak Republic"],268:["SM","SMR","","San Marino"],269:["CH","CHE","","Switzerland"],270:["CZ","CZE","","Czech Republic"],271:["TR","TUR","","Turkey"],272:["UA","UKR","","Ukraine"],273:["RU","RUS","","Russia"],274:["MK","MKD","","Macedonia"],275:["LV","LVA","","Latvia"],276:["EE","EST","","Estonia"],277:["LT","LTU","","Lithuania"],278:["SI","SVN","","Slovenia"],279:["RS","SRB","","Serbia"],301:["AI","AIA","","Anguilla"],303:["US","USA","US-AK","Alaska"],304:["AG","ATG","","Antigua and Barbuda"],305:["AG","ATG","","Antigua and Barbuda"],306:["CW","CUW","","Antilles"],307:["AW","ABW","","Aruba"],308:["BS","BHS","","Bahamas"],309:["BS","BHS","","Bahamas"],310:["BM","BMU","","Bermuda"],311:["BS","BMU","","Bahamas"],312:["BZ","BLZ","","Belize"],314:["BB","BRB","","Barbados"],316:["CA","CAN","","Canada"],319:["KY","CYM","","Cayman Islands"],321:["CR","CRI","","Costa Rica"],323:["CU","CUB","","Cuba"],325:["DM","DMA","","Dominica"],327:["DO","DOM","","Dominican Republic"],329:["GP","GLP","","Guadeloupe"],330:["GD","GRD","","Grenada"],331:["GL","GRL","","Greenland"],332:["GT","GTM","","Guatemala"],335:["HN","HND","","Honduras"],336:["HT","HTI","","Haiti"],338:["US","USA","","United States of America"],339:["JM","JAM","","Jamaica"],341:["KN","KNA","","Saint Kitts and Nevis"],343:["LC","LCA","","Saint Lucia"],345:["MX","MEX","","Mexico"],347:["MQ","MTQ","","Martinique"],348:["MS","MSR","","Montserrat"],350:["NI","NIC","","Nicaragua"],351:["PA","PAN","","Panama"],352:["PA","PAN","","Panama"],353:["PA","PAN","","Panama"],354:["PA","PAN","","Panama"],355:["PA","PAN","","Panama"],356:["PA","PAN","","Panama"],357:["PA","PAN","","Panama"],358:["PR","PRI","","Puerto Rico"],359:["SV","SLV","","El Salvador"],361:["PM","SPM","","Saint Pierre and Miquelon"],362:["TT","TTO","","Trinidad and Tobago"],364:["TC","TCA","","Turks and Caicos Islands"],366:["US","USA","","United States of America"],367:["US","USA","","United States of America"],368:["US","USA","","United States of America"],369:["US","USA","","United States of America"],370:["PA","PAN","","Panama"],371:["PA","PAN","","Panama"],372:["PA","PAN","","Panama"],373:["PA","PAN","","Panama"],374:["PA","PAN","","Panama"],375:["VC","VCT","","Saint Vincent and the Grenadines"],376:["VC","VCT","","Saint Vincent and the Grenadines"],377:["VC","VCT","","Saint Vincent and the Grenadines"],378:["VG","VGB","","British Virgin Islands"],379:["VI","VIR","","United States Virgin Islands"],401:["AF","AFG","","Afghanistan"],403:["SA","SAU","","Saudi Arabia"],405:["BD","BGD","","Bangladesh"],408:["BH","BHR","","Bahrain"],410:["BT","BTN","","Bhutan"],412:["CN","CHN","","China"],413:["CN","CHN","","China"],414:["CN","CHN","","China"],416:["TW","TWN","","Taiwan"],417:["LK","LKA","","Sri Lanka"],419:["IN","IND","","India"],422:["IR","IRN","","Iran"],423:["AZ","AZE","","Azerbaijan"],425:["IQ","IRQ","","Iraq"],428:["IL","ISR","","Israel"],431:["JP","JPN","","Japan"],432:["JP","JPN","","Japan"],434:["TM","TKM","","Turkmenistan"],436:["KZ","KAZ","","Kazakhstan"],437:["UZ","UZB","","Uzbekistan"],438:["JO","JOR","","Jordan"],440:["KR","KOR","","Korea"],441:["KR","KOR","","Korea"],443:["PS","PSE","","State of Palestine"],445:["KP","PRK","","Democratic People's Republic of Korea"],447:["KW","KWT","","Kuwait"],450:["LB","LBN","","Lebanon"],451:["KG","KGZ","","Kyrgyz Republic"],453:["MO","MAC","","Macao"],455:["MV","MDV","","Maldives"],457:["MN","MNG","","Mongolia"],459:["NP","NPL","","Nepal"],461:["OM","OMN","","Oman"],463:["PK","PAK","","Pakistan"],466:["QA","QAT","","Qatar (State of)"],468:["SY","SYR","","Syrian Arab Republic"],470:["AE","ARE","","United Arab Emirates"],472:["TJ","TJK","","Tajikistan"],473:["YE","YEM","","Yemen"],475:["YE","YEM","","Yemen"],477:["HK","HKG","","Hong Kong"],478:["BA","BIH","","Bosnia and Herzegovina"],501:["FR","FRA","AQ","Adelie Land"],503:["AU","AUS","","Australia"],506:["MM","MMR","","Myanmar"],508:["BN","BRN","","Brunei Darussalam"],510:["FM","FSM","","Micronesia"],511:["PW","PLW","","Palau"],512:["NZ","NZL","","New Zealand"],514:["KH","KHM","","Cambodia"],515:["KH","KHM","","Cambodia"],516:["CX","CXR","","Christmas Island"],518:["CK","COK","","Cook Islands"],520:["FJ","FJI","","Fiji"],523:["CC","CCK","","Cocos (Keeling) Islands"],525:["ID","IDN","","Indonesia"],529:["KI","KIR","","Kiribati"],531:["LA","LAO","","Lao People's Democratic Republic"],533:["MY","MYS","","Malaysia"],536:["MP","MNP","","Northern Mariana Islands"],538:["MH","MHL","","Marshall Islands"],540:["NC","NCL","","New Caledonia"],542:["NU","NIU","","Niue"],544:["NR","NRU","","Nauru"],546:["PF","PYF","","French Polynesia"],548:["PH","PHL","","Philippines"],553:["PG","PNG","","Papua New Guinea"],555:["PN","PCN","","Pitcairn Island"],557:["SB","SLB","","Solomon Islands"],559:["AS","ASM","","American Samoa"],561:["WS","WSM","","Samoa"],563:["SG","SGP","","Singapore"],564:["SG","SGP","","Singapore"],565:["SG","SGP","","Singapore"],566:["SG","SGP","","Singapore"],567:["TH","THA","","Thailand"],570:["TO","TON","","Tonga"],572:["TV","TUV","","Tuvalu"],574:["VN","VNM","","Viet Nam"],576:["VU","VUT","","Vanuatu"],577:["VU","VUT","","Vanuatu"],578:["WF","WLF","","Wallis and Futuna Islands"],601:["ZA","ZAF","","South Africa"],603:["AO","AGO","","Angola"],605:["DZ","DZA","","Algeria"],607:["FR","FRA","TF","Saint Paul and Amsterdam Islands"],608:["GB","GBR","AC","Ascension Island"],609:["BI","BDI","","Burundi"],610:["BJ","BEN","","Benin"],611:["BW","BWA","","Botswana"],612:["CF","CAF","","Central African Republic"],613:["CM","CMR","","Cameroon"],615:["CG","COG","","Congo"],616:["KM","COM","","Comoros"],617:["CV","CPV","","Cabo Verde"],618:["FR","FRA","TF","Crozet Archipelago"],619:["CI","CIV","","Ivory Coast"],620:["KM","COM","","Comoros"],621:["DJ","DJI","","Djibouti"],622:["EG","EGY","","Egypt"],624:["ET","ETH","","Ethiopia"],625:["ER","ERI","","Eritrea"],626:["GA","GAB","","Gabonese Republic"],627:["GH","GHA","","Ghana"],629:["GM","GMB","","Gambia"],630:["GW","GNB","","Guinea-Bissau"],631:["GQ","GNQ","","Equatorial Guinea"],632:["GN","GIN","","Guinea"],633:["BF","BFA","","Burkina Faso"],634:["KE","KEN","","Kenya"],635:["FR","FRA","TF","Kerguelen Islands"],636:["LR","LBR","","Liberia"],637:["LR","LBR","","Liberia"],638:["SS","SSD","","South Sudan"],642:["LY","LBY","","Libya"],644:["LS","LSO","","Lesotho"],645:["MU","MUS","","Mauritius"],647:["MG","MDG","","Madagascar"],649:["ML","MLI","","Mali"],650:["MZ","MOZ","","Mozambique"],654:["MR","MRT","","Mauritania"],655:["MW","MWI","","Malawi"],656:["NE","NER","","Niger"],657:["NG","NGA","","Nigeria"],659:["NA","NAM","","Namibia"],660:["RE","REU","","Reunion"],661:["RW","RWA","","Rwanda"],662:["SD","SDN","","Sudan"],663:["SN","SEN","","Senegal"],664:["SC","SYC","","Seychelles"],665:["SH","SHN","","Saint Helena"],666:["SO","SOM","","Somali Democratic Republic"],667:["SL","SLE","","Sierra Leone"],668:["ST","STP","","Sao Tome and Principe"],669:["SZ","SWZ","","Swaziland"],670:["TD","TCD","","Chad"],671:["TG","TGO","","Togolese Republic"],672:["TN","TUN","","Tunisian Republic"],674:["TZ","TZA","","Tanzania"],675:["UG","UGA","","Uganda"],676:["CD","COD","","Democratic Republic of the Congo"],677:["TZ","TZA","","Tanzania"],678:["ZM","ZMB","","Zambia"],679:["ZW","ZWE","","Zimbabwe"],701:["AR","ARG","","Argentine Republic"],710:["BR","BRA","","Brazil"],720:["BO","BOL","","Bolivia"],725:["CL","CHL","","Chile"],730:["CO","COL","","Colombia"],735:["EC","ECU","","Ecuador"],740:["FK","FLK","","Falkland Islands"],745:["GF","GUF","","Guiana"],750:["GY","GUY","","Guyana"],755:["PY","PRY","","Paraguay"],760:["PE","PER","","Peru"],765:["SR","SUR","","Suriname"],770:["UY","URY","","Uruguay"],775:["VE","VEN","","Venezuela"]}).reduce((t,[e,[i]])=>(t[e]=i.toLowerCase(),t),{});Object.values(jI).reduce((t,e)=>(t[e.iso3.toLocaleLowerCase()]=e.iso2,t),{});const qO=[{key:"cargo",label:"Marchandises",aisTypes:["cargo"],color:"#78f48b"},{key:"tanker",label:"Mati\xe8res dangereuses",aisTypes:["tanker"],color:"#ff272d"},{key:"passenger",label:"Passagers",aisTypes:["passenger"],color:"#0623c9"},{key:"submarine",label:"Travaux sous-marins",aisTypes:["towing","dredger","diving","tug"],color:"#9a460f"},{key:"fishing",label:"P\xeache",aisTypes:["fishing"],color:"#f78851"},{key:"leisure",label:"Plaisance",aisTypes:["sailing","leisure"],color:"#ff29ff"},{key:"military",label:"Militaire",aisTypes:["military"],color:"#5910d0"},{key:"other",label:"Autre",aisTypes:["other"],color:"#e1cf15"},{key:"default",label:"Non sp\xe9cifi\xe9",aisTypes:["unspecified"],color:"#cccccc"}];function YO(t,e){var i,n,r;let s=!1;if(t.colorResultTimestamp=0,!e.colorModeShipType)if(e.isMissingColorFilterConfiguration||e.frozenTimestamp)s=!0;else{let i=0;if(e.alertRules.length>0){const n=t.lastAlerts.find(t=>e.alertRules.includes(t.rule_id));n&&(i=n.timestamp)}let n=0;if(e.eventTypes.length>0){const i=t.lastEvents.find(t=>e.eventTypes.includes(t.type));i&&(n=i.timestamp)}t.colorResultTimestamp=Math.max(i,n),s=t.colorResultTimestamp>=e.absoluteMinimumTimestamp}t.stationary=t.stationary||t.sog&&parseFloat(t.sog)<1,t.visible=t.selected||(!e.restrictedShips.size||e.restrictedShips.has(t.mmsi))&&t.timestamp>=e.absoluteVisibilityThresholdTimestamp&&(!e.shipTypes.length||!!e.shipTypesCache[t.cargo])&&(!e.shipFlags.length||!!e.shipFlagsCache[t.country.flag])&&(!e.shipDestinations.length||t.destination&&e.shipDestinations.some(e=>t.destination.includes(e)))&&(!e.shipDepartures.length||t.departure&&e.shipDepartures.some(e=>t.departure.includes(e)))&&(!e.shipStatus.length||e.shipStatus.includes(t.status))&&(!e.shipSpeed||e.shipSpeed.min<=t.numberSog&&t.numberSog<=e.shipSpeed.max)&&(!e.shipLength||e.shipLength.min<=t.length&&t.length<=e.shipLength.max)&&(!e.shipWidth||e.shipWidth.min<=t.width&&t.width<=e.shipWidth.max)&&(!e.shipDraught||e.shipDraught.min<=t.numberDraught&&t.numberDraught<=e.shipDraught.max)&&(!e.shipYearofbuild||e.shipYearofbuild.min<=t.yearofbuild&&t.yearofbuild<=e.shipYearofbuild.max||e.shipYearofbuildIncludeNulls&&0===t.yearofbuild)&&(!e.shipCourse||(e.shipCourse.min<e.shipCourse.max?e.shipCourse.min<=t.numberCog&&t.numberCog<=e.shipCourse.max:e.shipCourse.min<=t.numberCog||t.numberCog<=e.shipCourse.max))&&(!e.fleets.length||e.fleetsShipsCache.includes(t.mmsi))&&(!e.shipIdentifier.length||(null===(i=t.name)||void 0===i?void 0:i.includes(e.shipIdentifier))||(null===(n=t.mmsi)||void 0===n?void 0:n.includes(e.shipIdentifier))||(null===(r=t.imo)||void 0===r?void 0:r.includes(e.shipIdentifier)))&&(e.colorModeShipType||e.colorModeAllShips||e.colorModeResultsOnly&&s)&&(0===e.selectedShips.size||e.frozenTimestamp>0||!e.selectedShips.has(t.mmsi)),t.transparent=t.timestamp<=e.absoluteTransparencyThresholdTimestamp}function QO(t){return[t.mmsi,t.imo,t.callsign,BD(t.name),t.country.flag,t.cargo,t.shipType.key,t.length,t.width,t.draught,BD(t.destination),BD(t.departure),t.eta]}function XO(t,e,i){if(i)for(;t.positionIndex>0&&t.positions[t.positionIndex].timestamp>e;)t.positionIndex--;else for(;t.positionIndex<t.positions.length-1&&t.positions[t.positionIndex+1].timestamp<e;)t.positionIndex++;const n=t.positions[t.positionIndex],r=e<=t.positions[0].timestamp||t.positionIndex===t.positions.length-1;t.visible=!r,t.position=r?[n.lon,n.lat]:function(t,e,i){const n=(i-t.timestamp)/(e.timestamp-t.timestamp);return[t.lon+(e.lon-t.lon)*n,t.lat+(e.lat-t.lat)*n]}(n,t.positions[t.positionIndex+1],e),t.course=n.course,t.speed=n.speed}qO.forEach(t=>{t.rgbColor=xP(t.color),t.textColor=SP(t.color,20)}),qO.reduce((t,e)=>(t[e.key]=e,t),{}),qO.flatMap(t=>t.aisTypes.map(e=>[e,t])).reduce((t,[e,i])=>(t[e]=i,t),{});const JO=[1,2,5,10,20,30];let tM=(()=>{class t{constructor(t){this.workerService=t,this.active$=new Av.a(!1),this.startTimestamp$=new Av.a(0),this.duration$=new Av.a(0),this.shipsByMMSI$=new Av.a(null),this.animationTimestamp$=new Av.a(0),this.paused$=new Av.a(!0),this.reverseMode$=new Av.a(!1),this.animationSpeed$=new Av.a(10),this.lastFrameMs=0,this.viewExtent=null,this.animate=t=>{const e=this.animationTimestamp$.value+(this.reverseMode$.value?-1:1)*this.animationSpeed$.value*(t-this.lastFrameMs)*.006;this.lastFrameMs=t;const i=this.reverseMode$.value;Object.values(this.shipsByMMSI$.value).forEach(t=>{XO(t,e,i)}),this.animationTimestamp$.next(e),this.reverseMode$.value?e-this.minTimestamp<900&&(this.minTimestamp=this.minTimestamp-this.duration$.value,this.loadChunk(this.minTimestamp,this.duration$.value)):this.maxTimestamp-e<900&&(this.loadChunk(this.maxTimestamp,this.duration$.value),this.maxTimestamp=this.maxTimestamp+this.duration$.value),this.animationFrameTimeout=requestAnimationFrame(this.animate)},this.paused$.subscribe(t=>{t?cancelAnimationFrame(this.animationFrameTimeout):requestAnimationFrame(t=>{this.lastFrameMs=t,this.animationFrameTimeout=requestAnimationFrame(this.animate)})})}enterPlaybackMode(){this.active$.next(!0)}exitPlaybackMode(){cancelAnimationFrame(this.animationFrameTimeout),this.shipsByMMSI$.next(null),this.active$.next(!1)}loadPlayback(t,e){return Object(ue.a)(this,void 0,void 0,function*(){this.startTimestamp$.next(t),this.duration$.next(e),this.minTimestamp=t-e,this.maxTimestamp=t+e,this.paused$.next(!0),this.reverseMode$.next(!1),this.shipsByMMSI$.next({}),yield Promise.all([this.loadChunk(t-e,e),this.loadChunk(t,e)]),Object.values(this.shipsByMMSI$.value).forEach(e=>{XO(e,t,!1)}),this.animationTimestamp$.next(t)})}reinitiate(){this.animationTimestamp$.next(this.startTimestamp$.value)}loadChunk(t,e){return Object(ue.a)(this,void 0,void 0,function*(){const i=yield this.workerService.ships.getShipsPlaybackAtBboxAndTimestamp(this.viewExtent,t,e),n=this.shipsByMMSI$.value;console.time("assemble chunk");const r=this.reverseMode$.value;i.forEach(t=>{if(n[t.mmsi]){const i=n[t.mmsi];i.positions=i.positions.concat(t.positions).sort((t,e)=>t.timestamp-e.timestamp),i.positionIndex=r?i.positions.length-1:0;const s=i.positions,o=s.length-1;for(let t=0;t<o;t++)if(s[t].chunkEnd){const i=[s[t].lon,s[t].lat],n=[s[t+1].lon,s[t+1].lat];s[t].course=(2*Math.PI+Math.PI/2-aI(i,n))%(2*Math.PI),s[t].speed=Math.round(10*(e=s[t+1].timestamp-s[t].timestamp,1.944*Uk(i,n)/e))/10}}else n[t.mmsi]=t;var e});const s=this.animationTimestamp$.value,o=this.reverseMode$.value;Object.values(n).forEach(t=>{XO(t,s,o)}),console.timeEnd("assemble chunk"),this.shipsByMMSI$.next(n)})}togglePause(){this.paused$.next(!this.paused$.value)}toggleReverseMode(){this.reverseMode$.next(!this.reverseMode$.value)}updateSpeed(t){const e=JO.indexOf(this.animationSpeed$.value);"-"===t?e>0&&this.animationSpeed$.next(JO[e-1]):e<JO.length-1&&this.animationSpeed$.next(JO[e+1])}updateViewBox(t){this.viewExtent=t}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(_I.a))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const eM=["#1e88e5","#5e35b1","#64b5f6","#311b92","#d1c4e9","#9575cd","#1a237e","#1e88e5","#bbdefb","#3949ab","#7986cb"],iM=eM.map(t=>CP(t)),nM=["#900C3F","#FF5733","#3D3D6B","#FFC300","#511849","#FF8D1A","#2A7B9B","#C70039","#44be77","#c4b320","#00BAAD","#7a9b38"];var rM=new Array(6);function sM(t){return aM(t,1,0,0,1,0,0)}function oM(t,e){var i=t[0],n=t[1],r=t[2],s=t[3],o=t[4],a=t[5],l=e[0],c=e[1],h=e[2],u=e[3],d=e[4],p=e[5];return t[0]=i*l+r*c,t[1]=n*l+s*c,t[2]=i*h+r*u,t[3]=n*h+s*u,t[4]=i*d+r*p+o,t[5]=n*d+s*p+a,t}function aM(t,e,i,n,r,s,o){return t[0]=e,t[1]=i,t[2]=n,t[3]=r,t[4]=s,t[5]=o,t}function lM(t,e){var i=e[0],n=e[1];return e[0]=t[0]*i+t[2]*n+t[4],e[1]=t[1]*i+t[3]*n+t[5],e}function cM(t,e,i,n,r,s,o,a){var l=Math.sin(s),c=Math.cos(s);return t[0]=n*c,t[1]=r*l,t[2]=-n*l,t[3]=r*c,t[4]=o*n*c-a*n*l+e,t[5]=o*r*l+a*r*c+i,t}function hM(t,e){var i,n=(i=e)[0]*i[3]-i[1]*i[2];yS(0!==n,32);var r=e[0],s=e[1],o=e[2],a=e[3],l=e[4],c=e[5];return t[0]=a/n,t[1]=-s/n,t[2]=-o/n,t[3]=r/n,t[4]=(o*c-a*l)/n,t[5]=-(r*c-s*l)/n,t}function uM(t){return"matrix("+t.join(", ")+")"}function dM(t,e,i,n,r,s){for(var o=s||[],a=0,l=e;l<i;l+=n){var c=t[l],h=t[l+1];o[a++]=r[0]*c+r[2]*h+r[4],o[a++]=r[1]*c+r[3]*h+r[5]}return s&&o.length!=a&&(o.length=a),o}function pM(t,e,i,n,r,s,o){for(var a=o||[],l=Math.cos(r),c=Math.sin(r),h=s[0],u=s[1],d=0,p=e;p<i;p+=n){var f=t[p]-h,m=t[p+1]-u;a[d++]=h+f*l-m*c,a[d++]=u+f*c+m*l;for(var g=p+2;g<p+n;++g)a[d++]=t[g]}return o&&a.length!=d&&(a.length=d),a}function fM(t,e,i,n,r,s,o){for(var a=o||[],l=0,c=e;c<i;c+=n){a[l++]=t[c]+r,a[l++]=t[c+1]+s;for(var h=c+2;h<c+n;++h)a[l++]=t[h]}return o&&a.length!=l&&(a.length=l),a}var mM=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),gM=[1,0,0,1,0,0],AM=function(t){function e(){var e,i,n,r,s,o=t.call(this)||this;return o.extent_=[1/0,1/0,-1/0,-1/0],o.extentRevision_=-1,o.simplifiedGeometryMaxMinSquaredTolerance=0,o.simplifiedGeometryRevision=0,o.simplifyTransformedInternal=(e=function(t,e,i){if(!i)return this.getSimplifiedGeometry(e);var n=this.clone();return n.applyTransform(i),n.getSimplifiedGeometry(e)},s=!1,function(){var t=Array.prototype.slice.call(arguments);return s&&this===r&&UC(t,n)||(s=!0,r=this,n=t,i=e.apply(this,arguments)),i}),o}return mM(e,t),e.prototype.simplifyTransformed=function(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)},e.prototype.clone=function(){return ZC()},e.prototype.closestPointXY=function(t,e,i,n){return ZC()},e.prototype.containsXY=function(t,e){var i=this.getClosestPoint([t,e]);return i[0]===t&&i[1]===e},e.prototype.getClosestPoint=function(t,e){var i=e||[NaN,NaN];return this.closestPointXY(t[0],t[1],i,1/0),i},e.prototype.intersectsCoordinate=function(t){return this.containsXY(t[0],t[1])},e.prototype.computeExtent=function(t){return ZC()},e.prototype.getExtent=function(t){if(this.extentRevision_!=this.getRevision()){var e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&OS(e),this.extentRevision_=this.getRevision()}return function(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t}(this.extent_,t)},e.prototype.rotate=function(t,e){ZC()},e.prototype.scale=function(t,e,i){ZC()},e.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},e.prototype.getSimplifiedGeometry=function(t){return ZC()},e.prototype.getType=function(){return ZC()},e.prototype.applyTransform=function(t){ZC()},e.prototype.intersectsExtent=function(t){return ZC()},e.prototype.translate=function(t,e){ZC()},e.prototype.transform=function(t,e){var i=eE(t),n=i.getUnits()==ck.TILE_PIXELS?function(t,n,r){var s=i.getExtent(),o=i.getWorldExtent(),a=GS(o)/GS(s);return cM(gM,o[0],o[3],a,-a,0,0,0),dM(t,0,t.length,r,gM,n),cE(i,e)(t,n,r)}:cE(i,e);return this.applyTransform(n),this},e}(BE),bM=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function vM(t){var e;return"XY"==t?e=2:"XYZ"==t||"XYM"==t?e=3:"XYZM"==t&&(e=4),e}var _M=function(t){function e(){var e=t.call(this)||this;return e.layout="XY",e.stride=2,e.flatCoordinates=null,e}return bM(e,t),e.prototype.computeExtent=function(t){return TS(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinates=function(){return ZC()},e.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.getFlatCoordinates=function(){return this.flatCoordinates},e.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},e.prototype.getLayout=function(){return this.layout},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)},e.prototype.getSimplifiedGeometryInternal=function(t){return this},e.prototype.getStride=function(){return this.stride},e.prototype.setFlatCoordinates=function(t,e){this.stride=vM(t),this.layout=t,this.flatCoordinates=e},e.prototype.setCoordinates=function(t,e){ZC()},e.prototype.setLayout=function(t,e,i){var n;if(t)n=vM(t);else{for(var r=0;r<i;++r){if(0===e.length)return this.layout="XY",void(this.stride=2);e=e[0]}t=function(t){var e;return 2==t?e="XY":3==t?e="XYZ":4==t&&(e="XYZM"),e}(n=e.length)}this.layout=t,this.stride=n},e.prototype.applyTransform=function(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},e.prototype.rotate=function(t,e){var i=this.getFlatCoordinates();if(i){var n=this.getStride();pM(i,0,i.length,n,t,e,i),this.changed()}},e.prototype.scale=function(t,e,i){var n=e;void 0===n&&(n=t);var r=i;r||(r=HS(this.getExtent()));var s=this.getFlatCoordinates();if(s){var o=this.getStride();!function(t,e,i,n,r,s,o,a){for(var l=a||[],c=o[0],h=o[1],u=0,d=0;d<i;d+=n){var p=t[d+1]-h;l[u++]=c+r*(t[d]-c),l[u++]=h+s*p;for(var f=d+2;f<d+n;++f)l[u++]=t[f]}a&&l.length!=u&&(l.length=u)}(s,0,s.length,o,t,n,r,s),this.changed()}},e.prototype.translate=function(t,e){var i=this.getFlatCoordinates();if(i){var n=this.getStride();fM(i,0,i.length,n,t,e,i),this.changed()}},e}(AM);function yM(t,e,i,n,r,s,o){var a,l=t[e],c=t[e+1],h=t[i]-l,u=t[i+1]-c;if(0===h&&0===u)a=e;else{var d=((r-l)*h+(s-c)*u)/(h*h+u*u);if(d>1)a=i;else{if(d>0){for(var p=0;p<n;++p)o[p]=vk(t[e+p],t[i+p],d);return void(o.length=n)}a=e}}for(p=0;p<n;++p)o[p]=t[a+p];o.length=n}function wM(t,e,i,n,r){var s=t[e],o=t[e+1];for(e+=n;e<i;e+=n){var a=t[e],l=t[e+1],c=mk(s,o,a,l);c>r&&(r=c),s=a,o=l}return r}function xM(t,e,i,n,r){for(var s=0,o=i.length;s<o;++s){var a=i[s];r=wM(t,e,a,n,r),e=a}return r}function CM(t,e,i,n,r,s,o,a,l,c,h){if(e==i)return c;var u,d;if(0===r){if((d=mk(o,a,t[e],t[e+1]))<c){for(u=0;u<n;++u)l[u]=t[e+u];return l.length=n,d}return c}for(var p=h||[NaN,NaN],f=e+n;f<i;)if(yM(t,f-n,f,n,o,a,p),(d=mk(o,a,p[0],p[1]))<c){for(c=d,u=0;u<n;++u)l[u]=p[u];l.length=n,f+=n}else f+=n*Math.max((Math.sqrt(d)-Math.sqrt(c))/r|0,1);if(s&&(yM(t,i-n,e,n,o,a,p),(d=mk(o,a,p[0],p[1]))<c)){for(c=d,u=0;u<n;++u)l[u]=p[u];l.length=n}return c}function SM(t,e,i,n,r,s,o,a,l,c,h){for(var u=h||[NaN,NaN],d=0,p=i.length;d<p;++d){var f=i[d];c=CM(t,e,f,n,r,s,o,a,l,c,u),e=f}return c}function kM(t,e,i,n){for(var r=0,s=i.length;r<s;++r)t[e++]=i[r];return e}function EM(t,e,i,n){for(var r=0,s=i.length;r<s;++r)for(var o=i[r],a=0;a<n;++a)t[e++]=o[a];return e}function DM(t,e,i,n,r){for(var s=r||[],o=0,a=0,l=i.length;a<l;++a){var c=EM(t,e,i[a],n);s[o++]=c,e=c}return s.length=o,s}function IM(t,e,i,n,r,s,o){var a=(i-e)/n;if(a<3){for(;e<i;e+=n)s[o++]=t[e],s[o++]=t[e+1];return o}var l=new Array(a);l[0]=1,l[a-1]=1;for(var c=[e,i-n],h=0;c.length>0;){for(var u=c.pop(),d=c.pop(),p=0,f=t[d],m=t[d+1],g=t[u],A=t[u+1],b=d+n;b<u;b+=n){var v=fk(t[b],t[b+1],f,m,g,A);v>p&&(h=b,p=v)}p>r&&(l[(h-e)/n]=1,d+n<h&&c.push(d,h),h+n<u&&c.push(h,u))}for(b=0;b<a;++b)l[b]&&(s[o++]=t[e+b*n],s[o++]=t[e+b*n+1]);return o}function PM(t,e){return e*Math.round(t/e)}function OM(t,e,i,n,r,s,o){if(e==i)return o;var a,l,c=PM(t[e],r),h=PM(t[e+1],r);e+=n,s[o++]=c,s[o++]=h;do{if(a=PM(t[e],r),l=PM(t[e+1],r),(e+=n)==i)return s[o++]=a,s[o++]=l,o}while(a==c&&l==h);for(;e<i;){var u=PM(t[e],r),d=PM(t[e+1],r);if(e+=n,u!=a||d!=l){var p=a-c,f=l-h,m=u-c,g=d-h;p*g==f*m&&(p<0&&m<p||p==m||p>0&&m>p)&&(f<0&&g<f||f==g||f>0&&g>f)?(a=u,l=d):(s[o++]=a,s[o++]=l,c=a,h=l,a=u,l=d)}}return s[o++]=a,s[o++]=l,o}function MM(t,e,i,n,r,s,o,a){for(var l=0,c=i.length;l<c;++l){var h=i[l];o=OM(t,e,h,n,r,s,o),a.push(o),e=h}return o}function TM(t,e,i,n,r){for(var s=void 0!==r?r:[],o=0,a=e;a<i;a+=n)s[o++]=t.slice(a,a+n);return s.length=o,s}function RM(t,e,i,n,r){for(var s=void 0!==r?r:[],o=0,a=0,l=i.length;a<l;++a){var c=i[a];s[o++]=TM(t,e,c,n,s[o]),e=c}return s.length=o,s}function VM(t,e,i,n,r){for(var s=void 0!==r?r:[],o=0,a=0,l=i.length;a<l;++a){var c=i[a];s[o++]=RM(t,e,c,n,s[o]),e=c[c.length-1]}return s.length=o,s}function FM(t,e,i,n){for(var r=0,s=t[i-n],o=t[i-n+1];e<i;e+=n){var a=t[e],l=t[e+1];r+=o*a-s*l,s=a,o=l}return r/2}function LM(t,e,i,n){for(var r=0,s=0,o=i.length;s<o;++s){var a=i[s];r+=FM(t,e,a,n),e=a}return r}var UM=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),BM=function(t){function e(e,i){var n=t.call(this)||this;return n.maxDelta_=-1,n.maxDeltaRevision_=-1,void 0===i||Array.isArray(e[0])?n.setCoordinates(e,i):n.setFlatCoordinates(i,e),n}return UM(e,t),e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,i,n){return n<SS(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(wM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),CM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,i,n))},e.prototype.getArea=function(){return FM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinates=function(){return TM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[];return i.length=IM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i,0),new e(i,"XY")},e.prototype.getType=function(){return"LinearRing"},e.prototype.intersectsExtent=function(t){return!1},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=EM(this.flatCoordinates,0,t,this.stride),this.changed()},e}(_M),NM=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),jM=function(t){function e(e,i){var n=t.call(this)||this;return n.setCoordinates(e,i),n}return NM(e,t),e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,i,n){var r=this.flatCoordinates,s=mk(t,e,r[0],r[1]);if(s<n){for(var o=this.stride,a=0;a<o;++a)i[a]=r[a];return i.length=o,s}return n},e.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},e.prototype.computeExtent=function(t){return MS(this.flatCoordinates,t)},e.prototype.getType=function(){return"Point"},e.prototype.intersectsExtent=function(t){return DS(t,this.flatCoordinates[0],this.flatCoordinates[1])},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=kM(this.flatCoordinates,0,t),this.changed()},e}(_M);function zM(t,e,i,n,r){return!BS(r,function(r){return!HM(t,e,i,n,r[0],r[1])})}function HM(t,e,i,n,r,s){for(var o=0,a=t[i-n],l=t[i-n+1];e<i;e+=n){var c=t[e],h=t[e+1];l<=s?h>s&&(c-a)*(s-l)-(r-a)*(h-l)>0&&o++:h<=s&&(c-a)*(s-l)-(r-a)*(h-l)<0&&o--,a=c,l=h}return 0!==o}function KM(t,e,i,n,r,s){if(0===i.length)return!1;if(!HM(t,e,i[0],n,r,s))return!1;for(var o=1,a=i.length;o<a;++o)if(HM(t,i[o-1],i[o],n,r,s))return!1;return!0}function $M(t,e,i,n,r,s,o){for(var a,l,c,h,u,d,p,f=r[s+1],m=[],g=0,A=i.length;g<A;++g){var b=i[g];for(h=t[b-n],d=t[b-n+1],a=e;a<b;a+=n)u=t[a],p=t[a+1],(f<=d&&p<=f||d<=f&&f<=p)&&m.push(c=(f-d)/(p-d)*(u-h)+h),h=u,d=p}var v=NaN,_=-1/0;for(m.sort(TC),h=m[0],a=1,l=m.length;a<l;++a){u=m[a];var y=Math.abs(u-h);y>_&&KM(t,e,i,n,c=(h+u)/2,f)&&(v=c,_=y),h=u}return isNaN(v)&&(v=r[s]),o?(o.push(v,f,_),o):[v,f,_]}function GM(t,e,i,n,r){for(var s,o=[t[e],t[e+1]],a=[];e+n<i;e+=n){if(a[0]=t[e+n],a[1]=t[e+n+1],s=r(o,a))return s;o[0]=a[0],o[1]=a[1]}return!1}function WM(t,e,i,n,r){var s=LS([1/0,1/0,-1/0,-1/0],t,e,i,n);return!!QS(r,s)&&(!!ES(r,s)||s[0]>=r[0]&&s[2]<=r[2]||s[1]>=r[1]&&s[3]<=r[3]||GM(t,e,i,n,function(t,e){return function(t,e,i){var n=!1,r=IS(t,e),s=IS(t,i);if(1===r||1===s)n=!0;else{var o=t[0],a=t[1],l=t[2],c=t[3],h=i[0],u=i[1],d=(u-e[1])/(h-e[0]),p=void 0,f=void 0;2&s&&!(2&r)&&(n=(p=h-(u-c)/d)>=o&&p<=l),n||!(4&s)||4&r||(n=(f=u-(h-l)*d)>=a&&f<=c),n||!(8&s)||8&r||(n=(p=h-(u-a)/d)>=o&&p<=l),n||!(16&s)||16&r||(n=(f=u-(h-o)*d)>=a&&f<=c)}return n}(r,t,e)}))}function ZM(t,e,i,n,r){if(!function(t,e,i,n,r){return!!(WM(t,e,i,n,r)||HM(t,e,i,n,r[0],r[1])||HM(t,e,i,n,r[0],r[3])||HM(t,e,i,n,r[2],r[1])||HM(t,e,i,n,r[2],r[3]))}(t,e,i[0],n,r))return!1;if(1===i.length)return!0;for(var s=1,o=i.length;s<o;++s)if(zM(t,i[s-1],i[s],n,r)&&!WM(t,i[s-1],i[s],n,r))return!1;return!0}function qM(t,e,i,n){for(;e<i-n;){for(var r=0;r<n;++r){var s=t[e+r];t[e+r]=t[i-n+r],t[i-n+r]=s}e+=n,i-=n}}function YM(t,e,i,n){for(var r=0,s=t[i-n],o=t[i-n+1];e<i;e+=n){var a=t[e],l=t[e+1];r+=(a-s)*(l+o),s=a,o=l}return 0===r?void 0:r>0}function QM(t,e,i,n,r){for(var s=void 0!==r&&r,o=0,a=i.length;o<a;++o){var l=i[o],c=YM(t,e,l,n);if(0===o){if(s&&c||!s&&!c)return!1}else if(s&&!c||!s&&c)return!1;e=l}return!0}function XM(t,e,i,n,r){for(var s=void 0!==r&&r,o=0,a=i.length;o<a;++o){var l=i[o],c=YM(t,e,l,n);(0===o?s&&c||!s&&!c:s&&!c||!s&&c)&&qM(t,e,l,n),e=l}return e}function JM(t,e,i,n,r){for(var s=0,o=i.length;s<o;++s)e=XM(t,e,i[s],n,r);return e}var tT=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),eT=function(t){function e(e,i,n){var r=t.call(this)||this;return r.ends_=[],r.flatInteriorPointRevision_=-1,r.flatInteriorPoint_=null,r.maxDelta_=-1,r.maxDeltaRevision_=-1,r.orientedRevision_=-1,r.orientedFlatCoordinates_=null,void 0!==i&&n?(r.setFlatCoordinates(i,e),r.ends_=n):r.setCoordinates(e,i),r}return tT(e,t),e.prototype.appendLinearRing=function(t){this.flatCoordinates?LC(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,i,n){return n<SS(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(xM(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),SM(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,n))},e.prototype.containsXY=function(t,e){return KM(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)},e.prototype.getArea=function(){return LM(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},e.prototype.getCoordinates=function(t){var e;return void 0!==t?XM(e=this.getOrientedFlatCoordinates().slice(),0,this.ends_,this.stride,t):e=this.flatCoordinates,RM(e,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var t=HS(this.getExtent());this.flatInteriorPoint_=$M(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},e.prototype.getInteriorPoint=function(){return new jM(this.getFlatInteriorPoint(),"XYM")},e.prototype.getLinearRingCount=function(){return this.ends_.length},e.prototype.getLinearRing=function(t){return t<0||this.ends_.length<=t?null:new BM(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLinearRings=function(){for(var t=this.layout,e=this.flatCoordinates,i=this.ends_,n=[],r=0,s=0,o=i.length;s<o;++s){var a=i[s],l=new BM(e.slice(r,a),t);n.push(l),r=a}return n},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;QM(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=XM(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[],n=[];return i.length=MM(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),i,0,n),new e(i,"XY",n)},e.prototype.getType=function(){return"Polygon"},e.prototype.intersectsExtent=function(t){return ZM(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=DM(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()},e}(_M),iT=eT;function nT(t){var e=t[0],i=t[1],n=t[2],r=t[3],s=[e,i,e,r,n,r,n,i,e,i];return new eT(s,"XY",[s.length])}const rT=[[8.384360674740835,87.82361750161175],[145.5581976913369,87.3646953231962],[-325.5581976913369,87.82361750161175],[-215.5581976913369,87.82361750161175],[-161.8917180108592,84.22628942426208],[-125.29445893479551,82.48154130920918],[-90.38109747487815,82.85349004122665],[-51.70487751530814,84.93555635380527],[8.384360674740835,87.82361750161175]],sT=[[-214.4418023086631,87.3646953231962],[-163.45686807900947,76.14556732608256],[-131.70883908792965,69.37134141076518],[-100.821870205822,67.53592431503803],[-66.90449925088507,72.20470505499345],[-34.75841798028466,81.27137179020501],[-214.4418023086631,87.3646953231962]];function oT(t){let e=pP(t,!0);return e="81033ffffffffff"===t?rT:"8003fffffffffff"===t?sT:aT(e),new iT([e.map(t=>sE(t))])}function aT(t){const e=t[0][0],i=t[0][1];return t.map(([t,n])=>(Math.abs(t-e)>180&&(e>0?t+=360:t-=360),Math.abs(n-i)>90&&(i>0?n+=180:n-=180),[t,n]))}function lT(t){const e=aT(_P(t,!0)),i=AP(t),[n]=nI([dP(i).reverse()],e[0]);3===e.length&&e.splice(1,1);let r=e[0],s=e[1];return r=cT(r[0],r[1],n[0],n[1],.15),s=cT(s[0],s[1],n[0],n[1],.15),e.push(s),e.push(r),e}function cT(t,e,i,n,r){return[t+(i-t)*r,e+(n-e)*r]}function hT(t){if(t.length<2)return!1;for(let e=0;e<t.length;e++)for(let i=e+1;i<t.length;i++){const n=t[i];if(t[e].some(t=>n.some(e=>oI(t,e))))return[e,i]}return!1}const uT=nM.concat(nM,nM,nM,nM),dT=Array(uT.length).fill(!0);function pT(t){const e=uT.findIndex(e=>e===t);dT[e]=!0}class fT{constructor(t,e){this.edges=t,this.color=null!=e?e:function(){const t=dT.findIndex(t=>t);return dT[t]=!1,uT[t]}()}contains(t){return this.edges.includes(t)}remove(t){const e=this.edges.indexOf(t);if(-1!==e)return this.edges.splice(e,1);throw new Error("group cannot remove missing index"+t)}shouldSplit(){const t=[new fT([this.edges[0]],this.color)];if(this.edges.slice(1).forEach(e=>{t.some(t=>t.addIfLinked(e))||t.push(new fT([e]))}),t.length>=2){let e=!1;for(;!e;){const i=hT(t.map(t=>t.edges.map(t=>_P(t,!0)).flat()));i&&(t[i[0]].merge(t[i[1]]),pT(t.splice(i[1],1)[0].color)),e=!i}}return t.length>1&&t}addIfLinked(t){const e=_P(t,!0),i=this.edges.map(t=>_P(t,!0)).flat().some(t=>e.some(e=>oI(e,t)));return i&&this.edges.push(t),i}merge(t){this.edges.push(...t.edges)}}let mT=(()=>{class t{constructor(t){this.workerService=t,this.selectedEdgeGroups$=new Av.a([]),this.searchQuery$=new Av.a(null),this.searchResult$=new Av.a(null)}toggleEdge(t){const e=this.selectedEdgeGroups$.value,i=e.findIndex(e=>e.contains(t));let n=null;if(-1!==i){const r=e[i];if(r.remove(t),0===r.edges.length)n=e.splice(i,1)[0];else if(r.edges.length>=2){const t=r.shouldSplit();t&&e.splice(i,1,...t)}}else if(e.some(e=>e.addIfLinked(t))){const t=hT(e.map(t=>t.edges.map(t=>_P(t,!0)).flat()));t&&(e[t[0]].merge(e[t[1]]),n=e.splice(t[1],1)[0])}else e.push(new fT([t]));n&&pT(n.color),this.selectedEdgeGroups$.next(e)}resetEdgeGroups(){this.selectedEdgeGroups$.next([])}search(t){return Object(ue.a)(this,void 0,void 0,function*(){this.searchResult$.next(null),this.searchResult$.next({query:OD(t),results:yield this.workerService.ships.searchForShipsPassages(this.selectedEdgeGroups$.value,NO(t.interval.start),NO(t.interval.end)+86400)})})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(_I.a))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),gT=(()=>{class t{constructor(t,e,i,n,r,s,o,a,l,c,h){this.alertsService=t,this.alertRulesService=e,this.annotationService=i,this.drawingService=n,this.historyService=r,this.mapConfigService=s,this.measureService=o,this.pimService=a,this.playbackService=l,this.routeService=c,this.movesService=h;const u=this.routeService.route$.pipe(Object(Ge.a)(t=>"/zones"===t),mn()),d=this.routeService.route$.pipe(Object(Ge.a)(t=>"/moves"===t),mn()),p=this.routeService.route$.pipe(Object(Ge.a)(t=>"/ports"===t),mn()),f=this.routeService.route$.pipe(Object(Ge.a)(t=>t.startsWith("/alerts/rules/")),mn()),m=this.routeService.route$.pipe(Object(Ge.a)(t=>"/annotations"===t),mn());this.mustHideShips$=Hg([u,f,this.playbackService.active$]).pipe(Object(Ge.a)(([t,e,i])=>t||e||i),mn()),this.minimumZoom$=Hg([this.historyService.timestamp$.pipe(Object(Ge.a)(t=>!!t)),this.mapConfigService.limitMinimumZoom$,this.alertRulesService.selectedAlertRuleId$,u,d]).pipe(Object(Ge.a)(([t,e,i,n,r])=>t?7:i||n?2.5:r?5:e?6:2.5),mn()),this.featuresSelectable$=Hg([d,this.annotationService.editedAnnotation$.pipe(Object(Ge.a)(t=>!!t)),this.drawingService.drawingZoneMode$,this.measureService.active$,this.pimService.active$]).pipe(Object(Ge.a)(([t,e,i,n,r])=>!(t||e||i||n||r)),mn()),this.showShipsLayer$=Hg([this.mapConfigService.showShipsLayer$,this.mustHideShips$.pipe(Be(500))]).pipe(Object(Ge.a)(([t,e])=>t&&!e),mn()),this.showAircraftsLayer$=Hg([this.mapConfigService.showAircraftsLayer$,this.mustHideShips$.pipe(Be(500))]).pipe(Object(Ge.a)(([t,e])=>t&&!e),mn()),this.showAnnotationsLayer$=Hg([this.mapConfigService.showAnnotationsLayer$,m,this.annotationService.editedAnnotation$.pipe(Object(Ge.a)(t=>!!t))]).pipe(Object(Ge.a)(([t,e,i])=>t||e||i),mn()),this.showPortsLayer$=Hg([this.mapConfigService.showPortsLayer$,p]).pipe(Object(Ge.a)(([t,e])=>t||e),mn()),this.selectableHexagons$=this.drawingService.drawingZoneMode$.pipe(mn()),this.showHexagonsLayer$=Hg([this.selectableHexagons$,this.mapConfigService.showHexagonsLayer$,d]).pipe(Object(Ge.a)(([t,e,i])=>t||e&&!i),mn()),this.showEdgesLayer$=d.pipe(mn()),this.showTrailsLayer$=Hg([this.mapConfigService.showTrailsLayer$,this.mustHideShips$]).pipe(Object(Ge.a)(([t,e])=>t&&!e),mn()),this.showSelectionMarkers$=this.mustHideShips$.pipe(Object(Ge.a)(t=>!t),mn()),this.showEntitiesSelections$=Hg([this.mapConfigService.enableMultiSelectionMode$,this.mustHideShips$]).pipe(Object(Ge.a)(([t,e])=>t&&!e),mn()),this.showAlertsLayer$=Hg([this.alertsService.alerts$,this.mustHideShips$]).pipe(Object(Ge.a)(([t,e])=>t.length>0||!e),mn()),this.showEventsLayer$=this.showAlertsLayer$}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(IP),r.Zb(DP),r.Zb(MP),r.Zb(TP),r.Zb(bI),r.Zb(hI),r.Zb(WP),r.Zb(KO),r.Zb(tM),r.Zb(vI),r.Zb(mT))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function AT(t=0,e=Ue){return(!yn(t)||t<0)&&(t=0),e&&"function"==typeof e.schedule||(e=Ue),new Ze.a(i=>(i.add(e.schedule(bT,t,{subscriber:i,counter:0,period:t})),i))}function bT(t){const{subscriber:e,counter:i,period:n}=t;e.next(i),this.schedule({subscriber:e,counter:i+1,period:n},n)}let vT=(()=>{class t{constructor(){this.userAFK$=new Av.a(!1),document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState?(clearTimeout(this.afkTimeout),this.userAFK$.next(!1)):this.afkTimeout=setTimeout(()=>{this.userAFK$.next(!0)},9e5)})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),_T=(()=>{class t{constructor(t,e,i){this.mapConfigService=t,this.historyService=e,this.visibilityService=i,this.refresh$=new _e.a,this.pause$=new Av.a(!1),this.tap=()=>{this.refreshTimer&&this.refreshTimer.unsubscribe(),this.refreshTimer=AT(this.mapConfigService.shipRefreshInterval$.value).pipe(He(()=>!this.pause$.value),He(()=>!this.visibilityService.userAFK$.value),He(()=>0===this.historyService.timestamp$.value)).subscribe(()=>{this.refresh$.next()})},this.mapConfigService.shipRefreshInterval$.subscribe(()=>{this.tap()}),this.pause$.subscribe(t=>{t||(this.tap(),this.refresh$.next())})}destroy(){this.setPause(!1),this.refreshTimer.unsubscribe()}togglePause(){this.pause$.next(!this.pause$.value)}setPause(t){this.pause$.next(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(hI),r.Zb(bI),r.Zb(vT))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),yT=(()=>{class t{constructor(t,e){this.configService=t,this.refreshTimerService=e,this.timeRange$=new Av.a(null),this.reset(),this.refreshTimerService.refresh$.subscribe(()=>{this.refresh()})}reset(){this.timeRange$.next(iI[this.configService.defaultTimeRange].refresh())}refresh(){this.timeRange$.value.isCustom||this.timeRange$.next(this.timeRange$.value.refresh())}updateTimeRange(t){this.timeRange$.next(t.refresh())}setCustom(t,e){this.timeRange$.next(this.timeRange$.value.setCustom(t,e))}setRelative(t){this.timeRange$.next(this.timeRange$.value.setRelative(t))}goBackward(){this.timeRange$.next(this.timeRange$.value.shift(-this.timeRange$.value.value/2))}goForward(){this.timeRange$.next(this.timeRange$.value.shift(this.timeRange$.value.value/2))}extendBackward(){this.timeRange$.next(this.timeRange$.value.extend(-this.timeRange$.value.value/2))}extendForward(){this.timeRange$.next(this.timeRange$.value.extend(this.timeRange$.value.value/2))}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(cI),r.Zb(_T))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),wT=(()=>{class t{constructor(t,e,i,n,r){this.historyService=t,this.mapConfigService=e,this.timeRangeService=i,this.workerService=n,this.zonesService=r,this.shipsInView$=new Av.a([]),this.shipsCount$=new Av.a(0)}fetchShip(t){return Object(ue.a)(this,void 0,void 0,function*(){const e=yield this.workerService.ships.getShip(t);let i=this.timeRangeService.timeRange$.value;if(!i.isCustom){const t=this.historyService.timestamp$.value;i=i.setRelative(t>0?t:e.timestamp)}return Object.assign(e,yield this.workerService.ships.getShipDetails(t,i,this.mapConfigService.detailedShipTraces$.value,this.mapConfigService.debugH3Trace$.value,!!fD.a.portCallsEnable)),e.trail.forEach(t=>{t.ship=e}),e.h3Trace.elements.forEach(t=>{t.ship=e}),e.events=e.events.filter(t=>t.type!==UP.MoveZoneEntry&&t.type!==UP.MoveZoneExit||!!this.zonesService.zonesById[t.data.zone]),e})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(bI),r.Zb(hI),r.Zb(yT),r.Zb(_I.a),r.Zb(kP))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),xT=(()=>{class t{constructor(t,e,i,n,r,s,o,a,l,c,h){this.ngZone=t,this.router=e,this.errorHandler=i,this.alertRulesService=n,this.eventsLayerService=r,this.h3TracesLayerService=s,this.mapConfigService=o,this.mapStateService=a,this.shipsService=l,this.timeRangeService=c,this.workerService=h,this.entities$=new Av.a([]),this.openEntity$=new Av.a(null),this.alerts$=new Av.a([]),this.trails$=new Av.a([]),this.mustHideShips=!1,this.mapStateService.mustHideShips$.subscribe(t=>{this.mustHideShips=t}),this.entities$.pipe(Object(Ge.a)(t=>t.filter(t=>!!t.entity))).subscribe(t=>{const e=[],i=[],n=[],r=[];t.forEach(t=>{var s,o,a;t.type===OP.Aircraft?e.push(t.entity.trace):t.type===OP.Ship&&(n.push(...null!==(s=t.entity.alerts)&&void 0!==s?s:[]),r.push(...null!==(o=t.entity.events)&&void 0!==o?o:[]),e.push(t.entity.trail),i.push(null!==(a=t.entity.h3Trace)&&void 0!==a?a:[]))}),n.forEach(t=>{const[e,i]=this.alertRulesService.getAlertRuleColor(t.rule_id);t.color=e,t.rgbVecColor=i}),this.alerts$.next(n),this.eventsLayerService.updateEvents(r),this.trails$.next(e),this.h3TracesLayerService.updateTrails(i)}),Object(or.a)(this.mapConfigService.detailedShipTraces$.pipe(Gg(1)),this.timeRangeService.timeRange$.pipe(Gg(1))).pipe(He(()=>!this.mustHideShips)).subscribe(()=>Object(ue.a)(this,void 0,void 0,function*(){yield Promise.all(this.entities$.value.map(t=>Object(ue.a)(this,void 0,void 0,function*(){yield this.fetchEntity(t.type,t.id)})))})),this.mapConfigService.enableMultiSelectionMode$.subscribe(t=>{t||(this.openEntity$.value?this.entities$.next([this.openEntity$.value]):this.entities$.value.length>1&&this.entities$.next([this.entities$.value[0]]))}),Hg([this.entities$.pipe(Object(Ge.a)(t=>t.filter(t=>t.type===OP.Ship&&!!t.entity).map(t=>t.entity.mmsi)),mn()),this.mapConfigService.showOtherShips$]).subscribe(([t,e])=>{this.mapConfigService.updateShipIdsFilter(e?[]:t)})}clear(){this.entities$.next([])}selectShip(t){this.toggleSelection(OP.Ship,t)}selectAircraft(t){this.toggleSelection(OP.Aircraft,t)}openEntity(t,e){const i=this.entities$.value.find(i=>i.type===t&&i.id===e);i?this.openEntity$.next(i):(this.toggleSelection(t,e),this.openEntity$.next(this.entities$.value[this.entities$.value.length-1]))}closeOpenEntity(){this.openEntity$.next(null),this.mapConfigService.enableMultiSelectionMode$.value||this.entities$.next([])}toggleSelection(t,e){var i;let n=this.entities$.value;const r=n.findIndex(t=>t.id===e);if(-1===r){CC({category:"app",message:`select-entity: ${t}`});const i={type:t,id:e,entity:null};this.mapConfigService.enableMultiSelectionMode$.value||(n=[],this.ngZone.run(()=>{this.router.navigateByUrl(`${t}s/${e}`)})),n.push(i),this.fetchEntity(t,e)}else CC({category:"app",message:`unselect-entity: ${t}`}),n[r].id===(null===(i=this.openEntity$.value)||void 0===i?void 0:i.id)&&this.router.navigateByUrl("/"),n.splice(r,1);this.entities$.next(n)}addToSelection(t,e){-1===this.entities$.value.findIndex(t=>t.id===e)&&this.toggleSelection(t,e)}fetchEntity(t,e){return Object(ue.a)(this,void 0,void 0,function*(){let i=null,n=null;try{t===OP.Ship?i=yield this.shipsService.fetchShip(e):t===OP.Aircraft&&(i=yield this.workerService.aircrafts.getAircraftDetails(e))}catch($nt){$nt.name===kC.Unauthorized&&this.errorHandler.handleError($nt),n=$nt.message.includes(`GetTrip ERROR : ${e} dont find`)?`L'a\xe9ronef ${e} est inconnu. Il a d\xfb atterrir ou son signal n'est plus capt\xe9 depuis plus de 5 minutes.`:"not found"===$nt.message?`Le navire ${e} est inconnu.`:$nt.message}this.updateEntity(t,e,i,n)})}updateEntity(t,e,i,n){const r=this.entities$.value.findIndex(i=>i.type===t&&i.id===e);if(-1===r)return;const s=Object.assign(Object.assign({},this.entities$.value[r]),{entity:i,error:n});this.entities$.value[r]=s,this.entities$.next(this.entities$.value);const o=this.openEntity$.value;o&&o.type===t&&o.id===e&&this.openEntity$.next(s)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.B),r.Zb(sw),r.Zb(r.n),r.Zb(DP),r.Zb($P),r.Zb(GP),r.Zb(hI),r.Zb(gT),r.Zb(wT),r.Zb(yT),r.Zb(_I.a))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();class CT{constructor(t){this.closingNotifier=t}call(t,e){return e.subscribe(new ST(t,this.closingNotifier))}}class ST extends bn.b{constructor(t,e){super(t),this.buffer=[],this.add(Object(bn.c)(e,new bn.a(this)))}_next(t){this.buffer.push(t)}notifyNext(){const t=this.buffer;this.buffer=[],this.destination.next(t)}}let kT=(()=>{class t{constructor(){var t;this.hoveredAircraft$=new Av.a(null),this.hoveredAlert$=new Av.a(null),this.hoveredAnnotation$=new Av.a(null),this.hoveredEvent$=new Av.a(null),this.hoveredShip$=new Av.a(null),this.hoveredAircraftPosition$=new Av.a(null),this.hoveredShipPosition$=new Av.a(null),this.hoveredH3Element$=new Av.a(null),this.pinnedEntitiesTooltips$=new Av.a([]),this.pinEvents$=new _e.a,this.displayedEntity$=Hg([this.hoveredAircraft$.pipe(mn()),this.hoveredAlert$.pipe(mn()),this.hoveredEvent$.pipe(mn()),this.hoveredShip$.pipe(mn()),this.hoveredAircraftPosition$.pipe(mn()),this.hoveredShipPosition$.pipe(mn()),this.hoveredAnnotation$.pipe(mn((t,e)=>null===e&&t===e)),this.hoveredH3Element$.pipe(mn())]).pipe(Object(Ge.a)(([t,e,i,n,r,s,o,a])=>{var l,c,h,u,d,p,f;return null!==(f=null!==(p=null!==(d=null!==(u=null!==(h=null!==(c=null!==(l=null!=e?e:i)&&void 0!==l?l:t)&&void 0!==c?c:n)&&void 0!==h?h:r)&&void 0!==u?u:s)&&void 0!==d?d:o)&&void 0!==p?p:a)&&void 0!==f?f:null}),Pe(t=>{t&&(t.hdms=Yk([t.lon,t.lat]))})),this.pinEvents$.pipe((t=this.pinEvents$.pipe(Be(50)),function(e){return e.lift(new CT(t))}),Object(Ge.a)(t=>{var e,i,n,r,s,o;return null!==(o=null!==(s=null!==(r=null!==(n=null!==(i=null!==(e=t.find(t=>t.kind===OP.Alert))&&void 0!==e?e:t.find(t=>t.kind===OP.Event))&&void 0!==i?i:t.find(t=>t.kind===OP.Ship))&&void 0!==n?n:t.find(t=>t.kind===OP.AircraftPosition))&&void 0!==r?r:t.find(t=>t.kind===OP.ShipPosition))&&void 0!==s?s:t.find(t=>t.kind===OP.Annotation))&&void 0!==o?o:t.find(t=>t.kind===OP.H3Element)}),He(t=>!!t)).subscribe(t=>{t.kind===OP.Annotation?t=OD(t):t.hdms=Yk([t.lon,t.lat]),this.pinnedEntitiesTooltips$.value.push({lon:t.lon,lat:t.lat,positioning:"bottom-left",entity:t}),this.pinnedEntitiesTooltips$.next(this.pinnedEntitiesTooltips$.value)})}hoverEntity(t,e){switch(t){case OP.Aircraft:e&&(e.kind=OP.Aircraft),this.hoveredAircraft$.next(e);break;case OP.Alert:e&&(e.kind=OP.Alert),this.hoveredAlert$.next(e);break;case OP.Annotation:e&&(e.kind=OP.Annotation),this.hoveredAnnotation$.next(e);break;case OP.Event:e&&(e.kind=OP.Event),this.hoveredEvent$.next(e);break;case OP.Ship:this.hoveredShip$.next(e);break;case OP.AircraftPosition:e&&(e.kind=OP.AircraftPosition),this.hoveredAircraftPosition$.next(e);break;case OP.ShipPosition:e&&(e.kind=OP.ShipPosition),this.hoveredShipPosition$.next(e);break;case OP.H3Element:e&&(e.kind=OP.H3Element),this.hoveredH3Element$.next(e);break;default:throw new Error("Entit\xe9 inconnue")}}clearPinnedEntities(){this.pinnedEntitiesTooltips$.next([])}pinEntity(t){this.pinEvents$.next(t)}unpinTooltip(t){this.pinnedEntitiesTooltips$.next(this.pinnedEntitiesTooltips$.value.filter(e=>e!==t))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),ET=(()=>{class t{constructor(t,e,i){this.ngZone=t,this.selectionService=e,this.tooltipsService=i,this.selectAlertFeature$=new _e.a,this.selectEventFeature$=new _e.a,this.selectEventItem$=new _e.a,this.mapClickEvents$=new _e.a,this.ngZone.runOutsideAngular(()=>{this.mapClickEvents$.pipe(function(t){let e=arguments.length,i=Ue;Object(we.a)(arguments[arguments.length-1])&&(i=arguments[arguments.length-1],e--);let n=null;e>=2&&(n=arguments[1]);let r=Number.POSITIVE_INFINITY;return e>=3&&(r=arguments[2]),function(e){return e.lift(new BP(t,n,r,i))}}(16),Object(Ge.a)(t=>{var e,i,n,r,s,o,a;return null!==(a=null!==(o=null!==(s=null!==(r=null!==(n=null!==(i=null!==(e=t.find(t=>t.kind===OP.Alert))&&void 0!==e?e:t.find(t=>t.kind===OP.Event))&&void 0!==i?i:t.find(t=>t.kind===OP.Aircraft))&&void 0!==n?n:t.find(t=>t.kind===OP.Ship))&&void 0!==r?r:t.find(t=>t.kind===OP.AircraftPosition))&&void 0!==s?s:t.find(t=>t.kind===OP.ShipPosition))&&void 0!==o?o:t.find(t=>t.kind===OP.Annotation))&&void 0!==a?a:t.find(t=>t.kind===OP.H3Element)}),He(t=>!!t)).subscribe(t=>{switch(CC({category:"app",message:`map-click: ${t.kind}`}),t.kind){case OP.Aircraft:this.selectionService.selectAircraft(t.icao);break;case OP.AircraftPosition:this.tooltipsService.pinEntity(t);break;case OP.Alert:this.selectAlertFeature$.next(t),this.tooltipsService.pinEntity(t);break;case OP.Annotation:this.tooltipsService.pinEntity(t);break;case OP.Event:this.selectEventFeature$.next(t),this.tooltipsService.pinEntity(t);break;case OP.Ship:this.selectionService.selectShip(t.mmsi);break;case OP.ShipPosition:case OP.H3Element:this.tooltipsService.pinEntity(t);break;default:throw new Error("Entit\xe9 inconnue")}})})}clickOnEntity(t,e){switch(t){case OP.Aircraft:e.kind=OP.Aircraft,this.mapClickEvents$.next(e);break;case OP.AircraftPosition:e.kind=OP.AircraftPosition,this.mapClickEvents$.next(e);break;case OP.Alert:e.kind=OP.Alert,this.mapClickEvents$.next(e);break;case OP.Annotation:e.kind=OP.Annotation,this.mapClickEvents$.next(e);break;case OP.Event:e.kind=OP.Event,this.mapClickEvents$.next(e);break;case OP.Ship:this.mapClickEvents$.next(e);break;case OP.ShipPosition:e.kind=OP.ShipPosition,this.mapClickEvents$.next(e);break;case OP.H3Element:e.kind=OP.H3Element,this.mapClickEvents$.next(e);break;default:throw new Error("Entit\xe9 inconnue")}}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.B),r.Zb(xT),r.Zb(kT))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),DT=(()=>{class t{constructor(){this.zones$=new Av.a([])}clear(){this.zones$.next([])}updateZones(t){this.zones$.next(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),IT=(()=>{class t{constructor(t,e,i,n,r,s){this.interactionsService=t,this.mapService=e,this.tooltipsService=i,this.workerService=n,this.zonesLayerService=r,this.zonesService=s,this.transhipmentTrail$=new Av.a(null),this.interactionsService.selectEventItem$.subscribe(t=>{this.mapService.pingLocation([t.lon,t.lat]),this.mapService.centerOnLonLat([t.lon,t.lat])}),this.interactionsService.selectEventFeature$.subscribe(t=>{this.tooltipsService.pinEntity(t)}),Object(or.a)(this.interactionsService.selectEventFeature$,this.interactionsService.selectEventItem$).subscribe(t=>{if(!t)return;let e=!1,i=!1;switch(t.type){case UP.PositionDubious:{this.mapService.pingLocation([t.data.lon,t.data.lat]);const i=qD.New(t.lon,t.lat,t.lon,t.lat);i.addPoint(t.data.lon,t.data.lat),this.mapService.fitOn(i.toExtent()),e=!0;break}case UP.MoveZoneEntry:case UP.MoveZoneExit:{const i=this.zonesService.zonesById[t.data.zone];this.zonesLayerService.updateZones([i]),this.mapService.fitOn(wP(i.h3indexes)),e=!0;break}case UP.MoveMeetingAtSea:this.viewTranshipment(t.data.mmsi,t.timestamp),i=!0}i||this.hideTranshipment(),e||this.zonesLayerService.clear()})}viewTranshipment(t,e){return Object(ue.a)(this,void 0,void 0,function*(){const i=yield this.workerService.ships.getShipTrail(t,e-86400,e+86400);this.transhipmentTrail$.next(i)})}hideTranshipment(){this.transhipmentTrail$.value&&this.transhipmentTrail$.next(null)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(ET),r.Zb(pI),r.Zb(kT),r.Zb(_I.a),r.Zb(DT),r.Zb(kP))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),PT=(()=>{class t{constructor(t,e){this.configService=t,this.mapConfigService=e,this.configurations$=new Av.a([]),this.activeConfigurationName$=new Av.a(""),this.activeConfiguration$=new Av.a(null),this.dirtyActiveConfiguration$=new Av.a(!1),this.loadConfig(),Hg([this.configurations$,this.activeConfigurationName$]).pipe(Gg(1),Be(300)).subscribe(()=>{this.saveConfig()}),Hg([this.configurations$,this.activeConfigurationName$]).subscribe(([t,e])=>{this.activeConfiguration$.next(e?t.find(t=>t.name===e):null)}),this.activeConfiguration$.pipe(Gg(1),mn()).subscribe(t=>{this.mapConfigService.updateBatch(t?t.filters:zD())}),this.activeConfiguration$.subscribe(t=>{var e;this.dirtyActiveConfiguration$.next(!1),null===(e=this.dirtyWatch)||void 0===e||e.unsubscribe(),t&&(this.dirtyWatch=this.mapConfigService.shipFilter$.pipe(Object(Ge.a)(t=>HD(t)),mn(KD),Gg(1)).subscribe(()=>{this.dirtyActiveConfiguration$.next(!0)}))})}loadConfig(){const t=this.configService.filterConfigurations;t&&(FD(t.configurations)&&(t.configurations.forEach(t=>{t.filters=Object.assign({},zD(),t.filters)}),this.configurations$.next(t.configurations)),FD(t.activeConfigurationName)&&this.activeConfigurationName$.next(t.activeConfigurationName))}saveConfig(){this.configService.set("filterConfigurations",{configurations:this.configurations$.value,activeConfigurationName:this.activeConfigurationName$.value})}selectConfiguration(t){this.activeConfigurationName$.next(t)}importConfiguration(t){t.filters=Object.assign({},zD(),t.filters),this.configurations$.next([...this.configurations$.value,t].sort((t,e)=>t.name<=e.name?-1:1))}createConfiguration(t){this.configurations$.next([...this.configurations$.value,{name:t,filters:HD(this.mapConfigService.shipFilter$.value)}].sort((t,e)=>t.name<=e.name?-1:1))}renameConfiguration(t,e){const i=this.configurations$.value.findIndex(e=>e.name===t),n=this.configurations$.value.findIndex(t=>t.name===e);if(-1===i)throw new Error("Configuration non trouv\xe9e");if(-1!==n&&n!==i)throw new Error("La configuration existe d\xe9j\xe0");const[r]=this.configurations$.value.splice(i,1);r.name=e,this.configurations$.next([...this.configurations$.value,r].sort((t,e)=>t.name<=e.name?-1:1)),this.selectConfiguration(e)}updateConfiguration(t){const e=this.configurations$.value.findIndex(e=>e.name===t.name);if(-1===e)throw new Error("Configuration non trouv\xe9e");this.configurations$.value.splice(e,1),this.configurations$.next([...this.configurations$.value,t].sort((t,e)=>t.name<=e.name?-1:1))}deleteConfiguration(t){this.configurations$.next(this.configurations$.value.filter(e=>e.name!==t)),this.activeConfigurationName$.next(null)}clear(){this.configurations$.next([]),this.activeConfigurationName$.next(null)}clearMapFilters(){this.mapConfigService.resetShipFilter()}updateActiveConfigurationFilters(){if(!this.activeConfigurationName$.value)throw new Error("Aucune configuration active");this.updateConfiguration({name:this.activeConfigurationName$.value,filters:HD(this.mapConfigService.shipFilter$.value)})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(cI),r.Zb(hI))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),OT=(()=>{class t{constructor(t,e,i,n){this.alertRulesService=t,this.mapConfigService=e,this.timeRangeService=i,this.workerService=n,this.fleets$=new Av.a([]),this.fleetsById={},this.selectedFleet$=new Av.a(null),this.selectingFleet=!1,this.fleetAlerts$=new Av.a([]),this.fleetTrails$=new Av.a([]),this.fleets$.subscribe(()=>{this.updateFleetsShipsCache(this.mapConfigService.shipFilter$.value.fleets)}),this.mapConfigService.detailedShipTraces$.subscribe(()=>Object(ue.a)(this,void 0,void 0,function*(){this.selectedFleet$.value&&(yield this.selectFleet(this.selectedFleet$.value.id))})),Hg([this.selectedFleet$,this.mapConfigService.showFleetShipsOnly$]).pipe(Gg(1)).subscribe(([t,e])=>{this.mapConfigService.updateShipIdsFilter(e&&t?t.ships.map(t=>t.mmsi):[])})}refreshFleets(){return Object(ue.a)(this,void 0,void 0,function*(){const t=yield this.workerService.fleets.list();return this.fleetsById=t.reduce((t,e)=>(t[e.id]=e,t),{}),this.fleets$.next(t),t})}clear(){this.fleets$.next([])}selectFleet(t){return Object(ue.a)(this,void 0,void 0,function*(){this.selectingFleet=!0;const e=this.timeRangeService.timeRange$.value,[i,n,r]=yield Promise.all([this.workerService.fleets.get(t),this.workerService.fleets.getFleetTrails(t,e.start,e.end,this.mapConfigService.detailedShipTraces$.value),this.workerService.fleets.getFleetAlerts(t,e.start,e.end)]);this.selectedFleet$.next(i);const s=i.ships.reduce((t,e)=>(t[e.mmsi]=e,t),{}),o=Object.entries(n).map(([t,e])=>e.map(e=>(e.ship=s[t],e)));return r.forEach(t=>{const[e,i]=this.alertRulesService.getAlertRuleColor(t.rule_id);t.color=e,t.rgbVecColor=i}),this.fleetAlerts$.next(r),this.fleetTrails$.next(o),this.selectingFleet=!1,{fleet:i,trailsByMMSI:n,alerts:r}})}deselectFleet(){this.selectedFleet$.next(null),this.fleetAlerts$.next([]),this.fleetTrails$.next([])}createFleet(t){return Object(ue.a)(this,void 0,void 0,function*(){const e=yield this.workerService.fleets.create(t);return yield this.refreshFleets(),e})}updateFleet(t){return Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.fleets.update(t),yield this.refreshFleets()})}deleteFleet(t){return Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.fleets.delete(t),yield this.refreshFleets()})}updateFleetsFilter(t){this.updateFleetsShipsCache(t),this.mapConfigService.updateFleetsFilter(t)}updateFleetsShipsCache(t){this.mapConfigService.shipFilter$.value.fleetsShipsCache=this.fleets$.value.filter(e=>t.includes(e.id)).flatMap(t=>t.ships.map(t=>t.mmsi))}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(DP),r.Zb(hI),r.Zb(yT),r.Zb(_I.a))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),MT=(()=>{class t{constructor(){this.initialized$=new Av.a(!1)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),TT=(()=>{class t{constructor(t,e,i){this.appInitService=t,this.mapStateService=e,this.workerService=i,this.ports$=new Av.a([]),this.appInitService.initialized$.pipe(He(t=>t)).subscribe(()=>{this.mapStateService.showPortsLayer$.pipe(He(t=>t),Rv()).subscribe(()=>Object(ue.a)(this,void 0,void 0,function*(){this.ports$.next(yield this.workerService.ports.listPorts())}))})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(MT),r.Zb(gT),r.Zb(_I.a))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),RT=(()=>{class t{constructor(t,e,i,n,r,s,o,a,l,c,h,u,d,p,f,m){this.alertRulesService=t,this.alertsService=e,this.annotationsService=i,this.drawingService=n,this.eventsService=r,this.filterConfigurationsService=s,this.fleetsService=o,this.historyService=a,this.interactionsService=l,this.mapService=c,this.mapConfigService=h,this.portsService=u,this.timeRangeService=d,this.uiService=p,this.workerService=f,this.zonesService=m,this.initialized=!1}init(){return Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.view.reset(),yield Promise.all([this.fleetsService.refreshFleets(),this.zonesService.refreshZones(),this.annotationsService.refreshAnnotations()]),yield this.alertRulesService.refreshAlertRules(),this.initialized=!0})}destroy(){this.alertRulesService.clear(),this.fleetsService.clear(),this.zonesService.clear(),this.filterConfigurationsService.clear(),this.mapConfigService.clear(),this.drawingService.clearZones(),this.zonesService.clear(),this.annotationsService.clear(),this.initialized=!1}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(DP),r.Zb(IP),r.Zb(MP),r.Zb(TP),r.Zb(IT),r.Zb(PT),r.Zb(OT),r.Zb(bI),r.Zb(ET),r.Zb(pI),r.Zb(hI),r.Zb(TT),r.Zb(yT),r.Zb(VI),r.Zb(_I.a),r.Zb(kP))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),VT=(()=>{class t{constructor(t,e,i,n){this.authenticationService=t,this.initializationService=e,this.uiService=i,this.router=n}canActivateChild(t,e){return Object(ue.a)(this,void 0,void 0,function*(){return this.authenticationService.isAuthenticated()?(this.initializationService.initialized||(yield this.initializationService.init()),!0):(this.uiService.error("Vous devez \xeatre authentifi\xe9"),yield this.router.navigateByUrl(`/login?redirect=${e.url}`),!1)})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(yI),r.Zb(RT),r.Zb(VI),r.Zb(sw))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),FT=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-about-dialog"]],decls:122,vars:0,consts:[["mat-dialog-title","",1,"d-flex"],[1,"u-flex"],["mat-button","","title","Fermer le panneau",3,"mat-dialog-close"],["href","https://beta.gouv.fr/startups/anais.html"],["href","https://beta.gouv.fr/apropos/"],[1,"about-dialog__faq-title"],[1,"about-dialog__faq"],["href","https://beta.gouv.fr/startups/sepia.html"],["href","/3rdpartylicenses.txt"],["href","https://www.marineregions.org/"],["href","https://doi.org/10.14284/386"]],template:function(t,e){1&t&&(r.Vb(0,"h1",0),r.Kc(1," \xc0 propos d'ANAIS "),r.Qb(2,"div",1),r.Vb(3,"button",2),r.Vb(4,"mat-icon"),r.Kc(5,"close"),r.Ub(),r.Ub(),r.Ub(),r.Vb(6,"div"),r.Vb(7,"h3"),r.Kc(8,"ANAIS comme Analyse des Incoh\xe9rences de Situation maritime"),r.Ub(),r.Vb(9,"p"),r.Kc(10," C'est un projet men\xe9 en \xab start-up d'\xc9tat \xbb, cr\xe9\xe9 par la Marine et pour la Marine, avec le soutien de l'Agence de l'Innovation de D\xe9fense et de la fabrique num\xe9rique. "),r.Ub(),r.Vb(11,"p"),r.Kc(12," La vocation premi\xe8re d'ANAIS est d'apporter un service op\xe9rationnel sans limite de licence, au plus proche du besoin op\xe9rationnel. "),r.Ub(),r.Vb(13,"p"),r.Kc(14," L'objectif est d'avoir la main sur les d\xe9veloppements. Il n'y a pas de logique commerciale ni contractuelle, ni de licence. "),r.Ub(),r.Vb(15,"p"),r.Kc(16," Nous allons faire \xe9voluer ANAIS au plus pr\xe8s des besoins des utilisateurs et rajouter au fur et \xe0 mesure des id\xe9es, des donn\xe9es et des algorithmes. "),r.Ub(),r.Vb(17,"p"),r.Kc(18," ANAIS est \xe0 utiliser en compl\xe9ment des outils commerciaux. "),r.Ub(),r.Vb(19,"div"),r.Kc(20," Pour plus d'informations, vous pouvez consulter la "),r.Vb(21,"a",3),r.Kc(22,"fiche produit sur beta.gouv"),r.Ub(),r.Kc(23," ou bien obtenir plus d'informations sur la "),r.Vb(24,"a",4),r.Kc(25,"m\xe9thode de d\xe9veloppement beta.gouv"),r.Ub(),r.Kc(26,". "),r.Ub(),r.Vb(27,"h3",5),r.Kc(28,"Questions r\xe9currentes"),r.Ub(),r.Vb(29,"div",6),r.Vb(30,"div"),r.Vb(31,"h4"),r.Kc(32,"Quels sont les navigateurs compatibles ?"),r.Ub(),r.Kc(33," Nous visons \xe0 rendre ANAIS compatible avec Chrome >= 56 et Firefox >= 52 (version utilis\xe9e sur intradef). Il est recommand\xe9 d'utiliser des versions "),r.Vb(34,"strong"),r.Kc(35,"r\xe9centes"),r.Ub(),r.Kc(36," de navigateurs afin de profiter des derni\xe8res optimisations de performance. "),r.Qb(37,"br"),r.Vb(38,"strong"),r.Kc(39,"Internet Explorer et Edge ne sont pas test\xe9s et ne sont probablement pas compatibles."),r.Ub(),r.Ub(),r.Vb(40,"div"),r.Vb(41,"h4"),r.Kc(42,"Compatibilit\xe9 ISPT ?"),r.Ub(),r.Kc(43," ANAIS fonctionne sur le r\xe9seau intradef avec les PC ISPT \xe0 condition d'autoriser le d\xe9blocage des serveurs utilis\xe9s par ANAIS : "),r.Vb(44,"em"),r.Kc(45,"anais.beta.gouv.fr"),r.Ub(),r.Kc(46," et tous les serveurs en "),r.Vb(47,"em"),r.Kc(48,"*.anais.beta.gouv.fr"),r.Ub(),r.Kc(49,". "),r.Ub(),r.Vb(50,"div"),r.Vb(51,"h4"),r.Kc(52,"Quelles sont les donn\xe9es utilis\xe9es ? D'o\xf9 viennent-elles ?"),r.Ub(),r.Kc(53," Les donn\xe9es AIS proviennent de 2 fournisseurs : l'agence europ\xe9enne de s\xe9curit\xe9 maritime (EMSA) avec le flux IMDATE (EMSA's Integrated Maritime Data Environment (IMDatE)) et CLS (couverture mondiale). "),r.Qb(54,"br"),r.Kc(55," Les donn\xe9es ADS-B des a\xe9ronefs de notre partenaire "),r.Vb(56,"a",7),r.Kc(57,"SEPIA"),r.Ub(),r.Kc(58," : ADSBHub, ELia-AF-Gao-1, ELia-AF-Gossi-1, ELia-AF-Niamey-2, FlightRadar24, Ghost, Glidernet, RTB. "),r.Ub(),r.Vb(59,"div"),r.Vb(60,"h4"),r.Kc(61,"\xc0 quoi servent les r\xe8gles d'alertes ?"),r.Ub(),r.Kc(62," Les r\xe8gles d'alertes permettent de configurer des crit\xe8res et des filtres afin de lever des alertes sur des comportements bien pr\xe9cis. Par exemple, un transbordement dans une zone. Le but des alertes est de notifier l'utilisateur automatiquement quand un comportement suspect est d\xe9tect\xe9. "),r.Ub(),r.Vb(63,"div"),r.Vb(64,"h4"),r.Kc(65,"Il semble y avoir des faux-positifs sur les \xe9v\xe9nements !"),r.Ub(),r.Kc(66," La d\xe9tection automatique des transbordements et routes erratiques est complexe. Nous essayons d'optimiser les algorithmes afin de g\xe9rer au mieux les cas particuliers. Nous pr\xe9voyons notamment d'exclure les zones de port car les \xe9v\xe9nements dans les ports sont non pertinents. "),r.Ub(),r.Vb(67,"div"),r.Vb(68,"h4"),r.Kc(69,"Les performances sont mauvaises ! Je passe mon temps \xe0 attendre..."),r.Ub(),r.Kc(70," Nous faisons notre maximum afin d'am\xe9liorer les performances du syst\xe8me. N'h\xe9sitez-pas \xe0 nous contacter pour qu'on puisse trouver un moyen d'adapter ANAIS \xe0 votre usage. "),r.Ub(),r.Vb(71,"div"),r.Vb(72,"h4"),r.Kc(73,"Confidentialit\xe9"),r.Ub(),r.Kc(74," La connexion au serveur utilise le protocole HTTPS (TLS 1.2) et un certificat Let's Encrypt. Les serveurs et la bases de donn\xe9es sont h\xe9berg\xe9s chez OVH. "),r.Ub(),r.Vb(75,"div"),r.Vb(76,"h4"),r.Kc(77,"J'ai des id\xe9es d'am\xe9liorations !"),r.Ub(),r.Kc(78," L'\xe9quipe derri\xe8re ANAIS est ouverte \xe0 toute remarque et proposition d'am\xe9lioration. Elle se r\xe9serve n\xe9anmoins le droit de prioriser et d'adapter les fonctionnalit\xe9s afin de r\xe9pondre \xe0 la majorit\xe9 des utilisateurs. Vous pouvez utiliser le chat pour dialoguer directement avec l'\xe9quipe. "),r.Ub(),r.Vb(79,"div"),r.Vb(80,"h4"),r.Kc(81,"Je suis dans un navire / avion et j'ai un d\xe9bit internet trop petit pour ANAIS"),r.Ub(),r.Kc(82," Nous avons travaill\xe9 et travaillons toujours pour optimiser au maximum l'utilisation du d\xe9bit. Ainsi, nous avons ajout\xe9 des param\xe8tres afin de limiter l'utilisation de la bande passante en environnement contraint. Ces param\xe8tres sont accessibles via le menu "),r.Vb(83,"em"),r.Kc(84,"Param\xe8tres"),r.Ub(),r.Kc(85,". "),r.Vb(86,"ul"),r.Vb(87,"li"),r.Kc(88,"Activer la "),r.Vb(89,"em"),r.Kc(90,"Restriction de carte"),r.Ub(),r.Kc(91," afin de ne charger qu'une zone pr\xe9d\xe9finie de la surface du globe"),r.Ub(),r.Vb(92,"li"),r.Kc(93,"Augmenter l'"),r.Vb(94,"em"),r.Kc(95,"intervalle de rafraichissement des derni\xe8res positions des navires"),r.Ub(),r.Ub(),r.Vb(96,"li"),r.Kc(97,"Augmenter la "),r.Vb(98,"em"),r.Kc(99,"p\xe9riode de temps par d\xe9faut"),r.Ub(),r.Kc(100," pour les traces que l'on r\xe9cup\xe8re quand on consulte une fiche navire"),r.Ub(),r.Vb(101,"li"),r.Kc(102,"Activer la "),r.Vb(103,"em"),r.Kc(104,"limite de zoom minimum"),r.Ub(),r.Kc(105," afin de ne pas charger trop de navires d'un coup"),r.Ub(),r.Ub(),r.Ub(),r.Ub(),r.Vb(106,"h3",5),r.Kc(107,"Outils Open Source"),r.Ub(),r.Vb(108,"p"),r.Kc(109," Ce projet se base enti\xe8rement sur des outils open source dont les licences sont visibles \xe0 cet "),r.Vb(110,"a",8),r.Kc(111,"endroit"),r.Ub(),r.Kc(112,". "),r.Ub(),r.Vb(113,"p"),r.Kc(114," Autres cr\xe9dits :"),r.Qb(115,"br"),r.Kc(116," - Flanders Marine Institute (2019). Maritime Boundaries Geodatabase: Maritime Boundaries and Exclusive Economic Zones (200NM), version 11. Available online at "),r.Vb(117,"a",9),r.Kc(118,"https://www.marineregions.org/"),r.Ub(),r.Kc(119,". "),r.Vb(120,"a",10),r.Kc(121,"https://doi.org/10.14284/386"),r.Ub(),r.Ub(),r.Ub())},directives:[ql,Dl,Zl,Yp],styles:[".about-dialog__faq-title[_ngcontent-%COMP%]{margin-top:32px}.about-dialog__faq[_ngcontent-%COMP%]{display:grid;grid-gap:1em;grid-template-columns:1fr 1fr}"]}),t})(),LT=(()=>{class t{constructor(){this.subscriptions=[],this.eventListeners=[]}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe()),this.eventListeners.forEach(ME)}ensureMandatoryInputParams(...t){t.forEach(t=>{if(void 0===this[t])throw new Error(`Missing input property '${t}'`)})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t}),t})(),UT=(()=>{class t extends LT{constructor(t,e,i,n,r){super(),this.titleService=t,this.router=e,this.dialog=i,this.mapService=n,this.routeService=r}ngOnInit(){this.titleService.setTitle("\xc0 propos - ANAIS"),this.mapService.hasBooted||this.mapService.resetToDefaultView(),this.dialogRef||this.createDialog()}createDialog(){this.dialogRef=this.dialog.open(FT,{height:"90vh",width:"90vw",maxWidth:"90vw",closeOnNavigation:!0}),this.dialogRef.afterClosed().subscribe((t=!0)=>Object(ue.a)(this,void 0,void 0,function*(){if(t){const t=this.routeService.previousUrl||"";yield this.router.navigateByUrl(t)}}))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(he),r.Pb(sw),r.Pb(Gl),r.Pb(pI),r.Pb(vI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-about-loader"]],features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2}),t})();const BT=["*",[["mat-toolbar-row"]]],NT=["*","mat-toolbar-row"];class jT{constructor(t){this._elementRef=t}}const zT=Ea(jT);let HT=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),t})(),KT=(()=>{class t extends zT{constructor(t,e,i){super(t),this._platform=e,this._document=i}ngAfterViewInit(){this._platform.isBrowser&&(this._checkToolbarMixedModes(),this._toolbarRows.changes.subscribe(()=>this._checkToolbarMixedModes()))}_checkToolbarMixedModes(){}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(ci),r.Pb(a))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-toolbar"]],contentQueries:function(t,e,i){if(1&t&&r.Ib(i,HT,1),2&t){let t;r.vc(t=r.dc())&&(e._toolbarRows=t)}},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(t,e){2&t&&r.Hb("mat-toolbar-multiple-rows",e._toolbarRows.length>0)("mat-toolbar-single-row",0===e._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[r.Ab],ngContentSelectors:NT,decls:2,vars:0,template:function(t,e){1&t&&(r.mc(BT),r.lc(0),r.lc(1,1))},styles:[".cdk-high-contrast-active .mat-toolbar{outline:solid 1px}.mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%}\n"],encapsulation:2,changeDetection:0}),t})(),$T=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Sa],Sa]}),t})(),GT=(()=>{class t{constructor(){this._vertical=!1,this._inset=!1}get vertical(){return this._vertical}set vertical(t){this._vertical=ti(t)}get inset(){return this._inset}set inset(t){this._inset=ti(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(t,e){2&t&&(r.Eb("aria-orientation",e.vertical?"vertical":"horizontal"),r.Hb("mat-divider-vertical",e.vertical)("mat-divider-horizontal",!e.vertical)("mat-divider-inset",e.inset))},inputs:{vertical:"vertical",inset:"inset"},decls:0,vars:0,template:function(t,e){},styles:[".mat-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mat-divider.mat-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px}\n"],encapsulation:2,changeDetection:0}),t})(),WT=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Sa],Sa]}),t})(),ZT=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-admin-page"]],decls:23,vars:2,consts:[[1,"page"],["color","primary"],[1,"mat-h1","ma-0","pr-3"],["mat-button","","routerLink","/"],[3,"vertical"],["mat-button","","routerLink","/admin/users"],[1,"mr-2"],["mat-button","","routerLink","/admin/maintenance"],[1,"page__content"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"mat-toolbar",1),r.Vb(2,"div",2),r.Kc(3,"Administration ANAIS"),r.Ub(),r.Vb(4,"button",3),r.Vb(5,"mat-icon"),r.Kc(6,"chevron_left"),r.Ub(),r.Vb(7,"span"),r.Kc(8,"Retour \xe0 l'interface"),r.Ub(),r.Ub(),r.Qb(9,"mat-divider",4),r.Vb(10,"button",5),r.Vb(11,"mat-icon",6),r.Kc(12,"supervisor_account"),r.Ub(),r.Vb(13,"span"),r.Kc(14,"Utilisateurs"),r.Ub(),r.Ub(),r.Qb(15,"mat-divider",4),r.Vb(16,"button",7),r.Vb(17,"mat-icon",6),r.Kc(18,"build"),r.Ub(),r.Vb(19,"span"),r.Kc(20,"Maintenance"),r.Ub(),r.Ub(),r.Ub(),r.Vb(21,"div",8),r.Qb(22,"router-outlet"),r.Ub(),r.Ub()),2&t&&(r.Db(9),r.nc("vertical",!0),r.Db(6),r.nc("vertical",!0))},directives:[KT,Dl,ow,Yp,GT,hw],styles:[".page[_ngcontent-%COMP%]{height:100%;max-height:100vh;overflow:auto}.page__content[_ngcontent-%COMP%]{max-width:960px;padding:16px;margin:0 auto}"]}),t})();var qT=function(t){return t.Planned="info",t.InProgress="in_progress",t}({});const YT=["input"],QT=function(){return{enterDuration:150}},XT=["*"],JT=new r.s("mat-radio-default-options",{providedIn:"root",factory:function(){return{color:"accent"}}});let tR=0;const eR={provide:rc,useExisting:Object(r.W)(()=>sR),multi:!0};class iR{constructor(t,e){this.source=t,this.value=e}}const nR=new r.s("MatRadioGroup");let rR=(()=>{class t{constructor(t){this._changeDetector=t,this._value=null,this._name="mat-radio-group-"+tR++,this._selected=null,this._isInitialized=!1,this._labelPosition="after",this._disabled=!1,this._required=!1,this._controlValueAccessorChangeFn=()=>{},this.onTouched=()=>{},this.change=new r.o}get name(){return this._name}set name(t){this._name=t,this._updateRadioButtonNames()}get labelPosition(){return this._labelPosition}set labelPosition(t){this._labelPosition="before"===t?"before":"after",this._markRadiosForCheck()}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())}_checkSelectedRadioButton(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)}get selected(){return this._selected}set selected(t){this._selected=t,this.value=t?t.value:null,this._checkSelectedRadioButton()}get disabled(){return this._disabled}set disabled(t){this._disabled=ti(t),this._markRadiosForCheck()}get required(){return this._required}set required(t){this._required=ti(t),this._markRadiosForCheck()}ngAfterContentInit(){this._isInitialized=!0}_touch(){this.onTouched&&this.onTouched()}_updateRadioButtonNames(){this._radios&&this._radios.forEach(t=>{t.name=this.name,t._markForCheck()})}_updateSelectedRadioFromValue(){this._radios&&(null===this._selected||this._selected.value!==this._value)&&(this._selected=null,this._radios.forEach(t=>{t.checked=this.value===t.value,t.checked&&(this._selected=t)}))}_emitChangeEvent(){this._isInitialized&&this.change.emit(new iR(this._selected,this._value))}_markRadiosForCheck(){this._radios&&this._radios.forEach(t=>t._markForCheck())}writeValue(t){this.value=t,this._changeDetector.markForCheck()}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t,this._changeDetector.markForCheck()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h))},t.\u0275dir=r.Kb({type:t,inputs:{name:"name",labelPosition:"labelPosition",value:"value",selected:"selected",disabled:"disabled",required:"required",color:"color"},outputs:{change:"change"}}),t})(),sR=(()=>{class t extends rR{}return t.\u0275fac=function(e){return oR(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["mat-radio-group"]],contentQueries:function(t,e,i){if(1&t&&r.Ib(i,hR,1),2&t){let t;r.vc(t=r.dc())&&(e._radios=t)}},hostAttrs:["role","radiogroup",1,"mat-radio-group"],exportAs:["matRadioGroup"],features:[r.Cb([eR,{provide:nR,useExisting:t}]),r.Ab]}),t})();const oR=r.Xb(sR);class aR{constructor(t){this._elementRef=t}}const lR=Da(Ia(aR));let cR=(()=>{class t extends lR{constructor(t,e,i,n,s,o,a,l){super(e),this._changeDetector=i,this._focusMonitor=n,this._radioDispatcher=s,this._animationMode=o,this._providerOverride=a,this._uniqueId="mat-radio-"+ ++tR,this.id=this._uniqueId,this.change=new r.o,this._checked=!1,this._value=null,this._removeUniqueSelectionListener=()=>{},this.radioGroup=t,l&&(this.tabIndex=ei(l,0)),this._removeUniqueSelectionListener=s.listen((t,e)=>{t!==this.id&&e===this.name&&(this.checked=!1)})}get checked(){return this._checked}set checked(t){const e=ti(t);this._checked!==e&&(this._checked=e,e&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!e&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),e&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,null!==this.radioGroup&&(this.checked||(this.checked=this.radioGroup.value===t),this.checked&&(this.radioGroup.selected=this)))}get labelPosition(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"}set labelPosition(t){this._labelPosition=t}get disabled(){return this._disabled||null!==this.radioGroup&&this.radioGroup.disabled}set disabled(t){this._setDisabled(ti(t))}get required(){return this._required||this.radioGroup&&this.radioGroup.required}set required(t){this._required=ti(t)}get color(){return this._color||this.radioGroup&&this.radioGroup.color||this._providerOverride&&this._providerOverride.color||"accent"}set color(t){this._color=t}get inputId(){return`${this.id||this._uniqueId}-input`}focus(t,e){e?this._focusMonitor.focusVia(this._inputElement,e,t):this._inputElement.nativeElement.focus(t)}_markForCheck(){this._changeDetector.markForCheck()}ngOnInit(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.checked&&(this.radioGroup.selected=this),this.name=this.radioGroup.name)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{!t&&this.radioGroup&&this.radioGroup._touch()})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}_emitChangeEvent(){this.change.emit(new iR(this,this._value))}_isRippleDisabled(){return this.disableRipple||this.disabled}_onInputClick(t){t.stopPropagation()}_onInputChange(t){t.stopPropagation();const e=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),e&&this.radioGroup._emitChangeEvent())}_setDisabled(t){this._disabled!==t&&(this._disabled=t,this._changeDetector.markForCheck())}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(rR),r.Pb(r.l),r.Pb(r.h),r.Pb(qi),r.Pb(Jn),r.Pb(String),r.Pb(void 0),r.Pb(String))},t.\u0275dir=r.Kb({type:t,viewQuery:function(t,e){if(1&t&&r.Pc(YT,1),2&t){let t;r.vc(t=r.dc())&&(e._inputElement=t.first)}},inputs:{id:"id",checked:"checked",value:"value",labelPosition:"labelPosition",disabled:"disabled",required:"required",color:"color",name:"name",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"]},outputs:{change:"change"},features:[r.Ab]}),t})(),hR=(()=>{class t extends cR{constructor(t,e,i,n,r,s,o,a){super(t,e,i,n,r,s,o,a)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(nR,8),r.Pb(r.l),r.Pb(r.h),r.Pb(qi),r.Pb(Jn),r.Pb(pa,8),r.Pb(JT,8),r.ac("tabindex"))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-radio-button"]],hostAttrs:[1,"mat-radio-button"],hostVars:17,hostBindings:function(t,e){1&t&&r.cc("focus",function(){return e._inputElement.nativeElement.focus()}),2&t&&(r.Eb("tabindex",null)("id",e.id)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),r.Hb("mat-radio-checked",e.checked)("mat-radio-disabled",e.disabled)("_mat-animation-noopable","NoopAnimations"===e._animationMode)("mat-primary","primary"===e.color)("mat-accent","accent"===e.color)("mat-warn","warn"===e.color))},inputs:{disableRipple:"disableRipple",tabIndex:"tabIndex"},exportAs:["matRadioButton"],features:[r.Ab],ngContentSelectors:XT,decls:13,vars:19,consts:[[1,"mat-radio-label"],["label",""],[1,"mat-radio-container"],[1,"mat-radio-outer-circle"],[1,"mat-radio-inner-circle"],["type","radio",1,"mat-radio-input","cdk-visually-hidden",3,"id","checked","disabled","tabIndex","required","change","click"],["input",""],["mat-ripple","",1,"mat-radio-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered","matRippleRadius","matRippleAnimation"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[1,"mat-radio-label-content"],[2,"display","none"]],template:function(t,e){if(1&t&&(r.mc(),r.Vb(0,"label",0,1),r.Vb(2,"span",2),r.Qb(3,"span",3),r.Qb(4,"span",4),r.Vb(5,"input",5,6),r.cc("change",function(t){return e._onInputChange(t)})("click",function(t){return e._onInputClick(t)}),r.Ub(),r.Vb(7,"span",7),r.Qb(8,"span",8),r.Ub(),r.Ub(),r.Vb(9,"span",9),r.Vb(10,"span",10),r.Kc(11,"\xa0"),r.Ub(),r.lc(12),r.Ub(),r.Ub()),2&t){const t=r.wc(1);r.Eb("for",e.inputId),r.Db(5),r.nc("id",e.inputId)("checked",e.checked)("disabled",e.disabled)("tabIndex",e.tabIndex)("required",e.required),r.Eb("name",e.name)("value",e.value)("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby)("aria-describedby",e.ariaDescribedby),r.Db(2),r.nc("matRippleTrigger",t)("matRippleDisabled",e._isRippleDisabled())("matRippleCentered",!0)("matRippleRadius",20)("matRippleAnimation",r.rc(18,QT)),r.Db(2),r.Hb("mat-radio-label-before","before"==e.labelPosition)}},directives:[il],styles:[".mat-radio-button{display:inline-block;-webkit-tap-highlight-color:transparent;outline:0}.mat-radio-label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap;vertical-align:middle;width:100%}.mat-radio-container{box-sizing:border-box;display:inline-block;position:relative;width:20px;height:20px;flex-shrink:0}.mat-radio-outer-circle{box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;transition:border-color ease 280ms;width:20px;border-width:2px;border-style:solid;border-radius:50%}._mat-animation-noopable .mat-radio-outer-circle{transition:none}.mat-radio-inner-circle{border-radius:50%;box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;transition:transform ease 280ms,background-color ease 280ms;width:20px;transform:scale(0.001)}._mat-animation-noopable .mat-radio-inner-circle{transition:none}.mat-radio-checked .mat-radio-inner-circle{transform:scale(0.5)}.cdk-high-contrast-active .mat-radio-checked .mat-radio-inner-circle{border:solid 10px}.mat-radio-label-content{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto;display:inline-block;order:0;line-height:inherit;padding-left:8px;padding-right:0}[dir=rtl] .mat-radio-label-content{padding-right:8px;padding-left:0}.mat-radio-label-content.mat-radio-label-before{order:-1;padding-left:0;padding-right:8px}[dir=rtl] .mat-radio-label-content.mat-radio-label-before{padding-right:0;padding-left:8px}.mat-radio-disabled,.mat-radio-disabled .mat-radio-label{cursor:default}.mat-radio-button .mat-radio-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-radio-button .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple){opacity:.16}.mat-radio-persistent-ripple{width:100%;height:100%;transform:none}.mat-radio-container:hover .mat-radio-persistent-ripple{opacity:.04}.mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-persistent-ripple,.mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-persistent-ripple{opacity:.12}.mat-radio-persistent-ripple,.mat-radio-disabled .mat-radio-container:hover .mat-radio-persistent-ripple{opacity:0}@media(hover: none){.mat-radio-container:hover .mat-radio-persistent-ripple{display:none}}.mat-radio-input{bottom:0;left:50%}.cdk-high-contrast-active .mat-radio-disabled{opacity:.5}\n"],encapsulation:2,changeDetection:0}),t})(),uR=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[nl,Sa],Sa]}),t})(),dR=(()=>{class t{constructor(t){this.viewContainerRef=t}ngOnInit(){const t=this.viewContainerRef.element.nativeElement;t.addEventListener("click",()=>Object(ue.a)(this,void 0,void 0,function*(){const e=Date.now();t.disabled=!0,t.style.width=`${t.offsetWidth}px`,t.style.height=`${t.offsetHeight}px`;const i=t.children[0].innerHTML;t.children[0].innerHTML='\n<mat-spinner role="progressbar" mode="indeterminate" class="async-button">\n <svg class="async-button__svg" preserveAspectRatio="xMidYMid meet" focusable="false" viewBox="0 0 16.4 16.4">\n <circle class="async-button__circle" cx="50%" cy="50%" r="7">\n </circle>\n </svg>\n</mat-spinner>';try{yield this.action()}finally{const n=Date.now()-e;n<300&&(yield PD(300-n)),t.children[0].innerHTML=i,t.style.width="",t.style.height="",t.disabled=!1}}))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.S))},t.\u0275dir=r.Kb({type:t,selectors:[["","app-async-action",""]],inputs:{action:["app-async-action","action"]}}),t})();const pR=["class","page"];function fR(t,e){if(1&t&&(r.Vb(0,"div"),r.Kc(1),r.Vb(2,"button",11),r.Kc(3,"Terminer"),r.Ub(),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Nc(" Maintenance active ",t.maintenance.message," - ",t.maintenance.type," "),r.Db(1),r.nc("app-async-action",t.removeMaintenance)}}function mR(t,e){1&t&&(r.Vb(0,"div"),r.Kc(1," Aucune maintenance active\n"),r.Ub())}function gR(t,e){1&t&&(r.Vb(0,"mat-error"),r.Kc(1,"Le message est obligatoire"),r.Ub())}let AR=(()=>{class t{constructor(t,e,i){this.formBuilder=t,this.workerService=e,this.authenticationService=i,this.AppMaintenanceType=qT,this.setMaintenance=()=>Object(ue.a)(this,void 0,void 0,function*(){this.maintenanceForm.valid&&(yield this.workerService.application.enableMaintenanceMode({message:this.maintenanceForm.controls.message.value,type:this.maintenanceForm.controls.type.value}),yield this.workerService.application.refreshHealthState())}),this.removeMaintenance=()=>Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.application.disableMaintenanceMode(),yield this.workerService.application.refreshHealthState()})}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.maintenanceForm=this.formBuilder.group({message:["",[pc.required]],type:[qT.Planned,[pc.required]]}),this.workerService.applicationHealth$.subscribe(t=>{this.maintenance=null==t?void 0:t.maintenance})})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Lh),r.Pb(_I.a),r.Pb(yI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-maintenance",8,"page"]],attrs:pR,decls:22,vars:8,consts:[[1,"mat-h1"],[4,"ngIf"],[1,"mat-h2","mt-3"],[3,"formGroup"],[1,"d-block"],["matInput","","placeholder","...","formControlName","message","required",""],[1,"d-flex"],[1,"mr-2"],["formControlName","type"],["color","primary",3,"value"],["mat-raised-button","","color","primary",1,"mt-2",3,"app-async-action","disabled"],["mat-raised-button","","color","primary",3,"app-async-action"]],template:function(t,e){1&t&&(r.Vb(0,"h1",0),r.Kc(1,"Maintenance"),r.Ub(),r.Ic(2,fR,4,3,"div",1),r.Ic(3,mR,2,0,"div",1),r.Vb(4,"h2",2),r.Kc(5,"D\xe9finir un message de maintenance"),r.Ub(),r.Vb(6,"form",3),r.Vb(7,"mat-form-field",4),r.Vb(8,"mat-label"),r.Kc(9,"Message"),r.Ub(),r.Qb(10,"input",5),r.Ic(11,gR,2,0,"mat-error",1),r.Ub(),r.Vb(12,"div",6),r.Vb(13,"label",7),r.Kc(14,"Type :"),r.Ub(),r.Vb(15,"mat-radio-group",8),r.Vb(16,"mat-radio-button",9),r.Kc(17,"Planifi\xe9e (message informatif seulement)"),r.Ub(),r.Vb(18,"mat-radio-button",9),r.Kc(19,"En cours (d\xe9connecte l'API de la base de donn\xe9es)"),r.Ub(),r.Ub(),r.Ub(),r.Vb(20,"button",10),r.Kc(21,"D\xe9finir"),r.Ub(),r.Ub()),2&t&&(r.Db(2),r.nc("ngIf",e.maintenance),r.Db(1),r.nc("ngIf",!e.maintenance),r.Db(3),r.nc("formGroup",e.maintenanceForm),r.Db(5),r.nc("ngIf",e.maintenanceForm.get("message").hasError("required")),r.Db(5),r.nc("value",e.AppMaintenanceType.Planned),r.Db(2),r.nc("value",e.AppMaintenanceType.InProgress),r.Db(2),r.nc("app-async-action",e.setMaintenance)("disabled",!e.maintenanceForm.valid))},directives:[ut,dh,Fc,_h,_u,cu,Ou,ac,Vc,Eh,Ih,sR,hR,Dl,dR,nu],styles:[".mat-radio-button[_ngcontent-%COMP%]{display:block;margin-bottom:.5em}"]}),t})();const bR=["mat-sort-header",""];function vR(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",3),r.cc("@arrowPosition.start",function(){return r.Ac(t),r.gc()._disableViewStateAnimation=!0})("@arrowPosition.done",function(){return r.Ac(t),r.gc()._disableViewStateAnimation=!1}),r.Qb(1,"div",4),r.Vb(2,"div",5),r.Qb(3,"div",6),r.Qb(4,"div",7),r.Qb(5,"div",8),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.nc("@arrowOpacity",t._getArrowViewState())("@arrowPosition",t._getArrowViewState())("@allowChildren",t._getArrowDirectionState()),r.Db(2),r.nc("@indicator",t._getArrowDirectionState()),r.Db(1),r.nc("@leftPointer",t._getArrowDirectionState()),r.Db(1),r.nc("@rightPointer",t._getArrowDirectionState())}}const _R=["*"],yR=new r.s("MAT_SORT_DEFAULT_OPTIONS");class wR{}const xR=Oa(ka(wR));let CR=(()=>{class t extends xR{constructor(t){super(),this._defaultOptions=t,this.sortables=new Map,this._stateChanges=new _e.a,this.start="asc",this._direction="",this.sortChange=new r.o}get direction(){return this._direction}set direction(t){this._direction=t}get disableClear(){return this._disableClear}set disableClear(t){this._disableClear=ti(t)}register(t){this.sortables.set(t.id,t)}deregister(t){this.sortables.delete(t.id)}sort(t){this.active!=t.id?(this.active=t.id,this.direction=t.start?t.start:this.start):this.direction=this.getNextSortDirection(t),this.sortChange.emit({active:this.active,direction:this.direction})}getNextSortDirection(t){var e,i,n;if(!t)return"";const r=null!==(i=null!==(e=null==t?void 0:t.disableClear)&&void 0!==e?e:this.disableClear)&&void 0!==i?i:!!(null===(n=this._defaultOptions)||void 0===n?void 0:n.disableClear);let s=function(t,e){let i=["asc","desc"];return"desc"==t&&i.reverse(),e||i.push(""),i}(t.start||this.start,r),o=s.indexOf(this.direction)+1;return o>=s.length&&(o=0),s[o]}ngOnInit(){this._markInitialized()}ngOnChanges(){this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(yR,8))},t.\u0275dir=r.Kb({type:t,selectors:[["","matSort",""]],hostAttrs:[1,"mat-sort"],inputs:{disabled:["matSortDisabled","disabled"],start:["matSortStart","start"],direction:["matSortDirection","direction"],disableClear:["matSortDisableClear","disableClear"],active:["matSortActive","active"]},outputs:{sortChange:"matSortChange"},exportAs:["matSort"],features:[r.Ab,r.Bb]}),t})();const SR=wa.ENTERING+" "+ya.STANDARD_CURVE,kR={indicator:$r("indicator",[qr("active-asc, asc",Zr({transform:"translateY(0px)"})),qr("active-desc, desc",Zr({transform:"translateY(10px)"})),Qr("active-asc <=> active-desc",Gr(SR))]),leftPointer:$r("leftPointer",[qr("active-asc, asc",Zr({transform:"rotate(-45deg)"})),qr("active-desc, desc",Zr({transform:"rotate(45deg)"})),Qr("active-asc <=> active-desc",Gr(SR))]),rightPointer:$r("rightPointer",[qr("active-asc, asc",Zr({transform:"rotate(45deg)"})),qr("active-desc, desc",Zr({transform:"rotate(-45deg)"})),Qr("active-asc <=> active-desc",Gr(SR))]),arrowOpacity:$r("arrowOpacity",[qr("desc-to-active, asc-to-active, active",Zr({opacity:1})),qr("desc-to-hint, asc-to-hint, hint",Zr({opacity:.54})),qr("hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc, void",Zr({opacity:0})),Qr("* => asc, * => desc, * => active, * => hint, * => void",Gr("0ms")),Qr("* <=> *",Gr(SR))]),arrowPosition:$r("arrowPosition",[Qr("* => desc-to-hint, * => desc-to-active",Gr(SR,Yr([Zr({transform:"translateY(-25%)"}),Zr({transform:"translateY(0)"})]))),Qr("* => hint-to-desc, * => active-to-desc",Gr(SR,Yr([Zr({transform:"translateY(0)"}),Zr({transform:"translateY(25%)"})]))),Qr("* => asc-to-hint, * => asc-to-active",Gr(SR,Yr([Zr({transform:"translateY(25%)"}),Zr({transform:"translateY(0)"})]))),Qr("* => hint-to-asc, * => active-to-asc",Gr(SR,Yr([Zr({transform:"translateY(0)"}),Zr({transform:"translateY(-25%)"})]))),qr("desc-to-hint, asc-to-hint, hint, desc-to-active, asc-to-active, active",Zr({transform:"translateY(0)"})),qr("hint-to-desc, active-to-desc, desc",Zr({transform:"translateY(-25%)"})),qr("hint-to-asc, active-to-asc, asc",Zr({transform:"translateY(25%)"}))]),allowChildren:$r("allowChildren",[Qr("* <=> *",[Jr("@*",Xr(),{optional:!0})])])};let ER=(()=>{class t{constructor(){this.changes=new _e.a,this.sortButtonLabel=t=>`Change sorting for ${t}`}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(r.Lb)({factory:function(){return new t},token:t,providedIn:"root"}),t})();const DR={provide:ER,deps:[[new r.C,new r.M,ER]],useFactory:function(t){return t||new ER}};class IR{}const PR=ka(IR);let OR=(()=>{class t extends PR{constructor(t,e,i,n,r,s){super(),this._intl=t,this._changeDetectorRef=e,this._sort=i,this._columnDef=n,this._focusMonitor=r,this._elementRef=s,this._showIndicatorHint=!1,this._arrowDirection="",this._disableViewStateAnimation=!1,this.arrowPosition="after",this._handleStateChanges()}get disableClear(){return this._disableClear}set disableClear(t){this._disableClear=ti(t)}ngOnInit(){!this.id&&this._columnDef&&(this.id=this._columnDef.name),this._updateArrowDirection(),this._setAnimationTransitionState({toState:this._isSorted()?"active":this._arrowDirection}),this._sort.register(this)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{const e=!!t;e!==this._showIndicatorHint&&(this._setIndicatorHintVisible(e),this._changeDetectorRef.markForCheck())})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._sort.deregister(this),this._rerenderSubscription.unsubscribe()}_setIndicatorHintVisible(t){this._isDisabled()&&t||(this._showIndicatorHint=t,this._isSorted()||(this._updateArrowDirection(),this._setAnimationTransitionState(this._showIndicatorHint?{fromState:this._arrowDirection,toState:"hint"}:{fromState:"hint",toState:this._arrowDirection})))}_setAnimationTransitionState(t){this._viewState=t,this._disableViewStateAnimation&&(this._viewState={toState:t.toState})}_toggleOnInteraction(){this._sort.sort(this),"hint"!==this._viewState.toState&&"active"!==this._viewState.toState||(this._disableViewStateAnimation=!0)}_handleClick(){this._isDisabled()||this._sort.sort(this)}_handleKeydown(t){this._isDisabled()||32!==t.keyCode&&13!==t.keyCode||(t.preventDefault(),this._toggleOnInteraction())}_isSorted(){return this._sort.active==this.id&&("asc"===this._sort.direction||"desc"===this._sort.direction)}_getArrowDirectionState(){return`${this._isSorted()?"active-":""}${this._arrowDirection}`}_getArrowViewState(){const t=this._viewState.fromState;return(t?`${t}-to-`:"")+this._viewState.toState}_updateArrowDirection(){this._arrowDirection=this._isSorted()?this._sort.direction:this.start||this._sort.start}_isDisabled(){return this._sort.disabled||this.disabled}_getAriaSortAttribute(){return this._isSorted()?"asc"==this._sort.direction?"ascending":"descending":"none"}_renderArrow(){return!this._isDisabled()||this._isSorted()}_handleStateChanges(){this._rerenderSubscription=Object(or.a)(this._sort.sortChange,this._sort._stateChanges,this._intl.changes).subscribe(()=>{this._isSorted()&&(this._updateArrowDirection(),"hint"!==this._viewState.toState&&"active"!==this._viewState.toState||(this._disableViewStateAnimation=!0),this._setAnimationTransitionState({fromState:this._arrowDirection,toState:"active"}),this._showIndicatorHint=!1),!this._isSorted()&&this._viewState&&"active"===this._viewState.toState&&(this._disableViewStateAnimation=!1,this._setAnimationTransitionState({fromState:"active",toState:this._arrowDirection})),this._changeDetectorRef.markForCheck()})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(ER),r.Pb(r.h),r.Pb(CR,8),r.Pb("MAT_SORT_HEADER_COLUMN_DEF",8),r.Pb(qi),r.Pb(r.l))},t.\u0275cmp=r.Jb({type:t,selectors:[["","mat-sort-header",""]],hostAttrs:[1,"mat-sort-header"],hostVars:3,hostBindings:function(t,e){1&t&&r.cc("click",function(){return e._handleClick()})("keydown",function(t){return e._handleKeydown(t)})("mouseenter",function(){return e._setIndicatorHintVisible(!0)})("mouseleave",function(){return e._setIndicatorHintVisible(!1)}),2&t&&(r.Eb("aria-sort",e._getAriaSortAttribute()),r.Hb("mat-sort-header-disabled",e._isDisabled()))},inputs:{disabled:"disabled",arrowPosition:"arrowPosition",disableClear:"disableClear",id:["mat-sort-header","id"],start:"start"},exportAs:["matSortHeader"],features:[r.Ab],attrs:bR,ngContentSelectors:_R,decls:4,vars:6,consts:[["role","button",1,"mat-sort-header-container","mat-focus-indicator"],[1,"mat-sort-header-content"],["class","mat-sort-header-arrow",4,"ngIf"],[1,"mat-sort-header-arrow"],[1,"mat-sort-header-stem"],[1,"mat-sort-header-indicator"],[1,"mat-sort-header-pointer-left"],[1,"mat-sort-header-pointer-right"],[1,"mat-sort-header-pointer-middle"]],template:function(t,e){1&t&&(r.mc(),r.Vb(0,"div",0),r.Vb(1,"div",1),r.lc(2),r.Ub(),r.Ic(3,vR,6,6,"div",2),r.Ub()),2&t&&(r.Hb("mat-sort-header-sorted",e._isSorted())("mat-sort-header-position-before","before"==e.arrowPosition),r.Eb("tabindex",e._isDisabled()?null:0),r.Db(3),r.nc("ngIf",e._renderArrow()))},directives:[ut],styles:[".mat-sort-header-container{display:flex;cursor:pointer;align-items:center;letter-spacing:normal;outline:0}[mat-sort-header].cdk-keyboard-focused .mat-sort-header-container,[mat-sort-header].cdk-program-focused .mat-sort-header-container{border-bottom:solid 1px currentColor}.mat-sort-header-disabled .mat-sort-header-container{cursor:default}.mat-sort-header-content{text-align:center;display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}.mat-sort-header-arrow{height:12px;width:12px;min-width:12px;position:relative;display:flex;opacity:0}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}.mat-sort-header-stem{background:currentColor;height:10px;width:2px;margin:auto;display:flex;align-items:center}.cdk-high-contrast-active .mat-sort-header-stem{width:0;border-left:solid 2px}.mat-sort-header-indicator{width:100%;height:2px;display:flex;align-items:center;position:absolute;top:0;left:0}.mat-sort-header-pointer-middle{margin:auto;height:2px;width:2px;background:currentColor;transform:rotate(45deg)}.cdk-high-contrast-active .mat-sort-header-pointer-middle{width:0;height:0;border-top:solid 2px;border-left:solid 2px}.mat-sort-header-pointer-left,.mat-sort-header-pointer-right{background:currentColor;width:6px;height:2px;position:absolute;top:0}.cdk-high-contrast-active .mat-sort-header-pointer-left,.cdk-high-contrast-active .mat-sort-header-pointer-right{width:0;height:0;border-left:solid 6px;border-top:solid 2px}.mat-sort-header-pointer-left{transform-origin:right;left:0}.mat-sort-header-pointer-right{transform-origin:left;right:0}\n"],encapsulation:2,data:{animation:[kR.indicator,kR.leftPointer,kR.rightPointer,kR.arrowOpacity,kR.arrowPosition,kR.allowChildren]},changeDetection:0}),t})(),MR=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[DR],imports:[[Et,Sa]]}),t})();const TR=[[["caption"]],[["colgroup"],["col"]]],RR=["caption","colgroup, col"];function VR(t){return class extends t{constructor(...t){super(...t),this._sticky=!1,this._hasStickyChanged=!1}get sticky(){return this._sticky}set sticky(t){const e=this._sticky;this._sticky=ti(t),this._hasStickyChanged=e!==this._sticky}hasStickyChanged(){const t=this._hasStickyChanged;return this._hasStickyChanged=!1,t}resetStickyChanged(){this._hasStickyChanged=!1}}}const FR=new r.s("CDK_TABLE");let LR=(()=>{class t{constructor(t){this.template=t}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.O))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdkCellDef",""]]}),t})(),UR=(()=>{class t{constructor(t){this.template=t}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.O))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdkHeaderCellDef",""]]}),t})(),BR=(()=>{class t{constructor(t){this.template=t}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.O))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdkFooterCellDef",""]]}),t})();class NR{}const jR=VR(NR);let zR=(()=>{class t extends jR{constructor(t){super(),this._table=t,this._stickyEnd=!1}get name(){return this._name}set name(t){this._setNameInput(t)}get stickyEnd(){return this._stickyEnd}set stickyEnd(t){const e=this._stickyEnd;this._stickyEnd=ti(t),this._hasStickyChanged=e!==this._stickyEnd}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`]}_setNameInput(t){t&&(this._name=t,this.cssClassFriendlyName=t.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName())}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(FR,8))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdkColumnDef",""]],contentQueries:function(t,e,i){if(1&t&&(r.Ib(i,LR,1),r.Ib(i,UR,1),r.Ib(i,BR,1)),2&t){let t;r.vc(t=r.dc())&&(e.cell=t.first),r.vc(t=r.dc())&&(e.headerCell=t.first),r.vc(t=r.dc())&&(e.footerCell=t.first)}},inputs:{sticky:"sticky",name:["cdkColumnDef","name"],stickyEnd:"stickyEnd"},features:[r.Cb([{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:t}]),r.Ab]}),t})();class HR{constructor(t,e){const i=e.nativeElement.classList;for(const n of t._columnCssClassName)i.add(n)}}let KR=(()=>{class t extends HR{constructor(t,e){super(t,e)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(zR),r.Pb(r.l))},t.\u0275dir=r.Kb({type:t,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[r.Ab]}),t})(),$R=(()=>{class t extends HR{constructor(t,e){super(t,e)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(zR),r.Pb(r.l))},t.\u0275dir=r.Kb({type:t,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:["role","gridcell",1,"cdk-cell"],features:[r.Ab]}),t})();class GR{constructor(){this.tasks=[],this.endTasks=[]}}const WR=new r.s("_COALESCED_STYLE_SCHEDULER");let ZR=(()=>{class t{constructor(t){this._ngZone=t,this._currentSchedule=null,this._destroyed=new _e.a}schedule(t){this._createScheduleIfNeeded(),this._currentSchedule.tasks.push(t)}scheduleEnd(t){this._createScheduleIfNeeded(),this._currentSchedule.endTasks.push(t)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_createScheduleIfNeeded(){this._currentSchedule||(this._currentSchedule=new GR,this._getScheduleObservable().pipe(Sn(this._destroyed)).subscribe(()=>{for(;this._currentSchedule.tasks.length||this._currentSchedule.endTasks.length;){const t=this._currentSchedule;this._currentSchedule=new GR;for(const e of t.tasks)e();for(const e of t.endTasks)e()}this._currentSchedule=null}))}_getScheduleObservable(){return this._ngZone.isStable?Object(On.a)(Promise.resolve(void 0)):this._ngZone.onStable.pipe(Qe(1))}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.B))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),qR=(()=>{class t{constructor(t,e){this.template=t,this._differs=e}ngOnChanges(t){if(!this._columnsDiffer){const e=t.columns&&t.columns.currentValue||[];this._columnsDiffer=this._differs.find(e).create(),this._columnsDiffer.diff(e)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(t){return this instanceof XR?t.headerCell.template:this instanceof eV?t.footerCell.template:t.cell.template}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.O),r.Pb(r.u))},t.\u0275dir=r.Kb({type:t,features:[r.Bb]}),t})();class YR extends qR{}const QR=VR(YR);let XR=(()=>{class t extends QR{constructor(t,e,i){super(t,e),this._table=i}ngOnChanges(t){super.ngOnChanges(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.O),r.Pb(r.u),r.Pb(FR,8))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:["cdkHeaderRowDef","columns"],sticky:["cdkHeaderRowDefSticky","sticky"]},features:[r.Ab,r.Bb]}),t})();class JR extends qR{}const tV=VR(JR);let eV=(()=>{class t extends tV{constructor(t,e,i){super(t,e),this._table=i}ngOnChanges(t){super.ngOnChanges(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.O),r.Pb(r.u),r.Pb(FR,8))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:["cdkFooterRowDef","columns"],sticky:["cdkFooterRowDefSticky","sticky"]},features:[r.Ab,r.Bb]}),t})(),iV=(()=>{class t extends qR{constructor(t,e,i){super(t,e),this._table=i}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.O),r.Pb(r.u),r.Pb(FR,8))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdkRowDef",""]],inputs:{columns:["cdkRowDefColumns","columns"],when:["cdkRowDefWhen","when"]},features:[r.Ab]}),t})(),nV=(()=>{class t{constructor(e){this._viewContainer=e,t.mostRecentCellOutlet=this}ngOnDestroy(){t.mostRecentCellOutlet===this&&(t.mostRecentCellOutlet=null)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.S))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdkCellOutlet",""]]}),t.mostRecentCellOutlet=null,t})(),rV=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,e){1&t&&r.Rb(0,0)},directives:[nV],encapsulation:2}),t})(),sV=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,e){1&t&&r.Rb(0,0)},directives:[nV],encapsulation:2}),t})(),oV=(()=>{class t{constructor(t){this.templateRef=t}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.O))},t.\u0275dir=r.Kb({type:t,selectors:[["ng-template","cdkNoDataRow",""]]}),t})();const aV=["top","bottom","left","right"];class lV{constructor(t,e,i,n,r=!0,s=!0,o){this._isNativeHtmlTable=t,this._stickCellCss=e,this.direction=i,this._coalescedStyleScheduler=n,this._isBrowser=r,this._needsPositionStickyOnElement=s,this._positionListener=o,this._cachedCellWidths=[],this._borderCellCss={top:`${e}-border-elem-top`,bottom:`${e}-border-elem-bottom`,left:`${e}-border-elem-left`,right:`${e}-border-elem-right`}}clearStickyPositioning(t,e){const i=[];for(const n of t)if(n.nodeType===n.ELEMENT_NODE){i.push(n);for(let t=0;t<n.children.length;t++)i.push(n.children[t])}this._scheduleStyleChanges(()=>{for(const t of i)this._removeStickyStyle(t,e)})}updateStickyColumns(t,e,i,n=!0){if(!t.length||!this._isBrowser||!e.some(t=>t)&&!i.some(t=>t))return void(this._positionListener&&(this._positionListener.stickyColumnsUpdated({sizes:[]}),this._positionListener.stickyEndColumnsUpdated({sizes:[]})));const r=t[0],s=r.children.length,o=this._getCellWidths(r,n),a=this._getStickyStartColumnPositions(o,e),l=this._getStickyEndColumnPositions(o,i),c=e.lastIndexOf(!0),h=i.indexOf(!0);this._scheduleStyleChanges(()=>{const n="rtl"===this.direction,r=n?"right":"left",u=n?"left":"right";for(const o of t)for(let t=0;t<s;t++){const n=o.children[t];e[t]&&this._addStickyStyle(n,r,a[t],t===c),i[t]&&this._addStickyStyle(n,u,l[t],t===h)}this._positionListener&&(this._positionListener.stickyColumnsUpdated({sizes:-1===c?[]:o.slice(0,c+1).map((t,i)=>e[i]?t:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:-1===h?[]:o.slice(h).map((t,e)=>i[e+h]?t:null).reverse()}))})}stickRows(t,e,i){if(!this._isBrowser)return;const n="bottom"===i?t.slice().reverse():t,r="bottom"===i?e.slice().reverse():e,s=[],o=[],a=[];for(let c=0,h=0;c<n.length;c++){if(s[c]=h,!r[c])continue;const t=n[c];a[c]=this._isNativeHtmlTable?Array.from(t.children):[t];const e=t.getBoundingClientRect().height;h+=e,o[c]=e}const l=r.lastIndexOf(!0);this._scheduleStyleChanges(()=>{var t,e;for(let o=0;o<n.length;o++){if(!r[o])continue;const t=s[o],e=o===l;for(const n of a[o])this._addStickyStyle(n,i,t,e)}"top"===i?null===(t=this._positionListener)||void 0===t||t.stickyHeaderRowsUpdated({sizes:o,elements:a}):null===(e=this._positionListener)||void 0===e||e.stickyFooterRowsUpdated({sizes:o,elements:a})})}updateStickyFooterContainer(t,e){if(!this._isNativeHtmlTable)return;const i=t.querySelector("tfoot");this._scheduleStyleChanges(()=>{e.some(t=>!t)?this._removeStickyStyle(i,["bottom"]):this._addStickyStyle(i,"bottom",0,!1)})}_removeStickyStyle(t,e){for(const i of e)t.style[i]="",t.classList.remove(this._borderCellCss[i]);aV.some(i=>-1===e.indexOf(i)&&t.style[i])?t.style.zIndex=this._getCalculatedZIndex(t):(t.style.zIndex="",this._needsPositionStickyOnElement&&(t.style.position=""),t.classList.remove(this._stickCellCss))}_addStickyStyle(t,e,i,n){t.classList.add(this._stickCellCss),n&&t.classList.add(this._borderCellCss[e]),t.style[e]=`${i}px`,t.style.zIndex=this._getCalculatedZIndex(t),this._needsPositionStickyOnElement&&(t.style.cssText+="position: -webkit-sticky; position: sticky; ")}_getCalculatedZIndex(t){const e={top:100,bottom:10,left:1,right:1};let i=0;for(const n of aV)t.style[n]&&(i+=e[n]);return i?`${i}`:""}_getCellWidths(t,e=!0){if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;const i=[],n=t.children;for(let r=0;r<n.length;r++)i.push(n[r].getBoundingClientRect().width);return this._cachedCellWidths=i,i}_getStickyStartColumnPositions(t,e){const i=[];let n=0;for(let r=0;r<t.length;r++)e[r]&&(i[r]=n,n+=t[r]);return i}_getStickyEndColumnPositions(t,e){const i=[];let n=0;for(let r=t.length;r>0;r--)e[r]&&(i[r]=n,n+=t[r]);return i}_scheduleStyleChanges(t){this._coalescedStyleScheduler?this._coalescedStyleScheduler.schedule(t):t()}}const cV=new r.s("CDK_SPL");let hV=(()=>{class t{constructor(t,e){this.viewContainer=t,this.elementRef=e}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.S),r.Pb(r.l))},t.\u0275dir=r.Kb({type:t,selectors:[["","rowOutlet",""]]}),t})(),uV=(()=>{class t{constructor(t,e){this.viewContainer=t,this.elementRef=e}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.S),r.Pb(r.l))},t.\u0275dir=r.Kb({type:t,selectors:[["","headerRowOutlet",""]]}),t})(),dV=(()=>{class t{constructor(t,e){this.viewContainer=t,this.elementRef=e}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.S),r.Pb(r.l))},t.\u0275dir=r.Kb({type:t,selectors:[["","footerRowOutlet",""]]}),t})(),pV=(()=>{class t{constructor(t,e){this.viewContainer=t,this.elementRef=e}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.S),r.Pb(r.l))},t.\u0275dir=r.Kb({type:t,selectors:[["","noDataRowOutlet",""]]}),t})(),fV=(()=>{class t{constructor(t,e,i,n,r,s,o,a,l,c,h){this._differs=t,this._changeDetectorRef=e,this._elementRef=i,this._dir=r,this._platform=o,this._viewRepeater=a,this._coalescedStyleScheduler=l,this._stickyPositioningListener=c,this._viewportRuler=h,this._onDestroy=new _e.a,this._columnDefsByName=new Map,this._customColumnDefs=new Set,this._customRowDefs=new Set,this._customHeaderRowDefs=new Set,this._customFooterRowDefs=new Set,this._headerRowDefChanged=!0,this._footerRowDefChanged=!0,this._stickyColumnStylesNeedReset=!0,this._forceRecalculateCellWidths=!0,this._cachedRenderRowsMap=new Map,this.stickyCssClass="cdk-table-sticky",this.needsPositionStickyOnElement=!0,this._isShowingNoDataRow=!1,this._multiTemplateDataRows=!1,this._fixedLayout=!1,this.viewChange=new Av.a({start:0,end:Number.MAX_VALUE}),n||this._elementRef.nativeElement.setAttribute("role","grid"),this._document=s,this._isNativeHtmlTable="TABLE"===this._elementRef.nativeElement.nodeName}get trackBy(){return this._trackByFn}set trackBy(t){this._trackByFn=t}get dataSource(){return this._dataSource}set dataSource(t){this._dataSource!==t&&this._switchDataSource(t)}get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(t){this._multiTemplateDataRows=ti(t),this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())}get fixedLayout(){return this._fixedLayout}set fixedLayout(t){this._fixedLayout=ti(t),this._forceRecalculateCellWidths=!0,this._stickyColumnStylesNeedReset=!0}ngOnInit(){this._setupStickyStyler(),this._isNativeHtmlTable&&this._applyNativeTableSections(),this._dataDiffer=this._differs.find([]).create((t,e)=>this.trackBy?this.trackBy(e.dataIndex,e.data):e),this._viewportRuler&&this._viewportRuler.change().pipe(Sn(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=!0})}ngAfterContentChecked(){this._cacheRowDefs(),this._cacheColumnDefs();const t=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||t,this._forceRecalculateCellWidths=t,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates()}ngOnDestroy(){this._rowOutlet.viewContainer.clear(),this._noDataRowOutlet.viewContainer.clear(),this._headerRowOutlet.viewContainer.clear(),this._footerRowOutlet.viewContainer.clear(),this._cachedRenderRowsMap.clear(),this._onDestroy.next(),this._onDestroy.complete(),Yn(this.dataSource)&&this.dataSource.disconnect(this)}renderRows(){this._renderRows=this._getAllRenderRows();const t=this._dataDiffer.diff(this._renderRows);if(!t)return void this._updateNoDataRow();const e=this._rowOutlet.viewContainer;this._viewRepeater?this._viewRepeater.applyChanges(t,e,(t,e,i)=>this._getEmbeddedViewArgs(t.item,i),t=>t.item.data,t=>{1===t.operation&&t.context&&this._renderCellTemplateForItem(t.record.item.rowDef,t.context)}):t.forEachOperation((t,i,n)=>{if(null==t.previousIndex){const e=t.item;this._renderRow(this._rowOutlet,e.rowDef,n,{$implicit:e.data})}else if(null==n)e.remove(i);else{const t=e.get(i);e.move(t,n)}}),this._updateRowIndexContext(),t.forEachIdentityChange(t=>{e.get(t.currentIndex).context.$implicit=t.item.data}),this._updateNoDataRow(),this.updateStickyColumnStyles()}addColumnDef(t){this._customColumnDefs.add(t)}removeColumnDef(t){this._customColumnDefs.delete(t)}addRowDef(t){this._customRowDefs.add(t)}removeRowDef(t){this._customRowDefs.delete(t)}addHeaderRowDef(t){this._customHeaderRowDefs.add(t),this._headerRowDefChanged=!0}removeHeaderRowDef(t){this._customHeaderRowDefs.delete(t),this._headerRowDefChanged=!0}addFooterRowDef(t){this._customFooterRowDefs.add(t),this._footerRowDefChanged=!0}removeFooterRowDef(t){this._customFooterRowDefs.delete(t),this._footerRowDefChanged=!0}setNoDataRow(t){this._customNoDataRow=t}updateStickyHeaderRowStyles(){const t=this._getRenderedRows(this._headerRowOutlet),e=this._elementRef.nativeElement.querySelector("thead");e&&(e.style.display=t.length?"":"none");const i=this._headerRowDefs.map(t=>t.sticky);this._stickyStyler.clearStickyPositioning(t,["top"]),this._stickyStyler.stickRows(t,i,"top"),this._headerRowDefs.forEach(t=>t.resetStickyChanged())}updateStickyFooterRowStyles(){const t=this._getRenderedRows(this._footerRowOutlet),e=this._elementRef.nativeElement.querySelector("tfoot");e&&(e.style.display=t.length?"":"none");const i=this._footerRowDefs.map(t=>t.sticky);this._stickyStyler.clearStickyPositioning(t,["bottom"]),this._stickyStyler.stickRows(t,i,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,i),this._footerRowDefs.forEach(t=>t.resetStickyChanged())}updateStickyColumnStyles(){const t=this._getRenderedRows(this._headerRowOutlet),e=this._getRenderedRows(this._rowOutlet),i=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this._fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...t,...e,...i],["left","right"]),this._stickyColumnStylesNeedReset=!1),t.forEach((t,e)=>{this._addStickyColumnStyles([t],this._headerRowDefs[e])}),this._rowDefs.forEach(t=>{const i=[];for(let n=0;n<e.length;n++)this._renderRows[n].rowDef===t&&i.push(e[n]);this._addStickyColumnStyles(i,t)}),i.forEach((t,e)=>{this._addStickyColumnStyles([t],this._footerRowDefs[e])}),Array.from(this._columnDefsByName.values()).forEach(t=>t.resetStickyChanged())}_getAllRenderRows(){const t=[],e=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let i=0;i<this._data.length;i++){let n=this._data[i];const r=this._getRenderRowsForData(n,i,e.get(n));this._cachedRenderRowsMap.has(n)||this._cachedRenderRowsMap.set(n,new WeakMap);for(let e=0;e<r.length;e++){let i=r[e];const n=this._cachedRenderRowsMap.get(i.data);n.has(i.rowDef)?n.get(i.rowDef).push(i):n.set(i.rowDef,[i]),t.push(i)}}return t}_getRenderRowsForData(t,e,i){return this._getRowDefs(t,e).map(n=>{const r=i&&i.has(n)?i.get(n):[];if(r.length){const t=r.shift();return t.dataIndex=e,t}return{data:t,rowDef:n,dataIndex:e}})}_cacheColumnDefs(){this._columnDefsByName.clear(),mV(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(t=>{this._columnDefsByName.has(t.name),this._columnDefsByName.set(t.name,t)})}_cacheRowDefs(){this._headerRowDefs=mV(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=mV(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=mV(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);const t=this._rowDefs.filter(t=>!t.when);this._defaultRowDef=t[0]}_renderUpdatedColumns(){const t=(t,e)=>t||!!e.getColumnsDiff(),e=this._rowDefs.reduce(t,!1);e&&this._forceRenderDataRows();const i=this._headerRowDefs.reduce(t,!1);i&&this._forceRenderHeaderRows();const n=this._footerRowDefs.reduce(t,!1);return n&&this._forceRenderFooterRows(),e||i||n}_switchDataSource(t){this._data=[],Yn(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),t||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear()),this._dataSource=t}_observeRenderChanges(){if(!this.dataSource)return;let t;var e;Yn(this.dataSource)?t=this.dataSource.connect(this):(e=this.dataSource)&&(e instanceof Ze.a||"function"==typeof e.lift&&"function"==typeof e.subscribe)?t=this.dataSource:Array.isArray(this.dataSource)&&(t=Se(this.dataSource)),this._renderChangeSubscription=t.pipe(Sn(this._onDestroy)).subscribe(t=>{this._data=t||[],this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((t,e)=>this._renderRow(this._headerRowOutlet,t,e)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((t,e)=>this._renderRow(this._footerRowOutlet,t,e)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(t,e){const i=Array.from(e.columns||[]).map(t=>this._columnDefsByName.get(t)),n=i.map(t=>t.sticky),r=i.map(t=>t.stickyEnd);this._stickyStyler.updateStickyColumns(t,n,r,!this._fixedLayout||this._forceRecalculateCellWidths)}_getRenderedRows(t){const e=[];for(let i=0;i<t.viewContainer.length;i++){const n=t.viewContainer.get(i);e.push(n.rootNodes[0])}return e}_getRowDefs(t,e){if(1==this._rowDefs.length)return[this._rowDefs[0]];let i=[];if(this.multiTemplateDataRows)i=this._rowDefs.filter(i=>!i.when||i.when(e,t));else{let n=this._rowDefs.find(i=>i.when&&i.when(e,t))||this._defaultRowDef;n&&i.push(n)}return i}_getEmbeddedViewArgs(t,e){return{templateRef:t.rowDef.template,context:{$implicit:t.data},index:e}}_renderRow(t,e,i,n={}){const r=t.viewContainer.createEmbeddedView(e.template,n,i);return this._renderCellTemplateForItem(e,n),r}_renderCellTemplateForItem(t,e){for(let i of this._getCellTemplates(t))nV.mostRecentCellOutlet&&nV.mostRecentCellOutlet._viewContainer.createEmbeddedView(i,e);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){const t=this._rowOutlet.viewContainer;for(let e=0,i=t.length;e<i;e++){const n=t.get(e).context;n.count=i,n.first=0===e,n.last=e===i-1,n.even=e%2==0,n.odd=!n.even,this.multiTemplateDataRows?(n.dataIndex=this._renderRows[e].dataIndex,n.renderIndex=e):n.index=this._renderRows[e].dataIndex}}_getCellTemplates(t){return t&&t.columns?Array.from(t.columns,e=>{const i=this._columnDefsByName.get(e);return t.extractCellTemplate(i)}):[]}_applyNativeTableSections(){const t=this._document.createDocumentFragment(),e=[{tag:"thead",outlets:[this._headerRowOutlet]},{tag:"tbody",outlets:[this._rowOutlet,this._noDataRowOutlet]},{tag:"tfoot",outlets:[this._footerRowOutlet]}];for(const i of e){const e=this._document.createElement(i.tag);e.setAttribute("role","rowgroup");for(const t of i.outlets)e.appendChild(t.elementRef.nativeElement);t.appendChild(e)}this._elementRef.nativeElement.appendChild(t)}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){const t=(t,e)=>t||e.hasStickyChanged();this._headerRowDefs.reduce(t,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(t,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(t,!1)&&(this._stickyColumnStylesNeedReset=!0,this.updateStickyColumnStyles())}_setupStickyStyler(){this._stickyStyler=new lV(this._isNativeHtmlTable,this.stickyCssClass,this._dir?this._dir.value:"ltr",this._coalescedStyleScheduler,this._platform.isBrowser,this.needsPositionStickyOnElement,this._stickyPositioningListener),(this._dir?this._dir.change:Se()).pipe(Sn(this._onDestroy)).subscribe(t=>{this._stickyStyler.direction=t,this.updateStickyColumnStyles()})}_getOwnDefs(t){return t.filter(t=>!t._table||t._table===this)}_updateNoDataRow(){const t=this._customNoDataRow||this._noDataRow;if(t){const e=0===this._rowOutlet.viewContainer.length;if(e!==this._isShowingNoDataRow){const i=this._noDataRowOutlet.viewContainer;e?i.createEmbeddedView(t.templateRef):i.clear(),this._isShowingNoDataRow=e}}}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.u),r.Pb(r.h),r.Pb(r.l),r.ac("role"),r.Pb(Zn,8),r.Pb(a),r.Pb(ci),r.Pb(tr,8),r.Pb(WR,8),r.Pb(cV,12),r.Pb(nr,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(t,e,i){if(1&t&&(r.Ib(i,oV,1),r.Ib(i,zR,1),r.Ib(i,iV,1),r.Ib(i,XR,1),r.Ib(i,eV,1)),2&t){let t;r.vc(t=r.dc())&&(e._noDataRow=t.first),r.vc(t=r.dc())&&(e._contentColumnDefs=t),r.vc(t=r.dc())&&(e._contentRowDefs=t),r.vc(t=r.dc())&&(e._contentHeaderRowDefs=t),r.vc(t=r.dc())&&(e._contentFooterRowDefs=t)}},viewQuery:function(t,e){if(1&t&&(r.Pc(hV,3),r.Pc(uV,3),r.Pc(dV,3),r.Pc(pV,3)),2&t){let t;r.vc(t=r.dc())&&(e._rowOutlet=t.first),r.vc(t=r.dc())&&(e._headerRowOutlet=t.first),r.vc(t=r.dc())&&(e._footerRowOutlet=t.first),r.vc(t=r.dc())&&(e._noDataRowOutlet=t.first)}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(t,e){2&t&&r.Hb("cdk-table-fixed-layout",e.fixedLayout)},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:"multiTemplateDataRows",fixedLayout:"fixedLayout"},exportAs:["cdkTable"],features:[r.Cb([{provide:FR,useExisting:t},{provide:tr,useClass:Qn},{provide:WR,useClass:ZR},{provide:cV,useValue:null}])],ngContentSelectors:RR,decls:6,vars:0,consts:[["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,e){1&t&&(r.mc(TR),r.lc(0),r.lc(1,1),r.Rb(2,0),r.Rb(3,1),r.Rb(4,2),r.Rb(5,3))},directives:[uV,hV,pV,dV],styles:[".cdk-table-fixed-layout{table-layout:fixed}\n"],encapsulation:2}),t})();function mV(t,e){return t.concat(Array.from(e))}let gV=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[sr]]}),t})();const AV=[[["caption"]],[["colgroup"],["col"]]],bV=["caption","colgroup, col"];let vV=(()=>{class t extends fV{constructor(){super(...arguments),this.stickyCssClass="mat-table-sticky",this.needsPositionStickyOnElement=!1}}return t.\u0275fac=function(e){return _V(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-table"],hostVars:2,hostBindings:function(t,e){2&t&&r.Hb("mat-table-fixed-layout",e.fixedLayout)},exportAs:["matTable"],features:[r.Cb([{provide:tr,useClass:Qn},{provide:fV,useExisting:t},{provide:FR,useExisting:t},{provide:WR,useClass:ZR}]),r.Ab],ngContentSelectors:bV,decls:6,vars:0,consts:[["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,e){1&t&&(r.mc(AV),r.lc(0),r.lc(1,1),r.Rb(2,0),r.Rb(3,1),r.Rb(4,2),r.Rb(5,3))},directives:[uV,hV,pV,dV],styles:['mat-table{display:block}mat-header-row{min-height:56px}mat-row,mat-footer-row{min-height:48px}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-row::after,mat-header-row::after,mat-footer-row::after{display:inline-block;min-height:inherit;content:""}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}table.mat-table{border-spacing:0}tr.mat-header-row{height:56px}tr.mat-row,tr.mat-footer-row{height:48px}th.mat-header-cell{text-align:left}[dir=rtl] th.mat-header-cell{text-align:right}th.mat-header-cell,td.mat-cell,td.mat-footer-cell{padding:0;border-bottom-width:1px;border-bottom-style:solid}th.mat-header-cell:first-of-type,td.mat-cell:first-of-type,td.mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] th.mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] td.mat-cell:first-of-type:not(:only-of-type),[dir=rtl] td.mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}th.mat-header-cell:last-of-type,td.mat-cell:last-of-type,td.mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] th.mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] td.mat-cell:last-of-type:not(:only-of-type),[dir=rtl] td.mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}.mat-table-sticky{position:-webkit-sticky !important;position:sticky !important}.mat-table-fixed-layout{table-layout:fixed}\n'],encapsulation:2}),t})();const _V=r.Xb(vV);let yV=(()=>{class t extends LR{}return t.\u0275fac=function(e){return wV(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","matCellDef",""]],features:[r.Cb([{provide:LR,useExisting:t}]),r.Ab]}),t})();const wV=r.Xb(yV);let xV=(()=>{class t extends UR{}return t.\u0275fac=function(e){return CV(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","matHeaderCellDef",""]],features:[r.Cb([{provide:UR,useExisting:t}]),r.Ab]}),t})();const CV=r.Xb(xV);let SV=(()=>{class t extends zR{get name(){return this._name}set name(t){this._setNameInput(t)}_updateColumnCssClassName(){super._updateColumnCssClassName(),this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`)}}return t.\u0275fac=function(e){return kV(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","matColumnDef",""]],inputs:{sticky:"sticky",name:["matColumnDef","name"]},features:[r.Cb([{provide:zR,useExisting:t},{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:t}]),r.Ab]}),t})();const kV=r.Xb(SV);let EV=(()=>{class t extends KR{}return t.\u0275fac=function(e){return DV(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-header-cell"],features:[r.Ab]}),t})();const DV=r.Xb(EV);let IV=(()=>{class t extends $R{}return t.\u0275fac=function(e){return PV(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:["role","gridcell",1,"mat-cell"],features:[r.Ab]}),t})();const PV=r.Xb(IV);let OV=(()=>{class t extends XR{}return t.\u0275fac=function(e){return MV(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","matHeaderRowDef",""]],inputs:{columns:["matHeaderRowDef","columns"],sticky:["matHeaderRowDefSticky","sticky"]},features:[r.Cb([{provide:XR,useExisting:t}]),r.Ab]}),t})();const MV=r.Xb(OV);let TV=(()=>{class t extends iV{}return t.\u0275fac=function(e){return RV(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","matRowDef",""]],inputs:{columns:["matRowDefColumns","columns"],when:["matRowDefWhen","when"]},features:[r.Cb([{provide:iV,useExisting:t}]),r.Ab]}),t})();const RV=r.Xb(TV);let VV=(()=>{class t extends rV{}return t.\u0275fac=function(e){return FV(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-header-row"],exportAs:["matHeaderRow"],features:[r.Cb([{provide:rV,useExisting:t}]),r.Ab],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,e){1&t&&r.Rb(0,0)},directives:[nV],encapsulation:2}),t})();const FV=r.Xb(VV);let LV=(()=>{class t extends sV{}return t.\u0275fac=function(e){return UV(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-row"],exportAs:["matRow"],features:[r.Cb([{provide:sV,useExisting:t}]),r.Ab],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,e){1&t&&r.Rb(0,0)},directives:[nV],encapsulation:2}),t})();const UV=r.Xb(LV);let BV=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[gV,Sa],Sa]}),t})();class NV extends class extends class{}{constructor(t=[]){super(),this._renderData=new Av.a([]),this._filter=new Av.a(""),this._internalPageChanges=new _e.a,this._renderChangesSubscription=null,this.sortingDataAccessor=(t,e)=>{const i=t[e];if(ii(i)){const t=Number(i);return t<9007199254740991?t:i}return i},this.sortData=(t,e)=>{const i=e.active,n=e.direction;return i&&""!=n?t.sort((t,e)=>{let r=this.sortingDataAccessor(t,i),s=this.sortingDataAccessor(e,i);const o=typeof r,a=typeof s;o!==a&&("number"===o&&(r+=""),"number"===a&&(s+=""));let l=0;return null!=r&&null!=s?r>s?l=1:r<s&&(l=-1):null!=r?l=1:null!=s&&(l=-1),l*("asc"==n?1:-1)}):t},this.filterPredicate=(t,e)=>{const i=Object.keys(t).reduce((e,i)=>e+t[i]+"\u25ec","").toLowerCase(),n=e.trim().toLowerCase();return-1!=i.indexOf(n)},this._data=new Av.a(t),this._updateChangeSubscription()}get data(){return this._data.value}set data(t){this._data.next(t),this._renderChangesSubscription||this._filterData(t)}get filter(){return this._filter.value}set filter(t){this._filter.next(t),this._renderChangesSubscription||this._filterData(this.data)}get sort(){return this._sort}set sort(t){this._sort=t,this._updateChangeSubscription()}get paginator(){return this._paginator}set paginator(t){this._paginator=t,this._updateChangeSubscription()}_updateChangeSubscription(){var t;const e=this._sort?Object(or.a)(this._sort.sortChange,this._sort.initialized):Se(null),i=this._paginator?Object(or.a)(this._paginator.page,this._internalPageChanges,this._paginator.initialized):Se(null),n=Hg([this._data,this._filter]).pipe(Object(Ge.a)(([t])=>this._filterData(t))),r=Hg([n,e]).pipe(Object(Ge.a)(([t])=>this._orderData(t))),s=Hg([r,i]).pipe(Object(Ge.a)(([t])=>this._pageData(t)));null===(t=this._renderChangesSubscription)||void 0===t||t.unsubscribe(),this._renderChangesSubscription=s.subscribe(t=>this._renderData.next(t))}_filterData(t){return this.filteredData=null==this.filter||""===this.filter?t:t.filter(t=>this.filterPredicate(t,this.filter)),this.paginator&&this._updatePaginator(this.filteredData.length),this.filteredData}_orderData(t){return this.sort?this.sortData(t.slice(),this.sort):t}_pageData(t){if(!this.paginator)return t;const e=this.paginator.pageIndex*this.paginator.pageSize;return t.slice(e,e+this.paginator.pageSize)}_updatePaginator(t){Promise.resolve().then(()=>{const e=this.paginator;if(e&&(e.length=t,e.pageIndex>0)){const t=Math.ceil(e.length/e.pageSize)-1||0,i=Math.min(e.pageIndex,t);i!==e.pageIndex&&(e.pageIndex=i,this._internalPageChanges.next())}})}connect(){return this._renderChangesSubscription||this._updateChangeSubscription(),this._renderData}disconnect(){var t;null===(t=this._renderChangesSubscription)||void 0===t||t.unsubscribe(),this._renderChangesSubscription=null}}{}function jV(t,e){if(1&t&&(r.Vb(0,"div"),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.Db(1),r.Nc(" ",t.email," - ",t.status," ")}}let zV=(()=>{class t extends LT{constructor(t,e){super(),this.data=t,this.workerService=e,this.workFinished=!1}ngOnInit(){this.accountsStatuses=this.data.emails.map(t=>({email:t,status:"En attente"})),Promise.all(this.accountsStatuses.map(t=>Object(ue.a)(this,void 0,void 0,function*(){try{yield this.workerService.users.create({email:t.email,profile:this.data.profile}),t.status="OK"}catch(e){console.log("err",t.email,e),t.status=e.message.includes('duplicate key value violates unique constraint "user_email_key"')?"D\xe9j\xe0 pr\xe9sent":`KO : ${null==e?void 0:e.message}`}}))).finally(()=>{this.workFinished=!0})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(jl),r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-create-users-dialog"]],features:[r.Ab],decls:11,vars:3,consts:[[1,"d-flex"],[1,"dialog-title"],[1,"u-flex"],["mat-button","","title","Fermer la fen\xeatre",3,"disabled","mat-dialog-close"],[1,"dialog-content"],[4,"ngFor","ngForOf"],["mat-button","","title","Fermer la fen\xeatre",1,"d-block-center","mt-3",3,"disabled","mat-dialog-close"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"h1",1),r.Kc(2," Cr\xe9ation de comptes utilisateurs "),r.Ub(),r.Qb(3,"div",2),r.Vb(4,"button",3),r.Vb(5,"mat-icon"),r.Kc(6,"close"),r.Ub(),r.Ub(),r.Ub(),r.Vb(7,"div",4),r.Ic(8,jV,2,2,"div",5),r.Vb(9,"button",6),r.Kc(10," Fermer la fen\xeatre "),r.Ub(),r.Ub()),2&t&&(r.Db(4),r.nc("disabled",!e.workFinished),r.Db(4),r.nc("ngForOf",e.accountsStatuses),r.Db(1),r.nc("disabled",!e.workFinished))},directives:[Dl,Zl,Yp,ct],encapsulation:2}),t})();const HV=["input"],KV=function(){return{enterDuration:150}},$V=["*"],GV=new r.s("mat-checkbox-default-options",{providedIn:"root",factory:WV});function WV(){return{color:"accent",clickAction:"check-indeterminate"}}let ZV=0;const qV=WV(),YV={provide:rc,useExisting:Object(r.W)(()=>tF),multi:!0};class QV{}class XV{constructor(t){this._elementRef=t}}const JV=Ia(Ea(Da(ka(XV))));let tF=(()=>{class t extends JV{constructor(t,e,i,n,s,o,a){super(t),this._changeDetectorRef=e,this._focusMonitor=i,this._ngZone=n,this._animationMode=o,this._options=a,this.ariaLabel="",this.ariaLabelledby=null,this._uniqueId="mat-checkbox-"+ ++ZV,this.id=this._uniqueId,this.labelPosition="after",this.name=null,this.change=new r.o,this.indeterminateChange=new r.o,this._onTouched=()=>{},this._currentAnimationClass="",this._currentCheckState=0,this._controlValueAccessorChangeFn=()=>{},this._checked=!1,this._disabled=!1,this._indeterminate=!1,this._options=this._options||qV,this.color=this.defaultColor=this._options.color||qV.color,this.tabIndex=parseInt(s)||0}get inputId(){return`${this.id||this._uniqueId}-input`}get required(){return this._required}set required(t){this._required=ti(t)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{t||Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}),this._syncIndeterminate(this._indeterminate)}ngAfterViewChecked(){}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}get checked(){return this._checked}set checked(t){t!=this.checked&&(this._checked=t,this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(t){const e=ti(t);e!==this.disabled&&(this._disabled=e,this._changeDetectorRef.markForCheck())}get indeterminate(){return this._indeterminate}set indeterminate(t){const e=t!=this._indeterminate;this._indeterminate=ti(t),e&&(this._transitionCheckState(this._indeterminate?3:this.checked?1:2),this.indeterminateChange.emit(this._indeterminate)),this._syncIndeterminate(this._indeterminate)}_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(t){this.checked=!!t}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t}_getAriaChecked(){return this.checked?"true":this.indeterminate?"mixed":"false"}_transitionCheckState(t){let e=this._currentCheckState,i=this._elementRef.nativeElement;if(e!==t&&(this._currentAnimationClass.length>0&&i.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(e,t),this._currentCheckState=t,this._currentAnimationClass.length>0)){i.classList.add(this._currentAnimationClass);const t=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{i.classList.remove(t)},1e3)})}}_emitChangeEvent(){const t=new QV;t.source=this,t.checked=this.checked,this._controlValueAccessorChangeFn(this.checked),this.change.emit(t)}toggle(){this.checked=!this.checked}_onInputClick(t){var e;const i=null===(e=this._options)||void 0===e?void 0:e.clickAction;t.stopPropagation(),this.disabled||"noop"===i?this.disabled||"noop"!==i||(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate):(this.indeterminate&&"check"!==i&&Promise.resolve().then(()=>{this._indeterminate=!1,this.indeterminateChange.emit(this._indeterminate)}),this.toggle(),this._transitionCheckState(this._checked?1:2),this._emitChangeEvent())}focus(t,e){t?this._focusMonitor.focusVia(this._inputElement,t,e):this._inputElement.nativeElement.focus(e)}_onInteractionEvent(t){t.stopPropagation()}_getAnimationClassForCheckStateTransition(t,e){if("NoopAnimations"===this._animationMode)return"";let i="";switch(t){case 0:if(1===e)i="unchecked-checked";else{if(3!=e)return"";i="unchecked-indeterminate"}break;case 2:i=1===e?"unchecked-checked":"unchecked-indeterminate";break;case 1:i=2===e?"checked-unchecked":"checked-indeterminate";break;case 3:i=1===e?"indeterminate-checked":"indeterminate-unchecked"}return`mat-checkbox-anim-${i}`}_syncIndeterminate(t){const e=this._inputElement;e&&(e.nativeElement.indeterminate=t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.h),r.Pb(qi),r.Pb(r.B),r.ac("tabindex"),r.Pb(pa,8),r.Pb(GV,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-checkbox"]],viewQuery:function(t,e){if(1&t&&(r.Pc(HV,1),r.Pc(il,1)),2&t){let t;r.vc(t=r.dc())&&(e._inputElement=t.first),r.vc(t=r.dc())&&(e.ripple=t.first)}},hostAttrs:[1,"mat-checkbox"],hostVars:12,hostBindings:function(t,e){2&t&&(r.Yb("id",e.id),r.Eb("tabindex",null),r.Hb("mat-checkbox-indeterminate",e.indeterminate)("mat-checkbox-checked",e.checked)("mat-checkbox-disabled",e.disabled)("mat-checkbox-label-before","before"==e.labelPosition)("_mat-animation-noopable","NoopAnimations"===e._animationMode))},inputs:{disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],id:"id",labelPosition:"labelPosition",name:"name",required:"required",checked:"checked",disabled:"disabled",indeterminate:"indeterminate",ariaDescribedby:["aria-describedby","ariaDescribedby"],value:"value"},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],features:[r.Cb([YV]),r.Ab],ngContentSelectors:$V,decls:17,vars:20,consts:[[1,"mat-checkbox-layout"],["label",""],[1,"mat-checkbox-inner-container"],["type","checkbox",1,"mat-checkbox-input","cdk-visually-hidden",3,"id","required","checked","disabled","tabIndex","change","click"],["input",""],["matRipple","",1,"mat-checkbox-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleRadius","matRippleCentered","matRippleAnimation"],[1,"mat-ripple-element","mat-checkbox-persistent-ripple"],[1,"mat-checkbox-frame"],[1,"mat-checkbox-background"],["version","1.1","focusable","false","viewBox","0 0 24 24",0,"xml","space","preserve",1,"mat-checkbox-checkmark"],["fill","none","stroke","white","d","M4.1,12.7 9,17.6 20.3,6.3",1,"mat-checkbox-checkmark-path"],[1,"mat-checkbox-mixedmark"],[1,"mat-checkbox-label",3,"cdkObserveContent"],["checkboxLabel",""],[2,"display","none"]],template:function(t,e){if(1&t&&(r.mc(),r.Vb(0,"label",0,1),r.Vb(2,"span",2),r.Vb(3,"input",3,4),r.cc("change",function(t){return e._onInteractionEvent(t)})("click",function(t){return e._onInputClick(t)}),r.Ub(),r.Vb(5,"span",5),r.Qb(6,"span",6),r.Ub(),r.Qb(7,"span",7),r.Vb(8,"span",8),r.fc(),r.Vb(9,"svg",9),r.Qb(10,"path",10),r.Ub(),r.ec(),r.Qb(11,"span",11),r.Ub(),r.Ub(),r.Vb(12,"span",12,13),r.cc("cdkObserveContent",function(){return e._onLabelTextChange()}),r.Vb(14,"span",14),r.Kc(15,"\xa0"),r.Ub(),r.lc(16),r.Ub(),r.Ub()),2&t){const t=r.wc(1),i=r.wc(13);r.Eb("for",e.inputId),r.Db(2),r.Hb("mat-checkbox-inner-container-no-side-margin",!i.textContent||!i.textContent.trim()),r.Db(1),r.nc("id",e.inputId)("required",e.required)("checked",e.checked)("disabled",e.disabled)("tabIndex",e.tabIndex),r.Eb("value",e.value)("name",e.name)("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby)("aria-checked",e._getAriaChecked())("aria-describedby",e.ariaDescribedby),r.Db(2),r.nc("matRippleTrigger",t)("matRippleDisabled",e._isRippleDisabled())("matRippleRadius",20)("matRippleCentered",!0)("matRippleAnimation",r.rc(19,KV))}},directives:[il,xi],styles:["@keyframes mat-checkbox-fade-in-background{0%{opacity:0}50%{opacity:1}}@keyframes mat-checkbox-fade-out-background{0%,50%{opacity:1}100%{opacity:0}}@keyframes mat-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:22.910259}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1)}100%{stroke-dashoffset:0}}@keyframes mat-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mat-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);stroke-dashoffset:0}to{stroke-dashoffset:-22.910259}}@keyframes mat-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(45deg)}}@keyframes mat-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:0;transform:rotate(45deg)}to{opacity:1;transform:rotate(360deg)}}@keyframes mat-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:0;transform:rotate(-45deg)}to{opacity:1;transform:rotate(0deg)}}@keyframes mat-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(315deg)}}@keyframes mat-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;opacity:1;transform:scaleX(1)}32.8%,100%{opacity:0;transform:scaleX(0)}}.mat-checkbox-background,.mat-checkbox-frame{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:2px;box-sizing:border-box;pointer-events:none}.mat-checkbox{display:inline-block;transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);cursor:pointer;-webkit-tap-highlight-color:transparent}._mat-animation-noopable.mat-checkbox{transition:none;animation:none}.mat-checkbox .mat-ripple-element:not(.mat-checkbox-persistent-ripple){opacity:.16}.mat-checkbox-layout{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:inherit;align-items:baseline;vertical-align:middle;display:inline-flex;white-space:nowrap}.mat-checkbox-label{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.mat-checkbox-inner-container{display:inline-block;height:16px;line-height:0;margin:auto;margin-right:8px;order:0;position:relative;vertical-align:middle;white-space:nowrap;width:16px;flex-shrink:0}[dir=rtl] .mat-checkbox-inner-container{margin-left:8px;margin-right:auto}.mat-checkbox-inner-container-no-side-margin{margin-left:0;margin-right:0}.mat-checkbox-frame{background-color:transparent;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1);border-width:2px;border-style:solid}._mat-animation-noopable .mat-checkbox-frame{transition:none}.cdk-high-contrast-active .mat-checkbox.cdk-keyboard-focused .mat-checkbox-frame{border-style:dotted}.mat-checkbox-background{align-items:center;display:inline-flex;justify-content:center;transition:background-color 90ms cubic-bezier(0, 0, 0.2, 0.1),opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}._mat-animation-noopable .mat-checkbox-background{transition:none}.cdk-high-contrast-active .mat-checkbox .mat-checkbox-background{background:none}.mat-checkbox-persistent-ripple{display:block;width:100%;height:100%;transform:none}.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:.04}.mat-checkbox.cdk-keyboard-focused .mat-checkbox-persistent-ripple{opacity:.12}.mat-checkbox-persistent-ripple,.mat-checkbox.mat-checkbox-disabled .mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:0}@media(hover: none){.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{display:none}}.mat-checkbox-checkmark{top:0;left:0;right:0;bottom:0;position:absolute;width:100%}.mat-checkbox-checkmark-path{stroke-dashoffset:22.910259;stroke-dasharray:22.910259;stroke-width:2.1333333333px}.cdk-high-contrast-black-on-white .mat-checkbox-checkmark-path{stroke:#000 !important}.mat-checkbox-mixedmark{width:calc(100% - 6px);height:2px;opacity:0;transform:scaleX(0) rotate(0deg);border-radius:2px}.cdk-high-contrast-active .mat-checkbox-mixedmark{height:0;border-top:solid 2px;margin-top:2px}.mat-checkbox-label-before .mat-checkbox-inner-container{order:1;margin-left:8px;margin-right:auto}[dir=rtl] .mat-checkbox-label-before .mat-checkbox-inner-container{margin-left:auto;margin-right:8px}.mat-checkbox-checked .mat-checkbox-checkmark{opacity:1}.mat-checkbox-checked .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-checked .mat-checkbox-mixedmark{transform:scaleX(1) rotate(-45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark{opacity:0;transform:rotate(45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-indeterminate .mat-checkbox-mixedmark{opacity:1;transform:scaleX(1) rotate(0deg)}.mat-checkbox-unchecked .mat-checkbox-background{background-color:transparent}.mat-checkbox-disabled{cursor:default}.cdk-high-contrast-active .mat-checkbox-disabled{opacity:.5}.mat-checkbox-anim-unchecked-checked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-checked .mat-checkbox-checkmark-path{animation:180ms linear 0ms mat-checkbox-unchecked-checked-checkmark-path}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-unchecked-indeterminate-mixedmark}.mat-checkbox-anim-checked-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-checked-unchecked .mat-checkbox-checkmark-path{animation:90ms linear 0ms mat-checkbox-checked-unchecked-checkmark-path}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-checkmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-checkmark}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-mixedmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-checkmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-checkmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-mixedmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-mixedmark}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-mixedmark{animation:300ms linear 0ms mat-checkbox-indeterminate-unchecked-mixedmark}.mat-checkbox-input{bottom:0;left:50%}.mat-checkbox .mat-checkbox-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}\n"],encapsulation:2,changeDetection:0}),t})(),eF=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({}),t})(),iF=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[nl,Sa,Ci,eF],Sa,eF]}),t})();const nF=["*"];let rF=(()=>{class t{constructor(){this.title="",this.bgColor="#55575f",this.color="#ffffff"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-chip"]],inputs:{title:"title",bgColor:"bgColor",color:"color"},ngContentSelectors:nF,decls:2,vars:5,consts:[[1,"chip",3,"title"]],template:function(t,e){1&t&&(r.mc(),r.Vb(0,"div",0),r.lc(1),r.Ub()),2&t&&(r.Fc("color",e.color)("background-color",e.bgColor),r.nc("title",e.title))},styles:[".chip[_ngcontent-%COMP%] {\n display: inline-block;\n padding: 4px 5px;\n border-radius: 5px;\n font-size: 12px;\n}"],changeDetection:0}),t})();function sF(t,e){if(1&t&&(r.fc(),r.Qb(0,"circle",3)),2&t){const t=r.gc();r.Fc("animation-name","mat-progress-spinner-stroke-rotate-"+t._spinnerAnimationLabel)("stroke-dashoffset",t._getStrokeDashOffset(),"px")("stroke-dasharray",t._getStrokeCircumference(),"px")("stroke-width",t._getCircleStrokeWidth(),"%"),r.Eb("r",t._getCircleRadius())}}function oF(t,e){if(1&t&&(r.fc(),r.Qb(0,"circle",3)),2&t){const t=r.gc();r.Fc("stroke-dashoffset",t._getStrokeDashOffset(),"px")("stroke-dasharray",t._getStrokeCircumference(),"px")("stroke-width",t._getCircleStrokeWidth(),"%"),r.Eb("r",t._getCircleRadius())}}function aF(t,e){if(1&t&&(r.fc(),r.Qb(0,"circle",3)),2&t){const t=r.gc();r.Fc("animation-name","mat-progress-spinner-stroke-rotate-"+t._spinnerAnimationLabel)("stroke-dashoffset",t._getStrokeDashOffset(),"px")("stroke-dasharray",t._getStrokeCircumference(),"px")("stroke-width",t._getCircleStrokeWidth(),"%"),r.Eb("r",t._getCircleRadius())}}function lF(t,e){if(1&t&&(r.fc(),r.Qb(0,"circle",3)),2&t){const t=r.gc();r.Fc("stroke-dashoffset",t._getStrokeDashOffset(),"px")("stroke-dasharray",t._getStrokeCircumference(),"px")("stroke-width",t._getCircleStrokeWidth(),"%"),r.Eb("r",t._getCircleRadius())}}const cF=".mat-progress-spinner{display:block;position:relative;overflow:hidden}.mat-progress-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}.mat-progress-spinner circle{fill:transparent;transform-origin:center;transition:stroke-dashoffset 225ms linear}._mat-animation-noopable.mat-progress-spinner circle{transition:none;animation:none}.cdk-high-contrast-active .mat-progress-spinner circle{stroke:currentColor}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] svg{animation:mat-progress-spinner-linear-rotate 2000ms linear infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] svg{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition-property:stroke;animation-duration:4000ms;animation-timing-function:cubic-bezier(0.35, 0, 0.25, 1);animation-iteration-count:infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] svg{animation:mat-progress-spinner-stroke-rotate-fallback 10000ms cubic-bezier(0.87, 0.03, 0.33, 1) infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] svg{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition-property:stroke}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition:none;animation:none}@keyframes mat-progress-spinner-linear-rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes mat-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.606171575px;transform:rotate(0)}12.5%{stroke-dashoffset:56.5486677px;transform:rotate(0)}12.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(72.5deg)}25.0001%{stroke-dashoffset:268.606171575px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.5486677px;transform:rotate(270deg)}37.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(161.5deg)}50.0001%{stroke-dashoffset:268.606171575px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.5486677px;transform:rotate(180deg)}62.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(251.5deg)}75.0001%{stroke-dashoffset:268.606171575px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.5486677px;transform:rotate(90deg)}87.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(341.5deg)}}@keyframes mat-progress-spinner-stroke-rotate-fallback{0%{transform:rotate(0deg)}25%{transform:rotate(1170deg)}50%{transform:rotate(2340deg)}75%{transform:rotate(3510deg)}100%{transform:rotate(4680deg)}}\n";class hF{constructor(t){this._elementRef=t}}const uF=Ea(hF,"primary"),dF=new r.s("mat-progress-spinner-default-options",{providedIn:"root",factory:function(){return{diameter:100}}});let pF=(()=>{class t extends uF{constructor(e,i,n,r,s){super(e),this._elementRef=e,this._document=n,this._diameter=100,this._value=0,this._fallbackAnimation=!1,this.mode="determinate";const o=t._diameters;this._spinnerAnimationLabel=this._getSpinnerAnimationLabel(),o.has(n.head)||o.set(n.head,new Set([100])),this._fallbackAnimation=i.EDGE||i.TRIDENT,this._noopAnimations="NoopAnimations"===r&&!!s&&!s._forceAnimations,s&&(s.diameter&&(this.diameter=s.diameter),s.strokeWidth&&(this.strokeWidth=s.strokeWidth))}get diameter(){return this._diameter}set diameter(t){this._diameter=ei(t),this._spinnerAnimationLabel=this._getSpinnerAnimationLabel(),!this._fallbackAnimation&&this._styleRoot&&this._attachStyleNode()}get strokeWidth(){return this._strokeWidth||this.diameter/10}set strokeWidth(t){this._strokeWidth=ei(t)}get value(){return"determinate"===this.mode?this._value:0}set value(t){this._value=Math.max(0,Math.min(100,ei(t)))}ngOnInit(){const t=this._elementRef.nativeElement;this._styleRoot=_i(t)||this._document.head,this._attachStyleNode(),t.classList.add(`mat-progress-spinner-indeterminate${this._fallbackAnimation?"-fallback":""}-animation`)}_getCircleRadius(){return(this.diameter-10)/2}_getViewBox(){const t=2*this._getCircleRadius()+this.strokeWidth;return`0 0 ${t} ${t}`}_getStrokeCircumference(){return 2*Math.PI*this._getCircleRadius()}_getStrokeDashOffset(){return"determinate"===this.mode?this._getStrokeCircumference()*(100-this._value)/100:this._fallbackAnimation&&"indeterminate"===this.mode?.2*this._getStrokeCircumference():null}_getCircleStrokeWidth(){return this.strokeWidth/this.diameter*100}_attachStyleNode(){const e=this._styleRoot,i=this._diameter,n=t._diameters;let r=n.get(e);if(!r||!r.has(i)){const t=this._document.createElement("style");t.setAttribute("mat-spinner-animation",this._spinnerAnimationLabel),t.textContent=this._getAnimationText(),e.appendChild(t),r||(r=new Set,n.set(e,r)),r.add(i)}}_getAnimationText(){const t=this._getStrokeCircumference();return"\n @keyframes mat-progress-spinner-stroke-rotate-DIAMETER {\n 0% { stroke-dashoffset: START_VALUE; transform: rotate(0); }\n 12.5% { stroke-dashoffset: END_VALUE; transform: rotate(0); }\n 12.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n 25% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n\n 25.0001% { stroke-dashoffset: START_VALUE; transform: rotate(270deg); }\n 37.5% { stroke-dashoffset: END_VALUE; transform: rotate(270deg); }\n 37.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n 50% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n\n 50.0001% { stroke-dashoffset: START_VALUE; transform: rotate(180deg); }\n 62.5% { stroke-dashoffset: END_VALUE; transform: rotate(180deg); }\n 62.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n 75% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n\n 75.0001% { stroke-dashoffset: START_VALUE; transform: rotate(90deg); }\n 87.5% { stroke-dashoffset: END_VALUE; transform: rotate(90deg); }\n 87.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n 100% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n }\n".replace(/START_VALUE/g,""+.95*t).replace(/END_VALUE/g,""+.2*t).replace(/DIAMETER/g,`${this._spinnerAnimationLabel}`)}_getSpinnerAnimationLabel(){return this.diameter.toString().replace(".","_")}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(ci),r.Pb(a,8),r.Pb(pa,8),r.Pb(dF))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-progress-spinner"]],hostAttrs:["role","progressbar",1,"mat-progress-spinner"],hostVars:10,hostBindings:function(t,e){2&t&&(r.Eb("aria-valuemin","determinate"===e.mode?0:null)("aria-valuemax","determinate"===e.mode?100:null)("aria-valuenow","determinate"===e.mode?e.value:null)("mode",e.mode),r.Fc("width",e.diameter,"px")("height",e.diameter,"px"),r.Hb("_mat-animation-noopable",e._noopAnimations))},inputs:{color:"color",mode:"mode",diameter:"diameter",strokeWidth:"strokeWidth",value:"value"},exportAs:["matProgressSpinner"],features:[r.Ab],decls:3,vars:8,consts:[["preserveAspectRatio","xMidYMid meet","focusable","false",3,"ngSwitch"],["cx","50%","cy","50%",3,"animation-name","stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%",3,"stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%"]],template:function(t,e){1&t&&(r.fc(),r.Vb(0,"svg",0),r.Ic(1,sF,1,9,"circle",1),r.Ic(2,oF,1,7,"circle",2),r.Ub()),2&t&&(r.Fc("width",e.diameter,"px")("height",e.diameter,"px"),r.nc("ngSwitch","indeterminate"===e.mode),r.Eb("viewBox",e._getViewBox()),r.Db(1),r.nc("ngSwitchCase",!0),r.Db(1),r.nc("ngSwitchCase",!1))},directives:[mt,gt],styles:[cF],encapsulation:2,changeDetection:0}),t._diameters=new WeakMap,t})(),fF=(()=>{class t extends pF{constructor(t,e,i,n,r){super(t,e,i,n,r),this.mode="indeterminate"}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(ci),r.Pb(a,8),r.Pb(pa,8),r.Pb(dF))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-spinner"]],hostAttrs:["role","progressbar","mode","indeterminate",1,"mat-spinner","mat-progress-spinner"],hostVars:6,hostBindings:function(t,e){2&t&&(r.Fc("width",e.diameter,"px")("height",e.diameter,"px"),r.Hb("_mat-animation-noopable",e._noopAnimations))},inputs:{color:"color"},features:[r.Ab],decls:3,vars:8,consts:[["preserveAspectRatio","xMidYMid meet","focusable","false",3,"ngSwitch"],["cx","50%","cy","50%",3,"animation-name","stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%",3,"stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%"]],template:function(t,e){1&t&&(r.fc(),r.Vb(0,"svg",0),r.Ic(1,aF,1,9,"circle",1),r.Ic(2,lF,1,7,"circle",2),r.Ub()),2&t&&(r.Fc("width",e.diameter,"px")("height",e.diameter,"px"),r.nc("ngSwitch","indeterminate"===e.mode),r.Eb("viewBox",e._getViewBox()),r.Db(1),r.nc("ngSwitchCase",!0),r.Db(1),r.nc("ngSwitchCase",!1))},directives:[mt,gt],styles:[cF],encapsulation:2,changeDetection:0}),t})(),mF=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Sa,Et],Sa]}),t})();function gF(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",26),r.cc("click",function(){r.Ac(t);const e=r.gc(2);return e.filterValue="",e.filterUsers("")}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function AF(t,e){1&t&&(r.Vb(0,"th",27),r.Kc(1,"Email"),r.Ub())}function bF(t,e){1&t&&(r.Vb(0,"app-chip",31),r.Kc(1,"Admin"),r.Ub())}function vF(t,e){1&t&&(r.Vb(0,"app-chip",32),r.Kc(1,"C'est vous !"),r.Ub())}function _F(t,e){if(1&t&&(r.Vb(0,"td",28),r.Kc(1),r.Ic(2,bF,2,0,"app-chip",29),r.Ic(3,vF,2,0,"app-chip",30),r.Ub()),2&t){const t=e.$implicit,i=r.gc(2);r.Db(1),r.Mc(" ",t.email," "),r.Db(1),r.nc("ngIf","admin"===t.profile),r.Db(1),r.nc("ngIf",t.id===i.authenticationService.getUserId())}}function yF(t,e){1&t&&(r.Vb(0,"th",27),r.Kc(1,"Date de cr\xe9ation"),r.Ub())}function wF(t,e){if(1&t&&(r.Vb(0,"td",28),r.Kc(1),r.hc(2,"date"),r.Ub()),2&t){const t=e.$implicit;r.Db(1),r.Lc(r.jc(2,1,t.created_at,"yyyy-MM-dd HH:mm"))}}function xF(t,e){1&t&&(r.Vb(0,"th",27),r.Kc(1,"Derni\xe8re activit\xe9"),r.Ub())}function CF(t,e){if(1&t&&(r.Vb(0,"td",28),r.Kc(1),r.hc(2,"date"),r.Ub()),2&t){const t=e.$implicit;r.Db(1),r.Lc(r.jc(2,1,t.last_activity,"yyyy-MM-dd HH:mm"))}}function SF(t,e){1&t&&(r.Vb(0,"th",27),r.Kc(1,"Unit\xe9"),r.Ub())}function kF(t,e){if(1&t){const t=r.Wb();r.Vb(0,"td",28),r.Vb(1,"mat-form-field"),r.Vb(2,"input",33),r.cc("ngModelChange",function(t){return e.$implicit.note=t})("ngModelChange",function(i){r.Ac(t);const n=e.$implicit;return r.gc(2).onUserNoteUpdate(n,i)}),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=e.$implicit;r.Db(2),r.nc("ngModel",t.note)}}function EF(t,e){1&t&&r.Qb(0,"th",34)}function DF(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",37),r.cc("click",function(){r.Ac(t);const e=r.gc().$implicit;return r.gc(2).deleteUser(e.id)}),r.Vb(1,"mat-icon"),r.Kc(2,"delete"),r.Ub(),r.Ub()}}function IF(t,e){if(1&t&&(r.Vb(0,"td",28),r.Ic(1,DF,3,0,"button",35),r.Vb(2,"button",36),r.Vb(3,"mat-icon"),r.Kc(4,"mail"),r.Ub(),r.Ub(),r.Ub()),2&t){const t=e.$implicit,i=r.gc(2);r.Db(1),r.nc("ngIf",t.id!==i.authenticationService.getUserId()),r.Db(1),r.nc("app-async-action",i.sendWelcomeEmail.bind(i,t.id))}}function PF(t,e){1&t&&r.Qb(0,"tr",38)}function OF(t,e){1&t&&r.Qb(0,"tr",39)}const MF=function(){return[10,20,100]};function TF(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div"),r.Vb(1,"div",10),r.Vb(2,"mat-form-field"),r.Vb(3,"mat-label"),r.Kc(4,"Filtre"),r.Ub(),r.Vb(5,"input",11),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc().filterValue=e})("keyup",function(e){return r.Ac(t),r.gc().filterUsers(e.target.value)}),r.Ub(),r.Ic(6,gF,3,0,"button",12),r.Ub(),r.Vb(7,"button",13),r.Kc(8,"Rafraichir la liste"),r.Ub(),r.Ub(),r.Vb(9,"table",14),r.Tb(10,15),r.Ic(11,AF,2,0,"th",16),r.Ic(12,_F,4,3,"td",17),r.Sb(),r.Tb(13,18),r.Ic(14,yF,2,0,"th",16),r.Ic(15,wF,3,4,"td",17),r.Sb(),r.Tb(16,19),r.Ic(17,xF,2,0,"th",16),r.Ic(18,CF,3,4,"td",17),r.Sb(),r.Tb(19,20),r.Ic(20,SF,2,0,"th",16),r.Ic(21,kF,3,1,"td",17),r.Sb(),r.Tb(22,21),r.Ic(23,EF,1,0,"th",22),r.Ic(24,IF,5,2,"td",17),r.Sb(),r.Ic(25,PF,1,0,"tr",23),r.Ic(26,OF,1,0,"tr",24),r.Ub(),r.Qb(27,"mat-paginator",25),r.Ub()}if(2&t){const t=r.gc();r.Db(5),r.nc("ngModel",t.filterValue),r.Db(1),r.nc("ngIf",t.filterValue),r.Db(1),r.nc("app-async-action",t.refreshList),r.Db(2),r.nc("dataSource",t.usersDataSource),r.Db(16),r.nc("matHeaderRowDef",t.displayedColumns),r.Db(1),r.nc("matRowDefColumns",t.displayedColumns),r.Db(1),r.nc("pageSizeOptions",r.rc(7,MF))}}function RF(t,e){1&t&&r.Qb(0,"mat-spinner",40)}function VF(t,e){if(1&t&&(r.Vb(0,"mat-hint"),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Oc("",t.extractedEmailsCount," email",t.extractedEmailsCount>1?"s":""," reconnu",t.extractedEmailsCount>1?"s":"",".")}}function FF(t,e){1&t&&(r.Vb(0,"mat-error"),r.Kc(1,"Aucun email reconnu"),r.Ub())}const LF=/(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/g;function UF(t){const e=t.value.match(LF);return(null==e?void 0:e.length)>0?null:{missingEmails:!0}}let BF=(()=>{class t extends LT{constructor(t,e,i,n,r,s){super(),this.dialog=t,this.formBuilder=e,this.workerService=i,this.authenticationService=n,this.configService=r,this.uiService=s,this.displayedColumns=["email","created_at","last_activity","note","actions"],this.pendingNoteUpdates=new Map,this.extractedEmails=[],this.extractedEmailsCount=0,this.createUser=()=>Object(ue.a)(this,void 0,void 0,function*(){this.createUserForm.valid&&(1===this.extractedEmailsCount?(yield this.workerService.users.create({email:this.extractedEmails[0],profile:this.createUserForm.controls.admin.value?"admin":"user"}),this.uiService.success("L'utilisateur a bien \xe9t\xe9 cr\xe9\xe9. Il recevra un email avec un lien vers l'application et les instructions pour d\xe9finir son mot de passe.")):yield this.openCreateUsersDialog(this.extractedEmails,this.createUserForm.controls.admin.value?"admin":"user"),this.createUserForm.controls.emails.reset(""),this.createUserForm.controls.emails.status="VALID",this.usersDataSource.data=yield this.workerService.users.list())}),this.refreshList=()=>Object(ue.a)(this,void 0,void 0,function*(){this.usersDataSource.data=yield this.workerService.users.list()})}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.createUserForm=this.formBuilder.group({emails:["",[UF]],admin:[!1]}),this.usersDataSource=new NV(yield this.workerService.users.list()),this.usersDataSource.filterPredicate=this.filterPredicate,setTimeout(()=>{this.paginator.pageSize=this.configService.adminManageUsersPageSize,this.sort.sort(this.configService.adminManageUsersSort),this.usersDataSource.paginator=this.paginator,this.usersDataSource.sort=this.sort,this.subscriptions.push(this.paginator.page.subscribe(t=>{this.configService.set("adminManageUsersPageSize",t.pageSize)}),this.sort.sortChange.subscribe(t=>{this.configService.set("adminManageUsersSort",{id:t.active,start:t.direction})}))}),this.subscriptions.push(this.createUserForm.controls.emails.valueChanges.subscribe(t=>{var e;const i=t.match(LF);this.extractedEmails=null!=i?i:[],this.extractedEmailsCount=null!==(e=null==i?void 0:i.length)&&void 0!==e?e:0}))})}deleteUser(t){this.uiService.confirm({title:"Suppression",message:"Cela va supprimer l'utilisateur ainsi que toutes ses r\xe8gles, alertes et flottes associ\xe9es. Confirmez-vous la suppression de cet utilisateur ?",action:e=>Object(ue.a)(this,void 0,void 0,function*(){e&&(yield this.workerService.users.delete(t),this.usersDataSource.data=this.usersDataSource.data.filter(e=>e.id!==t))})})}sendWelcomeEmail(t){return Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.users.sendWelcomeEmail(t),this.uiService.success("Un email d'invitation a \xe9t\xe9 envoy\xe9 \xe0 l'utilisateur")})}filterUsers(t){this.usersDataSource.filter=TD(t.trim()),this.usersDataSource.paginator&&this.usersDataSource.paginator.firstPage()}filterPredicate(t,e){return TD(t.email).includes(e)||TD(t.note).includes(e)}onUserNoteUpdate(t,e){return Object(ue.a)(this,void 0,void 0,function*(){const i=this.pendingNoteUpdates.get(t.id);i&&clearTimeout(i),this.pendingNoteUpdates.set(t.id,window.setTimeout(()=>Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.users.updateNote(t.id,e),this.pendingNoteUpdates.delete(t.id)}),500))})}openCreateUsersDialog(t,e){return Object(ue.a)(this,void 0,void 0,function*(){return new Promise(i=>{this.createUsersDialogRef=this.dialog.open(zV,{data:{emails:t,profile:e},autoFocus:!0,closeOnNavigation:!1}),this.createUsersDialogRef.afterClosed().subscribe(()=>{i()})})})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Gl),r.Pb(Lh),r.Pb(_I.a),r.Pb(yI),r.Pb(cI),r.Pb(VI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-manage-users-page"]],viewQuery:function(t,e){if(1&t&&(r.Pc(CR,1),r.Pc(yA,1)),2&t){let t;r.vc(t=r.dc())&&(e.sort=t.first),r.vc(t=r.dc())&&(e.paginator=t.first)}},features:[r.Ab],decls:20,vars:8,consts:[[1,"mat-h1"],[4,"ngIf","ngIfElse"],["loading",""],[1,"mat-h2"],[1,"d-flex-center",3,"formGroup"],["appearance","outline",1,"u-flex","mt-3"],["matInput","","formControlName","emails","cdkTextareaAutosize","","cdkAutosizeMinRows","1","cdkAutosizeMaxRows","6","required",""],[4,"ngIf"],["color","primary","title","Un administrateur peut g\xe9rer les utilisateurs (pour l'instant...)","formControlName","admin",1,"mx-3"],["mat-raised-button","","color","primary",3,"app-async-action","disabled"],[1,"d-flex-center",2,"justify-content","space-between"],["matInput","","placeholder","utilisateur@exemple.com",3,"ngModel","ngModelChange","keyup"],["mat-button","","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],["mat-stroked-button","",3,"app-async-action"],["mat-table","","matSort","","matSortActive","email","matSortDirection","asc",1,"table",3,"dataSource"],["matColumnDef","email"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","created_at"],["matColumnDef","last_activity"],["matColumnDef","note"],["matColumnDef","actions"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-button","","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["bgColor","#1aaa55",4,"ngIf"],["class","ml-1","bgColor","#2d60eb",4,"ngIf"],["bgColor","#1aaa55"],["bgColor","#2d60eb",1,"ml-1"],["matInput","","type","text","title","Unit\xe9",3,"ngModel","ngModelChange"],["mat-header-cell",""],["mat-icon-button","","color","warn","title","Supprimer cet utilisateur",3,"click",4,"ngIf"],["mat-icon-button","","title","Envoyer un email d'invitation",3,"app-async-action"],["mat-icon-button","","color","warn","title","Supprimer cet utilisateur",3,"click"],["mat-header-row",""],["mat-row",""],["strokeWidth","4","diameter","80",1,"spinner"]],template:function(t,e){if(1&t&&(r.Vb(0,"h1",0),r.Kc(1,"Gestion des utilisateurs"),r.Ub(),r.Ic(2,TF,28,8,"div",1),r.Ic(3,RF,1,0,"ng-template",null,2,r.Jc),r.Vb(5,"h2",3),r.Kc(6,"Cr\xe9ation de comptes utilisateur"),r.Ub(),r.Vb(7,"p"),r.Kc(8," Les utilisateurs cr\xe9\xe9s recevront un email avec un lien pour d\xe9finir leur mot de passe. Vous pouvez copier du texte multi-lignes contenant des emails. Ces derniers seront extraits automatiquement.\n"),r.Ub(),r.Vb(9,"form",4),r.Vb(10,"mat-form-field",5),r.Vb(11,"mat-label"),r.Kc(12,"Email(s)"),r.Ub(),r.Qb(13,"textarea",6),r.Ic(14,VF,2,3,"mat-hint",7),r.Ic(15,FF,2,0,"mat-error",7),r.Ub(),r.Vb(16,"mat-checkbox",8),r.Kc(17,"Administrateur"),r.Ub(),r.Vb(18,"button",9),r.Kc(19),r.Ub(),r.Ub()),2&t){const t=r.wc(4);r.Db(2),r.nc("ngIf",e.usersDataSource)("ngIfElse",t),r.Db(7),r.nc("formGroup",e.createUserForm),r.Db(5),r.nc("ngIf",e.extractedEmailsCount>0),r.Db(1),r.nc("ngIf",e.createUserForm.get("emails").touched&&e.createUserForm.get("emails").hasError("missingEmails")),r.Db(3),r.nc("app-async-action",e.createUser)("disabled",!e.createUserForm.valid),r.Db(1),r.Mc("Cr\xe9er ",e.extractedEmailsCount>1?"les utilisateurs":"l'utilisateur","")}},directives:[ut,dh,Fc,_h,_u,cu,Ou,ac,Cu,Vc,Eh,Ih,tF,Dl,dR,uh,vV,CR,SV,xV,yV,OV,TV,yA,fu,Yp,EV,OR,IV,rF,VV,LV,fF,lu,nu],pipes:[kt],styles:[".table[_ngcontent-%COMP%]{width:100%}.table[_ngcontent-%COMP%] td.mat-cell{padding:0 4px!important;font-size:13px}.table[_ngcontent-%COMP%] td.mat-cell:first-of-type{padding-left:24px!important}.table[_ngcontent-%COMP%] td.mat-cell:last-of-type{padding-right:24px!important}"]}),t})();function NF(t,e){1&t&&(r.Vb(0,"mat-error"),r.Kc(1,"L'email est obligatoire"),r.Ub())}function jF(t,e){1&t&&(r.Vb(0,"mat-error"),r.Kc(1,"L'email doit \xeatre valide"),r.Ub())}function zF(t,e){1&t&&(r.Vb(0,"mat-error"),r.Kc(1,"Le mot de passe est obligatoire"),r.Ub())}const HF=function(){return["/reset-password"]};let KF=(()=>{class t{constructor(t,e,i,n){this.formBuilder=t,this.router=e,this.authenticationService=i,this.uiService=n,this.login=()=>Object(ue.a)(this,void 0,void 0,function*(){if(this.loginForm.valid)try{yield this.authenticationService.login(this.loginForm.value);const t=new URLSearchParams(window.location.search).get("redirect");yield this.router.navigateByUrl(null!=t?t:"/")}catch(t){this.uiService.error(t.message)}})}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){if(this.loginForm=this.formBuilder.group({email:["",[pc.required,pc.email]],password:["",[pc.required]]}),this.authenticationService.isAuthenticated()){const t=new URLSearchParams(window.location.search).get("redirect");yield this.router.navigateByUrl(null!=t?t:"/")}else null!==new URLSearchParams(window.location.search).get("expired")&&this.uiService.error("Votre session a expir\xe9. Veuillez vous authentifier \xe0 nouveau.")})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Lh),r.Pb(sw),r.Pb(yI),r.Pb(VI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-login-page"]],decls:23,vars:7,consts:[[1,"unauthenticated-page","mat-typography"],["novalidate","",1,"unauthenticated-page__form",3,"formGroup"],["src","./assets/images/logo_anais.png","alt","Logo ANAIS",1,"login-page__logo"],["matPrefix","",1,"login-page__prefix-icon"],["type","email","matInput","","placeholder","utilisateur@exemple.com","formControlName","email","required",""],[4,"ngIf"],["type","password","matInput","","color","white","placeholder","******","formControlName","password","required",""],["mat-stroked-button","","color","primary",1,"login-page__login-btn",3,"app-async-action"],["mat-button","",1,"mt-3","login-page__reset-password-button",3,"routerLink"],["src","./assets/images/logo_fabnum.png","alt","Logo Fabrique num\xe9rique",1,"login-page__fabnumlogo"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"form",1),r.Qb(2,"img",2),r.Vb(3,"mat-form-field"),r.Vb(4,"mat-label"),r.Kc(5,"Email"),r.Ub(),r.Vb(6,"mat-icon",3),r.Kc(7,"perm_identity"),r.Ub(),r.Qb(8,"input",4),r.Ic(9,NF,2,0,"mat-error",5),r.Ic(10,jF,2,0,"mat-error",5),r.Ub(),r.Vb(11,"mat-form-field"),r.Vb(12,"mat-label"),r.Kc(13,"Mot de passe"),r.Ub(),r.Vb(14,"mat-icon",3),r.Kc(15,"lock"),r.Ub(),r.Qb(16,"input",6),r.Ic(17,zF,2,0,"mat-error",5),r.Ub(),r.Vb(18,"button",7),r.Kc(19,"Se connecter"),r.Ub(),r.Vb(20,"button",8),r.Kc(21," J'ai perdu mon mot de passe "),r.Ub(),r.Ub(),r.Qb(22,"img",9),r.Ub()),2&t&&(r.Db(1),r.nc("formGroup",e.loginForm),r.Db(8),r.nc("ngIf",e.loginForm.get("email").hasError("required")),r.Db(1),r.nc("ngIf",e.loginForm.get("email").hasError("email")),r.Db(7),r.nc("ngIf",e.loginForm.get("password").hasError("required")),r.Db(1),r.nc("app-async-action",e.login),r.Db(2),r.nc("routerLink",r.rc(6,HF)))},directives:[dh,Fc,_h,_u,cu,Yp,du,Ou,ac,Vc,Eh,Ih,ut,Dl,dR,ow,nu],styles:[".login-page__login-btn[_ngcontent-%COMP%]{margin-top:2em;background-color:#fff!important}.login-page__login-btn[_ngcontent-%COMP%]:hover .mat-button-focus-overlay{opacity:.18}.login-page__logo[_ngcontent-%COMP%]{width:350px;max-height:83px;margin-bottom:3em}.login-page__fabnumlogo[_ngcontent-%COMP%]{margin-top:3em;width:200px;max-height:86px}.login-page__prefix-icon[_ngcontent-%COMP%]{margin-right:.5em}.login-page__reset-password-button[_ngcontent-%COMP%]{color:#fff;font-weight:300;line-height:2em;height:2em}","[_nghost-%COMP%]{flex:1}.unauthenticated-page[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:auto;background-image:url(/assets/images/login_background.jpg);background-size:cover;background-position:70% 50%}.unauthenticated-page__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:300px;color:#fff;background-color:rgba(0,55,146,.9490196078431372);padding:2.5em 2.5em 1em;border-radius:2em;box-shadow:0 16px 24px 2px rgba(0,55,146,.64),0 6px 30px 5px rgba(0,55,146,.62)}.unauthenticated-page__form[_ngcontent-%COMP%] .mat-form-field-label{color:#fff}"]}),t})(),$F=(()=>{class t extends LT{constructor(t,e){super(),this.router=t,this.workerService=e}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.subscriptions.push(this.workerService.applicationHealth$.pipe(Gg(1)).subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){var e;(null===(e=null==t?void 0:t.maintenance)||void 0===e?void 0:e.type)!==qT.InProgress&&(yield this.router.navigateByUrl("/"))}))),yield this.workerService.application.refreshHealthState()})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(sw),r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-maintenance-wall-page"]],features:[r.Ab],decls:4,vars:0,consts:[[1,"unauthenticated-page","mat-typography"],[1,"unauthenticated-page__form"],[1,"maintenance-page__title"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"h3",2),r.Kc(3,"Maintenance en cours"),r.Ub(),r.Ub(),r.Ub())},styles:[".maintenance-page__title[_ngcontent-%COMP%]{font-weight:700;font-size:2.5em}","[_nghost-%COMP%]{flex:1}.unauthenticated-page[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:auto;background-image:url(/assets/images/login_background.jpg);background-size:cover;background-position:70% 50%}.unauthenticated-page__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:300px;color:#fff;background-color:rgba(0,55,146,.9490196078431372);padding:2.5em 2.5em 1em;border-radius:2em;box-shadow:0 16px 24px 2px rgba(0,55,146,.64),0 6px 30px 5px rgba(0,55,146,.62)}.unauthenticated-page__form[_ngcontent-%COMP%] .mat-form-field-label{color:#fff}"]}),t})(),GF=(()=>{class t{ngOnChanges(t){(t.flag||t.mmsi)&&(this.country=WO(this.flag?this.flag:ZO[this.mmsi.substr(0,3)]))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-flag"]],inputs:{mmsi:"mmsi",flag:"flag"},features:[r.Bb],decls:1,vars:2,consts:[[3,"className","title"]],template:function(t,e){1&t&&r.Qb(0,"span",0),2&t&&r.nc("className","flag-icon flag-icon-"+e.country.flag)("title",e.country.name)},styles:["[_nghost-%COMP%]{display:inline-flex;font-size:1.5em}"],changeDetection:0}),t})();const WF=function(t){return{transform:t}};function ZF(t,e){if(1&t&&(r.Kc(0),r.Vb(1,"mat-icon",8),r.Kc(2,"arrow_right_alt"),r.Ub()),2&t){const t=r.gc(2);r.Mc(" ",t.aircraft.track,"\xb0 "),r.Db(1),r.nc("ngStyle",r.sc(2,WF,"rotate("+(t.aircraft.track-90)+"deg)"))}}function qF(t,e){1&t&&r.Kc(0," ? ")}function YF(t,e){if(1&t&&(r.Qb(0,"mat-divider"),r.Vb(1,"div",0),r.Vb(2,"div",1),r.Vb(3,"div",2),r.Kc(4,"Squawk"),r.Ub(),r.Vb(5,"strong"),r.Kc(6),r.Ub(),r.Ub(),r.Qb(7,"mat-divider",3),r.Vb(8,"div",1),r.Vb(9,"div",2),r.Kc(10,"Vitesse / Cap"),r.Ub(),r.Vb(11,"strong",5),r.Kc(12),r.Ic(13,ZF,3,4,"ng-template",6),r.Ic(14,qF,1,0,"ng-template",null,7,r.Jc),r.Ub(),r.Ub(),r.Qb(16,"mat-divider",3),r.Vb(17,"div",1),r.Vb(18,"div",2),r.Kc(19,"Destination"),r.Ub(),r.Vb(20,"strong"),r.Kc(21),r.Ub(),r.Ub(),r.Ub()),2&t){const t=r.wc(15),e=r.gc();r.Db(6),r.Mc(" ",e.aircraft.squawk||"?"," "),r.Db(1),r.nc("vertical",!0),r.Db(5),r.Mc(" ",e.aircraft.speed?e.aircraft.speed+" kt":"?"," / "),r.Db(1),r.nc("ngIf",e.aircraft.track)("ngIfElse",t),r.Db(3),r.nc("vertical",!0),r.Db(5),r.Nc(" ",e.aircraft.fromIcao||"?"," \u2192 ",e.aircraft.toIcao||"?"," ")}}function QF(t,e){if(1&t&&(r.Qb(0,"mat-divider"),r.Vb(1,"div",0),r.Vb(2,"div",1),r.Vb(3,"div",9),r.Kc(4,"VSI"),r.Ub(),r.Vb(5,"strong"),r.Kc(6),r.Ub(),r.Ub(),r.Qb(7,"mat-divider",3),r.Vb(8,"div",1),r.Vb(9,"div",2),r.Kc(10,"Propri\xe9taire"),r.Ub(),r.Vb(11,"strong"),r.Kc(12),r.Ub(),r.Ub(),r.Ub(),r.Qb(13,"mat-divider"),r.Vb(14,"div",0),r.Vb(15,"div",1),r.Vb(16,"div",2),r.Kc(17,"Providers"),r.Ub(),r.Vb(18,"strong"),r.Kc(19),r.Ub(),r.Ub(),r.Ub()),2&t){const t=r.gc();r.Db(6),r.Mc("",t.aircraft.vsi?t.aircraft.vsi:"?"," "),r.Db(1),r.nc("vertical",!0),r.Db(5),r.Mc("",t.aircraft.registeredOwners||"?"," "),r.Db(7),r.Lc((null==t.aircraft||null==t.aircraft.providers?null:t.aircraft.providers.length)>0?null==t.aircraft?null:t.aircraft.providers.join(", "):"?")}}let XF=(()=>{class t extends LT{constructor(){super(...arguments),this.positionInput=null,this.full=!1,this.extensive=!1,this.position=null}ngOnInit(){this.ensureMandatoryInputParams("aircraft")}ngOnChanges(t){t.positionInput&&(this.position=this.positionInput),t.aircraft&&!this.positionInput&&(this.position=this.aircraft)}}return t.\u0275fac=function(e){return JF(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-aircraft-infos"]],inputs:{aircraft:"aircraft",positionInput:["position","positionInput"],full:"full",extensive:"extensive"},features:[r.Ab,r.Bb],decls:33,vars:10,consts:[[1,"aircraft-infos__row"],[1,"aircraft-infos__info-cell"],[1,"aircraft-infos__info-label"],[3,"vertical"],[3,"ngIf"],[1,"d-flex-center"],[3,"ngIf","ngIfElse"],["unknown",""],[1,"aircraft-infos__course-icon",3,"ngStyle"],["title","Vertical Speed Indicator",1,"aircraft-infos__info-label"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"div",2),r.Kc(3,"ICAO"),r.Ub(),r.Vb(4,"strong"),r.Kc(5),r.Ub(),r.Ub(),r.Qb(6,"mat-divider",3),r.Vb(7,"div",1),r.Vb(8,"div",2),r.Kc(9,"Callsign"),r.Ub(),r.Vb(10,"strong"),r.Kc(11),r.Ub(),r.Ub(),r.Qb(12,"mat-divider",3),r.Vb(13,"div",1),r.Vb(14,"div",2),r.Kc(15,"Registration"),r.Ub(),r.Vb(16,"strong"),r.Kc(17),r.Ub(),r.Ub(),r.Ub(),r.Ic(18,YF,22,8,"ng-template",4),r.Qb(19,"mat-divider"),r.Vb(20,"div",0),r.Vb(21,"div",1),r.Vb(22,"div",2),r.Kc(23,"Altitude"),r.Ub(),r.Vb(24,"strong"),r.Kc(25),r.Ub(),r.Ub(),r.Qb(26,"mat-divider",3),r.Vb(27,"div",1),r.Vb(28,"div",2),r.Kc(29,"Position"),r.Ub(),r.Vb(30,"strong"),r.Kc(31),r.Ub(),r.Ub(),r.Ub(),r.Ic(32,QF,20,4,"ng-template",4)),2&t&&(r.Db(5),r.Lc(e.aircraft.icao),r.Db(1),r.nc("vertical",!0),r.Db(5),r.Lc(e.aircraft.callsign||"?"),r.Db(1),r.nc("vertical",!0),r.Db(5),r.Lc(e.aircraft.registration||"?"),r.Db(1),r.nc("ngIf",e.full||e.extensive),r.Db(7),r.Lc(e.position.altitude?e.position.altitude+" ft":"?"),r.Db(1),r.nc("vertical",!0),r.Db(5),r.Lc(e.position.hdms),r.Db(1),r.nc("ngIf",e.full))},directives:[GT,ut,Yp,bt],styles:['.aircraft-infos[_ngcontent-%COMP%]{background-color:#e7ecf0;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2);border-radius:2px}.aircraft-infos[_ngcontent-%COMP%]:after{content:" ";position:absolute;top:100%;left:50%;margin-left:-12px;border:12px solid transparent;border-top-color:#cdd1d4}.aircraft-infos__header[_ngcontent-%COMP%]{background-color:#cdd1d4;display:flex}.aircraft-infos__link[_ngcontent-%COMP%]{flex:1;padding:0;line-height:inherit;text-align:inherit;font-size:inherit;font-weight:inherit}.aircraft-infos__link[_ngcontent-%COMP%] .mat-button-wrapper{display:flex}.aircraft-infos__flag[_ngcontent-%COMP%]{margin:5px}.aircraft-infos__title[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:5px 0;flex:1}.aircraft-infos__name[_ngcontent-%COMP%]{font-size:1.2em}.aircraft-infos__type[_ngcontent-%COMP%]{font-size:.9em;color:#555}.aircraft-infos__row[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;font-size:.9em}.aircraft-infos__info-cell[_ngcontent-%COMP%]{padding:.4em;text-align:center}.aircraft-infos__info-label[_ngcontent-%COMP%]{color:grey;font-weight:500;padding-bottom:.2em}.aircraft-infos__course-icon[_ngcontent-%COMP%]{line-height:.7em;height:.7em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.aircraft-infos__footer[_ngcontent-%COMP%]{background-color:#cdd1d4;padding-left:.4em;display:flex;align-items:center;font-size:.85em;line-height:36px}.aircraft-infos__signal-label[_ngcontent-%COMP%]{font-weight:500;color:#595959}'],changeDetection:0}),t})();const JF=r.Xb(XF);function tL(t,e){1&t&&r.Qb(0,"div",3)}function eL(t,e){if(1&t&&(r.Vb(0,"a",20),r.Vb(1,"img",21),r.cc("load",function(t){return t.target.style.display="block"})("error",function(t){return t.target.remove()}),r.Ub(),r.Ub()),2&t){const t=r.gc(2);r.nc("href",t.aircraft.photoLink,r.Dc),r.Db(1),r.nc("src",t.aircraft.photoURL,r.Dc)}}function iL(t,e){if(1&t&&(r.Vb(0,"a",22),r.Qb(1,"img",23),r.Ub()),2&t){const t=r.gc(2);r.pc("href","https://www.flightradar24.com/",t.aircraft.callsign,"",r.Dc)}}function nL(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",4),r.Vb(1,"div",5),r.Qb(2,"app-flag",6),r.Vb(3,"div",7),r.Vb(4,"div",8),r.Kc(5),r.Ub(),r.Vb(6,"small",9),r.Kc(7),r.Ub(),r.Ub(),r.Ub(),r.Vb(8,"div",10),r.Kc(9,"R\xe9ception : "),r.Vb(10,"span",11),r.hc(11,"timeago"),r.Kc(12),r.hc(13,"date"),r.Ub(),r.Ub(),r.Ub(),r.Ic(14,eL,2,2,"a",12),r.hc(15,"async"),r.Vb(16,"div",5),r.Vb(17,"button",13),r.cc("click",function(){return r.Ac(t),r.gc().locateAircraft()})("dblclick",function(){return r.Ac(t),r.gc().locateAndZoomToAircraft()}),r.Vb(18,"mat-icon"),r.Kc(19,"center_focus_strong"),r.Ub(),r.Ub(),r.Vb(20,"a",14),r.Qb(21,"img",15),r.Ub(),r.Ic(22,iL,2,1,"a",16),r.Vb(23,"button",17),r.cc("click",function(){return r.Ac(t),r.gc().mapConfigService.toggleTrailsLayer()}),r.Vb(24,"mat-icon",18),r.Kc(25,"gesture"),r.Ub(),r.Ub(),r.Ub(),r.Qb(26,"mat-divider"),r.Qb(27,"app-aircraft-infos",19)}if(2&t){const t=r.gc();r.Db(2),r.nc("flag",t.aircraft.country.flag),r.Db(3),r.Lc(t.aircraft.callsign||"?"),r.Db(2),r.Lc(t.aircraft.type||"?"),r.Db(3),r.oc("title",r.ic(11,13,1e3*t.aircraft.timestamp)),r.Db(2),r.Lc(r.kc(13,15,1e3*t.aircraft.timestamp,"yyyy-MM-dd HH:mm:ss z",t.mapConfigService.useUTCDates$.value&&"z")),r.Db(2),r.nc("ngIf",r.ic(15,19,t.aircraft.photoURL&&t.mapConfigService.showMarineTrafficPhotos$)),r.Db(6),r.pc("href","https://globe.adsbexchange.com/?icao=",t.aircraft.icao,"",r.Dc),r.Db(2),r.nc("ngIf",t.aircraft.callsign),r.Db(1),r.Hb("button-active",t.mapConfigService.showTrailsLayer$.value),r.pc("title","",t.mapConfigService.showTrailsLayer$.value?"Masquer":"Afficher"," la trace de l'a\xe9ronef"),r.Db(4),r.nc("aircraft",t.aircraft)("full",!0)}}let rL=(()=>{class t extends LT{constructor(t,e,i,n,r,s,o,a,l,c,h){super(),this.activatedRoute=t,this.changeDetectorRef=e,this.titleService=i,this.router=n,this.dialog=r,this.configService=s,this.interactionsService=o,this.mapService=a,this.mapConfigService=l,this.selectionService=c,this.uiService=h,this.loading=!1,this.aircraft=null}ngOnInit(){this.subscriptions.push(this.selectionService.openEntity$.pipe(Gg(1),He(t=>t.type===OP.Aircraft&&t.id===this.icao)).subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){if(t.error)return this.loading=!1,this.uiService.error(`L'a\xe9ronef ${this.icao} est inconnu. Il a pu atterrir ou son signal n'est plus capt\xe9 depuis plus de 5 minutes.`),this.mapService.hasBooted?yield this.router.navigateByUrl(`/${this.mapService.view$.value.toURL()}`):yield this.router.navigateByUrl("/"),void this.changeDetectorRef.markForCheck();if(!t.entity)return;this.loading=!1;const e=t.entity;this.mapService.hasBooted||this.mapService.locate([e.lon,e.lat]),this.titleService.setTitle(`A\xe9ronef ${e.callsign||"?"} / ${e.icao} - ANAIS`),this.aircraft=e,this.changeDetectorRef.markForCheck()})),this.activatedRoute.paramMap.subscribe(t=>{this.loading=!0,this.icao=t.get("icao"),this.selectionService.openEntity(OP.Aircraft,this.icao),this.changeDetectorRef.markForCheck()}))}ngOnDestroy(){super.ngOnDestroy(),this.selectionService.closeOpenEntity()}locateAircraft(){this.mapService.centerOnLonLat([this.aircraft.lon,this.aircraft.lat])}locateAndZoomToAircraft(){this.mapService.locate([this.aircraft.lon,this.aircraft.lat])}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(N_),r.Pb(r.h),r.Pb(he),r.Pb(sw),r.Pb(Gl),r.Pb(cI),r.Pb(ET),r.Pb(pI),r.Pb(hI),r.Pb(xT),r.Pb(VI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-aircraft-details-panel"]],features:[r.Ab],decls:3,vars:2,consts:[[1,"panel","aircraft-details-panel"],["class","loader",4,"ngIf"],[3,"ngIf"],[1,"loader"],[1,"panel__header","d-flex-column"],[1,"d-flex"],[1,"ma-1",3,"flag"],[1,"ma-1","u-flex"],[1,"aircraft-details-panel__name"],[1,"aircraft-details-panel__type"],[1,"aircraft-details-panel__reception"],[3,"title"],["target","_blank","rel","noopener","referrerpolicy","no-referrer","title","Voir la photo",3,"href",4,"ngIf"],["mat-button","","title","Centrer la vue sur l'a\xe9ronef",1,"aircraft-details-panel__action",3,"click","dblclick"],["mat-button","","title","Ouvrir la page ADSB Exchange","target","_blank","rel","noopener","referrerpolicy","no-referrer",1,"aircraft-details-panel__action",3,"href"],["src","/assets/images/adsbexchange-icon.png","width","20","alt","ADSB Exchange"],["mat-button","","class","aircraft-details-panel__action","title","Ouvrir la page Flightradar24","target","_blank","rel","noopener","referrerpolicy","no-referrer",3,"href",4,"ngIf"],["mat-button","",1,"aircraft-details-panel__action",3,"title","click"],["color",""],[1,"aircraft-details-panel__infos",3,"aircraft","full"],["target","_blank","rel","noopener","referrerpolicy","no-referrer","title","Voir la photo",3,"href"],["referrerpolicy","no-referrer",1,"d-block",2,"display","none",3,"src","load","error"],["mat-button","","title","Ouvrir la page Flightradar24","target","_blank","rel","noopener","referrerpolicy","no-referrer",1,"aircraft-details-panel__action",3,"href"],["src","/assets/images/flightradar24-icon.png","width","20","alt","Flightradar24"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Ic(1,tL,1,0,"div",1),r.Ic(2,nL,28,21,"ng-template",2),r.Ub()),2&t&&(r.Db(1),r.nc("ngIf",e.loading),r.Db(1),r.nc("ngIf",!e.loading&&e.aircraft))},directives:[ut,GF,Dl,Yp,Il,GT,XF],pipes:[Tx,kt,St],styles:[".aircraft-details-panel[_ngcontent-%COMP%]{max-width:310px}.aircraft-details-panel__name[_ngcontent-%COMP%]{font-size:1.4em;font-weight:500}.aircraft-details-panel__type[_ngcontent-%COMP%]{font-size:.9em;color:#432e2e}.aircraft-details-panel__reception[_ngcontent-%COMP%]{font-size:14px;padding-left:.5em;padding-right:.5em;padding-bottom:.5em}.aircraft-details-panel__action[_ngcontent-%COMP%]{flex:1;min-width:inherit}.aircraft-details-panel__infos[_ngcontent-%COMP%]{font-size:.9em}.aircraft-details-panel__section[_ngcontent-%COMP%]{margin-top:.4em}.aircraft-details-panel__section--nopadding[_ngcontent-%COMP%] .mat-expansion-panel-body[_ngcontent-%COMP%]{padding:0}.aircraft-details-panel__section-row[_ngcontent-%COMP%]{display:flex}.aircraft-details-panel__subheader[_ngcontent-%COMP%]{background-color:#abb8cb}.aircraft-details-panel__subheader[_ngcontent-%COMP%]:focus, .aircraft-details-panel__subheader[_ngcontent-%COMP%]:hover{background-color:#bbc5d5!important}.aircraft-details-panel__label[_ngcontent-%COMP%]{font-weight:300}"],changeDetection:0}),t})(),sL=(()=>{class t{constructor(t,e,i){this.drawingService=t,this.zonesLayerService=e,this.zonesService=i,this.editedZone$=new Av.a(null),this.tooManyHexagons$=new Av.a(!1),this.editedZone$.subscribe(t=>{this.tooManyHexagons$.next(t&&t.h3indexes.length>130)})}clear(){this.editedZone$.next(null)}startEditing(t){this.editedZone$.next(t),this.zonesLayerService.clear(),this.drawingSubscription=this.drawingService.editZone(t.h3indexes).subscribe(t=>{this.updateZoneH3Indexes(t),this.zonesLayerService.updateZones([{name:"",h3indexes:this.editedZone$.value.h3indexes}])})}updateZoneName(t){this.editedZone$.value.name=t,this.editedZone$.next(this.editedZone$.value)}updateZoneH3Indexes(t){this.editedZone$.value.h3indexes=t,this.editedZone$.next(this.editedZone$.value)}saveEditedZone(){return Object(ue.a)(this,void 0,void 0,function*(){const t=this.editedZone$.value;if(!t.name||0===t.h3indexes.length)throw new Error("La zone est incompl\xe8te");if(t.h3indexes.length>130)throw new Error(`La zone contient trop d'hexagones : ${t.h3indexes.length} / 130 maximum`);return t.id?yield this.zonesService.updateZone(t):t.id=yield this.zonesService.createZone(t),this.cancelEditing(),t})}cancelEditing(){this.drawingSubscription&&this.drawingSubscription.unsubscribe(),this.editedZone$.next(null),this.drawingService.stopEditingZone()}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(TP),r.Zb(DT),r.Zb(kP))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),oL=(()=>{class t{validate(t){return(t=>{var e;const i=t.get("aisInterruption"),n=t.get("transhipment"),r=t.get("erraticRoute"),s=t.get("speed"),o=t.get("passageInZone"),a=t.get("spoofing"),l=t.get("zone");if(!(i&&n&&r&&s&&o&&a))return null;const c=[i,n,r,s,o,a];if(c.some(t=>!t.value))return null;const h={};return c.every(t=>!t.value.enable)&&(h.missingCriterion=!0),(null===(e=l.value)||void 0===e?void 0:e.zones.length)>0||(h.missingZone=!0),h})(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","appAlertRule",""]],features:[r.Cb([{provide:hc,useExisting:t,multi:!0}])]}),t})();const aL=["*"],lL=new r.s("MatChipRemove"),cL=new r.s("MatChipAvatar"),hL=new r.s("MatChipTrailingIcon");class uL{constructor(t){this._elementRef=t}}const dL=Ia(Ea(Da(uL),"primary"),-1);let pL=(()=>{class t extends dL{constructor(t,e,i,n,s,o,a,l){super(t),this._elementRef=t,this._ngZone=e,this._changeDetectorRef=s,this._hasFocus=!1,this.chipListSelectable=!0,this._chipListMultiple=!1,this._chipListDisabled=!1,this._selected=!1,this._selectable=!0,this._disabled=!1,this._removable=!0,this._onFocus=new _e.a,this._onBlur=new _e.a,this.selectionChange=new r.o,this.destroyed=new r.o,this.removed=new r.o,this._addHostClassName(),this._chipRippleTarget=o.createElement("div"),this._chipRippleTarget.classList.add("mat-chip-ripple"),this._elementRef.nativeElement.appendChild(this._chipRippleTarget),this._chipRipple=new tl(this,e,this._chipRippleTarget,i),this._chipRipple.setupTriggerEvents(t),this.rippleConfig=n||{},this._animationsDisabled="NoopAnimations"===a,this.tabIndex=null!=l&&parseInt(l)||-1}get rippleDisabled(){return this.disabled||this.disableRipple||this._animationsDisabled||!!this.rippleConfig.disabled}get selected(){return this._selected}set selected(t){const e=ti(t);e!==this._selected&&(this._selected=e,this._dispatchSelectionChange())}get value(){return void 0!==this._value?this._value:this._elementRef.nativeElement.textContent}set value(t){this._value=t}get selectable(){return this._selectable&&this.chipListSelectable}set selectable(t){this._selectable=ti(t)}get disabled(){return this._chipListDisabled||this._disabled}set disabled(t){this._disabled=ti(t)}get removable(){return this._removable}set removable(t){this._removable=ti(t)}get ariaSelected(){return this.selectable&&(this._chipListMultiple||this.selected)?this.selected.toString():null}_addHostClassName(){const t=this._elementRef.nativeElement;t.hasAttribute("mat-basic-chip")||"mat-basic-chip"===t.tagName.toLowerCase()?t.classList.add("mat-basic-chip"):t.classList.add("mat-standard-chip")}ngOnDestroy(){this.destroyed.emit({chip:this}),this._chipRipple._removeTriggerEvents()}select(){this._selected||(this._selected=!0,this._dispatchSelectionChange(),this._changeDetectorRef.markForCheck())}deselect(){this._selected&&(this._selected=!1,this._dispatchSelectionChange(),this._changeDetectorRef.markForCheck())}selectViaInteraction(){this._selected||(this._selected=!0,this._dispatchSelectionChange(!0),this._changeDetectorRef.markForCheck())}toggleSelected(t=!1){return this._selected=!this.selected,this._dispatchSelectionChange(t),this._changeDetectorRef.markForCheck(),this.selected}focus(){this._hasFocus||(this._elementRef.nativeElement.focus(),this._onFocus.next({chip:this})),this._hasFocus=!0}remove(){this.removable&&this.removed.emit({chip:this})}_handleClick(t){this.disabled?t.preventDefault():t.stopPropagation()}_handleKeydown(t){if(!this.disabled)switch(t.keyCode){case 46:case 8:this.remove(),t.preventDefault();break;case 32:this.selectable&&this.toggleSelected(!0),t.preventDefault()}}_blur(){this._ngZone.onStable.pipe(Qe(1)).subscribe(()=>{this._ngZone.run(()=>{this._hasFocus=!1,this._onBlur.next({chip:this})})})}_dispatchSelectionChange(t=!1){this.selectionChange.emit({source:this,isUserInput:t,selected:this._selected})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.B),r.Pb(ci),r.Pb(el,8),r.Pb(r.h),r.Pb(a),r.Pb(pa,8),r.ac("tabindex"))},t.\u0275dir=r.Kb({type:t,selectors:[["mat-basic-chip"],["","mat-basic-chip",""],["mat-chip"],["","mat-chip",""]],contentQueries:function(t,e,i){if(1&t&&(r.Ib(i,cL,1),r.Ib(i,hL,1),r.Ib(i,lL,1)),2&t){let t;r.vc(t=r.dc())&&(e.avatar=t.first),r.vc(t=r.dc())&&(e.trailingIcon=t.first),r.vc(t=r.dc())&&(e.removeIcon=t.first)}},hostAttrs:["role","option",1,"mat-chip","mat-focus-indicator"],hostVars:14,hostBindings:function(t,e){1&t&&r.cc("click",function(t){return e._handleClick(t)})("keydown",function(t){return e._handleKeydown(t)})("focus",function(){return e.focus()})("blur",function(){return e._blur()}),2&t&&(r.Eb("tabindex",e.disabled?null:e.tabIndex)("disabled",e.disabled||null)("aria-disabled",e.disabled.toString())("aria-selected",e.ariaSelected),r.Hb("mat-chip-selected",e.selected)("mat-chip-with-avatar",e.avatar)("mat-chip-with-trailing-icon",e.trailingIcon||e.removeIcon)("mat-chip-disabled",e.disabled)("_mat-animation-noopable",e._animationsDisabled))},inputs:{color:"color",disableRipple:"disableRipple",tabIndex:"tabIndex",selected:"selected",value:"value",selectable:"selectable",disabled:"disabled",removable:"removable"},outputs:{selectionChange:"selectionChange",destroyed:"destroyed",removed:"removed"},exportAs:["matChip"],features:[r.Ab]}),t})(),fL=(()=>{class t{constructor(t,e){this._parentChip=t,"BUTTON"===e.nativeElement.nodeName&&e.nativeElement.setAttribute("type","button")}_handleClick(t){const e=this._parentChip;e.removable&&!e.disabled&&e.remove(),t.stopPropagation()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(pL),r.Pb(r.l))},t.\u0275dir=r.Kb({type:t,selectors:[["","matChipRemove",""]],hostAttrs:[1,"mat-chip-remove","mat-chip-trailing-icon"],hostBindings:function(t,e){1&t&&r.cc("click",function(t){return e._handleClick(t)})},features:[r.Cb([{provide:lL,useExisting:t}])]}),t})();const mL=new r.s("mat-chips-default-options");class gL{constructor(t,e,i,n){this._defaultErrorStateMatcher=t,this._parentForm=e,this._parentFormGroup=i,this.ngControl=n}}const AL=Pa(gL);let bL=0;class vL{constructor(t,e){this.source=t,this.value=e}}let _L=(()=>{class t extends AL{constructor(t,e,i,n,s,o,a){super(o,n,s,a),this._elementRef=t,this._changeDetectorRef=e,this._dir=i,this.ngControl=a,this.controlType="mat-chip-list",this._lastDestroyedChipIndex=null,this._destroyed=new _e.a,this._uid="mat-chip-list-"+bL++,this._tabIndex=0,this._userTabIndex=null,this._onTouched=()=>{},this._onChange=()=>{},this._multiple=!1,this._compareWith=(t,e)=>t===e,this._required=!1,this._disabled=!1,this.ariaOrientation="horizontal",this._selectable=!0,this.change=new r.o,this.valueChange=new r.o,this.ngControl&&(this.ngControl.valueAccessor=this)}get selected(){return this.multiple?this._selectionModel.selected:this._selectionModel.selected[0]}get role(){return this.empty?null:"listbox"}get multiple(){return this._multiple}set multiple(t){this._multiple=ti(t),this._syncChipsState()}get compareWith(){return this._compareWith}set compareWith(t){this._compareWith=t,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(t){this.writeValue(t),this._value=t}get id(){return this._chipInput?this._chipInput.id:this._uid}get required(){return this._required}set required(t){this._required=ti(t),this.stateChanges.next()}get placeholder(){return this._chipInput?this._chipInput.placeholder:this._placeholder}set placeholder(t){this._placeholder=t,this.stateChanges.next()}get focused(){return this._chipInput&&this._chipInput.focused||this._hasFocusedChip()}get empty(){return(!this._chipInput||this._chipInput.empty)&&(!this.chips||0===this.chips.length)}get shouldLabelFloat(){return!this.empty||this.focused}get disabled(){return this.ngControl?!!this.ngControl.disabled:this._disabled}set disabled(t){this._disabled=ti(t),this._syncChipsState()}get selectable(){return this._selectable}set selectable(t){this._selectable=ti(t),this.chips&&this.chips.forEach(t=>t.chipListSelectable=this._selectable)}set tabIndex(t){this._userTabIndex=t,this._tabIndex=t}get chipSelectionChanges(){return Object(or.a)(...this.chips.map(t=>t.selectionChange))}get chipFocusChanges(){return Object(or.a)(...this.chips.map(t=>t._onFocus))}get chipBlurChanges(){return Object(or.a)(...this.chips.map(t=>t._onBlur))}get chipRemoveChanges(){return Object(or.a)(...this.chips.map(t=>t.destroyed))}ngAfterContentInit(){this._keyManager=new Ri(this.chips).withWrap().withVerticalOrientation().withHomeAndEnd().withHorizontalOrientation(this._dir?this._dir.value:"ltr"),this._dir&&this._dir.change.pipe(Sn(this._destroyed)).subscribe(t=>this._keyManager.withHorizontalOrientation(t)),this._keyManager.tabOut.pipe(Sn(this._destroyed)).subscribe(()=>{this._allowFocusEscape()}),this.chips.changes.pipe(Pn(null),Sn(this._destroyed)).subscribe(()=>{this.disabled&&Promise.resolve().then(()=>{this._syncChipsState()}),this._resetChips(),this._initializeSelection(),this._updateTabIndex(),this._updateFocusForDestroyedChips(),this.stateChanges.next()})}ngOnInit(){this._selectionModel=new Xn(this.multiple,void 0,!1),this.stateChanges.next()}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==this._disabled&&(this.disabled=!!this.ngControl.disabled))}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete(),this.stateChanges.complete(),this._dropSubscriptions()}registerInput(t){this._chipInput=t,this._elementRef.nativeElement.setAttribute("data-mat-chip-input",t.id)}setDescribedByIds(t){this._ariaDescribedby=t.join(" ")}writeValue(t){this.chips&&this._setSelectionByValue(t,!1)}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t,this.stateChanges.next()}onContainerClick(t){this._originatesFromChip(t)||this.focus()}focus(t){this.disabled||this._chipInput&&this._chipInput.focused||(this.chips.length>0?(this._keyManager.setFirstItemActive(),this.stateChanges.next()):(this._focusInput(t),this.stateChanges.next()))}_focusInput(t){this._chipInput&&this._chipInput.focus(t)}_keydown(t){const e=t.target;8===t.keyCode&&this._isInputEmpty(e)?(this._keyManager.setLastItemActive(),t.preventDefault()):e&&e.classList.contains("mat-chip")&&(this._keyManager.onKeydown(t),this.stateChanges.next())}_updateTabIndex(){this._tabIndex=this._userTabIndex||(0===this.chips.length?-1:0)}_updateFocusForDestroyedChips(){if(null!=this._lastDestroyedChipIndex)if(this.chips.length){const t=Math.min(this._lastDestroyedChipIndex,this.chips.length-1);this._keyManager.setActiveItem(t)}else this.focus();this._lastDestroyedChipIndex=null}_isValidIndex(t){return t>=0&&t<this.chips.length}_isInputEmpty(t){return!(!t||"input"!==t.nodeName.toLowerCase()||t.value)}_setSelectionByValue(t,e=!0){if(this._clearSelection(),this.chips.forEach(t=>t.deselect()),Array.isArray(t))t.forEach(t=>this._selectValue(t,e)),this._sortValues();else{const i=this._selectValue(t,e);i&&e&&this._keyManager.setActiveItem(i)}}_selectValue(t,e=!0){const i=this.chips.find(e=>null!=e.value&&this._compareWith(e.value,t));return i&&(e?i.selectViaInteraction():i.select(),this._selectionModel.select(i)),i}_initializeSelection(){Promise.resolve().then(()=>{(this.ngControl||this._value)&&(this._setSelectionByValue(this.ngControl?this.ngControl.value:this._value,!1),this.stateChanges.next())})}_clearSelection(t){this._selectionModel.clear(),this.chips.forEach(e=>{e!==t&&e.deselect()}),this.stateChanges.next()}_sortValues(){this._multiple&&(this._selectionModel.clear(),this.chips.forEach(t=>{t.selected&&this._selectionModel.select(t)}),this.stateChanges.next())}_propagateChanges(t){let e=null;e=Array.isArray(this.selected)?this.selected.map(t=>t.value):this.selected?this.selected.value:t,this._value=e,this.change.emit(new vL(this,e)),this.valueChange.emit(e),this._onChange(e),this._changeDetectorRef.markForCheck()}_blur(){this._hasFocusedChip()||this._keyManager.setActiveItem(-1),this.disabled||(this._chipInput?setTimeout(()=>{this.focused||this._markAsTouched()}):this._markAsTouched())}_markAsTouched(){this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next()}_allowFocusEscape(){-1!==this._tabIndex&&(this._tabIndex=-1,setTimeout(()=>{this._tabIndex=this._userTabIndex||0,this._changeDetectorRef.markForCheck()}))}_resetChips(){this._dropSubscriptions(),this._listenToChipsFocus(),this._listenToChipsSelection(),this._listenToChipsRemoved()}_dropSubscriptions(){this._chipFocusSubscription&&(this._chipFocusSubscription.unsubscribe(),this._chipFocusSubscription=null),this._chipBlurSubscription&&(this._chipBlurSubscription.unsubscribe(),this._chipBlurSubscription=null),this._chipSelectionSubscription&&(this._chipSelectionSubscription.unsubscribe(),this._chipSelectionSubscription=null),this._chipRemoveSubscription&&(this._chipRemoveSubscription.unsubscribe(),this._chipRemoveSubscription=null)}_listenToChipsSelection(){this._chipSelectionSubscription=this.chipSelectionChanges.subscribe(t=>{t.source.selected?this._selectionModel.select(t.source):this._selectionModel.deselect(t.source),this.multiple||this.chips.forEach(t=>{!this._selectionModel.isSelected(t)&&t.selected&&t.deselect()}),t.isUserInput&&this._propagateChanges()})}_listenToChipsFocus(){this._chipFocusSubscription=this.chipFocusChanges.subscribe(t=>{let e=this.chips.toArray().indexOf(t.chip);this._isValidIndex(e)&&this._keyManager.updateActiveItem(e),this.stateChanges.next()}),this._chipBlurSubscription=this.chipBlurChanges.subscribe(()=>{this._blur(),this.stateChanges.next()})}_listenToChipsRemoved(){this._chipRemoveSubscription=this.chipRemoveChanges.subscribe(t=>{const e=t.chip,i=this.chips.toArray().indexOf(t.chip);this._isValidIndex(i)&&e._hasFocus&&(this._lastDestroyedChipIndex=i)})}_originatesFromChip(t){let e=t.target;for(;e&&e!==this._elementRef.nativeElement;){if(e.classList.contains("mat-chip"))return!0;e=e.parentElement}return!1}_hasFocusedChip(){return this.chips&&this.chips.some(t=>t._hasFocus)}_syncChipsState(){this.chips&&this.chips.forEach(t=>{t._chipListDisabled=this._disabled,t._chipListMultiple=this.multiple})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.h),r.Pb(Zn,8),r.Pb(oh,8),r.Pb(_h,8),r.Pb($a),r.Pb(Tc,10))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-chip-list"]],contentQueries:function(t,e,i){if(1&t&&r.Ib(i,pL,1),2&t){let t;r.vc(t=r.dc())&&(e.chips=t)}},hostAttrs:[1,"mat-chip-list"],hostVars:15,hostBindings:function(t,e){1&t&&r.cc("focus",function(){return e.focus()})("blur",function(){return e._blur()})("keydown",function(t){return e._keydown(t)}),2&t&&(r.Yb("id",e._uid),r.Eb("tabindex",e.disabled?null:e._tabIndex)("aria-describedby",e._ariaDescribedby||null)("aria-required",e.role?e.required:null)("aria-disabled",e.disabled.toString())("aria-invalid",e.errorState)("aria-multiselectable",e.multiple)("role",e.role)("aria-orientation",e.ariaOrientation),r.Hb("mat-chip-list-disabled",e.disabled)("mat-chip-list-invalid",e.errorState)("mat-chip-list-required",e.required))},inputs:{ariaOrientation:["aria-orientation","ariaOrientation"],multiple:"multiple",compareWith:"compareWith",value:"value",required:"required",placeholder:"placeholder",disabled:"disabled",selectable:"selectable",tabIndex:"tabIndex",errorStateMatcher:"errorStateMatcher"},outputs:{change:"change",valueChange:"valueChange"},exportAs:["matChipList"],features:[r.Cb([{provide:su,useExisting:t}]),r.Ab],ngContentSelectors:aL,decls:2,vars:0,consts:[[1,"mat-chip-list-wrapper"]],template:function(t,e){1&t&&(r.mc(),r.Vb(0,"div",0),r.lc(1),r.Ub())},styles:['.mat-chip{position:relative;box-sizing:border-box;-webkit-tap-highlight-color:transparent;transform:translateZ(0);border:none;-webkit-appearance:none;-moz-appearance:none}.mat-standard-chip{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);display:inline-flex;padding:7px 12px;border-radius:16px;align-items:center;cursor:default;min-height:32px;height:1px}._mat-animation-noopable.mat-standard-chip{transition:none;animation:none}.mat-standard-chip .mat-chip-remove.mat-icon{width:18px;height:18px}.mat-standard-chip::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;opacity:0;content:"";pointer-events:none;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-standard-chip:hover::after{opacity:.12}.mat-standard-chip:focus{outline:none}.mat-standard-chip:focus::after{opacity:.16}.cdk-high-contrast-active .mat-standard-chip{outline:solid 1px}.cdk-high-contrast-active .mat-standard-chip:focus{outline:dotted 2px}.mat-standard-chip.mat-chip-disabled::after{opacity:0}.mat-standard-chip.mat-chip-disabled .mat-chip-remove,.mat-standard-chip.mat-chip-disabled .mat-chip-trailing-icon{cursor:default}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar,.mat-standard-chip.mat-chip-with-avatar{padding-top:0;padding-bottom:0}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-right:8px;padding-left:0}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-left:8px;padding-right:0}.mat-standard-chip.mat-chip-with-trailing-icon{padding-top:7px;padding-bottom:7px;padding-right:8px;padding-left:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon{padding-left:8px;padding-right:12px}.mat-standard-chip.mat-chip-with-avatar{padding-left:0;padding-right:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-avatar{padding-right:0;padding-left:12px}.mat-standard-chip .mat-chip-avatar{width:24px;height:24px;margin-right:8px;margin-left:4px}[dir=rtl] .mat-standard-chip .mat-chip-avatar{margin-left:8px;margin-right:4px}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{width:18px;height:18px;cursor:pointer}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-standard-chip .mat-chip-remove,[dir=rtl] .mat-standard-chip .mat-chip-trailing-icon{margin-right:8px;margin-left:0}.mat-chip-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit;overflow:hidden}.mat-chip-list-wrapper{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;margin:-4px}.mat-chip-list-wrapper input.mat-input-element,.mat-chip-list-wrapper .mat-standard-chip{margin:4px}.mat-chip-list-stacked .mat-chip-list-wrapper{flex-direction:column;align-items:flex-start}.mat-chip-list-stacked .mat-chip-list-wrapper .mat-standard-chip{width:100%}.mat-chip-avatar{border-radius:50%;justify-content:center;align-items:center;display:flex;overflow:hidden;object-fit:cover}input.mat-chip-input{width:150px;margin:4px;flex:1 0 150px}\n'],encapsulation:2,changeDetection:0}),t})();const yL={separatorKeyCodes:[13]};let wL=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[$a,{provide:mL,useValue:yL}],imports:[[Sa]]}),t})(),xL=(()=>{class t{constructor(){this.glitters=[];try{this.glitters=JSON.parse(localStorage.getItem("anais-seen-glitters"))||[]}catch($nt){}}viewItem(t){this.glitters.includes(t)||(this.glitters.push(t),localStorage.setItem("anais-seen-glitters",JSON.stringify(this.glitters)))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function CL(t,e){if(1&t&&r.Qb(0,"div",1),2&t){const t=e.$implicit;r.Fc("left",t.x)("top",t.y),r.nc("ngClass","glitter__star glitter__star--delay-"+t.delay)}}const SL=["*"],kL=[200,800,1400,2e3,2600],EL=new Date((new Date).setMonth((new Date).getMonth()-2));let DL=(()=>{class t{constructor(t,e,i){this.changeDetectorRef=t,this.elementRef=e,this.glitterService=i,this.stars=[],this.active=!1,this.clickListener=()=>{this.stopGlitter()}}ngOnInit(){this.changeDetectorRef.detach(),this.active=!this.glitterService.glitters.includes(this.gid)&&(!this.date||new Date(this.date)>EL),this.elementRef.nativeElement.addEventListener("click",this.clickListener,!0),this.changeDetectorRef.detectChanges()}ngOnDestroy(){this.elementRef.nativeElement.removeEventListener("click",this.clickListener,!0)}ngAfterViewInit(){if(!this.active)return;let t;if(this.width&&this.height)t={clientWidth:this.width,clientHeight:this.height};else{if(t=this.elementRef.nativeElement.children[0],!t)throw new Error(`Missing child element for glitter ${this.gid}`);for(;0===t.clientHeight||0===t.clientWidth;)if(t=t.children[0],!t)return}const e=.05*t.clientWidth;this.minX=e,this.maxX=t.clientWidth-16-e;const i=.05*t.clientHeight;this.minY=i,this.maxY=t.clientHeight-16-i,kL.forEach(t=>{setTimeout(()=>{this.createStar(t),this.changeDetectorRef.detectChanges()},t)})}createStar(t){this.stars.push({x:`${this.minX+Math.random()*(this.maxX-this.minX)}px`,y:`${this.minY+Math.random()*(this.maxY-this.minY)}px`,delay:t})}stopGlitter(){this.active&&(this.glitterService.viewItem(this.gid),this.stars=[],this.changeDetectorRef.detectChanges())}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(r.l),r.Pb(xL))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-glitter"]],inputs:{gid:"gid",date:"date",width:"width",height:"height"},ngContentSelectors:SL,decls:2,vars:1,consts:[[3,"ngClass","left","top",4,"ngFor","ngForOf"],[3,"ngClass"]],template:function(t,e){1&t&&(r.mc(),r.lc(0),r.Ic(1,CL,1,5,"div",0)),2&t&&(r.Db(1),r.nc("ngForOf",e.stars))},directives:[ct,at],styles:['[_nghost-%COMP%]{position:relative;display:block;line-height:0}.glitter__star[_ngcontent-%COMP%]{content:" ";position:absolute;background-image:url(glitter-star.76372dc0eb5e11c5d423.png);background-position:50%;height:16px;width:16px;-webkit-animation:glitter 3s linear infinite;animation:glitter 3s linear infinite;opacity:0;z-index:1;pointer-events:none;touch-action:none}.glitter__star--delay-200[_ngcontent-%COMP%]{-webkit-animation-delay:.2s;animation-delay:.2s}.glitter__star--delay-800[_ngcontent-%COMP%]{-webkit-animation-delay:.8s;animation-delay:.8s}.glitter__star--delay-1400[_ngcontent-%COMP%]{-webkit-animation-delay:1.4s;animation-delay:1.4s}.glitter__star--delay-2000[_ngcontent-%COMP%]{-webkit-animation-delay:2s;animation-delay:2s}.glitter__star--delay-2600[_ngcontent-%COMP%]{-webkit-animation-delay:2.6s;animation-delay:2.6s}@-webkit-keyframes glitter{0%{transform:scale(.3) rotate(0deg);opacity:0}25%{transform:scale(1) rotate(180deg);opacity:1}50%{transform:scale(.3) rotate(1turn);opacity:0}to{transform:scale(.3) rotate(0deg);opacity:0}}@keyframes glitter{0%{transform:scale(.3) rotate(0deg);opacity:0}25%{transform:scale(1) rotate(180deg);opacity:1}50%{transform:scale(.3) rotate(1turn);opacity:0}to{transform:scale(.3) rotate(0deg);opacity:0}}']}),t})();const IL=["thumbContainer"],PL=["toggleBar"],OL=["input"],ML=function(){return{enterDuration:150}},TL=["*"],RL=new r.s("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:!1})});let VL=0;const FL={provide:rc,useExisting:Object(r.W)(()=>NL),multi:!0};class LL{constructor(t,e){this.source=t,this.checked=e}}class UL{constructor(t){this._elementRef=t}}const BL=Ia(Ea(Da(ka(UL)),"accent"));let NL=(()=>{class t extends BL{constructor(t,e,i,n,s,o){super(t),this._focusMonitor=e,this._changeDetectorRef=i,this.defaults=s,this._animationMode=o,this._onChange=t=>{},this._onTouched=()=>{},this._uniqueId="mat-slide-toggle-"+ ++VL,this._required=!1,this._checked=!1,this.name=null,this.id=this._uniqueId,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.change=new r.o,this.toggleChange=new r.o,this.tabIndex=parseInt(n)||0}get required(){return this._required}set required(t){this._required=ti(t)}get checked(){return this._checked}set checked(t){this._checked=ti(t),this._changeDetectorRef.markForCheck()}get inputId(){return`${this.id||this._uniqueId}-input`}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{"keyboard"===t||"program"===t?this._inputElement.nativeElement.focus():t||Promise.resolve().then(()=>this._onTouched())})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}_onChangeEvent(t){t.stopPropagation(),this.toggleChange.emit(),this.defaults.disableToggleValue?this._inputElement.nativeElement.checked=this.checked:(this.checked=this._inputElement.nativeElement.checked,this._emitChangeEvent())}_onInputClick(t){t.stopPropagation()}writeValue(t){this.checked=!!t}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t,this._changeDetectorRef.markForCheck()}focus(t,e){e?this._focusMonitor.focusVia(this._inputElement,e,t):this._inputElement.nativeElement.focus(t)}toggle(){this.checked=!this.checked,this._onChange(this.checked)}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(new LL(this,this.checked))}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(qi),r.Pb(r.h),r.ac("tabindex"),r.Pb(RL),r.Pb(pa,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-slide-toggle"]],viewQuery:function(t,e){if(1&t&&(r.Pc(IL,1),r.Pc(PL,1),r.Pc(OL,1)),2&t){let t;r.vc(t=r.dc())&&(e._thumbEl=t.first),r.vc(t=r.dc())&&(e._thumbBarEl=t.first),r.vc(t=r.dc())&&(e._inputElement=t.first)}},hostAttrs:[1,"mat-slide-toggle"],hostVars:12,hostBindings:function(t,e){2&t&&(r.Yb("id",e.id),r.Eb("tabindex",e.disabled?null:-1)("aria-label",null)("aria-labelledby",null),r.Hb("mat-checked",e.checked)("mat-disabled",e.disabled)("mat-slide-toggle-label-before","before"==e.labelPosition)("_mat-animation-noopable","NoopAnimations"===e._animationMode))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex",name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],required:"required",checked:"checked"},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],features:[r.Cb([FL]),r.Ab],ngContentSelectors:TL,decls:16,vars:18,consts:[[1,"mat-slide-toggle-label"],["label",""],[1,"mat-slide-toggle-bar"],["toggleBar",""],["type","checkbox","role","switch",1,"mat-slide-toggle-input","cdk-visually-hidden",3,"id","required","tabIndex","checked","disabled","change","click"],["input",""],[1,"mat-slide-toggle-thumb-container"],["thumbContainer",""],[1,"mat-slide-toggle-thumb"],["mat-ripple","",1,"mat-slide-toggle-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered","matRippleRadius","matRippleAnimation"],[1,"mat-ripple-element","mat-slide-toggle-persistent-ripple"],[1,"mat-slide-toggle-content",3,"cdkObserveContent"],["labelContent",""],[2,"display","none"]],template:function(t,e){if(1&t&&(r.mc(),r.Vb(0,"label",0,1),r.Vb(2,"div",2,3),r.Vb(4,"input",4,5),r.cc("change",function(t){return e._onChangeEvent(t)})("click",function(t){return e._onInputClick(t)}),r.Ub(),r.Vb(6,"div",6,7),r.Qb(8,"div",8),r.Vb(9,"div",9),r.Qb(10,"div",10),r.Ub(),r.Ub(),r.Ub(),r.Vb(11,"span",11,12),r.cc("cdkObserveContent",function(){return e._onLabelTextChange()}),r.Vb(13,"span",13),r.Kc(14,"\xa0"),r.Ub(),r.lc(15),r.Ub(),r.Ub()),2&t){const t=r.wc(1),i=r.wc(12);r.Eb("for",e.inputId),r.Db(2),r.Hb("mat-slide-toggle-bar-no-side-margin",!i.textContent||!i.textContent.trim()),r.Db(2),r.nc("id",e.inputId)("required",e.required)("tabIndex",e.tabIndex)("checked",e.checked)("disabled",e.disabled),r.Eb("name",e.name)("aria-checked",e.checked.toString())("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby),r.Db(5),r.nc("matRippleTrigger",t)("matRippleDisabled",e.disableRipple||e.disabled)("matRippleCentered",!0)("matRippleRadius",20)("matRippleAnimation",r.rc(17,ML))}},directives:[il,xi],styles:[".mat-slide-toggle{display:inline-block;height:24px;max-width:100%;line-height:24px;white-space:nowrap;outline:none;-webkit-tap-highlight-color:transparent}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(16px, 0, 0)}[dir=rtl] .mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(-16px, 0, 0)}.mat-slide-toggle.mat-disabled{opacity:.38}.mat-slide-toggle.mat-disabled .mat-slide-toggle-label,.mat-slide-toggle.mat-disabled .mat-slide-toggle-thumb-container{cursor:default}.mat-slide-toggle-label{display:flex;flex:1;flex-direction:row;align-items:center;height:inherit;cursor:pointer}.mat-slide-toggle-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-slide-toggle-label-before .mat-slide-toggle-label{order:1}.mat-slide-toggle-label-before .mat-slide-toggle-bar{order:2}[dir=rtl] .mat-slide-toggle-label-before .mat-slide-toggle-bar,.mat-slide-toggle-bar{margin-right:8px;margin-left:0}[dir=rtl] .mat-slide-toggle-bar,.mat-slide-toggle-label-before .mat-slide-toggle-bar{margin-left:8px;margin-right:0}.mat-slide-toggle-bar-no-side-margin{margin-left:0;margin-right:0}.mat-slide-toggle-thumb-container{position:absolute;z-index:1;width:20px;height:20px;top:-3px;left:0;transform:translate3d(0, 0, 0);transition:all 80ms linear;transition-property:transform}._mat-animation-noopable .mat-slide-toggle-thumb-container{transition:none}[dir=rtl] .mat-slide-toggle-thumb-container{left:auto;right:0}.mat-slide-toggle-thumb{height:20px;width:20px;border-radius:50%}.mat-slide-toggle-bar{position:relative;width:36px;height:14px;flex-shrink:0;border-radius:8px}.mat-slide-toggle-input{bottom:0;left:10px}[dir=rtl] .mat-slide-toggle-input{left:auto;right:10px}.mat-slide-toggle-bar,.mat-slide-toggle-thumb{transition:all 80ms linear;transition-property:background-color;transition-delay:50ms}._mat-animation-noopable .mat-slide-toggle-bar,._mat-animation-noopable .mat-slide-toggle-thumb{transition:none}.mat-slide-toggle .mat-slide-toggle-ripple{position:absolute;top:calc(50% - 20px);left:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-slide-toggle .mat-slide-toggle-ripple .mat-ripple-element:not(.mat-slide-toggle-persistent-ripple){opacity:.12}.mat-slide-toggle-persistent-ripple{width:100%;height:100%;transform:none}.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:.04}.mat-slide-toggle:not(.mat-disabled).cdk-keyboard-focused .mat-slide-toggle-persistent-ripple{opacity:.12}.mat-slide-toggle-persistent-ripple,.mat-slide-toggle.mat-disabled .mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:0}@media(hover: none){.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{display:none}}.cdk-high-contrast-active .mat-slide-toggle-thumb,.cdk-high-contrast-active .mat-slide-toggle-bar{border:1px solid}.cdk-high-contrast-active .mat-slide-toggle.cdk-keyboard-focused .mat-slide-toggle-bar{outline:2px dotted;outline-offset:5px}\n"],encapsulation:2,changeDetection:0}),t})(),jL=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({}),t})(),zL=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[jL,nl,Sa,Ci],jL,Sa]}),t})();const HL=["mat-menu-item",""],KL=["*"];function $L(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",0),r.cc("keydown",function(e){return r.Ac(t),r.gc()._handleKeydown(e)})("click",function(){return r.Ac(t),r.gc().closed.emit("click")})("@transformMenu.start",function(e){return r.Ac(t),r.gc()._onAnimationStart(e)})("@transformMenu.done",function(e){return r.Ac(t),r.gc()._onAnimationDone(e)}),r.Vb(1,"div",1),r.lc(2),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.nc("id",t.panelId)("ngClass",t._classList)("@transformMenu",t._panelAnimationState),r.Eb("aria-label",t.ariaLabel||null)("aria-labelledby",t.ariaLabelledby||null)("aria-describedby",t.ariaDescribedby||null)}}const GL={transformMenu:$r("transformMenu",[qr("void",Zr({opacity:0,transform:"scale(0.8)"})),Qr("void => enter",Gr("120ms cubic-bezier(0, 0, 0.2, 1)",Zr({opacity:1,transform:"scale(1)"}))),Qr("* => void",Gr("100ms 25ms linear",Zr({opacity:0})))]),fadeInItems:$r("fadeInItems",[qr("showing",Zr({opacity:1})),Qr("void => *",[Zr({opacity:0}),Gr("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},WL=new r.s("MatMenuContent"),ZL=new r.s("MAT_MENU_PANEL");class qL{}const YL=Da(ka(qL));let QL=(()=>{class t extends YL{constructor(t,e,i,n){super(),this._elementRef=t,this._focusMonitor=i,this._parentMenu=n,this.role="menuitem",this._hovered=new _e.a,this._focused=new _e.a,this._highlighted=!1,this._triggersSubmenu=!1,n&&n.addItem&&n.addItem(this)}focus(t,e){this._focusMonitor&&t?this._focusMonitor.focusVia(this._getHostElement(),t,e):this._getHostElement().focus(e),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){var t,e;const i=this._elementRef.nativeElement.cloneNode(!0),n=i.querySelectorAll("mat-icon, .material-icons");for(let r=0;r<n.length;r++){const e=n[r];null===(t=e.parentNode)||void 0===t||t.removeChild(e)}return(null===(e=i.textContent)||void 0===e?void 0:e.trim())||""}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(a),r.Pb(qi),r.Pb(ZL,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["","mat-menu-item",""]],hostAttrs:[1,"mat-focus-indicator"],hostVars:10,hostBindings:function(t,e){1&t&&r.cc("click",function(t){return e._checkDisabled(t)})("mouseenter",function(){return e._handleMouseEnter()}),2&t&&(r.Eb("role",e.role)("tabindex",e._getTabIndex())("aria-disabled",e.disabled.toString())("disabled",e.disabled||null),r.Hb("mat-menu-item",!0)("mat-menu-item-highlighted",e._highlighted)("mat-menu-item-submenu-trigger",e._triggersSubmenu))},inputs:{disabled:"disabled",disableRipple:"disableRipple",role:"role"},exportAs:["matMenuItem"],features:[r.Ab],attrs:HL,ngContentSelectors:KL,decls:2,vars:2,consts:[["matRipple","",1,"mat-menu-ripple",3,"matRippleDisabled","matRippleTrigger"]],template:function(t,e){1&t&&(r.mc(),r.lc(0),r.Qb(1,"div",0)),2&t&&(r.Db(1),r.nc("matRippleDisabled",e.disableRipple||e.disabled)("matRippleTrigger",e._getHostElement()))},directives:[il],encapsulation:2,changeDetection:0}),t})();const XL=new r.s("mat-menu-default-options",{providedIn:"root",factory:function(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});let JL=0,tU=(()=>{class t{constructor(t,e,i){this._elementRef=t,this._ngZone=e,this._defaultOptions=i,this._xPosition=this._defaultOptions.xPosition,this._yPosition=this._defaultOptions.yPosition,this._directDescendantItems=new r.F,this._tabSubscription=ye.a.EMPTY,this._classList={},this._panelAnimationState="void",this._animationDone=new _e.a,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new r.o,this.close=this.closed,this.panelId="mat-menu-panel-"+JL++}get xPosition(){return this._xPosition}set xPosition(t){this._xPosition=t,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(t){this._yPosition=t,this.setPositionClasses()}get overlapTrigger(){return this._overlapTrigger}set overlapTrigger(t){this._overlapTrigger=ti(t)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(t){this._hasBackdrop=ti(t)}set panelClass(t){const e=this._previousPanelClass;e&&e.length&&e.split(" ").forEach(t=>{this._classList[t]=!1}),this._previousPanelClass=t,t&&t.length&&(t.split(" ").forEach(t=>{this._classList[t]=!0}),this._elementRef.nativeElement.className="")}get classList(){return this.panelClass}set classList(t){this.panelClass=t}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new Ri(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._tabSubscription=this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Pn(this._directDescendantItems),Mn(t=>Object(or.a)(...t.map(t=>t._focused)))).subscribe(t=>this._keyManager.updateActiveItem(t))}ngOnDestroy(){this._directDescendantItems.destroy(),this._tabSubscription.unsubscribe(),this.closed.complete()}_hovered(){return this._directDescendantItems.changes.pipe(Pn(this._directDescendantItems),Mn(t=>Object(or.a)(...t.map(t=>t._hovered))))}addItem(t){}removeItem(t){}_handleKeydown(t){const e=t.keyCode,i=this._keyManager;switch(e){case 27:ke(t)||(t.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&"ltr"===this.direction&&this.closed.emit("keydown");break;case 39:this.parentMenu&&"rtl"===this.direction&&this.closed.emit("keydown");break;default:38!==e&&40!==e||i.setFocusOrigin("keyboard"),i.onKeydown(t)}}focusFirstItem(t="program"){this.lazyContent?this._ngZone.onStable.pipe(Qe(1)).subscribe(()=>this._focusFirstItem(t)):this._focusFirstItem(t)}_focusFirstItem(t){const e=this._keyManager;if(e.setFocusOrigin(t).setFirstItemActive(),!e.activeItem&&this._directDescendantItems.length){let t=this._directDescendantItems.first._getHostElement().parentElement;for(;t;){if("menu"===t.getAttribute("role")){t.focus();break}t=t.parentElement}}}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(t){const e=`mat-elevation-z${Math.min(4+t,24)}`,i=Object.keys(this._classList).find(t=>t.startsWith("mat-elevation-z"));i&&i!==this._previousElevation||(this._previousElevation&&(this._classList[this._previousElevation]=!1),this._classList[e]=!0,this._previousElevation=e)}setPositionClasses(t=this.xPosition,e=this.yPosition){const i=this._classList;i["mat-menu-before"]="before"===t,i["mat-menu-after"]="after"===t,i["mat-menu-above"]="above"===e,i["mat-menu-below"]="below"===e}_startAnimation(){this._panelAnimationState="enter"}_resetAnimation(){this._panelAnimationState="void"}_onAnimationDone(t){this._animationDone.next(t),this._isAnimating=!1}_onAnimationStart(t){this._isAnimating=!0,"enter"===t.toState&&0===this._keyManager.activeItemIndex&&(t.element.scrollTop=0)}_updateDirectDescendants(){this._allItems.changes.pipe(Pn(this._allItems)).subscribe(t=>{this._directDescendantItems.reset(t.filter(t=>t._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.B),r.Pb(XL))},t.\u0275dir=r.Kb({type:t,contentQueries:function(t,e,i){if(1&t&&(r.Ib(i,WL,1),r.Ib(i,QL,1),r.Ib(i,QL,0)),2&t){let t;r.vc(t=r.dc())&&(e.lazyContent=t.first),r.vc(t=r.dc())&&(e._allItems=t),r.vc(t=r.dc())&&(e.items=t)}},viewQuery:function(t,e){if(1&t&&r.Pc(r.O,1),2&t){let t;r.vc(t=r.dc())&&(e.templateRef=t.first)}},inputs:{backdropClass:"backdropClass",xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:"overlapTrigger",hasBackdrop:"hasBackdrop",panelClass:["class","panelClass"],classList:"classList",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"]},outputs:{closed:"closed",close:"close"}}),t})(),eU=(()=>{class t extends tU{constructor(t,e,i){super(t,e,i)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.B),r.Pb(XL))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-menu"]],hostVars:3,hostBindings:function(t,e){2&t&&r.Eb("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},exportAs:["matMenu"],features:[r.Cb([{provide:ZL,useExisting:t}]),r.Ab],ngContentSelectors:KL,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-menu-panel",3,"id","ngClass","keydown","click"],[1,"mat-menu-content"]],template:function(t,e){1&t&&(r.mc(),r.Ic(0,$L,3,6,"ng-template"))},directives:[at],styles:['mat-menu{display:none}.mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:4px;outline:0;min-height:64px}.mat-menu-panel.ng-animating{pointer-events:none}.cdk-high-contrast-active .mat-menu-panel{outline:solid 1px}.mat-menu-content:not(:empty){padding-top:8px;padding-bottom:8px}.mat-menu-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative}.mat-menu-item::-moz-focus-inner{border:0}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px;vertical-align:middle}.mat-menu-item .mat-icon svg{vertical-align:top}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}.mat-menu-item[disabled]{pointer-events:none}.cdk-high-contrast-active .mat-menu-item{margin-top:1px}.cdk-high-contrast-active .mat-menu-item.cdk-program-focused,.cdk-high-contrast-active .mat-menu-item.cdk-keyboard-focused,.cdk-high-contrast-active .mat-menu-item-highlighted{outline:dotted 1px}.mat-menu-item-submenu-trigger{padding-right:32px}.mat-menu-item-submenu-trigger::after{width:0;height:0;border-style:solid;border-width:5px 0 5px 5px;border-color:transparent transparent transparent currentColor;content:"";display:inline-block;position:absolute;top:50%;right:16px;transform:translateY(-50%)}[dir=rtl] .mat-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}[dir=rtl] .mat-menu-item-submenu-trigger::after{right:auto;left:16px;transform:rotateY(180deg) translateY(-50%)}button.mat-menu-item{width:100%}.mat-menu-item .mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}\n'],encapsulation:2,data:{animation:[GL.transformMenu,GL.fadeInItems]},changeDetection:0}),t})();const iU=new r.s("mat-menu-scroll-strategy"),nU={provide:iU,deps:[Fr],useFactory:function(t){return()=>t.scrollStrategies.reposition()}},rU=Ai({passive:!0});let sU=(()=>{class t{constructor(t,e,i,n,s,o,a,l){this._overlay=t,this._element=e,this._viewContainerRef=i,this._menuItemInstance=o,this._dir=a,this._focusMonitor=l,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=ye.a.EMPTY,this._hoverSubscription=ye.a.EMPTY,this._menuCloseSubscription=ye.a.EMPTY,this._handleTouchStart=t=>{Gi(t)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new r.o,this.onMenuOpen=this.menuOpened,this.menuClosed=new r.o,this.onMenuClose=this.menuClosed,this._scrollStrategy=n,this._parentMaterialMenu=s instanceof tU?s:void 0,e.nativeElement.addEventListener("touchstart",this._handleTouchStart,rU),o&&(o._triggersSubmenu=this.triggersSubmenu())}get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(t){this.menu=t}get menu(){return this._menu}set menu(t){t!==this._menu&&(this._menu=t,this._menuCloseSubscription.unsubscribe(),t&&(this._menuCloseSubscription=t.close.subscribe(t=>{this._destroyMenu(t),"click"!==t&&"tab"!==t||!this._parentMaterialMenu||this._parentMaterialMenu.closed.emit(t)})))}ngAfterContentInit(){this._checkMenu(),this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,rU),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}triggersSubmenu(){return!(!this._menuItemInstance||!this._parentMaterialMenu)}toggleMenu(){return this._menuOpen?this.closeMenu():this.openMenu()}openMenu(){if(this._menuOpen)return;this._checkMenu();const t=this._createOverlay(),e=t.getConfig();this._setPosition(e.positionStrategy),e.hasBackdrop=null==this.menu.hasBackdrop?!this.triggersSubmenu():this.menu.hasBackdrop,t.attach(this._getPortal()),this.menu.lazyContent&&this.menu.lazyContent.attach(this.menuData),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this.closeMenu()),this._initMenu(),this.menu instanceof tU&&this.menu._startAnimation()}closeMenu(){this.menu.close.emit()}focus(t,e){this._focusMonitor&&t?this._focusMonitor.focusVia(this._element,t,e):this._element.nativeElement.focus(e)}_destroyMenu(t){if(!this._overlayRef||!this.menuOpen)return;const e=this.menu;this._closingActionsSubscription.unsubscribe(),this._overlayRef.detach(),!this.restoreFocus||"keydown"!==t&&this._openedBy&&this.triggersSubmenu()||this.focus(this._openedBy),this._openedBy=void 0,e instanceof tU?(e._resetAnimation(),e.lazyContent?e._animationDone.pipe(He(t=>"void"===t.toState),Qe(1),Sn(e.lazyContent._attached)).subscribe({next:()=>e.lazyContent.detach(),complete:()=>this._setIsMenuOpen(!1)}):this._setIsMenuOpen(!1)):(this._setIsMenuOpen(!1),e.lazyContent&&e.lazyContent.detach())}_initMenu(){this.menu.parentMenu=this.triggersSubmenu()?this._parentMaterialMenu:void 0,this.menu.direction=this.dir,this._setMenuElevation(),this.menu.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0)}_setMenuElevation(){if(this.menu.setElevation){let t=0,e=this.menu.parentMenu;for(;e;)t++,e=e.parentMenu;this.menu.setElevation(t)}}_setIsMenuOpen(t){this._menuOpen=t,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&(this._menuItemInstance._highlighted=t)}_checkMenu(){}_createOverlay(){if(!this._overlayRef){const t=this._getOverlayConfig();this._subscribeToPositions(t.positionStrategy),this._overlayRef=this._overlay.create(t),this._overlayRef.keydownEvents().subscribe()}return this._overlayRef}_getOverlayConfig(){return new br({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:this.menu.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:this.menu.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir})}_subscribeToPositions(t){this.menu.setPositionClasses&&t.positionChanges.subscribe(t=>{this.menu.setPositionClasses("start"===t.connectionPair.overlayX?"after":"before","top"===t.connectionPair.overlayY?"below":"above")})}_setPosition(t){let[e,i]="before"===this.menu.xPosition?["end","start"]:["start","end"],[n,r]="above"===this.menu.yPosition?["bottom","top"]:["top","bottom"],[s,o]=[n,r],[a,l]=[e,i],c=0;this.triggersSubmenu()?(l=e="before"===this.menu.xPosition?"start":"end",i=a="end"===e?"start":"end",c="bottom"===n?8:-8):this.menu.overlapTrigger||(s="top"===n?"bottom":"top",o="top"===r?"bottom":"top"),t.withPositions([{originX:e,originY:s,overlayX:a,overlayY:n,offsetY:c},{originX:i,originY:s,overlayX:l,overlayY:n,offsetY:c},{originX:e,originY:o,overlayX:a,overlayY:r,offsetY:-c},{originX:i,originY:o,overlayX:l,overlayY:r,offsetY:-c}])}_menuClosingActions(){const t=this._overlayRef.backdropClick(),e=this._overlayRef.detachments(),i=this._parentMaterialMenu?this._parentMaterialMenu.closed:Se(),n=this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(He(t=>t!==this._menuItemInstance),He(()=>this._menuOpen)):Se();return Object(or.a)(t,i,n,e)}_handleMousedown(t){$i(t)||(this._openedBy=0===t.button?"mouse":void 0,this.triggersSubmenu()&&t.preventDefault())}_handleKeydown(t){const e=t.keyCode;13!==e&&32!==e||(this._openedBy="keyboard"),this.triggersSubmenu()&&(39===e&&"ltr"===this.dir||37===e&&"rtl"===this.dir)&&(this._openedBy="keyboard",this.openMenu())}_handleClick(t){this.triggersSubmenu()?(t.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){this.triggersSubmenu()&&this._parentMaterialMenu&&(this._hoverSubscription=this._parentMaterialMenu._hovered().pipe(He(t=>t===this._menuItemInstance&&!t.disabled),fI(0,fn)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof tU&&this.menu._isAnimating?this.menu._animationDone.pipe(Qe(1),fI(0,fn),Sn(this._parentMaterialMenu._hovered())).subscribe(()=>this.openMenu()):this.openMenu()}))}_getPortal(){return this._portal&&this._portal.templateRef===this.menu.templateRef||(this._portal=new fe(this.menu.templateRef,this._viewContainerRef)),this._portal}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Fr),r.Pb(r.l),r.Pb(r.S),r.Pb(iU),r.Pb(ZL,8),r.Pb(QL,10),r.Pb(Zn,8),r.Pb(qi))},t.\u0275dir=r.Kb({type:t,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:["aria-haspopup","true",1,"mat-menu-trigger"],hostVars:2,hostBindings:function(t,e){1&t&&r.cc("mousedown",function(t){return e._handleMousedown(t)})("keydown",function(t){return e._handleKeydown(t)})("click",function(t){return e._handleClick(t)}),2&t&&r.Eb("aria-expanded",e.menuOpen||null)("aria-controls",e.menuOpen?e.menu.panelId:null)},inputs:{restoreFocus:["matMenuTriggerRestoreFocus","restoreFocus"],_deprecatedMatMenuTriggerFor:["mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:["matMenuTriggerFor","menu"],menuData:["matMenuTriggerData","menuData"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"]}),t})(),oU=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[nU],imports:[Sa]}),t})(),aU=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[nU],imports:[[Et,Sa,nl,zr,oU],rr,Sa,oU]}),t})(),lU=(()=>{class t extends LT{constructor(t){super(),this.editZoneService=t,this.saveEmitter=new r.o,this.cancelEmitter=new r.o,this.isZoneValid=!1,this.save=()=>Object(ue.a)(this,void 0,void 0,function*(){if(this.isZoneValid){const t=yield this.editZoneService.saveEditedZone();this.saveEmitter.next(t)}})}ngOnInit(){this.editZoneService.startEditing(this.initialZone?OD(this.initialZone):function(t={}){var e,i;return Object.assign(Object.assign({},t),{name:null!==(e=t.name)&&void 0!==e?e:"",h3indexes:null!==(i=t.h3indexes)&&void 0!==i?i:[]})}()),this.subscriptions.push(this.editZoneService.editedZone$.subscribe(t=>{this.zone=t,this.isZoneValid=function(t){return!!t&&t.name&&t.h3indexes.length>0&&t.h3indexes.length<=130}(t)}))}updateZoneName(t){this.editZoneService.updateZoneName(t)}cancel(){this.editZoneService.cancelEditing(),this.cancelEmitter.next()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(sL))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-zone-form"]],inputs:{initialZone:"initialZone"},outputs:{saveEmitter:"save",cancelEmitter:"cancel"},features:[r.Ab],decls:8,vars:3,consts:[[1,"u-flex","ml-2","auto-width"],["matInput","","placeholder","Nom de la zone",3,"ngModel","ngModelChange","keyup.enter"],["mat-button","","title","Enregistrer",3,"app-async-action","disabled"],["mat-button","","title","Annuler",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"mat-form-field",0),r.Vb(1,"input",1),r.cc("ngModelChange",function(t){return e.updateZoneName(t)})("keyup.enter",function(){return e.save()}),r.Ub(),r.Ub(),r.Vb(2,"button",2),r.Vb(3,"mat-icon"),r.Kc(4,"check"),r.Ub(),r.Ub(),r.Vb(5,"button",3),r.cc("click",function(){return e.cancel()}),r.Vb(6,"mat-icon"),r.Kc(7,"cancel"),r.Ub(),r.Ub()),2&t&&(r.Db(1),r.nc("ngModel",e.zone.name),r.Db(1),r.nc("app-async-action",e.save)("disabled",!e.isZoneValid))},directives:[_u,Ou,ac,Vc,uh,Dl,dR,Yp],styles:["[_nghost-%COMP%]{display:flex}"]}),t})();function cU(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-zone-form",2),r.cc("save",function(e){return r.Ac(t),r.gc().updateZone(e)})("cancel",function(){return r.Ac(t),r.gc().hideEditForm()}),r.Ub()}if(2&t){const t=r.gc();r.nc("initialZone",t.zone)}}function hU(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",3),r.cc("click",function(){return r.Ac(t),r.gc().locate()}),r.Kc(1),r.Ub(),r.Vb(2,"button",4),r.cc("click",function(){return r.Ac(t),r.gc().showEditForm()}),r.Vb(3,"mat-icon"),r.Kc(4,"edit"),r.Ub(),r.Ub(),r.Vb(5,"button",5),r.cc("click",function(){return r.Ac(t),r.gc().deleteZone()}),r.Vb(6,"mat-icon"),r.Kc(7,"delete"),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.Db(1),r.Mc(" ",t.zone.name," "),r.Db(1),r.nc("disabled",!t.editable),r.Db(3),r.nc("disabled",!t.editable||!!t.mustDeleteAssociatedAlertRulesErrorMessage)("title",t.mustDeleteAssociatedAlertRulesErrorMessage)}}let uU=(()=>{class t extends LT{constructor(t,e,i,n){super(),this.alertRulesService=t,this.mapService=e,this.uiService=i,this.zonesService=n,this.editable=!1,this.trueDeletion=!1,this.deleteEmitter=new r.o,this.editMode=!1,this.editedZoneSubscription=new ye.a}ngOnInit(){this.ensureMandatoryInputParams("zone");const t=this.alertRulesService.alertRulesNamesByZoneId[this.zone.id]||[];this.mustDeleteAssociatedAlertRulesErrorMessage=this.trueDeletion&&t.length>0?`Cette zone est utilis\xe9e par les r\xe8gles suivantes : ${t.join(", ")}. Veuillez supprimer la zone de ces r\xe8gles avant de pouvoir supprimer cette zone.`:""}locate(){this.mapService.fitOn(wP(this.zone.h3indexes))}showEditForm(){this.editMode=!0,this.locate()}hideEditForm(){this.editMode=!1}updateZone(t){Object.assign(this.zone,t),this.hideEditForm()}deleteZone(){this.trueDeletion?this.uiService.confirm({title:"Suppression",message:"Une fois supprim\xe9e, cette zone ne sera plus accessible et sera supprim\xe9e de toute les r\xe8gles qui l'utilisent. Confirmez-vous la suppression de cette zone ?",action:t=>Object(ue.a)(this,void 0,void 0,function*(){t&&(yield this.zonesService.deleteZone(this.zone.id),this.deleteEmitter.next(null))})}):this.deleteEmitter.next(null)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(DP),r.Pb(pI),r.Pb(VI),r.Pb(kP))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-zone-item"]],inputs:{zone:"zone",editable:"editable",trueDeletion:"trueDeletion"},outputs:{deleteEmitter:"delete"},features:[r.Ab],decls:3,vars:2,consts:[[3,"ngIf","ngIfElse"],["readonly",""],[1,"u-flex",3,"initialZone","save","cancel"],["mat-button","","title","Visualiser la zone",1,"u-flex",3,"click"],["mat-button","","title","\xc9diter la zone",3,"disabled","click"],["mat-button","","title","Supprimer la zone",3,"disabled","title","click"]],template:function(t,e){if(1&t&&(r.Ic(0,cU,1,1,"ng-template",0),r.Ic(1,hU,8,4,"ng-template",null,1,r.Jc)),2&t){const t=r.wc(2);r.nc("ngIf",e.editMode)("ngIfElse",t)}},directives:[ut,lU,Dl,Yp],styles:["[_nghost-%COMP%]{display:flex}"]}),t})();const dU=["*"],pU=[[["","mat-list-avatar",""],["","mat-list-icon",""],["","matListAvatar",""],["","matListIcon",""]],[["","mat-line",""],["","matLine",""]],"*"],fU=["[mat-list-avatar], [mat-list-icon], [matListAvatar], [matListIcon]","[mat-line], [matLine]","*"];class mU{}const gU=ka(Da(mU));class AU{}const bU=Da(AU),vU=new r.s("MatList"),_U=new r.s("MatNavList");let yU=(()=>{class t extends gU{constructor(t){super(),this._elementRef=t,this._stateChanges=new _e.a,"action-list"===this._getListType()&&t.nativeElement.classList.add("mat-action-list")}_getListType(){const t=this._elementRef.nativeElement.nodeName.toLowerCase();return"mat-list"===t?"list":"mat-action-list"===t?"action-list":null}ngOnChanges(){this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-list"],["mat-action-list"]],hostAttrs:[1,"mat-list","mat-list-base"],inputs:{disableRipple:"disableRipple",disabled:"disabled"},exportAs:["matList"],features:[r.Cb([{provide:vU,useExisting:t}]),r.Ab,r.Bb],ngContentSelectors:dU,decls:1,vars:0,template:function(t,e){1&t&&(r.mc(),r.lc(0))},styles:['.mat-subheader{display:flex;box-sizing:border-box;padding:16px;align-items:center}.mat-list-base .mat-subheader{margin:0}.mat-list-base{padding-top:8px;display:block;-webkit-tap-highlight-color:transparent}.mat-list-base .mat-subheader{height:48px;line-height:16px}.mat-list-base .mat-subheader:first-child{margin-top:-8px}.mat-list-base .mat-list-item,.mat-list-base .mat-list-option{display:block;height:48px;-webkit-tap-highlight-color:transparent;width:100%;padding:0}.mat-list-base .mat-list-item .mat-list-item-content,.mat-list-base .mat-list-option .mat-list-item-content{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:0 16px;position:relative;height:inherit}.mat-list-base .mat-list-item .mat-list-item-content-reverse,.mat-list-base .mat-list-option .mat-list-item-content-reverse{display:flex;align-items:center;padding:0 16px;flex-direction:row-reverse;justify-content:space-around}.mat-list-base .mat-list-item .mat-list-item-ripple,.mat-list-base .mat-list-option .mat-list-item-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-list-base .mat-list-item.mat-list-item-with-avatar,.mat-list-base .mat-list-option.mat-list-item-with-avatar{height:56px}.mat-list-base .mat-list-item.mat-2-line,.mat-list-base .mat-list-option.mat-2-line{height:72px}.mat-list-base .mat-list-item.mat-3-line,.mat-list-base .mat-list-option.mat-3-line{height:88px}.mat-list-base .mat-list-item.mat-multi-line,.mat-list-base .mat-list-option.mat-multi-line{height:auto}.mat-list-base .mat-list-item.mat-multi-line .mat-list-item-content,.mat-list-base .mat-list-option.mat-multi-line .mat-list-item-content{padding-top:16px;padding-bottom:16px}.mat-list-base .mat-list-item .mat-list-text,.mat-list-base .mat-list-option .mat-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden;padding:0}.mat-list-base .mat-list-item .mat-list-text>*,.mat-list-base .mat-list-option .mat-list-text>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-list-base .mat-list-item .mat-list-text:empty,.mat-list-base .mat-list-option .mat-list-text:empty{display:none}.mat-list-base .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list-base .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-list-base .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list-base .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:0;padding-left:16px}[dir=rtl] .mat-list-base .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:0}.mat-list-base .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-left:0;padding-right:16px}[dir=rtl] .mat-list-base .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-right:0;padding-left:16px}.mat-list-base .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-list-base .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:16px}.mat-list-base .mat-list-item .mat-list-avatar,.mat-list-base .mat-list-option .mat-list-avatar{flex-shrink:0;width:40px;height:40px;border-radius:50%;object-fit:cover}.mat-list-base .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-list-base .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:72px;width:calc(100% - 72px)}[dir=rtl] .mat-list-base .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-list-base .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:auto;margin-right:72px}.mat-list-base .mat-list-item .mat-list-icon,.mat-list-base .mat-list-option .mat-list-icon{flex-shrink:0;width:24px;height:24px;font-size:24px;box-sizing:content-box;border-radius:50%;padding:4px}.mat-list-base .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-list-base .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:64px;width:calc(100% - 64px)}[dir=rtl] .mat-list-base .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-list-base .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:auto;margin-right:64px}.mat-list-base .mat-list-item .mat-divider,.mat-list-base .mat-list-option .mat-divider{position:absolute;bottom:0;left:0;width:100%;margin:0}[dir=rtl] .mat-list-base .mat-list-item .mat-divider,[dir=rtl] .mat-list-base .mat-list-option .mat-divider{margin-left:auto;margin-right:0}.mat-list-base .mat-list-item .mat-divider.mat-divider-inset,.mat-list-base .mat-list-option .mat-divider.mat-divider-inset{position:absolute}.mat-list-base[dense]{padding-top:4px;display:block}.mat-list-base[dense] .mat-subheader{height:40px;line-height:8px}.mat-list-base[dense] .mat-subheader:first-child{margin-top:-4px}.mat-list-base[dense] .mat-list-item,.mat-list-base[dense] .mat-list-option{display:block;height:40px;-webkit-tap-highlight-color:transparent;width:100%;padding:0}.mat-list-base[dense] .mat-list-item .mat-list-item-content,.mat-list-base[dense] .mat-list-option .mat-list-item-content{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:0 16px;position:relative;height:inherit}.mat-list-base[dense] .mat-list-item .mat-list-item-content-reverse,.mat-list-base[dense] .mat-list-option .mat-list-item-content-reverse{display:flex;align-items:center;padding:0 16px;flex-direction:row-reverse;justify-content:space-around}.mat-list-base[dense] .mat-list-item .mat-list-item-ripple,.mat-list-base[dense] .mat-list-option .mat-list-item-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar{height:48px}.mat-list-base[dense] .mat-list-item.mat-2-line,.mat-list-base[dense] .mat-list-option.mat-2-line{height:60px}.mat-list-base[dense] .mat-list-item.mat-3-line,.mat-list-base[dense] .mat-list-option.mat-3-line{height:76px}.mat-list-base[dense] .mat-list-item.mat-multi-line,.mat-list-base[dense] .mat-list-option.mat-multi-line{height:auto}.mat-list-base[dense] .mat-list-item.mat-multi-line .mat-list-item-content,.mat-list-base[dense] .mat-list-option.mat-multi-line .mat-list-item-content{padding-top:16px;padding-bottom:16px}.mat-list-base[dense] .mat-list-item .mat-list-text,.mat-list-base[dense] .mat-list-option .mat-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden;padding:0}.mat-list-base[dense] .mat-list-item .mat-list-text>*,.mat-list-base[dense] .mat-list-option .mat-list-text>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-list-base[dense] .mat-list-item .mat-list-text:empty,.mat-list-base[dense] .mat-list-option .mat-list-text:empty{display:none}.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list-base[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:0;padding-left:16px}[dir=rtl] .mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:0}.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-left:0;padding-right:16px}[dir=rtl] .mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-right:0;padding-left:16px}.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:16px}.mat-list-base[dense] .mat-list-item .mat-list-avatar,.mat-list-base[dense] .mat-list-option .mat-list-avatar{flex-shrink:0;width:36px;height:36px;border-radius:50%;object-fit:cover}.mat-list-base[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-list-base[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:68px;width:calc(100% - 68px)}[dir=rtl] .mat-list-base[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-list-base[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:auto;margin-right:68px}.mat-list-base[dense] .mat-list-item .mat-list-icon,.mat-list-base[dense] .mat-list-option .mat-list-icon{flex-shrink:0;width:20px;height:20px;font-size:20px;box-sizing:content-box;border-radius:50%;padding:4px}.mat-list-base[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-list-base[dense] .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:60px;width:calc(100% - 60px)}[dir=rtl] .mat-list-base[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-list-base[dense] .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:auto;margin-right:60px}.mat-list-base[dense] .mat-list-item .mat-divider,.mat-list-base[dense] .mat-list-option .mat-divider{position:absolute;bottom:0;left:0;width:100%;margin:0}[dir=rtl] .mat-list-base[dense] .mat-list-item .mat-divider,[dir=rtl] .mat-list-base[dense] .mat-list-option .mat-divider{margin-left:auto;margin-right:0}.mat-list-base[dense] .mat-list-item .mat-divider.mat-divider-inset,.mat-list-base[dense] .mat-list-option .mat-divider.mat-divider-inset{position:absolute}.mat-nav-list a{text-decoration:none;color:inherit}.mat-nav-list .mat-list-item{cursor:pointer;outline:none}mat-action-list button{background:none;color:inherit;border:none;font:inherit;outline:inherit;-webkit-tap-highlight-color:transparent;text-align:left}[dir=rtl] mat-action-list button{text-align:right}mat-action-list button::-moz-focus-inner{border:0}mat-action-list .mat-list-item{cursor:pointer;outline:inherit}.mat-list-option:not(.mat-list-item-disabled){cursor:pointer;outline:none}.mat-list-item-disabled{pointer-events:none}.cdk-high-contrast-active .mat-list-item-disabled{opacity:.5}.cdk-high-contrast-active :host .mat-list-item-disabled{opacity:.5}.cdk-high-contrast-active .mat-selection-list:focus{outline-style:dotted}.cdk-high-contrast-active .mat-list-option:hover,.cdk-high-contrast-active .mat-list-option:focus,.cdk-high-contrast-active .mat-nav-list .mat-list-item:hover,.cdk-high-contrast-active .mat-nav-list .mat-list-item:focus,.cdk-high-contrast-active mat-action-list .mat-list-item:hover,.cdk-high-contrast-active mat-action-list .mat-list-item:focus{outline:dotted 1px}.cdk-high-contrast-active .mat-list-single-selected-option::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}.cdk-high-contrast-active [dir=rtl] .mat-list-single-selected-option::after{right:auto;left:16px}@media(hover: none){.mat-list-option:not(.mat-list-single-selected-option):not(.mat-list-item-disabled):hover,.mat-nav-list .mat-list-item:not(.mat-list-item-disabled):hover,.mat-action-list .mat-list-item:not(.mat-list-item-disabled):hover{background:none}}\n'],encapsulation:2,changeDetection:0}),t})(),wU=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","mat-list-avatar",""],["","matListAvatar",""]],hostAttrs:[1,"mat-list-avatar"]}),t})(),xU=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","mat-list-icon",""],["","matListIcon",""]],hostAttrs:[1,"mat-list-icon"]}),t})(),CU=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","mat-subheader",""],["","matSubheader",""]],hostAttrs:[1,"mat-subheader"]}),t})(),SU=(()=>{class t extends bU{constructor(t,e,i,n){super(),this._element=t,this._isInteractiveList=!1,this._destroyed=new _e.a,this._disabled=!1,this._isInteractiveList=!!(i||n&&"action-list"===n._getListType()),this._list=i||n;const r=this._getHostElement();"button"!==r.nodeName.toLowerCase()||r.hasAttribute("type")||r.setAttribute("type","button"),this._list&&this._list._stateChanges.pipe(Sn(this._destroyed)).subscribe(()=>{e.markForCheck()})}get disabled(){return this._disabled||!(!this._list||!this._list.disabled)}set disabled(t){this._disabled=ti(t)}ngAfterContentInit(){!function(t,e,i="mat"){t.changes.pipe(Pn(t)).subscribe(({length:t})=>{Wa(e,`${i}-2-line`,!1),Wa(e,`${i}-3-line`,!1),Wa(e,`${i}-multi-line`,!1),2===t||3===t?Wa(e,`${i}-${t}-line`,!0):t>3&&Wa(e,`${i}-multi-line`,!0)})}(this._lines,this._element)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_isRippleDisabled(){return!this._isInteractiveList||this.disableRipple||!(!this._list||!this._list.disableRipple)}_getHostElement(){return this._element.nativeElement}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.h),r.Pb(_U,8),r.Pb(vU,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-list-item"],["a","mat-list-item",""],["button","mat-list-item",""]],contentQueries:function(t,e,i){if(1&t&&(r.Ib(i,wU,1),r.Ib(i,xU,1),r.Ib(i,Ga,1)),2&t){let t;r.vc(t=r.dc())&&(e._avatar=t.first),r.vc(t=r.dc())&&(e._icon=t.first),r.vc(t=r.dc())&&(e._lines=t)}},hostAttrs:[1,"mat-list-item","mat-focus-indicator"],hostVars:6,hostBindings:function(t,e){2&t&&r.Hb("mat-list-item-disabled",e.disabled)("mat-list-item-avatar",e._avatar||e._icon)("mat-list-item-with-avatar",e._avatar||e._icon)},inputs:{disableRipple:"disableRipple",disabled:"disabled"},exportAs:["matListItem"],features:[r.Ab],ngContentSelectors:fU,decls:6,vars:2,consts:[[1,"mat-list-item-content"],["mat-ripple","",1,"mat-list-item-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-list-text"]],template:function(t,e){1&t&&(r.mc(pU),r.Vb(0,"div",0),r.Qb(1,"div",1),r.lc(2),r.Vb(3,"div",2),r.lc(4,1),r.Ub(),r.lc(5,2),r.Ub()),2&t&&(r.Db(1),r.nc("matRippleTrigger",e._getHostElement())("matRippleDisabled",e._isRippleDisabled()))},directives:[il],encapsulation:2,changeDetection:0}),t})(),kU=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Za,nl,Sa,sl,Et],Za,Sa,sl,WT]}),t})();function EU(t,e){1&t&&(r.Vb(0,"div",4),r.Kc(1," Ce filtre restreint les alertes \xe0 certaines zones. "),r.Ub())}function DU(t,e){1&t&&(r.Vb(0,"div",13),r.Kc(1," Au moins une zone est n\xe9cessaire pour d\xe9finir la r\xe8gle. "),r.Ub())}function IU(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-zone-item",14),r.cc("delete",function(){r.Ac(t);const i=e.$implicit;return r.gc(2).deleteZone(i)}),r.Ub()}if(2&t){const t=e.$implicit,i=r.gc(2);r.nc("zone",t)("editable",i.zonesEditable)}}function PU(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-zone-form",15),r.cc("save",function(e){return r.Ac(t),r.gc(2).addCreatedZone(e)})("cancel",function(){return r.Ac(t),r.gc(2).hideCreateZoneForm()}),r.Ub()}}function OU(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",16),r.Vb(1,"span"),r.Kc(2,"\xa0Ajouter une zone"),r.Ub(),r.Ub(),r.Vb(3,"button",17),r.cc("click",function(){return r.Ac(t),r.gc(2).displayCreateZoneForm()}),r.Kc(4," Cr\xe9er une zone "),r.Ub()}if(2&t){r.gc();const t=r.wc(6),e=r.gc();r.nc("matMenuTriggerFor",t)("disabled",!e.zonesEditable),r.Db(3),r.nc("disabled",!e.zonesEditable)}}function MU(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",18),r.cc("click",function(){r.Ac(t);const i=e.$implicit;return r.gc(2).addZone(i)}),r.Kc(1),r.Ub()}if(2&t){const t=e.$implicit;r.Db(1),r.Mc(" ",t.name," ")}}function TU(t,e){if(1&t&&(r.Ic(0,DU,2,0,"div",5),r.Ic(1,IU,1,2,"app-zone-item",6),r.Vb(2,"div",7),r.Ic(3,PU,1,0,"app-zone-form",8),r.Ic(4,OU,5,3,"ng-template",9),r.Ub(),r.Vb(5,"mat-menu",10,11),r.Ic(7,MU,2,1,"button",12),r.Ub()),2&t){const t=r.gc();r.nc("ngIf",0===t.criterion.zones.length),r.Db(1),r.nc("ngForOf",t.criterion.zones)("ngForTrackBy",t.trackById),r.Db(2),r.nc("ngIf",t.showCreateZoneForm),r.Db(1),r.nc("ngIf",!t.showCreateZoneForm),r.Db(3),r.nc("ngForOf",t.availableZones)}}function RU(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-list-item"),r.Vb(1,"button",21),r.cc("click",function(){r.Ac(t);const i=e.$implicit;return r.gc(2).viewZone(i)}),r.Kc(2),r.Ub(),r.Ub()}if(2&t){const t=e.$implicit;r.Db(2),r.Mc(" ",t.name," ")}}function VU(t,e){if(1&t&&(r.Vb(0,"mat-list",19),r.Ic(1,RU,3,1,"mat-list-item",20),r.Ub()),2&t){const t=r.gc();r.Db(1),r.nc("ngForOf",t.criterion.zones)("ngForTrackBy",t.trackById)}}let FU=(()=>{class t extends LT{constructor(t,e,i){super(),this.editZoneService=t,this.mapService=e,this.zonesService=i,this.updateZones=new r.o,this.availableZones=[],this.showCreateZoneForm=!1,this.zonesEditable=!0,this.usedZonesIds$=new Av.a([])}ngOnInit(){this.usedZonesIds$.next(this.criterion.zones.map(t=>t.id)),this.subscriptions.push(Hg([this.zonesService.zones$,this.usedZonesIds$]).subscribe(([t,e])=>{this.availableZones=t.filter(t=>!e.includes(t.id))})),this.subscriptions.push(this.usedZonesIds$.pipe(Gg(1)).subscribe(()=>{this.updateZones.next(null)})),this.subscriptions.push(this.editZoneService.editedZone$.pipe(mn(),fI(0)).subscribe(t=>{this.zonesEditable=!t}))}displayCreateZoneForm(){this.showCreateZoneForm=!0}hideCreateZoneForm(){this.showCreateZoneForm=!1}addCreatedZone(t){this.criterion.zones.push(t),this.hideCreateZoneForm(),this.onChange(this.criterion)}viewZone(t){this.mapService.fitOn(wP(t.h3indexes))}deleteZone(t){this.criterion.zones.splice(this.criterion.zones.findIndex(e=>e===t),1),this.usedZonesIds$.next(this.usedZonesIds$.value.filter(e=>e!==t.id)),this.onChange(this.criterion)}addZone(t){this.criterion.zones.push(t),this.usedZonesIds$.next(this.usedZonesIds$.value.concat(t.id)),this.onChange(this.criterion)}trackById(t,e){return e.id}writeValue(t){this.criterion=t}registerOnChange(t){this.onChange=t}registerOnTouched(t){}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(sL),r.Pb(pI),r.Pb(kP))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-zone-filter"]],inputs:{criterion:["ngModel","criterion"],editable:"editable"},outputs:{updateZones:"updateZones"},features:[r.Cb([{provide:rc,useExisting:t,multi:!0}]),r.Ab],decls:5,vars:4,consts:[[1,"alert-rule-criterion"],["class","alert-rule-criterion__description",4,"ngIf"],[3,"ngIf","ngIfElse"],["readonly",""],[1,"alert-rule-criterion__description"],["class","alert-rule-criterion__description error-message",4,"ngIf"],[3,"zone","editable","delete",4,"ngFor","ngForOf","ngForTrackBy"],[1,"criterion-content"],["class","u-flex",3,"save","cancel",4,"ngIf"],[3,"ngIf"],[1,"add-zones-menu"],["addZonesMenu","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],[1,"alert-rule-criterion__description","error-message"],[3,"zone","editable","delete"],[1,"u-flex",3,"save","cancel"],["mat-button","","title","Ajouter une zone existante",3,"matMenuTriggerFor","disabled"],["mat-button","","title","Cr\xe9er une nouvelle zone",3,"disabled","click"],["mat-menu-item","",3,"click"],["dense",""],[4,"ngFor","ngForOf","ngForTrackBy"],["mat-button","","title","Visualiser la zone",1,"u-flex",3,"click"]],template:function(t,e){if(1&t&&(r.Vb(0,"div",0),r.Ic(1,EU,2,0,"div",1),r.Ic(2,TU,8,6,"ng-template",2),r.Ic(3,VU,2,2,"ng-template",null,3,r.Jc),r.Ub()),2&t){const t=r.wc(4);r.Eb("data-test","criterion-zone"),r.Db(1),r.nc("ngIf",e.editable),r.Db(1),r.nc("ngIf",e.editable)("ngIfElse",t)}},directives:[ut,ct,eU,uU,lU,Dl,sU,QL,yU,SU],styles:[".alert-rule-criterion[_ngcontent-%COMP%]{padding:.5em}.alert-rule-criterion__description[_ngcontent-%COMP%]{margin-bottom:.5em;font-size:14px}.add-zones-menu[_ngcontent-%COMP%]{max-height:256px}"]}),t})();const LU={speed:{key:"speed",title:"Vitesse",description:"Ce crit\xe8re d\xe9clenche une alerte si la vitesse du navire est comprise dans un intervalle."},erraticRoute:{key:"erraticRoute",title:"Route erratique",description:"Ce crit\xe8re d\xe9clenche une alerte quand un navire change plusieurs fois de direction dans un intervalle de temps court."},transhipment:{key:"transhipment",title:"Transbordement",description:"Ce crit\xe8re d\xe9clenche une alerte quand deux navires ont des positions tr\xe8s proches et une vitesse r\xe9duite pendant un intervalle de temps prolong\xe9."},aisInterruption:{key:"aisInterruption",title:"Coupure AIS",description:"Ce crit\xe8re d\xe9clenche une alerte si un navire n'\xe9met plus de donn\xe9es AIS pendant un intervalle de temps."},passageInZone:{key:"passageInZone",title:"Passage dans des zones",description:"Ce crit\xe8re d\xe9clenche une alerte si un navire passe dans certaines zones. Si plusieurs zones sont choisies, un navire doit \xeatre pass\xe9 dans toutes les zones pour d\xe9clencher une alerte."},spoofing:{key:"spoofing",title:"Spoofing AIS",description:"Ce crit\xe8re d\xe9clenche une alerte si un navire change de nom ou de MMSI en conservant le m\xeame IMO."},identifier:{key:"identifier",title:"Identifiant",description:"Ce filtre restreint les alertes aux navires dont les identifiants (nom, MMSI, IMO) correspondent \xe0 ceux recherch\xe9s."},fleet:{key:"fleet",title:"Flotte",description:"Ce filtre restreint les alertes aux navires faisant partie des flottes s\xe9lectionn\xe9es."},flag:{key:"flag",title:"Pavillon",description:"Ce filtre restreint les alertes aux navires dont le pavillon correspond \xe0 ceux recherch\xe9s."},type:{key:"type",title:"Type de navire",description:"Ce filtre restreint les alertes aux navires dont le type du navire correspond \xe0 ceux recherch\xe9s."},time:{key:"time",title:"P\xe9riode d'analyse",soon:!0,description:"Ce filtre restreint l'analyse \xe0 une p\xe9riode de temps."},zone:{key:"zone",title:"Zone",description:"Ce filtre restreint les alertes \xe0 certaines zones."}};let UU=(()=>{class t{constructor(){this.editable=!1,this.criteriaLabels=LU}get enable(){var t;return null===(t=this.criterion)||void 0===t?void 0:t.enable}set enable(t){this.criterion.enable=t,this.onChange(this.criterion)}writeValue(t){this.criterion=t}registerOnChange(t){this.onChange=t}registerOnTouched(t){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,inputs:{criterion:["ngModel","criterion"],editable:"editable"}}),t})(),BU=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-chip-coming-soon"]],decls:2,vars:0,consts:[["title","Cette fonctionnalit\xe9 n'est pas encore impl\xe9ment\xe9e mais le sera tr\xe8s bient\xf4t !",1,"chip"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Kc(1,"Bient\xf4t"),r.Ub())},styles:[".chip[_ngcontent-%COMP%] {\n display: inline-block;\n padding: 3px 6px;\n border-radius: 8px;\n font-size: .7em;\n line-height: 1.5em;\n background-color: #55575f;\n color: #ffffff;\n}"],changeDetection:0}),t})();function NU(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-slide-toggle",6),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc().enableChange.next(e)}),r.Ub()}if(2&t){const t=r.gc();r.nc("name",t.type.key)("title",t.enable?"D\xe9sactiver":"Activer")("ngModel",t.enable)("disabled",!t.editable)}}function jU(t,e){1&t&&r.Qb(0,"app-chip-coming-soon")}function zU(t,e){if(1&t&&(r.Vb(0,"div",7),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Mc(" ",t.type.description," ")}}function HU(t,e){1&t&&r.lc(0,0,["*ngIf","enable || enable === undefined"])}const KU=["*"];let $U=(()=>{class t extends LT{constructor(){super(...arguments),this.enableChange=new r.o}}return t.\u0275fac=function(e){return GU(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-alert-rule-criterion"]],inputs:{type:"type",enable:"enable",editable:"editable"},outputs:{enableChange:"enableChange"},features:[r.Ab],ngContentSelectors:KU,decls:8,vars:8,consts:[[1,"alert-rule-criterion"],[1,"alert-rule-criterion__title"],["class","alert-rule-criterion__toggle","color","primary",3,"name","title","ngModel","disabled","ngModelChange",4,"ngIf"],[1,"u-flex"],[4,"ngIf"],["class","alert-rule-criterion__description",4,"ngIf"],["color","primary",1,"alert-rule-criterion__toggle",3,"name","title","ngModel","disabled","ngModelChange"],[1,"alert-rule-criterion__description"]],template:function(t,e){1&t&&(r.mc(),r.Vb(0,"div",0),r.Vb(1,"div",1),r.Kc(2),r.Ic(3,NU,1,4,"mat-slide-toggle",2),r.Qb(4,"div",3),r.Ic(5,jU,1,0,"app-chip-coming-soon",4),r.Ub(),r.Ic(6,zU,2,1,"div",5),r.Ic(7,HU,1,0,"ng-content",4),r.Ub()),2&t&&(r.Hb("alert-rule-criterion--active",e.enable),r.Eb("data-test","criterion-"+e.type.key),r.Db(2),r.Mc(" ",e.type.title," "),r.Db(1),r.nc("ngIf",void 0!==e.enable),r.Db(2),r.nc("ngIf",e.type.soon),r.Db(1),r.nc("ngIf",e.editable),r.Db(1),r.nc("ngIf",e.enable||void 0===e.enable))},directives:[ut,NL,Vc,uh,BU],styles:[".alert-rule-criterion[_ngcontent-%COMP%]{padding:.5em}.alert-rule-criterion--active[_ngcontent-%COMP%]{background-color:#e6e9f7}.alert-rule-criterion__title[_ngcontent-%COMP%]{display:flex;margin:0;padding:.5em;color:#1515a6;font-size:18px}.alert-rule-criterion__toggle[_ngcontent-%COMP%]{margin-left:.5em}.alert-rule-criterion__description[_ngcontent-%COMP%]{margin-bottom:.5em;font-size:14px}"],changeDetection:0}),t})();const GU=r.Xb($U);function WU(t,e){if(1&t){const t=r.Wb();r.Vb(0,"input",9),r.cc("dateChange",function(e){return r.Ac(t),r.gc(2).updateSince(e.value)}),r.Ub(),r.Qb(1,"mat-datepicker",null,10),r.Qb(3,"mat-datepicker-toggle",11)}if(2&t){const t=r.wc(2),e=r.gc(2);r.nc("matDatepicker",t)("min",e.minDate)("max",e.maxDate),r.Db(3),r.nc("for",t)}}function ZU(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-date-range-input",12),r.Vb(1,"input",13),r.cc("dateChange",function(e){return r.Ac(t),r.gc(2).updateSince(e.value)}),r.Ub(),r.Vb(2,"input",14),r.cc("dateChange",function(e){return r.Ac(t),r.gc(2).updateTo(e.value)}),r.Ub(),r.Ub(),r.Qb(3,"mat-date-range-picker",null,10),r.Qb(5,"mat-datepicker-toggle",15)}if(2&t){const t=r.wc(4),e=r.gc(2);r.nc("rangePicker",t)("min",e.minDate)("max",e.maxDate),r.Db(5),r.nc("for",t)}}function qU(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",3),r.Vb(1,"mat-radio-group",4),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc().criterion.type=e})("change",function(){return r.Ac(t),r.gc().resetDates()}),r.Vb(2,"mat-radio-button",5),r.Kc(3,"Temps r\xe9el"),r.Ub(),r.Vb(4,"mat-radio-button",6),r.Kc(5),r.Ub(),r.Vb(6,"mat-radio-button",7),r.Kc(7),r.Ub(),r.Ub(),r.Ic(8,WU,4,4,"ng-template",8),r.Ic(9,ZU,6,4,"ng-template",8),r.Ub()}if(2&t){const t=r.gc();r.Db(1),r.nc("ngModel",t.criterion.type),r.Db(4),r.Mc(" Temps r\xe9el depuis le ","pastAndRealTime"!==t.criterion.type||"pastAndRealTime"===t.criterion.type&&!t.criterion.since?"...":t.criterion.since," "),r.Db(2),r.Mc(" P\xe9riode pass\xe9e du ","past"!==t.criterion.type||"past"===t.criterion.type&&!t.criterion.since&&!t.criterion.to?"... au ...":t.criterion.since+" au "+t.criterion.to," "),r.Db(1),r.nc("ngIf","pastAndRealTime"==t.criterion.type),r.Db(1),r.nc("ngIf","past"===t.criterion.type)}}function YU(t,e){1&t&&r.Kc(0," Temps r\xe9el ")}function QU(t,e){if(1&t&&r.Kc(0),2&t){const t=r.gc(2);r.Mc(" Temps r\xe9el depuis le ",t.criterion.since," ")}}function XU(t,e){if(1&t&&r.Kc(0),2&t){const t=r.gc(2);r.Nc(" P\xe9riode pass\xe9e du ",t.criterion.since," au ",t.criterion.to," ")}}function JU(t,e){if(1&t&&(r.Ic(0,YU,1,0,"ng-template",8),r.Ic(1,QU,1,1,"ng-template",8),r.Ic(2,XU,1,2,"ng-template",8)),2&t){const t=r.gc();r.nc("ngIf","realTime"==t.criterion.type),r.Db(1),r.nc("ngIf","pastAndRealTime"==t.criterion.type),r.Db(1),r.nc("ngIf","past"==t.criterion.type)}}let tB=(()=>{class t extends UU{constructor(){super(...arguments),this.minDate=new Date(2019,4,1),this.maxDate=new Date}updateSince(t){this.criterion.since=t?zO(t):""}updateTo(t){this.criterion.to=t?zO(t):""}resetDates(){this.criterion.since=void 0,this.criterion.to=void 0}}return t.\u0275fac=function(e){return eB(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-time-filter"]],features:[r.Cb([{provide:rc,useExisting:t,multi:!0}]),r.Ab],decls:4,vars:4,consts:[[3,"type","editable"],[3,"ngIf","ngIfElse"],["readonly",""],[1,"d-flex"],["color","primary",1,"d-flex-column","u-flex",3,"ngModel","ngModelChange","change"],["value","realTime",1,"pa-1"],["value","pastAndRealTime",1,"pa-1"],["value","past",1,"pa-1"],[3,"ngIf"],["matInput","",2,"opacity","0","width","0","height","0",3,"matDatepicker","min","max","dateChange"],["picker",""],["title","Choisir une date de d\xe9but",2,"align-self","center",3,"for"],[2,"opacity","0","width","0","height","0",3,"rangePicker","min","max"],["matStartDate","",3,"dateChange"],["matEndDate","",3,"dateChange"],["title","Choisir une p\xe9riode",2,"align-self","center",3,"for"]],template:function(t,e){if(1&t&&(r.Vb(0,"app-alert-rule-criterion",0),r.Ic(1,qU,10,5,"ng-template",1),r.Ic(2,JU,3,3,"ng-template",null,2,r.Jc),r.Ub()),2&t){const t=r.wc(3);r.nc("type",e.criteriaLabels.time)("editable",e.editable),r.Db(1),r.nc("ngIf",e.editable)("ngIfElse",t)}},directives:[$U,ut,sR,Vc,uh,hR,Ou,Ld,Pd,Bd,$d,zd,Hd,Gd],encapsulation:2,changeDetection:0}),t})();const eB=r.Xb(tB);let iB=(()=>{class t extends UU{}return t.\u0275fac=function(e){return nB(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-ais-interruption-criterion"]],features:[r.Cb([{provide:rc,useExisting:t,multi:!0}]),r.Ab],decls:1,vars:3,consts:[[3,"type","enable","editable","enableChange"]],template:function(t,e){1&t&&(r.Vb(0,"app-alert-rule-criterion",0),r.cc("enableChange",function(t){return e.enable=t}),r.Ub()),2&t&&r.nc("type",e.criteriaLabels.aisInterruption)("enable",e.enable)("editable",e.editable)},directives:[$U],encapsulation:2,changeDetection:0}),t})();const nB=r.Xb(iB);let rB=(()=>{class t extends UU{}return t.\u0275fac=function(e){return sB(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-transhipment-criterion"]],features:[r.Cb([{provide:rc,useExisting:t,multi:!0}]),r.Ab],decls:1,vars:3,consts:[[3,"type","enable","editable","enableChange"]],template:function(t,e){1&t&&(r.Vb(0,"app-alert-rule-criterion",0),r.cc("enableChange",function(t){return e.enable=t}),r.Ub()),2&t&&r.nc("type",e.criteriaLabels.transhipment)("enable",e.enable)("editable",e.editable)},directives:[$U],encapsulation:2,changeDetection:0}),t})();const sB=r.Xb(rB);let oB=(()=>{class t extends UU{}return t.\u0275fac=function(e){return aB(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-erratic-route-criterion"]],features:[r.Cb([{provide:rc,useExisting:t,multi:!0}]),r.Ab],decls:1,vars:3,consts:[[3,"type","enable","editable","enableChange"]],template:function(t,e){1&t&&(r.Vb(0,"app-alert-rule-criterion",0),r.cc("enableChange",function(t){return e.enable=t}),r.Ub()),2&t&&r.nc("type",e.criteriaLabels.erraticRoute)("enable",e.enable)("editable",e.editable)},directives:[$U],encapsulation:2,changeDetection:0}),t})();const aB=r.Xb(oB);function lB(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",4),r.Vb(1,"ngx-slider",5),r.cc("valueChange",function(e){return r.Ac(t),r.gc(2).criterion.min=e})("highValueChange",function(e){return r.Ac(t),r.gc(2).criterion.max=e}),r.Ub(),r.Ub()}if(2&t){const t=r.gc(2);r.Db(1),r.nc("value",t.criterion.min)("highValue",t.criterion.max)("options",t.speedSliderOptions)}}function cB(t,e){if(1&t&&r.Kc(0),2&t){const t=r.gc(2);r.Nc(" Vitesse : entre ",t.criterion.min," et ",t.criterion.max," ")}}function hB(t,e){if(1&t&&(r.Ic(0,lB,2,3,"ng-template",2),r.Ic(1,cB,1,2,"ng-template",null,3,r.Jc)),2&t){const t=r.wc(2),e=r.gc();r.nc("ngIf",e.editable)("ngIfElse",t)}}let uB=(()=>{class t extends UU{constructor(){super(...arguments),this.speedSliderOptions={floor:0,ceil:100,animate:!1}}}return t.\u0275fac=function(e){return dB(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-speed-criterion"]],features:[r.Cb([{provide:rc,useExisting:t,multi:!0}]),r.Ab],decls:2,vars:4,consts:[[3,"type","enable","editable","enableChange"],[3,"ngIf"],[3,"ngIf","ngIfElse"],["readonly",""],[1,"criterion-content","app-slider"],["name","speed",3,"value","highValue","options","valueChange","highValueChange"]],template:function(t,e){1&t&&(r.Vb(0,"app-alert-rule-criterion",0),r.cc("enableChange",function(t){return e.enable=t}),r.Ic(1,hB,3,2,"ng-template",1),r.Ub()),2&t&&(r.nc("type",e.criteriaLabels.speed)("enable",e.enable)("editable",e.editable),r.Db(1),r.nc("ngIf",e.criterion.enable))},directives:[$U,ut,pg],encapsulation:2,changeDetection:0}),t})();const dB=r.Xb(uB);function pB(t,e){for(let i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function fB(t,e){const i=e?"":"none";pB(t.style,{touchAction:e?"":"none",webkitUserDrag:e?"":"none",webkitTapHighlightColor:e?"":"transparent",userSelect:i,msUserSelect:i,webkitUserSelect:i,MozUserSelect:i})}function mB(t,e){const i=t.style;i.position=e?"":"fixed",i.top=i.opacity=e?"":"0",i.left=e?"":"-999em"}function gB(t){const e=t.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(t)*e}function AB(t,e){return t.getPropertyValue(e).split(",").map(t=>t.trim())}function bB(t){const e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}}function vB(t,e,i){const{top:n,bottom:r,left:s,right:o}=t;return i>=n&&i<=r&&e>=s&&e<=o}function _B(t,e,i){t.top+=e,t.bottom=t.top+t.height,t.left+=i,t.right=t.left+t.width}function yB(t,e,i,n){const{top:r,right:s,bottom:o,left:a,width:l,height:c}=t,h=l*e,u=c*e;return n>r-u&&n<o+u&&i>a-h&&i<s+h}class wB{constructor(t,e){this._document=t,this._viewportRuler=e,this.positions=new Map}clear(){this.positions.clear()}cache(t){this.clear(),this.positions.set(this._document,{scrollPosition:this._viewportRuler.getViewportScrollPosition()}),t.forEach(t=>{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:bB(t)})})}handleScroll(t){const e=t.target,i=this.positions.get(e);if(!i)return null;const n=e===this._document?e.documentElement:e,r=i.scrollPosition;let s,o;if(e===this._document){const t=this._viewportRuler.getViewportScrollPosition();s=t.top,o=t.left}else s=e.scrollTop,o=e.scrollLeft;const a=r.top-s,l=r.left-o;return this.positions.forEach((t,i)=>{t.clientRect&&e!==i&&n.contains(i)&&_B(t.clientRect,a,l)}),r.top=s,r.left=o,{top:a,left:l}}}function xB(t){const e=t.cloneNode(!0),i=e.querySelectorAll("[id]"),n=t.nodeName.toLowerCase();e.removeAttribute("id");for(let r=0;r<i.length;r++)i[r].removeAttribute("id");return"canvas"===n?EB(t,e):"input"!==n&&"select"!==n&&"textarea"!==n||kB(t,e),CB("canvas",t,e,EB),CB("input, textarea, select",t,e,kB),e}function CB(t,e,i,n){const r=e.querySelectorAll(t);if(r.length){const e=i.querySelectorAll(t);for(let t=0;t<r.length;t++)n(r[t],e[t])}}let SB=0;function kB(t,e){"file"!==e.type&&(e.value=t.value),"radio"===e.type&&e.name&&(e.name=`mat-clone-${e.name}-${SB++}`)}function EB(t,e){const i=e.getContext("2d");if(i)try{i.drawImage(t,0,0)}catch(Knt){}}const DB=Ai({passive:!0}),IB=Ai({passive:!1});class PB{constructor(t,e,i,n,r,s){this._config=e,this._document=i,this._ngZone=n,this._viewportRuler=r,this._dragDropRegistry=s,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._moveEvents=new _e.a,this._pointerMoveSubscription=ye.a.EMPTY,this._pointerUpSubscription=ye.a.EMPTY,this._scrollSubscription=ye.a.EMPTY,this._resizeSubscription=ye.a.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this._disabled=!1,this.beforeStarted=new _e.a,this.started=new _e.a,this.released=new _e.a,this.ended=new _e.a,this.entered=new _e.a,this.exited=new _e.a,this.dropped=new _e.a,this.moved=this._moveEvents,this._pointerDown=t=>{if(this.beforeStarted.next(),this._handles.length){const e=this._handles.find(e=>{const i=t.target;return!!i&&(i===e||e.contains(i))});!e||this._disabledHandles.has(e)||this.disabled||this._initializeDragSequence(e,t)}else this.disabled||this._initializeDragSequence(this._rootElement,t)},this._pointerMove=t=>{const e=this._getPointerPositionOnPage(t);if(!this._hasStartedDragging){if(Math.abs(e.x-this._pickupPositionOnPage.x)+Math.abs(e.y-this._pickupPositionOnPage.y)>=this._config.dragStartThreshold){const e=Date.now()>=this._dragStartTime+this._getDragStartDelay(t),i=this._dropContainer;if(!e)return void this._endDragSequence(t);i&&(i.isDragging()||i.isReceiving())||(t.preventDefault(),this._hasStartedDragging=!0,this._ngZone.run(()=>this._startDragSequence(t)))}return}this._boundaryElement&&(this._previewRect&&(this._previewRect.width||this._previewRect.height)||(this._previewRect=(this._preview||this._rootElement).getBoundingClientRect())),t.preventDefault();const i=this._getConstrainedPointerPosition(e);if(this._hasMoved=!0,this._lastKnownPointerPosition=e,this._updatePointerDirectionDelta(i),this._dropContainer)this._updateActiveDropContainer(i,e);else{const t=this._activeTransform;t.x=i.x-this._pickupPositionOnPage.x+this._passiveTransform.x,t.y=i.y-this._pickupPositionOnPage.y+this._passiveTransform.y,this._applyRootElementTransform(t.x,t.y),"undefined"!=typeof SVGElement&&this._rootElement instanceof SVGElement&&this._rootElement.setAttribute("transform",`translate(${t.x} ${t.y})`)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:i,event:t,distance:this._getDragDistance(i),delta:this._pointerDirectionDelta})})},this._pointerUp=t=>{this._endDragSequence(t)},this.withRootElement(t).withParent(e.parentDragRef||null),this._parentPositions=new wB(i,r),s.registerDragItem(this)}get disabled(){return this._disabled||!(!this._dropContainer||!this._dropContainer.disabled)}set disabled(t){const e=ti(t);e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions(),this._handles.forEach(t=>fB(t,e)))}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(t){this._handles=t.map(t=>si(t)),this._handles.forEach(t=>fB(t,this.disabled)),this._toggleNativeDragInteractions();const e=new Set;return this._disabledHandles.forEach(t=>{this._handles.indexOf(t)>-1&&e.add(t)}),this._disabledHandles=e,this}withPreviewTemplate(t){return this._previewTemplate=t,this}withPlaceholderTemplate(t){return this._placeholderTemplate=t,this}withRootElement(t){const e=si(t);return e!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{e.addEventListener("mousedown",this._pointerDown,IB),e.addEventListener("touchstart",this._pointerDown,DB)}),this._initialTransform=void 0,this._rootElement=e),"undefined"!=typeof SVGElement&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(t){return this._boundaryElement=t?si(t):null,this._resizeSubscription.unsubscribe(),t&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(t){return this._parentDragRef=t,this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&TB(this._rootElement),TB(this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(t){!this._disabledHandles.has(t)&&this._handles.indexOf(t)>-1&&(this._disabledHandles.add(t),fB(t,!0))}enableHandle(t){this._disabledHandles.has(t)&&(this._disabledHandles.delete(t),fB(t,this.disabled))}withDirection(t){return this._direction=t,this}_withDropContainer(t){this._dropContainer=t}getFreeDragPosition(){const t=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:t.x,y:t.y}}setFreeDragPosition(t){return this._activeTransform={x:0,y:0},this._passiveTransform.x=t.x,this._passiveTransform.y=t.y,this._dropContainer||this._applyRootElementTransform(t.x,t.y),this}_sortFromLastPointerPosition(){const t=this._lastKnownPointerPosition;t&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(t),t)}_removeSubscriptions(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe()}_destroyPreview(){this._preview&&TB(this._preview),this._previewRef&&this._previewRef.destroy(),this._preview=this._previewRef=null}_destroyPlaceholder(){this._placeholder&&TB(this._placeholder),this._placeholderRef&&this._placeholderRef.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(t){this._dragDropRegistry.isDragging(this)&&(this._removeSubscriptions(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging&&(this.released.next({source:this}),this._dropContainer?(this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(t),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)})):(this._passiveTransform.x=this._activeTransform.x,this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(this._getPointerPositionOnPage(t))})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this))))}_startDragSequence(t){RB(t)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const e=this._dropContainer;if(e){const t=this._rootElement,i=t.parentNode,n=this._preview=this._createPreviewElement(),r=this._placeholder=this._createPlaceholderElement(),s=this._anchor=this._anchor||this._document.createComment(""),o=this._getShadowRoot();i.insertBefore(s,t),mB(t,!1),this._document.body.appendChild(i.replaceChild(r,t)),function(t,e){return e||t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement||t.body}(this._document,o).appendChild(n),this.started.next({source:this}),e.start(),this._initialContainer=e,this._initialIndex=e.getItemIndex(this)}else this.started.next({source:this}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(e?e.getScrollableParents():[])}_initializeDragSequence(t,e){this._parentDragRef&&e.stopPropagation();const i=this.isDragging(),n=RB(e),r=!n&&0!==e.button,s=this._rootElement,o=!n&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now();if(e.target&&e.target.draggable&&"mousedown"===e.type&&e.preventDefault(),i||r||o)return;this._handles.length&&(this._rootElementTapHighlight=s.style.webkitTapHighlightColor||"",s.style.webkitTapHighlightColor="transparent"),this._hasStartedDragging=this._hasMoved=!1,this._removeSubscriptions(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scroll.subscribe(t=>{this._updateOnScroll(t)}),this._boundaryElement&&(this._boundaryRect=bB(this._boundaryElement));const a=this._previewTemplate;this._pickupPositionInElement=a&&a.template&&!a.matchSize?{x:0,y:0}:this._getPointerPositionInElement(t,e);const l=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:l.x,y:l.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(t){mB(this._rootElement,!0),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._boundaryRect=this._previewRect=void 0,this._ngZone.run(()=>{const e=this._dropContainer,i=e.getItemIndex(this),n=this._getPointerPositionOnPage(t),r=this._getDragDistance(this._getPointerPositionOnPage(t)),s=e._isOverContainer(n.x,n.y);this.ended.next({source:this,distance:r}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:r}),e.drop(this,i,this._initialIndex,this._initialContainer,s,r),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:t,y:e},{x:i,y:n}){let r=this._initialContainer._getSiblingContainerFromPosition(this,t,e);!r&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(t,e)&&(r=this._initialContainer),r&&r!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=r,this._dropContainer.enter(this,t,e,r===this._initialContainer&&r.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:r,currentIndex:r.getItemIndex(this)})}),this._dropContainer._startScrollingIfNecessary(i,n),this._dropContainer._sortItem(this,t,e,this._pointerDirectionDelta),this._preview.style.transform=OB(t-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y)}_createPreviewElement(){const t=this._previewTemplate,e=this.previewClass,i=t?t.template:null;let n;if(i&&t){const e=t.matchSize?this._rootElement.getBoundingClientRect():null,r=t.viewContainer.createEmbeddedView(i,t.context);r.detectChanges(),n=VB(r,this._document),this._previewRef=r,t.matchSize?FB(n,e):n.style.transform=OB(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else{const t=this._rootElement;n=xB(t),FB(n,t.getBoundingClientRect())}return pB(n.style,{pointerEvents:"none",margin:"0",position:"fixed",top:"0",left:"0",zIndex:`${this._config.zIndex||1e3}`}),fB(n,!1),n.classList.add("cdk-drag-preview"),n.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(t=>n.classList.add(t)):n.classList.add(e)),n}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();const t=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._preview.style.transform=OB(t.left,t.top);const e=function(t){const e=getComputedStyle(t),i=AB(e,"transition-property"),n=i.find(t=>"transform"===t||"all"===t);if(!n)return 0;const r=i.indexOf(n),s=AB(e,"transition-duration"),o=AB(e,"transition-delay");return gB(s[r])+gB(o[r])}(this._preview);return 0===e?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(t=>{const i=e=>{(!e||e.target===this._preview&&"transform"===e.propertyName)&&(this._preview.removeEventListener("transitionend",i),t(),clearTimeout(n))},n=setTimeout(i,1.5*e);this._preview.addEventListener("transitionend",i)}))}_createPlaceholderElement(){const t=this._placeholderTemplate,e=t?t.template:null;let i;return e?(this._placeholderRef=t.viewContainer.createEmbeddedView(e,t.context),this._placeholderRef.detectChanges(),i=VB(this._placeholderRef,this._document)):i=xB(this._rootElement),i.classList.add("cdk-drag-placeholder"),i}_getPointerPositionInElement(t,e){const i=this._rootElement.getBoundingClientRect(),n=t===this._rootElement?null:t,r=n?n.getBoundingClientRect():i,s=RB(e)?e.targetTouches[0]:e,o=this._getViewportScrollPosition();return{x:r.left-i.left+(s.pageX-r.left-o.left),y:r.top-i.top+(s.pageY-r.top-o.top)}}_getPointerPositionOnPage(t){const e=this._getViewportScrollPosition(),i=RB(t)?t.touches[0]||t.changedTouches[0]||{pageX:0,pageY:0}:t,n=i.pageX-e.left,r=i.pageY-e.top;if(this._ownerSVGElement){const t=this._ownerSVGElement.getScreenCTM();if(t){const e=this._ownerSVGElement.createSVGPoint();return e.x=n,e.y=r,e.matrixTransform(t.inverse())}}return{x:n,y:r}}_getConstrainedPointerPosition(t){const e=this._dropContainer?this._dropContainer.lockAxis:null;let{x:i,y:n}=this.constrainPosition?this.constrainPosition(t,this):t;if("x"===this.lockAxis||"x"===e?n=this._pickupPositionOnPage.y:"y"!==this.lockAxis&&"y"!==e||(i=this._pickupPositionOnPage.x),this._boundaryRect){const{x:t,y:e}=this._pickupPositionInElement,r=this._boundaryRect,s=this._previewRect,o=r.top+e,a=r.bottom-(s.height-e);i=MB(i,r.left+t,r.right-(s.width-t)),n=MB(n,o,a)}return{x:i,y:n}}_updatePointerDirectionDelta(t){const{x:e,y:i}=t,n=this._pointerDirectionDelta,r=this._pointerPositionAtLastDirectionChange,s=Math.abs(e-r.x),o=Math.abs(i-r.y);return s>this._config.pointerDirectionChangeThreshold&&(n.x=e>r.x?1:-1,r.x=e),o>this._config.pointerDirectionChangeThreshold&&(n.y=i>r.y?1:-1,r.y=i),n}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const t=this._handles.length>0||!this.isDragging();t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,fB(this._rootElement,t))}_removeRootElementListeners(t){t.removeEventListener("mousedown",this._pointerDown,IB),t.removeEventListener("touchstart",this._pointerDown,DB)}_applyRootElementTransform(t,e){const i=OB(t,e);null==this._initialTransform&&(this._initialTransform=this._rootElement.style.transform||""),this._rootElement.style.transform=this._initialTransform?i+" "+this._initialTransform:i}_getDragDistance(t){const e=this._pickupPositionOnPage;return e?{x:t.x-e.x,y:t.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:t,y:e}=this._passiveTransform;if(0===t&&0===e||this.isDragging()||!this._boundaryElement)return;const i=this._boundaryElement.getBoundingClientRect(),n=this._rootElement.getBoundingClientRect();if(0===i.width&&0===i.height||0===n.width&&0===n.height)return;const r=i.left-n.left,s=n.right-i.right,o=i.top-n.top,a=n.bottom-i.bottom;i.width>n.width?(r>0&&(t+=r),s>0&&(t-=s)):t=0,i.height>n.height?(o>0&&(e+=o),a>0&&(e-=a)):e=0,t===this._passiveTransform.x&&e===this._passiveTransform.y||this.setFreeDragPosition({y:e,x:t})}_getDragStartDelay(t){const e=this.dragStartDelay;return"number"==typeof e?e:RB(t)?e.touch:e?e.mouse:0}_updateOnScroll(t){const e=this._parentPositions.handleScroll(t);if(e){const i=t.target;this._boundaryRect&&(i===this._document||i!==this._boundaryElement&&i.contains(this._boundaryElement))&&_B(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){const t=this._parentPositions.positions.get(this._document);return t?t.scrollPosition:this._viewportRuler.getViewportScrollPosition()}_getShadowRoot(){return void 0===this._cachedShadowRoot&&(this._cachedShadowRoot=_i(this._rootElement)),this._cachedShadowRoot}}function OB(t,e){return`translate3d(${Math.round(t)}px, ${Math.round(e)}px, 0)`}function MB(t,e,i){return Math.max(e,Math.min(i,t))}function TB(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function RB(t){return"t"===t.type[0]}function VB(t,e){const i=t.rootNodes;if(1===i.length&&i[0].nodeType===e.ELEMENT_NODE)return i[0];const n=e.createElement("div");return i.forEach(t=>n.appendChild(t)),n}function FB(t,e){t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.transform=OB(e.left,e.top)}function LB(t,e,i){const n=UB(e,t.length-1),r=UB(i,t.length-1);if(n===r)return;const s=t[n],o=r<n?-1:1;for(let a=n;a!==r;a+=o)t[a]=t[a+o];t[r]=s}function UB(t,e){return Math.max(0,Math.min(e,t))}class BB{constructor(t,e,i,n,r){this._dragDropRegistry=e,this._ngZone=n,this._viewportRuler=r,this.disabled=!1,this.sortingDisabled=!1,this.autoScrollDisabled=!1,this.autoScrollStep=2,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.beforeStarted=new _e.a,this.entered=new _e.a,this.exited=new _e.a,this.dropped=new _e.a,this.sorted=new _e.a,this._isDragging=!1,this._itemPositions=[],this._previousSwap={drag:null,delta:0,overlaps:!1},this._draggables=[],this._siblings=[],this._orientation="vertical",this._activeSiblings=new Set,this._direction="ltr",this._viewportScrollSubscription=ye.a.EMPTY,this._verticalScrollDirection=0,this._horizontalScrollDirection=0,this._stopScrollTimers=new _e.a,this._cachedShadowRoot=null,this._startScrollInterval=()=>{this._stopScrolling(),AT(0,on).pipe(Sn(this._stopScrollTimers)).subscribe(()=>{const t=this._scrollNode,e=this.autoScrollStep;1===this._verticalScrollDirection?jB(t,-e):2===this._verticalScrollDirection&&jB(t,e),1===this._horizontalScrollDirection?zB(t,-e):2===this._horizontalScrollDirection&&zB(t,e)})},this.element=si(t),this._document=i,this.withScrollableParents([this.element]),e.registerDropContainer(this),this._parentPositions=new wB(i,r)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(t,e,i,n){let r;this._draggingStarted(),null==n?(r=this.sortingDisabled?this._draggables.indexOf(t):-1,-1===r&&(r=this._getItemIndexFromPointerPosition(t,e,i))):r=n;const s=this._activeDraggables,o=s.indexOf(t),a=t.getPlaceholderElement();let l=s[r];if(l===t&&(l=s[r+1]),o>-1&&s.splice(o,1),l&&!this._dragDropRegistry.isDragging(l)){const e=l.getRootElement();e.parentElement.insertBefore(a,e),s.splice(r,0,t)}else if(this._shouldEnterAsFirstChild(e,i)){const e=s[0].getRootElement();e.parentNode.insertBefore(a,e),s.unshift(t)}else si(this.element).appendChild(a),s.push(t);a.style.transform="",this._cacheItemPositions(),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:t,container:this,currentIndex:this.getItemIndex(t)})}exit(t){this._reset(),this.exited.next({item:t,container:this})}drop(t,e,i,n,r,s){this._reset(),this.dropped.next({item:t,currentIndex:e,previousIndex:i,container:this,previousContainer:n,isPointerOverContainer:r,distance:s})}withItems(t){const e=this._draggables;return this._draggables=t,t.forEach(t=>t._withDropContainer(this)),this.isDragging()&&(e.filter(t=>t.isDragging()).every(e=>-1===t.indexOf(e))?this._reset():this._cacheItems()),this}withDirection(t){return this._direction=t,this}connectedTo(t){return this._siblings=t.slice(),this}withOrientation(t){return this._orientation=t,this}withScrollableParents(t){const e=si(this.element);return this._scrollableElements=-1===t.indexOf(e)?[e,...t]:t.slice(),this}getScrollableParents(){return this._scrollableElements}getItemIndex(t){return this._isDragging?NB("horizontal"===this._orientation&&"rtl"===this._direction?this._itemPositions.slice().reverse():this._itemPositions,e=>e.drag===t):this._draggables.indexOf(t)}isReceiving(){return this._activeSiblings.size>0}_sortItem(t,e,i,n){if(this.sortingDisabled||!this._clientRect||!yB(this._clientRect,.05,e,i))return;const r=this._itemPositions,s=this._getItemIndexFromPointerPosition(t,e,i,n);if(-1===s&&r.length>0)return;const o="horizontal"===this._orientation,a=NB(r,e=>e.drag===t),l=r[s],c=l.clientRect,h=a>s?1:-1,u=this._getItemOffsetPx(r[a].clientRect,c,h),d=this._getSiblingOffsetPx(a,r,h),p=r.slice();LB(r,a,s),this.sorted.next({previousIndex:a,currentIndex:s,container:this,item:t}),r.forEach((e,i)=>{if(p[i]===e)return;const n=e.drag===t,r=n?u:d,s=n?t.getPlaceholderElement():e.drag.getRootElement();e.offset+=r,o?(s.style.transform=`translate3d(${Math.round(e.offset)}px, 0, 0)`,_B(e.clientRect,0,r)):(s.style.transform=`translate3d(0, ${Math.round(e.offset)}px, 0)`,_B(e.clientRect,r,0))}),this._previousSwap.overlaps=vB(c,e,i),this._previousSwap.drag=l.drag,this._previousSwap.delta=o?n.x:n.y}_startScrollingIfNecessary(t,e){if(this.autoScrollDisabled)return;let i,n=0,r=0;if(this._parentPositions.positions.forEach((s,o)=>{o!==this._document&&s.clientRect&&!i&&yB(s.clientRect,.05,t,e)&&([n,r]=function(t,e,i,n){const r=HB(e,n),s=KB(e,i);let o=0,a=0;if(r){const e=t.scrollTop;1===r?e>0&&(o=1):t.scrollHeight-e>t.clientHeight&&(o=2)}if(s){const e=t.scrollLeft;1===s?e>0&&(a=1):t.scrollWidth-e>t.clientWidth&&(a=2)}return[o,a]}(o,s.clientRect,t,e),(n||r)&&(i=o))}),!n&&!r){const{width:s,height:o}=this._viewportRuler.getViewportSize(),a={width:s,height:o,top:0,right:s,bottom:o,left:0};n=HB(a,e),r=KB(a,t),i=window}!i||n===this._verticalScrollDirection&&r===this._horizontalScrollDirection&&i===this._scrollNode||(this._verticalScrollDirection=n,this._horizontalScrollDirection=r,this._scrollNode=i,(n||r)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){const t=si(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=t.msScrollSnapType||t.scrollSnapType||"",t.scrollSnapType=t.msScrollSnapType="none",this._cacheItems(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){const t=si(this.element);this._parentPositions.cache(this._scrollableElements),this._clientRect=this._parentPositions.positions.get(t).clientRect}_cacheItemPositions(){const t="horizontal"===this._orientation;this._itemPositions=this._activeDraggables.map(t=>{const e=t.getVisibleElement();return{drag:t,offset:0,clientRect:bB(e)}}).sort((e,i)=>t?e.clientRect.left-i.clientRect.left:e.clientRect.top-i.clientRect.top)}_reset(){this._isDragging=!1;const t=si(this.element).style;t.scrollSnapType=t.msScrollSnapType=this._initialScrollSnap,this._activeDraggables.forEach(t=>{const e=t.getRootElement();e&&(e.style.transform="")}),this._siblings.forEach(t=>t._stopReceiving(this)),this._activeDraggables=[],this._itemPositions=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1,this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_getSiblingOffsetPx(t,e,i){const n="horizontal"===this._orientation,r=e[t].clientRect,s=e[t+-1*i];let o=r[n?"width":"height"]*i;if(s){const t=n?"left":"top",e=n?"right":"bottom";-1===i?o-=s.clientRect[t]-r[e]:o+=r[t]-s.clientRect[e]}return o}_getItemOffsetPx(t,e,i){const n="horizontal"===this._orientation;let r=n?e.left-t.left:e.top-t.top;return-1===i&&(r+=n?e.width-t.width:e.height-t.height),r}_shouldEnterAsFirstChild(t,e){if(!this._activeDraggables.length)return!1;const i=this._itemPositions,n="horizontal"===this._orientation;if(i[0].drag!==this._activeDraggables[0]){const r=i[i.length-1].clientRect;return n?t>=r.right:e>=r.bottom}{const r=i[0].clientRect;return n?t<=r.left:e<=r.top}}_getItemIndexFromPointerPosition(t,e,i,n){const r="horizontal"===this._orientation,s=NB(this._itemPositions,({drag:s,clientRect:o},a,l)=>{if(s===t)return l.length<2;if(n){const t=r?n.x:n.y;if(s===this._previousSwap.drag&&this._previousSwap.overlaps&&t===this._previousSwap.delta)return!1}return r?e>=Math.floor(o.left)&&e<Math.floor(o.right):i>=Math.floor(o.top)&&i<Math.floor(o.bottom)});return-1!==s&&this.sortPredicate(s,t,this)?s:-1}_cacheItems(){this._activeDraggables=this._draggables.slice(),this._cacheItemPositions(),this._cacheParentPositions()}_isOverContainer(t,e){return null!=this._clientRect&&vB(this._clientRect,t,e)}_getSiblingContainerFromPosition(t,e,i){return this._siblings.find(n=>n._canReceive(t,e,i))}_canReceive(t,e,i){if(!this._clientRect||!vB(this._clientRect,e,i)||!this.enterPredicate(t,this))return!1;const n=this._getShadowRoot().elementFromPoint(e,i);if(!n)return!1;const r=si(this.element);return n===r||r.contains(n)}_startReceiving(t,e){const i=this._activeSiblings;!i.has(t)&&e.every(t=>this.enterPredicate(t,this)||this._draggables.indexOf(t)>-1)&&(i.add(t),this._cacheParentPositions(),this._listenToScrollEvents())}_stopReceiving(t){this._activeSiblings.delete(t),this._viewportScrollSubscription.unsubscribe()}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scroll.subscribe(t=>{if(this.isDragging()){const e=this._parentPositions.handleScroll(t);e&&(this._itemPositions.forEach(({clientRect:t})=>{_B(t,e.top,e.left)}),this._itemPositions.forEach(({drag:t})=>{this._dragDropRegistry.isDragging(t)&&t._sortFromLastPointerPosition()}))}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){const t=_i(si(this.element));this._cachedShadowRoot=t||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){const t=this._activeDraggables.filter(t=>t.isDragging());this._siblings.forEach(e=>e._startReceiving(this,t))}}function NB(t,e){for(let i=0;i<t.length;i++)if(e(t[i],i,t))return i;return-1}function jB(t,e){t===window?t.scrollBy(0,e):t.scrollTop+=e}function zB(t,e){t===window?t.scrollBy(e,0):t.scrollLeft+=e}function HB(t,e){const{top:i,bottom:n,height:r}=t,s=.05*r;return e>=i-s&&e<=i+s?1:e>=n-s&&e<=n+s?2:0}function KB(t,e){const{left:i,right:n,width:r}=t,s=.05*r;return e>=i-s&&e<=i+s?1:e>=n-s&&e<=n+s?2:0}const $B=Ai({passive:!1,capture:!0});let GB=(()=>{class t{constructor(t,e){this._ngZone=t,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=[],this._globalListeners=new Map,this._draggingPredicate=t=>t.isDragging(),this.pointerMove=new _e.a,this.pointerUp=new _e.a,this.scroll=new _e.a,this._preventDefaultWhileDragging=t=>{this._activeDragInstances.length>0&&t.preventDefault()},this._persistentTouchmoveListener=t=>{this._activeDragInstances.length>0&&(this._activeDragInstances.some(this._draggingPredicate)&&t.preventDefault(),this.pointerMove.next(t))},this._document=e}registerDropContainer(t){this._dropInstances.has(t)||this._dropInstances.add(t)}registerDragItem(t){this._dragInstances.add(t),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,$B)})}removeDropContainer(t){this._dropInstances.delete(t)}removeDragItem(t){this._dragInstances.delete(t),this.stopDragging(t),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,$B)}startDragging(t,e){if(!(this._activeDragInstances.indexOf(t)>-1)&&(this._activeDragInstances.push(t),1===this._activeDragInstances.length)){const t=e.type.startsWith("touch");this._globalListeners.set(t?"touchend":"mouseup",{handler:t=>this.pointerUp.next(t),options:!0}).set("scroll",{handler:t=>this.scroll.next(t),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:$B}),t||this._globalListeners.set("mousemove",{handler:t=>this.pointerMove.next(t),options:$B}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((t,e)=>{this._document.addEventListener(e,t.handler,t.options)})})}}stopDragging(t){const e=this._activeDragInstances.indexOf(t);e>-1&&(this._activeDragInstances.splice(e,1),0===this._activeDragInstances.length&&this._clearGlobalListeners())}isDragging(t){return this._activeDragInstances.indexOf(t)>-1}ngOnDestroy(){this._dragInstances.forEach(t=>this.removeDragItem(t)),this._dropInstances.forEach(t=>this.removeDropContainer(t)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((t,e)=>{this._document.removeEventListener(e,t.handler,t.options)}),this._globalListeners.clear()}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(r.B),r.Zb(a))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(r.B),Object(r.Zb)(a))},token:t,providedIn:"root"}),t})();const WB={dragStartThreshold:5,pointerDirectionChangeThreshold:5};let ZB=(()=>{class t{constructor(t,e,i,n){this._document=t,this._ngZone=e,this._viewportRuler=i,this._dragDropRegistry=n}createDrag(t,e=WB){return new PB(t,e,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(t){return new BB(t,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(a),r.Zb(r.B),r.Zb(nr),r.Zb(GB))},t.\u0275prov=Object(r.Lb)({factory:function(){return new t(Object(r.Zb)(a),Object(r.Zb)(r.B),Object(r.Zb)(nr),Object(r.Zb)(GB))},token:t,providedIn:"root"}),t})();const qB=new r.s("CDK_DRAG_PARENT"),YB=new r.s("CdkDropListGroup"),QB=new r.s("CDK_DRAG_CONFIG");let XB=0;const JB=new r.s("CdkDropList");let tN=(()=>{class t{constructor(e,i,n,s,o,a,l){this.element=e,this._changeDetectorRef=n,this._scrollDispatcher=s,this._dir=o,this._group=a,this._destroyed=new _e.a,this.connectedTo=[],this.id="cdk-drop-list-"+XB++,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.dropped=new r.o,this.entered=new r.o,this.exited=new r.o,this.sorted=new r.o,this._unsortedItems=new Set,this._dropListRef=i.createDropList(e),this._dropListRef.data=this,l&&this._assignDefaults(l),this._dropListRef.enterPredicate=(t,e)=>this.enterPredicate(t.data,e.data),this._dropListRef.sortPredicate=(t,e,i)=>this.sortPredicate(t,e.data,i.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),t._dropLists.push(this),a&&a._items.add(this)}get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(t){this._dropListRef.disabled=this._disabled=ti(t)}addItem(t){this._unsortedItems.add(t),this._dropListRef.isDragging()&&this._syncItemsWithRef()}removeItem(t){this._unsortedItems.delete(t),this._dropListRef.isDragging()&&this._syncItemsWithRef()}getSortedItems(){return Array.from(this._unsortedItems).sort((t,e)=>t._dragRef.getVisibleElement().compareDocumentPosition(e._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){const e=t._dropLists.indexOf(this);e>-1&&t._dropLists.splice(e,1),this._group&&this._group._items.delete(this),this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}_setupInputSyncSubscription(e){this._dir&&this._dir.change.pipe(Pn(this._dir.value),Sn(this._destroyed)).subscribe(t=>e.withDirection(t)),e.beforeStarted.subscribe(()=>{const i=ni(this.connectedTo).map(e=>"string"==typeof e?t._dropLists.find(t=>t.id===e):e);if(this._group&&this._group._items.forEach(t=>{-1===i.indexOf(t)&&i.push(t)}),!this._scrollableParentsResolved){const t=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(t=>t.getElementRef().nativeElement);this._dropListRef.withScrollableParents(t),this._scrollableParentsResolved=!0}e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.sortingDisabled=ti(this.sortingDisabled),e.autoScrollDisabled=ti(this.autoScrollDisabled),e.autoScrollStep=ei(this.autoScrollStep,2),e.connectedTo(i.filter(t=>t&&t!==this).map(t=>t._dropListRef)).withOrientation(this.orientation)})}_handleEvents(t){t.beforeStarted.subscribe(()=>{this._syncItemsWithRef(),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(t=>{this.entered.emit({container:this,item:t.item.data,currentIndex:t.currentIndex})}),t.exited.subscribe(t=>{this.exited.emit({container:this,item:t.item.data}),this._changeDetectorRef.markForCheck()}),t.sorted.subscribe(t=>{this.sorted.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,container:this,item:t.item.data})}),t.dropped.subscribe(t=>{this.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,container:t.container.data,item:t.item.data,isPointerOverContainer:t.isPointerOverContainer,distance:t.distance}),this._changeDetectorRef.markForCheck()})}_assignDefaults(t){const{lockAxis:e,draggingDisabled:i,sortingDisabled:n,listAutoScrollDisabled:r,listOrientation:s}=t;this.disabled=null!=i&&i,this.sortingDisabled=null!=n&&n,this.autoScrollDisabled=null!=r&&r,this.orientation=s||"vertical",e&&(this.lockAxis=e)}_syncItemsWithRef(){this._dropListRef.withItems(this.getSortedItems().map(t=>t._dragRef))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(ZB),r.Pb(r.h),r.Pb(er),r.Pb(Zn,8),r.Pb(YB,12),r.Pb(QB,8))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(t,e){2&t&&(r.Eb("id",e.id),r.Hb("cdk-drop-list-disabled",e.disabled)("cdk-drop-list-dragging",e._dropListRef.isDragging())("cdk-drop-list-receiving",e._dropListRef.isReceiving()))},inputs:{connectedTo:["cdkDropListConnectedTo","connectedTo"],id:"id",enterPredicate:["cdkDropListEnterPredicate","enterPredicate"],sortPredicate:["cdkDropListSortPredicate","sortPredicate"],disabled:["cdkDropListDisabled","disabled"],sortingDisabled:["cdkDropListSortingDisabled","sortingDisabled"],autoScrollDisabled:["cdkDropListAutoScrollDisabled","autoScrollDisabled"],orientation:["cdkDropListOrientation","orientation"],lockAxis:["cdkDropListLockAxis","lockAxis"],data:["cdkDropListData","data"],autoScrollStep:["cdkDropListAutoScrollStep","autoScrollStep"]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],features:[r.Cb([{provide:YB,useValue:void 0},{provide:JB,useExisting:t}])]}),t._dropLists=[],t})();const eN=new r.s("CdkDragHandle");let iN=(()=>{class t{constructor(t,e){this.element=t,this._stateChanges=new _e.a,this._disabled=!1,this._parentDrag=e}get disabled(){return this._disabled}set disabled(t){this._disabled=ti(t),this._stateChanges.next(this)}ngOnDestroy(){this._stateChanges.complete()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(qB,12))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdkDragHandle",""]],hostAttrs:[1,"cdk-drag-handle"],inputs:{disabled:["cdkDragHandleDisabled","disabled"]},features:[r.Cb([{provide:eN,useExisting:t}])]}),t})();const nN=new r.s("CdkDragPlaceholder"),rN=new r.s("CdkDragPreview");let sN=(()=>{class t{constructor(e,i,n,s,o,a,l,c,h,u,d){this.element=e,this.dropContainer=i,this._ngZone=s,this._viewContainerRef=o,this._dir=l,this._changeDetectorRef=h,this._selfHandle=u,this._parentDrag=d,this._destroyed=new _e.a,this.started=new r.o,this.released=new r.o,this.ended=new r.o,this.entered=new r.o,this.exited=new r.o,this.dropped=new r.o,this.moved=new Ze.a(t=>{const e=this._dragRef.moved.pipe(Object(Ge.a)(t=>({source:this,pointerPosition:t.pointerPosition,event:t.event,delta:t.delta,distance:t.distance}))).subscribe(t);return()=>{e.unsubscribe()}}),this._dragRef=c.createDrag(e,{dragStartThreshold:a&&null!=a.dragStartThreshold?a.dragStartThreshold:5,pointerDirectionChangeThreshold:a&&null!=a.pointerDirectionChangeThreshold?a.pointerDirectionChangeThreshold:5,zIndex:null==a?void 0:a.zIndex}),this._dragRef.data=this,t._dragInstances.push(this),a&&this._assignDefaults(a),i&&(this._dragRef._withDropContainer(i._dropListRef),i.addItem(this)),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}get disabled(){return this._disabled||this.dropContainer&&this.dropContainer.disabled}set disabled(t){this._disabled=ti(t),this._dragRef.disabled=this._disabled}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}ngAfterViewInit(){this._ngZone.onStable.pipe(Qe(1),Sn(this._destroyed)).subscribe(()=>{this._updateRootElement(),this._handles.changes.pipe(Pn(this._handles),Pe(t=>{const e=t.filter(t=>t._parentDrag===this).map(t=>t.element);this._selfHandle&&this.rootElementSelector&&e.push(this.element),this._dragRef.withHandles(e)}),Mn(t=>Object(or.a)(...t.map(t=>t._stateChanges.pipe(Pn(t))))),Sn(this._destroyed)).subscribe(t=>{const e=this._dragRef,i=t.element.nativeElement;t.disabled?e.disableHandle(i):e.enableHandle(i)}),this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)})}ngOnChanges(t){const e=t.rootElementSelector,i=t.freeDragPosition;e&&!e.firstChange&&this._updateRootElement(),i&&!i.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this);const e=t._dragInstances.indexOf(this);e>-1&&t._dragInstances.splice(e,1),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()}_updateRootElement(){const t=this.element.nativeElement,e=this.rootElementSelector?oN(t,this.rootElementSelector):t;this._dragRef.withRootElement(e||t)}_getBoundaryElement(){const t=this.boundaryElement;return t?"string"==typeof t?oN(this.element.nativeElement,t):si(t):null}_syncInputs(e){e.beforeStarted.subscribe(()=>{if(!e.isDragging()){const t=this._dir,i=this.dragStartDelay,n=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,r=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.dragStartDelay="object"==typeof i&&i?i:ei(i),e.constrainPosition=this.constrainPosition,e.previewClass=this.previewClass,e.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(n).withPreviewTemplate(r),t&&e.withDirection(t.value)}}),e.beforeStarted.pipe(Qe(1)).subscribe(()=>{var i,n;if(this._parentDrag)return void e.withParent(this._parentDrag._dragRef);let r=this.element.nativeElement.parentElement;for(;r;){if(null===(i=r.classList)||void 0===i?void 0:i.contains("cdk-drag")){e.withParent((null===(n=t._dragInstances.find(t=>t.element.nativeElement===r))||void 0===n?void 0:n._dragRef)||null);break}r=r.parentElement}})}_handleEvents(t){t.started.subscribe(()=>{this.started.emit({source:this}),this._changeDetectorRef.markForCheck()}),t.released.subscribe(()=>{this.released.emit({source:this})}),t.ended.subscribe(t=>{this.ended.emit({source:this,distance:t.distance}),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(t=>{this.entered.emit({container:t.container.data,item:this,currentIndex:t.currentIndex})}),t.exited.subscribe(t=>{this.exited.emit({container:t.container.data,item:this})}),t.dropped.subscribe(t=>{this.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,container:t.container.data,isPointerOverContainer:t.isPointerOverContainer,item:this,distance:t.distance})})}_assignDefaults(t){const{lockAxis:e,dragStartDelay:i,constrainPosition:n,previewClass:r,boundaryElement:s,draggingDisabled:o,rootElementSelector:a}=t;this.disabled=null!=o&&o,this.dragStartDelay=i||0,e&&(this.lockAxis=e),n&&(this.constrainPosition=n),r&&(this.previewClass=r),s&&(this.boundaryElement=s),a&&(this.rootElementSelector=a)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(JB,12),r.Pb(a),r.Pb(r.B),r.Pb(r.S),r.Pb(QB,8),r.Pb(Zn,8),r.Pb(ZB),r.Pb(r.h),r.Pb(eN,10),r.Pb(qB,12))},t.\u0275dir=r.Kb({type:t,selectors:[["","cdkDrag",""]],contentQueries:function(t,e,i){if(1&t&&(r.Ib(i,rN,1),r.Ib(i,nN,1),r.Ib(i,eN,1)),2&t){let t;r.vc(t=r.dc())&&(e._previewTemplate=t.first),r.vc(t=r.dc())&&(e._placeholderTemplate=t.first),r.vc(t=r.dc())&&(e._handles=t)}},hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(t,e){2&t&&r.Hb("cdk-drag-disabled",e.disabled)("cdk-drag-dragging",e._dragRef.isDragging())},inputs:{disabled:["cdkDragDisabled","disabled"],dragStartDelay:["cdkDragStartDelay","dragStartDelay"],lockAxis:["cdkDragLockAxis","lockAxis"],constrainPosition:["cdkDragConstrainPosition","constrainPosition"],previewClass:["cdkDragPreviewClass","previewClass"],boundaryElement:["cdkDragBoundary","boundaryElement"],rootElementSelector:["cdkDragRootElement","rootElementSelector"],data:["cdkDragData","data"],freeDragPosition:["cdkDragFreeDragPosition","freeDragPosition"]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[r.Cb([{provide:qB,useExisting:t}]),r.Bb]}),t._dragInstances=[],t})();function oN(t,e){let i=t.parentElement;for(;i;){if(i.matches?i.matches(e):i.msMatchesSelector(e))return i;i=i.parentElement}return null}let aN=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[ZB],imports:[rr]}),t})();function lN(t,e){if(1&t&&(r.Vb(0,"mat-option",9),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.value),r.Db(1),r.Mc(" ",t.label," ")}}function cN(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div"),r.Vb(1,"mat-form-field",5),r.Vb(2,"mat-label"),r.Kc(3,"Intervalle de temps"),r.Ub(),r.Vb(4,"mat-select",6),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).criterion.timeWindow=e}),r.Ic(5,lN,2,2,"mat-option",7),r.Ub(),r.Ub(),r.Vb(6,"mat-checkbox",8),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).criterion.sequential=e}),r.Kc(7," Passages ordonn\xe9s "),r.Ub(),r.Ub()}if(2&t){const t=r.gc(2);r.Db(4),r.nc("ngModel",t.criterion.timeWindow)("disabled",!t.editable),r.Db(1),r.nc("ngForOf",t.timeWindows),r.Db(1),r.nc("ngModel",t.criterion.sequential)("disabled",!t.editable)}}function hN(t,e){if(1&t&&(r.Vb(0,"div",21),r.Kc(1),r.Ub()),2&t){const t=r.gc().index;r.Db(1),r.Lc(t+1)}}function uN(t,e){1&t&&(r.Vb(0,"mat-icon",22),r.Kc(1,"drag_handle"),r.Ub())}function dN(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-list-item",17),r.cc("cdkDragStarted",function(){return r.Ac(t),r.gc(3).startReorderingPassages()}),r.Ic(1,hN,2,1,"div",18),r.Ic(2,uN,2,0,"mat-icon",19),r.Vb(3,"app-zone-item",20),r.cc("delete",function(){r.Ac(t);const i=e.$implicit;return r.gc(3).deleteZone(i.zone)}),r.Ub(),r.Ub()}if(2&t){const t=e.$implicit,i=r.gc(3);r.Db(1),r.nc("ngIf",i.criterion.sequential),r.Db(1),r.nc("ngIf",i.zonesEditable),r.Db(1),r.nc("zone",t.zone)("editable",i.zonesEditable)}}function pN(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-zone-form",23),r.cc("save",function(e){return r.Ac(t),r.gc(3).addCreatedZone(e)})("cancel",function(){return r.Ac(t),r.gc(3).hideCreateZoneForm()}),r.Ub()}}function fN(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",24),r.Vb(1,"span"),r.Kc(2,"\xa0Ajouter une zone"),r.Ub(),r.Ub(),r.Vb(3,"button",25),r.cc("click",function(){return r.Ac(t),r.gc(3).displayCreateZoneForm()}),r.Kc(4," Cr\xe9er une zone "),r.Ub()}if(2&t){r.gc();const t=r.wc(6),e=r.gc(2);r.nc("matMenuTriggerFor",t)("disabled",!e.zonesEditable),r.Db(3),r.nc("disabled",!e.zonesEditable)}}function mN(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",26),r.cc("click",function(){r.Ac(t);const i=e.$implicit;return r.gc(3).addZone(i)}),r.Kc(1),r.Ub()}if(2&t){const t=e.$implicit;r.Db(1),r.Mc(" ",t.name," ")}}function gN(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-list",10),r.cc("cdkDropListDropped",function(e){return r.Ac(t),r.gc(2).reorderPassage(e)}),r.Ic(1,dN,4,4,"mat-list-item",11),r.Ub(),r.Vb(2,"div",12),r.Ic(3,pN,1,0,"app-zone-form",13),r.Ic(4,fN,5,3,"ng-template",1),r.Ub(),r.Vb(5,"mat-menu",14,15),r.Ic(7,mN,2,1,"button",16),r.Ub()}if(2&t){const t=r.gc(2);r.Db(1),r.nc("ngForOf",t.criterion.passages)("ngForTrackBy",t.trackById),r.Db(2),r.nc("ngIf",t.showCreateZoneForm),r.Db(1),r.nc("ngIf",!t.showCreateZoneForm),r.Db(3),r.nc("ngForOf",t.availableZones)}}function AN(t,e){if(1&t&&(r.Vb(0,"div",21),r.Kc(1),r.Ub()),2&t){const t=r.gc().index;r.Db(1),r.Lc(t+1)}}function bN(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-list-item"),r.Ic(1,AN,2,1,"div",18),r.Vb(2,"button",29),r.cc("click",function(){r.Ac(t);const i=e.$implicit;return r.gc(3).viewZone(i.zone)}),r.Kc(3),r.Ub(),r.Ub()}if(2&t){const t=e.$implicit,i=r.gc(3);r.Db(1),r.nc("ngIf",i.criterion.sequential),r.Db(2),r.Mc(" ",t.zone.name," ")}}function vN(t,e){if(1&t&&(r.Vb(0,"mat-list",27),r.Ic(1,bN,4,2,"mat-list-item",28),r.Ub()),2&t){const t=r.gc(2);r.Db(1),r.nc("ngForOf",t.criterion.passages)}}function _N(t,e){if(1&t&&(r.Ic(0,cN,8,5,"div",2),r.Ic(1,gN,8,5,"ng-template",3),r.Ic(2,vN,2,1,"ng-template",null,4,r.Jc)),2&t){const t=r.wc(3),e=r.gc();r.nc("ngIf",e.criterion.passages.length>1),r.Db(1),r.nc("ngIf",e.editable)("ngIfElse",t)}}let yN=(()=>{class t extends UU{constructor(t,e,i){super(),this.editZoneService=t,this.mapService=e,this.zonesService=i,this.updateZones=new r.o,this.timeWindows=LI,this.reorderingPassages=!1,this.availableZones=[],this.showCreateZoneForm=!1,this.zonesEditable=!0,this.subscriptions=[],this.usedZonesIds$=new Av.a([])}ngOnInit(){this.usedZonesIds$.next(this.criterion.passages.map(t=>t.zone.id)),this.subscriptions.push(Hg([this.zonesService.zones$,this.usedZonesIds$]).subscribe(([t,e])=>{this.availableZones=t.filter(t=>!e.includes(t.id))})),this.subscriptions.push(this.usedZonesIds$.pipe(Gg(1)).subscribe(()=>{this.updateZones.next(null)})),this.subscriptions.push(this.editZoneService.editedZone$.pipe(mn(),fI(0)).subscribe(t=>{this.zonesEditable=!t}))}ngOnDestroy(){this.subscriptions.forEach(t=>{t.unsubscribe()})}get passages(){return this.criterion.passages.map(t=>t.zone.name).join(", ")}displayCreateZoneForm(){this.showCreateZoneForm=!0}hideCreateZoneForm(){this.showCreateZoneForm=!1}addCreatedZone(t){this.criterion.passages.push({zone:t}),this.hideCreateZoneForm()}viewZone(t){this.mapService.fitOn(wP(t.h3indexes))}deleteZone(t){this.criterion.passages.splice(this.criterion.passages.findIndex(e=>e.zone===t),1),this.usedZonesIds$.next(this.usedZonesIds$.value.filter(e=>e!==t.id))}addZone(t){this.criterion.passages.push({zone:t}),this.usedZonesIds$.next(this.usedZonesIds$.value.concat(t.id))}trackById(t,e){return e.zone.id}startReorderingPassages(){this.reorderingPassages=!0}reorderPassage(t){this.reorderingPassages=!1,LB(this.criterion.passages,t.previousIndex,t.currentIndex)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(sL),r.Pb(pI),r.Pb(kP))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-passage-in-zone-criterion"]],outputs:{updateZones:"updateZones"},features:[r.Cb([{provide:rc,useExisting:t,multi:!0}]),r.Ab],decls:2,vars:4,consts:[[3,"type","enable","editable","enableChange"],[3,"ngIf"],[4,"ngIf"],[3,"ngIf","ngIfElse"],["readonly",""],[1,"mr-2"],[3,"ngModel","disabled","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["color","primary","matTooltip","Cette option active le passage des zones dans l'ordre d\xe9fini",3,"ngModel","disabled","ngModelChange"],[3,"value"],["dense","","cdkDropList","",3,"cdkDropListDropped"],["cdkDrag","",3,"cdkDragStarted",4,"ngFor","ngForOf","ngForTrackBy"],[1,"criterion-content"],["class","u-flex",3,"save","cancel",4,"ngIf"],[1,"add-zones-menu"],["addZonesMenu","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["cdkDrag","",3,"cdkDragStarted"],["class","criterion__sequence-number",4,"ngIf"],["class","criterion__drag-handle","cdkDragHandle","","title","R\xe9ordonner",4,"ngIf"],[1,"u-flex",3,"zone","editable","delete"],[1,"criterion__sequence-number"],["cdkDragHandle","","title","R\xe9ordonner",1,"criterion__drag-handle"],[1,"u-flex",3,"save","cancel"],["mat-button","","title","Ajouter une zone existante",3,"matMenuTriggerFor","disabled"],["mat-button","","title","Cr\xe9er une nouvelle zone",3,"disabled","click"],["mat-menu-item","",3,"click"],["dense",""],[4,"ngFor","ngForOf"],["mat-button","","title","Visualiser la zone",1,"u-flex",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"app-alert-rule-criterion",0),r.cc("enableChange",function(t){return e.enable=t}),r.Ic(1,_N,4,3,"ng-template",1),r.Ub()),2&t&&(r.nc("type",e.criteriaLabels.passageInZone)("enable",e.enable)("editable",e.editable),r.Db(1),r.nc("ngIf",e.criterion.enable))},directives:[$U,ut,_u,cu,Vg,Vc,uh,ct,tF,oA,bl,yU,tN,eU,SU,sN,uU,Yp,iN,lU,Dl,sU,QL],styles:[".criterion__sequence-number[_ngcontent-%COMP%]{font-size:1.2em;font-weight:700;margin-right:.5em}.criterion__drag-handle[_ngcontent-%COMP%]{cursor:move;margin-right:.5em}.cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);background-color:#e6e9f7;font-size:12px}.cdk-drag-preview[_ngcontent-%COMP%] >.mat-list-item-content{display:flex;align-items:center;padding:0 16px;height:inherit}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%], .cdk-drop-list-dragging[_ngcontent-%COMP%] [_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}"]}),t})(),wN=(()=>{class t extends UU{}return t.\u0275fac=function(e){return xN(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-spoofing-criterion"]],features:[r.Cb([{provide:rc,useExisting:t,multi:!0}]),r.Ab],decls:1,vars:3,consts:[[3,"type","enable","editable","enableChange"]],template:function(t,e){1&t&&(r.Vb(0,"app-alert-rule-criterion",0),r.cc("enableChange",function(t){return e.enable=t}),r.Ub()),2&t&&r.nc("type",e.criteriaLabels.spoofing)("enable",e.enable)("editable",e.editable)},directives:[$U],encapsulation:2,changeDetection:0}),t})();const xN=r.Xb(wN),CN=["panel"];function SN(t,e){if(1&t&&(r.Vb(0,"div",0,1),r.lc(2),r.Ub()),2&t){const t=e.id,i=r.gc();r.nc("id",i.id)("ngClass",i._classList),r.Eb("aria-label",i.ariaLabel||null)("aria-labelledby",i._getPanelAriaLabelledby(t))}}const kN=["*"];let EN=0;class DN{constructor(t,e){this.source=t,this.option=e}}class IN{}const PN=Da(IN),ON=new r.s("mat-autocomplete-default-options",{providedIn:"root",factory:function(){return{autoActiveFirstOption:!1}}});let MN=(()=>{class t extends PN{constructor(t,e,i,n){super(),this._changeDetectorRef=t,this._elementRef=e,this._activeOptionChanges=ye.a.EMPTY,this.showPanel=!1,this._isOpen=!1,this.displayWith=null,this.optionSelected=new r.o,this.opened=new r.o,this.closed=new r.o,this.optionActivated=new r.o,this._classList={},this.id="mat-autocomplete-"+EN++,this.inertGroups=(null==n?void 0:n.SAFARI)||!1,this._autoActiveFirstOption=!!i.autoActiveFirstOption}get isOpen(){return this._isOpen&&this.showPanel}get autoActiveFirstOption(){return this._autoActiveFirstOption}set autoActiveFirstOption(t){this._autoActiveFirstOption=ti(t)}set classList(t){this._classList=t&&t.length?oi(t).reduce((t,e)=>(t[e]=!0,t),{}):{},this._setVisibilityClasses(this._classList),this._elementRef.nativeElement.className=""}ngAfterContentInit(){this._keyManager=new Ti(this.options).withWrap(),this._activeOptionChanges=this._keyManager.change.subscribe(t=>{this.optionActivated.emit({source:this,option:this.options.toArray()[t]||null})}),this._setVisibility()}ngOnDestroy(){this._activeOptionChanges.unsubscribe()}_setScrollTop(t){this.panel&&(this.panel.nativeElement.scrollTop=t)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options.length,this._setVisibilityClasses(this._classList),this._changeDetectorRef.markForCheck()}_emitSelectEvent(t){const e=new DN(this,t);this.optionSelected.emit(e)}_getPanelAriaLabelledby(t){return this.ariaLabel?null:this.ariaLabelledby?t+" "+this.ariaLabelledby:t}_setVisibilityClasses(t){t[this._visibleClass]=this.showPanel,t[this._hiddenClass]=!this.showPanel}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(r.l),r.Pb(ON),r.Pb(ci))},t.\u0275dir=r.Kb({type:t,viewQuery:function(t,e){if(1&t&&(r.Pc(r.O,3),r.Pc(CN,1)),2&t){let t;r.vc(t=r.dc())&&(e.template=t.first),r.vc(t=r.dc())&&(e.panel=t.first)}},inputs:{displayWith:"displayWith",autoActiveFirstOption:"autoActiveFirstOption",classList:["class","classList"],ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],panelWidth:"panelWidth"},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},features:[r.Ab]}),t})(),TN=(()=>{class t extends MN{constructor(){super(...arguments),this._visibleClass="mat-autocomplete-visible",this._hiddenClass="mat-autocomplete-hidden"}}return t.\u0275fac=function(e){return RN(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-autocomplete"]],contentQueries:function(t,e,i){if(1&t&&(r.Ib(i,dl,1),r.Ib(i,bl,1)),2&t){let t;r.vc(t=r.dc())&&(e.optionGroups=t),r.vc(t=r.dc())&&(e.options=t)}},hostAttrs:[1,"mat-autocomplete"],inputs:{disableRipple:"disableRipple"},exportAs:["matAutocomplete"],features:[r.Cb([{provide:al,useExisting:t}]),r.Ab],ngContentSelectors:kN,decls:1,vars:0,consts:[["role","listbox",1,"mat-autocomplete-panel",3,"id","ngClass"],["panel",""]],template:function(t,e){1&t&&(r.mc(),r.Ic(0,SN,3,4,"ng-template"))},directives:[at],styles:[".mat-autocomplete-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;visibility:hidden;max-width:none;max-height:256px;position:relative;width:100%;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.mat-autocomplete-panel.mat-autocomplete-visible{visibility:visible}.mat-autocomplete-panel.mat-autocomplete-hidden{visibility:hidden}.mat-autocomplete-panel-above .mat-autocomplete-panel{border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px}.mat-autocomplete-panel .mat-divider-horizontal{margin-top:-1px}.cdk-high-contrast-active .mat-autocomplete-panel{outline:solid 1px}mat-autocomplete{display:none}\n"],encapsulation:2,changeDetection:0}),t})();const RN=r.Xb(TN);let VN=(()=>{class t{constructor(t){this.elementRef=t}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l))},t.\u0275dir=r.Kb({type:t}),t})(),FN=(()=>{class t extends VN{}return t.\u0275fac=function(e){return LN(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","matAutocompleteOrigin",""]],exportAs:["matAutocompleteOrigin"],features:[r.Ab]}),t})();const LN=r.Xb(FN),UN=new r.s("mat-autocomplete-scroll-strategy"),BN={provide:UN,deps:[Fr],useFactory:function(t){return()=>t.scrollStrategies.reposition()}},NN={provide:rc,useExisting:Object(r.W)(()=>zN),multi:!0};let jN=(()=>{class t{constructor(t,e,i,n,r,s,o,a,l,c,h){this._element=t,this._overlay=e,this._viewContainerRef=i,this._zone=n,this._changeDetectorRef=r,this._dir=o,this._formField=a,this._document=l,this._viewportRuler=c,this._defaults=h,this._componentDestroyed=!1,this._autocompleteDisabled=!1,this._manuallyFloatingLabel=!1,this._viewportSubscription=ye.a.EMPTY,this._canOpenOnNextFocus=!0,this._closeKeyEventStream=new _e.a,this._windowBlurHandler=()=>{this._canOpenOnNextFocus=this._document.activeElement!==this._element.nativeElement||this.panelOpen},this._onChange=()=>{},this._onTouched=()=>{},this.position="auto",this.autocompleteAttribute="off",this._overlayAttached=!1,this.optionSelections=Ol(()=>this.autocomplete&&this.autocomplete.options?Object(or.a)(...this.autocomplete.options.map(t=>t.onSelectionChange)):this._zone.onStable.pipe(Qe(1),Mn(()=>this.optionSelections))),this._scrollStrategy=s}get autocompleteDisabled(){return this._autocompleteDisabled}set autocompleteDisabled(t){this._autocompleteDisabled=ti(t)}ngAfterViewInit(){const t=this._getWindow();void 0!==t&&this._zone.runOutsideAngular(()=>t.addEventListener("blur",this._windowBlurHandler))}ngOnChanges(t){t.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){const t=this._getWindow();void 0!==t&&t.removeEventListener("blur",this._windowBlurHandler),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}openPanel(){this._attachOverlay(),this._floatLabel()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this.autocomplete.closed.emit(),this.autocomplete._isOpen=this._overlayAttached=!1,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._componentDestroyed||this._changeDetectorRef.detectChanges())}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return Object(or.a)(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(He(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(He(()=>this._overlayAttached)):Se()).pipe(Object(Ge.a)(t=>t instanceof gl?t:null))}get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return Object(or.a)(en(this._document,"click"),en(this._document,"auxclick"),en(this._document,"touchend")).pipe(He(t=>{const e=this._isInsideShadowRoot&&t.composedPath?t.composedPath()[0]:t.target,i=this._formField?this._formField._elementRef.nativeElement:null,n=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;return this._overlayAttached&&e!==this._element.nativeElement&&(!i||!i.contains(e))&&(!n||!n.contains(e))&&!!this._overlayRef&&!this._overlayRef.overlayElement.contains(e)}))}writeValue(t){Promise.resolve(null).then(()=>this._setTriggerValue(t))}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this._element.nativeElement.disabled=t}_handleKeydown(t){const e=t.keyCode;if(27!==e||ke(t)||t.preventDefault(),this.activeOption&&13===e&&this.panelOpen)this.activeOption._selectViaInteraction(),this._resetActiveItem(),t.preventDefault();else if(this.autocomplete){const i=this.autocomplete._keyManager.activeItem,n=38===e||40===e;this.panelOpen||9===e?this.autocomplete._keyManager.onKeydown(t):n&&this._canOpen()&&this.openPanel(),(n||this.autocomplete._keyManager.activeItem!==i)&&this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0)}}_handleInput(t){let e=t.target,i=e.value;"number"===e.type&&(i=""==i?null:parseFloat(i)),this._previousValue!==i&&(this._previousValue=i,this._onChange(i),this._canOpen()&&this._document.activeElement===t.target&&this.openPanel())}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_floatLabel(t=!1){this._formField&&"auto"===this._formField.floatLabel&&(t?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField.floatLabel="auto",this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){const t=this._zone.onStable.pipe(Qe(1)),e=this.autocomplete.options.changes.pipe(Pe(()=>this._positionStrategy.reapplyLastPosition()),fI(0));return Object(or.a)(t,e).pipe(Mn(()=>{const t=this.panelOpen;return this._resetActiveItem(),this.autocomplete._setVisibility(),this.panelOpen&&(this._overlayRef.updatePosition(),t!==this.panelOpen&&this.autocomplete.opened.emit()),this.panelClosingActions}),Qe(1)).subscribe(t=>this._setValueAndClose(t))}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_setTriggerValue(t){const e=this.autocomplete&&this.autocomplete.displayWith?this.autocomplete.displayWith(t):t,i=null!=e?e:"";this._formField?this._formField._control.value=i:this._element.nativeElement.value=i,this._previousValue=i}_setValueAndClose(t){t&&t.source&&(this._clearPreviousSelectedOption(t.source),this._setTriggerValue(t.source.value),this._onChange(t.source.value),this._element.nativeElement.focus(),this.autocomplete._emitSelectEvent(t.source)),this.closePanel()}_clearPreviousSelectedOption(t){this.autocomplete.options.forEach(e=>{e!==t&&e.selected&&e.deselect()})}_attachOverlay(){var t;null==this._isInsideShadowRoot&&(this._isInsideShadowRoot=!!_i(this._element.nativeElement));let e=this._overlayRef;e?(this._positionStrategy.setOrigin(this._getConnectedElement()),e.updateSize({width:this._getPanelWidth()})):(this._portal=new fe(this.autocomplete.template,this._viewContainerRef,{id:null===(t=this._formField)||void 0===t?void 0:t._labelId}),e=this._overlay.create(this._getOverlayConfig()),this._overlayRef=e,e.keydownEvents().subscribe(t=>{(27===t.keyCode&&!ke(t)||38===t.keyCode&&ke(t,"altKey"))&&(this._resetActiveItem(),this._closeKeyEventStream.next(),t.stopPropagation(),t.preventDefault())}),this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&e&&e.updateSize({width:this._getPanelWidth()})})),e&&!e.hasAttached()&&(e.attach(this._portal),this._closingActionsSubscription=this._subscribeToClosingActions());const i=this.panelOpen;this.autocomplete._setVisibility(),this.autocomplete._isOpen=this._overlayAttached=!0,this.panelOpen&&i!==this.panelOpen&&this.autocomplete.opened.emit()}_getOverlayConfig(){var t;return new br({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir,panelClass:null===(t=this._defaults)||void 0===t?void 0:t.overlayPanelClass})}_getOverlayPosition(){const t=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(t),this._positionStrategy=t,t}_setStrategyPositions(t){const e=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],i=this._aboveClass,n=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:i},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:i}];let r;r="above"===this.position?n:"below"===this.position?e:[...e,...n],t.withPositions(r)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){const t=this.autocomplete;t.autoActiveFirstOption?t._keyManager.setFirstItemActive():t._keyManager.setActiveItem(-1)}_canOpen(){const t=this._element.nativeElement;return!t.readOnly&&!t.disabled&&!this._autocompleteDisabled}_getWindow(){var t;return(null===(t=this._document)||void 0===t?void 0:t.defaultView)||window}_scrollToOption(t){const e=this.autocomplete,i=vl(t,e.options,e.optionGroups);if(0===t&&1===i)e._setScrollTop(0);else{const i=e.options.toArray()[t];if(i){const t=i._getHostElement(),n=_l(t.offsetTop,t.offsetHeight,e._getScrollTop(),e.panel.nativeElement.offsetHeight);e._setScrollTop(n)}}}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(Fr),r.Pb(r.S),r.Pb(r.B),r.Pb(r.h),r.Pb(UN),r.Pb(Zn,8),r.Pb(vu,9),r.Pb(a,8),r.Pb(nr),r.Pb(ON,8))},t.\u0275dir=r.Kb({type:t,inputs:{position:["matAutocompletePosition","position"],autocompleteAttribute:["autocomplete","autocompleteAttribute"],autocompleteDisabled:["matAutocompleteDisabled","autocompleteDisabled"],autocomplete:["matAutocomplete","autocomplete"],connectedTo:["matAutocompleteConnectedTo","connectedTo"]},features:[r.Bb]}),t})(),zN=(()=>{class t extends jN{constructor(){super(...arguments),this._aboveClass="mat-autocomplete-panel-above"}}return t.\u0275fac=function(e){return HN(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-autocomplete-trigger"],hostVars:7,hostBindings:function(t,e){1&t&&r.cc("focusin",function(){return e._handleFocus()})("blur",function(){return e._onTouched()})("input",function(t){return e._handleInput(t)})("keydown",function(t){return e._handleKeydown(t)}),2&t&&r.Eb("autocomplete",e.autocompleteAttribute)("role",e.autocompleteDisabled?null:"combobox")("aria-autocomplete",e.autocompleteDisabled?null:"list")("aria-activedescendant",e.panelOpen&&e.activeOption?e.activeOption.id:null)("aria-expanded",e.autocompleteDisabled?null:e.panelOpen.toString())("aria-owns",e.autocompleteDisabled||!e.panelOpen||null==e.autocomplete?null:e.autocomplete.id)("aria-haspopup",!e.autocompleteDisabled)},exportAs:["matAutocompleteTrigger"],features:[r.Cb([NN]),r.Ab]}),t})();const HN=r.Xb(zN);let KN=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[BN],imports:[[zr,yl,Sa,Et],rr,yl,Sa]}),t})();const $N=["searchInput"];function GN(t,e){if(1&t&&(r.Vb(0,"mat-option",7),r.Vb(1,"div",8),r.Vb(2,"div"),r.Qb(3,"app-flag",9),r.Kc(4),r.Ub(),r.Vb(5,"div"),r.Vb(6,"span",10),r.Kc(7),r.Ub(),r.Kc(8),r.Ub(),r.Ub(),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t),r.Db(3),r.nc("flag",t.country.flag),r.Db(1),r.Mc(" ",t.name||"?"," "),r.Db(3),r.Mc("MMSI ",t.mmsi,""),r.Db(1),r.Mc(" IMO ",t.imo||"?"," ")}}let WN=(()=>{class t{constructor(t){this.workerService=t,this.allowTextValue=!1,this.existingItems=[],this.selectItem=new r.o,this.searchFormControl=new eh,this.loadingResults=!1}ngOnInit(){this.searchResults=this.searchFormControl.valueChanges.pipe(Be(300),Pe(()=>{this.loadingResults=!0}),Object(Ge.a)(t=>"string"==typeof t?t:t.name),np(t=>""===t?Se([]):this.workerService.ships.findShips(t.toUpperCase())),Object(Ge.a)(t=>(this.loadingResults=!1,this.existingItems.length>0?t.filter(t=>!this.existingItems.includes(t.mmsi)):t)))}selectShip(t){t&&(this.selectItem.emit(t),this.searchFormControl.reset(""))}selectValue(){this.allowTextValue&&this.searchFormControl.value&&(this.selectItem.emit(this.searchFormControl.value),this.searchFormControl.reset(""))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-ship-identifier-input"]],viewQuery:function(t,e){if(1&t&&r.Pc($N,1),2&t){let t;r.vc(t=r.dc())&&(e.inputElement=t.first)}},inputs:{allowTextValue:"allowTextValue",existingItems:"existingItems"},outputs:{selectItem:"selectItem"},decls:9,vars:6,consts:[["matAutocompleteOrigin","",1,"ship-identifier-input"],["origin","matAutocompleteOrigin"],["type","search","placeholder","Nom, MMSI, IMO...","matInput","",1,"ship-identifier-input__input",3,"formControl","matAutocomplete","matAutocompleteConnectedTo","keyup.enter"],["searchInput",""],[3,"optionSelected"],["autocomplete","matAutocomplete"],["class","ship-identifier-input__result-item",3,"value",4,"ngFor","ngForOf"],[1,"ship-identifier-input__result-item",3,"value"],[1,"d-flex-column"],[3,"flag"],[1,"mr-3"]],template:function(t,e){if(1&t&&(r.Vb(0,"div",0,1),r.Vb(2,"mat-form-field"),r.Vb(3,"input",2,3),r.cc("keyup.enter",function(){return e.selectValue()}),r.Ub(),r.Vb(5,"mat-autocomplete",4,5),r.cc("optionSelected",function(){return e.selectShip(e.searchFormControl.value)}),r.Ic(7,GN,9,5,"mat-option",6),r.hc(8,"async"),r.Ub(),r.Ub(),r.Ub()),2&t){const t=r.wc(1),i=r.wc(6);r.Db(3),r.nc("formControl",e.searchFormControl)("matAutocomplete",i)("matAutocompleteConnectedTo",t),r.Db(4),r.nc("ngForOf",r.ic(8,4,e.searchResults))}},directives:[FN,_u,Ou,ac,zN,Vc,bh,TN,ct,bl,GF],pipes:[St],styles:[".ship-identifier-input[_ngcontent-%COMP%]{flex:1;display:flex;color:#50647f}.ship-identifier-input[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:100%}.ship-identifier-input__input[_ngcontent-%COMP%]{border:0;outline:0;padding:8px;height:1.5em;min-width:300px}.ship-identifier-input__result-item[_ngcontent-%COMP%]{line-height:22px}","[_nghost-%COMP%] {\n flex: 1;\n display: flex;\n }"],changeDetection:0}),t})();function ZN(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-chip",7),r.cc("removed",function(){r.Ac(t);const i=e.index;return r.gc(3).criterion.identifiers.splice(i,1)}),r.Kc(1),r.Vb(2,"mat-icon",8),r.Kc(3,"cancel"),r.Ub(),r.Ub()}if(2&t){const t=e.$implicit;r.nc("selectable",!1),r.Db(1),r.Mc(" ",t," ")}}function qN(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-chip-list"),r.Ic(1,ZN,4,2,"mat-chip",4),r.Ub(),r.Vb(2,"div",5),r.Vb(3,"app-ship-identifier-input",6),r.cc("selectItem",function(e){return r.Ac(t),r.gc(2).addIdentifier(e)}),r.Ub(),r.Ub()}if(2&t){const t=r.gc(2);r.Db(1),r.nc("ngForOf",t.criterion.identifiers),r.Db(2),r.nc("allowTextValue",!0)}}function YN(t,e){if(1&t&&r.Kc(0),2&t){const t=r.gc(2);r.Mc(" Identifiants : ",t.criterion.identifiers.join(", ")," ")}}function QN(t,e){if(1&t&&(r.Ic(0,qN,4,2,"ng-template",2),r.Ic(1,YN,1,1,"ng-template",null,3,r.Jc)),2&t){const t=r.wc(2),e=r.gc();r.nc("ngIf",e.editable)("ngIfElse",t)}}let XN=(()=>{class t extends UU{addIdentifier(t){t&&this.criterion.identifiers.push(t instanceof String?t:t.name)}}return t.\u0275fac=function(e){return JN(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-identifier-filter"]],features:[r.Cb([{provide:rc,useExisting:t,multi:!0}]),r.Ab],decls:2,vars:4,consts:[[3,"type","enable","editable","enableChange"],[3,"ngIf"],[3,"ngIf","ngIfElse"],["readonly",""],["disableRipple","","removable","",3,"selectable","removed",4,"ngFor","ngForOf"],[1,"criterion-content"],[3,"allowTextValue","selectItem"],["disableRipple","","removable","",3,"selectable","removed"],["matChipRemove","","title","Retirer ce filtre"]],template:function(t,e){1&t&&(r.Vb(0,"app-alert-rule-criterion",0),r.cc("enableChange",function(t){return e.enable=t}),r.Ic(1,QN,3,2,"ng-template",1),r.Ub()),2&t&&(r.nc("type",e.criteriaLabels.identifier)("enable",e.enable)("editable",e.editable),r.Db(1),r.nc("ngIf",e.criterion.enable))},directives:[$U,ut,_L,ct,WN,pL,Yp,fL],encapsulation:2,changeDetection:0}),t})();const JN=r.Xb(XN);let tj=(()=>{class t{constructor(){this.values=[],this.key="",this.text="Tout s\xe9lectionner"}isChecked(){return this.model.value&&this.values.length&&this.model.value.length===this.values.length}isIndeterminate(){return this.model.value&&this.values.length&&this.model.value.length&&this.model.value.length<this.values.length}toggleSelection(t){this.model.update.emit(t.checked?this.values.map(t=>t[this.key]):[])}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-select-check-all"]],inputs:{model:"model",values:"values",key:"key",text:"text"},decls:2,vars:4,consts:[["color","primary",1,"mat-option",3,"disableRipple","indeterminate","checked","click","change"]],template:function(t,e){1&t&&(r.Vb(0,"mat-checkbox",0),r.cc("click",function(t){return t.stopPropagation()})("change",function(t){return e.toggleSelection(t)}),r.Kc(1),r.Ub()),2&t&&(r.nc("disableRipple",!0)("indeterminate",e.isIndeterminate())("checked",e.isChecked()),r.Db(1),r.Mc(" ",e.text," "))},directives:[tF],styles:[""]}),t})();function ej(t,e){if(1&t&&(r.Vb(0,"mat-option",10),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.id),r.Db(1),r.Mc(" ",t.name," ")}}function ij(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",4),r.Vb(1,"mat-form-field",5),r.Vb(2,"mat-label"),r.Kc(3,"Flottes"),r.Ub(),r.Vb(4,"mat-select",6,7),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).criterion.fleets=e}),r.Qb(6,"app-select-check-all",8),r.Ic(7,ej,2,2,"mat-option",9),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=r.wc(5),e=r.gc(2);r.Db(4),r.nc("ngModel",e.criterion.fleets),r.Db(2),r.nc("model",t)("values",e.fleets)("key","id"),r.Db(1),r.nc("ngForOf",e.fleets)}}function nj(t,e){if(1&t&&r.Kc(0),2&t){const t=r.gc(2);r.Mc(" Flottes : ",t.fleetNames.join(", ")," ")}}function rj(t,e){if(1&t&&(r.Ic(0,ij,8,5,"ng-template",2),r.Ic(1,nj,1,1,"ng-template",null,3,r.Jc)),2&t){const t=r.wc(2),e=r.gc();r.nc("ngIf",e.editable)("ngIfElse",t)}}let sj=(()=>{class t extends UU{constructor(t){super(),this.fleetsService=t,this.fleets=[],this.fleetsService.fleets$.subscribe(t=>{this.fleets=t})}get fleetNames(){return this.criterion.fleets.map(t=>{var e;return(null!==(e=this.fleetsService.fleetsById[t])&&void 0!==e?e:{}).name}).filter(t=>!!t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(OT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-fleet-filter"]],features:[r.Cb([{provide:rc,useExisting:t,multi:!0}]),r.Ab],decls:2,vars:4,consts:[[3,"type","enable","editable","enableChange"],[3,"ngIf"],[3,"ngIf","ngIfElse"],["readonly",""],[1,"criterion-content"],[1,"d-block"],["multiple","",3,"ngModel","ngModelChange"],["fleetSelection","ngModel"],[3,"model","values","key"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]],template:function(t,e){1&t&&(r.Vb(0,"app-alert-rule-criterion",0),r.cc("enableChange",function(t){return e.enable=t}),r.Ic(1,rj,3,2,"ng-template",1),r.Ub()),2&t&&(r.nc("type",e.criteriaLabels.fleet)("enable",e.enable)("editable",e.editable),r.Db(1),r.nc("ngIf",e.criterion.enable))},directives:[$U,ut,_u,cu,Vg,Vc,uh,tj,ct,bl],encapsulation:2,changeDetection:0}),t})();function oj(t,e){if(1&t&&(r.Vb(0,"mat-option",10),r.Qb(1,"app-flag",11),r.Kc(2),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.flag),r.Db(1),r.nc("flag",t.flag),r.Db(1),r.Mc(" ",t.name," ")}}function aj(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",4),r.Vb(1,"mat-form-field",5),r.Vb(2,"mat-label"),r.Kc(3,"Pavillon"),r.Ub(),r.Vb(4,"mat-select",6,7),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).criterion.flags=e}),r.Qb(6,"app-select-check-all",8),r.Ic(7,oj,3,3,"mat-option",9),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=r.wc(5),e=r.gc(2);r.Db(4),r.nc("ngModel",e.criterion.flags),r.Db(2),r.nc("model",t)("values",e.countries)("key","flag"),r.Db(1),r.nc("ngForOf",e.countries)}}function lj(t,e){if(1&t&&(r.Vb(0,"mat-option",10),r.Qb(1,"app-flag",11),r.Kc(2),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.flag),r.Db(1),r.nc("flag",t.flag),r.Db(1),r.Mc(" ",t.name," ")}}function cj(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-select",12,7),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).criterion.flags=e}),r.Qb(2,"app-select-check-all",8),r.Ic(3,lj,3,3,"mat-option",9),r.Ub()}if(2&t){const t=r.wc(1),e=r.gc(2);r.nc("ngModel",e.criterion.flags),r.Db(2),r.nc("model",t)("values",e.countries)("key","flag"),r.Db(1),r.nc("ngForOf",e.countries)}}function hj(t,e){if(1&t&&(r.Ic(0,aj,8,5,"ng-template",2),r.Ic(1,cj,4,5,"ng-template",null,3,r.Jc)),2&t){const t=r.wc(2),e=r.gc();r.nc("ngIf",e.editable)("ngIfElse",t)}}let uj=(()=>{class t extends UU{constructor(){super(...arguments),this.countries=jI}}return t.\u0275fac=function(e){return dj(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-flag-filter"]],features:[r.Cb([{provide:rc,useExisting:t,multi:!0}]),r.Ab],decls:2,vars:4,consts:[[3,"type","enable","editable","enableChange"],[3,"ngIf"],[3,"ngIf","ngIfElse"],["readonly",""],[1,"criterion-content"],[1,"d-block","px-3"],["multiple","",3,"ngModel","ngModelChange"],["countrySelection","ngModel"],[3,"model","values","key"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[3,"flag"],["multiple","","disabled","",3,"ngModel","ngModelChange"]],template:function(t,e){1&t&&(r.Vb(0,"app-alert-rule-criterion",0),r.cc("enableChange",function(t){return e.enable=t}),r.Ic(1,hj,3,2,"ng-template",1),r.Ub()),2&t&&(r.nc("type",e.criteriaLabels.flag)("enable",e.enable)("editable",e.editable),r.Db(1),r.nc("ngIf",e.criterion.enable))},directives:[$U,ut,_u,cu,Vg,Vc,uh,tj,ct,bl,GF],encapsulation:2,changeDetection:0}),t})();const dj=r.Xb(uj);function pj(t,e){if(1&t&&(r.Vb(0,"mat-option",10),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.key),r.Db(1),r.Mc(" ",t.name," ")}}function fj(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",4),r.Vb(1,"mat-form-field",5),r.Vb(2,"mat-label"),r.Kc(3,"Types"),r.Ub(),r.Vb(4,"mat-select",6,7),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).criterion.types=e}),r.Qb(6,"app-select-check-all",8),r.Ic(7,pj,2,2,"mat-option",9),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=r.wc(5),e=r.gc(2);r.Db(4),r.nc("ngModel",e.criterion.types),r.Db(2),r.nc("model",t)("values",e.vesselTypes)("key","key"),r.Db(1),r.nc("ngForOf",e.vesselTypes)}}function mj(t,e){if(1&t&&r.Kc(0),2&t){const t=r.gc(2);r.Mc(" ",t.criteriaTypes.join(", ")," ")}}function gj(t,e){if(1&t&&(r.Ic(0,fj,8,5,"ng-template",2),r.Ic(1,mj,1,1,"ng-template",null,3,r.Jc)),2&t){const t=r.wc(2),e=r.gc();r.nc("ngIf",e.editable)("ngIfElse",t)}}let Aj=(()=>{class t extends UU{constructor(){super(...arguments),this.typesControl=new eh,this.vesselTypes=kD,this.vesselTypeLabelsByType=ED}get criteriaTypes(){return this.criterion.types.map(t=>DD[t].name)}}return t.\u0275fac=function(e){return bj(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-type-filter"]],features:[r.Cb([{provide:rc,useExisting:t,multi:!0}]),r.Ab],decls:2,vars:4,consts:[[3,"type","enable","editable","enableChange"],[3,"ngIf"],[3,"ngIf","ngIfElse"],["readonly",""],[1,"criterion-content"],[1,"d-block"],["multiple","",3,"ngModel","ngModelChange"],["typeSelection","ngModel"],[3,"model","values","key"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]],template:function(t,e){1&t&&(r.Vb(0,"app-alert-rule-criterion",0),r.cc("enableChange",function(t){return e.enable=t}),r.Ic(1,gj,3,2,"ng-template",1),r.Ub()),2&t&&(r.nc("type",e.criteriaLabels.type)("enable",e.enable)("editable",e.editable),r.Db(1),r.nc("ngIf",e.criterion.enable))},directives:[$U,ut,_u,cu,Vg,Vc,uh,tj,ct,bl],encapsulation:2,changeDetection:0}),t})();const bj=r.Xb(Aj);function vj(t,e){1&t&&r.Rb(0)}const _j=function(t){return{alert:t}};function yj(t,e){if(1&t&&r.Ic(0,vj,1,0,"ng-container",6),2&t){const t=r.gc();r.nc("ngTemplateOutlet",t.titleRef)("ngTemplateOutletContext",r.sc(2,_j,t.alert))}}function wj(t,e){1&t&&r.Rb(0)}function xj(t,e){1&t&&(r.Vb(0,"mat-icon",16),r.Kc(1,"report_off"),r.Ub())}function Cj(t,e){if(1&t&&(r.Vb(0,"div",12),r.Ic(1,wj,1,0,"ng-container",6),r.Ic(2,xj,2,0,"mat-icon",13),r.Ub(),r.Vb(3,"div",14),r.hc(4,"timeago"),r.Vb(5,"mat-icon",15),r.Kc(6,"access_time"),r.Ub(),r.Kc(7),r.hc(8,"date"),r.Ub()),2&t){const t=r.gc();r.Db(1),r.nc("ngTemplateOutlet",t.titleRef)("ngTemplateOutletContext",r.sc(11,_j,t.alert)),r.Db(1),r.nc("ngIf",t.alert.false_positive),r.Db(1),r.oc("title",r.ic(4,5,1e3*t.alert.start)),r.Db(4),r.Mc(" ",r.kc(8,7,1e3*t.alert.start,"yyyy-MM-dd HH:mm:ss z",t.mapConfigService.useUTCDates$.value&&"z")," ")}}function Sj(t,e){1&t&&r.Rb(0)}function kj(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",17),r.cc("click",function(){return r.Ac(t),r.gc().unreadAlert()}),r.Vb(1,"mat-icon"),r.Kc(2,"markunread"),r.Ub(),r.Kc(3," Marquer comme non-lu "),r.Ub()}}function Ej(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",18),r.cc("click",function(){return r.Ac(t),r.gc().readAlert()}),r.Vb(1,"mat-icon"),r.Kc(2,"drafts"),r.Ub(),r.Kc(3," Marquer comme lu "),r.Ub()}}function Dj(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",19),r.cc("click",function(){return r.Ac(t),r.gc().markAsFalsePositive()}),r.Vb(1,"mat-icon"),r.Kc(2,"report_off"),r.Ub(),r.Kc(3," Marquer comme faux-positif "),r.Ub()}}function Ij(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",20),r.cc("click",function(){return r.Ac(t),r.gc().markAsTruePositive()}),r.Vb(1,"mat-icon"),r.Kc(2,"report"),r.Ub(),r.Kc(3," Marquer comme vrai-positif "),r.Ub()}}let Pj=(()=>{class t extends LT{constructor(t,e,i,n,s){super(),this.configService=t,this.historyService=e,this.mapConfigService=i,this.mapService=n,this.workerService=s,this.highlight=!1,this.simple=!0,this.update=new r.o}ngOnInit(){this.ensureMandatoryInputParams("alert")}locateAlert(){return Object(ue.a)(this,void 0,void 0,function*(){this.configService.devMode&&console.log("locate-alert",JSON.stringify(this.alert,null,2)),this.mapService.pingLocation([this.alert.lon,this.alert.lat]),this.mapService.centerOnLonLat([this.alert.lon,this.alert.lat]),this.alert.read||(yield this.readAlert())})}locateAndZoom(){this.mapService.locate([this.alert.lon,this.alert.lat])}readAlert(){return Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.alerts.markAlertAsRead(this.alert.id),this.alert.read=!0,this.emitUpdate()})}unreadAlert(){return Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.alerts.markAlertAsUnread(this.alert.id),this.alert.read=!1,this.emitUpdate()})}markAsFalsePositive(){return Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.alerts.markAlertAsFalsePositive(this.alert.id),this.alert.false_positive=!0,this.emitUpdate()})}markAsTruePositive(){return Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.alerts.markAlertAsTruePositive(this.alert.id),this.alert.false_positive=!1,this.emitUpdate()})}emitUpdate(){this.update.emit(this.alert)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(cI),r.Pb(bI),r.Pb(hI),r.Pb(pI),r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-alert-item"]],inputs:{alert:"alert",titleRef:"titleRef",menuItemsRef:"menuItemsRef",highlight:"highlight",simple:"simple"},outputs:{update:"update"},features:[r.Ab],decls:18,vars:15,consts:[[1,"alert-item"],["mat-button","","title","Localiser l'alerte (double-clic = zoom)",1,"alert-item__content",3,"click","dblclick"],[3,"ngIf"],["mat-button","","title","Actions",1,"alert-item__actions-button",3,"matMenuTriggerFor"],[1,"u-wide-menu"],["alertActionsMenu","matMenu"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["mat-menu-item","","title","Marquer comme non-lu",3,"click",4,"ngIf"],["mat-menu-item","","title","Marquer comme lu",3,"click",4,"ngIf"],["mat-menu-item","","title","Marquer comme faux-positif",3,"click",4,"ngIf"],["mat-menu-item","","title","Marquer comme vrai-positif",3,"click",4,"ngIf"],["mat-menu-item","","title","Visualiser la situation des navires",3,"click"],[1,"alert-item__title"],["style","margin-left: .5em","title","L'alerte a \xe9t\xe9 marqu\xe9e comme \xe9tant un faux-positif",4,"ngIf"],[1,"alert-item__timestamp",3,"title"],["title","R\xe9ception",1,"mini-icon","mr-1"],["title","L'alerte a \xe9t\xe9 marqu\xe9e comme \xe9tant un faux-positif",2,"margin-left",".5em"],["mat-menu-item","","title","Marquer comme non-lu",3,"click"],["mat-menu-item","","title","Marquer comme lu",3,"click"],["mat-menu-item","","title","Marquer comme faux-positif",3,"click"],["mat-menu-item","","title","Marquer comme vrai-positif",3,"click"]],template:function(t,e){if(1&t&&(r.Vb(0,"div",0),r.Vb(1,"button",1),r.cc("click",function(){return e.locateAlert()})("dblclick",function(){return e.locateAndZoom()}),r.Ic(2,yj,1,4,"ng-template",2),r.Ic(3,Cj,9,13,"ng-template",2),r.Ub(),r.Vb(4,"button",3),r.Vb(5,"mat-icon"),r.Kc(6,"more_vert"),r.Ub(),r.Ub(),r.Vb(7,"mat-menu",4,5),r.Ic(9,Sj,1,0,"ng-container",6),r.Ic(10,kj,4,0,"button",7),r.Ic(11,Ej,4,0,"button",8),r.Ic(12,Dj,4,0,"button",9),r.Ic(13,Ij,4,0,"button",10),r.Vb(14,"button",11),r.cc("click",function(){return e.historyService.setTimestamp(e.alert.start)}),r.Vb(15,"mat-icon"),r.Kc(16,"history"),r.Ub(),r.Kc(17," Visualiser la situation des navires "),r.Ub(),r.Ub(),r.Ub()),2&t){const t=r.wc(8);r.Hb("alert-item--unread",!e.alert.read)("alert-item--highlighted",e.highlight),r.Db(2),r.nc("ngIf",!e.simple),r.Db(1),r.nc("ngIf",e.simple),r.Db(1),r.nc("matMenuTriggerFor",t),r.Db(5),r.nc("ngTemplateOutlet",e.menuItemsRef)("ngTemplateOutletContext",r.sc(13,_j,e.alert)),r.Db(1),r.nc("ngIf",e.alert.read),r.Db(1),r.nc("ngIf",!e.alert.read),r.Db(1),r.nc("ngIf",!e.alert.false_positive),r.Db(1),r.nc("ngIf",e.alert.false_positive)}},directives:[Dl,ut,sU,Yp,eU,vt,QL],pipes:[Tx,kt],styles:[".alert-item[_ngcontent-%COMP%]{flex:1;display:flex;align-items:stretch;justify-content:stretch;transition:background-color 2s ease-out;min-height:82px;padding-left:6px}.alert-item--unread[_ngcontent-%COMP%]{font-weight:600;border-left:6px solid #3778ff;padding-left:0}.alert-item--highlighted[_ngcontent-%COMP%]{background-color:#f32121;transition:0s}.alert-item__content[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;align-items:stretch;justify-content:center;line-height:24px;padding:.5em;font-weight:inherit!important;text-align:left}.alert-item__title[_ngcontent-%COMP%]{padding:0;width:100%;display:flex;justify-content:space-between;align-items:center;font-size:1.1em}.alert-item__actions-button[_ngcontent-%COMP%]{min-width:inherit!important}.alert-item__timestamp[_ngcontent-%COMP%]{color:#424242;font-weight:500;display:flex;align-items:center}"],changeDetection:0}),t})();const Oj=["alertElements"];function Mj(t,e){if(1&t&&r.Kc(0),2&t){const t=r.gc();r.Mc(" ",t.activeRulesFiltersCount>0?t.activeRulesFiltersCount+" filtre(s) de r\xe8gles actif(s)":"Aucun filtre de r\xe8gles actif"," ")}}function Tj(t,e){1&t&&r.Kc(0," Afficher les filtres ")}function Rj(t,e){if(1&t&&(r.Vb(0,"mat-option",15),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.id),r.Db(1),r.Mc(" ",t.name," ")}}function Vj(t,e){if(1&t){const t=r.Wb();r.Vb(0,"h3",6),r.Kc(1," R\xe8gles d'alertes "),r.Vb(2,"button",12),r.cc("click",function(){return r.Ac(t),r.gc().resetRulesFilters()}),r.Kc(3," R\xe9initialiser "),r.Ub(),r.Ub(),r.Vb(4,"mat-list-item"),r.Vb(5,"mat-form-field"),r.Vb(6,"mat-label"),r.Kc(7,"R\xe8gles"),r.Ub(),r.Vb(8,"mat-select",13),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc().updateAlertRulesFilter(e)}),r.Ic(9,Rj,2,2,"mat-option",14),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.Db(8),r.nc("ngModel",t.alertsFilter.rules),r.Db(1),r.nc("ngForOf",t.alertRules)}}function Fj(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-alert-item",18,19),r.cc("update",function(i){r.Ac(t);const n=e.$implicit;return r.gc(2).updateAlert(n.id,i)}),r.Ub()}if(2&t){const t=e.$implicit,i=r.gc(2);r.nc("titleRef",i.alertTitleRef)("simple",i.simpleItems)("menuItemsRef",i.alertMenuItemsRef)("alert",t)("highlight",t.id===i.highlightedAlertId),r.Eb("data-id",t.id)}}function Lj(t,e){if(1&t&&(r.Vb(0,"div",16),r.Ic(1,Fj,2,6,"app-alert-item",17),r.Ub()),2&t){const t=r.gc();r.Db(1),r.nc("ngForOf",t.displayedAlerts)("ngForTrackBy",t.trackByIndex)}}function Uj(t,e){1&t&&(r.Vb(0,"div",20),r.Kc(1," Aucune alerte ne correspond aux filtres\n"),r.Ub())}function Bj(t,e){1&t&&(r.Vb(0,"div",20),r.Kc(1," Aucune alerte pour cette p\xe9riode\n"),r.Ub())}let Nj=(()=>{class t extends LT{constructor(t,e,i,n,r){super(),this.changeDetectorRef=t,this.ngZone=e,this.alertRulesService=i,this.configService=n,this.interactionsService=r,this.enableRuleFilters=!1,this.simpleItems=!0,this.alertRules=[],this.alertsFilter=new WD,this.filteredAlerts=[],this.displayedAlerts=[],this.currentAlertsPageIndex=0,this.alertsPageSize=30,this.highlightedAlertId=null,this.alertsFilter$=new Av.a(new WD),this.currentAlertsPageIndex$=new Av.a(0),this.filteredAlerts$=new Av.a([])}ngOnInit(){if(this.ensureMandatoryInputParams("alerts$"),this.subscriptions.push(this.alertRulesService.alertRules$.pipe(Rv()).subscribe(t=>{this.alertRules=t,this.alertRules.map(t=>t.id)})),this.configService.alertsFilter){const t=this.alertRules.map(t=>t.id);this.configService.alertsFilter.rules=this.configService.alertsFilter.rules.filter(e=>t.includes(e)),this.alertsFilter$.next(this.configService.alertsFilter)}else this.resetRulesFilters();this.subscriptions.push(this.alerts$.subscribe(t=>{this.alerts=t})),this.subscriptions.push(Hg([this.alerts$,this.alertsFilter$]).pipe(Object(Ge.a)(([t,e])=>t.filter(t=>(0===e.rules.length||e.rules.includes(t.rule_id))&&(e.showReadAlerts||!t.read)&&(e.showFalsePositiveAlerts||!t.false_positive)))).subscribe(t=>{this.filteredAlerts=t,this.filteredAlerts$.next(t)})),this.subscriptions.push(Hg([this.filteredAlerts$,this.currentAlertsPageIndex$]).pipe(He(([t,e])=>{if(0===t.length&&0!==e)return this.showAlertsPage(0),!1;const i=e*this.alertsPageSize;if(0===t.slice(i,i+this.alertsPageSize).length&&t.length>0){const e=Math.ceil(t.length/this.alertsPageSize)-1;return this.showAlertsPage(-1===e?0:e),!1}return!0}),Object(Ge.a)(([t,e])=>{const i=e*this.alertsPageSize;return t.slice(i,i+this.alertsPageSize)})).subscribe(t=>{this.displayedAlerts=t,this.changeDetectorRef.markForCheck()})),this.subscriptions.push(this.alertsFilter$.subscribe(t=>{this.alertsFilter=t,this.configService.set("alertsFilter",t),this.showAlertsPage(0)})),this.subscriptions.push(this.interactionsService.selectAlertFeature$.subscribe(t=>{const e=this.getPageIndexForAlertId(t.id);-1!==e&&this.currentAlertsPageIndex!==e&&this.showAlertsPage(e),setTimeout(()=>{const e=this.alertElements.find(e=>e.nativeElement.dataset.id===t.id);e&&e.nativeElement.scrollIntoView({behavior:"smooth"})},225),this.highlightedAlertId=t.id,this.ngZone.run(()=>{setTimeout(()=>{this.highlightedAlertId=null,this.changeDetectorRef.markForCheck()},16),this.changeDetectorRef.markForCheck()})}))}get activeRulesFiltersCount(){const t=this.alertsFilter.rules.length;return t===this.alertRules.length?0:t}updateShowReadAlerts(t){this.alertsFilter.showReadAlerts=t,this.triggerAlertsFilterUpdate()}updateShowFalsePositiveAlerts(t){this.alertsFilter.showFalsePositiveAlerts=t,this.triggerAlertsFilterUpdate()}updateAlertRulesFilter(t){this.alertsFilter.rules=t,this.triggerAlertsFilterUpdate()}resetRulesFilters(){this.updateAlertRulesFilter(this.alertRules.map(t=>t.id))}triggerAlertsFilterUpdate(){this.alertsFilter$.next(this.alertsFilter)}showAlertsPage(t){this.currentAlertsPageIndex$.next(t),this.currentAlertsPageIndex=t}trackByIndex(t){return t}updateAlert(t,e){const i=this.alerts.find(e=>e.id===t);if(!i)throw new Error(`Missing alert with id '${t}'`);Object.assign(i,e),this.alerts$.next(this.alerts)}getPageIndexForAlertId(t){const e=this.filteredAlerts.findIndex(e=>e.id===t);if(-1===e)return-1;const i=Math.ceil((e+1)/this.alertsPageSize)-1;return-1===i?0:i}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(r.B),r.Pb(DP),r.Pb(cI),r.Pb(ET))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-alerts-list"]],viewQuery:function(t,e){if(1&t&&r.Pc(Oj,1,r.l),2&t){let t;r.vc(t=r.dc())&&(e.alertElements=t)}},inputs:{alerts$:"alerts$",enableRuleFilters:"enableRuleFilters",alertTitleRef:"alertTitleRef",alertMenuItemsRef:"alertMenuItemsRef",simpleItems:"simpleItems"},features:[r.Ab],decls:22,vars:13,consts:[["mat-button","","title","Filtrer les alertes",1,"alerts-list__filters",3,"color","matMenuTriggerFor"],[3,"ngIf","ngIfElse"],["disabledRuleFilters",""],[1,"u-wide-menu"],["alertsFilterMenu","matMenu"],[3,"click"],["mat-subheader",""],["color","primary",3,"ngModel","ngModelChange"],[3,"ngIf"],["class","scrollable",4,"ngIf"],["class","panel__content u-center",4,"ngIf"],["showFirstLastButtons","","hidePageSize","",3,"pageIndex","length","pageSize","page"],["mat-button","","title","R\xe9initialiser les filtres",1,"alerts-list__reset-filters-btn",3,"click"],["multiple","",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"scrollable"],[3,"titleRef","simple","menuItemsRef","alert","highlight","update",4,"ngFor","ngForOf","ngForTrackBy"],[3,"titleRef","simple","menuItemsRef","alert","highlight","update"],["alertElements",""],[1,"panel__content","u-center"]],template:function(t,e){if(1&t&&(r.Vb(0,"button",0),r.Vb(1,"mat-icon"),r.Kc(2,"filter_list"),r.Ub(),r.Ic(3,Mj,1,1,"ng-template",1),r.Ic(4,Tj,1,0,"ng-template",null,2,r.Jc),r.Ub(),r.Vb(6,"mat-menu",3,4),r.Vb(8,"mat-list",5),r.cc("click",function(t){return t.stopPropagation()}),r.Vb(9,"h2",6),r.Kc(10,"Filtres"),r.Ub(),r.Vb(11,"mat-list-item"),r.Vb(12,"mat-checkbox",7),r.cc("ngModelChange",function(t){return e.updateShowReadAlerts(t)}),r.Kc(13,"Afficher les alertes lues"),r.Ub(),r.Ub(),r.Vb(14,"mat-list-item"),r.Vb(15,"mat-checkbox",7),r.cc("ngModelChange",function(t){return e.updateShowFalsePositiveAlerts(t)}),r.Kc(16,"Afficher les faux-positifs"),r.Ub(),r.Ub(),r.Ic(17,Vj,10,2,"ng-template",8),r.Ub(),r.Ub(),r.Ic(18,Lj,2,2,"div",9),r.Ic(19,Uj,2,0,"div",10),r.Ic(20,Bj,2,0,"div",10),r.Vb(21,"mat-paginator",11),r.cc("page",function(t){return e.showAlertsPage(t.pageIndex)}),r.Ub()),2&t){const t=r.wc(5),i=r.wc(7);r.nc("color",e.activeRulesFiltersCount?"primary":"default")("matMenuTriggerFor",i),r.Db(3),r.nc("ngIf",e.enableRuleFilters)("ngIfElse",t),r.Db(9),r.nc("ngModel",e.alertsFilter.showReadAlerts),r.Db(3),r.nc("ngModel",e.alertsFilter.showFalsePositiveAlerts),r.Db(2),r.nc("ngIf",e.enableRuleFilters),r.Db(1),r.nc("ngIf",e.displayedAlerts.length),r.Db(1),r.nc("ngIf",!e.filteredAlerts.length&&e.alerts.length),r.Db(1),r.nc("ngIf",!e.alerts.length),r.Db(1),r.nc("pageIndex",e.currentAlertsPageIndex)("length",e.filteredAlerts.length)("pageSize",e.alertsPageSize)}},directives:[Dl,sU,Yp,ut,eU,yU,CU,SU,tF,Vc,uh,yA,_u,cu,Vg,ct,bl,Pj],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;overflow:hidden}.alerts-list__filters[_ngcontent-%COMP%]{background-color:#e4e7ec;width:100%}.alerts-list__reset-filters-btn[_ngcontent-%COMP%]{margin-left:2em}"],changeDetection:0}),t})();function jj(t,e){1&t&&r.Qb(0,"mat-spinner",5)}function zj(t,e){1&t&&(r.Vb(0,"mat-error",33),r.Kc(1," Ce champ ne peut \xeatre vide. "),r.Ub())}function Hj(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-form-field",27),r.Vb(1,"input",28,29),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).alertRule.name=e}),r.Ub(),r.Ic(3,zj,2,0,"mat-error",30),r.Ub(),r.Vb(4,"button",31),r.cc("click",function(){return r.Ac(t),r.gc(2).save()}),r.Vb(5,"mat-icon"),r.Kc(6,"check"),r.Ub(),r.Ub(),r.Vb(7,"button",32),r.Vb(8,"mat-icon"),r.Kc(9,"clear"),r.Ub(),r.Ub()}if(2&t){const t=r.wc(2);r.gc();const e=r.wc(1),i=r.gc();r.Db(1),r.nc("ngModel",i.alertRule.name),r.Db(2),r.nc("ngIf",null==t.errors?null:t.errors.required),r.Db(1),r.nc("disabled",!e.form.valid),r.Db(3),r.nc("routerLink",i.newRule?"/alerts/rules":"/alerts/rules/"+i.alertRule.id)}}function Kj(t,e){if(1&t){const t=r.Wb();r.Vb(0,"h2",34),r.Kc(1),r.Ub(),r.Qb(2,"div",14),r.Vb(3,"button",35),r.Vb(4,"mat-icon"),r.Kc(5,"create"),r.Ub(),r.Ub(),r.Vb(6,"button",36),r.cc("click",function(){return r.Ac(t),r.gc(2).delete()}),r.Vb(7,"mat-icon"),r.Kc(8,"delete"),r.Ub(),r.Ub()}if(2&t){const t=r.gc(2);r.Db(1),r.Mc(" ",t.alertRule.name," "),r.Db(2),r.nc("routerLink","/alerts/rules/"+t.alertRule.id+"/edit")}}function $j(t,e){1&t&&(r.Vb(0,"div",17),r.Vb(1,"mat-chip-list",12),r.Vb(2,"mat-chip",37),r.Kc(3," Configuration incorrecte "),r.Ub(),r.Ub(),r.Ub())}function Gj(t,e){1&t&&(r.Vb(0,"div",17),r.Vb(1,"mat-chip-list",12),r.Vb(2,"mat-chip",37),r.Kc(3," Configuration incorrecte "),r.Ub(),r.Ub(),r.Ub())}function Wj(t,e){if(1&t){const t=r.Wb();r.Kc(0," \xa0 "),r.Vb(1,"mat-slide-toggle",38),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).alertRule.active=e}),r.Ub()}if(2&t){const t=r.gc(2);r.Db(1),r.nc("title",t.alertRule.active?"D\xe9sactiver":"Activer")("ngModel",t.alertRule.active)}}function Zj(t,e){1&t&&(r.Vb(0,"div",39),r.Kc(1," Une r\xe8gle active va permettre au serveur d'analyser les donn\xe9es en temps r\xe9el et remonter des alertes en fonction des crit\xe8res choisis. "),r.Ub(),r.Vb(2,"div",39),r.Kc(3," Une r\xe8gle d\xe9sactiv\xe9e ne remontera aucune nouvelle alerte. "),r.Ub(),r.Qb(4,"br"))}function qj(t,e){1&t&&(r.Vb(0,"div",40),r.Kc(1," Au moins un crit\xe8re est n\xe9cessaire pour d\xe9clencher les alertes. "),r.Ub())}function Yj(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-ais-interruption-criterion",41),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).alertRule.criteria.aisInterruption=e}),r.Ub(),r.Qb(1,"mat-divider")}if(2&t){const t=r.gc(2);r.nc("ngModel",t.alertRule.criteria.aisInterruption)("editable",t.editMode)}}function Qj(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-transhipment-criterion",42),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).alertRule.criteria.transhipment=e}),r.Ub(),r.Qb(1,"mat-divider")}if(2&t){const t=r.gc(2);r.nc("ngModel",t.alertRule.criteria.transhipment)("editable",t.editMode)}}function Xj(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-erratic-route-criterion",43),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).alertRule.criteria.erraticRoute=e}),r.Ub(),r.Qb(1,"mat-divider")}if(2&t){const t=r.gc(2);r.nc("ngModel",t.alertRule.criteria.erraticRoute)("editable",t.editMode)}}function Jj(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-speed-criterion",44),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).alertRule.criteria.speed=e}),r.Ub(),r.Qb(1,"mat-divider")}if(2&t){const t=r.gc(2);r.nc("ngModel",t.alertRule.criteria.speed)("editable",t.editMode)}}function tz(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-passage-in-zone-criterion",45),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).alertRule.criteria.passageInZone=e})("updateZones",function(){return r.Ac(t),r.gc(2).refreshAlertRulesZones()}),r.Ub(),r.Qb(1,"mat-divider")}if(2&t){const t=r.gc(2);r.nc("ngModel",t.alertRule.criteria.passageInZone)("editable",t.editMode)}}function ez(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-spoofing-criterion",46),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).alertRule.criteria.spoofing=e}),r.Ub()}if(2&t){const t=r.gc(2);r.nc("ngModel",t.alertRule.criteria.spoofing)("editable",t.editMode)}}function iz(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-identifier-filter",47),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).alertRule.criteria.identifier=e}),r.Ub(),r.Qb(1,"mat-divider")}if(2&t){const t=r.gc(2);r.nc("ngModel",t.alertRule.criteria.identifier)("editable",t.editMode)}}function nz(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-fleet-filter",48),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).alertRule.criteria.fleet=e}),r.Ub(),r.Qb(1,"mat-divider")}if(2&t){const t=r.gc(2);r.nc("ngModel",t.alertRule.criteria.fleet)("editable",t.editMode)}}function rz(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-flag-filter",49),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).alertRule.criteria.flag=e}),r.Ub(),r.Qb(1,"mat-divider")}if(2&t){const t=r.gc(2);r.nc("ngModel",t.alertRule.criteria.flag)("editable",t.editMode)}}function sz(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-type-filter",50),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).alertRule.criteria.type=e}),r.Ub(),r.Qb(1,"mat-divider")}if(2&t){const t=r.gc(2);r.nc("ngModel",t.alertRule.criteria.type)("editable",t.editMode)}}function oz(t,e){if(1&t&&(r.Vb(0,"span"),r.Kc(1),r.Ub()),2&t){const t=e.alert;r.Db(1),r.Lc(t.ship_name||"MMSI: "+t.mmsi)}}const az=function(t){return["/ships/",t]};function lz(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",54),r.Vb(1,"mat-icon"),r.Kc(2,"info"),r.Ub(),r.Kc(3," Voir d\xe9tail Navire "),r.Ub(),r.Vb(4,"button",55),r.cc("click",function(){r.Ac(t);const i=e.alert;return r.gc(3).locateShip(i.mmsi)}),r.Vb(5,"mat-icon"),r.Kc(6,"center_focus_strong"),r.Ub(),r.Kc(7," Voir position Navire "),r.Ub()}2&t&&r.nc("routerLink",r.sc(1,az,e.alert.mmsi))}function cz(t,e){if(1&t&&(r.Vb(0,"h3",22),r.Kc(1,"Alertes"),r.Ub(),r.Qb(2,"app-alerts-list",51),r.Ic(3,oz,2,1,"ng-template",null,52,r.Jc),r.Ic(5,lz,8,3,"ng-template",null,53,r.Jc)),2&t){const t=r.wc(4),e=r.wc(6),i=r.gc(2);r.Db(2),r.nc("alerts$",i.alerts$)("alertTitleRef",t)("alertMenuItemsRef",e)}}function hz(t,e){if(1&t){const t=r.Wb();r.Vb(0,"ng-form",6,7),r.Vb(2,"div",8),r.Ic(3,Hj,10,4,"ng-template",4),r.Ic(4,Kj,9,2,"ng-template",4),r.Ub(),r.Vb(5,"div",9),r.Ic(6,$j,4,0,"div",10),r.Ic(7,Gj,4,0,"div",10),r.Vb(8,"div",11),r.Kc(9," \xc9tat :\xa0 "),r.Vb(10,"mat-chip-list",12),r.Vb(11,"mat-chip",13),r.Kc(12),r.Ub(),r.Ub(),r.Ic(13,Wj,2,2,"ng-template",4),r.Qb(14,"div",14),r.Vb(15,"button",15),r.cc("click",function(){r.Ac(t);const e=r.gc();return e.showColorPicker=!e.showColorPicker}),r.Ub(),r.Vb(16,"input",16),r.cc("colorPickerChange",function(e){return r.Ac(t),r.gc().alertRule.color=e})("cpToggleChange",function(e){return r.Ac(t),r.gc().showColorPicker=e}),r.Ub(),r.Ub(),r.Vb(17,"div",17),r.Ic(18,Zj,5,0,"ng-template",4),r.Vb(19,"app-glitter",18),r.Kc(20," Rapport quotidien "),r.Vb(21,"mat-icon",19),r.Kc(22,"help"),r.Ub(),r.Kc(23," :\xa0 "),r.Vb(24,"mat-slide-toggle",20),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc().alertRule.enableDailyReport=e}),r.Ub(),r.Ub(),r.Qb(25,"br"),r.Kc(26," R\xe9sum\xe9 : "),r.Qb(27,"div",21),r.Ub(),r.Qb(28,"mat-divider"),r.Vb(29,"h3",22),r.Kc(30,"Zone"),r.Ub(),r.Vb(31,"app-zone-filter",23),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc().alertRule.criteria.zone=e})("updateZones",function(){return r.Ac(t),r.gc().refreshAlertRulesZones()}),r.Ub(),r.Qb(32,"mat-divider"),r.Vb(33,"h3",22),r.Kc(34,"Crit\xe8res"),r.Ub(),r.Ic(35,qj,2,0,"div",24),r.Ic(36,Yj,2,2,"ng-template",4),r.Ic(37,Qj,2,2,"ng-template",4),r.Ic(38,Xj,2,2,"ng-template",4),r.Ic(39,Jj,2,2,"ng-template",4),r.Ic(40,tz,2,2,"ng-template",4),r.Ic(41,ez,1,2,"ng-template",4),r.Vb(42,"h3",22),r.Kc(43,"Filtres"),r.Ub(),r.Vb(44,"div",25),r.Kc(45," L'ajout de filtres \xe0 une r\xe8gle permet de diminuer le nombre d'alertes. "),r.Ub(),r.Vb(46,"h4",22),r.Kc(47,"Sur \xe9v\xe9nement"),r.Ub(),r.Vb(48,"app-time-filter",26),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc().alertRule.criteria.time=e}),r.Ub(),r.Vb(49,"h4",22),r.Kc(50,"Sur navire"),r.Ub(),r.Ic(51,iz,2,2,"ng-template",4),r.Ic(52,nz,2,2,"ng-template",4),r.Ic(53,rz,2,2,"ng-template",4),r.Ic(54,sz,2,2,"ng-template",4),r.Ic(55,cz,7,3,"ng-template",4),r.Ub(),r.Ub()}if(2&t){const t=r.wc(1),e=r.gc();r.Db(3),r.nc("ngIf",e.editMode),r.Db(1),r.nc("ngIf",!e.editMode),r.Db(2),r.nc("ngIf",t.hasError("missingZone")),r.Db(1),r.nc("ngIf",!e.editMode&&!e.alertRule.validZone),r.Db(4),r.nc("disabled",!e.alertRule.active),r.Db(1),r.Mc(" ",e.alertRule.active?"Active":"D\xe9sactiv\xe9e"," "),r.Db(1),r.nc("ngIf",e.editMode),r.Db(2),r.Fc("background-color",e.alertRule.color),r.nc("disabled",!e.editMode)("title",e.editMode?"Changer la couleur des alertes de la r\xe8gle":"Couleur des alertes de la r\xe8gle"),r.Db(1),r.nc("colorPicker",e.alertRule.color)("cpAlphaChannel","disabled")("cpOutputFormat","hex")("cpToggle",e.showColorPicker),r.Db(2),r.nc("ngIf",e.editMode),r.Db(6),r.nc("title",e.alertRule.enableDailyReport?"D\xe9sactiver le rapport":"Activer le rapport")("ngModel",e.alertRule.enableDailyReport)("disabled",!e.editMode),r.Db(3),r.nc("innerHTML",e.summary,r.Bc),r.Db(4),r.nc("ngModel",e.alertRule.criteria.zone)("editable",e.editMode),r.Db(4),r.nc("ngIf",null==t.errors?null:t.errors.missingCriterion),r.Db(1),r.nc("ngIf",e.editMode||e.alertRule.criteria.aisInterruption.enable),r.Db(1),r.nc("ngIf",e.editMode||e.alertRule.criteria.transhipment.enable),r.Db(1),r.nc("ngIf",e.editMode||e.alertRule.criteria.erraticRoute.enable),r.Db(1),r.nc("ngIf",e.editMode||e.alertRule.criteria.speed.enable),r.Db(1),r.nc("ngIf",e.editMode||e.alertRule.criteria.passageInZone.enable),r.Db(1),r.nc("ngIf",e.editMode||e.alertRule.criteria.spoofing.enable),r.Db(7),r.nc("ngModel",e.alertRule.criteria.time)("editable",e.editMode),r.Db(3),r.nc("ngIf",e.editMode||e.alertRule.criteria.identifier.enable),r.Db(1),r.nc("ngIf",e.editMode||e.alertRule.criteria.fleet.enable),r.Db(1),r.nc("ngIf",e.editMode||e.alertRule.criteria.flag.enable),r.Db(1),r.nc("ngIf",e.editMode||e.alertRule.criteria.type.enable),r.Db(1),r.nc("ngIf",!e.editMode)}}let uz=(()=>{class t extends LT{constructor(t,e,i,n,r,s,o,a,l,c,h,u,d,p){super(),this.activatedRoute=t,this.domSanitizer=e,this.router=i,this.titleService=n,this.alertsService=r,this.alertRulesService=s,this.configService=o,this.editZoneService=a,this.fleetsService=l,this.mapService=c,this.timeRangeService=h,this.zonesLayerService=u,this.uiService=d,this.workerService=p,this.alertRuleId$=new Av.a(null),this.alertRule$=new Av.a(null),this.alerts$=new Av.a([]),this.editMode=!1,this.newRule=!1,this.showColorPicker=!1,this.save=()=>Object(ue.a)(this,void 0,void 0,function*(){if(this.newRule){const t=yield this.alertRulesService.createAlertRule(this.alertRule);yield this.router.navigateByUrl(`/alerts/rules/${t}`)}else yield this.alertRulesService.updateAlertRule(this.alertRule),yield this.router.navigateByUrl(`/alerts/rules/${this.alertRule.id}`)})}get summary(){return this.domSanitizer.bypassSecurityTrustHtml(function(t,e){var i,n,r,s,o,a,l,c,h,u,d;const p=["Tous les navires "],f=[];if((null===(i=t.criteria.identifier)||void 0===i?void 0:i.enable)&&f.push(`<br>- dont les identifiants sont ${t.criteria.identifier.identifiers.map(t=>`<em>${UD(t)}</em>`).join(" OU ")}`),null===(n=t.criteria.fleet)||void 0===n?void 0:n.enable){const i=t.criteria.fleet.fleets.map(t=>{var i,n;return null===(n=null!==(i=e.find(e=>e.id===t))&&void 0!==i?i:{})||void 0===n?void 0:n.name}).filter(t=>!!t);f.push(`<br>- faisant partie ${t.criteria.fleet.fleets.length>1?"des flottes":"de la flotte"} ${i.map(t=>`<em>${UD(t)}</em>`).join(" OU ")}`)}(null===(r=t.criteria.flag)||void 0===r?void 0:r.enable)&&f.push(t.criteria.flag.flags.length<5?`<br>- de pavillon ${t.criteria.flag.flags.map(t=>`<span class="flag-icon flag-icon-${t}" style="margin-right: 5px"></span><em>${zI[t]}</em>`).join(" OU ")}`:`<br>- de ${t.criteria.flag.flags.length} pavillons`),(null===(s=t.criteria.type)||void 0===s?void 0:s.enable)&&f.push(`<br>- de type ${t.criteria.type.types.map(t=>`<em>${DD[t].name}</em>`).join(" OU ")}`),f.length>0&&(p.push(":"),p.push(f.join("")),p.push("<br>"));const m=[];if((null===(o=t.criteria.aisInterruption)||void 0===o?void 0:o.enable)&&m.push("<br>- coup\xe9 leur transmission AIS"),(null===(a=t.criteria.transhipment)||void 0===a?void 0:a.enable)&&m.push("<br>- particip\xe9 \xe0 un transbordement"),(null===(l=t.criteria.erraticRoute)||void 0===l?void 0:l.enable)&&m.push("<br>- navigu\xe9 de fa\xe7on erratique"),(null===(c=t.criteria.speed)||void 0===c?void 0:c.enable)&&m.push(`<br>- eu une vitesse entre <em>${t.criteria.speed.min}</em> et <em>${t.criteria.speed.max}</em> noeuds`),null===(h=t.criteria.passageInZone)||void 0===h?void 0:h.enable){const e=t.criteria.passageInZone.sequential?" PUIS ":" ET ";m.push(`<br>- navigu\xe9 dans ${t.criteria.passageInZone.passages.length>1?"les zones":"la zone"} ${t.criteria.passageInZone.passages.map(t=>`<em>${UD(t.zone.name)}</em>`).join(e)}`),t.criteria.passageInZone.passages.length>1&&m.push(` dans un intervalle de ${UI[t.criteria.passageInZone.timeWindow]}`)}return(null===(u=t.criteria.spoofing)||void 0===u?void 0:u.enable)&&m.push("<br>- modifi\xe9 ses identifiants AIS"),0===m.length?"Il faut s\xe9lectionner au moins un crit\xe8re avant d'avoir une r\xe8gle applicable":(p.push("ayant :"),p.push(m.join("")),(null===(d=t.criteria.zone)||void 0===d?void 0:d.enable)&&p.push(`<br>dans ${t.criteria.zone.zones.length>1?"les zones":"la zone"} ${t.criteria.zone.zones.map(t=>`<em>${UD(t.name)}</em>`).join(" OU ")}`),p.push("."),p.join(""))}(this.alertRule,this.fleetsService.fleets$.value))}ngOnInit(){this.subscriptions.push(this.activatedRoute.data.subscribe(t=>{this.editMode=!!t.edit,this.newRule=!!t.new})),this.subscriptions.push(this.alertRuleId$.pipe(Gg(1)).subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){this.editMode?yield this.editAlertRule(t):yield this.viewAlertRule(t)}))),this.subscriptions.push(this.activatedRoute.paramMap.subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){this.newRule?(this.alertRule=function(){const t={name:"",active:!0,criteria:{},color:"#5e12e2",enableDailyReport:!1,validZone:!1};return NI(t.criteria),t}(),this.titleService.setTitle("Nouvelle r\xe8gle - ANAIS"),this.mapService.hasBooted||this.mapService.resetToDefaultView()):this.alertRuleId$.next(t.get("alertRuleId"))}))),this.subscriptions.push(this.alertRule$.pipe(Gg(1)).subscribe(t=>{this.titleService.setTitle(`R\xe8gle ${t.name} - ANAIS`),this.alertRule=t,this.refreshAlertRulesSummary(),this.refreshAlertRulesZones()})),this.editMode||this.subscriptions.push(Hg([this.alertRuleId$,this.timeRangeService.timeRange$]).subscribe(([t,e])=>Object(ue.a)(this,void 0,void 0,function*(){if(t){const i=yield this.workerService.alertRules.getAlertRuleAlerts(t,e.start,e.end),[n,r]=this.alertRulesService.getAlertRuleColor(t);i.forEach(t=>{t.color=n,t.rgbVecColor=r}),this.alertsService.updateAlerts(i),this.alerts$.next(i)}}))),this.editMode&&this.subscriptions.push(this.editZoneService.editedZone$.pipe(Gg(1),mn(),fI(0)).subscribe(t=>{t||(this.refreshAlertRulesZones(),this.refreshAlertRulesSummary())}))}ngOnDestroy(){super.ngOnDestroy(),this.zonesLayerService.clear(),this.editZoneService.cancelEditing(),this.alertsService.updateAlerts([]),this.alertRulesService.deselectAlertRule()}editAlertRule(t){return Object(ue.a)(this,void 0,void 0,function*(){yield this.fetchAlertRule(t)})}viewAlertRule(t){return Object(ue.a)(this,void 0,void 0,function*(){this.alertRuleId!==t&&(this.alertRuleId=t),yield this.fetchAlertRule(t)})}refreshAlertRulesZones(){var t;this.zonesLayerService.updateZones([].concat((t=this.alertRule).criteria.passageInZone.enable?t.criteria.passageInZone.passages.flatMap(t=>t.zone):[]).concat(t.criteria.zone.enable?t.criteria.zone.zones:[]))}refreshAlertRulesSummary(){}delete(){this.uiService.confirm({title:"Suppression",message:"Une fois supprim\xe9e, cette r\xe8gle ne sera plus accessible. Confirmez-vous la suppression de cette r\xe8gle ?",action:t=>Object(ue.a)(this,void 0,void 0,function*(){t&&(yield this.alertRulesService.deleteAlertRule(this.alertRule.id),yield this.router.navigateByUrl("/alerts/rules"))})})}locateShip(t){return Object(ue.a)(this,void 0,void 0,function*(){const e=yield this.workerService.ships.getShip(t);this.mapService.centerOnLonLat([e.lon,e.lat])})}fetchAlertRule(t){return Object(ue.a)(this,void 0,void 0,function*(){try{this.alertRule$.next(yield this.alertRulesService.selectAlertRule(t))}catch(e){if(e.notfound)throw this.router.navigateByUrl("/alerts/rules").catch(()=>{}),new Error(`La r\xe8gle <${t}> n'existe pas.`);throw e}})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(N_),r.Pb(ne),r.Pb(sw),r.Pb(he),r.Pb(IP),r.Pb(DP),r.Pb(cI),r.Pb(sL),r.Pb(OT),r.Pb(pI),r.Pb(yT),r.Pb(DT),r.Pb(VI),r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-alert-rule-panel"]],features:[r.Ab],decls:8,vars:2,consts:[[1,"panel"],[1,"d-flex",2,"background-color","#fff"],["mat-button","","title","Revenir \xe0 la liste","routerLink","/alerts/rules",1,"back-button"],["class","spinner","strokeWidth","4","diameter","80",4,"ngIf"],[3,"ngIf"],["strokeWidth","4","diameter","80",1,"spinner"],["name","form","appAlertRule","",1,"alert-rule-panel","panel","unscrollable"],["form","ngForm"],[1,"panel__header"],[1,"scrollable"],["class","panel__content",4,"ngIf"],[1,"panel__content","alert-rule-panel__header"],[1,"d-inline"],["color","primary","selected","","disableRipple","",3,"disabled"],[1,"u-flex"],["mat-mini-fab","",1,"alert-rule-panel__color-picker-button",3,"disabled","title","click"],["name","color",1,"alert-rule-panel__color-picker-attach",3,"colorPicker","cpAlphaChannel","cpOutputFormat","cpToggle","colorPickerChange","cpToggleChange"],[1,"panel__content"],["gid","daily-report","date","2021-07-02","width","200","height","24"],["matTooltip","Activer pour recevoir par email un rapport quotidien des alertes de la veille (jours UTC)","matTooltipPosition","above",1,"help-icon"],["name","enableDailyReport","color","primary",3,"title","ngModel","disabled","ngModelChange"],[1,"alert-rule-panel__summary",3,"innerHTML"],[1,"panel__subtitle"],["name","zone",3,"ngModel","editable","ngModelChange","updateZones"],["class","criterion-content alert-rule-panel__error-msg",4,"ngIf"],[1,"criterion-content"],["name","time",3,"ngModel","editable","ngModelChange"],[1,"alert-rule-panel__name-input"],["matInput","","name","name","placeholder","Nom de la r\xe8gle","required","","maxlength","64",3,"ngModel","ngModelChange"],["name","ngModel"],["class","input-error",4,"ngIf"],["mat-button","","color","primary","title","Enregistrer les changements","data-test","save-rule",3,"disabled","click"],["mat-button","","title","Annuler l'\xe9dition",3,"routerLink"],[1,"input-error"],[1,"panel__title"],["mat-button","","title","Modifier",3,"routerLink"],["mat-button","","color","warn","title","Supprimer la r\xe8gle",3,"click"],["color","warn","selected","","disableRipple","","title","La configuration de cette r\xe8gle est incorrecte. Elle doit contenir au moins une zone de filtrage."],["name","active","color","primary",3,"title","ngModel","ngModelChange"],[1,"alert-rule-panel__description"],[1,"criterion-content","alert-rule-panel__error-msg"],["name","aisInterruption",3,"ngModel","editable","ngModelChange"],["name","transhipment",3,"ngModel","editable","ngModelChange"],["name","erraticRoute",3,"ngModel","editable","ngModelChange"],["name","speed",3,"ngModel","editable","ngModelChange"],["name","passageInZone",3,"ngModel","editable","ngModelChange","updateZones"],["name","spoofing",3,"ngModel","editable","ngModelChange"],["name","identifier",3,"ngModel","editable","ngModelChange"],["name","fleet",3,"ngModel","editable","ngModelChange"],["name","flag",3,"ngModel","editable","ngModelChange"],["name","type",3,"ngModel","editable","ngModelChange"],[3,"alerts$","alertTitleRef","alertMenuItemsRef"],["alertTitleRef",""],["alertMenuItemsRef",""],["mat-menu-item","",3,"routerLink"],["mat-menu-item","",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"a",2),r.Vb(3,"mat-icon"),r.Kc(4,"arrow_back_ios"),r.Ub(),r.Kc(5," R\xe8gles d'alerte "),r.Ub(),r.Ub(),r.Ic(6,jj,1,0,"mat-spinner",3),r.Ic(7,hz,56,36,"ng-template",4),r.Ub()),2&t&&(r.Db(6),r.nc("ngIf",!e.alertRule),r.Db(1),r.nc("ngIf",e.alertRule))},directives:[Il,aw,Yp,ut,fF,oh,oL,_L,pL,Dl,mv,DL,oA,NL,Vc,uh,GT,FU,tB,_u,Ou,ac,Ih,Th,ow,nu,iB,rB,oB,uB,yN,wN,XN,sj,uj,Aj,Nj,QL],styles:["[_nghost-%COMP%]{display:flex;overflow:hidden}.back-button[_ngcontent-%COMP%]{line-height:36px}.alert-rule-panel__name-input[_ngcontent-%COMP%]{margin:.5em;flex:1;font-size:20px}.alert-rule-panel__header[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap}.alert-rule-panel__color-picker-button[_ngcontent-%COMP%]{margin-left:16px;margin-right:8px;height:30px;width:30px} .alert-rule-panel__color-picker-button.mat-fab:not(.mat-button-disabled):active:not([class*=mat-elevation-z]), .alert-rule-panel__color-picker-button.mat-mini-fab:not(.mat-button-disabled):active:not([class*=mat-elevation-z]){box-shadow:0 5px 7px -2px rgba(0,0,0,.2),0 8px 14px 2px rgba(0,0,0,.14),0 4px 20px 2px rgba(0,0,0,.12)!important}.alert-rule-panel__color-picker-attach[_ngcontent-%COMP%]{opacity:0;width:1px;height:1px;pointer-events:none}.alert-rule-panel__description[_ngcontent-%COMP%]{margin-top:.5em;font-size:14px}.alert-rule-panel__summary[_ngcontent-%COMP%] em{font-size:1.1em;font-weight:500;font-style:normal;color:#1515a6}.alert-rule-panel__error-msg[_ngcontent-%COMP%]{color:#ce1d1d}"]}),t})();function dz(t,e){1&t&&(r.Vb(0,"mat-chip",13),r.Kc(1,"D\xe9sactiv\xe9e"),r.Ub()),2&t&&r.nc("disabled",!0)}function pz(t,e){1&t&&(r.Vb(0,"mat-chip",14),r.Kc(1," Incorrecte "),r.Ub())}function fz(t,e){if(1&t&&(r.Vb(0,"li"),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Nc("",t.criteriaLabels.identifier.title," : ",t.alertRule.criteria.identifier.identifiers.join(", "),"")}}function mz(t,e){if(1&t&&(r.Vb(0,"li"),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Nc("",t.criteriaLabels.fleet.title," : ",t.fleets,"")}}function gz(t,e){1&t&&r.Qb(0,"app-flag",18),2&t&&r.nc("flag",e.$implicit)}function Az(t,e){if(1&t&&r.Ic(0,gz,1,1,"app-flag",17),2&t){const t=r.gc(2);r.nc("ngForOf",t.alertRule.criteria.flag.flags)}}function bz(t,e){if(1&t&&r.Kc(0),2&t){const t=r.gc(2);r.Mc(" ",t.alertRule.criteria.flag.flags.length," pavillons ")}}function vz(t,e){if(1&t&&(r.Vb(0,"li"),r.Kc(1),r.Ic(2,Az,1,1,"ng-template",15),r.Ic(3,bz,1,1,"ng-template",null,16,r.Jc),r.Ub()),2&t){const t=r.wc(4),e=r.gc();r.Db(1),r.Mc(" ",e.criteriaLabels.flag.title," : "),r.Db(1),r.nc("ngIf",e.alertRule.criteria.flag.flags.length<5)("ngIfElse",t)}}function _z(t,e){if(1&t&&(r.Vb(0,"li"),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Nc("",t.criteriaLabels.type.title," : ",t.types,"")}}function yz(t,e){if(1&t&&(r.Vb(0,"li"),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Oc("",t.criteriaLabels.speed.title," : [",t.alertRule.criteria.speed.min,", ",t.alertRule.criteria.speed.max,"]")}}function wz(t,e){if(1&t&&(r.Vb(0,"li"),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Lc(t.criteriaLabels.erraticRoute.title)}}function xz(t,e){if(1&t&&(r.Vb(0,"li"),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Lc(t.criteriaLabels.transhipment.title)}}function Cz(t,e){if(1&t&&(r.Vb(0,"li"),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Lc(t.criteriaLabels.aisInterruption.title)}}function Sz(t,e){if(1&t&&(r.Vb(0,"li"),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Nc("",t.criteriaLabels.passageInZone.title," : ",t.passages,"")}}function kz(t,e){if(1&t&&(r.Vb(0,"li"),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Lc(t.criteriaLabels.spoofing.title)}}function Ez(t,e){if(1&t&&(r.Vb(0,"li"),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Nc("",t.criteriaLabels.zone.title," : ",t.zones,"")}}let Dz=(()=>{class t extends LT{constructor(t){super(),this.fleetsService=t,this.criteriaLabels=LU,this.countriesLabelByFlag=zI}get passages(){return this.alertRule.criteria.passageInZone.passages.map(t=>t.zone.name).join(", ")}get fleets(){return this.alertRule.criteria.fleet.fleets.map(t=>{var e;return(null!==(e=this.fleetsService.fleetsById[t])&&void 0!==e?e:{}).name}).join(", ")}get zones(){return this.alertRule.criteria.zone.zones.map(t=>t.name).join(", ")}get types(){return this.alertRule.criteria.type.types.map(t=>DD[t].name).join(", ")}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(OT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-alert-rule-item"]],inputs:{alertRule:"alertRule"},features:[r.Ab],decls:28,vars:16,consts:[[1,"alert-rule-item"],[1,"alert-rule-item__header"],[1,"alert-rule-item__title"],[1,"d-inline","u-flex","alert-rule-item__state"],["color","primary","selected","","disableRipple","",3,"disabled",4,"ngIf"],["color","warn","selected","","disableRipple","","title","La configuration de cette r\xe8gle est incorrecte. Elle doit contenir au moins une zone de filtrage.",4,"ngIf"],[1,"alert-rule-item__indicators"],["title","Statistiques",1,"mr-1"],["title","Nombre d'alertes lev\xe9es au cours des derni\xe8res 24 heures"],[1,"mx-1"],["title","Nombre d'alertes lev\xe9es au cours des 7 derniers jours"],[1,"alert-rule-item__criteria"],[4,"ngIf"],["color","primary","selected","","disableRipple","",3,"disabled"],["color","warn","selected","","disableRipple","","title","La configuration de cette r\xe8gle est incorrecte. Elle doit contenir au moins une zone de filtrage."],[3,"ngIf","ngIfElse"],["tooManyFlags",""],["style","margin: 4px",3,"flag",4,"ngFor","ngForOf"],[2,"margin","4px",3,"flag"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"h4",1),r.Vb(2,"div",2),r.Kc(3),r.Ub(),r.Vb(4,"mat-chip-list",3),r.Ic(5,dz,2,1,"mat-chip",4),r.Ic(6,pz,2,0,"mat-chip",5),r.Ub(),r.Vb(7,"div",6),r.Vb(8,"mat-icon",7),r.Kc(9,"trending_up"),r.Ub(),r.Vb(10,"span",8),r.Kc(11),r.Ub(),r.Vb(12,"span",9),r.Kc(13,"/"),r.Ub(),r.Vb(14,"span",10),r.Kc(15),r.Ub(),r.Ub(),r.Ub(),r.Vb(16,"ul",11),r.Ic(17,fz,2,2,"li",12),r.Ic(18,mz,2,2,"li",12),r.Ic(19,vz,5,3,"li",12),r.Ic(20,_z,2,2,"li",12),r.Ic(21,yz,2,3,"li",12),r.Ic(22,wz,2,1,"li",12),r.Ic(23,xz,2,1,"li",12),r.Ic(24,Cz,2,1,"li",12),r.Ic(25,Sz,2,2,"li",12),r.Ic(26,kz,2,1,"li",12),r.Ic(27,Ez,2,2,"li",12),r.Ub(),r.Ub()),2&t&&(r.Db(3),r.Lc(e.alertRule.name),r.Db(2),r.nc("ngIf",!e.alertRule.active),r.Db(1),r.nc("ngIf",!e.alertRule.validZone),r.Db(5),r.Lc(e.alertRule.alertsSummary.lastDay),r.Db(4),r.Lc(e.alertRule.alertsSummary.lastWeek),r.Db(2),r.nc("ngIf",e.alertRule.criteria.identifier.enable),r.Db(1),r.nc("ngIf",e.alertRule.criteria.fleet.enable),r.Db(1),r.nc("ngIf",e.alertRule.criteria.flag.enable),r.Db(1),r.nc("ngIf",e.alertRule.criteria.type.enable),r.Db(1),r.nc("ngIf",e.alertRule.criteria.speed.enable),r.Db(1),r.nc("ngIf",e.alertRule.criteria.erraticRoute.enable),r.Db(1),r.nc("ngIf",e.alertRule.criteria.transhipment.enable),r.Db(1),r.nc("ngIf",e.alertRule.criteria.aisInterruption.enable),r.Db(1),r.nc("ngIf",e.alertRule.criteria.passageInZone.enable),r.Db(1),r.nc("ngIf",e.alertRule.criteria.spoofing.enable),r.Db(1),r.nc("ngIf",e.alertRule.criteria.zone.enable))},directives:[_L,ut,Yp,pL,ct,GF],styles:[".alert-rule-item__header[_ngcontent-%COMP%]{color:#1515a6;text-align:left;margin-top:8px;display:flex;align-items:center}.alert-rule-item__title[_ngcontent-%COMP%]{word-break:break-word;margin-right:8px}.alert-rule-item__state[_ngcontent-%COMP%]{pointer-events:none;touch-action:none}.alert-rule-item__indicators[_ngcontent-%COMP%]{font-size:14px;margin-left:8px;display:flex;align-items:center;pointer-events:all!important}.alert-rule-item__criteria[_ngcontent-%COMP%]{text-align:left;margin:0;line-height:18px;padding-left:1em}"],changeDetection:0}),t})();function Iz(t,e){1&t&&r.Qb(0,"mat-spinner",4)}function Pz(t,e){1&t&&(r.Vb(0,"p",6),r.Kc(1,"Aucune r\xe8gle n'a \xe9t\xe9 configur\xe9e."),r.Ub())}function Oz(t,e){1&t&&(r.Vb(0,"div",10),r.Vb(1,"mat-icon",11),r.Kc(2,"warning"),r.Ub(),r.Kc(3," La configuration de certaines r\xe8gles est incorrecte. Veuillez revoir leur configuration afin de les rendre \xe0 nouveau effectives. "),r.Ub())}function Mz(t,e){if(1&t&&(r.Vb(0,"button",12),r.Qb(1,"app-alert-rule-item",13),r.Ub()),2&t){const t=e.$implicit;r.pc("routerLink","/alerts/rules/",t.id,""),r.Db(1),r.nc("alertRule",t)}}function Tz(t,e){if(1&t&&(r.Vb(0,"p",6),r.Kc(1),r.Ub(),r.Ic(2,Oz,4,0,"div",7),r.Vb(3,"div",8),r.Ic(4,Mz,2,2,"button",9),r.Ub()),2&t){const t=r.gc(2);r.Db(1),r.Mc("Vous avez configur\xe9 ",t.alertRules.length," r\xe8gles d'alerte."),r.Db(1),r.nc("ngIf",t.containsInvalidAlertRule),r.Db(2),r.nc("ngForOf",t.alertRules)}}function Rz(t,e){if(1&t&&(r.Ic(0,Pz,2,0,"p",5),r.Ic(1,Tz,5,3,"ng-template",3)),2&t){const t=r.gc();r.nc("ngIf",0===t.alertRules.length),r.Db(1),r.nc("ngIf",t.alertRules.length>0)}}let Vz=(()=>{class t extends LT{constructor(t,e,i){super(),this.titleService=t,this.alertRulesService=e,this.mapService=i}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.titleService.setTitle("Liste des r\xe8gles - ANAIS"),this.mapService.hasBooted||this.mapService.resetToDefaultView(),this.alertRulesService.alertRules$.subscribe(t=>{this.alertRules=t,this.containsInvalidAlertRule=t.some(t=>!t.validZone)})})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(he),r.Pb(DP),r.Pb(pI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-alert-rules-panel"]],features:[r.Ab],decls:5,vars:2,consts:[["joyrideStep","rules-panel","stepPosition","right","title","R\xe8gles d'alertes","text","C'est ici que vous pouvez cr\xe9er et visualiser des r\xe8gles personnalis\xe9es afin d'\xeatre alert\xe9 automatiquement de comportements de navires r\xe9pondant \xe0 des algorithmes et des filtres que vous aurez choisis. Par exemple: navires avec pavillon espagnol, de type p\xeacheur, \xe9tant pass\xe9s \xe0 proximit\xe9 des c\xf4tes Corse et ayant transbord\xe9.",1,"panel"],["mat-button","","color","primary","routerLink","/alerts/rules/new"],["class","spinner","strokeWidth","4","diameter","80",4,"ngIf"],[3,"ngIf"],["strokeWidth","4","diameter","80",1,"spinner"],["class","panel__content",4,"ngIf"],[1,"panel__content"],["class","d-flex-center error-message panel__content mat-body",4,"ngIf"],[1,"alert-rules-panel__rules","scrollable"],["mat-button","",3,"routerLink",4,"ngFor","ngForOf"],[1,"d-flex-center","error-message","panel__content","mat-body"],[1,"mr-2"],["mat-button","",3,"routerLink"],[3,"alertRule"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"button",1),r.Kc(2,"Nouvelle r\xe8gle"),r.Ub(),r.Ic(3,Iz,1,0,"mat-spinner",2),r.Ic(4,Rz,2,2,"ng-template",3),r.Ub()),2&t&&(r.Db(3),r.nc("ngIf",!e.alertRules),r.Db(1),r.nc("ngIf",e.alertRules))},directives:[ax,Dl,ow,ut,fF,ct,Yp,Dz],styles:["[_nghost-%COMP%]{display:flex;overflow:hidden}.alert-rules-panel__rules[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:stretch}.alert-rules-panel__rules[_ngcontent-%COMP%] .mat-button{white-space:normal}"]}),t})();function Fz(t,e){if(1&t&&(r.Vb(0,"div",10),r.Vb(1,"mat-icon",11),r.Kc(2,"access_time"),r.Ub(),r.Vb(3,"div",12),r.hc(4,"timeago"),r.Kc(5),r.hc(6,"date"),r.Ub(),r.Ub()),2&t){const t=r.gc();r.Db(3),r.oc("title",r.ic(4,2,1e3*t.ship.timestamp)),r.Db(2),r.Mc(" ",r.kc(6,4,1e3*t.ship.timestamp,"yyyy-MM-dd HH:mm:ss z",t.useUTCDates&&"z")," ")}}let Lz=(()=>{class t extends LT{constructor(t,e){super(),this.changeDetectorRef=t,this.mapConfigService=e,this.showTimestamp=!1,this.useUTCDates=!1,this.vesselTypeLabelsByType=ED}ngOnInit(){this.ensureMandatoryInputParams("ship"),this.subscriptions.push(this.mapConfigService.useUTCDates$.subscribe(t=>{this.useUTCDates=t,this.changeDetectorRef.markForCheck()}))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-ship-item-small"]],inputs:{ship:"ship",showTimestamp:"showTimestamp"},features:[r.Ab],decls:23,vars:7,consts:[[1,"ship-item"],[1,"ship-item__col1"],[1,"u-flex","d-flex-center"],[1,"ship-item__flag",3,"mmsi"],[1,"d-flex-column"],[1,"ship-item__name"],[1,"ship-item__type"],["class","ship-item__timestamp","title","Derni\xe8re r\xe9ception",4,"ngIf"],[1,"ship-item__col2"],[1,"ship-item__label"],["title","Derni\xe8re r\xe9ception",1,"ship-item__timestamp"],[1,"mini-icon","mr-1"],[3,"title"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"div",2),r.Qb(3,"app-flag",3),r.Vb(4,"div",4),r.Vb(5,"div",5),r.Kc(6),r.Ub(),r.Vb(7,"small",6),r.Kc(8),r.Ub(),r.Ub(),r.Ub(),r.Ic(9,Fz,7,8,"div",7),r.Ub(),r.Vb(10,"div",8),r.Vb(11,"div"),r.Vb(12,"span",9),r.Kc(13,"MMSI"),r.Ub(),r.Kc(14),r.Ub(),r.Vb(15,"div"),r.Vb(16,"span",9),r.Kc(17,"IMO"),r.Ub(),r.Kc(18),r.Ub(),r.Vb(19,"div"),r.Vb(20,"span",9),r.Kc(21,"Callsign"),r.Ub(),r.Kc(22),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(3),r.nc("mmsi",e.ship.mmsi),r.Db(3),r.Lc(e.ship.name||"?"),r.Db(2),r.Lc(e.ship.cargo?e.vesselTypeLabelsByType[e.ship.cargo]:"?"),r.Db(1),r.nc("ngIf",e.showTimestamp),r.Db(5),r.Mc(" ",e.ship.mmsi,""),r.Db(4),r.Mc(" ",e.ship.imo||"?",""),r.Db(4),r.Mc(" ",e.ship.callsign||"?",""))},directives:[GF,ut,Yp],pipes:[Tx,kt],styles:["[_nghost-%COMP%]{flex:1;display:block;position:relative}.ship-item[_ngcontent-%COMP%]{font-size:12px;line-height:16px;display:flex}.ship-item__col1[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column}.ship-item__col2[_ngcontent-%COMP%]{display:flex;flex-direction:column;text-align:right}.ship-item__flag[_ngcontent-%COMP%]{margin-right:4px}.ship-item__name[_ngcontent-%COMP%]{font-size:14px}.ship-item__type[_ngcontent-%COMP%]{line-height:1em;font-size:11px}.ship-item__timestamp[_ngcontent-%COMP%]{margin-top:4px;display:flex;align-items:center;color:grey}.ship-item__timestamp[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%]{font-size:1em;height:1em;width:1em;margin-right:.3em;margin-left:.3em}.ship-item__label[_ngcontent-%COMP%]{color:grey;font-size:10px}"],changeDetection:0}),t})();function Uz(t,e){1&t&&r.Qb(0,"mat-spinner",5)}function Bz(t,e){if(1&t&&(r.Vb(0,"div",6),r.Vb(1,"div",7),r.Vb(2,"div",8),r.Vb(3,"mat-icon",9),r.Kc(4,"trending_up"),r.Ub(),r.Kc(5," Dernier jour "),r.Ub(),r.Kc(6),r.Ub(),r.Vb(7,"div",10),r.Vb(8,"div",8),r.Vb(9,"mat-icon",9),r.Kc(10,"trending_up"),r.Ub(),r.Kc(11," Derni\xe8re semaine "),r.Ub(),r.Kc(12),r.Ub(),r.Ub()),2&t){const t=r.gc();r.Db(6),r.Mc(" ",t.alertsSummary.lastDay," "),r.Db(6),r.Mc(" ",t.alertsSummary.lastWeek," ")}}function Nz(t,e){1&t&&r.Qb(0,"mat-spinner",5)}function jz(t,e){if(1&t&&(r.Vb(0,"div",14),r.Vb(1,"mat-icon",9),r.Kc(2,"warning"),r.Ub(),r.Kc(3),r.Ub(),r.Qb(4,"app-ship-item-small",15),r.Vb(5,"div",16),r.hc(6,"timeago"),r.Vb(7,"mat-icon",17),r.Kc(8,"access_time"),r.Ub(),r.Kc(9),r.hc(10,"date"),r.Ub()),2&t){const t=e.alert,i=r.gc(2);r.Db(3),r.Mc(" ",t.rule_name," "),r.Db(1),r.nc("ship",t.ship),r.Db(1),r.oc("title",r.ic(6,4,1e3*t.start)),r.Db(4),r.Mc(" ",r.kc(10,6,1e3*t.start,"yyyy-MM-dd HH:mm:ss z",i.useUTCDates&&"z")," ")}}const zz=function(t){return["/alerts/rules/",t]},Hz=function(t){return["/ships/",t]};function Kz(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",18),r.Vb(1,"mat-icon"),r.Kc(2,"info"),r.Ub(),r.Kc(3," Voir la r\xe8gle "),r.Ub(),r.Vb(4,"button",18),r.Vb(5,"mat-icon"),r.Kc(6,"info"),r.Ub(),r.Kc(7," Voir d\xe9tail Navire "),r.Ub(),r.Vb(8,"button",19),r.cc("click",function(){r.Ac(t);const i=e.alert;return r.gc(2).locateShip(i.mmsi)}),r.Vb(9,"mat-icon"),r.Kc(10,"center_focus_strong"),r.Ub(),r.Kc(11," Voir position actuelle Navire "),r.Ub()}if(2&t){const t=e.alert;r.nc("routerLink",r.sc(2,zz,t.rule_id)),r.Db(4),r.nc("routerLink",r.sc(4,Hz,t.mmsi))}}function $z(t,e){if(1&t&&(r.Qb(0,"app-alerts-list",11),r.Ic(1,jz,11,10,"ng-template",null,12,r.Jc),r.Ic(3,Kz,12,6,"ng-template",null,13,r.Jc)),2&t){const t=r.wc(2),e=r.wc(4),i=r.gc();r.nc("alerts$",i.alerts$)("enableRuleFilters",!0)("simpleItems",!1)("alertTitleRef",t)("alertMenuItemsRef",e)}}let Gz=(()=>{class t extends LT{constructor(t,e,i,n,r,s,o){super(),this.titleService=t,this.alertRulesService=e,this.alertsService=i,this.mapService=n,this.mapConfigService=r,this.timeRangeService=s,this.workerService=o,this.alerts$=new Av.a([]),this.alertsSummary=null,this.alertsLoaded=!1,this.useUTCDates=!1}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.titleService.setTitle("Alertes - ANAIS"),this.subscriptions.push(this.mapConfigService.useUTCDates$.subscribe(t=>{this.useUTCDates=t}),this.timeRangeService.timeRange$.subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){const e=yield this.workerService.alerts.list(t.start,t.end);e.forEach(t=>{const[e,i]=this.alertRulesService.getAlertRuleColor(t.rule_id);t.color=e,t.rgbVecColor=i}),this.alertsService.updateAlerts(e),this.alerts$.next(e),this.alertsLoaded=!0})),Object(or.a)(Se(0),AT(3e5)).subscribe(()=>Object(ue.a)(this,void 0,void 0,function*(){this.alertsSummary=yield this.workerService.alerts.getAlertsSummary()})))})}ngOnDestroy(){super.ngOnDestroy(),this.alertsService.updateAlerts([])}locateShip(t){return Object(ue.a)(this,void 0,void 0,function*(){const e=yield this.workerService.ships.getShip(t);this.mapService.pingLocation([e.lon,e.lat]),this.mapService.centerOnLonLat([e.lon,e.lat])})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(he),r.Pb(DP),r.Pb(IP),r.Pb(pI),r.Pb(hI),r.Pb(yT),r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-alerts-dashboard"]],features:[r.Ab],decls:9,vars:4,consts:[["joyrideStep","alerts-panel","stepPosition","right","title","Tableau de bord des alertes","text","Cet endroit contient un tableau de bord de toutes les alertes lev\xe9es par toutes vos r\xe8gles.",1,"panel"],[1,"panel__title"],["class","small-spinner","strokeWidth","4","diameter","60",4,"ngIf"],["class","d-flex",4,"ngIf"],[3,"ngIf"],["strokeWidth","4","diameter","60",1,"small-spinner"],[1,"d-flex"],["title","Nombre d'alertes lev\xe9es au cours des derni\xe8res 24 heures",1,"indicator","mat-elevation-z8"],[1,"indicator__label"],[1,"mr-1"],["title","Nombre d'alertes lev\xe9es au cours des 7 derniers jours",1,"indicator","mat-elevation-z8"],[3,"alerts$","enableRuleFilters","simpleItems","alertTitleRef","alertMenuItemsRef"],["alertTitleRef",""],["alertMenuItemsRef",""],[1,"d-flex-center"],[1,"alert__ship",3,"ship"],[1,"alert__timestamp",3,"title"],["title","Date de l'alerte",1,"mini-icon","mr-1"],["mat-menu-item","",3,"routerLink"],["mat-menu-item","",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"h2",1),r.Kc(2,"Indicateurs"),r.Ub(),r.Ic(3,Uz,1,0,"mat-spinner",2),r.Ic(4,Bz,13,2,"div",3),r.Vb(5,"h2",1),r.Kc(6,"Listes des alertes"),r.Ub(),r.Ic(7,Nz,1,0,"mat-spinner",2),r.Ic(8,$z,5,5,"ng-template",4),r.Ub()),2&t&&(r.Db(3),r.nc("ngIf",!e.alertsSummary),r.Db(1),r.nc("ngIf",e.alertsSummary),r.Db(3),r.nc("ngIf",!e.alertsLoaded),r.Db(1),r.nc("ngIf",e.alertsLoaded))},directives:[ax,ut,fF,Yp,Nj,Lz,QL,ow],pipes:[Tx,kt],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;overflow:hidden}.indicator[_ngcontent-%COMP%]{flex:1;position:relative;margin:8px;font-size:1.5em;justify-content:center;min-height:3em;padding:.7em 8px 8px;border-radius:4px}.indicator[_ngcontent-%COMP%], .indicator__label[_ngcontent-%COMP%]{display:flex;align-items:center}.indicator__label[_ngcontent-%COMP%]{position:absolute;top:0;left:4px;color:#8c8c8c;font-size:12px}.alert__ship[_ngcontent-%COMP%]{border-left:1px solid grey;padding-left:3px;display:block}.alert__timestamp[_ngcontent-%COMP%]{color:grey;display:flex;align-items:center}"]}),t})();const Wz=["*"],Zz=["tabListContainer"],qz=["tabList"],Yz=["nextPaginator"],Qz=["previousPaginator"],Xz=["mat-tab-nav-bar",""],Jz=new r.s("MatInkBarPositioner",{providedIn:"root",factory:function(){return t=>({left:t?(t.offsetLeft||0)+"px":"0",width:t?(t.offsetWidth||0)+"px":"0"})}});let tH=(()=>{class t{constructor(t,e,i,n){this._elementRef=t,this._ngZone=e,this._inkBarPositioner=i,this._animationMode=n}alignToElement(t){this.show(),"undefined"!=typeof requestAnimationFrame?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this._setStyles(t))}):this._setStyles(t)}show(){this._elementRef.nativeElement.style.visibility="visible"}hide(){this._elementRef.nativeElement.style.visibility="hidden"}_setStyles(t){const e=this._inkBarPositioner(t),i=this._elementRef.nativeElement;i.style.left=e.left,i.style.width=e.width}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.B),r.Pb(Jz),r.Pb(pa,8))},t.\u0275dir=r.Kb({type:t,selectors:[["mat-ink-bar"]],hostAttrs:[1,"mat-ink-bar"],hostVars:2,hostBindings:function(t,e){2&t&&r.Hb("_mat-animation-noopable","NoopAnimations"===e._animationMode)}}),t})();const eH=Ai({passive:!0});let iH=(()=>{class t{constructor(t,e,i,n,s,o,a){this._elementRef=t,this._changeDetectorRef=e,this._viewportRuler=i,this._dir=n,this._ngZone=s,this._platform=o,this._animationMode=a,this._scrollDistance=0,this._selectedIndexChanged=!1,this._destroyed=new _e.a,this._showPaginationControls=!1,this._disableScrollAfter=!0,this._disableScrollBefore=!0,this._stopScrolling=new _e.a,this.disablePagination=!1,this._selectedIndex=0,this.selectFocusedIndex=new r.o,this.indexFocused=new r.o,s.runOutsideAngular(()=>{en(t.nativeElement,"mouseleave").pipe(Sn(this._destroyed)).subscribe(()=>{this._stopInterval()})})}get selectedIndex(){return this._selectedIndex}set selectedIndex(t){t=ei(t),this._selectedIndex!=t&&(this._selectedIndexChanged=!0,this._selectedIndex=t,this._keyManager&&this._keyManager.updateActiveItem(t))}ngAfterViewInit(){en(this._previousPaginator.nativeElement,"touchstart",eH).pipe(Sn(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("before")}),en(this._nextPaginator.nativeElement,"touchstart",eH).pipe(Sn(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("after")})}ngAfterContentInit(){const t=this._dir?this._dir.change:Se(null),e=this._viewportRuler.change(150),i=()=>{this.updatePagination(),this._alignInkBarToSelectedTab()};this._keyManager=new Ri(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap(),this._keyManager.updateActiveItem(this._selectedIndex),"undefined"!=typeof requestAnimationFrame?requestAnimationFrame(i):i(),Object(or.a)(t,e,this._items.changes).pipe(Sn(this._destroyed)).subscribe(()=>{Promise.resolve().then(i),this._keyManager.withHorizontalOrientation(this._getLayoutDirection())}),this._keyManager.change.pipe(Sn(this._destroyed)).subscribe(t=>{this.indexFocused.emit(t),this._setTabFocus(t)})}ngAfterContentChecked(){this._tabLabelCount!=this._items.length&&(this.updatePagination(),this._tabLabelCount=this._items.length,this._changeDetectorRef.markForCheck()),this._selectedIndexChanged&&(this._scrollToLabel(this._selectedIndex),this._checkScrollingControls(),this._alignInkBarToSelectedTab(),this._selectedIndexChanged=!1,this._changeDetectorRef.markForCheck()),this._scrollDistanceChanged&&(this._updateTabScrollPosition(),this._scrollDistanceChanged=!1,this._changeDetectorRef.markForCheck())}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete(),this._stopScrolling.complete()}_handleKeydown(t){if(!ke(t))switch(t.keyCode){case 13:case 32:this.focusIndex!==this.selectedIndex&&(this.selectFocusedIndex.emit(this.focusIndex),this._itemSelected(t));break;default:this._keyManager.onKeydown(t)}}_onContentChanges(){const t=this._elementRef.nativeElement.textContent;t!==this._currentTextContent&&(this._currentTextContent=t||"",this._ngZone.run(()=>{this.updatePagination(),this._alignInkBarToSelectedTab(),this._changeDetectorRef.markForCheck()}))}updatePagination(){this._checkPaginationEnabled(),this._checkScrollingControls(),this._updateTabScrollPosition()}get focusIndex(){return this._keyManager?this._keyManager.activeItemIndex:0}set focusIndex(t){this._isValidIndex(t)&&this.focusIndex!==t&&this._keyManager&&this._keyManager.setActiveItem(t)}_isValidIndex(t){if(!this._items)return!0;const e=this._items?this._items.toArray()[t]:null;return!!e&&!e.disabled}_setTabFocus(t){if(this._showPaginationControls&&this._scrollToLabel(t),this._items&&this._items.length){this._items.toArray()[t].focus();const e=this._tabListContainer.nativeElement,i=this._getLayoutDirection();e.scrollLeft="ltr"==i?0:e.scrollWidth-e.offsetWidth}}_getLayoutDirection(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}_updateTabScrollPosition(){if(this.disablePagination)return;const t=this.scrollDistance,e="ltr"===this._getLayoutDirection()?-t:t;this._tabList.nativeElement.style.transform=`translateX(${Math.round(e)}px)`,(this._platform.TRIDENT||this._platform.EDGE)&&(this._tabListContainer.nativeElement.scrollLeft=0)}get scrollDistance(){return this._scrollDistance}set scrollDistance(t){this._scrollTo(t)}_scrollHeader(t){return this._scrollTo(this._scrollDistance+("before"==t?-1:1)*this._tabListContainer.nativeElement.offsetWidth/3)}_handlePaginatorClick(t){this._stopInterval(),this._scrollHeader(t)}_scrollToLabel(t){if(this.disablePagination)return;const e=this._items?this._items.toArray()[t]:null;if(!e)return;const i=this._tabListContainer.nativeElement.offsetWidth,{offsetLeft:n,offsetWidth:r}=e.elementRef.nativeElement;let s,o;"ltr"==this._getLayoutDirection()?(s=n,o=s+r):(o=this._tabList.nativeElement.offsetWidth-n,s=o-r);const a=this.scrollDistance,l=this.scrollDistance+i;s<a?this.scrollDistance-=a-s+60:o>l&&(this.scrollDistance+=o-l+60)}_checkPaginationEnabled(){if(this.disablePagination)this._showPaginationControls=!1;else{const t=this._tabList.nativeElement.scrollWidth>this._elementRef.nativeElement.offsetWidth;t||(this.scrollDistance=0),t!==this._showPaginationControls&&this._changeDetectorRef.markForCheck(),this._showPaginationControls=t}}_checkScrollingControls(){this.disablePagination?this._disableScrollAfter=this._disableScrollBefore=!0:(this._disableScrollBefore=0==this.scrollDistance,this._disableScrollAfter=this.scrollDistance==this._getMaxScrollDistance(),this._changeDetectorRef.markForCheck())}_getMaxScrollDistance(){return this._tabList.nativeElement.scrollWidth-this._tabListContainer.nativeElement.offsetWidth||0}_alignInkBarToSelectedTab(){const t=this._items&&this._items.length?this._items.toArray()[this.selectedIndex]:null,e=t?t.elementRef.nativeElement:null;e?this._inkBar.alignToElement(e):this._inkBar.hide()}_stopInterval(){this._stopScrolling.next()}_handlePaginatorPress(t,e){e&&null!=e.button&&0!==e.button||(this._stopInterval(),wn(650,100).pipe(Sn(Object(or.a)(this._stopScrolling,this._destroyed))).subscribe(()=>{const{maxScrollDistance:e,distance:i}=this._scrollHeader(t);(0===i||i>=e)&&this._stopInterval()}))}_scrollTo(t){if(this.disablePagination)return{maxScrollDistance:0,distance:0};const e=this._getMaxScrollDistance();return this._scrollDistance=Math.max(0,Math.min(e,t)),this._scrollDistanceChanged=!0,this._checkScrollingControls(),{maxScrollDistance:e,distance:this._scrollDistance}}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(r.h),r.Pb(nr),r.Pb(Zn,8),r.Pb(r.B),r.Pb(ci),r.Pb(pa,8))},t.\u0275dir=r.Kb({type:t,inputs:{disablePagination:"disablePagination"}}),t})(),nH=(()=>{class t extends iH{constructor(t,e,i,n,r,s,o){super(t,n,r,e,i,s,o),this._disableRipple=!1,this.color="primary"}get backgroundColor(){return this._backgroundColor}set backgroundColor(t){const e=this._elementRef.nativeElement.classList;e.remove(`mat-background-${this.backgroundColor}`),t&&e.add(`mat-background-${t}`),this._backgroundColor=t}get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=ti(t)}_itemSelected(){}ngAfterContentInit(){this._items.changes.pipe(Pn(null),Sn(this._destroyed)).subscribe(()=>{this.updateActiveLink()}),super.ngAfterContentInit()}updateActiveLink(){if(!this._items)return;const t=this._items.toArray();for(let e=0;e<t.length;e++)if(t[e].active)return this.selectedIndex=e,void this._changeDetectorRef.markForCheck();this.selectedIndex=-1,this._inkBar.hide()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(Zn,8),r.Pb(r.B),r.Pb(r.h),r.Pb(nr),r.Pb(ci),r.Pb(pa,8))},t.\u0275dir=r.Kb({type:t,inputs:{color:"color",backgroundColor:"backgroundColor",disableRipple:"disableRipple"},features:[r.Ab]}),t})(),rH=(()=>{class t extends nH{constructor(t,e,i,n,r,s,o){super(t,e,i,n,r,s,o)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(Zn,8),r.Pb(r.B),r.Pb(r.h),r.Pb(nr),r.Pb(ci),r.Pb(pa,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["","mat-tab-nav-bar",""]],contentQueries:function(t,e,i){if(1&t&&r.Ib(i,lH,1),2&t){let t;r.vc(t=r.dc())&&(e._items=t)}},viewQuery:function(t,e){if(1&t&&(r.Pc(tH,3),r.Pc(Zz,3),r.Pc(qz,3),r.Pc(Yz,1),r.Pc(Qz,1)),2&t){let t;r.vc(t=r.dc())&&(e._inkBar=t.first),r.vc(t=r.dc())&&(e._tabListContainer=t.first),r.vc(t=r.dc())&&(e._tabList=t.first),r.vc(t=r.dc())&&(e._nextPaginator=t.first),r.vc(t=r.dc())&&(e._previousPaginator=t.first)}},hostAttrs:[1,"mat-tab-nav-bar","mat-tab-header"],hostVars:10,hostBindings:function(t,e){2&t&&r.Hb("mat-tab-header-pagination-controls-enabled",e._showPaginationControls)("mat-tab-header-rtl","rtl"==e._getLayoutDirection())("mat-primary","warn"!==e.color&&"accent"!==e.color)("mat-accent","accent"===e.color)("mat-warn","warn"===e.color)},inputs:{color:"color"},exportAs:["matTabNavBar","matTabNav"],features:[r.Ab],attrs:Xz,ngContentSelectors:Wz,decls:13,vars:8,consts:[["aria-hidden","true","mat-ripple","",1,"mat-tab-header-pagination","mat-tab-header-pagination-before","mat-elevation-z4",3,"matRippleDisabled","click","mousedown","touchend"],["previousPaginator",""],[1,"mat-tab-header-pagination-chevron"],[1,"mat-tab-link-container",3,"keydown"],["tabListContainer",""],[1,"mat-tab-list",3,"cdkObserveContent"],["tabList",""],[1,"mat-tab-links"],["aria-hidden","true","mat-ripple","",1,"mat-tab-header-pagination","mat-tab-header-pagination-after","mat-elevation-z4",3,"matRippleDisabled","mousedown","click","touchend"],["nextPaginator",""]],template:function(t,e){1&t&&(r.mc(),r.Vb(0,"div",0,1),r.cc("click",function(){return e._handlePaginatorClick("before")})("mousedown",function(t){return e._handlePaginatorPress("before",t)})("touchend",function(){return e._stopInterval()}),r.Qb(2,"div",2),r.Ub(),r.Vb(3,"div",3,4),r.cc("keydown",function(t){return e._handleKeydown(t)}),r.Vb(5,"div",5,6),r.cc("cdkObserveContent",function(){return e._onContentChanges()}),r.Vb(7,"div",7),r.lc(8),r.Ub(),r.Qb(9,"mat-ink-bar"),r.Ub(),r.Ub(),r.Vb(10,"div",8,9),r.cc("mousedown",function(t){return e._handlePaginatorPress("after",t)})("click",function(){return e._handlePaginatorClick("after")})("touchend",function(){return e._stopInterval()}),r.Qb(12,"div",2),r.Ub()),2&t&&(r.Hb("mat-tab-header-pagination-disabled",e._disableScrollBefore),r.nc("matRippleDisabled",e._disableScrollBefore||e.disableRipple),r.Db(5),r.Hb("_mat-animation-noopable","NoopAnimations"===e._animationMode),r.Db(5),r.Hb("mat-tab-header-pagination-disabled",e._disableScrollAfter),r.nc("matRippleDisabled",e._disableScrollAfter||e.disableRipple))},directives:[il,xi,tH],styles:['.mat-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mat-tab-header-pagination{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:transparent;touch-action:none}.mat-tab-header-pagination-controls-enabled .mat-tab-header-pagination{display:flex}.mat-tab-header-pagination-before,.mat-tab-header-rtl .mat-tab-header-pagination-after{padding-left:4px}.mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-rtl .mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-tab-header-rtl .mat-tab-header-pagination-before,.mat-tab-header-pagination-after{padding-right:4px}.mat-tab-header-rtl .mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;content:"";height:8px;width:8px}.mat-tab-header-pagination-disabled{box-shadow:none;cursor:default}.mat-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-tab-links{display:flex}[mat-align-tabs=center]>.mat-tab-link-container .mat-tab-links{justify-content:center}[mat-align-tabs=end]>.mat-tab-link-container .mat-tab-links{justify-content:flex-end}.mat-ink-bar{position:absolute;bottom:0;height:2px;transition:500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable.mat-ink-bar{transition:none;animation:none}.mat-tab-group-inverted-header .mat-ink-bar{bottom:auto;top:0}.cdk-high-contrast-active .mat-ink-bar{outline:solid 2px;height:0}.mat-tab-link-container{display:flex;flex-grow:1;overflow:hidden;z-index:1}.mat-tab-link{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;vertical-align:top;text-decoration:none;position:relative;overflow:hidden;-webkit-tap-highlight-color:transparent}.mat-tab-link:focus{outline:none}.mat-tab-link:focus:not(.mat-tab-disabled){opacity:1}.cdk-high-contrast-active .mat-tab-link:focus{outline:dotted 2px;outline-offset:-2px}.mat-tab-link.mat-tab-disabled{cursor:default}.cdk-high-contrast-active .mat-tab-link.mat-tab-disabled{opacity:.5}.mat-tab-link .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}.cdk-high-contrast-active .mat-tab-link{opacity:1}[mat-stretch-tabs] .mat-tab-link{flex-basis:0;flex-grow:1}.mat-tab-link.mat-tab-disabled{pointer-events:none}@media(max-width: 599px){.mat-tab-link{min-width:72px}}\n'],encapsulation:2}),t})();class sH{}const oH=Ia(Da(ka(sH)));let aH=(()=>{class t extends oH{constructor(t,e,i,n,r,s){super(),this._tabNavBar=t,this.elementRef=e,this._focusMonitor=r,this._isActive=!1,this.rippleConfig=i||{},this.tabIndex=parseInt(n)||0,"NoopAnimations"===s&&(this.rippleConfig.animation={enterDuration:0,exitDuration:0})}get active(){return this._isActive}set active(t){ti(t)!==this._isActive&&(this._isActive=t,this._tabNavBar.updateActiveLink())}get rippleDisabled(){return this.disabled||this.disableRipple||this._tabNavBar.disableRipple||!!this.rippleConfig.disabled}focus(){this.elementRef.nativeElement.focus()}ngAfterViewInit(){this._focusMonitor.monitor(this.elementRef)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this.elementRef)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(nH),r.Pb(r.l),r.Pb(el,8),r.ac("tabindex"),r.Pb(qi),r.Pb(pa,8))},t.\u0275dir=r.Kb({type:t,inputs:{active:"active"},features:[r.Ab]}),t})(),lH=(()=>{class t extends aH{constructor(t,e,i,n,r,s,o,a){super(t,e,r,s,o,a),this._tabLinkRipple=new tl(this,i,e,n),this._tabLinkRipple.setupTriggerEvents(e.nativeElement)}ngOnDestroy(){super.ngOnDestroy(),this._tabLinkRipple._removeTriggerEvents()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(rH),r.Pb(r.l),r.Pb(r.B),r.Pb(ci),r.Pb(el,8),r.ac("tabindex"),r.Pb(qi),r.Pb(pa,8))},t.\u0275dir=r.Kb({type:t,selectors:[["","mat-tab-link",""],["","matTabLink",""]],hostAttrs:[1,"mat-tab-link","mat-focus-indicator"],hostVars:7,hostBindings:function(t,e){2&t&&(r.Eb("aria-current",e.active?"page":null)("aria-disabled",e.disabled)("tabIndex",e.tabIndex),r.Hb("mat-tab-disabled",e.disabled)("mat-tab-label-active",e.active))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex"},exportAs:["matTabLink"],features:[r.Ab]}),t})(),cH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Et,Sa,ve,nl,Ci,Ji],Sa]}),t})();function hH(t,e){if(1&t&&(r.Vb(0,"a",3,4),r.Kc(2),r.Ub()),2&t){const t=e.$implicit,i=r.wc(1);r.pc("title","Onglet ",t.label,""),r.nc("routerLink",t.link)("active",i.isActive),r.Db(2),r.Mc(" ",t.label," ")}}let uH=(()=>{class t extends LT{constructor(t){super(),this.mapService=t,this.tabs=[{label:"Alertes",link:"/alerts/dashboard"},{label:"R\xe8gles",link:"/alerts/rules"}]}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.mapService.hasBooted||this.mapService.resetToDefaultView()})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(pI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-alerts-panel"]],features:[r.Ab],decls:4,vars:1,consts:[[1,"panel"],["mat-tab-nav-bar","","mat-align-tabs","center",1,"tabs"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active","title",4,"ngFor","ngForOf"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active","title"],["rla","routerLinkActive"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"nav",1),r.Ic(2,hH,3,4,"a",2),r.Ub(),r.Qb(3,"router-outlet"),r.Ub()),2&t&&(r.Db(2),r.nc("ngForOf",e.tabs))},directives:[rH,ct,hw,aw,lH,cw],styles:[".tabs[_ngcontent-%COMP%]{background-color:#f2c94c}"]}),t})();var dH=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),pH=function(t){function e(e){var i=t.call(this)||this;return i.id_=void 0,i.geometryName_="geometry",i.style_=null,i.styleFunction_=void 0,i.geometryChangeKey_=null,i.addEventListener(UE(i.geometryName_),i.handleGeometryChanged_),e&&("function"==typeof e.getSimplifiedGeometry?i.setGeometry(e):i.setProperties(e)),i}return dH(e,t),e.prototype.clone=function(){var t=new e(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());var i=this.getGeometry();i&&t.setGeometry(i.clone());var n=this.getStyle();return n&&t.setStyle(n),t},e.prototype.getGeometry=function(){return this.get(this.geometryName_)},e.prototype.getId=function(){return this.id_},e.prototype.getGeometryName=function(){return this.geometryName_},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.handleGeometryChange_=function(){this.changed()},e.prototype.handleGeometryChanged_=function(){this.geometryChangeKey_&&(ik(this.geometryChangeKey_),this.geometryChangeKey_=null);var t=this.getGeometry();t&&(this.geometryChangeKey_=tk(t,"change",this.handleGeometryChange_,this)),this.changed()},e.prototype.setGeometry=function(t){this.set(this.geometryName_,t)},e.prototype.setStyle=function(t){var e,i;this.style_=t,this.styleFunction_=t?"function"==typeof(e=t)?e:(Array.isArray(e)?i=e:(yS("function"==typeof e.getZIndex,41),i=[e]),function(){return i}):void 0,this.changed()},e.prototype.setId=function(t){this.id_=t,this.changed()},e.prototype.setGeometryName=function(t){this.removeEventListener(UE(this.geometryName_),this.handleGeometryChanged_),this.geometryName_=t,this.addEventListener(UE(this.geometryName_),this.handleGeometryChanged_),this.handleGeometryChanged_()},e}(BE),fH=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function mH(t){for(var e=[],i=0,n=t.length;i<n;++i)e.push(t[i].clone());return e}var gH=function(t){function e(e){var i=t.call(this)||this;return i.geometries_=e||null,i.changeEventsKeys_=[],i.listenGeometriesChange_(),i}return fH(e,t),e.prototype.unlistenGeometriesChange_=function(){this.changeEventsKeys_.forEach(ik),this.changeEventsKeys_.length=0},e.prototype.listenGeometriesChange_=function(){if(this.geometries_)for(var t=0,e=this.geometries_.length;t<e;++t)this.changeEventsKeys_.push(tk(this.geometries_[t],"change",this.changed,this))},e.prototype.clone=function(){var t=new e(null);return t.setGeometries(this.geometries_),t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,i,n){if(n<SS(this.getExtent(),t,e))return n;for(var r=this.geometries_,s=0,o=r.length;s<o;++s)n=r[s].closestPointXY(t,e,i,n);return n},e.prototype.containsXY=function(t,e){for(var i=this.geometries_,n=0,r=i.length;n<r;++n)if(i[n].containsXY(t,e))return!0;return!1},e.prototype.computeExtent=function(t){OS(t);for(var e=this.geometries_,i=0,n=e.length;i<n;++i)VS(t,e[i].getExtent());return t},e.prototype.getGeometries=function(){return mH(this.geometries_)},e.prototype.getGeometriesArray=function(){return this.geometries_},e.prototype.getGeometriesArrayRecursive=function(){for(var t=[],e=this.geometries_,i=0,n=e.length;i<n;++i)e[i].getType()===this.getType()?t=t.concat(e[i].getGeometriesArrayRecursive()):t.push(e[i]);return t},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<this.simplifiedGeometryMaxMinSquaredTolerance)return this;for(var i=[],n=this.geometries_,r=!1,s=0,o=n.length;s<o;++s){var a=n[s],l=a.getSimplifiedGeometry(t);i.push(l),l!==a&&(r=!0)}if(r){var c=new e(null);return c.setGeometriesArray(i),c}return this.simplifiedGeometryMaxMinSquaredTolerance=t,this},e.prototype.getType=function(){return"GeometryCollection"},e.prototype.intersectsExtent=function(t){for(var e=this.geometries_,i=0,n=e.length;i<n;++i)if(e[i].intersectsExtent(t))return!0;return!1},e.prototype.isEmpty=function(){return 0===this.geometries_.length},e.prototype.rotate=function(t,e){for(var i=this.geometries_,n=0,r=i.length;n<r;++n)i[n].rotate(t,e);this.changed()},e.prototype.scale=function(t,e,i){var n=i;n||(n=HS(this.getExtent()));for(var r=this.geometries_,s=0,o=r.length;s<o;++s)r[s].scale(t,e,n);this.changed()},e.prototype.setGeometries=function(t){this.setGeometriesArray(mH(t))},e.prototype.setGeometriesArray=function(t){this.unlistenGeometriesChange_(),this.geometries_=t,this.listenGeometriesChange_(),this.changed()},e.prototype.applyTransform=function(t){for(var e=this.geometries_,i=0,n=e.length;i<n;++i)e[i].applyTransform(t);this.changed()},e.prototype.translate=function(t,e){for(var i=this.geometries_,n=0,r=i.length;n<r;++n)i[n].translate(t,e);this.changed()},e.prototype.disposeInternal=function(){this.unlistenGeometriesChange_(),t.prototype.disposeInternal.call(this)},e}(AM),AH=function(){function t(){this.dataProjection=null,this.defaultFeatureProjection=null}return t.prototype.getReadOptions=function(t,e){var i;if(e){var n=e.dataProjection?eE(e.dataProjection):this.readProjection(t);e.extent&&n&&n.getUnits()===ck.TILE_PIXELS&&(n=eE(n)).setWorldExtent(e.extent),i={dataProjection:n,featureProjection:e.featureProjection}}return this.adaptOptions(i)},t.prototype.adaptOptions=function(t){return zC({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},t)},t.prototype.getType=function(){return ZC()},t.prototype.readFeature=function(t,e){return ZC()},t.prototype.readFeatures=function(t,e){return ZC()},t.prototype.readGeometry=function(t,e){return ZC()},t.prototype.readProjection=function(t){return ZC()},t.prototype.writeFeature=function(t,e){return ZC()},t.prototype.writeFeatures=function(t,e){return ZC()},t.prototype.writeGeometry=function(t,e){return ZC()},t}();function bH(t,e,i){var n,r=i?eE(i.featureProjection):null,s=i?eE(i.dataProjection):null;if(n=r&&s&&!aE(r,s)?(e?t.clone():t).transform(e?r:s,e?s:r):t,e&&i&&void 0!==i.decimals){var o=Math.pow(10,i.decimals);n===t&&(n=t.clone()),n.applyTransform(function(t){for(var e=0,i=t.length;e<i;++e)t[e]=Math.round(t[e]*o)/o;return t})}return n}var vH=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function _H(t){return"string"==typeof t?JSON.parse(t)||null:null!==t?t:null}var yH=function(t){function e(){return t.call(this)||this}return vH(e,t),e.prototype.getType=function(){return"json"},e.prototype.readFeature=function(t,e){return this.readFeatureFromObject(_H(t),this.getReadOptions(t,e))},e.prototype.readFeatures=function(t,e){return this.readFeaturesFromObject(_H(t),this.getReadOptions(t,e))},e.prototype.readFeatureFromObject=function(t,e){return ZC()},e.prototype.readFeaturesFromObject=function(t,e){return ZC()},e.prototype.readGeometry=function(t,e){return this.readGeometryFromObject(_H(t),this.getReadOptions(t,e))},e.prototype.readGeometryFromObject=function(t,e){return ZC()},e.prototype.readProjection=function(t){return this.readProjectionFromObject(_H(t))},e.prototype.readProjectionFromObject=function(t){return ZC()},e.prototype.writeFeature=function(t,e){return JSON.stringify(this.writeFeatureObject(t,e))},e.prototype.writeFeatureObject=function(t,e){return ZC()},e.prototype.writeFeatures=function(t,e){return JSON.stringify(this.writeFeaturesObject(t,e))},e.prototype.writeFeaturesObject=function(t,e){return ZC()},e.prototype.writeGeometry=function(t,e){return JSON.stringify(this.writeGeometryObject(t,e))},e.prototype.writeGeometryObject=function(t,e){return ZC()},e}(AH);function wH(t,e,i,n,r,s,o){var a,l,c=(i-e)/n;if(1===c)a=e;else if(2===c)a=e,l=r;else if(0!==c){for(var h=t[e],u=t[e+1],d=0,p=[0],f=e+n;f<i;f+=n){var m=t[f],g=t[f+1];d+=Math.sqrt((m-h)*(m-h)+(g-u)*(g-u)),p.push(d),h=m,u=g}var A=r*d,b=function(t,e,i){for(var n,r,s=TC,o=0,a=t.length,l=!1;o<a;)(r=+s(t[n=o+(a-o>>1)],e))<0?o=n+1:(a=n,l=!r);return l?o:~o}(p,A);b<0?(l=(A-p[-b-2])/(p[-b-1]-p[-b-2]),a=e+(-b-2)*n):a=e+b*n}var v=o>1?o:2,_=s||new Array(v);for(f=0;f<v;++f)_[f]=void 0===a?NaN:void 0===l?t[a+f]:vk(t[a+f],t[a+n+f],l);return _}function xH(t,e,i,n,r,s){if(i==e)return null;var o;if(r<t[e+n-1])return s?((o=t.slice(e,e+n))[n-1]=r,o):null;if(t[i-1]<r)return s?((o=t.slice(i-n,i))[n-1]=r,o):null;if(r==t[e+n-1])return t.slice(e,e+n);for(var a=e/n,l=i/n;a<l;){var c=a+l>>1;r<t[(c+1)*n-1]?l=c:a=c+1}var h=t[a*n-1];if(r==h)return t.slice((a-1)*n,(a-1)*n+n);var u=(r-h)/(t[(a+1)*n-1]-h);o=[];for(var d=0;d<n-1;++d)o.push(vk(t[(a-1)*n+d],t[a*n+d],u));return o.push(r),o}function CH(t,e,i,n){for(var r=t[e],s=t[e+1],o=0,a=e+n;a<i;a+=n){var l=t[a],c=t[a+1];o+=Math.sqrt((l-r)*(l-r)+(c-s)*(c-s)),r=l,s=c}return o}var SH=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),kH=function(t){function e(e,i){var n=t.call(this)||this;return n.flatMidpoint_=null,n.flatMidpointRevision_=-1,n.maxDelta_=-1,n.maxDeltaRevision_=-1,void 0===i||Array.isArray(e[0])?n.setCoordinates(e,i):n.setFlatCoordinates(i,e),n}return SH(e,t),e.prototype.appendCoordinate=function(t){this.flatCoordinates?LC(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,i,n){return n<SS(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(wM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),CM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,i,n))},e.prototype.forEachSegment=function(t){return GM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinateAtM=function(t,e){return"XYM"!=this.layout&&"XYZM"!=this.layout?null:xH(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,void 0!==e&&e)},e.prototype.getCoordinates=function(){return TM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinateAt=function(t,e){return wH(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)},e.prototype.getLength=function(){return CH(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getFlatMidpoint=function(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[];return i.length=IM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i,0),new e(i,"XY")},e.prototype.getType=function(){return"LineString"},e.prototype.intersectsExtent=function(t){return WM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=EM(this.flatCoordinates,0,t,this.stride),this.changed()},e}(_M),EH=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),DH=function(t){function e(e,i,n){var r=t.call(this)||this;if(r.ends_=[],r.maxDelta_=-1,r.maxDeltaRevision_=-1,Array.isArray(e[0]))r.setCoordinates(e,i);else if(void 0!==i&&n)r.setFlatCoordinates(i,e),r.ends_=n;else{for(var s=r.getLayout(),o=e,a=[],l=[],c=0,h=o.length;c<h;++c){var u=o[c];0===c&&(s=u.getLayout()),LC(a,u.getFlatCoordinates()),l.push(a.length)}r.setFlatCoordinates(s,a),r.ends_=l}return r}return EH(e,t),e.prototype.appendLineString=function(t){this.flatCoordinates?LC(this.flatCoordinates,t.getFlatCoordinates().slice()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,i,n){return n<SS(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(xM(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),SM(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,e,i,n))},e.prototype.getCoordinateAtM=function(t,e,i){return"XYM"!=this.layout&&"XYZM"!=this.layout||0===this.flatCoordinates.length?null:function(t,e,i,n,r,s,o){if(o)return xH(t,e,i[i.length-1],n,r,s);var a;if(r<t[n-1])return s?((a=t.slice(0,n))[n-1]=r,a):null;if(t[t.length-1]<r)return s?((a=t.slice(t.length-n))[n-1]=r,a):null;for(var l=0,c=i.length;l<c;++l){var h=i[l];if(e!=h){if(r<t[e+n-1])return null;if(r<=t[h-1])return xH(t,e,h,n,r,!1);e=h}}return null}(this.flatCoordinates,0,this.ends_,this.stride,t,void 0!==e&&e,void 0!==i&&i)},e.prototype.getCoordinates=function(){return RM(this.flatCoordinates,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getLineString=function(t){return t<0||this.ends_.length<=t?null:new kH(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLineStrings=function(){for(var t=this.flatCoordinates,e=this.ends_,i=this.layout,n=[],r=0,s=0,o=e.length;s<o;++s){var a=e[s],l=new kH(t.slice(r,a),i);n.push(l),r=a}return n},e.prototype.getFlatMidpoints=function(){for(var t=[],e=this.flatCoordinates,i=0,n=this.ends_,r=this.stride,s=0,o=n.length;s<o;++s){var a=n[s];LC(t,wH(e,i,a,r,.5)),i=a}return t},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[],n=[];return i.length=function(t,e,i,n,r,s,o,a){for(var l=0,c=i.length;l<c;++l){var h=i[l];o=IM(t,e,h,n,r,s,o),a.push(o),e=h}return o}(this.flatCoordinates,0,this.ends_,this.stride,t,i,0,n),new e(i,"XY",n)},e.prototype.getType=function(){return"MultiLineString"},e.prototype.intersectsExtent=function(t){return function(t,e,i,n,r){for(var s=0,o=i.length;s<o;++s){if(WM(t,e,i[s],n,r))return!0;e=i[s]}return!1}(this.flatCoordinates,0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=DM(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()},e}(_M),IH=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),PH=function(t){function e(e,i){var n=t.call(this)||this;return i&&!Array.isArray(e[0])?n.setFlatCoordinates(i,e):n.setCoordinates(e,i),n}return IH(e,t),e.prototype.appendPoint=function(t){this.flatCoordinates?LC(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,i,n){if(n<SS(this.getExtent(),t,e))return n;for(var r=this.flatCoordinates,s=this.stride,o=0,a=r.length;o<a;o+=s){var l=mk(t,e,r[o],r[o+1]);if(l<n){n=l;for(var c=0;c<s;++c)i[c]=r[o+c];i.length=s}}return n},e.prototype.getCoordinates=function(){return TM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getPoint=function(t){return t<0||(this.flatCoordinates?this.flatCoordinates.length/this.stride:0)<=t?null:new jM(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)},e.prototype.getPoints=function(){for(var t=this.flatCoordinates,e=this.layout,i=this.stride,n=[],r=0,s=t.length;r<s;r+=i){var o=new jM(t.slice(r,r+i),e);n.push(o)}return n},e.prototype.getType=function(){return"MultiPoint"},e.prototype.intersectsExtent=function(t){for(var e=this.flatCoordinates,i=this.stride,n=0,r=e.length;n<r;n+=i)if(DS(t,e[n],e[n+1]))return!0;return!1},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=EM(this.flatCoordinates,0,t,this.stride),this.changed()},e}(_M),OH=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),MH=function(t){function e(e,i,n){var r=t.call(this)||this;if(r.endss_=[],r.flatInteriorPointsRevision_=-1,r.flatInteriorPoints_=null,r.maxDelta_=-1,r.maxDeltaRevision_=-1,r.orientedRevision_=-1,r.orientedFlatCoordinates_=null,!n&&!Array.isArray(e[0])){for(var s=r.getLayout(),o=e,a=[],l=[],c=0,h=o.length;c<h;++c){var u=o[c];0===c&&(s=u.getLayout());for(var d=a.length,p=u.getEnds(),f=0,m=p.length;f<m;++f)p[f]+=d;LC(a,u.getFlatCoordinates()),l.push(p)}i=s,e=a,n=l}return void 0!==i&&n?(r.setFlatCoordinates(i,e),r.endss_=n):r.setCoordinates(e,i),r}return OH(e,t),e.prototype.appendPolygon=function(t){var e;if(this.flatCoordinates){var i=this.flatCoordinates.length;LC(this.flatCoordinates,t.getFlatCoordinates());for(var n=0,r=(e=t.getEnds().slice()).length;n<r;++n)e[n]+=i}else this.flatCoordinates=t.getFlatCoordinates().slice(),e=t.getEnds().slice(),this.endss_.push();this.endss_.push(e),this.changed()},e.prototype.clone=function(){for(var t=this.endss_.length,i=new Array(t),n=0;n<t;++n)i[n]=this.endss_[n].slice();var r=new e(this.flatCoordinates.slice(),this.layout,i);return r.applyProperties(this),r},e.prototype.closestPointXY=function(t,e,i,n){return n<SS(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(function(t,e,i,n,r){for(var s=0,o=i.length;s<o;++s){var a=i[s];r=xM(t,e,a,n,r),e=a[a.length-1]}return r}(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),function(t,e,i,n,r,s,o,a,l,c,h){for(var u=[NaN,NaN],d=0,p=i.length;d<p;++d){var f=i[d];c=SM(t,e,f,n,r,!0,o,a,l,c,u),e=f[f.length-1]}return c}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,0,t,e,i,n))},e.prototype.containsXY=function(t,e){return function(t,e,i,n,r,s){if(0===i.length)return!1;for(var o=0,a=i.length;o<a;++o){var l=i[o];if(KM(t,e,l,n,r,s))return!0;e=l[l.length-1]}return!1}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,e)},e.prototype.getArea=function(){return function(t,e,i,n){for(var r=0,s=0,o=i.length;s<o;++s){var a=i[s];r+=LM(t,e,a,n),e=a[a.length-1]}return r}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)},e.prototype.getCoordinates=function(t){var e;return void 0!==t?JM(e=this.getOrientedFlatCoordinates().slice(),0,this.endss_,this.stride,t):e=this.flatCoordinates,VM(e,0,this.endss_,this.stride)},e.prototype.getEndss=function(){return this.endss_},e.prototype.getFlatInteriorPoints=function(){if(this.flatInteriorPointsRevision_!=this.getRevision()){var t=function(t,e,i,n){for(var r=[],s=[1/0,1/0,-1/0,-1/0],o=0,a=i.length;o<a;++o){var l=i[o];s=TS(t,e,l[0],n),r.push((s[0]+s[2])/2,(s[1]+s[3])/2),e=l[l.length-1]}return r}(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=function(t,e,i,n,r){for(var s=[],o=0,a=i.length;o<a;++o){var l=i[o];s=$M(t,e,l,n,r,2*o,s),e=l[l.length-1]}return s}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_},e.prototype.getInteriorPoints=function(){return new PH(this.getFlatInteriorPoints().slice(),"XYM")},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;!function(t,e,i,n,r){for(var s=0,o=i.length;s<o;++s){var a=i[s];if(!QM(t,e,a,n,void 0))return!1;a.length&&(e=a[a.length-1])}return!0}(t,0,this.endss_,this.stride)?(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=JM(this.orientedFlatCoordinates_,0,this.endss_,this.stride)):this.orientedFlatCoordinates_=t,this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[],n=[];return i.length=function(t,e,i,n,r,s,o,a){for(var l=0,c=i.length;l<c;++l){var h=i[l],u=[];o=MM(t,e,h,n,r,s,o,u),a.push(u),e=h[h.length-1]}return o}(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(t),i,0,n),new e(i,"XY",n)},e.prototype.getPolygon=function(t){if(t<0||this.endss_.length<=t)return null;var e;if(0===t)e=0;else{var i=this.endss_[t-1];e=i[i.length-1]}var n=this.endss_[t].slice(),r=n[n.length-1];if(0!==e)for(var s=0,o=n.length;s<o;++s)n[s]-=e;return new iT(this.flatCoordinates.slice(e,r),this.layout,n)},e.prototype.getPolygons=function(){for(var t=this.layout,e=this.flatCoordinates,i=this.endss_,n=[],r=0,s=0,o=i.length;s<o;++s){var a=i[s].slice(),l=a[a.length-1];if(0!==r)for(var c=0,h=a.length;c<h;++c)a[c]-=r;var u=new iT(e.slice(r,l),t,a);n.push(u),r=l}return n},e.prototype.getType=function(){return"MultiPolygon"},e.prototype.intersectsExtent=function(t){return function(t,e,i,n,r){for(var s=0,o=i.length;s<o;++s){var a=i[s];if(ZM(t,e,a,n,r))return!0;e=a[a.length-1]}return!1}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,3),this.flatCoordinates||(this.flatCoordinates=[]);var i=function(t,e,i,n,r){for(var s=r||[],o=0,a=0,l=i.length;a<l;++a){var c=DM(t,e,i[a],n,s[o]);s[o++]=c,e=c[c.length-1]}return s.length=o,s}(this.flatCoordinates,0,t,this.stride,this.endss_);if(0===i.length)this.flatCoordinates.length=0;else{var n=i[i.length-1];this.flatCoordinates.length=0===n.length?0:n[n.length-1]}this.changed()},e}(_M),TH=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function RH(t,e){if(!t)return null;var i;switch(t.type){case"Point":i=function(t){return new jM(t.coordinates)}(t);break;case"LineString":i=function(t){return new kH(t.coordinates)}(t);break;case"Polygon":i=function(t){return new iT(t.coordinates)}(t);break;case"MultiPoint":i=function(t){return new PH(t.coordinates)}(t);break;case"MultiLineString":i=function(t){return new DH(t.coordinates)}(t);break;case"MultiPolygon":i=function(t){return new MH(t.coordinates)}(t);break;case"GeometryCollection":i=function(t,e){var i=t.geometries.map(function(t){return RH(t,void 0)});return new gH(i)}(t);break;default:throw new Error("Unsupported GeoJSON type: "+t.type)}return bH(i,!1,e)}function VH(t,e){var i,n=(t=bH(t,!0,e)).getType();switch(n){case"Point":i=function(t,e){return{type:"Point",coordinates:t.getCoordinates()}}(t);break;case"LineString":i=function(t,e){return{type:"LineString",coordinates:t.getCoordinates()}}(t);break;case"Polygon":i=function(t,e){var i;return e&&(i=e.rightHanded),{type:"Polygon",coordinates:t.getCoordinates(i)}}(t,e);break;case"MultiPoint":i=function(t,e){return{type:"MultiPoint",coordinates:t.getCoordinates()}}(t);break;case"MultiLineString":i=function(t,e){return{type:"MultiLineString",coordinates:t.getCoordinates()}}(t);break;case"MultiPolygon":i=function(t,e){var i;return e&&(i=e.rightHanded),{type:"MultiPolygon",coordinates:t.getCoordinates(i)}}(t,e);break;case"GeometryCollection":i=function(t,e){return{type:"GeometryCollection",geometries:t.getGeometriesArray().map(function(t){var i=zC({},e);return delete i.featureProjection,VH(t,i)})}}(t,e);break;case"Circle":i={type:"GeometryCollection",geometries:[]};break;default:throw new Error("Unsupported geometry type: "+n)}return i}var FH=function(t){function e(e){var i=this,n=e||{};return(i=t.call(this)||this).dataProjection=eE(n.dataProjection?n.dataProjection:"EPSG:4326"),n.featureProjection&&(i.defaultFeatureProjection=eE(n.featureProjection)),i.geometryName_=n.geometryName,i.extractGeometryName_=n.extractGeometryName,i}return TH(e,t),e.prototype.readFeatureFromObject=function(t,e){var i,n=RH((i="Feature"===t.type?t:{type:"Feature",geometry:t,properties:null}).geometry,e),r=new pH;return this.geometryName_?r.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in i!==void 0&&r.setGeometryName(i.geometry_name),r.setGeometry(n),"id"in i&&r.setId(i.id),i.properties&&r.setProperties(i.properties,!0),r},e.prototype.readFeaturesFromObject=function(t,e){var i=null;if("FeatureCollection"===t.type){i=[];for(var n=t.features,r=0,s=n.length;r<s;++r)i.push(this.readFeatureFromObject(n[r],e))}else i=[this.readFeatureFromObject(t,e)];return i},e.prototype.readGeometryFromObject=function(t,e){return RH(t,e)},e.prototype.readProjectionFromObject=function(t){var e,i=t.crs;return i?"name"==i.type?e=eE(i.properties.name):"EPSG"===i.type?e=eE("EPSG:"+i.properties.code):yS(!1,36):e=this.dataProjection,e},e.prototype.writeFeatureObject=function(t,e){e=this.adaptOptions(e);var i={type:"Feature",geometry:null,properties:null},n=t.getId();if(void 0!==n&&(i.id=n),!t.hasProperties())return i;var r=t.getProperties(),s=t.getGeometry();return s&&(i.geometry=VH(s,e),delete r[t.getGeometryName()]),$C(r)||(i.properties=r),i},e.prototype.writeFeaturesObject=function(t,e){e=this.adaptOptions(e);for(var i=[],n=0,r=t.length;n<r;++n)i.push(this.writeFeatureObject(t[n],e));return{type:"FeatureCollection",features:i}},e.prototype.writeGeometryObject=function(t,e){return VH(t,this.adaptOptions(e))},e}(yH);const LH=new FH({featureProjection:"EPSG:3857"});function UH(t,e){1&t&&r.Qb(0,"mat-spinner",7)}function BH(t,e){1&t&&(r.Vb(0,"p",10),r.Kc(1,"Vous n'avez pas encore cr\xe9\xe9 d'annotation."),r.Ub())}function NH(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",13),r.Vb(1,"button",14),r.cc("click",function(){r.Ac(t);const i=e.$implicit;return r.gc(3).locateAnnotation(i)}),r.Kc(2),r.Ub(),r.Vb(3,"button",15),r.cc("click",function(){r.Ac(t);const i=e.$implicit;return r.gc(3).editAnnotation(i)}),r.Vb(4,"mat-icon"),r.Kc(5,"edit"),r.Ub(),r.Ub(),r.Vb(6,"button",16),r.cc("click",function(){r.Ac(t);const i=e.$implicit;return r.gc(3).deleteAnnotation(i)}),r.Vb(7,"mat-icon"),r.Kc(8,"delete"),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=e.$implicit,i=r.gc(3);r.nc("@fadeAnimation",void 0),r.Db(2),r.Mc(" ",t.name," "),r.Db(1),r.nc("disabled",i.isEditingAnnotation),r.Db(3),r.nc("disabled",i.isEditingAnnotation)}}function jH(t,e){if(1&t&&(r.Vb(0,"div",11),r.Ic(1,NH,9,4,"div",12),r.Ub()),2&t){const t=r.gc(2);r.Db(1),r.nc("ngForOf",t.annotations)("ngForTrackBy",t.trackById)}}function zH(t,e){if(1&t&&(r.Ic(0,BH,2,0,"p",8),r.Ic(1,jH,2,2,"div",9)),2&t){const t=r.gc();r.nc("ngIf",0===t.annotations.length),r.Db(1),r.nc("ngIf",t.annotations.length>0)}}let HH=(()=>{class t extends LT{constructor(t,e,i,n){super(),this.titleService=t,this.annotationsService=e,this.mapService=i,this.uiService=n,this.annotations=[],this.isEditingAnnotation=!1,this.showCreateAnnotationForm=!1,this.annotationsEditable=!0}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.titleService.setTitle("Liste des annotations - ANAIS"),this.mapService.hasBooted||this.mapService.resetToDefaultView(),this.subscriptions.push(this.annotationsService.annotations$.subscribe(t=>{this.annotations=t}),this.annotationsService.editedAnnotation$.pipe(Object(Ge.a)(t=>!!t)).subscribe(t=>{this.isEditingAnnotation=t}))})}ngOnDestroy(){super.ngOnDestroy()}displayCreateAnnotationForm(){this.showCreateAnnotationForm=!0}hideCreateAnnotationForm(){this.showCreateAnnotationForm=!1}trackById(t,e){return e.id}locateAnnotation(t){switch(t.geom.type){case"Point":this.mapService.pingLocation(t.geom.coordinates),this.mapService.centerOnLonLat(t.geom.coordinates);break;case"LineString":case"Polygon":this.mapService.fitOn(LH.readGeometry(t.geom));break;default:throw new Error(`Type d'annotation inconnu : \`${t.geom.type}\``)}}editAnnotation(t){this.locateAnnotation(t),this.annotationsService.editAnnotation(t)}deleteAnnotation(t){this.uiService.confirm({title:"Suppression",message:"Confirmez-vous la suppression de cette annotation ?",action:e=>Object(ue.a)(this,void 0,void 0,function*(){e&&(yield this.annotationsService.deleteAnnotation(t.id))})})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(he),r.Pb(MP),r.Pb(pI),r.Pb(VI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-annotations-panel"]],features:[r.Ab],decls:9,vars:3,consts:[["joyrideStep","annotations-panel","title","Gestion des annotations","text","C'est ici que vous pouvez g\xe9rer vos annotations sur la carte.",1,"panel"],[1,"panel__header","panel__header--blue"],[1,"panel__title","u-flex"],[1,"scrollable","d-flex-column"],["class","spinner","strokeWidth","4","diameter","80",4,"ngIf"],[3,"ngIf"],["mat-stroked-button","","color","primary","title","Cr\xe9er une annotation",1,"ma-2",3,"disabled","click"],["strokeWidth","4","diameter","80",1,"spinner"],["class","panel__content",4,"ngIf"],["class","d-flex-column",4,"ngIf"],[1,"panel__content"],[1,"d-flex-column"],["class","d-flex","style","transition: .5s",4,"ngFor","ngForOf","ngForTrackBy"],[1,"d-flex",2,"transition",".5s"],["mat-button","","title","Localiser l'annotation",1,"u-flex",3,"click"],["mat-button","","title","\xc9diter la zone",3,"disabled","click"],["mat-button","","title","Supprimer la zone",3,"disabled","click"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"h2",2),r.Kc(3,"Annotations"),r.Ub(),r.Ub(),r.Vb(4,"div",3),r.Ic(5,UH,1,0,"mat-spinner",4),r.Ic(6,zH,2,2,"ng-template",5),r.Vb(7,"button",6),r.cc("click",function(){return e.annotationsService.createNewAnnotation()}),r.Kc(8," Nouvelle annotation "),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(5),r.nc("ngIf",!e.annotations),r.Db(1),r.nc("ngIf",e.annotations),r.Db(1),r.nc("disabled",e.isEditingAnnotation))},directives:[ax,ut,Dl,fF,ct,Yp],encapsulation:2,data:{animation:[$r("fadeAnimation",[Qr(":enter",[Zr({opacity:0}),Gr(500,Zr({opacity:1}))]),Qr(":leave",[Zr({pointerEvents:"none",transform:"scale(1)"}),Gr(500,Zr({opacity:0,transform:"scale(0)",height:0}))])])]}}),t})();const KH=/@(.+),(.+),(.+)z(?:,(.+Z))?/;let $H=(()=>{class t extends LT{constructor(t,e,i,n,r,s){super(),this.location=t,this.titleService=e,this.historyService=i,this.mapService=n,this.mapConfigService=r,this.routeService=s}ngOnInit(){if(!this.mapService.hasBooted){const t=this.location.path().match(KH);if(t){const e=function(t,e){if(0!==e){const i=e+180;t[0]<e-180&&(t[0]+=360),t[0]>i&&(t[0]-=360)}return t}([+t[2],+t[1]],this.mapConfigService.longitudeCenter$.value);this.mapService.centerOnLonLat(e,+t[3]);const i=t[4];i&&this.historyService.setTimestamp(Math.ceil(new Date(i).getTime()/1e3))}else this.mapService.resetToDefaultView()}this.subscriptions.push(this.routeService.viewURL$.pipe(He(t=>!!t)).subscribe(t=>{this.location.replaceState(`/${t}`),this.titleService.setTitle(`${t} - ANAIS`)}))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(w),r.Pb(he),r.Pb(bI),r.Pb(pI),r.Pb(hI),r.Pb(vI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-empty-panel"]],features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2}),t})();function GH(t){return{id:t.id,name:t.name,ships:t.ships.map(t=>t.mmsi)}}function WH(t){return[["mmsi","imo","name","timestamp","lon","lat","hdms","sog","cog"].join(","),...t.map(t=>function(t){return[t.ship.mmsi,t.ship.imo,t.ship.name,HO(1e3*t.timestamp),t.lon,t.lat,Yk([t.lon,t.lat]),t.sog,t.cog]}(t).join(","))].join("\n")}var ZH=i("M39V");function qH(t,e){const i=new Blob([JSON.stringify(t,null,2)],{type:"application/json"});QH(URL.createObjectURL(i),e)}function YH(t,e,i){const n=new Blob([t],{type:i});QH(URL.createObjectURL(n),e)}function QH(t,e){const i=document.createElement("a");document.body.appendChild(i),i.type="hidden",i.href=t,i.download=e,i.target="_blank",i.click(),document.body.removeChild(i),URL.revokeObjectURL(t)}function XH(t){return Object(ue.a)(this,void 0,void 0,function*(){return new Promise(e=>{const i=new FileReader;i.addEventListener("loadend",()=>{e(i.result)}),i.readAsText(t,"utf-8")})})}const JH={0:"Under way using engine",1:"At anchor",2:"Not under command",3:"Restricted manoeuverability",4:"Constrained by her draught",5:"Moored",6:"Aground",7:"Engaged in Fishing",8:"Under way sailing",9:"Reserved for future amendment of Navigational Status for HSC",10:"Reserved for future amendment of Navigational Status for WIG",11:"Reserved for future use",12:"Reserved for future use",13:"Reserved for future use",14:"AIS-SART is active",15:"Not defined (default)"},tK=Object.values(JH).filter((t,e)=>e<9||15===e).map((t,e)=>({key:e,label:t}));function eK(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",9),r.cc("click",function(){r.Ac(t);const e=r.gc();return e.deleteItem.emit(e.ship)}),r.Vb(1,"mat-icon"),r.Kc(2,"delete"),r.Ub(),r.Ub()}}const iK=function(t){return["/ships/",t]};function nK(t,e){if(1&t&&(r.Vb(0,"button",10),r.Vb(1,"mat-icon"),r.Kc(2,"info"),r.Ub(),r.Ub()),2&t){const t=r.gc();r.nc("routerLink",r.sc(1,iK,t.ship.mmsi))}}let rK=(()=>{class t{constructor(t){this.mapService=t,this.editable=!1,this.deleteItem=new r.o,this.navigationStatusByKey=JH,this.vesselTypeLabelsByType=ED,this.hasPosition=!0}ngOnChanges(t){var e,i;t.ship&&(this.hasPosition=FD(null===(e=t.ship.currentValue)||void 0===e?void 0:e.lon)&&FD(null===(i=t.ship.currentValue)||void 0===i?void 0:i.lat))}locateShip(){this.mapService.centerOnLonLat([this.ship.lon,this.ship.lat])}locateAndZoomToShip(){this.mapService.locate([this.ship.lon,this.ship.lat])}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(pI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-fleet-ship-item"]],inputs:{ship:"ship",editable:"editable"},outputs:{deleteItem:"deleteItem"},features:[r.Bb],decls:14,vars:8,consts:[[1,"fleet-ship-item"],["mat-button","",1,"fleet-ship-item__link",3,"title","disabled","click","dblclick"],[1,"fleet-ship-item__flag",3,"mmsi"],[1,"fleet-ship-item__title"],[1,"fleet-ship-item__name"],[1,"fleet-ship-item__type"],["mat-button","",3,"click",4,"ngIf"],["mat-button","",3,"routerLink",4,"ngIf"],[1,"fleet-ship-item","ml-2","mb-2","mat-small"],["mat-button","",3,"click"],["mat-button","",3,"routerLink"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"button",1),r.cc("click",function(){return e.locateShip()})("dblclick",function(){return e.locateAndZoomToShip()}),r.Qb(2,"app-flag",2),r.Vb(3,"div",3),r.Vb(4,"strong",4),r.Kc(5),r.Ub(),r.Vb(6,"small",5),r.Kc(7),r.Ub(),r.Ub(),r.Ub(),r.Ic(8,eK,3,0,"button",6),r.Ic(9,nK,3,3,"button",7),r.Ub(),r.Vb(10,"div",8),r.Kc(11," Statut :\xa0"),r.Vb(12,"strong"),r.Kc(13),r.Ub(),r.Ub()),2&t&&(r.Db(1),r.nc("title",e.hasPosition?"Localiser le navire":"Ce navire n'a pas de position")("disabled",!e.hasPosition),r.Db(1),r.nc("mmsi",e.ship.mmsi),r.Db(3),r.Lc(e.ship.name||"?"),r.Db(2),r.Lc(e.ship.cargo?e.vesselTypeLabelsByType[e.ship.cargo]:"?"),r.Db(1),r.nc("ngIf",e.editable),r.Db(1),r.nc("ngIf",!e.editable),r.Db(4),r.Lc(e.navigationStatusByKey[e.ship.status]||"?"))},directives:[Dl,GF,ut,Yp,ow],styles:[".fleet-ship-item[_ngcontent-%COMP%], .fleet-ship-item__button-content[_ngcontent-%COMP%]{display:flex}.fleet-ship-item__link[_ngcontent-%COMP%]{flex:1;padding:0;line-height:inherit;text-align:inherit;font-size:inherit;font-weight:inherit}.fleet-ship-item__link[_ngcontent-%COMP%] .mat-button-wrapper{display:flex}.fleet-ship-item__flag[_ngcontent-%COMP%]{margin:5px}.fleet-ship-item__title[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:5px 0;flex:1}.fleet-ship-item__name[_ngcontent-%COMP%]{font-size:1.2em}.fleet-ship-item__type[_ngcontent-%COMP%]{font-size:.9em;color:#555}"],changeDetection:0}),t})();function sK(t,e){1&t&&r.Qb(0,"mat-spinner",5)}function oK(t,e){1&t&&(r.Vb(0,"mat-error",22),r.Kc(1," Ce champ ne peut \xeatre vide. "),r.Ub())}function aK(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-form-field",16),r.Vb(1,"input",17,18),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).fleet.name=e}),r.Ub(),r.Ic(3,oK,2,0,"mat-error",19),r.Ub(),r.Vb(4,"button",20),r.Vb(5,"mat-icon"),r.Kc(6,"check"),r.Ub(),r.Ub(),r.Vb(7,"button",21),r.Vb(8,"mat-icon"),r.Kc(9,"clear"),r.Ub(),r.Ub()}if(2&t){const t=r.wc(2);r.gc();const e=r.wc(1),i=r.gc();r.Db(1),r.nc("ngModel",i.fleet.name),r.Db(2),r.nc("ngIf",null==t.errors?null:t.errors.required),r.Db(1),r.nc("app-async-action",i.saveFleet)("disabled",!e.form.valid),r.Db(3),r.nc("routerLink",i.newFleet?"/fleets":"/fleets/"+i.fleet.id)}}function lK(t,e){if(1&t){const t=r.Wb();r.Vb(0,"h2",23),r.Kc(1),r.Ub(),r.Vb(2,"button",24),r.Vb(3,"mat-icon"),r.Kc(4,"create"),r.Ub(),r.Ub(),r.Vb(5,"button",25),r.Vb(6,"mat-icon"),r.Kc(7,"more_vert"),r.Ub(),r.Ub(),r.Vb(8,"mat-menu",null,26),r.Vb(10,"button",27),r.cc("click",function(){return r.Ac(t),r.gc(2).exportFleet()}),r.Vb(11,"mat-icon"),r.Kc(12,"cloud_download"),r.Ub(),r.Vb(13,"span"),r.Kc(14,"Exporter la flotte"),r.Ub(),r.Ub(),r.Vb(15,"button",28),r.cc("click",function(){return r.Ac(t),r.gc(2).deleteFleet()}),r.Vb(16,"mat-icon",29),r.Kc(17,"delete"),r.Ub(),r.Vb(18,"span",29),r.Kc(19,"Supprimer"),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=r.wc(9),e=r.gc(2);r.Db(1),r.Mc(" ",e.fleet.name," "),r.Db(1),r.nc("routerLink","/fleets/"+e.fleet.id+"/edit"),r.Db(3),r.nc("matMenuTriggerFor",t)}}function cK(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",30),r.Vb(1,"button",31),r.cc("click",function(){return r.Ac(t),r.gc(2).fitOnFleet()}),r.Vb(2,"mat-icon"),r.Kc(3,"center_focus_strong"),r.Ub(),r.Ub(),r.Vb(4,"button",32),r.cc("click",function(){return r.Ac(t),r.gc(2).mapConfigService.toggleTrailsLayer()}),r.Vb(5,"mat-icon"),r.Kc(6,"gesture"),r.Ub(),r.Ub(),r.Vb(7,"button",32),r.cc("click",function(){return r.Ac(t),r.gc(2).mapConfigService.toggleDetailedShipTraces()}),r.Qb(8,"mat-icon",33),r.Ub(),r.Vb(9,"button",32),r.cc("click",function(){return r.Ac(t),r.gc(2).mapConfigService.toggleFleetShipsOnly()}),r.Vb(10,"mat-icon"),r.Kc(11,"directions_boat"),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=r.gc(2);r.Db(4),r.Hb("button-active",t.mapConfigService.showTrailsLayer$.value),r.pc("title","",t.mapConfigService.showTrailsLayer$.value?"Masquer":"Afficher"," les traces des navires"),r.Db(3),r.nc("title",t.mapConfigService.detailedShipTraces$.value?"Les traces d\xe9taill\xe9es sont affich\xe9es. Cliquer pour afficher les traces simplifi\xe9es.":"Les traces simplifi\xe9es sont affich\xe9es. Cliquer pour afficher les traces d\xe9taill\xe9es (Note: ~10x plus de donn\xe9es \xe0 t\xe9l\xe9charger)"),r.Db(1),r.nc("svgIcon",t.mapConfigService.detailedShipTraces$.value?"trail-detailed":"trail-simple"),r.Db(1),r.Hb("button-active",!t.mapConfigService.showFleetShipsOnly$.value),r.pc("title","",t.mapConfigService.showFleetShipsOnly$.value?"Afficher":"Masquer"," les autres navires")}}function hK(t,e){1&t&&(r.Vb(0,"p",34),r.Kc(1,"Aucun navire n'a \xe9t\xe9 configur\xe9"),r.Ub())}function uK(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-fleet-ship-item",35),r.cc("deleteItem",function(e){return r.Ac(t),r.gc(2).deleteShip(e)}),r.Ub()}if(2&t){const t=e.$implicit,i=r.gc(2);r.nc("ship",t)("editable",i.editMode)}}function dK(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",34),r.Vb(1,"app-ship-identifier-input",36),r.cc("selectItem",function(e){return r.Ac(t),r.gc(2).addShipToFleet(e)}),r.Ub(),r.Ub()}if(2&t){const t=r.gc(2);r.Db(1),r.nc("existingItems",t.fleetShipsIds)}}function pK(t,e){if(1&t&&(r.Vb(0,"div",40),r.Vb(1,"div",41),r.Vb(2,"mat-icon",42),r.Kc(3,"warning"),r.Ub(),r.Kc(4),r.Ub(),r.Vb(5,"div"),r.Kc(6),r.Ub(),r.Ub()),2&t){const t=e.alert;r.Db(4),r.Mc(" ",t.rule_name," "),r.Db(2),r.Lc(t.ship_name)}}const fK=function(t){return["/ships/",t]},mK=function(t){return["/alerts/rules/",t]};function gK(t,e){if(1&t&&(r.Vb(0,"button",43),r.Vb(1,"mat-icon"),r.Kc(2,"info"),r.Ub(),r.Kc(3," Voir d\xe9tail Navire "),r.Ub(),r.Vb(4,"button",43),r.Vb(5,"mat-icon"),r.Kc(6,"info"),r.Ub(),r.Kc(7," Voir la r\xe8gle "),r.Ub()),2&t){const t=e.alert;r.nc("routerLink",r.sc(2,fK,t.mmsi)),r.Db(4),r.nc("routerLink",r.sc(4,mK,t.rule_id))}}function AK(t,e){if(1&t&&(r.Vb(0,"h3",13),r.Kc(1,"Alertes"),r.Ub(),r.Qb(2,"app-alerts-list",37),r.Ic(3,pK,7,2,"ng-template",null,38,r.Jc),r.Ic(5,gK,8,6,"ng-template",null,39,r.Jc)),2&t){const t=r.wc(4),e=r.wc(6),i=r.gc(2);r.Db(2),r.nc("alerts$",i.alerts$)("alertTitleRef",t)("alertMenuItemsRef",e)}}function bK(t,e){if(1&t){const t=r.Wb();r.Vb(0,"ng-form",6,7),r.Vb(2,"div",8),r.Ic(3,aK,10,5,"ng-template",4),r.Ic(4,lK,20,3,"ng-template",4),r.Ub(),r.Qb(5,"mat-divider"),r.Ic(6,cK,12,8,"div",9),r.Vb(7,"app-glitter",10),r.Vb(8,"button",11),r.cc("click",function(){return r.Ac(t),r.gc().exportShipsPositions()}),r.Kc(9," Exporter les traces "),r.Ub(),r.Ub(),r.Vb(10,"div",12),r.Vb(11,"h3",13),r.Kc(12,"Navires"),r.Ub(),r.Ic(13,hK,2,0,"p",14),r.Ic(14,uK,1,2,"app-fleet-ship-item",15),r.Ic(15,dK,2,1,"div",14),r.Ic(16,AK,7,3,"ng-template",4),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.Db(3),r.nc("ngIf",t.editMode),r.Db(1),r.nc("ngIf",!t.editMode),r.Db(2),r.nc("ngIf",!t.editMode),r.Db(7),r.nc("ngIf",0===t.fleet.ships.length),r.Db(1),r.nc("ngForOf",t.fleet.ships),r.Db(1),r.nc("ngIf",t.editMode),r.Db(1),r.nc("ngIf",!t.editMode)}}let vK=(()=>{class t extends LT{constructor(t,e,i,n,r,s,o,a,l,c){super(),this.activatedRoute=t,this.router=e,this.titleService=i,this.configService=n,this.fleetsService=r,this.interactionsService=s,this.mapService=o,this.mapConfigService=a,this.timeRangeService=l,this.uiService=c,this.timeRangeSubscription=new ye.a,this.componentDestroyed=!1,this.alerts$=new Av.a([]),this.editMode=!1,this.newFleet=!1,this.saveFleet=()=>Object(ue.a)(this,void 0,void 0,function*(){const t=GH(this.fleet);if(this.newFleet){const e=yield this.fleetsService.createFleet(t);yield this.router.navigateByUrl(`/fleets/${e}`)}else yield this.fleetsService.updateFleet(t),yield this.router.navigateByUrl(`/fleets/${this.fleet.id}`)}),this.exportShipsPositions=()=>Object(ue.a)(this,void 0,void 0,function*(){const t=this.timeRangeService.timeRange$.value,e=FO(1e3*t.start,"yyyy-MM-dd'T'HH-mm-ss"),i=FO(1e3*t.end,"yyyy-MM-dd'T'HH-mm-ss");YH(WH(this.fleetsService.fleetTrails$.value.reduce((t,e)=>t.concat(e),[])),`anais-traces-${this.fleet.name}-${e}-${i}.csv`,"text/csv")})}ngOnInit(){this.globalTimeRange=this.timeRangeService.timeRange$.value,this.timeRangeService.updateTimeRange(iI.last_day),this.subscriptions.push(this.activatedRoute.data.subscribe(t=>{this.editMode=!!t.edit,this.newFleet=!!t.new})),this.mapService.hasBooted||this.mapService.resetToDefaultView(),this.subscriptions.push(this.activatedRoute.paramMap.subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){this.newFleet?(this.fleet={name:"",ships:[]},this.titleService.setTitle("Nouvelle flotte - ANAIS")):(this.fleetId=t.get("fleetId"),yield this.fetchFleet())})))}ngOnDestroy(){super.ngOnDestroy(),this.componentDestroyed=!0,this.fleetsService.deselectFleet(),this.timeRangeSubscription.unsubscribe(),this.timeRangeService.timeRange$.next(this.globalTimeRange.refresh())}get fleetShipsIds(){return this.fleet.ships.map(t=>t.mmsi)}fetchFleet(){return Object(ue.a)(this,void 0,void 0,function*(){try{this.timeRangeSubscription.unsubscribe();const{fleet:t,alerts:e}=yield this.fleetsService.selectFleet(this.fleetId);if(this.componentDestroyed)return;this.fleet=t,this.alerts$.next(e),this.titleService.setTitle(`Flotte ${this.fleet.name} - ANAIS`),this.timeRangeSubscription=this.timeRangeService.timeRange$.pipe(Gg(1)).subscribe(()=>Object(ue.a)(this,void 0,void 0,function*(){this.fleet&&!this.editMode&&(yield this.fetchFleet())}))}catch(t){if(t.notfound)throw this.router.navigateByUrl("/fleets").catch(()=>{}),new Error(`La flotte <${this.fleetId}> n'existe pas.`);throw t}})}deleteFleet(){this.uiService.confirm({title:"Suppression",message:"Une fois supprim\xe9e, cette flotte ne sera plus accessible. Confirmez-vous la suppression de cette flotte ?",action:t=>Object(ue.a)(this,void 0,void 0,function*(){t&&(yield this.fleetsService.deleteFleet(this.fleet.id),yield this.router.navigateByUrl("/fleets"))})})}exportFleet(){const t=GH(this.fleet);delete t.id;const e=(new Date).toISOString().substr(0,19).replace(/:/g,"-");qH(t,`ANAIS-flotte-${this.fleet.name}-${e}.json`)}addShipToFleet(t){t&&this.fleet.ships.push(t)}deleteShip(t){this.fleet.ships=this.fleet.ships.filter(e=>e!==t)}fitOnFleet(){if(this.fleet.ships.length>0){const{lon:t,lat:e}=this.fleet.ships[0],i=qD.New(t,e,t,e);this.fleet.ships.filter(t=>FD(t.lon)&&FD(t.lat)).forEach(t=>{i.addPoint(t.lon,t.lat)}),this.mapService.fitOn(i.toExtent())}}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(N_),r.Pb(sw),r.Pb(he),r.Pb(cI),r.Pb(OT),r.Pb(ET),r.Pb(pI),r.Pb(hI),r.Pb(yT),r.Pb(VI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-fleet-panel"]],features:[r.Ab],decls:8,vars:2,consts:[[1,"panel"],[1,"d-flex",2,"background-color","#fff"],["mat-button","","title","Revenir \xe0 la liste","routerLink","/fleets",1,"back-button"],["class","spinner","strokeWidth","4","diameter","80",4,"ngIf"],[3,"ngIf"],["strokeWidth","4","diameter","80",1,"spinner"],["name","form",1,"d-flex-column","unscrollable"],["form","ngForm"],[1,"panel__header","panel__header--blue"],["class","d-flex",4,"ngIf"],["gid","export-trace-fleet","date","2020-12-14"],["mat-button","","title","Exporter les traces au format CSV",1,"d-block",3,"click"],[1,"scrollable"],[1,"panel__subtitle"],["class","panel__content",4,"ngIf"],[3,"ship","editable","deleteItem",4,"ngFor","ngForOf"],[1,"fleet-panel__name-input"],["matInput","","name","name","placeholder","Nom de la flotte","required","","maxlength","64",3,"ngModel","ngModelChange"],["name","ngModel"],["class","input-error",4,"ngIf"],["mat-button","","color","primary","title","Enregistrer les changements","data-test","save-fleet",3,"app-async-action","disabled"],["mat-button","","title","Annuler l'\xe9dition",3,"routerLink"],[1,"input-error"],[1,"panel__title","u-flex"],["mat-button","","title","Modifier",3,"routerLink"],["mat-button","","title","Autres actions",3,"matMenuTriggerFor"],["menu","matMenu"],["mat-menu-item","","title","Exporter la flotte au format JSON",3,"click"],["mat-menu-item","","title","Supprimer la flotte",3,"click"],["color","warn"],[1,"d-flex"],["mat-button","","title","Centrer sur la flotte",1,"d-block",3,"click"],["mat-button","",1,"d-block",3,"title","click"],[3,"svgIcon"],[1,"panel__content"],[3,"ship","editable","deleteItem"],[3,"existingItems","selectItem"],[3,"alerts$","alertTitleRef","alertMenuItemsRef"],["alertTitleRef",""],["alertMenuItemsRef",""],[1,"fleet-panel__alert-item"],[1,"d-flex-center"],[1,"rule-name-icon"],["mat-menu-item","",3,"routerLink"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"a",2),r.Vb(3,"mat-icon"),r.Kc(4,"arrow_back_ios"),r.Ub(),r.Kc(5," Flottes "),r.Ub(),r.Ub(),r.Ic(6,sK,1,0,"mat-spinner",3),r.Ic(7,bK,17,7,"ng-template",4),r.Ub()),2&t&&(r.Db(6),r.nc("ngIf",!e.fleet),r.Db(1),r.nc("ngIf",e.fleet))},directives:[Il,aw,Yp,ut,fF,oh,GT,DL,Dl,ct,_u,Ou,ac,Ih,Th,Vc,uh,dR,ow,nu,sU,eU,QL,rK,WN,Nj],styles:[".back-button[_ngcontent-%COMP%]{line-height:36px}.fleet-panel__name-input[_ngcontent-%COMP%]{margin:.5em;flex:1;font-size:20px}.rule-name-icon[_ngcontent-%COMP%]{font-size:20px;height:20px;width:20px;margin-right:.3em}"]}),t})();function _K(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",4),r.Vb(1,"mat-form-field",13),r.Vb(2,"mat-label"),r.Kc(3,"Nom"),r.Ub(),r.Vb(4,"input",14),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc().$implicit.newName=e}),r.Ub(),r.Ub(),r.Ub(),r.Vb(5,"div",5),r.Vb(6,"button",15),r.cc("click",function(){r.Ac(t);const e=r.gc().$implicit;return r.gc().applyRenaming(e)}),r.Vb(7,"mat-icon"),r.Kc(8,"done"),r.Ub(),r.Kc(9," Valider "),r.Ub(),r.Vb(10,"button",16),r.cc("click",function(){r.Ac(t);const e=r.gc().$implicit;return r.gc().cancelRenaming(e)}),r.Vb(11,"mat-icon"),r.Kc(12,"clear"),r.Ub(),r.Kc(13," Annuler "),r.Ub(),r.Ub()}if(2&t){const t=r.gc(),e=t.$implicit,i=t.index,n=r.gc();r.Db(4),r.nc("ngModel",e.newName),r.Db(2),r.nc("disabled",n.isFleetNameTaken(e.newName,i))}}function yK(t,e){if(1&t&&(r.Vb(0,"mat-icon"),r.Kc(1,"arrow_right_alt"),r.Ub(),r.Kc(2)),2&t){const t=r.gc(2).$implicit;r.Db(2),r.Mc(" ",t.newName," ")}}function wK(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",4),r.Kc(1),r.Ic(2,yK,3,1,"ng-template",12),r.Ub(),r.Vb(3,"div",5),r.Vb(4,"button",17),r.cc("click",function(){r.Ac(t);const e=r.gc().$implicit,i=r.gc();return i.toggleResolution(e,i.ConflictResolution.Update)}),r.Vb(5,"mat-icon"),r.Kc(6,"update"),r.Ub(),r.Kc(7," Mettre \xe0 jour "),r.Ub(),r.Vb(8,"button",18),r.cc("click",function(){r.Ac(t);const e=r.gc().$implicit;return r.gc().openRenamingForm(e)}),r.Vb(9,"mat-icon"),r.Kc(10,"edit"),r.Ub(),r.Kc(11," Renommer "),r.Ub(),r.Ub()}if(2&t){const t=r.gc().$implicit,e=r.gc();r.Db(1),r.Mc(" ",t.fleet.name," "),r.Db(1),r.nc("ngIf",t.newName),r.Db(2),r.Hb("pressed-button",t.resolution===e.ConflictResolution.Update),r.Db(4),r.Hb("pressed-button",t.resolution===e.ConflictResolution.Rename)}}function xK(t,e){if(1&t&&(r.Vb(0,"div",11),r.Ic(1,_K,14,2,"ng-template",12),r.Ic(2,wK,12,6,"ng-template",12),r.Ub()),2&t){const t=e.$implicit;r.Db(1),r.nc("ngIf",t.renaming),r.Db(1),r.nc("ngIf",!t.renaming)}}var CK=function(t){return t.Rename="rename",t.Update="update",t}({});let SK=(()=>{class t{constructor(t){this.data=t,this.ConflictResolution=CK,this.displayedColumns=["name","action"]}ngOnInit(){this.conflicts=this.data.fleets.map(t=>({fleet:t,resolution:null,renaming:!1,newName:""})),this.fleetNames=this.data.fleetNames}toggleResolution(t,e){t.resolution=e,t.resolution===CK.Update&&(t.newName="")}isFormValid(){return this.conflicts.every(t=>null!==t.resolution)}openRenamingForm(t){t.resolution=null,t.renaming=!0,t.newName=t.fleet.name}cancelRenaming(t){t.renaming=!1,t.newName=""}applyRenaming(t){t.renaming=!1,t.resolution=CK.Rename}isFleetNameTaken(t,e){return this.fleetNames.includes(t)||this.conflicts.filter((t,i)=>i!==e).some(e=>e.newName===t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(jl))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-import-fleet-dialog"]],decls:18,vars:4,consts:[["mat-dialog-title",""],["mat-dialog-content","",2,"min-width","600px"],[1,"d-flex-column-center"],[1,"d-flex","mb-2"],[1,"column-name"],[1,"column-resolution"],["class","d-flex-center mt-2",4,"ngFor","ngForOf"],["mat-dialog-actions",""],[1,"u-flex"],["mat-button","","color","primary",3,"disabled","mat-dialog-close"],["mat-button","",3,"mat-dialog-close"],[1,"d-flex-center","mt-2"],[3,"ngIf"],[1,"mr-3"],["matInput","","placeholder","Ma flotte","required","",3,"ngModel","ngModelChange"],["mat-raised-button","","color","primary",1,"mx-2",3,"disabled","click"],["mat-button","",1,"mx-2",3,"click"],["mat-stroked-button","","title","Mettre \xe0 jour",1,"mx-2",3,"click"],["mat-stroked-button","","title","Renommer",1,"mx-2",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"h1",0),r.Kc(1,"Mise \xe0 jour des flottes"),r.Ub(),r.Vb(2,"div",1),r.Vb(3,"p"),r.Kc(4,"Certaines flottes que vous voulez importer existent d\xe9j\xe0. Vous devez choisir entre mettre \xe0 jour les flottes existantes et les remplacer, ou bien renommer les nouvelles flottes."),r.Ub(),r.Vb(5,"div",2),r.Vb(6,"div",3),r.Vb(7,"div",4),r.Kc(8," Nom de flotte "),r.Ub(),r.Vb(9,"div",5),r.Kc(10," Action "),r.Ub(),r.Ub(),r.Ic(11,xK,3,2,"div",6),r.Ub(),r.Ub(),r.Vb(12,"div",7),r.Qb(13,"div",8),r.Vb(14,"button",9),r.Kc(15," Importer "),r.Ub(),r.Vb(16,"button",10),r.Kc(17," Annuler "),r.Ub(),r.Ub()),2&t&&(r.Db(11),r.nc("ngForOf",e.conflicts),r.Db(3),r.nc("disabled",!e.isFormValid())("mat-dialog-close",e.conflicts),r.Db(2),r.nc("mat-dialog-close",null))},directives:[ql,Yl,ct,Ql,Dl,Zl,ut,_u,cu,Ou,ac,Ih,Vc,uh,Yp],styles:[".pressed-button[_ngcontent-%COMP%]{background-color:#94cba5}.column-name[_ngcontent-%COMP%]{min-width:200px;display:inline-flex;align-items:center}.column-resolution[_ngcontent-%COMP%]{min-width:300px;text-align:center}"]}),t})();const kK=["importFileInput"];function EK(t,e){1&t&&r.Qb(0,"mat-spinner",9)}function DK(t,e){1&t&&(r.Vb(0,"p",11),r.Kc(1,"Aucune flotte n'a \xe9t\xe9 configur\xe9e."),r.Ub())}function IK(t,e){if(1&t&&(r.Vb(0,"button",14),r.Kc(1),r.Vb(2,"em"),r.Kc(3),r.Ub(),r.Ub()),2&t){const t=e.$implicit;r.pc("routerLink","/fleets/",t.id,""),r.Db(1),r.Mc(" ",t.name," "),r.Db(2),r.Nc("(",t.ships.length," navire",t.ships.length>1?"s":"",")")}}function PK(t,e){if(1&t&&(r.Vb(0,"div",12),r.Ic(1,IK,4,4,"button",13),r.Ub()),2&t){const t=r.gc(2);r.Db(1),r.nc("ngForOf",t.fleets)}}function OK(t,e){if(1&t&&(r.Ic(0,DK,2,0,"p",10),r.Ic(1,PK,2,1,"ng-template",8)),2&t){const t=r.gc();r.nc("ngIf",0===t.fleets.length),r.Db(1),r.nc("ngIf",t.fleets.length>0)}}let MK=(()=>{class t extends LT{constructor(t,e,i,n,r){super(),this.titleService=t,this.dialog=e,this.fleetsService=i,this.mapService=n,this.uiService=r}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.titleService.setTitle("Liste des flottes - ANAIS"),this.mapService.hasBooted||this.mapService.resetToDefaultView(),this.fleets=yield this.fleetsService.refreshFleets()})}triggerImportFleetDialog(){this.importFileInput.nativeElement.click()}onFilesChange(t){return Object(ue.a)(this,void 0,void 0,function*(){const e=t.target.files||t.dataTransfer.files;e.length&&((yield Promise.all(Array.from(e).map(t=>Object(ue.a)(this,void 0,void 0,function*(){try{const e=JSON.parse(yield XH(t));if("string"==typeof e.name&&e.ships instanceof Array&&e.ships.every(t=>"string"==typeof t))return e;throw new Error("Structure JSON incorrecte")}catch(e){throw new Error(`Import du fichier \`${t.name}\` \xe9chou\xe9: ${e.message}`)}}))).then(t=>Object(ue.a)(this,void 0,void 0,function*(){const e=this.fleets.map(t=>t.name),i=t.filter(t=>e.includes(t.name)),n=t.filter(t=>!i.includes(t)),r=[];if(i.length>0){const t=yield this.openImportFleetDialog(i,e);if(null==t)return!0;t.forEach(t=>{t.resolution===CK.Update?(t.fleet.id=this.fleets.find(e=>e.name===t.fleet.name).id,r.push(t.fleet)):t.resolution===CK.Rename&&(t.fleet.name=t.newName,n.push(t.fleet))})}yield Promise.all([...n.map(t=>Object(ue.a)(this,void 0,void 0,function*(){yield this.fleetsService.createFleet(t)})),...r.map(t=>Object(ue.a)(this,void 0,void 0,function*(){yield this.fleetsService.updateFleet(t)}))])})))||(this.fleets=yield this.fleetsService.refreshFleets(),this.uiService.success("Les flottes ont \xe9t\xe9 import\xe9es"),t.target.value=""))})}openImportFleetDialog(t,e){return Object(ue.a)(this,void 0,void 0,function*(){return new Promise(i=>{this.dialogRef=this.dialog.open(SK,{data:{fleets:t,fleetNames:e},autoFocus:!1,closeOnNavigation:!0}),this.dialogRef.afterClosed().subscribe(t=>{i(t)})})})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(he),r.Pb(Gl),r.Pb(OT),r.Pb(pI),r.Pb(VI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-fleets-panel"]],viewQuery:function(t,e){if(1&t&&r.Pc(kK,3),2&t){let t;r.vc(t=r.dc())&&(e.importFileInput=t.first)}},features:[r.Ab],decls:12,vars:2,consts:[["joyrideStep","fleets-panel","title","Flottes de navires","text","C'est ici que vous pouvez cr\xe9er et suivre vos flottes de navires.",1,"panel"],[1,"panel__header","panel__header--blue"],[1,"panel__title","u-flex"],["mat-button","","color","primary","title","Cr\xe9er une flotte","joyrideStep","create-fleet-button","text","Ce bouton permet de cr\xe9er une flotte de navires.","routerLink","/fleets/new"],["type","file","accept","application/json","multiple","","hidden","",3,"change"],["importFileInput",""],["mat-button","","title","Importer une flotte","joyrideStep","import-fleet-button","text","Ce bouton permet d'importer un fichier export\xe9 depuis une flotte ANAIS existante (JSON dans les t\xe9l\xe9chargements). L'export sert \xe0 partager des flottes entre plusieurs comptes par simple transfert et import du fichier. Ce fichier peut aussi \xeatre exploit\xe9 en dehors d'ANAIS.",3,"click"],["class","spinner","strokeWidth","4","diameter","80",4,"ngIf"],[3,"ngIf"],["strokeWidth","4","diameter","80",1,"spinner"],["class","panel__content",4,"ngIf"],[1,"panel__content"],[1,"d-flex-column","scrollable"],["mat-button","",3,"routerLink",4,"ngFor","ngForOf"],["mat-button","",3,"routerLink"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"h2",2),r.Kc(3,"Flottes"),r.Ub(),r.Ub(),r.Vb(4,"button",3),r.Kc(5,"Nouvelle flotte"),r.Ub(),r.Vb(6,"input",4,5),r.cc("change",function(t){return e.onFilesChange(t)}),r.Ub(),r.Vb(8,"button",6),r.cc("click",function(){return e.triggerImportFleetDialog()}),r.Kc(9,"Importer"),r.Ub(),r.Ic(10,EK,1,0,"mat-spinner",7),r.Ic(11,OK,2,2,"ng-template",8),r.Ub()),2&t&&(r.Db(10),r.nc("ngIf",!e.fleets),r.Db(1),r.nc("ngIf",e.fleets))},directives:[ax,Dl,ow,ut,fF,ct],styles:[""]}),t})(),TK=(()=>{class t extends LT{constructor(t,e,i,n,r){super(),this.titleService=t,this.historyService=e,this.mapService=i,this.playbackService=n,this.selectionService=r}ngOnInit(){this.titleService.setTitle("Rejeu de situation - ANAIS"),this.mapService.hasBooted||this.mapService.resetToDefaultView(),this.historyService.resetTimestamp(),this.selectionService.clear(),setTimeout(()=>{this.playbackService.enterPlaybackMode()})}ngOnDestroy(){this.playbackService.exitPlaybackMode()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(he),r.Pb(bI),r.Pb(pI),r.Pb(tM),r.Pb(xT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-playback-loader"]],features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2}),t})(),RK=(()=>{class t{constructor(t,e,i){this.mapConfigService=t,this.mapService=e,this.uiService=i,this.isSelectingArea$=new Av.a(!1),this.isSelectingArea$.pipe(Gg(1)).subscribe(t=>{this.uiService.setDrawingMode(t)})}startSelectingArea(){this.isSelectingArea$.next(!0)}cancelSelectingArea(){this.isSelectingArea$.next(!1)}finishSelectingArea(){this.mapConfigService.updateRestrictedAreas(qD.fromOLExtent(this.mapService.view$.value.extent).toLatLonExtent()),this.cancelSelectingArea()}removeArea(){this.mapConfigService.updateRestrictedAreas(null)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(hI),r.Zb(pI),r.Zb(VI))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const VK=["sliderWrapper"],FK=Ai({passive:!1}),LK={provide:rc,useExisting:Object(r.W)(()=>jK),multi:!0};class UK{}class BK{constructor(t){this._elementRef=t}}const NK=Ia(Ea(ka(BK),"accent"));let jK=(()=>{class t extends NK{constructor(t,e,i,n,s,o,a,l){super(t),this._focusMonitor=e,this._changeDetectorRef=i,this._dir=n,this._ngZone=o,this._animationMode=l,this._invert=!1,this._max=100,this._min=0,this._step=1,this._thumbLabel=!1,this._tickInterval=0,this._value=null,this._vertical=!1,this.change=new r.o,this.input=new r.o,this.valueChange=new r.o,this.onTouched=()=>{},this._percent=0,this._isSliding=!1,this._isActive=!1,this._tickIntervalPercent=0,this._sliderDimensions=null,this._controlValueAccessorChangeFn=()=>{},this._dirChangeSubscription=ye.a.EMPTY,this._pointerDown=t=>{this.disabled||this._isSliding||!zK(t)&&0!==t.button||this._ngZone.run(()=>{const e=this.value,i=HK(t);this._isSliding=!0,this._lastPointerEvent=t,t.preventDefault(),this._focusHostElement(),this._onMouseenter(),this._bindGlobalEvents(t),this._focusHostElement(),this._updateValueFromPosition(i),this._valueOnSlideStart=e,e!=this.value&&this._emitInputEvent()})},this._pointerMove=t=>{if(this._isSliding){t.preventDefault();const e=this.value;this._lastPointerEvent=t,this._updateValueFromPosition(HK(t)),e!=this.value&&this._emitInputEvent()}},this._pointerUp=t=>{this._isSliding&&(t.preventDefault(),this._removeGlobalEvents(),this._isSliding=!1,this._valueOnSlideStart==this.value||this.disabled||this._emitChangeEvent(),this._valueOnSlideStart=this._lastPointerEvent=null)},this._windowBlur=()=>{this._lastPointerEvent&&this._pointerUp(this._lastPointerEvent)},this._document=a,this.tabIndex=parseInt(s)||0,o.runOutsideAngular(()=>{const e=t.nativeElement;e.addEventListener("mousedown",this._pointerDown,FK),e.addEventListener("touchstart",this._pointerDown,FK)})}get invert(){return this._invert}set invert(t){this._invert=ti(t)}get max(){return this._max}set max(t){this._max=ei(t,this._max),this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}get min(){return this._min}set min(t){this._min=ei(t,this._min),null===this._value&&(this.value=this._min),this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}get step(){return this._step}set step(t){this._step=ei(t,this._step),this._step%1!=0&&(this._roundToDecimal=this._step.toString().split(".").pop().length),this._changeDetectorRef.markForCheck()}get thumbLabel(){return this._thumbLabel}set thumbLabel(t){this._thumbLabel=ti(t)}get tickInterval(){return this._tickInterval}set tickInterval(t){this._tickInterval="auto"===t?"auto":"number"==typeof t||"string"==typeof t?ei(t,this._tickInterval):0}get value(){return null===this._value&&(this.value=this._min),this._value}set value(t){if(t!==this._value){let e=ei(t);this._roundToDecimal&&e!==this.min&&e!==this.max&&(e=parseFloat(e.toFixed(this._roundToDecimal))),this._value=e,this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}}get vertical(){return this._vertical}set vertical(t){this._vertical=ti(t)}get displayValue(){return this.displayWith?this.displayWith(this.value):this._roundToDecimal&&this.value&&this.value%1!=0?this.value.toFixed(this._roundToDecimal):this.value||0}focus(t){this._focusHostElement(t)}blur(){this._blurHostElement()}get percent(){return this._clamp(this._percent)}_shouldInvertAxis(){return this.vertical?!this.invert:this.invert}_isMinValue(){return 0===this.percent}_getThumbGap(){return this.disabled?7:this._isMinValue()&&!this.thumbLabel?this._isActive?10:7:0}_getTrackBackgroundStyles(){const t=this.vertical?`1, ${1-this.percent}, 1`:1-this.percent+", 1, 1";return{transform:`translate${this.vertical?"Y":"X"}(${this._shouldInvertMouseCoords()?"-":""}${this._getThumbGap()}px) scale3d(${t})`}}_getTrackFillStyles(){const t=this.percent,e=this.vertical?`1, ${t}, 1`:`${t}, 1, 1`;return{transform:`translate${this.vertical?"Y":"X"}(${this._shouldInvertMouseCoords()?"":"-"}${this._getThumbGap()}px) scale3d(${e})`,display:0===t?"none":""}}_getTicksContainerStyles(){return{transform:`translate${this.vertical?"Y":"X"}(${this.vertical||"rtl"!=this._getDirection()?"-":""}${this._tickIntervalPercent/2*100}%)`}}_getTicksStyles(){let t=100*this._tickIntervalPercent,e={backgroundSize:this.vertical?`2px ${t}%`:`${t}% 2px`,transform:`translateZ(0) translate${this.vertical?"Y":"X"}(${this.vertical||"rtl"!=this._getDirection()?"":"-"}${t/2}%)${this.vertical||"rtl"!=this._getDirection()?"":" rotate(180deg)"}`};if(this._isMinValue()&&this._getThumbGap()){const t=this._shouldInvertAxis();let i;i=this.vertical?t?"Bottom":"Top":t?"Right":"Left",e[`padding${i}`]=`${this._getThumbGap()}px`}return e}_getThumbContainerStyles(){const t=this._shouldInvertAxis();return{transform:`translate${this.vertical?"Y":"X"}(-${100*(("rtl"!=this._getDirection()||this.vertical?t:!t)?this.percent:1-this.percent)}%)`}}_shouldInvertMouseCoords(){const t=this._shouldInvertAxis();return"rtl"!=this._getDirection()||this.vertical?t:!t}_getDirection(){return this._dir&&"rtl"==this._dir.value?"rtl":"ltr"}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{this._isActive=!!t&&"keyboard"!==t,this._changeDetectorRef.detectChanges()}),this._dir&&(this._dirChangeSubscription=this._dir.change.subscribe(()=>{this._changeDetectorRef.markForCheck()}))}ngOnDestroy(){const t=this._elementRef.nativeElement;t.removeEventListener("mousedown",this._pointerDown,FK),t.removeEventListener("touchstart",this._pointerDown,FK),this._lastPointerEvent=null,this._removeGlobalEvents(),this._focusMonitor.stopMonitoring(this._elementRef),this._dirChangeSubscription.unsubscribe()}_onMouseenter(){this.disabled||(this._sliderDimensions=this._getSliderDimensions(),this._updateTickIntervalPercent())}_onFocus(){this._sliderDimensions=this._getSliderDimensions(),this._updateTickIntervalPercent()}_onBlur(){this.onTouched()}_onKeydown(t){if(this.disabled||ke(t))return;const e=this.value;switch(t.keyCode){case 33:this._increment(10);break;case 34:this._increment(-10);break;case 35:this.value=this.max;break;case 36:this.value=this.min;break;case 37:this._increment("rtl"==this._getDirection()?1:-1);break;case 38:this._increment(1);break;case 39:this._increment("rtl"==this._getDirection()?-1:1);break;case 40:this._increment(-1);break;default:return}e!=this.value&&(this._emitInputEvent(),this._emitChangeEvent()),this._isSliding=!0,t.preventDefault()}_onKeyup(){this._isSliding=!1}_getWindow(){return this._document.defaultView||window}_bindGlobalEvents(t){const e=this._document,i=zK(t),n=i?"touchend":"mouseup";e.addEventListener(i?"touchmove":"mousemove",this._pointerMove,FK),e.addEventListener(n,this._pointerUp,FK),i&&e.addEventListener("touchcancel",this._pointerUp,FK);const r=this._getWindow();void 0!==r&&r&&r.addEventListener("blur",this._windowBlur)}_removeGlobalEvents(){const t=this._document;t.removeEventListener("mousemove",this._pointerMove,FK),t.removeEventListener("mouseup",this._pointerUp,FK),t.removeEventListener("touchmove",this._pointerMove,FK),t.removeEventListener("touchend",this._pointerUp,FK),t.removeEventListener("touchcancel",this._pointerUp,FK);const e=this._getWindow();void 0!==e&&e&&e.removeEventListener("blur",this._windowBlur)}_increment(t){this.value=this._clamp((this.value||0)+this.step*t,this.min,this.max)}_updateValueFromPosition(t){if(!this._sliderDimensions)return;let e=this._clamp(((this.vertical?t.y:t.x)-(this.vertical?this._sliderDimensions.top:this._sliderDimensions.left))/(this.vertical?this._sliderDimensions.height:this._sliderDimensions.width));if(this._shouldInvertMouseCoords()&&(e=1-e),0===e)this.value=this.min;else if(1===e)this.value=this.max;else{const t=this._calculateValue(e),i=Math.round((t-this.min)/this.step)*this.step+this.min;this.value=this._clamp(i,this.min,this.max)}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.value),this.valueChange.emit(this.value),this.change.emit(this._createChangeEvent())}_emitInputEvent(){this.input.emit(this._createChangeEvent())}_updateTickIntervalPercent(){if(this.tickInterval&&this._sliderDimensions)if("auto"==this.tickInterval){let t=this.vertical?this._sliderDimensions.height:this._sliderDimensions.width,e=Math.ceil(30/(t*this.step/(this.max-this.min)));this._tickIntervalPercent=e*this.step/t}else this._tickIntervalPercent=this.tickInterval*this.step/(this.max-this.min)}_createChangeEvent(t=this.value){let e=new UK;return e.source=this,e.value=t,e}_calculatePercentage(t){return((t||0)-this.min)/(this.max-this.min)}_calculateValue(t){return this.min+t*(this.max-this.min)}_clamp(t,e=0,i=1){return Math.max(e,Math.min(t,i))}_getSliderDimensions(){return this._sliderWrapper?this._sliderWrapper.nativeElement.getBoundingClientRect():null}_focusHostElement(t){this._elementRef.nativeElement.focus(t)}_blurHostElement(){this._elementRef.nativeElement.blur()}writeValue(t){this.value=t}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(qi),r.Pb(r.h),r.Pb(Zn,8),r.ac("tabindex"),r.Pb(r.B),r.Pb(a),r.Pb(pa,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-slider"]],viewQuery:function(t,e){if(1&t&&r.Pc(VK,1),2&t){let t;r.vc(t=r.dc())&&(e._sliderWrapper=t.first)}},hostAttrs:["role","slider",1,"mat-slider","mat-focus-indicator"],hostVars:29,hostBindings:function(t,e){1&t&&r.cc("focus",function(){return e._onFocus()})("blur",function(){return e._onBlur()})("keydown",function(t){return e._onKeydown(t)})("keyup",function(){return e._onKeyup()})("mouseenter",function(){return e._onMouseenter()})("selectstart",function(t){return t.preventDefault()}),2&t&&(r.Yb("tabIndex",e.tabIndex),r.Eb("aria-disabled",e.disabled)("aria-valuemax",e.max)("aria-valuemin",e.min)("aria-valuenow",e.value)("aria-valuetext",null==e.valueText?e.displayValue:e.valueText)("aria-orientation",e.vertical?"vertical":"horizontal"),r.Hb("mat-slider-disabled",e.disabled)("mat-slider-has-ticks",e.tickInterval)("mat-slider-horizontal",!e.vertical)("mat-slider-axis-inverted",e._shouldInvertAxis())("mat-slider-invert-mouse-coords",e._shouldInvertMouseCoords())("mat-slider-sliding",e._isSliding)("mat-slider-thumb-label-showing",e.thumbLabel)("mat-slider-vertical",e.vertical)("mat-slider-min-value",e._isMinValue())("mat-slider-hide-last-tick",e.disabled||e._isMinValue()&&e._getThumbGap()&&e._shouldInvertAxis())("_mat-animation-noopable","NoopAnimations"===e._animationMode))},inputs:{disabled:"disabled",color:"color",tabIndex:"tabIndex",invert:"invert",max:"max",min:"min",value:"value",step:"step",thumbLabel:"thumbLabel",tickInterval:"tickInterval",vertical:"vertical",displayWith:"displayWith",valueText:"valueText"},outputs:{change:"change",input:"input",valueChange:"valueChange"},exportAs:["matSlider"],features:[r.Cb([LK]),r.Ab],decls:13,vars:6,consts:[[1,"mat-slider-wrapper"],["sliderWrapper",""],[1,"mat-slider-track-wrapper"],[1,"mat-slider-track-background",3,"ngStyle"],[1,"mat-slider-track-fill",3,"ngStyle"],[1,"mat-slider-ticks-container",3,"ngStyle"],[1,"mat-slider-ticks",3,"ngStyle"],[1,"mat-slider-thumb-container",3,"ngStyle"],[1,"mat-slider-focus-ring"],[1,"mat-slider-thumb"],[1,"mat-slider-thumb-label"],[1,"mat-slider-thumb-label-text"]],template:function(t,e){1&t&&(r.Vb(0,"div",0,1),r.Vb(2,"div",2),r.Qb(3,"div",3),r.Qb(4,"div",4),r.Ub(),r.Vb(5,"div",5),r.Qb(6,"div",6),r.Ub(),r.Vb(7,"div",7),r.Qb(8,"div",8),r.Qb(9,"div",9),r.Vb(10,"div",10),r.Vb(11,"span",11),r.Kc(12),r.Ub(),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(3),r.nc("ngStyle",e._getTrackBackgroundStyles()),r.Db(1),r.nc("ngStyle",e._getTrackFillStyles()),r.Db(1),r.nc("ngStyle",e._getTicksContainerStyles()),r.Db(1),r.nc("ngStyle",e._getTicksStyles()),r.Db(1),r.nc("ngStyle",e._getThumbContainerStyles()),r.Db(5),r.Lc(e.displayValue))},directives:[bt],styles:['.mat-slider{display:inline-block;position:relative;box-sizing:border-box;padding:8px;outline:none;vertical-align:middle}.mat-slider:not(.mat-slider-disabled):active,.mat-slider.mat-slider-sliding:not(.mat-slider-disabled){cursor:-webkit-grabbing;cursor:grabbing}.mat-slider-wrapper{position:absolute}.mat-slider-track-wrapper{position:absolute;top:0;left:0;overflow:hidden}.mat-slider-track-fill{position:absolute;transform-origin:0 0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-track-background{position:absolute;transform-origin:100% 100%;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-ticks-container{position:absolute;left:0;top:0;overflow:hidden}.mat-slider-ticks{background-repeat:repeat;background-clip:content-box;box-sizing:border-box;opacity:0;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-thumb-container{position:absolute;z-index:1;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-focus-ring{position:absolute;width:30px;height:30px;border-radius:50%;transform:scale(0);opacity:0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider.cdk-keyboard-focused .mat-slider-focus-ring,.mat-slider.cdk-program-focused .mat-slider-focus-ring{transform:scale(1);opacity:1}.mat-slider:not(.mat-slider-disabled):not(.mat-slider-sliding) .mat-slider-thumb-label,.mat-slider:not(.mat-slider-disabled):not(.mat-slider-sliding) .mat-slider-thumb{cursor:-webkit-grab;cursor:grab}.mat-slider-thumb{position:absolute;right:-10px;bottom:-10px;box-sizing:border-box;width:20px;height:20px;border:3px solid transparent;border-radius:50%;transform:scale(0.7);transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),border-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-thumb-label{display:none;align-items:center;justify-content:center;position:absolute;width:28px;height:28px;border-radius:50%;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),border-radius 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.cdk-high-contrast-active .mat-slider-thumb-label{outline:solid 1px}.mat-slider-thumb-label-text{z-index:1;opacity:0;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-sliding .mat-slider-track-fill,.mat-slider-sliding .mat-slider-track-background,.mat-slider-sliding .mat-slider-thumb-container{transition-duration:0ms}.mat-slider-has-ticks .mat-slider-wrapper::after{content:"";position:absolute;border-width:0;border-style:solid;opacity:0;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-has-ticks.cdk-focused:not(.mat-slider-hide-last-tick) .mat-slider-wrapper::after,.mat-slider-has-ticks:hover:not(.mat-slider-hide-last-tick) .mat-slider-wrapper::after{opacity:1}.mat-slider-has-ticks.cdk-focused:not(.mat-slider-disabled) .mat-slider-ticks,.mat-slider-has-ticks:hover:not(.mat-slider-disabled) .mat-slider-ticks{opacity:1}.mat-slider-thumb-label-showing .mat-slider-focus-ring{display:none}.mat-slider-thumb-label-showing .mat-slider-thumb-label{display:flex}.mat-slider-axis-inverted .mat-slider-track-fill{transform-origin:100% 100%}.mat-slider-axis-inverted .mat-slider-track-background{transform-origin:0 0}.mat-slider:not(.mat-slider-disabled).cdk-focused.mat-slider-thumb-label-showing .mat-slider-thumb{transform:scale(0)}.mat-slider:not(.mat-slider-disabled).cdk-focused .mat-slider-thumb-label{border-radius:50% 50% 0}.mat-slider:not(.mat-slider-disabled).cdk-focused .mat-slider-thumb-label-text{opacity:1}.mat-slider:not(.mat-slider-disabled).cdk-mouse-focused .mat-slider-thumb,.mat-slider:not(.mat-slider-disabled).cdk-touch-focused .mat-slider-thumb,.mat-slider:not(.mat-slider-disabled).cdk-program-focused .mat-slider-thumb{border-width:2px;transform:scale(1)}.mat-slider-disabled .mat-slider-focus-ring{transform:scale(0);opacity:0}.mat-slider-disabled .mat-slider-thumb{border-width:4px;transform:scale(0.5)}.mat-slider-disabled .mat-slider-thumb-label{display:none}.mat-slider-horizontal{height:48px;min-width:128px}.mat-slider-horizontal .mat-slider-wrapper{height:2px;top:23px;left:8px;right:8px}.mat-slider-horizontal .mat-slider-wrapper::after{height:2px;border-left-width:2px;right:0;top:0}.mat-slider-horizontal .mat-slider-track-wrapper{height:2px;width:100%}.mat-slider-horizontal .mat-slider-track-fill{height:2px;width:100%;transform:scaleX(0)}.mat-slider-horizontal .mat-slider-track-background{height:2px;width:100%;transform:scaleX(1)}.mat-slider-horizontal .mat-slider-ticks-container{height:2px;width:100%}.cdk-high-contrast-active .mat-slider-horizontal .mat-slider-ticks-container{height:0;outline:solid 2px;top:1px}.mat-slider-horizontal .mat-slider-ticks{height:2px;width:100%}.mat-slider-horizontal .mat-slider-thumb-container{width:100%;height:0;top:50%}.mat-slider-horizontal .mat-slider-focus-ring{top:-15px;right:-15px}.mat-slider-horizontal .mat-slider-thumb-label{right:-14px;top:-40px;transform:translateY(26px) scale(0.01) rotate(45deg)}.mat-slider-horizontal .mat-slider-thumb-label-text{transform:rotate(-45deg)}.mat-slider-horizontal.cdk-focused .mat-slider-thumb-label{transform:rotate(45deg)}.cdk-high-contrast-active .mat-slider-horizontal.cdk-focused .mat-slider-thumb-label,.cdk-high-contrast-active .mat-slider-horizontal.cdk-focused .mat-slider-thumb-label-text{transform:none}.mat-slider-vertical{width:48px;min-height:128px}.mat-slider-vertical .mat-slider-wrapper{width:2px;top:8px;bottom:8px;left:23px}.mat-slider-vertical .mat-slider-wrapper::after{width:2px;border-top-width:2px;bottom:0;left:0}.mat-slider-vertical .mat-slider-track-wrapper{height:100%;width:2px}.mat-slider-vertical .mat-slider-track-fill{height:100%;width:2px;transform:scaleY(0)}.mat-slider-vertical .mat-slider-track-background{height:100%;width:2px;transform:scaleY(1)}.mat-slider-vertical .mat-slider-ticks-container{width:2px;height:100%}.cdk-high-contrast-active .mat-slider-vertical .mat-slider-ticks-container{width:0;outline:solid 2px;left:1px}.mat-slider-vertical .mat-slider-focus-ring{bottom:-15px;left:-15px}.mat-slider-vertical .mat-slider-ticks{width:2px;height:100%}.mat-slider-vertical .mat-slider-thumb-container{height:100%;width:0;left:50%}.mat-slider-vertical .mat-slider-thumb{-webkit-backface-visibility:hidden;backface-visibility:hidden}.mat-slider-vertical .mat-slider-thumb-label{bottom:-14px;left:-40px;transform:translateX(26px) scale(0.01) rotate(-45deg)}.mat-slider-vertical .mat-slider-thumb-label-text{transform:rotate(45deg)}.mat-slider-vertical.cdk-focused .mat-slider-thumb-label{transform:rotate(-45deg)}[dir=rtl] .mat-slider-wrapper::after{left:0;right:auto}[dir=rtl] .mat-slider-horizontal .mat-slider-track-fill{transform-origin:100% 100%}[dir=rtl] .mat-slider-horizontal .mat-slider-track-background{transform-origin:0 0}[dir=rtl] .mat-slider-horizontal.mat-slider-axis-inverted .mat-slider-track-fill{transform-origin:0 0}[dir=rtl] .mat-slider-horizontal.mat-slider-axis-inverted .mat-slider-track-background{transform-origin:100% 100%}.mat-slider._mat-animation-noopable .mat-slider-track-fill,.mat-slider._mat-animation-noopable .mat-slider-track-background,.mat-slider._mat-animation-noopable .mat-slider-ticks,.mat-slider._mat-animation-noopable .mat-slider-thumb-container,.mat-slider._mat-animation-noopable .mat-slider-focus-ring,.mat-slider._mat-animation-noopable .mat-slider-thumb,.mat-slider._mat-animation-noopable .mat-slider-thumb-label,.mat-slider._mat-animation-noopable .mat-slider-thumb-label-text,.mat-slider._mat-animation-noopable .mat-slider-has-ticks .mat-slider-wrapper::after{transition:none}\n'],encapsulation:2,changeDetection:0}),t})();function zK(t){return"t"===t.type[0]}function HK(t){const e=zK(t)?t.touches[0]||t.changedTouches[0]:t;return{x:e.clientX,y:e.clientY}}let KK=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Et,Sa],Sa]}),t})(),$K=(()=>{class t{validate(t){return function(t){const e=parseInt(t.value,10);return!isNaN(e)&&e>=-180&&e<=180?null:{invalidLongitude:{value:t.value}}}(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["","appLongitude",""]],features:[r.Cb([{provide:hc,useExisting:t,multi:!0}])]}),t})();var GK=i("FRV3"),WK=i.n(GK);let ZK=(()=>{class t{constructor(){this.sampleCode="const fs = require('fs')\nconst http = require('http')\n\n// Avec cette configuration, l'URL \xe0 configurer dans l'interface ANAIS est : http://localhost:3001/mysecret\nconst accessKey = 'mysecret'\nconst listenPort = 3001\nconst geoPositionFilePath = '/tmp/position.log'\n\nconst headers = {\n 'access-control-allow-origin': '*'\n}\nconst server = http.createServer(async (req, res) => {\n const key = req.url.slice(1)\n if (key !== accessKey) {\n res.writeHead(401, headers)\n res.end('')\n } else {\n res.writeHead(200, headers)\n // La r\xe9ponse doit \xeatre au format 'latitude,longitude' en projection EPSG:4326\n fs.createReadStream(geoPositionFilePath).pipe(res)\n }\n})\n\nserver.listen(listenPort, '127.0.0.1', () => {\n console.log('GeoServer started on port %d', listenPort)\n})\n"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-geolocation-sample-server-dialog"]],decls:19,vars:1,consts:[["mat-dialog-title","",1,"d-flex"],[1,"u-flex"],["mat-button","","title","Fermer le panneau",3,"mat-dialog-close"],[1,"mat-typography"],["href","https://nodejs.org/"]],template:function(t,e){1&t&&(r.Vb(0,"h2",0),r.Kc(1," Configuration d'un serveur HTTP pour exposer la position "),r.Qb(2,"div",1),r.Vb(3,"button",2),r.Vb(4,"mat-icon"),r.Kc(5,"close"),r.Ub(),r.Ub(),r.Ub(),r.Vb(6,"mat-dialog-content",3),r.Vb(7,"p"),r.Kc(8,"Le code JavaScript ci-dessous est a ex\xe9cuter par "),r.Vb(9,"a",4),r.Kc(10,"Node.js"),r.Ub(),r.Kc(11," et permet de d\xe9marrer un serveur HTTP en local et exposer la position latitude et longitude \xe0 partir d'un fichier."),r.Ub(),r.Vb(12,"p"),r.Kc(13,"Afin que l'interface d'ANAIS reconnaisse bien cette position, il faut que le serveur renvoie bien la position au format "),r.Vb(14,"em"),r.Kc(15,"longitude,latitude"),r.Ub(),r.Kc(16," en projection EPSG:4326."),r.Ub(),r.Vb(17,"pre"),r.Kc(18),r.Ub(),r.Ub()),2&t&&(r.Db(18),r.Lc(e.sampleCode))},directives:[ql,Dl,Zl,Yp,Yl],styles:[""]}),t})();var qK=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),YK=function(t){function e(e){var i=t.call(this,"error")||this;return i.code=e.code,i.message=e.message,i}return qK(e,t),e}(MC),QK=function(t){function e(e){var i=t.call(this)||this,n=e||{};return i.position_=null,i.transform_=Jk,i.watchId_=void 0,i.addEventListener(UE("projection"),i.handleProjectionChanged_),i.addEventListener(UE("tracking"),i.handleTrackingChanged_),void 0!==n.projection&&i.setProjection(n.projection),void 0!==n.trackingOptions&&i.setTrackingOptions(n.trackingOptions),i.setTracking(void 0!==n.tracking&&n.tracking),i}return qK(e,t),e.prototype.disposeInternal=function(){this.setTracking(!1),t.prototype.disposeInternal.call(this)},e.prototype.handleProjectionChanged_=function(){var t=this.getProjection();t&&(this.transform_=lE(eE("EPSG:4326"),t),this.position_&&this.set("position",this.transform_(this.position_)))},e.prototype.handleTrackingChanged_=function(){if("geolocation"in navigator){var t=this.getTracking();t&&void 0===this.watchId_?this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions()):t||void 0===this.watchId_||(navigator.geolocation.clearWatch(this.watchId_),this.watchId_=void 0)}},e.prototype.positionChange_=function(t){var e=t.coords;this.set("accuracy",e.accuracy),this.set("altitude",null===e.altitude?void 0:e.altitude),this.set("altitudeAccuracy",null===e.altitudeAccuracy?void 0:e.altitudeAccuracy),this.set("heading",null===e.heading?void 0:Ak(e.heading)),this.position_?(this.position_[0]=e.longitude,this.position_[1]=e.latitude):this.position_=[e.longitude,e.latitude];var i=this.transform_(this.position_);this.set("position",i),this.set("speed",null===e.speed?void 0:e.speed);var n=function(t,e,i,n){for(var r=[],s=0;s<32;++s)LC(r,jk(t,e,2*Math.PI*s/32,void 0));return r.push(r[0],r[1]),new eT(r,"XY",[r.length])}(this.position_,e.accuracy);n.applyTransform(this.transform_),this.set("accuracyGeometry",n),this.changed()},e.prototype.positionError_=function(t){this.dispatchEvent(new YK(t))},e.prototype.getAccuracy=function(){return this.get("accuracy")},e.prototype.getAccuracyGeometry=function(){return this.get("accuracyGeometry")||null},e.prototype.getAltitude=function(){return this.get("altitude")},e.prototype.getAltitudeAccuracy=function(){return this.get("altitudeAccuracy")},e.prototype.getHeading=function(){return this.get("heading")},e.prototype.getPosition=function(){return this.get("position")},e.prototype.getProjection=function(){return this.get("projection")},e.prototype.getSpeed=function(){return this.get("speed")},e.prototype.getTracking=function(){return this.get("tracking")},e.prototype.getTrackingOptions=function(){return this.get("trackingOptions")},e.prototype.setProjection=function(t){this.set("projection",eE(t))},e.prototype.setTracking=function(t){this.set("tracking",t)},e.prototype.setTrackingOptions=function(t){this.set("trackingOptions",t)},e}(BE),XK=function(t){return t.Browser="browser",t.FixedLocation="fixed_location",t.Server="server",t}({});class JK{constructor(t={}){Object.assign(this,t)}}function t$(t){const e=Nk(t);return e<926?Math.round(100*e)/100+" m":Math.round(e/1852*100)/100+" Nq"}function e$(t,e){return`${i$(e[0]-t[0],e[1]-t[1])}\xb0 ${t$(new kH([t,e]))}`}function i$(t,e){return Math.round((450-180*Math.atan2(e,t)/Math.PI)%360)}let n$=(()=>{class t{constructor(t){this.configService=t,this.enable$=new Av.a(!1),this.source$=new Av.a(XK.Browser),this.serverURL$=new Av.a(""),this.fixedLocation$=new Av.a(null),this.showBearing$=new Av.a(!1),this.location$=new Av.a(null),this.headingAngle$=new Av.a(-1),this.retrievalError$=new Av.a(""),this.validConfiguration$=new Av.a(!1),this.locationFetchInterval=2e3,this.location$.subscribe(t=>{this.oldLocation&&t&&this.headingAngle$.next(i$(t.lon-this.oldLocation.lon,t.lat-this.oldLocation.lat)),this.oldLocation=t}),this.source$.subscribe(()=>{this.oldLocation=null,this.headingAngle$.next(-1)}),this.geolocation=new QK({trackingOptions:{enableHighAccuracy:!0},tracking:!1}),this.geolocation.on("change:position",()=>{const t=this.geolocation.getPosition();this.location$.next(t?new ZD(t[0],t[1]):null)}),Hg([this.enable$,this.serverURL$,this.fixedLocation$,this.source$]).subscribe(([t,e,i,n])=>{let r=!1;t&&n===XK.Server&&e?(this.fetchTimer&&window.clearInterval(this.fetchTimer),this.fetchTimer=window.setInterval(()=>Object(ue.a)(this,void 0,void 0,function*(){if(this.serverURL$.value)try{this.location$.next(yield this.fetchLocation(this.serverURL$.value)),""!==this.retrievalError$.value&&this.retrievalError$.next("")}catch(t){this.retrievalError$.next(t.message)}}),this.locationFetchInterval),r=!0):(window.clearInterval(this.fetchTimer),this.fetchTimer=null);const s=t&&n===XK.Browser;if(s&&!this.geolocation.getTracking()){const t=this.geolocation.getPosition();this.location$.next(t?new ZD(t[0],t[1]):null)}if(s&&(r=!0),this.geolocation.setTracking(s),t&&n===XK.FixedLocation&&i){const{lon:t,lat:e}=WK()(i);this.location$.next(new ZD(t,e)),r=!0}t||""!==this.retrievalError$.value&&this.retrievalError$.next(""),this.validConfiguration$.next(r)}),this.loadConfig(),Object(or.a)(this.enable$,this.fixedLocation$,this.serverURL$,this.showBearing$,this.source$).subscribe(()=>{this.configService.set("geolocationConfig",new JK({enable:this.enable$.value,fixedLocation:this.fixedLocation$.value,serverURL:this.serverURL$.value,showBearing:this.showBearing$.value,source:this.source$.value}))})}loadConfig(){const t=this.configService.geolocationConfig;t&&(FD(t.enable)&&this.enable$.next(t.enable),FD(t.fixedLocation)&&this.fixedLocation$.next(t.fixedLocation),FD(t.serverURL)&&this.serverURL$.next(t.serverURL),FD(t.showBearing)&&this.showBearing$.next(t.showBearing),FD(t.source)&&this.source$.next(t.source))}fetchLocation(t){return Object(ue.a)(this,void 0,void 0,function*(){let e;try{e=yield fetch(t)}catch(n){throw new Error(`Impossible de r\xe9cup\xe9rer la position : ${n.message}. Le serveur est-il joignable ?`)}if(!e.ok)throw new Error(`Mauvais code retour (${e.status}). Une r\xe9ponse de type 200 est attendue.`);const i=yield e.text();try{const t=i.split(",");if(2!==t.length)throw new Error(`Mauvais format. R\xe9ponse re\xe7ue : '${i.slice(0,50)}'`);const e=parseFloat(t[0]),n=parseFloat(t[1]);if(isNaN(e))throw new Error(`La latitude '${t[0]}' n'est pas un nombre valide`);if(isNaN(n))throw new Error(`La longitude '${t[0]}' n'est pas un nombre valide`);return new ZD(n,e)}catch(n){throw new Error(`Impossible de d\xe9coder la position : ${n.message}. Le format "latitude,longitude" est attendu.`)}})}updateEnable(t){this.enable$.next(t)}updateServerURL(t){this.serverURL$.next(t)}updateFixedLocation(t){this.fixedLocation$.next(t)}updateSource(t){this.source$.next(t),this.retrievalError$.next("")}toggleShowBearing(){this.showBearing$.next(!this.showBearing$.value)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(cI))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function r$(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-form-field",2),r.Vb(1,"mat-label"),r.Kc(2,"URL du serveur"),r.Ub(),r.Vb(3,"input",10),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).serverURL=e}),r.Ub(),r.Ub(),r.Vb(4,"button",11),r.cc("click",function(){return r.Ac(t),r.gc(2).saveServerLocation()}),r.Kc(5," Enregistrer "),r.Ub(),r.Vb(6,"button",12),r.cc("click",function(){return r.Ac(t),r.gc(2).tryFetchLocation()}),r.Kc(7," Tester l'URL "),r.Ub()}if(2&t){const t=r.gc(2);r.Db(3),r.nc("ngModel",t.serverURL)("disabled",!t.geolocationLayerService.enable$.value),r.Db(1),r.nc("disabled",!t.geolocationLayerService.enable$.value),r.Db(2),r.nc("disabled",!t.serverURL||!t.geolocationLayerService.enable$.value)}}function s$(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",13),r.Kc(1),r.Ub(),r.Vb(2,"button",14),r.cc("click",function(){return r.Ac(t),r.gc(2).editMode=!0}),r.Kc(3," \xc9diter "),r.Ub()}if(2&t){const t=r.gc(2);r.Db(1),r.Lc(t.serverURL||"Aucune URL configur\xe9e"),r.Db(1),r.nc("disabled",!t.geolocationLayerService.enable$.value)}}function o$(t,e){if(1&t&&(r.Vb(0,"div",15),r.Kc(1),r.Ub()),2&t){const t=r.gc(2);r.Db(1),r.Mc(" ",t.fetchAttempt," ")}}function a$(t,e){1&t&&(r.Vb(0,"p",16),r.Vb(1,"mat-icon",2),r.Kc(2,"warning"),r.Ub(),r.Kc(3," Avec certaines versions de Firefox, il faut autoriser le chargement de contenu non s\xe9curis\xe9 (HTTP) afin d'acc\xe9der \xe0 votre serveur en local. "),r.Ub(),r.Qb(4,"img",17))}function l$(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",1),r.Vb(1,"div",2),r.Kc(2,"URL du serveur :"),r.Ub(),r.Ic(3,r$,8,4,"ng-template",7),r.Ic(4,s$,4,2,"ng-template",7),r.Ub(),r.Ic(5,o$,2,1,"div",8),r.Vb(6,"div"),r.Kc(7," Pour mettre en oeuvre un serveur qui expose une position \xe0 partir d'un fichier local, veuillez vous r\xe9f\xe9rer \xe0 cet "),r.Vb(8,"button",9),r.cc("click",function(){return r.Ac(t),r.gc().openGeolocationSampleServerDialog()}),r.Kc(9,"exemple de serveur HTTP"),r.Ub(),r.Kc(10,". "),r.Qb(11,"br"),r.Kc(12," Sinon pour tester cette fonctionnalit\xe9, vous pouvez "),r.Vb(13,"button",9),r.cc("click",function(){return r.Ac(t),r.gc().useSampleServer()}),r.Kc(14,"utiliser l'URL de test"),r.Ub(),r.Kc(15," qui simule une position GPS : "),r.Vb(16,"em"),r.Kc(17),r.Ub(),r.Kc(18,". "),r.Ub(),r.Ic(19,a$,5,0,"ng-template",7)}if(2&t){const t=r.gc();r.Db(3),r.nc("ngIf",t.editMode),r.Db(1),r.nc("ngIf",!t.editMode),r.Db(1),r.nc("ngIf",t.fetchAttempt),r.Db(3),r.nc("disabled",!t.geolocationLayerService.enable$.value),r.Db(5),r.nc("disabled",!t.geolocationLayerService.enable$.value),r.Db(4),r.Lc(t.sampleServerURL),r.Db(2),r.nc("ngIf",t.isFirefox)}}function c$(t,e){1&t&&(r.Vb(0,"mat-error"),r.Kc(1,"Ce champ est n\xe9cessaire"),r.Ub())}function h$(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-form-field",2),r.Vb(1,"input",18),r.cc("accept",function(e){return r.Ac(t),r.gc(2).onFixedLocationUpdate(e)})("complete",function(e){return r.Ac(t),r.gc(2).onFixedLocationComplete(e)}),r.Ub(),r.Ic(2,c$,2,0,"mat-error",19),r.Ub(),r.Vb(3,"button",20),r.cc("click",function(){return r.Ac(t),r.gc(2).saveFixedLocation()}),r.Kc(4," Enregistrer "),r.Ub()}if(2&t){const t=r.gc(2);r.Db(1),r.nc("formControl",t.fixedLocation)("imask",t.lonLatMask),r.Db(1),r.nc("ngIf",null==t.fixedLocation.errors?null:t.fixedLocation.errors.mandatory),r.Db(1),r.nc("disabled",!t.fixedLocation.valid||!t.geolocationLayerService.enable$.value)}}function u$(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",13),r.Kc(1),r.Ub(),r.Vb(2,"button",14),r.cc("click",function(){return r.Ac(t),r.gc(2).editMode=!0}),r.Kc(3," \xc9diter "),r.Ub()}if(2&t){const t=r.gc(2);r.Db(1),r.Lc(t.fixedLocation.value||"Aucune position configur\xe9e"),r.Db(1),r.nc("disabled",!t.geolocationLayerService.enable$.value)}}function d$(t,e){if(1&t&&(r.Vb(0,"div",1),r.Vb(1,"div",2),r.Kc(2,"Position :"),r.Ub(),r.Ic(3,h$,5,4,"ng-template",7),r.Ic(4,u$,4,2,"ng-template",7),r.Ub()),2&t){const t=r.gc();r.Db(3),r.nc("ngIf",t.editMode),r.Db(1),r.nc("ngIf",!t.editMode)}}let p$=(()=>{class t{constructor(t,e){this.dialog=t,this.geolocationLayerService=e,this.editMode=!1,this.fixedLocation=new eh(""),this.fetchAttempt=null,this.sampleServerURL="https://sample-geoserver.anais.fabnum.fr/",this.lonLatMask={mask:"LAT\xb0`MIN'`MIN\"NS LON\xb0`MIN'`MIN\"EW",lazy:!1,blocks:{LON:{mask:ob,from:0,to:180},LAT:{mask:ob,from:0,to:85},NS:{mask:gb,enum:["N","S"]},EW:{mask:gb,enum:["E","W"]},MIN:{mask:ob,from:0,to:59}}}}ngOnInit(){this.geolocationLayerService.enable$.subscribe(t=>{t?this.fixedLocation.enable():this.fixedLocation.disable()}),this.geolocationLayerService.fixedLocation$.subscribe(t=>{this.fixedLocation.setValue(null!=t?t:"")}),this.geolocationLayerService.serverURL$.subscribe(t=>{this.serverURL=t}),this.geolocationLayerService.source$.subscribe(t=>{this.source=t,this.editMode=!1}),this.isFirefox=ZH.getParser(window.navigator.userAgent).isBrowser("firefox")}updateEnable(t){this.geolocationLayerService.updateEnable(t)}updateSource(t){this.geolocationLayerService.updateSource(t)}saveServerLocation(){return Object(ue.a)(this,void 0,void 0,function*(){try{""!==this.serverURL&&(yield this.geolocationLayerService.fetchLocation(this.serverURL)),this.geolocationLayerService.updateServerURL(this.serverURL),this.editMode=!1,this.fetchAttempt=""}catch(t){this.fetchAttempt=t.message}})}tryFetchLocation(){return Object(ue.a)(this,void 0,void 0,function*(){try{const t=yield this.geolocationLayerService.fetchLocation(this.serverURL);this.fetchAttempt=`Position r\xe9cup\xe9r\xe9e: latitude=${t.lat}, longitude=${t.lon}`}catch(t){this.fetchAttempt=t.message}})}openGeolocationSampleServerDialog(){this.dialog.open(ZK)}useSampleServer(){return Object(ue.a)(this,void 0,void 0,function*(){this.serverURL=this.sampleServerURL,yield this.saveServerLocation()})}saveFixedLocation(){return Object(ue.a)(this,void 0,void 0,function*(){this.fixedLocation.valid&&this.geolocationLayerService.updateFixedLocation(this.fixedLocation.value),this.editMode=!1})}onFixedLocationUpdate(t){this.fixedLocation.setErrors({mandatory:!0})}onFixedLocationComplete(t){try{WK()(t),this.fixedLocation.setErrors({mandatory:null}),this.fixedLocation.setValue(t,{emitEvent:!1})}catch($nt){}}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Gl),r.Pb(n$))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-geolocation-settings"]],decls:14,vars:5,consts:[["color","primary",1,"d-block","mt-2",3,"ngModel","ngModelChange"],[1,"d-flex-center","mt-2"],[1,"mr-2"],[3,"ngModel","disabled","ngModelChange"],["color","primary","value","browser"],["color","primary","value","server"],["color","primary","value","fixed_location"],[3,"ngIf"],["class","mt-1",4,"ngIf"],["mat-stroked-button","",1,"text-link",3,"disabled","click"],["matInput","",3,"ngModel","disabled","ngModelChange"],["mat-stroked-button","","title","Enregistrer l'URL du serveur",3,"disabled","click"],["mat-stroked-button","","title","Tester la r\xe9cup\xe9ration de cette URL",3,"disabled","click"],[2,"min-width","180px"],["mat-stroked-button","",1,"ml-2",3,"disabled","click"],[1,"mt-1"],[1,"firefox-warning-geolocation"],["src","assets/images/help-firefox-mixed-content-tutorial.png","alt","Configuration Firefox",1,"ml-3"],["matInput","",3,"formControl","imask","accept","complete"],[4,"ngIf"],["type","submit","mat-stroked-button","","title","Enregistrer",3,"disabled","click"]],template:function(t,e){1&t&&(r.Vb(0,"mat-slide-toggle",0),r.cc("ngModelChange",function(t){return e.updateEnable(t)}),r.Kc(1," Afficher la position GPS sur la carte\n"),r.Ub(),r.Vb(2,"div",1),r.Vb(3,"label",2),r.Kc(4,"Source :"),r.Ub(),r.Vb(5,"mat-radio-group",3),r.cc("ngModelChange",function(t){return e.updateSource(t)}),r.Vb(6,"mat-radio-button",4),r.Kc(7,"API Navigateur"),r.Ub(),r.Vb(8,"mat-radio-button",5),r.Kc(9,"Serveur"),r.Ub(),r.Vb(10,"mat-radio-button",6),r.Kc(11,"Point de r\xe9f\xe9rence"),r.Ub(),r.Ub(),r.Ub(),r.Ic(12,l$,20,7,"ng-template",7),r.Ic(13,d$,5,2,"ng-template",7)),2&t&&(r.nc("ngModel",e.geolocationLayerService.enable$.value),r.Db(5),r.nc("ngModel",e.geolocationLayerService.source$.value)("disabled",!e.geolocationLayerService.enable$.value),r.Db(7),r.nc("ngIf","server"===e.source),r.Db(1),r.nc("ngIf","fixed_location"===e.source))},directives:[NL,Vc,uh,sR,hR,ut,Dl,_u,cu,Ou,ac,Yp,bh,Cb,nu],styles:[".mat-radio-button[_ngcontent-%COMP%] ~ .mat-radio-button[_ngcontent-%COMP%]{margin-left:16px}.firefox-warning-geolocation[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:.9em;color:#d41a1a}.text-link[_ngcontent-%COMP%]{padding:0 8px;line-height:2em}"]}),t})();function f$(t,e){if(1&t&&(r.Vb(0,"mat-option",18),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.value),r.Db(1),r.Mc(" ",t.label," ")}}function m$(t,e){1&t&&(r.Vb(0,"mat-chip",23),r.Kc(1,"Restriction active"),r.Ub())}function g$(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-chip-list",19),r.Ic(1,m$,2,0,"mat-chip",20),r.Ub(),r.Vb(2,"button",21),r.cc("click",function(){return r.Ac(t),r.gc(2).mapRestrictionService.removeArea()}),r.Vb(3,"mat-icon"),r.Kc(4,"delete"),r.Ub(),r.Ub(),r.Vb(5,"button",22),r.cc("click",function(){return r.Ac(t),r.gc(2).mapRestrictionService.startSelectingArea()}),r.Vb(6,"mat-icon"),r.Kc(7,"edit"),r.Ub(),r.Ub()}if(2&t){const t=r.gc(2);r.Db(1),r.nc("ngIf",t.mapConfigService.restrictedAreas$.value)}}function A$(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",24),r.cc("click",function(){return r.Ac(t),r.gc(2).mapRestrictionService.startSelectingArea()}),r.Kc(1," S\xe9lectionner une zone "),r.Ub()}}function b$(t,e){if(1&t){const t=r.Wb();r.Vb(0,"h5"),r.Kc(1,"Intervalle de rafraichissement des derni\xe8res positions des navires"),r.Ub(),r.Vb(2,"div"),r.Kc(3,"En vue temps r\xe9el, les positions des navires sont rafraichies selon cet intervalle."),r.Ub(),r.Vb(4,"mat-form-field"),r.Vb(5,"mat-select",5),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc().mapConfigService.updateShipRefreshInterval(e)}),r.Ic(6,f$,2,2,"mat-option",6),r.Ub(),r.Ub(),r.Vb(7,"h5"),r.Kc(8,"Restriction de la carte"),r.Ub(),r.Vb(9,"p"),r.Kc(10," Cette option permet de limiter la r\xe9cup\xe9ration des navires \xe0 une zone de la carte. Notez que la zone restreinte va d\xe9signer les tuiles de donn\xe9es \xe0 charger. Il est donc normal que la zone charg\xe9e soit un peu plus grande que la zone choisie. "),r.Ub(),r.Vb(11,"div",16),r.Ic(12,g$,8,1,"ng-template",4),r.Ic(13,A$,2,0,"button",17),r.Ub()}if(2&t){const t=r.gc();r.Db(5),r.nc("ngModel",t.mapConfigService.shipRefreshInterval$.value),r.Db(1),r.nc("ngForOf",t.shipRefreshIntervals),r.Db(6),r.nc("ngIf",t.mapConfigService.restrictedAreas$.value),r.Db(1),r.nc("ngIf",!t.mapConfigService.restrictedAreas$.value)}}function v$(t,e){if(1&t&&(r.Vb(0,"mat-option",18),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.key),r.Db(1),r.Mc(" ",t.label," ")}}function _$(t,e){1&t&&(r.Vb(0,"mat-error"),r.Kc(1,"La longitude est invalide"),r.Ub())}const y$=[{label:"30 secondes",value:3e4},{label:"1 minute",value:6e4},{label:"2 minutes",value:12e4},{label:"5 minutes",value:3e5},{label:"10 minutes",value:6e5},{label:"20 minutes",value:12e5},{label:"D\xe9sactiv\xe9",value:2147483647}];let w$=(()=>{class t{constructor(t,e,i){this.configService=t,this.mapConfigService=e,this.mapRestrictionService=i,this.shipRefreshIntervals=y$,this.availableTimeRanges=tI.filter(t=>!t.isCustom)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(cI),r.Pb(hI),r.Pb(RK))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-settings-dialog"]],decls:82,vars:20,consts:[["mat-dialog-title","",1,"d-flex"],[1,"u-flex"],["mat-button","","title","Fermer le panneau",3,"mat-dialog-close"],["color","primary",1,"d-block",3,"ngModel","ngModelChange"],[3,"ngIf"],[3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"my-3"],["color","primary","title","Ce param\xe8tre permet d'afficher des hexagones plus petits lors de la s\xe9lection de zones.",1,"d-block",3,"ngModel","ngModelChange"],["color","primary","title","Ce param\xe8tre permet d'afficher les traces des navires traduites en arcs dirig\xe9s dans la grille hexagonale.",1,"d-block",3,"ngModel","ngModelChange"],[1,"d-flex-center","my-2"],[1,"mr-2"],["color","primary","thumbLabel","true",2,"width","300px",3,"min","max","step","tickInterval","value","change"],["type","number","matInput","","appLongitude","",3,"ngModel","ngModelChange"],["longitudeCenter","ngModel"],[4,"ngIf"],[1,"d-flex-center"],["mat-raised-button","",3,"click",4,"ngIf"],[3,"value"],[1,"d-inline","mr-2"],["color","primary","selected","",4,"ngIf"],["mat-button","","color","warn","title","Supprimer la zone de restriction",3,"click"],["mat-button","","title","Mettre \xe0 jour la zone de restriction",3,"click"],["color","primary","selected",""],["mat-raised-button","",3,"click"]],template:function(t,e){if(1&t&&(r.Vb(0,"h1",0),r.Kc(1," Param\xe8tres g\xe9n\xe9raux "),r.Qb(2,"div",1),r.Vb(3,"button",2),r.Vb(4,"mat-icon"),r.Kc(5,"close"),r.Ub(),r.Ub(),r.Ub(),r.Vb(6,"div"),r.Vb(7,"h3"),r.Kc(8,"Bande passante"),r.Ub(),r.Vb(9,"p"),r.Kc(10," Ces param\xe8tres peuvent \xeatre utilis\xe9s pour r\xe9duire la bande passante utilis\xe9e quand le d\xe9bit de la connexion internet est faible (par exemple dans un avion ou un navire). "),r.Ub(),r.Vb(11,"h5"),r.Kc(12,"Chargement manuel"),r.Ub(),r.Vb(13,"p"),r.Kc(14," Par d\xe9faut, les donn\xe9es navires et a\xe9ronefs sont charg\xe9s par tuiles \xe0 chaque d\xe9placement de carte, et rafraichis r\xe9guli\xe8rement. Le chargement manuel d\xe9sactive la r\xe9cup\xe9ration automatique des donn\xe9es et permet \xe0 l'utilisateur de d\xe9clencher manuellement cette r\xe9cup\xe9ration. "),r.Ub(),r.Vb(15,"mat-slide-toggle",3),r.cc("ngModelChange",function(t){return e.mapConfigService.updateManualMapFetch(t)}),r.Kc(16," Chargement manuel actif "),r.Ub(),r.Ic(17,b$,14,4,"ng-template",4),r.Vb(18,"h5"),r.Kc(19,"P\xe9riode de temps par d\xe9faut"),r.Ub(),r.Vb(20,"div"),r.Kc(21,"Cette p\xe9riode de temps permet d'afficher l'historique des traces et des alertes affich\xe9 lorsque l'on visualise le d\xe9tail d'un navire."),r.Ub(),r.Vb(22,"mat-form-field"),r.Vb(23,"mat-select",5),r.cc("ngModelChange",function(t){return e.configService.set("defaultTimeRange",t)}),r.Ic(24,v$,2,2,"mat-option",6),r.Ub(),r.Ub(),r.Vb(25,"h5"),r.Kc(26,"Limite de zoom minimum"),r.Ub(),r.Vb(27,"div"),r.Kc(28,"Par d\xe9faut le zoom minimum est limit\xe9 afin de r\xe9duire la consommation r\xe9seau et m\xe9moire de l'application. Si vous d\xe9sactivez cette option, vous pourrez alors d\xe9zoomer mais cela aura un co\xfbt en termes de bande passante et de capacit\xe9s de traitement (CPU et m\xe9moire). Il se peut que votre navigateur se bloque si vous n'avez pas assez de m\xe9moire !"),r.Ub(),r.Vb(29,"mat-slide-toggle",3),r.cc("ngModelChange",function(t){return e.mapConfigService.updateLimitMinimumZoom(t)}),r.Kc(30," Limite de zoom active "),r.Ub(),r.Qb(31,"mat-divider",7),r.Vb(32,"h3"),r.Kc(33,"Affichage"),r.Ub(),r.Vb(34,"mat-slide-toggle",3),r.cc("ngModelChange",function(t){return e.mapConfigService.updatePreloadMapTiles(t)}),r.Vb(35,"div"),r.Kc(36,"Pr\xe9charger les tuiles du fond de carte (affichage plus rapide mais bande passante x2 environ)"),r.Ub(),r.Ub(),r.Vb(37,"mat-slide-toggle",3),r.cc("ngModelChange",function(t){return e.mapConfigService.updateZoomOnLocationEvents(t)}),r.Kc(38," Zoomer sur la carte lors d'\xe9v\xe9nements de localisation "),r.Ub(),r.Vb(39,"mat-slide-toggle",3),r.cc("ngModelChange",function(t){return e.mapConfigService.updateHidePositionsInLowZooms(t)}),r.Kc(40," Masquer les points des traces quand le zoom est bas "),r.Ub(),r.Vb(41,"mat-slide-toggle",8),r.cc("ngModelChange",function(t){return e.mapConfigService.updateHighHexagonsResolution(t)}),r.Kc(42," Utiliser des hexagones de haute r\xe9solution "),r.Ub(),r.Vb(43,"mat-slide-toggle",9),r.cc("ngModelChange",function(t){return e.mapConfigService.updateDebugH3Trace(t)}),r.Kc(44," Voir l'analyse des traces des navires dans la grille hexagonale (fonction de Debug) "),r.Ub(),r.Vb(45,"mat-slide-toggle",3),r.cc("ngModelChange",function(t){return e.mapConfigService.updateShowMarineTrafficPhotos(t)}),r.Kc(46," Afficher les photos de Marine Traffic dans la fiche navire "),r.Ub(),r.Vb(47,"mat-slide-toggle",3),r.cc("ngModelChange",function(t){return e.mapConfigService.updateShowMarineTrafficDeparture(t)}),r.Kc(48," Afficher le bouton pour r\xe9cup\xe9rer la provenance de Marine Traffic "),r.Ub(),r.Vb(49,"div",10),r.Vb(50,"label",11),r.Kc(51,"Transparence des \xe9tiquettes et infobulles :"),r.Ub(),r.Kc(52," Transparent "),r.Vb(53,"mat-slider",12),r.cc("change",function(t){return e.mapConfigService.updateTooltipsOpacity(t.value)}),r.Ub(),r.Kc(54," Opaque "),r.Ub(),r.Vb(55,"mat-slide-toggle",3),r.cc("ngModelChange",function(t){return e.mapConfigService.updateUseUTCDates(t)}),r.Kc(56," Afficher les dates en UTC "),r.Ub(),r.Vb(57,"h5"),r.Kc(58,"D\xe9calage de longitude"),r.Ub(),r.Vb(59,"div"),r.Kc(60," Par d\xe9faut, les donn\xe9es sont affich\xe9es de la longitude -180 \xe0 la longitude +180. Or cet affichage occasionne une coupure de l'affichage au milieu de l'oc\xe9an pacifique. Si vous travaillez r\xe9guli\xe8rement sur cette zone, alors pour pouvez d\xe9caler le centre afin de d\xe9placer la coupure \xe0 un endroit moins important pour vous. "),r.Ub(),r.Vb(61,"mat-form-field"),r.Vb(62,"mat-label"),r.Kc(63,"Longitude"),r.Ub(),r.Vb(64,"input",13,14),r.cc("ngModelChange",function(t){return e.mapConfigService.updateLongitudeCenter(t)}),r.Ub(),r.Ic(66,_$,2,0,"mat-error",15),r.Ub(),r.Qb(67,"mat-divider",7),r.Vb(68,"h3"),r.Kc(69,"G\xe9olocalisation"),r.Ub(),r.Vb(70,"div"),r.Kc(71,"L'option ci-dessous permet d'afficher une position en temps-r\xe9el sur la carte, en utilisant un point de r\xe9f\xe9rence, l'API navigateur, ou bien un serveur HTTP en local."),r.Ub(),r.Vb(72,"div"),r.Kc(73,"Si vous \xeates dans un avion ou dans un navire, cette option permet par exemple d'afficher la position de l'avion ou du navire embarquant ANAIS."),r.Ub(),r.Vb(74,"div"),r.Kc(75,"Notez bien que cette information de position est utilis\xe9e localement pour \xeatre affich\xe9e sur la carte."),r.Ub(),r.Vb(76,"div"),r.Kc(77,"Cette position n'est "),r.Vb(78,"strong"),r.Kc(79,"jamais"),r.Ub(),r.Kc(80," envoy\xe9e sur internet (serveur ANAIS ou autre)"),r.Ub(),r.Qb(81,"app-geolocation-settings"),r.Ub()),2&t){const t=r.wc(65);r.Db(15),r.nc("ngModel",e.mapConfigService.manualMapFetch$.value),r.Db(2),r.nc("ngIf",!e.mapConfigService.manualMapFetch$.value),r.Db(6),r.nc("ngModel",e.configService.defaultTimeRange),r.Db(1),r.nc("ngForOf",e.availableTimeRanges),r.Db(5),r.nc("ngModel",e.mapConfigService.limitMinimumZoom$.value),r.Db(5),r.nc("ngModel",e.mapConfigService.preloadMapTiles$.value),r.Db(3),r.nc("ngModel",e.mapConfigService.zoomOnLocationEvents$.value),r.Db(2),r.nc("ngModel",e.mapConfigService.hidePositionsInLowZooms$.value),r.Db(2),r.nc("ngModel",e.mapConfigService.highHexagonsResolution$.value),r.Db(2),r.nc("ngModel",e.mapConfigService.debugH3Trace$.value),r.Db(2),r.nc("ngModel",e.mapConfigService.showMarineTrafficPhotos$.value),r.Db(2),r.nc("ngModel",e.mapConfigService.showMarineTrafficDeparture$.value),r.Db(6),r.nc("min",0)("max",1)("step",.1)("tickInterval",1)("value",e.mapConfigService.tooltipsOpacity$.value),r.Db(2),r.nc("ngModel",e.mapConfigService.useUTCDates$.value),r.Db(9),r.nc("ngModel",e.mapConfigService.longitudeCenter$.value),r.Db(2),r.nc("ngIf",t.invalid&&t.errors.invalidLongitude)}},directives:[ql,Dl,Zl,Yp,NL,Vc,uh,ut,_u,Vg,ct,GT,jK,cu,fh,Ou,ac,$K,p$,bl,_L,pL,nu],styles:[""]}),t})(),x$=(()=>{class t extends LT{constructor(t,e,i,n,r,s){super(),this.titleService=t,this.router=e,this.dialog=i,this.mapService=n,this.routeService=r,this.uiService=s}ngOnInit(){this.titleService.setTitle("Param\xe8tres - ANAIS"),this.mapService.hasBooted||this.mapService.resetToDefaultView(),this.subscriptions.push(this.uiService.drawingMode$.pipe(mn()).subscribe(t=>{t?this.dialogRef&&(this.dialogRef.close(!1),this.dialogRef=null):this.dialogRef||this.createDialog()}))}createDialog(){this.dialogRef=this.dialog.open(w$,{height:"90vh",width:"90vw",maxWidth:"90vw",closeOnNavigation:!0}),this.dialogRef.afterClosed().subscribe((t=!0)=>Object(ue.a)(this,void 0,void 0,function*(){if(t){const t=this.routeService.previousUrl||"";yield this.router.navigateByUrl(t)}}))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(he),r.Pb(sw),r.Pb(Gl),r.Pb(pI),r.Pb(vI),r.Pb(VI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-settings-loader"]],features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2}),t})();function C$(t){return e=>e.lift(new S$(t))}class S${constructor(t){this.value=t}call(t,e){return e.subscribe(new k$(t,this.value))}}class k$ extends Ee.a{constructor(t,e){super(t),this.value=e}_next(t){this.destination.next(this.value)}}const E$=["*"];function D$(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",2),r.cc("click",function(){return r.Ac(t),r.gc()._onBackdropClicked()}),r.Ub()}if(2&t){const t=r.gc();r.Hb("mat-drawer-shown",t._isShowingBackdrop())}}function I$(t,e){1&t&&(r.Vb(0,"mat-drawer-content"),r.lc(1,2),r.Ub())}const P$=[[["mat-drawer"]],[["mat-drawer-content"]],"*"],O$=["mat-drawer","mat-drawer-content","*"],M$={transformDrawer:$r("transform",[qr("open, open-instant",Zr({transform:"none",visibility:"visible"})),qr("void",Zr({"box-shadow":"none",visibility:"hidden"})),Qr("void => open-instant",Gr("0ms")),Qr("void <=> open, open-instant => void",Gr("400ms cubic-bezier(0.25, 0.8, 0.25, 1)"))])},T$=new r.s("MAT_DRAWER_DEFAULT_AUTOSIZE",{providedIn:"root",factory:function(){return!1}}),R$=new r.s("MAT_DRAWER_CONTAINER");let V$=(()=>{class t extends ir{constructor(t,e,i,n,r){super(i,n,r),this._changeDetectorRef=t,this._container=e}ngAfterContentInit(){this._container._contentMarginChanges.subscribe(()=>{this._changeDetectorRef.markForCheck()})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(Object(r.W)(()=>L$)),r.Pb(r.l),r.Pb(er),r.Pb(r.B))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-drawer-content"]],hostAttrs:[1,"mat-drawer-content"],hostVars:4,hostBindings:function(t,e){2&t&&r.Fc("margin-left",e._container._contentMargins.left,"px")("margin-right",e._container._contentMargins.right,"px")},features:[r.Ab],ngContentSelectors:E$,decls:1,vars:0,template:function(t,e){1&t&&(r.mc(),r.lc(0))},encapsulation:2,changeDetection:0}),t})(),F$=(()=>{class t{constructor(t,e,i,n,s,o,a){this._elementRef=t,this._focusTrapFactory=e,this._focusMonitor=i,this._platform=n,this._ngZone=s,this._doc=o,this._container=a,this._elementFocusedBeforeDrawerWasOpened=null,this._enableAnimations=!1,this._position="start",this._mode="over",this._disableClose=!1,this._opened=!1,this._animationStarted=new _e.a,this._animationEnd=new _e.a,this._animationState="void",this.openedChange=new r.o(!0),this._openedStream=this.openedChange.pipe(He(t=>t),Object(Ge.a)(()=>{})),this.openedStart=this._animationStarted.pipe(He(t=>t.fromState!==t.toState&&0===t.toState.indexOf("open")),C$(void 0)),this._closedStream=this.openedChange.pipe(He(t=>!t),Object(Ge.a)(()=>{})),this.closedStart=this._animationStarted.pipe(He(t=>t.fromState!==t.toState&&"void"===t.toState),C$(void 0)),this._destroyed=new _e.a,this.onPositionChanged=new r.o,this._modeChanged=new _e.a,this.openedChange.subscribe(t=>{t?(this._doc&&(this._elementFocusedBeforeDrawerWasOpened=this._doc.activeElement),this._takeFocus()):this._isFocusWithinDrawer()&&this._restoreFocus()}),this._ngZone.runOutsideAngular(()=>{en(this._elementRef.nativeElement,"keydown").pipe(He(t=>27===t.keyCode&&!this.disableClose&&!ke(t)),Sn(this._destroyed)).subscribe(t=>this._ngZone.run(()=>{this.close(),t.stopPropagation(),t.preventDefault()}))}),this._animationEnd.pipe(mn((t,e)=>t.fromState===e.fromState&&t.toState===e.toState)).subscribe(t=>{const{fromState:e,toState:i}=t;(0===i.indexOf("open")&&"void"===e||"void"===i&&0===e.indexOf("open"))&&this.openedChange.emit(this._opened)})}get position(){return this._position}set position(t){(t="end"===t?"end":"start")!=this._position&&(this._position=t,this.onPositionChanged.emit())}get mode(){return this._mode}set mode(t){this._mode=t,this._updateFocusTrapState(),this._modeChanged.next()}get disableClose(){return this._disableClose}set disableClose(t){this._disableClose=ti(t)}get autoFocus(){const t=this._autoFocus;return null==t?"side"!==this.mode:t}set autoFocus(t){this._autoFocus=ti(t)}get opened(){return this._opened}set opened(t){this.toggle(ti(t))}_takeFocus(){this.autoFocus&&this._focusTrap&&this._focusTrap.focusInitialElementWhenReady().then(t=>{t||"function"!=typeof this._elementRef.nativeElement.focus||this._elementRef.nativeElement.focus()})}_restoreFocus(){this.autoFocus&&(this._elementFocusedBeforeDrawerWasOpened?this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened,this._openedVia):this._elementRef.nativeElement.blur(),this._elementFocusedBeforeDrawerWasOpened=null,this._openedVia=null)}_isFocusWithinDrawer(){var t;const e=null===(t=this._doc)||void 0===t?void 0:t.activeElement;return!!e&&this._elementRef.nativeElement.contains(e)}ngAfterContentInit(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._updateFocusTrapState()}ngAfterContentChecked(){this._platform.isBrowser&&(this._enableAnimations=!0)}ngOnDestroy(){this._focusTrap&&this._focusTrap.destroy(),this._animationStarted.complete(),this._animationEnd.complete(),this._modeChanged.complete(),this._destroyed.next(),this._destroyed.complete()}open(t){return this.toggle(!0,t)}close(){return this.toggle(!1)}_closeViaBackdropClick(){return this._setOpen(!1,!0)}toggle(t=!this.opened,e){return this._setOpen(t,!t&&this._isFocusWithinDrawer(),e)}_setOpen(t,e,i="program"){return this._opened=t,t?(this._animationState=this._enableAnimations?"open":"open-instant",this._openedVia=i):(this._animationState="void",e&&this._restoreFocus()),this._updateFocusTrapState(),new Promise(t=>{this.openedChange.pipe(Qe(1)).subscribe(e=>t(e?"open":"close"))})}_getWidth(){return this._elementRef.nativeElement&&this._elementRef.nativeElement.offsetWidth||0}_updateFocusTrapState(){this._focusTrap&&(this._focusTrap.enabled=this.opened&&"side"!==this.mode)}_animationStartListener(t){this._animationStarted.next(t)}_animationDoneListener(t){this._animationEnd.next(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.l),r.Pb(Bi),r.Pb(qi),r.Pb(ci),r.Pb(r.B),r.Pb(a,8),r.Pb(R$,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-drawer"]],hostAttrs:["tabIndex","-1",1,"mat-drawer"],hostVars:12,hostBindings:function(t,e){1&t&&r.Gc("@transform.start",function(t){return e._animationStartListener(t)})("@transform.done",function(t){return e._animationDoneListener(t)}),2&t&&(r.Eb("align",null),r.Hc("@transform",e._animationState),r.Hb("mat-drawer-end","end"===e.position)("mat-drawer-over","over"===e.mode)("mat-drawer-push","push"===e.mode)("mat-drawer-side","side"===e.mode)("mat-drawer-opened",e.opened))},inputs:{position:"position",mode:"mode",disableClose:"disableClose",autoFocus:"autoFocus",opened:"opened"},outputs:{openedChange:"openedChange",_openedStream:"opened",openedStart:"openedStart",_closedStream:"closed",closedStart:"closedStart",onPositionChanged:"positionChanged"},exportAs:["matDrawer"],ngContentSelectors:E$,decls:2,vars:0,consts:[[1,"mat-drawer-inner-container"]],template:function(t,e){1&t&&(r.mc(),r.Vb(0,"div",0),r.lc(1),r.Ub())},encapsulation:2,data:{animation:[M$.transformDrawer]},changeDetection:0}),t})(),L$=(()=>{class t{constructor(t,e,i,n,s,o=!1,a){this._dir=t,this._element=e,this._ngZone=i,this._changeDetectorRef=n,this._animationMode=a,this._drawers=new r.F,this.backdropClick=new r.o,this._destroyed=new _e.a,this._doCheckSubject=new _e.a,this._contentMargins={left:null,right:null},this._contentMarginChanges=new _e.a,t&&t.change.pipe(Sn(this._destroyed)).subscribe(()=>{this._validateDrawers(),this.updateContentMargins()}),s.change().pipe(Sn(this._destroyed)).subscribe(()=>this.updateContentMargins()),this._autosize=o}get start(){return this._start}get end(){return this._end}get autosize(){return this._autosize}set autosize(t){this._autosize=ti(t)}get hasBackdrop(){return null==this._backdropOverride?!this._start||"side"!==this._start.mode||!this._end||"side"!==this._end.mode:this._backdropOverride}set hasBackdrop(t){this._backdropOverride=null==t?null:ti(t)}get scrollable(){return this._userContent||this._content}ngAfterContentInit(){this._allDrawers.changes.pipe(Pn(this._allDrawers),Sn(this._destroyed)).subscribe(t=>{this._drawers.reset(t.filter(t=>!t._container||t._container===this)),this._drawers.notifyOnChanges()}),this._drawers.changes.pipe(Pn(null)).subscribe(()=>{this._validateDrawers(),this._drawers.forEach(t=>{this._watchDrawerToggle(t),this._watchDrawerPosition(t),this._watchDrawerMode(t)}),(!this._drawers.length||this._isDrawerOpen(this._start)||this._isDrawerOpen(this._end))&&this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),this._ngZone.runOutsideAngular(()=>{this._doCheckSubject.pipe(Be(10),Sn(this._destroyed)).subscribe(()=>this.updateContentMargins())})}ngOnDestroy(){this._contentMarginChanges.complete(),this._doCheckSubject.complete(),this._drawers.destroy(),this._destroyed.next(),this._destroyed.complete()}open(){this._drawers.forEach(t=>t.open())}close(){this._drawers.forEach(t=>t.close())}updateContentMargins(){let t=0,e=0;if(this._left&&this._left.opened)if("side"==this._left.mode)t+=this._left._getWidth();else if("push"==this._left.mode){const i=this._left._getWidth();t+=i,e-=i}if(this._right&&this._right.opened)if("side"==this._right.mode)e+=this._right._getWidth();else if("push"==this._right.mode){const i=this._right._getWidth();e+=i,t-=i}t=t||null,e=e||null,t===this._contentMargins.left&&e===this._contentMargins.right||(this._contentMargins={left:t,right:e},this._ngZone.run(()=>this._contentMarginChanges.next(this._contentMargins)))}ngDoCheck(){this._autosize&&this._isPushed()&&this._ngZone.runOutsideAngular(()=>this._doCheckSubject.next())}_watchDrawerToggle(t){t._animationStarted.pipe(He(t=>t.fromState!==t.toState),Sn(this._drawers.changes)).subscribe(t=>{"open-instant"!==t.toState&&"NoopAnimations"!==this._animationMode&&this._element.nativeElement.classList.add("mat-drawer-transition"),this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),"side"!==t.mode&&t.openedChange.pipe(Sn(this._drawers.changes)).subscribe(()=>this._setContainerClass(t.opened))}_watchDrawerPosition(t){t&&t.onPositionChanged.pipe(Sn(this._drawers.changes)).subscribe(()=>{this._ngZone.onMicrotaskEmpty.pipe(Qe(1)).subscribe(()=>{this._validateDrawers()})})}_watchDrawerMode(t){t&&t._modeChanged.pipe(Sn(Object(or.a)(this._drawers.changes,this._destroyed))).subscribe(()=>{this.updateContentMargins(),this._changeDetectorRef.markForCheck()})}_setContainerClass(t){const e=this._element.nativeElement.classList,i="mat-drawer-container-has-open";t?e.add(i):e.remove(i)}_validateDrawers(){this._start=this._end=null,this._drawers.forEach(t=>{"end"==t.position?this._end=t:this._start=t}),this._right=this._left=null,this._dir&&"rtl"===this._dir.value?(this._left=this._end,this._right=this._start):(this._left=this._start,this._right=this._end)}_isPushed(){return this._isDrawerOpen(this._start)&&"over"!=this._start.mode||this._isDrawerOpen(this._end)&&"over"!=this._end.mode}_onBackdropClicked(){this.backdropClick.emit(),this._closeModalDrawersViaBackdrop()}_closeModalDrawersViaBackdrop(){[this._start,this._end].filter(t=>t&&!t.disableClose&&this._canHaveBackdrop(t)).forEach(t=>t._closeViaBackdropClick())}_isShowingBackdrop(){return this._isDrawerOpen(this._start)&&this._canHaveBackdrop(this._start)||this._isDrawerOpen(this._end)&&this._canHaveBackdrop(this._end)}_canHaveBackdrop(t){return"side"!==t.mode||!!this._backdropOverride}_isDrawerOpen(t){return null!=t&&t.opened}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Zn,8),r.Pb(r.l),r.Pb(r.B),r.Pb(r.h),r.Pb(nr),r.Pb(T$),r.Pb(pa,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-drawer-container"]],contentQueries:function(t,e,i){if(1&t&&(r.Ib(i,V$,1),r.Ib(i,F$,1)),2&t){let t;r.vc(t=r.dc())&&(e._content=t.first),r.vc(t=r.dc())&&(e._allDrawers=t)}},viewQuery:function(t,e){if(1&t&&r.Pc(V$,1),2&t){let t;r.vc(t=r.dc())&&(e._userContent=t.first)}},hostAttrs:[1,"mat-drawer-container"],hostVars:2,hostBindings:function(t,e){2&t&&r.Hb("mat-drawer-container-explicit-backdrop",e._backdropOverride)},inputs:{autosize:"autosize",hasBackdrop:"hasBackdrop"},outputs:{backdropClick:"backdropClick"},exportAs:["matDrawerContainer"],features:[r.Cb([{provide:R$,useExisting:t}])],ngContentSelectors:O$,decls:4,vars:2,consts:[["class","mat-drawer-backdrop",3,"mat-drawer-shown","click",4,"ngIf"],[4,"ngIf"],[1,"mat-drawer-backdrop",3,"click"]],template:function(t,e){1&t&&(r.mc(P$),r.Ic(0,D$,1,2,"div",0),r.lc(1),r.lc(2,1),r.Ic(3,I$,2,0,"mat-drawer-content",1)),2&t&&(r.nc("ngIf",e.hasBackdrop),r.Db(3),r.nc("ngIf",!e._content))},directives:[ut,V$],styles:[".mat-drawer-container{position:relative;z-index:1;box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}.cdk-high-contrast-active .mat-drawer-backdrop{opacity:.5}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}.cdk-high-contrast-active .mat-drawer,.cdk-high-contrast-active [dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}.cdk-high-contrast-active [dir=rtl] .mat-drawer,.cdk-high-contrast-active .mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer{transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}.mat-sidenav-fixed{position:fixed}\n"],encapsulation:2,changeDetection:0}),t})(),U$=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Et,Sa,hi,rr],rr,Sa]}),t})();var B$=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),N$=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r.element=i,r.index=n,r}return B$(e,t),e}(MC),j$=function(t){function e(e,i){var n=t.call(this)||this;if(n.unique_=!!(i||{}).unique,n.array_=e||[],n.unique_)for(var r=0,s=n.array_.length;r<s;++r)n.assertUnique_(n.array_[r],r);return n.updateLength_(),n}return B$(e,t),e.prototype.clear=function(){for(;this.getLength()>0;)this.pop()},e.prototype.extend=function(t){for(var e=0,i=t.length;e<i;++e)this.push(t[e]);return this},e.prototype.forEach=function(t){for(var e=this.array_,i=0,n=e.length;i<n;++i)t(e[i],i,e)},e.prototype.getArray=function(){return this.array_},e.prototype.item=function(t){return this.array_[t]},e.prototype.getLength=function(){return this.get("length")},e.prototype.insertAt=function(t,e){this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new N$("add",e,t))},e.prototype.pop=function(){return this.removeAt(this.getLength()-1)},e.prototype.push=function(t){this.unique_&&this.assertUnique_(t);var e=this.getLength();return this.insertAt(e,t),this.getLength()},e.prototype.remove=function(t){for(var e=this.array_,i=0,n=e.length;i<n;++i)if(e[i]===t)return this.removeAt(i)},e.prototype.removeAt=function(t){var e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new N$("remove",e,t)),e},e.prototype.setAt=function(t,e){var i=this.getLength();if(t<i){this.unique_&&this.assertUnique_(e,t);var n=this.array_[t];this.array_[t]=e,this.dispatchEvent(new N$("remove",n,t)),this.dispatchEvent(new N$("add",e,t))}else{for(var r=i;r<t;++r)this.insertAt(r,void 0);this.insertAt(t,e)}},e.prototype.updateLength_=function(){this.set("length",this.array_.length)},e.prototype.assertUnique_=function(t,e){for(var i=0,n=this.array_.length;i<n;++i)if(this.array_[i]===t&&i!==e)throw new _S(58)},e}(BE),z$=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function H$(t,e,i,n){var r=t.getZoom();if(void 0!==r){var s=t.getConstrainedZoom(r+e),o=t.getResolutionForZoom(s);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:o,anchor:i,duration:void 0!==n?n:250,easing:XC})}}var K$=function(t){function e(e){var i=t.call(this)||this;return e&&e.handleEvent&&(i.handleEvent=e.handleEvent),i.map_=null,i.setActive(!0),i}return z$(e,t),e.prototype.getActive=function(){return this.get("active")},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set("active",t)},e.prototype.setMap=function(t){this.map_=t},e}(BE),$$={SINGLECLICK:"singleclick",CLICK:"click",DBLCLICK:"dblclick",POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},G$=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),W$=function(t){function e(e){var i=t.call(this)||this,n=e||{};return i.delta_=n.delta?n.delta:1,i.duration_=void 0!==n.duration?n.duration:250,i}return G$(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==$$.DBLCLICK){var i=t.originalEvent,n=t.coordinate,r=i.shiftKey?-this.delta_:this.delta_;H$(t.map.getView(),r,n,this.duration_),i.preventDefault(),e=!0}return!e},e}(K$),Z$=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function q$(t){for(var e=t.length,i=0,n=0,r=0;r<e;r++)i+=t[r].clientX,n+=t[r].clientY;return[i/e,n/e]}var Y$=function(t){function e(e){var i=this,n=e||{};return i=t.call(this,n)||this,n.handleDownEvent&&(i.handleDownEvent=n.handleDownEvent),n.handleDragEvent&&(i.handleDragEvent=n.handleDragEvent),n.handleMoveEvent&&(i.handleMoveEvent=n.handleMoveEvent),n.handleUpEvent&&(i.handleUpEvent=n.handleUpEvent),n.stopDown&&(i.stopDown=n.stopDown),i.handlingDownUpSequence=!1,i.trackedPointers_={},i.targetPointers=[],i}return Z$(e,t),e.prototype.getPointerCount=function(){return this.targetPointers.length},e.prototype.handleDownEvent=function(t){return!1},e.prototype.handleDragEvent=function(t){},e.prototype.handleEvent=function(t){if(!t.originalEvent)return!0;var e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==$$.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==$$.POINTERUP){var i=this.handleUpEvent(t);this.handlingDownUpSequence=i&&this.targetPointers.length>0}}else if(t.type==$$.POINTERDOWN){var n=this.handleDownEvent(t);this.handlingDownUpSequence=n,e=this.stopDown(n)}else t.type==$$.POINTERMOVE&&this.handleMoveEvent(t);return!e},e.prototype.handleMoveEvent=function(t){},e.prototype.handleUpEvent=function(t){return!1},e.prototype.stopDown=function(t){return t},e.prototype.updateTrackedPointers_=function(t){if(function(t){var e=t.type;return e===$$.POINTERDOWN||e===$$.POINTERDRAG||e===$$.POINTERUP}(t)){var e=t.originalEvent,i=e.pointerId.toString();t.type==$$.POINTERUP?delete this.trackedPointers_[i]:(t.type==$$.POINTERDOWN||i in this.trackedPointers_)&&(this.trackedPointers_[i]=e),this.targetPointers=KC(this.trackedPointers_)}},e}(K$);function Q$(t){var e=arguments;return function(t){for(var i=!0,n=0,r=e.length;n<r&&(i=i&&e[n](t));++n);return i}}var X$=function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},J$=function(t){return!t.map.getTargetElement().hasAttribute("tabindex")||function(t){return t.target.getTargetElement().contains(document.activeElement)}(t)},tG=BC,eG=function(t){var e=t.originalEvent;return 0==e.button&&!(sS&&oS&&e.ctrlKey)},iG=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},nG=function(t){var e=t.originalEvent;return!e.altKey&&(oS?e.metaKey:e.ctrlKey)&&!e.shiftKey},rG=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},sG=function(t){var e=t.originalEvent.target.tagName;return"INPUT"!==e&&"SELECT"!==e&&"TEXTAREA"!==e},oG=function(t){var e=t.originalEvent;return yS(void 0!==e,56),"mouse"==e.pointerType},aG=function(t){var e=t.originalEvent;return yS(void 0!==e,56),e.isPrimary&&0===e.button},lG=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),cG=function(t){function e(e){var i=t.call(this,{stopDown:NC})||this,n=e||{};i.kinetic_=n.kinetic,i.lastCentroid=null,i.panning_=!1;var r=n.condition?n.condition:Q$(iG,aG);return i.condition_=n.onFocusOnly?Q$(J$,r):r,i.noKinetic_=!1,i}return lG(e,t),e.prototype.handleDragEvent=function(t){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());var e,i,n=this.targetPointers,r=q$(n);if(n.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(r[0],r[1]),this.lastCentroid){var s=[this.lastCentroid[0]-r[0],r[1]-this.lastCentroid[1]],o=t.map.getView();e=s,i=o.getResolution(),e[0]*=i,e[1]*=i,Gk(s,o.getRotation()),o.adjustCenterInternal(s)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=r,this.lastPointersCount_=n.length,t.originalEvent.preventDefault()},e.prototype.handleUpEvent=function(t){var e=t.map,i=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var n=this.kinetic_.getDistance(),r=this.kinetic_.getAngle(),s=i.getCenterInternal(),o=e.getPixelFromCoordinateInternal(s),a=e.getCoordinateFromPixelInternal([o[0]-n*Math.cos(r),o[1]-n*Math.sin(r)]);i.animateInternal({center:i.getConstrainedCenter(a),duration:500,easing:XC})}return this.panning_&&(this.panning_=!1,i.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>0&&this.condition_(t)){var e=t.map.getView();return this.lastCentroid=null,e.getAnimating()&&e.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1},e}(Y$);function hG(t){return void 0!==t?0:void 0}function uG(t){return void 0!==t?t:void 0}var dG=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),pG=function(t){function e(e){var i=this,n=e||{};return(i=t.call(this,{stopDown:NC})||this).condition_=n.condition?n.condition:X$,i.lastAngle_=void 0,i.duration_=void 0!==n.duration?n.duration:250,i}return dG(e,t),e.prototype.handleDragEvent=function(t){if(oG(t)){var e=t.map,i=e.getView();if(i.getConstraints().rotation!==hG){var n=e.getSize(),r=t.pixel,s=Math.atan2(n[1]/2-r[1],r[0]-n[0]/2);void 0!==this.lastAngle_&&i.adjustRotationInternal(-(s-this.lastAngle_)),this.lastAngle_=s}}},e.prototype.handleUpEvent=function(t){return!oG(t)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){return!(!oG(t)||!eG(t)||!this.condition_(t)||(t.map.getView().beginInteraction(),this.lastAngle_=void 0,0))},e}(Y$),fG=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),mG=function(t){function e(e){var i=t.call(this)||this;return i.geometry_=null,i.element_=document.createElement("div"),i.element_.style.position="absolute",i.element_.style.pointerEvents="auto",i.element_.className="ol-box "+e,i.map_=null,i.startPixel_=null,i.endPixel_=null,i}return fG(e,t),e.prototype.disposeInternal=function(){this.setMap(null)},e.prototype.render_=function(){var t=this.startPixel_,e=this.endPixel_,i=this.element_.style;i.left=Math.min(t[0],e[0])+"px",i.top=Math.min(t[1],e[1])+"px",i.width=Math.abs(e[0]-t[0])+"px",i.height=Math.abs(e[1]-t[1])+"px"},e.prototype.setMap=function(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);var e=this.element_.style;e.left="inherit",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)},e.prototype.setPixels=function(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()},e.prototype.createOrUpdateGeometry=function(){var t=this.startPixel_,e=this.endPixel_,i=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);i[4]=i[0].slice(),this.geometry_?this.geometry_.setCoordinates([i]):this.geometry_=new iT([i])},e.prototype.getGeometry=function(){return this.geometry_},e}(OC),gG=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),AG=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r.coordinate=i,r.mapBrowserEvent=n,r}return gG(e,t),e}(MC),bG=function(t){function e(e){var i=t.call(this)||this,n=e||{};return i.box_=new mG(n.className||"ol-dragbox"),i.minArea_=void 0!==n.minArea?n.minArea:64,n.onBoxEnd&&(i.onBoxEnd=n.onBoxEnd),i.startPixel_=null,i.condition_=n.condition?n.condition:eG,i.boxEndCondition_=n.boxEndCondition?n.boxEndCondition:i.defaultBoxEndCondition,i}return gG(e,t),e.prototype.defaultBoxEndCondition=function(t,e,i){var n=i[0]-e[0],r=i[1]-e[1];return n*n+r*r>=this.minArea_},e.prototype.getGeometry=function(){return this.box_.getGeometry()},e.prototype.handleDragEvent=function(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new AG("boxdrag",t.coordinate,t))},e.prototype.handleUpEvent=function(t){this.box_.setMap(null);var e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new AG(e?"boxend":"boxcancel",t.coordinate,t)),!1},e.prototype.handleDownEvent=function(t){return!!this.condition_(t)&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new AG("boxstart",t.coordinate,t)),!0)},e.prototype.onBoxEnd=function(t){},e}(Y$),vG=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),_G=function(t){function e(e){var i=this,n=e||{};return(i=t.call(this,{condition:n.condition?n.condition:rG,className:n.className||"ol-dragzoom",minArea:n.minArea})||this).duration_=void 0!==n.duration?n.duration:200,i.out_=void 0!==n.out&&n.out,i}return vG(e,t),e.prototype.onBoxEnd=function(t){var e,i=this.getMap(),n=i.getView(),r=i.getSize(),s=this.getGeometry().getExtent();if(this.out_){var o=n.calculateExtentInternal(r),a=(e=[i.getPixelFromCoordinateInternal(jS(s)),i.getPixelFromCoordinateInternal(qS(s))],function(t,e){for(var i=0,n=e.length;i<n;++i)FS(t,e[i]);return t}(OS(void 0),e));JS(o,1/n.getResolutionForExtentInternal(a,r)),s=o}var l=n.getConstrainedResolution(n.getResolutionForExtentInternal(s,r)),c=n.getConstrainedCenter(HS(s),l);n.animateInternal({resolution:l,center:c,duration:this.duration_,easing:XC})},e}(bG),yG=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wG=function(t){function e(e){var i=t.call(this)||this,n=e||{};return i.defaultCondition_=function(t){return iG(t)&&sG(t)},i.condition_=void 0!==n.condition?n.condition:i.defaultCondition_,i.duration_=void 0!==n.duration?n.duration:100,i.pixelDelta_=void 0!==n.pixelDelta?n.pixelDelta:128,i}return yG(e,t),e.prototype.handleEvent=function(t){var e=!1;if("keydown"==t.type){var i=t.originalEvent,n=i.keyCode;if(this.condition_(t)&&(40==n||37==n||39==n||38==n)){var r=t.map.getView(),s=r.getResolution()*this.pixelDelta_,o=0,a=0;40==n?a=-s:37==n?o=-s:39==n?o=s:a=s;var l=[o,a];Gk(l,r.getRotation()),function(t,e,i){var n=t.getCenterInternal();n&&t.animateInternal({duration:void 0!==i?i:250,easing:tS,center:t.getConstrainedCenter([n[0]+e[0],n[1]+e[1]])})}(r,l,this.duration_),i.preventDefault(),e=!0}}return!e},e}(K$),xG=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),CG=function(t){function e(e){var i=t.call(this)||this,n=e||{};return i.condition_=n.condition?n.condition:sG,i.delta_=n.delta?n.delta:1,i.duration_=void 0!==n.duration?n.duration:100,i}return xG(e,t),e.prototype.handleEvent=function(t){var e=!1;if("keydown"==t.type||"keypress"==t.type){var i=t.originalEvent,n=i.charCode;if(this.condition_(t)&&(n=="+".charCodeAt(0)||n=="-".charCodeAt(0))){var r=t.map,s=n=="+".charCodeAt(0)?this.delta_:-this.delta_;H$(r.getView(),s,void 0,this.duration_),i.preventDefault(),e=!0}}return!e},e}(K$),SG=function(){function t(t,e,i){this.decay_=t,this.minVelocity_=e,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0}return t.prototype.begin=function(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0},t.prototype.update=function(t,e){this.points_.push(t,e,Date.now())},t.prototype.end=function(){if(this.points_.length<6)return!1;var t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;for(var i=e-3;i>0&&this.points_[i+2]>t;)i-=3;var n=this.points_[e+2]-this.points_[i+2];if(n<1e3/60)return!1;var r=this.points_[e]-this.points_[i],s=this.points_[e+1]-this.points_[i+1];return this.angle_=Math.atan2(s,r),this.initialVelocity_=Math.sqrt(r*r+s*s)/n,this.initialVelocity_>this.minVelocity_},t.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},t.prototype.getAngle=function(){return this.angle_},t}(),kG=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),EG=function(t){function e(e){var i=this,n=e||{};(i=t.call(this,n)||this).totalDelta_=0,i.lastDelta_=0,i.maxDelta_=void 0!==n.maxDelta?n.maxDelta:1,i.duration_=void 0!==n.duration?n.duration:250,i.timeout_=void 0!==n.timeout?n.timeout:80,i.useAnchor_=void 0===n.useAnchor||n.useAnchor,i.constrainResolution_=void 0!==n.constrainResolution&&n.constrainResolution;var r=n.condition?n.condition:tG;return i.condition_=n.onFocusOnly?Q$(J$,r):r,i.lastAnchor_=null,i.startTime_=void 0,i.mode_=void 0,i.trackpadEventGap_=400,i.deltaPerZoom_=300,i}return kG(e,t),e.prototype.endInteraction_=function(){this.trackpadTimeoutId_=void 0,this.getMap().getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)},e.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;if("wheel"!==t.type)return!0;var e,i=t.map,n=t.originalEvent;if(n.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),"wheel"==t.type&&(e=n.deltaY,rS&&n.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(e/=aS),n.deltaMode===WheelEvent.DOM_DELTA_LINE&&(e*=40)),0===e)return!1;this.lastDelta_=e;var r=Date.now();void 0===this.startTime_&&(this.startTime_=r),(!this.mode_||r-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(e)<4?"trackpad":"wheel");var s=i.getView();if("trackpad"===this.mode_&&!s.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(s.getAnimating()&&s.cancelAnimations(),s.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),s.adjustZoom(-e/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=r,!1;this.totalDelta_+=e;var o=Math.max(this.timeout_-(r-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,i),o),!1},e.prototype.handleWheelZoom_=function(t){var e=t.getView();e.getAnimating()&&e.cancelAnimations();var i=-uk(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),H$(e,i,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0},e.prototype.setMouseAnchor=function(t){this.useAnchor_=t,t||(this.lastAnchor_=null)},e}(K$),DG=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),IG=function(t){function e(e){var i=this,n=e||{},r=n;return r.stopDown||(r.stopDown=NC),(i=t.call(this,r)||this).anchor_=null,i.lastAngle_=void 0,i.rotating_=!1,i.rotationDelta_=0,i.threshold_=void 0!==n.threshold?n.threshold:.3,i.duration_=void 0!==n.duration?n.duration:250,i}return DG(e,t),e.prototype.handleDragEvent=function(t){var e=0,i=this.targetPointers[0],n=this.targetPointers[1],r=Math.atan2(n.clientY-i.clientY,n.clientX-i.clientX);if(void 0!==this.lastAngle_){var s=r-this.lastAngle_;this.rotationDelta_+=s,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=s}this.lastAngle_=r;var o=t.map,a=o.getView();if(a.getConstraints().rotation!==hG){var l=o.getViewport().getBoundingClientRect(),c=q$(this.targetPointers);c[0]-=l.left,c[1]-=l.top,this.anchor_=o.getCoordinateFromPixelInternal(c),this.rotating_&&(o.render(),a.adjustRotationInternal(e,this.anchor_))}},e.prototype.handleUpEvent=function(t){return!(this.targetPointers.length<2&&(t.map.getView().endInteraction(this.duration_),1))},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}(Y$),PG=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),OG=function(t){function e(e){var i=this,n=e||{},r=n;return r.stopDown||(r.stopDown=NC),(i=t.call(this,r)||this).anchor_=null,i.duration_=void 0!==n.duration?n.duration:400,i.lastDistance_=void 0,i.lastScaleDelta_=1,i}return PG(e,t),e.prototype.handleDragEvent=function(t){var e=1,i=this.targetPointers[0],n=this.targetPointers[1],r=i.clientX-n.clientX,s=i.clientY-n.clientY,o=Math.sqrt(r*r+s*s);void 0!==this.lastDistance_&&(e=this.lastDistance_/o),this.lastDistance_=o;var a=t.map,l=a.getView();1!=e&&(this.lastScaleDelta_=e);var c=a.getViewport().getBoundingClientRect(),h=q$(this.targetPointers);h[0]-=c.left,h[1]-=c.top,this.anchor_=a.getCoordinateFromPixelInternal(h),a.render(),l.adjustResolutionInternal(e,this.anchor_)},e.prototype.handleUpEvent=function(t){return!(this.targetPointers.length<2&&(t.map.getView().endInteraction(this.duration_,this.lastScaleDelta_>1?1:-1),1))},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}(Y$);function MG(t){var e=t||{},i=new j$,n=new SG(-.005,.05,100);return(void 0===e.altShiftDragRotate||e.altShiftDragRotate)&&i.push(new pG),(void 0===e.doubleClickZoom||e.doubleClickZoom)&&i.push(new W$({delta:e.zoomDelta,duration:e.zoomDuration})),(void 0===e.dragPan||e.dragPan)&&i.push(new cG({onFocusOnly:e.onFocusOnly,kinetic:n})),(void 0===e.pinchRotate||e.pinchRotate)&&i.push(new IG),(void 0===e.pinchZoom||e.pinchZoom)&&i.push(new OG({duration:e.zoomDuration})),(void 0===e.keyboard||e.keyboard)&&(i.push(new wG),i.push(new CG({delta:e.zoomDelta,duration:e.zoomDuration}))),(void 0===e.mouseWheelZoom||e.mouseWheelZoom)&&i.push(new EG({onFocusOnly:e.onFocusOnly,duration:e.zoomDuration})),(void 0===e.shiftDragZoom||e.shiftDragZoom)&&i.push(new _G({duration:e.zoomDuration})),i}var TG=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),RG=function(t){function e(e){var i=t.call(this)||this,n=zC({},e);return n.opacity=void 0!==e.opacity?e.opacity:1,yS("number"==typeof n.opacity,64),n.visible=void 0===e.visible||e.visible,n.zIndex=e.zIndex,n.maxResolution=void 0!==e.maxResolution?e.maxResolution:1/0,n.minResolution=void 0!==e.minResolution?e.minResolution:0,n.minZoom=void 0!==e.minZoom?e.minZoom:-1/0,n.maxZoom=void 0!==e.maxZoom?e.maxZoom:1/0,i.className_=void 0!==n.className?e.className:"ol-layer",delete n.className,i.setProperties(n),i.state_=null,i}return TG(e,t),e.prototype.getClassName=function(){return this.className_},e.prototype.getLayerState=function(t){var e=this.state_||{layer:this,managed:void 0===t||t},i=this.getZIndex();return e.opacity=uk(Math.round(100*this.getOpacity())/100,0,1),e.sourceState=this.getSourceState(),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==i?i:!1===e.managed?1/0:0,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e},e.prototype.getLayersArray=function(t){return ZC()},e.prototype.getLayerStatesArray=function(t){return ZC()},e.prototype.getExtent=function(){return this.get("extent")},e.prototype.getMaxResolution=function(){return this.get("maxResolution")},e.prototype.getMinResolution=function(){return this.get("minResolution")},e.prototype.getMinZoom=function(){return this.get("minZoom")},e.prototype.getMaxZoom=function(){return this.get("maxZoom")},e.prototype.getOpacity=function(){return this.get("opacity")},e.prototype.getSourceState=function(){return ZC()},e.prototype.getVisible=function(){return this.get("visible")},e.prototype.getZIndex=function(){return this.get("zIndex")},e.prototype.setExtent=function(t){this.set("extent",t)},e.prototype.setMaxResolution=function(t){this.set("maxResolution",t)},e.prototype.setMinResolution=function(t){this.set("minResolution",t)},e.prototype.setMaxZoom=function(t){this.set("maxZoom",t)},e.prototype.setMinZoom=function(t){this.set("minZoom",t)},e.prototype.setOpacity=function(t){yS("number"==typeof t,64),this.set("opacity",t)},e.prototype.setVisible=function(t){this.set("visible",t)},e.prototype.setZIndex=function(t){this.set("zIndex",t)},e.prototype.disposeInternal=function(){this.state_&&(this.state_.layer=null,this.state_=null),t.prototype.disposeInternal.call(this)},e}(BE),VG=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function FG(t,e){if(!t.visible)return!1;var i=e.resolution;if(i<t.minResolution||i>=t.maxResolution)return!1;var n=e.zoom;return n>t.minZoom&&n<=t.maxZoom}var LG=function(t){function e(e){var i=this,n=zC({},e);return delete n.source,(i=t.call(this,n)||this).mapPrecomposeKey_=null,i.mapRenderKey_=null,i.sourceChangeKey_=null,i.renderer_=null,e.render&&(i.render=e.render),e.map&&i.setMap(e.map),i.addEventListener(UE("source"),i.handleSourcePropertyChange_),i.setSource(e.source?e.source:null),i}return VG(e,t),e.prototype.getLayersArray=function(t){var e=t||[];return e.push(this),e},e.prototype.getLayerStatesArray=function(t){var e=t||[];return e.push(this.getLayerState()),e},e.prototype.getSource=function(){return this.get("source")||null},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():"undefined"},e.prototype.handleSourceChange_=function(){this.changed()},e.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&(ik(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=tk(t,"change",this.handleSourceChange_,this)),this.changed()},e.prototype.getFeatures=function(t){return this.renderer_.getFeatures(t)},e.prototype.render=function(t,e){var i=this.getRenderer();if(i.prepareFrame(t))return i.renderFrame(t,e)},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&(ik(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(ik(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=tk(t,"precompose",function(t){var e=t.frameState.layerStatesArray,i=this.getLayerState(!1);yS(!e.some(function(t){return t.layer===i.layer}),67),e.push(i)},this),this.mapRenderKey_=tk(this,"change",t.render,t),this.changed())},e.prototype.setSource=function(t){this.set("source",t)},e.prototype.getRenderer=function(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_},e.prototype.hasRenderer=function(){return!!this.renderer_},e.prototype.createRenderer=function(){return null},e.prototype.disposeInternal=function(){this.setSource(null),t.prototype.disposeInternal.call(this)},e}(RG),UG=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),BG=function(t){function e(e){var i=this,n=e||{},r=zC({},n);return delete r.preload,delete r.useInterimTilesOnError,(i=t.call(this,r)||this).setPreload(void 0!==n.preload?n.preload:0),i.setUseInterimTilesOnError(void 0===n.useInterimTilesOnError||n.useInterimTilesOnError),i}return UG(e,t),e.prototype.getPreload=function(){return this.get("preload")},e.prototype.setPreload=function(t){this.set("preload",t)},e.prototype.getUseInterimTilesOnError=function(){return this.get("useInterimTilesOnError")},e.prototype.setUseInterimTilesOnError=function(t){this.set("useInterimTilesOnError",t)},e}(LG),NG=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),jG=function(t){function e(e){var i=t.call(this)||this;return i.boundHandleImageChange_=i.handleImageChange_.bind(i),i.layer_=e,i.declutterExecutorGroup=null,i}return NG(e,t),e.prototype.getFeatures=function(t){return ZC()},e.prototype.prepareFrame=function(t){return ZC()},e.prototype.renderFrame=function(t,e){return ZC()},e.prototype.loadedTileCallback=function(t,e,i){t[e]||(t[e]={}),t[e][i.tileCoord.toString()]=i},e.prototype.createLoadedTileFinder=function(t,e,i){return(function(n,r){var s=this.loadedTileCallback.bind(this,i,n);return t.forEachLoadedTile(e,n,r,s)}).bind(this)},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,r){},e.prototype.getDataAtPixel=function(t,e,i){return ZC()},e.prototype.getLayer=function(){return this.layer_},e.prototype.handleFontsChanged=function(){},e.prototype.handleImageChange_=function(t){2===t.target.getState()&&this.renderIfReadyAndVisible()},e.prototype.loadImage=function(t){var e=t.getState();return 2!=e&&3!=e&&t.addEventListener("change",this.boundHandleImageChange_),0==e&&(t.load(),e=t.getState()),2==e},e.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t.getVisible()&&"ready"==t.getSourceState()&&t.changed()},e}(TE),zG=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),HG=function(t){function e(e,i,n,r){var s=t.call(this,e)||this;return s.inversePixelTransform=i,s.frameState=n,s.context=r,s}return zG(e,t),e}(MC),KG=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))","?\\s*([-,\\\"\\'\\sa-z]+?)\\s*$"].join(""),"i"),$G=["style","variant","weight","size","lineHeight","family"],GG=function(t){var e=t.match(KG);if(!e)return null;for(var i={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},n=0,r=$G.length;n<r;++n){var s=e[n+1];void 0!==s&&(i[$G[n]]=s)}return i.families=i.family.split(/,\s?/),i},WG=[],ZG=[0,0,0,0],qG=new BE;(new WC).setSize=function(){console.warn("labelCache is deprecated.")};var YG,QG,XG=null,JG={},tW=function(){var t,e,i=["monospace","serif"],n=i.length,r="wmytzilWMYTZIL@#/&?$%10\uf013";function s(t,s,o){for(var a=!0,l=0;l<n;++l){var c=i[l];if(e=iW(t+" "+s+" 32px "+c,r),o!=c){var h=iW(t+" "+s+" 32px "+o+","+c,r);a=a&&h!=e}}return!!a}function o(){for(var e=!0,i=qG.getKeys(),n=0,r=i.length;n<r;++n){var o=i[n];qG.get(o)<100&&(s.apply(this,o.split("\n"))?(HC(JG),XG=null,YG=void 0,qG.set(o,100)):(qG.set(o,qG.get(o)+1,!0),e=!1))}e&&(clearInterval(t),t=void 0)}return function(e){var i=GG(e);if(i)for(var n=i.families,r=0,a=n.length;r<a;++r){var l=n[r],c=i.style+"\n"+i.weight+"\n"+l;void 0===qG.get(c)&&(qG.set(c,100,!0),s(i.style,i.weight,l)||(qG.set(c,0,!0),void 0===t&&(t=setInterval(o,32))))}}}();function eW(t,e){return XG||(XG=uS(1,1)),t!=YG&&(XG.font=t,YG=XG.font),XG.measureText(e)}function iW(t,e){return eW(t,e).width}function nW(t,e,i){if(e in i)return i[e];var n=iW(t,e);return i[e]=n,n}function rW(t,e,i,n){0!==e&&(t.translate(i,n),t.rotate(e),t.translate(-i,-n))}var sW=null;function oW(t){return lS?uM(t):(sW||(sW=uS(1,1).canvas),sW.style.transform=uM(t),sW.style.transform)}var aW=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),lW=function(t){function e(e){var i=t.call(this,e)||this;return i.container=null,i.tempTransform=[1,0,0,1,0,0],i.pixelTransform=[1,0,0,1,0,0],i.inversePixelTransform=[1,0,0,1,0,0],i.context=null,i.containerReused=!1,i}return aW(e,t),e.prototype.useContainer=function(t,e,i){var n,r,s=this.getLayer().getClassName();if(t&&""===t.style.opacity&&t.className===s&&(o=t.firstElementChild)instanceof HTMLCanvasElement&&(r=o.getContext("2d")),!r||0!==r.canvas.width&&r.canvas.style.transform!==e?this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1):(this.container=t,this.context=r,this.containerReused=!0),!this.container){(n=document.createElement("div")).className=s;var o,a=n.style;a.position="absolute",a.width="100%",a.height="100%",r=uS(),n.appendChild(o=r.canvas),(a=o.style).position="absolute",a.left="0",a.transformOrigin="top left",this.container=n,this.context=r}},e.prototype.clip=function(t,e,i){var n=e.pixelRatio,r=e.size[0]*n/2,s=e.size[1]*n/2,o=e.viewState.rotation,a=ZS(i),l=qS(i),c=zS(i),h=jS(i);lM(e.coordinateToPixelTransform,a),lM(e.coordinateToPixelTransform,l),lM(e.coordinateToPixelTransform,c),lM(e.coordinateToPixelTransform,h),t.save(),rW(t,-o,r,s),t.beginPath(),t.moveTo(a[0]*n,a[1]*n),t.lineTo(l[0]*n,l[1]*n),t.lineTo(c[0]*n,c[1]*n),t.lineTo(h[0]*n,h[1]*n),t.clip(),rW(t,o,r,s)},e.prototype.clipUnrotated=function(t,e,i){var n=ZS(i),r=qS(i),s=zS(i),o=jS(i);lM(e.coordinateToPixelTransform,n),lM(e.coordinateToPixelTransform,r),lM(e.coordinateToPixelTransform,s),lM(e.coordinateToPixelTransform,o);var a=this.inversePixelTransform;lM(a,n),lM(a,r),lM(a,s),lM(a,o),t.save(),t.beginPath(),t.moveTo(Math.round(n[0]),Math.round(n[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.clip()},e.prototype.dispatchRenderEvent_=function(t,e,i){var n=this.getLayer();if(n.hasListener(t)){var r=new HG(t,this.inversePixelTransform,i,e);n.dispatchEvent(r)}},e.prototype.preRender=function(t,e){this.dispatchRenderEvent_("prerender",t,e)},e.prototype.postRender=function(t,e){this.dispatchRenderEvent_("postrender",t,e)},e.prototype.getRenderTransform=function(t,e,i,n,r,s,o){var a=n/e;return cM(this.tempTransform,r/2,s/2,a,-a,-i,-t[0]+o,-t[1])},e.prototype.getDataAtPixel=function(t,e,i){var n,r=lM(this.inversePixelTransform,t.slice()),s=this.context,o=this.getLayer().getExtent();if(o&&!kS(o,lM(e.pixelToCoordinateTransform,t.slice())))return null;try{var a=Math.round(r[0]),l=Math.round(r[1]),c=document.createElement("canvas"),h=c.getContext("2d");c.width=1,c.height=1,h.clearRect(0,0,1,1),h.drawImage(s.canvas,a,l,1,1,0,0,1,1),n=h.getImageData(0,0,1,1).data}catch(u){return"SecurityError"===u.name?new Uint8Array:n}return 0===n[3]?null:n},e}(jG),cW=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),hW=function(t){function e(e){var i=t.call(this,e)||this;return i.extentChanged=!0,i.renderedExtent_=null,i.renderedProjection=null,i.renderedTiles=[],i.newTiles_=!1,i.tmpExtent=[1/0,1/0,-1/0,-1/0],i.tmpTileRange_=new $E(0,0,0,0),i}return cW(e,t),e.prototype.isDrawableTile=function(t){var e=this.getLayer(),i=t.getState(),n=e.getUseInterimTilesOnError();return 2==i||4==i||3==i&&!n},e.prototype.getTile=function(t,e,i,n){var r=n.pixelRatio,s=n.viewState.projection,o=this.getLayer(),a=o.getSource().getTile(t,e,i,r,s);return 3==a.getState()&&(o.getUseInterimTilesOnError()?o.getPreload()>0&&(this.newTiles_=!0):a.setState(2)),this.isDrawableTile(a)||(a=a.getInterimTile()),a},e.prototype.loadedTileCallback=function(e,i,n){return!!this.isDrawableTile(n)&&t.prototype.loadedTileCallback.call(this,e,i,n)},e.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},e.prototype.renderFrame=function(t,e){var i=t.layerStatesArray[t.layerIndex],n=t.viewState,r=n.projection,s=n.resolution,o=n.center,a=n.rotation,l=t.pixelRatio,c=this.getLayer(),h=c.getSource(),u=h.getRevision(),d=h.getTileGridForProjection(r),p=d.getZForResolution(s,h.zDirection),f=d.getResolution(p),m=t.extent,g=i.extent&&mE(i.extent);g&&(m=WS(m,mE(i.extent)));var A=h.getTilePixelRatio(l),b=Math.round(t.size[0]*A),v=Math.round(t.size[1]*A);if(a){var _=Math.round(Math.sqrt(b*b+v*v));b=_,v=_}var y=f*b/2/A,w=f*v/2/A,x=[o[0]-y,o[1]-w,o[0]+y,o[1]+w],C=d.getTileRangeForExtentAndZ(m,p),S={};S[p]={};var k=this.createLoadedTileFinder(h,r,S),E=this.tmpExtent,D=this.tmpTileRange_;this.newTiles_=!1;for(var I=C.minX;I<=C.maxX;++I)for(var P=C.minY;P<=C.maxY;++P){var O=this.getTile(p,I,P,t);if(this.isDrawableTile(O)){var M=YC(this);if(2==O.getState()){S[p][O.tileCoord.toString()]=O;var T=O.inTransition(M);this.newTiles_||!T&&-1!==this.renderedTiles.indexOf(O)||(this.newTiles_=!0)}if(1===O.getAlpha(M,t.time))continue}var R=d.getTileCoordChildTileRange(O.tileCoord,D,E),V=!1;R&&(V=k(p+1,R)),V||d.forEachTileCoordParentTileRange(O.tileCoord,k,D,E)}var F=f/s;cM(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/A,1/A,a,-b/2,-v/2);var L=oW(this.pixelTransform);this.useContainer(e,L,i.opacity);var U=this.context,B=U.canvas;hM(this.inversePixelTransform,this.pixelTransform),cM(this.tempTransform,b/2,v/2,F,F,0,-b/2,-v/2),B.width!=b||B.height!=v?(B.width=b,B.height=v):this.containerReused||U.clearRect(0,0,b,v),g&&this.clipUnrotated(U,t,g),zC(U,h.getContextOptions()),this.preRender(U,t),this.renderedTiles.length=0;var N,j,z,H=Object.keys(S).map(Number);H.sort(TC),1!==i.opacity||this.containerReused&&!h.getOpaque(t.viewState.projection)?(N=[],j=[]):H=H.reverse();for(var K=H.length-1;K>=0;--K){var $=H[K],G=h.getTilePixelSize($,l,r),W=d.getResolution($)/f,Z=G[0]*W*F,q=G[1]*W*F,Y=d.getTileCoordForCoordAndZ(ZS(x),$),Q=d.getTileCoordExtent(Y),X=lM(this.tempTransform,[A*(Q[0]-x[0])/f,A*(x[3]-Q[3])/f]),J=A*h.getGutterForProjection(r),tt=S[$];for(var et in tt){var it=(O=tt[et]).tileCoord,nt=X[0]-(Y[1]-it[1])*Z,rt=Math.round(nt+Z),st=X[1]-(Y[2]-it[2])*q,ot=Math.round(st+q),at=rt-(I=Math.round(nt)),lt=ot-(P=Math.round(st)),ct=p===$;if(!(T=ct&&1!==O.getAlpha(YC(this),t.time)))if(N){U.save(),z=[I,P,I+at,P,I+at,P+lt,I,P+lt];for(var ht=0,ut=N.length;ht<ut;++ht)if(p!==$&&$<j[ht]){var dt=N[ht];U.beginPath(),U.moveTo(z[0],z[1]),U.lineTo(z[2],z[3]),U.lineTo(z[4],z[5]),U.lineTo(z[6],z[7]),U.moveTo(dt[6],dt[7]),U.lineTo(dt[4],dt[5]),U.lineTo(dt[2],dt[3]),U.lineTo(dt[0],dt[1]),U.clip()}N.push(z),j.push($)}else U.clearRect(I,P,at,lt);this.drawTileImage(O,t,I,P,at,lt,J,ct,i.opacity),N&&!T&&U.restore(),this.renderedTiles.push(O),this.updateUsedTiles(t.usedTiles,h,O)}}return this.renderedRevision=u,this.renderedResolution=f,this.extentChanged=!this.renderedExtent_||!RS(this.renderedExtent_,x),this.renderedExtent_=x,this.renderedPixelRatio=l,this.renderedProjection=r,this.manageTilePyramid(t,h,d,l,r,m,p,c.getPreload()),this.scheduleExpireCache(t,h),this.postRender(U,t),i.extent&&U.restore(),L!==B.style.transform&&(B.style.transform=L),this.container},e.prototype.drawTileImage=function(t,e,i,n,r,s,o,a,l){var c=this.getTileImage(t);if(c){var h=YC(this),u=a?t.getAlpha(h,e.time):1,d=l*u,p=d!==this.context.globalAlpha;p&&(this.context.save(),this.context.globalAlpha=d),this.context.drawImage(c,o,o,c.width-2*o,c.height-2*o,i,n,r,s),p&&this.context.restore(),1!==u?e.animate=!0:a&&t.endTransition(h)}},e.prototype.getImage=function(){var t=this.context;return t?t.canvas:null},e.prototype.getTileImage=function(t){return t.getImage()},e.prototype.scheduleExpireCache=function(t,e){if(e.canExpireCache()){var i=(function(t,e,i){var n=YC(t);n in i.usedTiles&&t.expireCache(i.viewState.projection,i.usedTiles[n])}).bind(null,e);t.postRenderFunctions.push(i)}},e.prototype.updateUsedTiles=function(t,e,i){var n=YC(e);n in t||(t[n]={}),t[n][i.getKey()]=!0},e.prototype.manageTilePyramid=function(t,e,i,n,r,s,o,a,l){var c=YC(e);c in t.wantedTiles||(t.wantedTiles[c]={});var h,u,d,p,f,m,g=t.wantedTiles[c],A=t.tileQueue,b=0;for(m=i.getMinZoom();m<=o;++m)for(u=i.getTileRangeForExtentAndZ(s,m,u),d=i.getResolution(m),p=u.minX;p<=u.maxX;++p)for(f=u.minY;f<=u.maxY;++f)o-m<=a?(++b,0==(h=e.getTile(m,p,f,n,r)).getState()&&(g[h.getKey()]=!0,A.isKeyQueued(h.getKey())||A.enqueue([h,c,i.getTileCoordCenter(h.tileCoord),d])),void 0!==l&&l(h)):e.useTile(m,p,f,r);e.updateCacheSize(b,r)},e}(lW),uW=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),dW=function(t){function e(e){return t.call(this,e)||this}return uW(e,t),e.prototype.createRenderer=function(){return new hW(this)},e}(BG),pW=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,fW=/^([a-z]*)$|^hsla?\(.*\)$/i;function mW(t){return"string"==typeof t?t:wW(t)}function gW(t){var e=document.createElement("div");if(e.style.color=t,""!==e.style.color){document.body.appendChild(e);var i=getComputedStyle(e).color;return document.body.removeChild(e),i}return""}var AW,bW,vW=(AW={},bW=0,function(t){var e;if(AW.hasOwnProperty(t))e=AW[t];else{if(bW>=1024){var i=0;for(var n in AW)0==(3&i++)&&(delete AW[n],--bW)}e=function(t){var e,i,n,r,s;if(fW.exec(t)&&(t=gW(t)),pW.exec(t)){var o,a=t.length-1;o=a<=4?1:2;var l=4===a||8===a;e=parseInt(t.substr(1+0*o,o),16),i=parseInt(t.substr(1+1*o,o),16),n=parseInt(t.substr(1+2*o,o),16),r=l?parseInt(t.substr(1+3*o,o),16):255,1==o&&(e=(e<<4)+e,i=(i<<4)+i,n=(n<<4)+n,l&&(r=(r<<4)+r)),s=[e,i,n,r/255]}else 0==t.indexOf("rgba(")?yW(s=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((s=t.slice(4,-1).split(",").map(Number)).push(1),yW(s)):yS(!1,14);return s}(t),AW[t]=e,++bW}return e});function _W(t){return Array.isArray(t)?t:vW(t)}function yW(t){return t[0]=uk(t[0]+.5|0,0,255),t[1]=uk(t[1]+.5|0,0,255),t[2]=uk(t[2]+.5|0,0,255),t[3]=uk(t[3],0,1),t}function wW(t){var e=t[0];e!=(0|e)&&(e=e+.5|0);var i=t[1];i!=(0|i)&&(i=i+.5|0);var n=t[2];return n!=(0|n)&&(n=n+.5|0),"rgba("+e+","+i+","+n+","+(void 0===t[3]?1:t[3])+")"}function xW(t,e,i){return e+":"+t+":"+(i?mW(i):"null")}var CW=new(function(){function t(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}return t.prototype.clear=function(){this.cache_={},this.cacheSize_=0},t.prototype.canExpireCache=function(){return this.cacheSize_>this.maxCacheSize_},t.prototype.expire=function(){if(this.canExpireCache()){var t=0;for(var e in this.cache_)0!=(3&t++)||this.cache_[e].hasListener()||(delete this.cache_[e],--this.cacheSize_)}},t.prototype.get=function(t,e,i){var n=xW(t,e,i);return n in this.cache_?this.cache_[n]:null},t.prototype.set=function(t,e,i,n){var r=xW(t,e,i);this.cache_[r]=n,++this.cacheSize_},t.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()},t}()),SW=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function kW(t,e){CW.expire()}var EW=function(t){function e(e){var i=t.call(this)||this;return i.map_=e,i}return SW(e,t),e.prototype.dispatchRenderEvent=function(t,e){ZC()},e.prototype.calculateMatrices2D=function(t){var e=t.viewState,i=t.coordinateToPixelTransform,n=t.pixelToCoordinateTransform;cM(i,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),hM(n,i)},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,r,s,o,a){var l,c=e.viewState;function h(t,e,i,n){return r.call(s,e,t?i:null,n)}var u=c.projection,d=Qk(t.slice(),u),p=[[0,0]];if(u.canWrapX()&&n){var f=YS(u.getExtent());p.push([-f,0],[f,0])}for(var m=e.layerStatesArray,g=m.length,A=[],b=[],v=0;v<p.length;v++)for(var _=g-1;_>=0;--_){var y=m[_],w=y.layer;if(w.hasRenderer()&&FG(y,c)&&o.call(a,w)){var x=w.getRenderer(),C=w.getSource();if(x&&C){var S=C.getWrapX()?d:t,k=h.bind(null,y.managed);b[0]=S[0]+p[v][0],b[1]=S[1]+p[v][1],l=x.forEachFeatureAtCoordinate(b,e,i,k,A)}if(l)return l}}if(0!==A.length){var E=1/A.length;return A.forEach(function(t,e){return t.distanceSq+=e*E}),A.sort(function(t,e){return t.distanceSq-e.distanceSq}),A.some(function(t){return l=t.callback(t.feature,t.layer,t.geometry)}),l}},e.prototype.forEachLayerAtPixel=function(t,e,i,n,r){return ZC()},e.prototype.hasFeatureAtCoordinate=function(t,e,i,n,r,s){return void 0!==this.forEachFeatureAtCoordinate(t,e,i,n,BC,this,r,s)},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){ZC()},e.prototype.scheduleExpireIconCache=function(t){CW.canExpireCache()&&t.postRenderFunctions.push(kW)},e}(OC),DW=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),IW=function(t){function e(e){var i=t.call(this,e)||this;i.fontChangeListenerKey_=tk(qG,"propertychange",e.redrawText.bind(e)),i.element_=document.createElement("div");var n=i.element_.style;n.position="absolute",n.width="100%",n.height="100%",n.zIndex="0",i.element_.className="ol-unselectable ol-layers";var r=e.getViewport();return r.insertBefore(i.element_,r.firstChild||null),i.children_=[],i.renderedVisible_=!0,i}return DW(e,t),e.prototype.dispatchRenderEvent=function(t,e){var i=this.getMap();if(i.hasListener(t)){var n=new HG(t,void 0,e);i.dispatchEvent(n)}},e.prototype.disposeInternal=function(){ik(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),t.prototype.disposeInternal.call(this)},e.prototype.renderFrame=function(t){if(t){this.calculateMatrices2D(t),this.dispatchRenderEvent("precompose",t);var e=t.layerStatesArray.sort(function(t,e){return t.zIndex-e.zIndex}),i=t.viewState;this.children_.length=0;for(var n=[],r=null,s=0,o=e.length;s<o;++s){var a=e[s];if(t.layerIndex=s,FG(a,i)&&("ready"==a.sourceState||"undefined"==a.sourceState)){var l=a.layer,c=l.render(t,r);c&&(c!==r&&(this.children_.push(c),r=c),"getDeclutter"in l&&n.push(l))}}for(s=n.length-1;s>=0;--s)n[s].renderDeclutter(t);!function(t,e){for(var i=t.childNodes,n=0;;++n){var r=i[n],s=e[n];if(!r&&!s)break;r!==s&&(r?s?t.insertBefore(s,r):(t.removeChild(r),--n):t.appendChild(s))}}(this.element_,this.children_),this.dispatchRenderEvent("postcompose",t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}else this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1)},e.prototype.forEachLayerAtPixel=function(t,e,i,n,r){for(var s=e.viewState,o=e.layerStatesArray,a=o.length-1;a>=0;--a){var l=o[a],c=l.layer;if(c.hasRenderer()&&FG(l,s)&&r(c)){var h=c.getRenderer().getDataAtPixel(t,e,i);if(h){var u=n(c,h);if(u)return u}}}},e}(EW),PW=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),OW=function(t){function e(e){var i=this,n=e||{},r=zC({},n);delete r.layers;var s=n.layers;return(i=t.call(this,r)||this).layersListenerKeys_=[],i.listenerKeys_={},i.addEventListener(UE("layers"),i.handleLayersChanged_),s?Array.isArray(s)?s=new j$(s.slice(),{unique:!0}):yS("function"==typeof s.getArray,43):s=new j$(void 0,{unique:!0}),i.setLayers(s),i}return PW(e,t),e.prototype.handleLayerChange_=function(){this.changed()},e.prototype.handleLayersChanged_=function(){this.layersListenerKeys_.forEach(ik),this.layersListenerKeys_.length=0;var t=this.getLayers();for(var e in this.layersListenerKeys_.push(tk(t,"add",this.handleLayersAdd_,this),tk(t,"remove",this.handleLayersRemove_,this)),this.listenerKeys_)this.listenerKeys_[e].forEach(ik);HC(this.listenerKeys_);for(var i=t.getArray(),n=0,r=i.length;n<r;n++){var s=i[n];this.listenerKeys_[YC(s)]=[tk(s,"propertychange",this.handleLayerChange_,this),tk(s,"change",this.handleLayerChange_,this)]}this.changed()},e.prototype.handleLayersAdd_=function(t){var e=t.element;this.listenerKeys_[YC(e)]=[tk(e,"propertychange",this.handleLayerChange_,this),tk(e,"change",this.handleLayerChange_,this)],this.changed()},e.prototype.handleLayersRemove_=function(t){var e=YC(t.element);this.listenerKeys_[e].forEach(ik),delete this.listenerKeys_[e],this.changed()},e.prototype.getLayers=function(){return this.get("layers")},e.prototype.setLayers=function(t){this.set("layers",t)},e.prototype.getLayersArray=function(t){var e=void 0!==t?t:[];return this.getLayers().forEach(function(t){t.getLayersArray(e)}),e},e.prototype.getLayerStatesArray=function(t){var e=void 0!==t?t:[],i=e.length;this.getLayers().forEach(function(t){t.getLayerStatesArray(e)});for(var n=this.getLayerState(),r=i,s=e.length;r<s;r++){var o=e[r];o.opacity*=n.opacity,o.visible=o.visible&&n.visible,o.maxResolution=Math.min(o.maxResolution,n.maxResolution),o.minResolution=Math.max(o.minResolution,n.minResolution),o.minZoom=Math.max(o.minZoom,n.minZoom),o.maxZoom=Math.min(o.maxZoom,n.maxZoom),void 0!==n.extent&&(o.extent=void 0!==o.extent?WS(o.extent,n.extent):n.extent)}return e},e.prototype.getSourceState=function(){return"ready"},e}(RG),MW=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),TW=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r.map=i,r.frameState=void 0!==n?n:null,r}return MW(e,t),e}(MC),RW=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),VW=function(t){function e(e,i,n,r,s){var o=t.call(this,e,i,s)||this;return o.originalEvent=n,o.pixel_=null,o.coordinate_=null,o.dragging=void 0!==r&&r,o}return RW(e,t),Object.defineProperty(e.prototype,"pixel",{get:function(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_},set:function(t){this.pixel_=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"coordinate",{get:function(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_},set:function(t){this.coordinate_=t},enumerable:!1,configurable:!0}),e.prototype.preventDefault=function(){t.prototype.preventDefault.call(this),this.originalEvent.preventDefault()},e.prototype.stopPropagation=function(){t.prototype.stopPropagation.call(this),this.originalEvent.stopPropagation()},e}(TW),FW=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),LW=function(t){function e(e,i){var n=t.call(this,e)||this;n.map_=e,n.emulateClicks_=!1,n.dragging_=!1,n.dragListenerKeys_=[],n.moveTolerance_=i?i*aS:aS,n.down_=null;var r=n.map_.getViewport();return n.activePointers_=0,n.trackedTouches_={},n.element_=r,n.pointerdownListenerKey_=tk(r,"pointerdown",n.handlePointerDown_,n),n.relayedListenerKey_=tk(r,"pointermove",n.relayEvent_,n),n.boundHandleTouchMove_=n.handleTouchMove_.bind(n),n.element_.addEventListener("touchmove",n.boundHandleTouchMove_,!!hS&&{passive:!1}),n}return FW(e,t),e.prototype.emulateClick_=function(t){var e=new VW($$.CLICK,this.map_,t);this.dispatchEvent(e),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new VW($$.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout((function(){this.clickTimeoutId_=void 0;var e=new VW($$.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}).bind(this),250)},e.prototype.updateActivePointers_=function(t){var e=t;e.type==$$.POINTERUP||e.type==$$.POINTERCANCEL?delete this.trackedTouches_[e.pointerId]:e.type==$$.POINTERDOWN&&(this.trackedTouches_[e.pointerId]=!0),this.activePointers_=Object.keys(this.trackedTouches_).length},e.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var e=new VW($$.POINTERUP,this.map_,t);this.dispatchEvent(e),this.emulateClicks_&&!e.propagationStopped&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),0===this.activePointers_&&(this.dragListenerKeys_.forEach(ik),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)},e.prototype.isMouseActionButton_=function(t){return 0===t.button},e.prototype.handlePointerDown_=function(t){this.emulateClicks_=0===this.activePointers_,this.updateActivePointers_(t);var e=new VW($$.POINTERDOWN,this.map_,t);if(this.dispatchEvent(e),this.down_=t,0===this.dragListenerKeys_.length){var i=this.map_.getOwnerDocument();this.dragListenerKeys_.push(tk(i,$$.POINTERMOVE,this.handlePointerMove_,this),tk(i,$$.POINTERUP,this.handlePointerUp_,this),tk(this.element_,$$.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==i&&this.dragListenerKeys_.push(tk(this.element_.getRootNode(),$$.POINTERUP,this.handlePointerUp_,this))}},e.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.dragging_=!0;var e=new VW($$.POINTERDRAG,this.map_,t,this.dragging_);this.dispatchEvent(e)}},e.prototype.relayEvent_=function(t){this.originalPointerMoveEvent_=t;var e=!(!this.down_||!this.isMoving_(t));this.dispatchEvent(new VW(t.type,this.map_,t,e))},e.prototype.handleTouchMove_=function(t){this.originalPointerMoveEvent_&&!this.originalPointerMoveEvent_.defaultPrevented||t.preventDefault()},e.prototype.isMoving_=function(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_},e.prototype.disposeInternal=function(){this.relayedListenerKey_&&(ik(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener("touchmove",this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(ik(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(ik),this.dragListenerKeys_.length=0,this.element_=null,t.prototype.disposeInternal.call(this)},e}(WC),UW=1/0,BW=function(){function t(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}return t.prototype.clear=function(){this.elements_.length=0,this.priorities_.length=0,HC(this.queuedElements_)},t.prototype.dequeue=function(){var t=this.elements_,e=this.priorities_,i=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));var n=this.keyFunction_(i);return delete this.queuedElements_[n],i},t.prototype.enqueue=function(t){yS(!(this.keyFunction_(t)in this.queuedElements_),31);var e=this.priorityFunction_(t);return e!=UW&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)},t.prototype.getCount=function(){return this.elements_.length},t.prototype.getLeftChildIndex_=function(t){return 2*t+1},t.prototype.getRightChildIndex_=function(t){return 2*t+2},t.prototype.getParentIndex_=function(t){return t-1>>1},t.prototype.heapify_=function(){var t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)},t.prototype.isEmpty=function(){return 0===this.elements_.length},t.prototype.isKeyQueued=function(t){return t in this.queuedElements_},t.prototype.isQueued=function(t){return this.isKeyQueued(this.keyFunction_(t))},t.prototype.siftUp_=function(t){for(var e=this.elements_,i=this.priorities_,n=e.length,r=e[t],s=i[t],o=t;t<n>>1;){var a=this.getLeftChildIndex_(t),l=this.getRightChildIndex_(t),c=l<n&&i[l]<i[a]?l:a;e[t]=e[c],i[t]=i[c],t=c}e[t]=r,i[t]=s,this.siftDown_(o,t)},t.prototype.siftDown_=function(t,e){for(var i=this.elements_,n=this.priorities_,r=i[e],s=n[e];e>t;){var o=this.getParentIndex_(e);if(!(n[o]>s))break;i[e]=i[o],n[e]=n[o],e=o}i[e]=r,n[e]=s},t.prototype.reprioritize=function(){var t,e,i,n=this.priorityFunction_,r=this.elements_,s=this.priorities_,o=0,a=r.length;for(e=0;e<a;++e)(i=n(t=r[e]))==UW?delete this.queuedElements_[this.keyFunction_(t)]:(s[o]=i,r[o++]=t);r.length=o,s.length=o,this.heapify_()},t}(),NW=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),jW=function(t){function e(e,i){var n=t.call(this,function(t){return e.apply(null,t)},function(t){return t[0].getKey()})||this;return n.boundHandleTileChange_=n.handleTileChange.bind(n),n.tileChangeCallback_=i,n.tilesLoading_=0,n.tilesLoadingKeys_={},n}return NW(e,t),e.prototype.enqueue=function(e){var i=t.prototype.enqueue.call(this,e);return i&&e[0].addEventListener("change",this.boundHandleTileChange_),i},e.prototype.getTilesLoading=function(){return this.tilesLoading_},e.prototype.handleTileChange=function(t){var e=t.target,i=e.getState();if(e.hifi&&2===i||3===i||4===i){e.removeEventListener("change",this.boundHandleTileChange_);var n=e.getKey();n in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[n],--this.tilesLoading_),this.tileChangeCallback_()}},e.prototype.loadMoreTiles=function(t,e){for(var i,n,r=0;this.tilesLoading_<t&&r<e&&this.getCount()>0;)n=(i=this.dequeue()[0]).getKey(),0!==i.getState()||n in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[n]=!0,++this.tilesLoading_,++r,i.load())},e}(BW);function zW(t,e,i){return function(n,r,s,o,a){if(n){var l=e?0:s[0]*r,c=e?0:s[1]*r,h=a?a[0]:0,u=a?a[1]:0,d=t[0]+l/2+h,p=t[2]-l/2+h,f=t[1]+c/2+u,m=t[3]-c/2+u;d>p&&(p=d=(p+d)/2),f>m&&(m=f=(m+f)/2);var g=uk(n[0],d,p),A=uk(n[1],f,m),b=30*r;return o&&i&&(g+=-b*Math.log(1+Math.max(0,d-n[0])/b)+b*Math.log(1+Math.max(0,n[0]-p)/b),A+=-b*Math.log(1+Math.max(0,f-n[1])/b)+b*Math.log(1+Math.max(0,n[1]-m)/b)),[g,A]}}}function HW(t){return t}function KW(t,e,i,n){var r=YS(e)/i[0],s=GS(e)/i[1];return n?Math.min(t,Math.max(r,s)):Math.min(t,Math.min(r,s))}function $W(t,e,i){var n=Math.min(t,e);return n*=Math.log(1+50*Math.max(0,t/e-1))/50+1,i&&(n=Math.max(n,i),n/=Math.log(1+50*Math.max(0,i/t-1))/50+1),uk(n,i/2,2*e)}function GW(t,e,i,n,r){return function(s,o,a,l){if(void 0!==s){var c=n?KW(t,n,a,r):t;return(void 0===i||i)&&l?$W(s,c,e):uk(s,e,c)}}}var WW=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function ZW(t,e){setTimeout(function(){t(e)},0)}function qW(t){return!(t.sourceCenter&&t.targetCenter&&!$k(t.sourceCenter,t.targetCenter))&&t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation}function YW(t,e,i,n,r){var s=Math.cos(-r),o=Math.sin(-r),a=t[0]*s-t[1]*o,l=t[1]*s+t[0]*o;return[(a+=(e[0]/2-i[0])*n)*s-(l+=(i[1]-e[1]/2)*n)*(o=-o),l*s+a*o]}var QW=function(t){function e(e){var i=t.call(this)||this,n=zC({},e);return i.hints_=[0,0],i.animations_=[],i.projection_=rE(n.projection,"EPSG:3857"),i.viewportSize_=[100,100],i.targetCenter_=null,i.cancelAnchor_=void 0,n.center&&(n.center=pE(n.center)),n.extent&&(n.extent=mE(n.extent)),i.applyOptions_(n),i}return WW(e,t),e.prototype.applyOptions_=function(t){var e=function(t){var e,i,n,r=void 0!==t.minZoom?t.minZoom:0,s=void 0!==t.maxZoom?t.maxZoom:28,o=void 0!==t.zoomFactor?t.zoomFactor:2,a=void 0!==t.multiWorld&&t.multiWorld,l=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,c=void 0!==t.showFullExtent&&t.showFullExtent,h=rE(t.projection,"EPSG:3857"),u=h.getExtent(),d=t.constrainOnlyCenter,p=t.extent;if(a||p||!h.isGlobal()||(d=!1,p=u),void 0!==t.resolutions){var f=t.resolutions;i=f[r],n=void 0!==f[s]?f[s]:f[f.length-1],e=t.constrainResolution?function(t,e,i,n){return function(r,s,o,a){if(void 0!==r){var l=t[0],c=t[t.length-1],h=i?KW(l,i,o,n):l;if(a)return void 0===e||e?$W(r,h,c):uk(r,c,h);var u=Math.min(h,r),d=Math.floor(VC(t,u,s));return t[d]>h&&d<t.length-1?t[d+1]:t[d]}}}(f,l,!d&&p,c):GW(i,n,l,!d&&p,c)}else{var m=(u?Math.max(YS(u),GS(u)):360*lk[ck.DEGREES]/h.getMetersPerUnit())/256/Math.pow(2,0),g=m/Math.pow(2,28);void 0!==(i=t.maxResolution)?r=0:i=m/Math.pow(o,r),void 0===(n=t.minResolution)&&(n=void 0!==t.maxZoom?void 0!==t.maxResolution?i/Math.pow(o,s):m/Math.pow(o,s):g),s=r+Math.floor(Math.log(i/n)/Math.log(o)),n=i/Math.pow(o,s-r),e=t.constrainResolution?function(t,e,i,n,r,s){return function(o,a,l,c){if(void 0!==o){var h=r?KW(e,r,l,s):e,u=void 0!==i?i:0;if(c)return void 0===n||n?$W(o,h,u):uk(o,u,h);var d=Math.ceil(Math.log(e/h)/Math.log(t)-1e-9),p=-a*(.5-1e-9)+.5,f=Math.min(h,o),m=Math.floor(Math.log(e/f)/Math.log(t)+p),g=Math.max(d,m);return uk(e/Math.pow(t,g),u,h)}}}(o,i,n,l,!d&&p,c):GW(i,n,l,!d&&p,c)}return{constraint:e,maxResolution:i,minResolution:n,minZoom:r,zoomFactor:o}}(t);this.maxResolution_=e.maxResolution,this.minResolution_=e.minResolution,this.zoomFactor_=e.zoomFactor,this.resolutions_=t.resolutions,this.padding=t.padding,this.minZoom_=e.minZoom;var i=function(t){if(void 0!==t.extent)return zW(t.extent,t.constrainOnlyCenter,void 0===t.smoothExtentConstraint||t.smoothExtentConstraint);var e=rE(t.projection,"EPSG:3857");if(!0!==t.multiWorld&&e.isGlobal()){var i=e.getExtent().slice();return i[0]=-1/0,i[2]=1/0,zW(i,!1,!1)}return HW}(t),n=e.constraint,r=function(t){if(void 0===t.enableRotation||t.enableRotation){var e=t.constrainRotation;return void 0===e||!0===e?(n=Ak(5),function(t,e){return e?t:void 0!==t?Math.abs(t)<=n?0:t:void 0}):!1===e?uG:"number"==typeof e?(i=2*Math.PI/e,function(t,e){return e?t:void 0!==t?t=Math.floor(t/i+.5)*i:void 0}):uG}return hG;var i,n}(t);this.constraints_={center:i,resolution:n,rotation:r},this.setRotation(void 0!==t.rotation?t.rotation:0),this.setCenterInternal(void 0!==t.center?t.center:null),void 0!==t.resolution?this.setResolution(t.resolution):void 0!==t.zoom&&this.setZoom(t.zoom),this.setProperties({}),this.options_=t},e.prototype.getUpdatedOptions_=function(t){var e=zC({},this.options_);return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),zC({},e,t)},e.prototype.animate=function(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);for(var e=new Array(arguments.length),i=0;i<e.length;++i){var n=arguments[i];n.center&&((n=zC({},n)).center=pE(n.center,this.getProjection())),n.anchor&&((n=zC({},n)).anchor=pE(n.anchor,this.getProjection())),e[i]=n}this.animateInternal.apply(this,e)},e.prototype.animateInternal=function(t){var e,i=arguments.length;if(i>1&&"function"==typeof arguments[i-1]&&(e=arguments[i-1],--i),!this.isDef()){var n=arguments[i-1];return n.center&&this.setCenterInternal(n.center),void 0!==n.zoom&&this.setZoom(n.zoom),void 0!==n.rotation&&this.setRotation(n.rotation),void(e&&ZW(e,!0))}for(var r=Date.now(),s=this.targetCenter_.slice(),o=this.targetResolution_,a=this.targetRotation_,l=[],c=0;c<i;++c){var h=arguments[c],u={start:r,complete:!1,anchor:h.anchor,duration:void 0!==h.duration?h.duration:1e3,easing:h.easing||JC,callback:e};if(h.center&&(u.sourceCenter=s,u.targetCenter=h.center.slice(),s=u.targetCenter),void 0!==h.zoom?(u.sourceResolution=o,u.targetResolution=this.getResolutionForZoom(h.zoom),o=u.targetResolution):h.resolution&&(u.sourceResolution=o,u.targetResolution=h.resolution,o=u.targetResolution),void 0!==h.rotation){u.sourceRotation=a;var d=bk(h.rotation-a+Math.PI,2*Math.PI)-Math.PI;u.targetRotation=a+d,a=u.targetRotation}qW(u)?u.complete=!0:r+=u.duration,l.push(u)}this.animations_.push(l),this.setHint(0,1),this.updateAnimations_()},e.prototype.getAnimating=function(){return this.hints_[0]>0},e.prototype.getInteracting=function(){return this.hints_[1]>0},e.prototype.cancelAnimations=function(){var t;this.setHint(0,-this.hints_[0]);for(var e=0,i=this.animations_.length;e<i;++e){var n=this.animations_[e];if(n[0].callback&&ZW(n[0].callback,!1),!t)for(var r=0,s=n.length;r<s;++r){var o=n[r];if(!o.complete){t=o.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t},e.prototype.updateAnimations_=function(){if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),this.getAnimating()){for(var t=Date.now(),e=!1,i=this.animations_.length-1;i>=0;--i){for(var n=this.animations_[i],r=!0,s=0,o=n.length;s<o;++s){var a=n[s];if(!a.complete){var l=a.duration>0?(t-a.start)/a.duration:1;l>=1?(a.complete=!0,l=1):r=!1;var c=a.easing(l);if(a.sourceCenter){var h=a.sourceCenter[0],u=a.sourceCenter[1];this.targetCenter_=[h+c*(a.targetCenter[0]-h),u+c*(a.targetCenter[1]-u)]}if(a.sourceResolution&&a.targetResolution){var d=1===c?a.targetResolution:a.sourceResolution+c*(a.targetResolution-a.sourceResolution);if(a.anchor){var p=this.getViewportSize_(this.getRotation()),f=this.constraints_.resolution(d,0,p,!0);this.targetCenter_=this.calculateCenterZoom(f,a.anchor)}this.targetResolution_=d,this.applyTargetState_(!0)}if(void 0!==a.sourceRotation&&void 0!==a.targetRotation){var m=1===c?bk(a.targetRotation+Math.PI,2*Math.PI)-Math.PI:a.sourceRotation+c*(a.targetRotation-a.sourceRotation);if(a.anchor){var g=this.constraints_.rotation(m,!0);this.targetCenter_=this.calculateCenterRotate(g,a.anchor)}this.targetRotation_=m}if(this.applyTargetState_(!0),e=!0,!a.complete)break}}if(r){this.animations_[i]=null,this.setHint(0,-1);var A=n[0].callback;A&&ZW(A,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}},e.prototype.calculateCenterRotate=function(t,e){var i,n,r,s=this.getCenterInternal();return void 0!==s&&(Gk(i=[s[0]-e[0],s[1]-e[1]],t-this.getRotation()),(n=i)[0]+=+(r=e)[0],n[1]+=+r[1]),i},e.prototype.calculateCenterZoom=function(t,e){var i,n=this.getCenterInternal(),r=this.getResolution();return void 0!==n&&void 0!==r&&(i=[e[0]-t*(e[0]-n[0])/r,e[1]-t*(e[1]-n[1])/r]),i},e.prototype.getViewportSize_=function(t){var e=this.viewportSize_;if(t){var i=e[0],n=e[1];return[Math.abs(i*Math.cos(t))+Math.abs(n*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(n*Math.cos(t))]}return e},e.prototype.setViewportSize=function(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)},e.prototype.getCenter=function(){var t=this.getCenterInternal();return t?dE(t,this.getProjection()):t},e.prototype.getCenterInternal=function(){return this.get("center")},e.prototype.getConstraints=function(){return this.constraints_},e.prototype.getConstrainResolution=function(){return this.options_.constrainResolution},e.prototype.getHints=function(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()},e.prototype.calculateExtent=function(t){return fE(this.calculateExtentInternal(t),this.getProjection())},e.prototype.calculateExtentInternal=function(t){var e=t||this.getViewportSize_(),i=this.getCenterInternal();yS(i,1);var n=this.getResolution();yS(void 0!==n,2);var r=this.getRotation();return yS(void 0!==r,3),$S(i,n,r,e)},e.prototype.getMaxResolution=function(){return this.maxResolution_},e.prototype.getMinResolution=function(){return this.minResolution_},e.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},e.prototype.setMaxZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))},e.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},e.prototype.setMinZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))},e.prototype.setConstrainResolution=function(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolution=function(){return this.get("resolution")},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,e){return this.getResolutionForExtentInternal(mE(t,this.getProjection()),e)},e.prototype.getResolutionForExtentInternal=function(t,e){var i=e||this.getViewportSize_(),n=YS(t)/i[0],r=GS(t)/i[1];return Math.max(n,r)},e.prototype.getResolutionForValueFunction=function(t){var e=t||2,i=this.getConstrainedResolution(this.maxResolution_),n=Math.log(i/this.minResolution_)/Math.log(e);return function(t){return i/Math.pow(e,t*n)}},e.prototype.getRotation=function(){return this.get("rotation")},e.prototype.getValueForResolutionFunction=function(t){var e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),n=Math.log(i/this.minResolution_)/e;return function(t){return Math.log(i/t)/e/n}},e.prototype.getViewportSizeMinusPadding_=function(t){var e=this.getViewportSize_(t),i=this.padding;return i&&(e=[e[0]-i[1]-i[3],e[1]-i[0]-i[2]]),e},e.prototype.getState=function(){var t=this.getProjection(),e=this.getResolution(),i=this.getRotation(),n=this.getCenterInternal(),r=this.padding;if(r){var s=this.getViewportSizeMinusPadding_();n=YW(n,this.getViewportSize_(),[s[0]/2+r[3],s[1]/2+r[0]],e,i)}return{center:n.slice(0),projection:void 0!==t?t:null,resolution:e,rotation:i,zoom:this.getZoom()}},e.prototype.getZoom=function(){var t,e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t},e.prototype.getZoomForResolution=function(t){var e,i,n=this.minZoom_||0;if(this.resolutions_){var r=VC(this.resolutions_,t,1);n=r,e=this.resolutions_[r],i=r==this.resolutions_.length-1?2:e/this.resolutions_[r+1]}else e=this.maxResolution_,i=this.zoomFactor_;return n+Math.log(e/t)/Math.log(i)},e.prototype.getResolutionForZoom=function(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;var e=uk(Math.floor(t),0,this.resolutions_.length-2);return this.resolutions_[e]/Math.pow(this.resolutions_[e]/this.resolutions_[e+1],uk(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)},e.prototype.fit=function(t,e){var i;if(yS(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t))yS(!XS(t),25),i=nT(n=mE(t,this.getProjection()));else if("Circle"===t.getType()){var n;(i=nT(n=mE(t.getExtent(),this.getProjection()))).rotate(this.getRotation(),HS(n))}else i=t;this.fitInternal(i,e)},e.prototype.fitInternal=function(t,e){var i=e||{},n=i.size;n||(n=this.getViewportSizeMinusPadding_());var r,s=void 0!==i.padding?i.padding:[0,0,0,0],o=void 0!==i.nearest&&i.nearest;r=void 0!==i.minResolution?i.minResolution:void 0!==i.maxZoom?this.getResolutionForZoom(i.maxZoom):0;for(var a=t.getFlatCoordinates(),l=this.getRotation(),c=Math.cos(-l),h=Math.sin(-l),u=1/0,d=1/0,p=-1/0,f=-1/0,m=t.getStride(),g=0,A=a.length;g<A;g+=m){var b=a[g]*c-a[g+1]*h,v=a[g]*h+a[g+1]*c;u=Math.min(u,b),d=Math.min(d,v),p=Math.max(p,b),f=Math.max(f,v)}var _=this.getResolutionForExtentInternal([u,d,p,f],[n[0]-s[1]-s[3],n[1]-s[0]-s[2]]);_=isNaN(_)?r:Math.max(_,r),_=this.getConstrainedResolution(_,o?0:1);var y=(u+p)/2,w=(d+f)/2,x=this.getConstrainedCenter([(y+=(s[1]-s[3])/2*_)*c-(w+=(s[0]-s[2])/2*_)*(h=-h),w*c+y*h],_),C=i.callback?i.callback:jC;void 0!==i.duration?this.animateInternal({resolution:_,center:x,duration:i.duration,easing:i.easing},C):(this.targetResolution_=_,this.targetCenter_=x,this.applyTargetState_(!1,!0),ZW(C,!0))},e.prototype.centerOn=function(t,e,i){this.centerOnInternal(pE(t,this.getProjection()),e,i)},e.prototype.centerOnInternal=function(t,e,i){this.setCenterInternal(YW(t,e,i,this.getResolution(),this.getRotation()))},e.prototype.calculateCenterShift=function(t,e,i,n){var r,s=this.padding;if(s&&t){var o=this.getViewportSizeMinusPadding_(-i),a=YW(t,n,[o[0]/2+s[3],o[1]/2+s[0]],e,i);r=[t[0]-a[0],t[1]-a[1]]}return r},e.prototype.isDef=function(){return!!this.getCenterInternal()&&void 0!==this.getResolution()},e.prototype.adjustCenter=function(t){var e=dE(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])},e.prototype.adjustCenterInternal=function(t){var e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])},e.prototype.adjustResolution=function(t,e){var i=e&&pE(e,this.getProjection());this.adjustResolutionInternal(t,i)},e.prototype.adjustResolutionInternal=function(t,e){var i=this.getAnimating()||this.getInteracting(),n=this.getViewportSize_(this.getRotation()),r=this.constraints_.resolution(this.targetResolution_*t,0,n,i);e&&(this.targetCenter_=this.calculateCenterZoom(r,e)),this.targetResolution_*=t,this.applyTargetState_()},e.prototype.adjustZoom=function(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)},e.prototype.adjustRotation=function(t,e){e&&(e=pE(e,this.getProjection())),this.adjustRotationInternal(t,e)},e.prototype.adjustRotationInternal=function(t,e){var i=this.getAnimating()||this.getInteracting(),n=this.constraints_.rotation(this.targetRotation_+t,i);e&&(this.targetCenter_=this.calculateCenterRotate(n,e)),this.targetRotation_+=t,this.applyTargetState_()},e.prototype.setCenter=function(t){this.setCenterInternal(pE(t,this.getProjection()))},e.prototype.setCenterInternal=function(t){this.targetCenter_=t,this.applyTargetState_()},e.prototype.setHint=function(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]},e.prototype.setResolution=function(t){this.targetResolution_=t,this.applyTargetState_()},e.prototype.setRotation=function(t){this.targetRotation_=t,this.applyTargetState_()},e.prototype.setZoom=function(t){this.setResolution(this.getResolutionForZoom(t))},e.prototype.applyTargetState_=function(t,e){var i=this.getAnimating()||this.getInteracting()||e,n=this.constraints_.rotation(this.targetRotation_,i),r=this.getViewportSize_(n),s=this.constraints_.resolution(this.targetResolution_,0,r,i),o=this.constraints_.center(this.targetCenter_,s,r,i,this.calculateCenterShift(this.targetCenter_,s,n,r));this.get("rotation")!==n&&this.set("rotation",n),this.get("resolution")!==s&&this.set("resolution",s),this.get("center")&&$k(this.get("center"),o)||this.set("center",o),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0},e.prototype.resolveConstraints=function(t,e,i){var n=void 0!==t?t:200,r=e||0,s=this.constraints_.rotation(this.targetRotation_),o=this.getViewportSize_(s),a=this.constraints_.resolution(this.targetResolution_,r,o),l=this.constraints_.center(this.targetCenter_,a,o,!1,this.calculateCenterShift(this.targetCenter_,a,s,o));if(0===n&&!this.cancelAnchor_)return this.targetResolution_=a,this.targetRotation_=s,this.targetCenter_=l,void this.applyTargetState_();var c=i||(0===n?this.cancelAnchor_:void 0);this.cancelAnchor_=void 0,this.getResolution()===a&&this.getRotation()===s&&this.getCenterInternal()&&$k(this.getCenterInternal(),l)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:s,center:l,resolution:a,duration:n,easing:XC,anchor:c}))},e.prototype.beginInteraction=function(){this.resolveConstraints(0),this.setHint(1,1)},e.prototype.endInteraction=function(t,e,i){var n=i&&pE(i,this.getProjection());this.endInteractionInternal(t,e,n)},e.prototype.endInteractionInternal=function(t,e,i){this.setHint(1,-1),this.resolveConstraints(t,e,i)},e.prototype.getConstrainedCenter=function(t,e){var i=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),i)},e.prototype.getConstrainedZoom=function(t,e){var i=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(i,e))},e.prototype.getConstrainedResolution=function(t,e){var i=e||0,n=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,i,n)},e}(BE),XW=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),JW=function(t){function e(e){var i=t.call(this)||this,n=function(t){var e=null;void 0!==t.keyboardEventTarget&&(e="string"==typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);var i,n,r,s={},o=t.layers&&"function"==typeof t.layers.getLayers?t.layers:new OW({layers:t.layers});return s.layergroup=o,s.target=t.target,s.view=void 0!==t.view?t.view:new QW,void 0!==t.controls&&(Array.isArray(t.controls)?i=new j$(t.controls.slice()):(yS("function"==typeof t.controls.getArray,47),i=t.controls)),void 0!==t.interactions&&(Array.isArray(t.interactions)?n=new j$(t.interactions.slice()):(yS("function"==typeof t.interactions.getArray,48),n=t.interactions)),void 0!==t.overlays?Array.isArray(t.overlays)?r=new j$(t.overlays.slice()):(yS("function"==typeof t.overlays.getArray,49),r=t.overlays):r=new j$,{controls:i,interactions:n,keyboardEventTarget:e,overlays:r,values:s}}(e);return i.boundHandleBrowserEvent_=i.handleBrowserEvent.bind(i),i.maxTilesLoading_=void 0!==e.maxTilesLoading?e.maxTilesLoading:16,i.pixelRatio_=void 0!==e.pixelRatio?e.pixelRatio:aS,i.animationDelay_=(function(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}).bind(i),i.coordinateToPixelTransform_=[1,0,0,1,0,0],i.pixelToCoordinateTransform_=[1,0,0,1,0,0],i.frameIndex_=0,i.frameState_=null,i.previousExtent_=null,i.viewPropertyListenerKey_=null,i.viewChangeListenerKey_=null,i.layerGroupPropertyListenerKeys_=null,i.viewport_=document.createElement("div"),i.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),i.viewport_.style.position="relative",i.viewport_.style.overflow="hidden",i.viewport_.style.width="100%",i.viewport_.style.height="100%",i.overlayContainer_=document.createElement("div"),i.overlayContainer_.style.position="absolute",i.overlayContainer_.style.zIndex="0",i.overlayContainer_.style.width="100%",i.overlayContainer_.style.height="100%",i.overlayContainer_.style.pointerEvents="none",i.overlayContainer_.className="ol-overlaycontainer",i.viewport_.appendChild(i.overlayContainer_),i.overlayContainerStopEvent_=document.createElement("div"),i.overlayContainerStopEvent_.style.position="absolute",i.overlayContainerStopEvent_.style.zIndex="0",i.overlayContainerStopEvent_.style.width="100%",i.overlayContainerStopEvent_.style.height="100%",i.overlayContainerStopEvent_.style.pointerEvents="none",i.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",i.viewport_.appendChild(i.overlayContainerStopEvent_),i.mapBrowserEventHandler_=null,i.moveTolerance_=e.moveTolerance,i.keyboardEventTarget_=n.keyboardEventTarget,i.keyHandlerKeys_=null,i.controls=n.controls||new j$,i.interactions=n.interactions||new j$,i.overlays_=n.overlays,i.overlayIdIndex_={},i.renderer_=null,i.postRenderFunctions_=[],i.tileQueue_=new jW(i.getTilePriority.bind(i),i.handleTileChange_.bind(i)),i.addEventListener(UE("layergroup"),i.handleLayerGroupChanged_),i.addEventListener(UE("view"),i.handleViewChanged_),i.addEventListener(UE("size"),i.handleSizeChanged_),i.addEventListener(UE("target"),i.handleTargetChanged_),i.setProperties(n.values),i.controls.forEach((function(t){t.setMap(this)}).bind(i)),i.controls.addEventListener("add",(function(t){t.element.setMap(this)}).bind(i)),i.controls.addEventListener("remove",(function(t){t.element.setMap(null)}).bind(i)),i.interactions.forEach((function(t){t.setMap(this)}).bind(i)),i.interactions.addEventListener("add",(function(t){t.element.setMap(this)}).bind(i)),i.interactions.addEventListener("remove",(function(t){t.element.setMap(null)}).bind(i)),i.overlays_.forEach(i.addOverlayInternal_.bind(i)),i.overlays_.addEventListener("add",(function(t){this.addOverlayInternal_(t.element)}).bind(i)),i.overlays_.addEventListener("remove",(function(t){var e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)}).bind(i)),i}return XW(e,t),e.prototype.createRenderer=function(){throw new Error("Use a map type that has a createRenderer method")},e.prototype.addControl=function(t){this.getControls().push(t)},e.prototype.addInteraction=function(t){this.getInteractions().push(t)},e.prototype.addLayer=function(t){this.getLayerGroup().getLayers().push(t)},e.prototype.addOverlay=function(t){this.getOverlays().push(t)},e.prototype.addOverlayInternal_=function(t){var e=t.getId();void 0!==e&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)},e.prototype.disposeInternal=function(){this.setTarget(null),t.prototype.disposeInternal.call(this)},e.prototype.forEachFeatureAtPixel=function(t,e,i){if(this.frameState_){var n=this.getCoordinateFromPixelInternal(t);return this.renderer_.forEachFeatureAtCoordinate(n,this.frameState_,void 0!==(i=void 0!==i?i:{}).hitTolerance?i.hitTolerance:0,!1!==i.checkWrapped,e,null,void 0!==i.layerFilter?i.layerFilter:BC,null)}},e.prototype.getFeaturesAtPixel=function(t,e){var i=[];return this.forEachFeatureAtPixel(t,function(t){i.push(t)},e),i},e.prototype.forEachLayerAtPixel=function(t,e,i){if(this.frameState_){var n=i||{};return this.renderer_.forEachLayerAtPixel(t,this.frameState_,void 0!==n.hitTolerance?n.hitTolerance:0,e,n.layerFilter||BC)}},e.prototype.hasFeatureAtPixel=function(t,e){if(!this.frameState_)return!1;var i=this.getCoordinateFromPixelInternal(t);return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,void 0!==(e=void 0!==e?e:{}).hitTolerance?e.hitTolerance:0,!1!==e.checkWrapped,void 0!==e.layerFilter?e.layerFilter:BC,null)},e.prototype.getEventCoordinate=function(t){return this.getCoordinateFromPixel(this.getEventPixel(t))},e.prototype.getEventCoordinateInternal=function(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))},e.prototype.getEventPixel=function(t){var e=this.viewport_.getBoundingClientRect(),i="changedTouches"in t?t.changedTouches[0]:t;return[i.clientX-e.left,i.clientY-e.top]},e.prototype.getTarget=function(){return this.get("target")},e.prototype.getTargetElement=function(){var t=this.getTarget();return void 0!==t?"string"==typeof t?document.getElementById(t):t:null},e.prototype.getCoordinateFromPixel=function(t){return dE(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())},e.prototype.getCoordinateFromPixelInternal=function(t){var e=this.frameState_;return e?lM(e.pixelToCoordinateTransform,t.slice()):null},e.prototype.getControls=function(){return this.controls},e.prototype.getOverlays=function(){return this.overlays_},e.prototype.getOverlayById=function(t){var e=this.overlayIdIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getInteractions=function(){return this.interactions},e.prototype.getLayerGroup=function(){return this.get("layergroup")},e.prototype.getLayers=function(){return this.getLayerGroup().getLayers()},e.prototype.getLoading=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),e=0,i=t.length;e<i;++e){var n=t[e].layer.getSource();if(n&&n.loading)return!0}return!1},e.prototype.getPixelFromCoordinate=function(t){var e=pE(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)},e.prototype.getPixelFromCoordinateInternal=function(t){var e=this.frameState_;return e?lM(e.coordinateToPixelTransform,t.slice(0,2)):null},e.prototype.getRenderer=function(){return this.renderer_},e.prototype.getSize=function(){return this.get("size")},e.prototype.getView=function(){return this.get("view")},e.prototype.getViewport=function(){return this.viewport_},e.prototype.getOverlayContainer=function(){return this.overlayContainer_},e.prototype.getOverlayContainerStopEvent=function(){return this.overlayContainerStopEvent_},e.prototype.getOwnerDocument=function(){return this.getTargetElement()?this.getTargetElement().ownerDocument:document},e.prototype.getTilePriority=function(t,e,i,n){return function(t,e,i,n,r){if(!t||!(i in t.wantedTiles))return UW;if(!t.wantedTiles[i][e.getKey()])return UW;var s=t.viewState.center,o=n[0]-s[0],a=n[1]-s[1];return 65536*Math.log(r)+Math.sqrt(o*o+a*a)/r}(this.frameState_,t,e,i,n)},e.prototype.handleBrowserEvent=function(t,e){var i=new VW(e||t.type,this,t);this.handleMapBrowserEvent(i)},e.prototype.handleMapBrowserEvent=function(t){if(this.frameState_){var e=t.originalEvent,i=e.type;if("pointerdown"===i||"wheel"===i||"keydown"===i){var n=this.getOwnerDocument(),r=this.viewport_.getRootNode?this.viewport_.getRootNode():n,s="host"in r?r.elementFromPoint(e.clientX,e.clientY):e.target;if(this.overlayContainerStopEvent_.contains(s)||!(r===n?n.documentElement:r).contains(s))return}if(t.frameState=this.frameState_,!1!==this.dispatchEvent(t))for(var o=this.getInteractions().getArray().slice(),a=o.length-1;a>=0;a--){var l=o[a];if(l.getMap()===this&&l.getActive()&&this.getTargetElement()&&(!l.handleEvent(t)||t.propagationStopped))break}}},e.prototype.handlePostRender=function(){var t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){var i=this.maxTilesLoading_,n=i;if(t){var r=t.viewHints;if(r[0]||r[1]){var s=!cS&&Date.now()-t.time>8;i=s?0:8,n=s?0:2}}e.getTilesLoading()<i&&(e.reprioritize(),e.loadMoreTiles(i,n))}!t||!this.hasListener("rendercomplete")||t.animate||this.tileQueue_.getTilesLoading()||this.getLoading()||this.renderer_.dispatchRenderEvent("rendercomplete",t);for(var o=this.postRenderFunctions_,a=0,l=o.length;a<l;++a)o[a](this,t);o.length=0},e.prototype.handleSizeChanged_=function(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()},e.prototype.handleTargetChanged_=function(){var t;if(this.getTarget()&&(t=this.getTargetElement()),this.mapBrowserEventHandler_){for(var e=0,i=this.keyHandlerKeys_.length;e<i;++e)ik(this.keyHandlerKeys_[e]);this.keyHandlerKeys_=null,this.viewport_.removeEventListener("contextmenu",this.boundHandleBrowserEvent_),this.viewport_.removeEventListener("wheel",this.boundHandleBrowserEvent_),void 0!==this.handleResize_&&(removeEventListener("resize",this.handleResize_,!1),this.handleResize_=void 0),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,mS(this.viewport_)}if(t){for(var n in t.appendChild(this.viewport_),this.renderer_||(this.renderer_=this.createRenderer()),this.mapBrowserEventHandler_=new LW(this,this.moveTolerance_),$$)this.mapBrowserEventHandler_.addEventListener($$[n],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener("contextmenu",this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener("wheel",this.boundHandleBrowserEvent_,!!hS&&{passive:!1});var r=this.keyboardEventTarget_?this.keyboardEventTarget_:t;this.keyHandlerKeys_=[tk(r,"keydown",this.handleBrowserEvent,this),tk(r,"keypress",this.handleBrowserEvent,this)],this.handleResize_||(this.handleResize_=this.updateSize.bind(this),window.addEventListener("resize",this.handleResize_,!1))}else this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderTimeoutHandle_=void 0,this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0);this.updateSize()},e.prototype.handleTileChange_=function(){this.render()},e.prototype.handleViewPropertyChanged_=function(){this.render()},e.prototype.handleViewChanged_=function(){this.viewPropertyListenerKey_&&(ik(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(ik(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);var t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=tk(t,"propertychange",this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=tk(t,"change",this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()},e.prototype.handleLayerGroupChanged_=function(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(ik),this.layerGroupPropertyListenerKeys_=null);var t=this.getLayerGroup();t&&(this.layerGroupPropertyListenerKeys_=[tk(t,"propertychange",this.render,this),tk(t,"change",this.render,this)]),this.render()},e.prototype.isRendered=function(){return!!this.frameState_},e.prototype.renderSync=function(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()},e.prototype.redrawText=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),e=0,i=t.length;e<i;++e){var n=t[e].layer;n.hasRenderer()&&n.getRenderer().handleFontsChanged()}},e.prototype.render=function(){this.renderer_&&void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))},e.prototype.removeControl=function(t){return this.getControls().remove(t)},e.prototype.removeInteraction=function(t){return this.getInteractions().remove(t)},e.prototype.removeLayer=function(t){return this.getLayerGroup().getLayers().remove(t)},e.prototype.removeOverlay=function(t){return this.getOverlays().remove(t)},e.prototype.renderFrame_=function(t){var e=this,i=this.getSize(),n=this.getView(),r=this.frameState_,s=null;if(void 0!==i&&function(t){return t[0]>0&&t[1]>0}(i)&&n&&n.isDef()){var o=n.getHints(this.frameState_?this.frameState_.viewHints:void 0),a=n.getState();s={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:$S(a.center,a.resolution,a.rotation,i),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:i,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:a,viewHints:o,wantedTiles:{}}}this.frameState_=s,this.renderer_.renderFrame(s),s&&(s.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,s.postRenderFunctions),r&&(!this.previousExtent_||!XS(this.previousExtent_)&&!RS(s.extent,this.previousExtent_))&&(this.dispatchEvent(new TW("movestart",this,r)),this.previousExtent_=OS(this.previousExtent_)),this.previousExtent_&&!s.viewHints[0]&&!s.viewHints[1]&&!RS(s.extent,this.previousExtent_)&&(this.dispatchEvent(new TW("moveend",this,s)),CS(s.extent,this.previousExtent_))),this.dispatchEvent(new TW("postrender",this,s)),this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout(function(){e.postRenderTimeoutHandle_=void 0,e.handlePostRender()},0))},e.prototype.setLayerGroup=function(t){this.set("layergroup",t)},e.prototype.setSize=function(t){this.set("size",t)},e.prototype.setTarget=function(t){this.set("target",t)},e.prototype.setView=function(t){this.set("view",t)},e.prototype.updateSize=function(){var t=this.getTargetElement();if(t){var e=getComputedStyle(t);this.setSize([t.offsetWidth-parseFloat(e.borderLeftWidth)-parseFloat(e.paddingLeft)-parseFloat(e.paddingRight)-parseFloat(e.borderRightWidth),t.offsetHeight-parseFloat(e.borderTopWidth)-parseFloat(e.paddingTop)-parseFloat(e.paddingBottom)-parseFloat(e.borderBottomWidth)])}else this.setSize(void 0);this.updateViewportSize_()},e.prototype.updateViewportSize_=function(){var t=this.getView();if(t){var e=void 0,i=getComputedStyle(this.viewport_);i.width&&i.height&&(e=[parseInt(i.width,10),parseInt(i.height,10)]),t.setViewportSize(e)}},e}(BE),tZ=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),eZ=function(t){function e(e){var i=t.call(this)||this,n=e.element;return!n||e.target||n.style.pointerEvents||(n.style.pointerEvents="auto"),i.element=n||null,i.target_=null,i.map_=null,i.listenerKeys=[],e.render&&(i.render=e.render),e.target&&i.setTarget(e.target),i}return tZ(e,t),e.prototype.disposeInternal=function(){mS(this.element),t.prototype.disposeInternal.call(this)},e.prototype.getMap=function(){return this.map_},e.prototype.setMap=function(t){this.map_&&mS(this.element);for(var e=0,i=this.listenerKeys.length;e<i;++e)ik(this.listenerKeys[e]);this.listenerKeys.length=0,this.map_=t,this.map_&&((this.target_?this.target_:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==jC&&this.listenerKeys.push(tk(t,"postrender",this.render,this)),t.render())},e.prototype.render=function(t){},e.prototype.setTarget=function(t){this.target_="string"==typeof t?document.getElementById(t):t},e}(BE),iZ=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),nZ=function(t){function e(e){var i=this,n=e||{};(i=t.call(this,{element:document.createElement("div"),render:n.render,target:n.target})||this).ulElement_=document.createElement("ul"),i.collapsed_=void 0===n.collapsed||n.collapsed,i.userCollapsed_=i.collapsed_,i.overrideCollapsible_=void 0!==n.collapsible,i.collapsible_=void 0===n.collapsible||n.collapsible,i.collapsible_||(i.collapsed_=!1);var r=void 0!==n.className?n.className:"ol-attribution",s=void 0!==n.tipLabel?n.tipLabel:"Attributions",o=void 0!==n.expandClassName?n.expandClassName:r+"-expand",a=void 0!==n.collapseLabel?n.collapseLabel:"\xbb",l=void 0!==n.collapseClassName?n.collapseClassName:r+"-collpase";"string"==typeof a?(i.collapseLabel_=document.createElement("span"),i.collapseLabel_.textContent=a,i.collapseLabel_.className=l):i.collapseLabel_=a;var c=void 0!==n.label?n.label:"i";"string"==typeof c?(i.label_=document.createElement("span"),i.label_.textContent=c,i.label_.className=o):i.label_=c;var h=i.collapsible_&&!i.collapsed_?i.collapseLabel_:i.label_,u=document.createElement("button");u.setAttribute("type","button"),u.title=s,u.appendChild(h),u.addEventListener("click",i.handleClick_.bind(i),!1);var d=i.element;return d.className=r+" ol-unselectable ol-control"+(i.collapsed_&&i.collapsible_?" ol-collapsed":"")+(i.collapsible_?"":" ol-uncollapsible"),d.appendChild(i.ulElement_),d.appendChild(u),i.renderedAttributions_=[],i.renderedVisible_=!0,i}return iZ(e,t),e.prototype.collectSourceAttributions_=function(t){for(var e={},i=[],n=!0,r=t.layerStatesArray,s=0,o=r.length;s<o;++s){var a=r[s];if(FG(a,t.viewState)){var l=a.layer.getSource();if(l){var c=l.getAttributions();if(c){var h=c(t);if(h)if(n=n&&!1!==l.getAttributionsCollapsible(),Array.isArray(h))for(var u=0,d=h.length;u<d;++u)h[u]in e||(i.push(h[u]),e[h[u]]=!0);else h in e||(i.push(h),e[h]=!0)}}}}return this.overrideCollapsible_||this.setCollapsible(n),i},e.prototype.updateElement_=function(t){if(t){var e=this.collectSourceAttributions_(t),i=e.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!UC(e,this.renderedAttributions_)){gS(this.ulElement_);for(var n=0,r=e.length;n<r;++n){var s=document.createElement("li");s.innerHTML=e[n],this.ulElement_.appendChild(s)}this.renderedAttributions_=e}}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},e.prototype.handleClick_=function(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_},e.prototype.handleToggle_=function(){this.element.classList.toggle("ol-collapsed"),this.collapsed_?fS(this.collapseLabel_,this.label_):fS(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_},e.prototype.getCollapsible=function(){return this.collapsible_},e.prototype.setCollapsible=function(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())},e.prototype.setCollapsed=function(t){this.userCollapsed_=t,this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()},e.prototype.getCollapsed=function(){return this.collapsed_},e.prototype.render=function(t){this.updateElement_(t.frameState)},e}(eZ),rZ=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),sZ=function(t){function e(e){var i=this,n=e||{};i=t.call(this,{element:document.createElement("div"),render:n.render,target:n.target})||this;var r=void 0!==n.className?n.className:"ol-rotate",s=void 0!==n.label?n.label:"\u21e7",o=void 0!==n.compassClassName?n.compassClassName:"ol-compass";i.label_=null,"string"==typeof s?(i.label_=document.createElement("span"),i.label_.className=o,i.label_.textContent=s):(i.label_=s,i.label_.classList.add(o));var a=n.tipLabel?n.tipLabel:"Reset rotation",l=document.createElement("button");l.className=r+"-reset",l.setAttribute("type","button"),l.title=a,l.appendChild(i.label_),l.addEventListener("click",i.handleClick_.bind(i),!1);var c=i.element;return c.className=r+" ol-unselectable ol-control",c.appendChild(l),i.callResetNorth_=n.resetNorth?n.resetNorth:void 0,i.duration_=void 0!==n.duration?n.duration:250,i.autoHide_=void 0===n.autoHide||n.autoHide,i.rotation_=void 0,i.autoHide_&&i.element.classList.add("ol-hidden"),i}return rZ(e,t),e.prototype.handleClick_=function(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()},e.prototype.resetNorth_=function(){var t=this.getMap().getView();if(t){var e=t.getRotation();void 0!==e&&(this.duration_>0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:XC}):t.setRotation(0))}},e.prototype.render=function(t){var e=t.frameState;if(e){var i=e.viewState.rotation;if(i!=this.rotation_){var n="rotate("+i+"rad)";if(this.autoHide_){var r=this.element.classList.contains("ol-hidden");r||0!==i?r&&0!==i&&this.element.classList.remove("ol-hidden"):this.element.classList.add("ol-hidden")}this.label_.style.transform=n}this.rotation_=i}},e}(eZ),oZ=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),aZ=function(t){function e(e){var i=this,n=e||{};i=t.call(this,{element:document.createElement("div"),target:n.target})||this;var r=void 0!==n.className?n.className:"ol-zoom",s=void 0!==n.delta?n.delta:1,o=void 0!==n.zoomInClassName?n.zoomInClassName:r+"-in",a=void 0!==n.zoomOutClassName?n.zoomOutClassName:r+"-out",l=void 0!==n.zoomInLabel?n.zoomInLabel:"+",c=void 0!==n.zoomOutLabel?n.zoomOutLabel:"\u2212",h=void 0!==n.zoomInTipLabel?n.zoomInTipLabel:"Zoom in",u=void 0!==n.zoomOutTipLabel?n.zoomOutTipLabel:"Zoom out",d=document.createElement("button");d.className=o,d.setAttribute("type","button"),d.title=h,d.appendChild("string"==typeof l?document.createTextNode(l):l),d.addEventListener("click",i.handleClick_.bind(i,s),!1);var p=document.createElement("button");p.className=a,p.setAttribute("type","button"),p.title=u,p.appendChild("string"==typeof c?document.createTextNode(c):c),p.addEventListener("click",i.handleClick_.bind(i,-s),!1);var f=i.element;return f.className=r+" ol-unselectable ol-control",f.appendChild(d),f.appendChild(p),i.duration_=void 0!==n.duration?n.duration:250,i}return oZ(e,t),e.prototype.handleClick_=function(t,e){e.preventDefault(),this.zoomByDelta_(t)},e.prototype.zoomByDelta_=function(t){var e=this.getMap().getView();if(e){var i=e.getZoom();if(void 0!==i){var n=e.getConstrainedZoom(i+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:n,duration:this.duration_,easing:XC})):e.setZoom(n)}}},e}(eZ),lZ=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),cZ=function(t){function e(e){return(e=zC({},e)).controls||(e.controls=function(t){var e={},i=new j$;return(void 0===e.zoom||e.zoom)&&i.push(new aZ(e.zoomOptions)),(void 0===e.rotate||e.rotate)&&i.push(new sZ(e.rotateOptions)),(void 0===e.attribution||e.attribution)&&i.push(new nZ(e.attributionOptions)),i}()),e.interactions||(e.interactions=MG({onFocusOnly:!0})),t.call(this,e)||this}return lZ(e,t),e.prototype.createRenderer=function(){return new IW(this)},e}(JW);class hZ{constructor(t){Object.assign(this,t)}static fromOLView(t){return new hZ({zoom:t.getZoom(),center:t.getProperties().center,extent:t.calculateExtent(),resolution:t.getResolution(),minResolution:t.getMinResolution(),maxResolution:t.getMaxResolution(),projection:t.getProjection(),viewportSize:t.viewportSize_})}toURL(){const t=oE(this.center);return`@${t[1].toFixed(7)},${t[0].toFixed(7)},${this.zoom}z`}toLocateEvent(){return new dI({center:this.center,zoom:this.zoom})}}const uZ=["root"],dZ=["*"];let pZ=(()=>{class t extends LT{constructor(t,e,i,n,r,s){super(),this.ngZone=t,this.changeDetectionRef=e,this.mapService=i,this.mapConfigService=n,this.mapStateService=r,this.workerService=s,this.horizontalCenterShiftPixels=0,this.cursor="default",this.viewChange$=new _e.a,this.animatingMinimumZoom=!1}ngOnInit(){this.changeDetectionRef.detach(),this.mapService.init(),this.mapService.locateEvents$.pipe(Rv(),fI(0)).subscribe(t=>{this.ngZone.runOutsideAngular(()=>{if(!function(){const t=document.createElement("canvas");for(const e of fZ)try{const i=t.getContext(e);if(i)return i.getExtension("WEBGL_lose_context").loseContext(),!0}catch($nt){}return!1}())throw new Error("Impossible de r\xe9cup\xe9rer le contexte WebGL. Veuillez rafraichir l'onglet ou fermer puis r\xe9ouvrir votre navigateur.");this.createMap(t.center,t.zoom)})}),this.subscriptions.push(this.workerService.applicationHealth$.pipe(Object(Ge.a)(t=>!!(null==t?void 0:t.maintenance)),mn(),Gg(1)).subscribe(t=>{this.map.updateSize()}))}ngOnDestroy(){super.ngOnDestroy(),this.mapService.destroy()}createMap(t,e){let i=1;this.mapStateService.minimumZoom$.pipe(Rv()).subscribe(t=>{i=t});const n=new QW({minZoom:i,maxZoom:21,smoothResolutionConstraint:!1}),r=this.computeRealCenter(new dI({center:t,zoom:e}),n);n.setCenter(r.center),n.setZoom(r.zoom);const s=new dW;this.map=new cZ({target:this.rootElement.nativeElement,view:n,layers:[s],controls:[],interactions:MG({keyboard:!1,doubleClickZoom:!1,pinchRotate:!1,shiftDragZoom:!1})}),n.on("change",()=>this.viewChange$.next()),n.on("change:resolution",()=>this.viewChange$.next()),this.map.on("pointerdrag",()=>this.viewChange$.next()),this.subscriptions.push(en(this.map,"pointermove").pipe(wm(16,Le,{leading:!1,trailing:!0})).subscribe(t=>{t.dragging?"grabbing"!==this.cursor&&(this.cursor=this.map.getTargetElement().style.cursor="move"):(this.mapService.emitPointerMoveEvent(t),this.map.hasFeatureAtPixel(this.map.getEventPixel(t.originalEvent),{hitTolerance:3,layerFilter:t=>t.selectable})?"pointer"!==this.cursor&&(this.cursor=this.map.getTargetElement().style.cursor="pointer"):"default"!==this.cursor&&(this.cursor=this.map.getTargetElement().style.cursor="default"))})),this.subscriptions.push(en(this.map.getTargetElement(),"mouseup").subscribe(()=>{"default"!==this.cursor&&(this.cursor=this.map.getTargetElement().style.cursor="default")})),this.subscriptions.push(this.mapService.locateEvents$.subscribe(t=>{n.cancelAnimations(),n.animate(this.computeRealCenter(t,n))})),this.subscriptions.push(this.mapService.fitEvents$.subscribe(t=>{n.cancelAnimations(),n.fit(t.polygon,{duration:t.duration,padding:[100,100,100,100+this.horizontalCenterShiftPixels]})})),this.subscriptions.push(this.mapService.zoomEvents$.subscribe(t=>{const e=n.getConstrainedResolution(n.getResolutionForZoom(n.getZoom()+t));n.cancelAnimations();const i=n.getCenter();n.animate({resolution:e,center:[i[0]+this.horizontalCenterShiftPixels/2*(t>0?1:-.5)*e,i[1]],duration:250,easing:XC})})),this.subscriptions.push(this.mapConfigService.preloadMapTiles$.subscribe(t=>{s.setPreload(t?1/0:0)}),this.mapConfigService.baseLayer$.subscribe(t=>{s.setSource(t.source)})),this.subscriptions.push(this.mapStateService.minimumZoom$.pipe(Gg(1),Be(60)).subscribe(t=>{t!==n.getMinZoom()&&(n.getZoom()<t?(this.animatingMinimumZoom=!0,n.cancelAnimations(),n.animate({zoom:t,duration:250,easing:XC}),setTimeout(()=>{n.setMinZoom(t),this.animatingMinimumZoom=!1,this.viewChange$.next()},250)):n.setMinZoom(t))})),this.subscriptions.push(this.viewChange$.pipe(He(()=>!this.animatingMinimumZoom),wm(50,Le,{leading:!1,trailing:!0})).subscribe(()=>{this.mapService.updateViewState(hZ.fromOLView(this.map.getView()))}));const o=AT(10).subscribe(()=>{this.map.isRendered()?(this.viewChange$.next(),o.unsubscribe()):this.map.updateSize()});fD.a.production||(window.map=this.map)}onWindowResize(){this.map&&this.viewChange$.next()}computeRealCenter(t,e){const i=t.zoom?e.getResolutionForZoom(t.zoom):e.getResolution();return t.center[0]-=this.horizontalCenterShiftPixels/2*i,t}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.B),r.Pb(r.h),r.Pb(pI),r.Pb(hI),r.Pb(gT),r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-map"]],viewQuery:function(t,e){if(1&t&&r.Pc(uZ,3),2&t){let t;r.vc(t=r.dc())&&(e.rootElement=t.first)}},hostBindings:function(t,e){1&t&&r.cc("resize",function(){return e.onWindowResize()},!1,r.zc)},inputs:{horizontalCenterShiftPixels:"horizontalCenterShiftPixels"},exportAs:["map"],features:[r.Ab],ngContentSelectors:dZ,decls:3,vars:0,consts:[[1,"map"],["root",""]],template:function(t,e){1&t&&(r.mc(),r.Vb(0,"div",0,1),r.lc(2),r.Ub())},styles:[".map[_ngcontent-%COMP%]{width:100%;height:100%;position:absolute;overflow:hidden}"],changeDetection:0}),t})();const fZ=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function mZ(t,e){if(1&t&&(r.Vb(0,"div",10),r.Vb(1,"mat-icon",11),r.Kc(2,"access_time"),r.Ub(),r.Vb(3,"div",12),r.hc(4,"timeago"),r.Kc(5),r.hc(6,"date"),r.Ub(),r.Ub()),2&t){const t=r.gc();r.Db(3),r.oc("title",r.ic(4,2,1e3*t.aircraft.timestamp)),r.Db(2),r.Mc(" ",r.kc(6,4,1e3*t.aircraft.timestamp,"yyyy-MM-dd HH:mm:ss z",t.useUTCDates&&"z")," ")}}let gZ=(()=>{class t extends LT{constructor(t,e){super(),this.changeDetectorRef=t,this.mapConfigService=e,this.showTimestamp=!1,this.useUTCDates=!1}ngOnInit(){this.ensureMandatoryInputParams("aircraft"),this.subscriptions.push(this.mapConfigService.useUTCDates$.subscribe(t=>{this.useUTCDates=t,this.changeDetectorRef.markForCheck()}))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-aircraft-item-small"]],inputs:{aircraft:"aircraft",showTimestamp:"showTimestamp"},features:[r.Ab],decls:23,vars:8,consts:[[1,"aircraft-item"],[1,"aircraft-item__col1"],[1,"u-flex","d-flex-center"],[1,"aircraft-item__flag",3,"flag"],[1,"d-flex-column"],[1,"aircraft-item__name"],[1,"aircraft-item__type"],["class","aircraft-item__timestamp","title","Derni\xe8re r\xe9ception",4,"ngIf"],[1,"aircraft-item__col2"],[1,"aircraft-item__label"],["title","Derni\xe8re r\xe9ception",1,"aircraft-item__timestamp"],[1,"mini-icon","mr-1"],[3,"title"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"div",2),r.Qb(3,"app-flag",3),r.Vb(4,"div",4),r.Vb(5,"strong",5),r.Kc(6),r.Ub(),r.Vb(7,"small",6),r.Kc(8),r.Ub(),r.Ub(),r.Ub(),r.Ic(9,mZ,7,8,"div",7),r.Ub(),r.Vb(10,"div",8),r.Vb(11,"div"),r.Vb(12,"span",9),r.Kc(13,"ICAO"),r.Ub(),r.Kc(14),r.Ub(),r.Vb(15,"div"),r.Vb(16,"span",9),r.Kc(17,"Reg"),r.Ub(),r.Kc(18),r.Ub(),r.Vb(19,"div"),r.Vb(20,"span",9),r.Kc(21,"Callsign"),r.Ub(),r.Kc(22),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(3),r.nc("flag",e.aircraft.country.flag),r.Db(3),r.Nc("",e.aircraft.callsign||"?"," / ",e.aircraft.icao,""),r.Db(2),r.Lc(e.aircraft.type||"?"),r.Db(1),r.nc("ngIf",e.showTimestamp),r.Db(5),r.Mc(" ",e.aircraft.icao,""),r.Db(4),r.Mc(" ",e.aircraft.registration||"?",""),r.Db(4),r.Mc(" ",e.aircraft.callsign||"?",""))},directives:[GF,ut,Yp],pipes:[Tx,kt],styles:["[_nghost-%COMP%]{flex:1;display:block;position:relative}.aircraft-item[_ngcontent-%COMP%]{font-size:12px;line-height:16px;display:flex}.aircraft-item__col1[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column}.aircraft-item__col2[_ngcontent-%COMP%]{display:flex;flex-direction:column;text-align:right}.aircraft-item__flag[_ngcontent-%COMP%]{margin-right:4px}.aircraft-item__name[_ngcontent-%COMP%]{font-size:14px}.aircraft-item__type[_ngcontent-%COMP%]{line-height:1em;font-size:11px}.aircraft-item__timestamp[_ngcontent-%COMP%]{margin-top:4px;display:flex;align-items:center;color:grey}.aircraft-item__timestamp[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%]{font-size:1em;height:1em;width:1em;margin-right:.3em;margin-left:.3em}.aircraft-item__label[_ngcontent-%COMP%]{color:grey;font-size:10px}"],changeDetection:0}),t})();function AZ(t,e){1&t&&(r.Vb(0,"div",9),r.Kc(1," Chargement en cours... "),r.Ub())}function bZ(t,e){if(1&t&&(r.Vb(0,"div",10),r.Kc(1),r.Ub()),2&t){const t=r.gc(2);r.Db(1),r.Mc(" ",t.entitySelection.error," ")}}function vZ(t,e){if(1&t&&(r.Ic(0,AZ,2,0,"div",7),r.Ic(1,bZ,2,1,"div",8)),2&t){const t=r.gc();r.nc("ngIf",!t.entitySelection.error),r.Db(1),r.nc("ngIf",t.entitySelection.error)}}function _Z(t,e){if(1&t&&r.Qb(0,"app-ship-item-small",13),2&t){const t=r.gc(2);r.nc("ship",t.entitySelection.entity)("showTimestamp",!0)}}function yZ(t,e){if(1&t&&r.Qb(0,"app-aircraft-item-small",14),2&t){const t=r.gc(2);r.nc("aircraft",t.entitySelection.entity)("showTimestamp",!0)}}function wZ(t,e){if(1&t&&(r.Ic(0,_Z,1,2,"app-ship-item-small",11),r.Ic(1,yZ,1,2,"app-aircraft-item-small",12)),2&t){const t=r.gc();r.nc("ngIf",t.entitySelection.type===t.EntityType.Ship),r.Db(1),r.nc("ngIf",t.entitySelection.type===t.EntityType.Aircraft)}}const xZ=function(t,e){return[t,e]};let CZ=(()=>{class t extends LT{constructor(t,e){super(),this.mapService=t,this.selectionService=e,this.EntityType=OP,this.hasPosition=!0}ngOnChanges(t){var e,i,n,r;t.entitySelection&&(this.hasPosition=FD(null===(i=null===(e=t.entitySelection.currentValue)||void 0===e?void 0:e.entity)||void 0===i?void 0:i.lon)&&FD(null===(r=null===(n=t.entitySelection.currentValue)||void 0===n?void 0:n.entity)||void 0===r?void 0:r.lat))}locate(){this.mapService.pingLocation([this.entitySelection.entity.lon,this.entitySelection.entity.lat]),this.mapService.centerOnLonLat([this.entitySelection.entity.lon,this.entitySelection.entity.lat])}locateAndZoom(){this.mapService.locate([this.entitySelection.entity.lon,this.entitySelection.entity.lat])}removeSelection(){return Object(ue.a)(this,void 0,void 0,function*(){yield this.selectionService.toggleSelection(this.entitySelection.type,this.entitySelection.id)})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(pI),r.Pb(xT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-entity-selection"]],inputs:{entitySelection:"entitySelection"},features:[r.Ab,r.Bb],decls:15,vars:9,consts:[[1,"entity-selection","mat-elevation-z8"],[1,"entity-selection__background-icon"],[3,"ngIf"],[1,"d-flex"],["mat-button","",1,"entity-selection__action",3,"title","disabled","click","dblclick"],["mat-button","","title","Ouvrir la fiche d\xe9taill\xe9e",1,"entity-selection__action",3,"routerLink"],["mat-button","","title","Supprimer de la s\xe9lection",1,"entity-selection__action",3,"click"],["class","pa-3 u-relative u-flex",4,"ngIf"],["class","pa-1 u-relative u-flex error-message mat-small",4,"ngIf"],[1,"pa-3","u-relative","u-flex"],[1,"pa-1","u-relative","u-flex","error-message","mat-small"],["class","pa-1",3,"ship","showTimestamp",4,"ngIf"],["class","pa-1",3,"aircraft","showTimestamp",4,"ngIf"],[1,"pa-1",3,"ship","showTimestamp"],[1,"pa-1",3,"aircraft","showTimestamp"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"mat-icon",1),r.Kc(2),r.Ub(),r.Ic(3,vZ,2,2,"ng-template",2),r.Ic(4,wZ,2,2,"ng-template",2),r.Vb(5,"div",3),r.Vb(6,"button",4),r.cc("click",function(){return e.locate()})("dblclick",function(){return e.locateAndZoom()}),r.Vb(7,"mat-icon"),r.Kc(8,"center_focus_strong"),r.Ub(),r.Ub(),r.Vb(9,"button",5),r.Vb(10,"mat-icon"),r.Kc(11,"info"),r.Ub(),r.Ub(),r.Vb(12,"button",6),r.cc("click",function(){return e.removeSelection()}),r.Vb(13,"mat-icon"),r.Kc(14,"close"),r.Ub(),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(2),r.Lc(e.entitySelection.type===e.EntityType.Ship?"directions_boat":"flight"),r.Db(1),r.nc("ngIf",!e.entitySelection.entity),r.Db(1),r.nc("ngIf",e.entitySelection.entity),r.Db(2),r.nc("title",e.hasPosition?"Centrer la vue (double-clic = zoom)":"Ce navire n'a pas de position")("disabled",!e.entitySelection.entity||!e.hasPosition),r.Db(3),r.nc("routerLink",r.tc(6,xZ,e.entitySelection.type+"s",e.entitySelection.id)))},directives:[Yp,ut,Dl,ow,Lz,gZ],styles:["[_nghost-%COMP%]{display:block}.entity-selection[_ngcontent-%COMP%], [_nghost-%COMP%]{position:relative;overflow:hidden}.entity-selection[_ngcontent-%COMP%]{background-color:#f7f7f7;width:292px;min-height:93px;margin-bottom:8px;display:flex;flex-direction:column;pointer-events:all}.entity-selection__background-icon[_ngcontent-%COMP%]{position:absolute;font-size:136px;left:-64px;color:#ededed;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.entity-selection__action[_ngcontent-%COMP%]{flex:1;min-width:inherit;padding:inherit}"],changeDetection:0}),t})();var SZ=i("JaUx"),kZ=i.n(SZ),EZ=function(){function t(t){this.rbush_=new kZ.a(t),this.items_={}}return t.prototype.insert=function(t,e){var i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(i),this.items_[YC(e)]=i},t.prototype.load=function(t,e){for(var i=new Array(e.length),n=0,r=e.length;n<r;n++){var s=t[n],o=e[n],a={minX:s[0],minY:s[1],maxX:s[2],maxY:s[3],value:o};i[n]=a,this.items_[YC(o)]=a}this.rbush_.load(i)},t.prototype.remove=function(t){var e=YC(t),i=this.items_[e];return delete this.items_[e],null!==this.rbush_.remove(i)},t.prototype.update=function(t,e){var i=this.items_[YC(e)];RS([i.minX,i.minY,i.maxX,i.maxY],t)||(this.remove(e),this.insert(t,e))},t.prototype.getAll=function(){return this.rbush_.all().map(function(t){return t.value})},t.prototype.getInExtent=function(t){return this.rbush_.search({minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}).map(function(t){return t.value})},t.prototype.forEach=function(t){return this.forEach_(this.getAll(),t)},t.prototype.forEachInExtent=function(t,e){return this.forEach_(this.getInExtent(t),e)},t.prototype.forEach_=function(t,e){for(var i,n=0,r=t.length;n<r;n++)if(i=e(t[n]))return i;return i},t.prototype.isEmpty=function(){return $C(this.items_)},t.prototype.clear=function(){this.rbush_.clear(),this.items_={}},t.prototype.getExtent=function(t){var e=this.rbush_.toJSON();return PS(e.minX,e.minY,e.maxX,e.maxY,t)},t.prototype.concat=function(t){for(var e in this.rbush_.load(t.rbush_.all()),t.items_)this.items_[e]=t.items_[e]},t}(),DZ=function(){function t(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=ZE(t.scale),this.displacement_=t.displacement}return t.prototype.clone=function(){var e=this.getScale();return new t({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()})},t.prototype.getOpacity=function(){return this.opacity_},t.prototype.getRotateWithView=function(){return this.rotateWithView_},t.prototype.getRotation=function(){return this.rotation_},t.prototype.getScale=function(){return this.scale_},t.prototype.getScaleArray=function(){return this.scaleArray_},t.prototype.getDisplacement=function(){return this.displacement_},t.prototype.getAnchor=function(){return ZC()},t.prototype.getImage=function(t){return ZC()},t.prototype.getHitDetectionImage=function(){return ZC()},t.prototype.getPixelRatio=function(t){return 1},t.prototype.getImageState=function(){return ZC()},t.prototype.getImageSize=function(){return ZC()},t.prototype.getHitDetectionImageSize=function(){return ZC()},t.prototype.getOrigin=function(){return ZC()},t.prototype.getSize=function(){return ZC()},t.prototype.setOpacity=function(t){this.opacity_=t},t.prototype.setRotateWithView=function(t){this.rotateWithView_=t},t.prototype.setRotation=function(t){this.rotation_=t},t.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=ZE(t)},t.prototype.listenImageChange=function(t){ZC()},t.prototype.load=function(){ZC()},t.prototype.unlistenImageChange=function(t){ZC()},t}();function IZ(t){return Array.isArray(t)?wW(t):t}var PZ=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),OZ=function(t){function e(e){var i=this;return(i=t.call(this,{opacity:1,rotateWithView:void 0!==e.rotateWithView&&e.rotateWithView,rotation:void 0!==e.rotation?e.rotation:0,scale:void 0!==e.scale?e.scale:1,displacement:void 0!==e.displacement?e.displacement:[0,0]})||this).canvas_={},i.hitDetectionCanvas_=null,i.fill_=void 0!==e.fill?e.fill:null,i.origin_=[0,0],i.points_=e.points,i.radius_=void 0!==e.radius?e.radius:e.radius1,i.radius2_=e.radius2,i.angle_=void 0!==e.angle?e.angle:0,i.stroke_=void 0!==e.stroke?e.stroke:null,i.anchor_=null,i.size_=null,i.imageSize_=null,i.hitDetectionImageSize_=null,i.render(),i}return PZ(e,t),e.prototype.clone=function(){var t=this.getScale(),i=new e({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice()});return i.setOpacity(this.getOpacity()),i},e.prototype.getAnchor=function(){return this.anchor_},e.prototype.getAngle=function(){return this.angle_},e.prototype.getFill=function(){return this.fill_},e.prototype.getHitDetectionImage=function(){if(!this.hitDetectionCanvas_){var t=this.createRenderOptions();this.createHitDetectionCanvas_(t)}return this.hitDetectionCanvas_},e.prototype.getImage=function(t){if(!this.canvas_[t||1]){var e=this.createRenderOptions(),i=uS(e.size*t||1,e.size*t||1);this.draw_(e,i,0,0,t||1),this.canvas_[t||1]=i.canvas}return this.canvas_[t||1]},e.prototype.getPixelRatio=function(t){return t},e.prototype.getImageSize=function(){return this.imageSize_},e.prototype.getHitDetectionImageSize=function(){return this.hitDetectionImageSize_},e.prototype.getImageState=function(){return 2},e.prototype.getOrigin=function(){return this.origin_},e.prototype.getPoints=function(){return this.points_},e.prototype.getRadius=function(){return this.radius_},e.prototype.getRadius2=function(){return this.radius2_},e.prototype.getSize=function(){return this.size_},e.prototype.getStroke=function(){return this.stroke_},e.prototype.listenImageChange=function(t){},e.prototype.load=function(){},e.prototype.unlistenImageChange=function(t){},e.prototype.createRenderOptions=function(){var t,e="round",i="round",n=0,r=null,s=0,o=0;return this.stroke_&&(null===(t=this.stroke_.getColor())&&(t="#000"),t=IZ(t),void 0===(o=this.stroke_.getWidth())&&(o=1),r=this.stroke_.getLineDash(),s=this.stroke_.getLineDashOffset(),void 0===(i=this.stroke_.getLineJoin())&&(i="round"),void 0===(e=this.stroke_.getLineCap())&&(e="round"),void 0===(n=this.stroke_.getMiterLimit())&&(n=10)),{strokeStyle:t,strokeWidth:o,size:2*(this.radius_+o)+1,lineCap:e,lineDash:r,lineDashOffset:s,lineJoin:i,miterLimit:n}},e.prototype.render=function(){var t=this.createRenderOptions(),e=uS(t.size,t.size);this.draw_(t,e,0,0,1),this.canvas_={},this.canvas_[1]=e.canvas;var i=e.canvas.width,n=i,r=this.getDisplacement();this.hitDetectionImageSize_=[t.size,t.size],this.createHitDetectionCanvas_(t),this.anchor_=[i/2-r[0],i/2+r[1]],this.size_=[i,i],this.imageSize_=[n,n]},e.prototype.draw_=function(t,e,i,n,r){var s,o,a;e.setTransform(r,0,0,r,0,0),e.translate(i,n),e.beginPath();var l=this.points_;if(l===1/0)e.arc(t.size/2,t.size/2,this.radius_,0,2*Math.PI,!0);else{var c=void 0!==this.radius2_?this.radius2_:this.radius_;for(c!==this.radius_&&(l*=2),s=0;s<=l;s++)o=2*s*Math.PI/l-Math.PI/2+this.angle_,e.lineTo(t.size/2+(a=s%2==0?this.radius_:c)*Math.cos(o),t.size/2+a*Math.sin(o))}if(this.fill_){var h=this.fill_.getColor();null===h&&(h="#000"),e.fillStyle=IZ(h),e.fill()}this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,e.setLineDash&&t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineCap=t.lineCap,e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke()),e.closePath()},e.prototype.createHitDetectionCanvas_=function(t){if(this.hitDetectionCanvas_=this.getImage(1),this.fill_){var e=this.fill_.getColor(),i=0;if("string"==typeof e&&(e=_W(e)),null===e?i=1:Array.isArray(e)&&(i=4===e.length?e[3]:1),0===i){var n=uS(t.size,t.size);this.hitDetectionCanvas_=n.canvas,this.drawHitDetectionCanvas_(t,n,0,0)}}},e.prototype.drawHitDetectionCanvas_=function(t,e,i,n){e.translate(i,n),e.beginPath();var r=this.points_;if(r===1/0)e.arc(t.size/2,t.size/2,this.radius_,0,2*Math.PI,!0);else{var s=void 0!==this.radius2_?this.radius2_:this.radius_;s!==this.radius_&&(r*=2);var o=void 0,a=void 0,l=void 0;for(o=0;o<=r;o++)l=2*o*Math.PI/r-Math.PI/2+this.angle_,e.lineTo(t.size/2+(a=o%2==0?this.radius_:s)*Math.cos(l),t.size/2+a*Math.sin(l))}e.fillStyle="#000",e.fill(),this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.stroke()),e.closePath()},e}(DZ),MZ=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),TZ=function(t){function e(e){var i=e||{};return t.call(this,{points:1/0,fill:i.fill,radius:i.radius,stroke:i.stroke,scale:void 0!==i.scale?i.scale:1,rotation:void 0!==i.rotation?i.rotation:0,rotateWithView:void 0!==i.rotateWithView&&i.rotateWithView,displacement:void 0!==i.displacement?i.displacement:[0,0]})||this}return MZ(e,t),e.prototype.clone=function(){var t=this.getScale(),i=new e({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()});return i.setOpacity(this.getOpacity()),i},e.prototype.setRadius=function(t){this.radius_=t,this.render()},e}(OZ),RZ=function(){function t(t){var e=t||{};this.color_=void 0!==e.color?e.color:null}return t.prototype.clone=function(){var e=this.getColor();return new t({color:Array.isArray(e)?e.slice():e||void 0})},t.prototype.getColor=function(){return this.color_},t.prototype.setColor=function(t){this.color_=t},t}(),VZ=function(){function t(t){var e=t||{};this.color_=void 0!==e.color?e.color:null,this.lineCap_=e.lineCap,this.lineDash_=void 0!==e.lineDash?e.lineDash:null,this.lineDashOffset_=e.lineDashOffset,this.lineJoin_=e.lineJoin,this.miterLimit_=e.miterLimit,this.width_=e.width}return t.prototype.clone=function(){var e=this.getColor();return new t({color:Array.isArray(e)?e.slice():e||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})},t.prototype.getColor=function(){return this.color_},t.prototype.getLineCap=function(){return this.lineCap_},t.prototype.getLineDash=function(){return this.lineDash_},t.prototype.getLineDashOffset=function(){return this.lineDashOffset_},t.prototype.getLineJoin=function(){return this.lineJoin_},t.prototype.getMiterLimit=function(){return this.miterLimit_},t.prototype.getWidth=function(){return this.width_},t.prototype.setColor=function(t){this.color_=t},t.prototype.setLineCap=function(t){this.lineCap_=t},t.prototype.setLineDash=function(t){this.lineDash_=t},t.prototype.setLineDashOffset=function(t){this.lineDashOffset_=t},t.prototype.setLineJoin=function(t){this.lineJoin_=t},t.prototype.setMiterLimit=function(t){this.miterLimit_=t},t.prototype.setWidth=function(t){this.width_=t},t}(),FZ=function(){function t(t){var e=t||{};this.geometry_=null,this.geometryFunction_=NZ,void 0!==e.geometry&&this.setGeometry(e.geometry),this.fill_=void 0!==e.fill?e.fill:null,this.image_=void 0!==e.image?e.image:null,this.renderer_=void 0!==e.renderer?e.renderer:null,this.stroke_=void 0!==e.stroke?e.stroke:null,this.text_=void 0!==e.text?e.text:null,this.zIndex_=e.zIndex}return t.prototype.clone=function(){var e=this.getGeometry();return e&&"object"==typeof e&&(e=e.clone()),new t({geometry:e,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},t.prototype.getRenderer=function(){return this.renderer_},t.prototype.setRenderer=function(t){this.renderer_=t},t.prototype.getGeometry=function(){return this.geometry_},t.prototype.getGeometryFunction=function(){return this.geometryFunction_},t.prototype.getFill=function(){return this.fill_},t.prototype.setFill=function(t){this.fill_=t},t.prototype.getImage=function(){return this.image_},t.prototype.setImage=function(t){this.image_=t},t.prototype.getStroke=function(){return this.stroke_},t.prototype.setStroke=function(t){this.stroke_=t},t.prototype.getText=function(){return this.text_},t.prototype.setText=function(t){this.text_=t},t.prototype.getZIndex=function(){return this.zIndex_},t.prototype.setGeometry=function(t){"function"==typeof t?this.geometryFunction_=t:"string"==typeof t?this.geometryFunction_=function(e){return e.get(t)}:t?void 0!==t&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=NZ,this.geometry_=t},t.prototype.setZIndex=function(t){this.zIndex_=t},t}(),LZ=null;function UZ(t,e){if(!LZ){var i=new RZ({color:"rgba(255,255,255,0.4)"}),n=new VZ({color:"#3399CC",width:1.25});LZ=[new FZ({image:new TZ({fill:i,stroke:n,radius:5}),fill:i,stroke:n})]}return LZ}function BZ(){var t={},e=[255,255,255,1],i=[0,153,255,1];return t.Polygon=[new FZ({fill:new RZ({color:[255,255,255,.5]})})],t.MultiPolygon=t.Polygon,t.LineString=[new FZ({stroke:new VZ({color:e,width:5})}),new FZ({stroke:new VZ({color:i,width:3})})],t.MultiLineString=t.LineString,t.Circle=t.Polygon.concat(t.LineString),t.Point=[new FZ({image:new TZ({radius:6,fill:new RZ({color:i}),stroke:new VZ({color:e,width:1.5})}),zIndex:1/0})],t.MultiPoint=t.Point,t.GeometryCollection=t.Polygon.concat(t.LineString,t.Point),t}function NZ(t){return t.getGeometry()}var jZ=FZ,zZ=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),HZ=function(t){function e(e){var i=this,n=e||{},r=zC({},n);return delete r.style,delete r.renderBuffer,delete r.updateWhileAnimating,delete r.updateWhileInteracting,(i=t.call(this,r)||this).declutter_=void 0!==n.declutter&&n.declutter,i.renderBuffer_=void 0!==n.renderBuffer?n.renderBuffer:100,i.style_=null,i.styleFunction_=void 0,i.setStyle(n.style),i.updateWhileAnimating_=void 0!==n.updateWhileAnimating&&n.updateWhileAnimating,i.updateWhileInteracting_=void 0!==n.updateWhileInteracting&&n.updateWhileInteracting,i}return zZ(e,t),e.prototype.getDeclutter=function(){return this.declutter_},e.prototype.getFeatures=function(e){return t.prototype.getFeatures.call(this,e)},e.prototype.getRenderBuffer=function(){return this.renderBuffer_},e.prototype.getRenderOrder=function(){return this.get("renderOrder")},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.getUpdateWhileAnimating=function(){return this.updateWhileAnimating_},e.prototype.getUpdateWhileInteracting=function(){return this.updateWhileInteracting_},e.prototype.renderDeclutter=function(t){t.declutterTree||(t.declutterTree=new kZ.a(9)),this.getRenderer().renderDeclutter(t)},e.prototype.setRenderOrder=function(t){this.set("renderOrder",t)},e.prototype.setStyle=function(t){var e,i,n;this.style_=void 0!==t?t:UZ,this.styleFunction_=null===t?void 0:("function"==typeof(e=this.style_)?i=e:(Array.isArray(e)?n=e:(yS("function"==typeof e.getZIndex,41),n=[e]),i=function(){return n}),i),this.changed()},e}(LG),KZ={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},$Z=[KZ.FILL],GZ=[KZ.STROKE],WZ=[KZ.BEGIN_PATH],ZZ=[KZ.CLOSE_PATH],qZ=KZ,YZ=function(){function t(){}return t.prototype.drawCustom=function(t,e,i){},t.prototype.drawGeometry=function(t){},t.prototype.setStyle=function(t){},t.prototype.drawCircle=function(t,e){},t.prototype.drawFeature=function(t,e){},t.prototype.drawGeometryCollection=function(t,e){},t.prototype.drawLineString=function(t,e){},t.prototype.drawMultiLineString=function(t,e){},t.prototype.drawMultiPoint=function(t,e){},t.prototype.drawMultiPolygon=function(t,e){},t.prototype.drawPoint=function(t,e){},t.prototype.drawPolygon=function(t,e){},t.prototype.drawText=function(t,e){},t.prototype.setFillStrokeStyle=function(t,e){},t.prototype.setImageStyle=function(t,e){},t.prototype.setTextStyle=function(t,e){},t}(),QZ=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),XZ=function(t){function e(e,i,n,r){var s=t.call(this)||this;return s.tolerance=e,s.maxExtent=i,s.pixelRatio=r,s.maxLineWidth=0,s.resolution=n,s.beginGeometryInstruction1_=null,s.beginGeometryInstruction2_=null,s.bufferedMaxExtent_=null,s.instructions=[],s.coordinates=[],s.tmpCoordinate_=[],s.hitDetectionInstructions=[],s.state={},s}return QZ(e,t),e.prototype.applyPixelRatio=function(t){var e=this.pixelRatio;return 1==e?t:t.map(function(t){return t*e})},e.prototype.appendFlatPointCoordinates=function(t,e){for(var i=this.getBufferedMaxExtent(),n=this.tmpCoordinate_,r=this.coordinates,s=r.length,o=0,a=t.length;o<a;o+=e)n[0]=t[o],n[1]=t[o+1],kS(i,n)&&(r[s++]=n[0],r[s++]=n[1]);return s},e.prototype.appendFlatLineCoordinates=function(t,e,i,n,r,s){var o=this.coordinates,a=o.length,l=this.getBufferedMaxExtent();s&&(e+=n);var c,h,u,d=t[e],p=t[e+1],f=this.tmpCoordinate_,m=!0;for(c=e+n;c<i;c+=n)f[0]=t[c],f[1]=t[c+1],(u=IS(l,f))!==h?(m&&(o[a++]=d,o[a++]=p,m=!1),o[a++]=f[0],o[a++]=f[1]):1===u?(o[a++]=f[0],o[a++]=f[1],m=!1):m=!0,d=f[0],p=f[1],h=u;return(r&&m||c===e+n)&&(o[a++]=d,o[a++]=p),a},e.prototype.drawCustomCoordinates_=function(t,e,i,n,r){for(var s=0,o=i.length;s<o;++s){var a=i[s],l=this.appendFlatLineCoordinates(t,e,a,n,!1,!1);r.push(l),e=a}return e},e.prototype.drawCustom=function(t,e,i){this.beginGeometry(t,e);var n,r,s,o,a,l=t.getType(),c=t.getStride(),h=this.coordinates.length;if("MultiPolygon"==l){n=t.getOrientedFlatCoordinates(),o=[];var u=t.getEndss();a=0;for(var d=0,p=u.length;d<p;++d){var f=[];a=this.drawCustomCoordinates_(n,a,u[d],c,f),o.push(f)}this.instructions.push([qZ.CUSTOM,h,o,t,i,VM])}else"Polygon"==l||"MultiLineString"==l?(s=[],n="Polygon"==l?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),a=this.drawCustomCoordinates_(n,0,t.getEnds(),c,s),this.instructions.push([qZ.CUSTOM,h,s,t,i,RM])):"LineString"==l||"Circle"==l?(n=t.getFlatCoordinates(),r=this.appendFlatLineCoordinates(n,0,n.length,c,!1,!1),this.instructions.push([qZ.CUSTOM,h,r,t,i,TM])):"MultiPoint"==l?(n=t.getFlatCoordinates(),(r=this.appendFlatPointCoordinates(n,c))>h&&this.instructions.push([qZ.CUSTOM,h,r,t,i,TM])):"Point"==l&&(n=t.getFlatCoordinates(),this.coordinates.push(n[0],n[1]),this.instructions.push([qZ.CUSTOM,h,r=this.coordinates.length,t,i]));this.endGeometry(e)},e.prototype.beginGeometry=function(t,e){this.beginGeometryInstruction1_=[qZ.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[qZ.BEGIN_GEOMETRY,e,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},e.prototype.finish=function(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}},e.prototype.reverseHitDetectionInstructions=function(){var t,e=this.hitDetectionInstructions;e.reverse();var i,n,r=e.length,s=-1;for(t=0;t<r;++t)(n=(i=e[t])[0])==qZ.END_GEOMETRY?s=t:n==qZ.BEGIN_GEOMETRY&&(i[2]=t,FC(this.hitDetectionInstructions,s,t),s=-1)},e.prototype.setFillStrokeStyle=function(t,e){var i=this.state;if(t){var n=t.getColor();i.fillStyle=IZ(n||"#000")}else i.fillStyle=void 0;if(e){var r=e.getColor();i.strokeStyle=IZ(r||"#000");var s=e.getLineCap();i.lineCap=void 0!==s?s:"round";var o=e.getLineDash();i.lineDash=o?o.slice():WG;var a=e.getLineDashOffset();i.lineDashOffset=a||0;var l=e.getLineJoin();i.lineJoin=void 0!==l?l:"round";var c=e.getWidth();i.lineWidth=void 0!==c?c:1;var h=e.getMiterLimit();i.miterLimit=void 0!==h?h:10,i.lineWidth>this.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0},e.prototype.createFill=function(t){var e=t.fillStyle,i=[qZ.SET_FILL_STYLE,e];return"string"!=typeof e&&i.push(!0),i},e.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},e.prototype.createStroke=function(t){return[qZ.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},e.prototype.updateFillStyle=function(t,e){var i=t.fillStyle;"string"==typeof i&&t.currentFillStyle==i||(void 0!==i&&this.instructions.push(e.call(this,t)),t.currentFillStyle=i)},e.prototype.updateStrokeStyle=function(t,e){var i=t.strokeStyle,n=t.lineCap,r=t.lineDash,s=t.lineDashOffset,o=t.lineJoin,a=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=n||r!=t.currentLineDash&&!UC(t.currentLineDash,r)||t.currentLineDashOffset!=s||t.currentLineJoin!=o||t.currentLineWidth!=a||t.currentMiterLimit!=l)&&(void 0!==i&&e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=n,t.currentLineDash=r,t.currentLineDashOffset=s,t.currentLineJoin=o,t.currentLineWidth=a,t.currentMiterLimit=l)},e.prototype.endGeometry=function(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var e=[qZ.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)},e.prototype.getBufferedMaxExtent=function(){return this.bufferedMaxExtent_||(this.bufferedMaxExtent_=CS(this.maxExtent),this.maxLineWidth>0&&xS(this.bufferedMaxExtent_,this.resolution*(this.maxLineWidth+1)/2,this.bufferedMaxExtent_)),this.bufferedMaxExtent_},e}(YZ),JZ=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),tq=function(t){function e(e,i,n,r){var s=t.call(this,e,i,n,r)||this;return s.hitDetectionImage_=null,s.image_=null,s.imagePixelRatio_=void 0,s.anchorX_=void 0,s.anchorY_=void 0,s.height_=void 0,s.opacity_=void 0,s.originX_=void 0,s.originY_=void 0,s.rotateWithView_=void 0,s.rotation_=void 0,s.scale_=void 0,s.width_=void 0,s.declutterImageWithText_=void 0,s}return JZ(e,t),e.prototype.drawPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var i=t.getFlatCoordinates(),n=t.getStride(),r=this.coordinates.length,s=this.appendFlatPointCoordinates(i,n);this.instructions.push([qZ.DRAW_IMAGE,r,s,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterImageWithText_]),this.hitDetectionInstructions.push([qZ.DRAW_IMAGE,r,s,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterImageWithText_]),this.endGeometry(e)}},e.prototype.drawMultiPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var i=t.getFlatCoordinates(),n=t.getStride(),r=this.coordinates.length,s=this.appendFlatPointCoordinates(i,n);this.instructions.push([qZ.DRAW_IMAGE,r,s,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterImageWithText_]),this.hitDetectionInstructions.push([qZ.DRAW_IMAGE,r,s,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterImageWithText_]),this.endGeometry(e)}},e.prototype.finish=function(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,t.prototype.finish.call(this)},e.prototype.setImageStyle=function(t,e){var i=t.getAnchor(),n=t.getSize(),r=t.getHitDetectionImage(),s=t.getImage(this.pixelRatio),o=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=i[0],this.anchorY_=i[1],this.hitDetectionImage_=r,this.image_=s,this.height_=n[1],this.opacity_=t.getOpacity(),this.originX_=o[0],this.originY_=o[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=n[0],this.declutterImageWithText_=e},e}(XZ),eq=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),iq=function(t){function e(e,i,n,r){return t.call(this,e,i,n,r)||this}return eq(e,t),e.prototype.drawFlatCoordinates_=function(t,e,i,n){var r=this.coordinates.length,s=this.appendFlatLineCoordinates(t,e,i,n,!1,!1),o=[qZ.MOVE_TO_LINE_TO,r,s];return this.instructions.push(o),this.hitDetectionInstructions.push(o),i},e.prototype.drawLineString=function(t,e){var i=this.state;if(void 0!==i.strokeStyle&&void 0!==i.lineWidth){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([qZ.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],WZ);var n=t.getFlatCoordinates(),r=t.getStride();this.drawFlatCoordinates_(n,0,n.length,r),this.hitDetectionInstructions.push(GZ),this.endGeometry(e)}},e.prototype.drawMultiLineString=function(t,e){var i=this.state;if(void 0!==i.strokeStyle&&void 0!==i.lineWidth){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([qZ.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],WZ);for(var n=t.getEnds(),r=t.getFlatCoordinates(),s=t.getStride(),o=0,a=0,l=n.length;a<l;++a)o=this.drawFlatCoordinates_(r,o,n[a],s);this.hitDetectionInstructions.push(GZ),this.endGeometry(e)}},e.prototype.finish=function(){var e=this.state;return null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&this.instructions.push(GZ),this.reverseHitDetectionInstructions(),this.state=null,t.prototype.finish.call(this)},e.prototype.applyStroke=function(e){null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&(this.instructions.push(GZ),e.lastStroke=this.coordinates.length),e.lastStroke=0,t.prototype.applyStroke.call(this,e),this.instructions.push(WZ)},e}(XZ),nq=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),rq=function(t){function e(e,i,n,r){return t.call(this,e,i,n,r)||this}return nq(e,t),e.prototype.drawFlatCoordinatess_=function(t,e,i,n){var r=this.state,s=void 0!==r.fillStyle,o=void 0!==r.strokeStyle,a=i.length;this.instructions.push(WZ),this.hitDetectionInstructions.push(WZ);for(var l=0;l<a;++l){var c=i[l],h=this.coordinates.length,u=this.appendFlatLineCoordinates(t,e,c,n,!0,!o),d=[qZ.MOVE_TO_LINE_TO,h,u];this.instructions.push(d),this.hitDetectionInstructions.push(d),o&&(this.instructions.push(ZZ),this.hitDetectionInstructions.push(ZZ)),e=c}return s&&(this.instructions.push($Z),this.hitDetectionInstructions.push($Z)),o&&(this.instructions.push(GZ),this.hitDetectionInstructions.push(GZ)),e},e.prototype.drawCircle=function(t,e){var i=this.state;if(void 0!==i.fillStyle||void 0!==i.strokeStyle){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([qZ.SET_FILL_STYLE,"#000"]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([qZ.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var n=t.getFlatCoordinates(),r=t.getStride(),s=this.coordinates.length;this.appendFlatLineCoordinates(n,0,n.length,r,!1,!1);var o=[qZ.CIRCLE,s];this.instructions.push(WZ,o),this.hitDetectionInstructions.push(WZ,o),void 0!==i.fillStyle&&(this.instructions.push($Z),this.hitDetectionInstructions.push($Z)),void 0!==i.strokeStyle&&(this.instructions.push(GZ),this.hitDetectionInstructions.push(GZ)),this.endGeometry(e)}},e.prototype.drawPolygon=function(t,e){var i=this.state;if(void 0!==i.fillStyle||void 0!==i.strokeStyle){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([qZ.SET_FILL_STYLE,"#000"]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([qZ.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var n=t.getEnds(),r=t.getOrientedFlatCoordinates(),s=t.getStride();this.drawFlatCoordinatess_(r,0,n,s),this.endGeometry(e)}},e.prototype.drawMultiPolygon=function(t,e){var i=this.state;if(void 0!==i.fillStyle||void 0!==i.strokeStyle){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([qZ.SET_FILL_STYLE,"#000"]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([qZ.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);for(var n=t.getEndss(),r=t.getOrientedFlatCoordinates(),s=t.getStride(),o=0,a=0,l=n.length;a<l;++a)o=this.drawFlatCoordinatess_(r,o,n[a],s);this.endGeometry(e)}},e.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var e=this.tolerance;if(0!==e)for(var i=this.coordinates,n=0,r=i.length;n<r;++n)i[n]=PM(i[n],e);return t.prototype.finish.call(this)},e.prototype.setFillStrokeStyles_=function(){var t=this.state;void 0!==t.fillStyle&&this.updateFillStyle(t,this.createFill),void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)},e}(XZ);function sq(t,e,i,n,r){var s,o,a,l,c,h,u,d,p,f=i,m=i,g=0,A=0,b=i;for(s=i;s<n;s+=r){var v=e[s],_=e[s+1];void 0!==l&&(d=v-l,p=_-c,a=Math.sqrt(d*d+p*p),void 0!==h&&(A+=o,Math.acos((h*d+u*p)/(o*a))>t&&(A>g&&(g=A,f=b,m=s),A=0,b=s-r)),o=a,h=d,u=p),l=v,c=_}return(A+=a)>g?[b,s]:[f,m]}var oq=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),aq={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},lq={Circle:rq,Default:XZ,Image:tq,LineString:iq,Polygon:rq,Text:function(t){function e(e,i,n,r){var s=t.call(this,e,i,n,r)||this;return s.labels_=null,s.text_="",s.textOffsetX_=0,s.textOffsetY_=0,s.textRotateWithView_=void 0,s.textRotation_=0,s.textFillState_=null,s.fillStates={},s.textStrokeState_=null,s.strokeStates={},s.textState_={},s.textStates={},s.textKey_="",s.fillKey_="",s.strokeKey_="",s.declutterImageWithText_=void 0,s}return oq(e,t),e.prototype.finish=function(){var e=t.prototype.finish.call(this);return e.textStates=this.textStates,e.fillStates=this.fillStates,e.strokeStates=this.strokeStates,e},e.prototype.drawText=function(t,e){var i=this.textState_;if(""!==this.text_&&i&&(this.textFillState_||this.textStrokeState_)){var n=this.coordinates,r=n.length,s=t.getType(),o=null,a=t.getStride();if("line"!==i.placement||"LineString"!=s&&"MultiLineString"!=s&&"Polygon"!=s&&"MultiPolygon"!=s){var l=i.overflow?null:[];switch(s){case"Point":case"MultiPoint":o=t.getFlatCoordinates();break;case"LineString":o=t.getFlatMidpoint();break;case"Circle":o=t.getCenter();break;case"MultiLineString":o=t.getFlatMidpoints(),a=2;break;case"Polygon":o=t.getFlatInteriorPoint(),i.overflow||l.push(o[2]/this.resolution),a=3;break;case"MultiPolygon":var c=t.getFlatInteriorPoints();for(o=[],v=0,_=c.length;v<_;v+=3)i.overflow||l.push(c[v+2]/this.resolution),o.push(c[v],c[v+1]);if(0===o.length)return;a=2}if((E=this.appendFlatPointCoordinates(o,a))===r)return;this.saveTextStates_(),(i.backgroundFill||i.backgroundStroke)&&(this.setFillStrokeStyle(i.backgroundFill,i.backgroundStroke),i.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),i.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);var h=i.padding;if(h!=ZG&&(i.scale[0]<0||i.scale[1]<0)){var u=i.padding[0],d=i.padding[1],p=i.padding[2],f=i.padding[3];i.scale[0]<0&&(d=-d,f=-f),i.scale[1]<0&&(u=-u,p=-p),h=[u,d,p,f]}var m=this.pixelRatio;this.instructions.push([qZ.DRAW_IMAGE,r,E,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterImageWithText_,h==ZG?ZG:h.map(function(t){return t*m}),!!i.backgroundFill,!!i.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,l]);var g=1/m;this.hitDetectionInstructions.push([qZ.DRAW_IMAGE,r,E,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[g,g],NaN,this.declutterImageWithText_,h,!!i.backgroundFill,!!i.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,l]),this.endGeometry(e)}else{if(!QS(this.getBufferedMaxExtent(),t.getExtent()))return;var A=void 0;if(o=t.getFlatCoordinates(),"LineString"==s)A=[o.length];else if("MultiLineString"==s)A=t.getEnds();else if("Polygon"==s)A=t.getEnds().slice(0,1);else if("MultiPolygon"==s){var b=t.getEndss();A=[];for(var v=0,_=b.length;v<_;++v)A.push(b[v][0])}this.beginGeometry(t,e);for(var y=i.textAlign,w=0,x=void 0,C=0,S=A.length;C<S;++C){if(null==y){var k=sq(i.maxAngle,o,w,A[C],a);w=k[0],x=k[1]}else x=A[C];for(v=w;v<x;v+=a)n.push(o[v],o[v+1]);var E;w=A[C],this.drawChars_(r,E=n.length),r=E}this.endGeometry(e)}}},e.prototype.saveTextStates_=function(){var t=this.textStrokeState_,e=this.textState_,i=this.textFillState_,n=this.strokeKey_;t&&(n in this.strokeStates||(this.strokeStates[n]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));var r=this.textKey_;r in this.textStates||(this.textStates[r]={font:e.font,textAlign:e.textAlign||"center",textBaseline:e.textBaseline||"middle",scale:e.scale});var s=this.fillKey_;i&&(s in this.fillStates||(this.fillStates[s]={fillStyle:i.fillStyle}))},e.prototype.drawChars_=function(t,e){var i=this.textStrokeState_,n=this.textState_,r=this.strokeKey_,s=this.textKey_,o=this.fillKey_;this.saveTextStates_();var a=this.pixelRatio,l=aq[n.textBaseline],c=this.textOffsetY_*a,h=this.text_,u=i?i.lineWidth*Math.abs(n.scale[0])/2:0;this.instructions.push([qZ.DRAW_CHARS,t,e,l,n.overflow,o,n.maxAngle,a,c,r,u*a,h,s,1]),this.hitDetectionInstructions.push([qZ.DRAW_CHARS,t,e,l,n.overflow,o,n.maxAngle,1,c,r,u,h,s,1/a])},e.prototype.setTextStyle=function(t,e){var i,n,r;if(t){var s=t.getFill();s?((n=this.textFillState_)||(this.textFillState_=n={}),n.fillStyle=IZ(s.getColor()||"#000")):this.textFillState_=n=null;var o=t.getStroke();if(o){(r=this.textStrokeState_)||(this.textStrokeState_=r={});var a=o.getLineDash(),l=o.getLineDashOffset(),c=o.getWidth(),h=o.getMiterLimit();r.lineCap=o.getLineCap()||"round",r.lineDash=a?a.slice():WG,r.lineDashOffset=void 0===l?0:l,r.lineJoin=o.getLineJoin()||"round",r.lineWidth=void 0===c?1:c,r.miterLimit=void 0===h?10:h,r.strokeStyle=IZ(o.getColor()||"#000")}else this.textStrokeState_=r=null;i=this.textState_;var u=t.getFont()||"10px sans-serif";tW(u);var d=t.getScaleArray();i.overflow=t.getOverflow(),i.font=u,i.maxAngle=t.getMaxAngle(),i.placement=t.getPlacement(),i.textAlign=t.getTextAlign(),i.textBaseline=t.getTextBaseline()||"middle",i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||ZG,i.scale=void 0===d?[1,1]:d;var p=t.getOffsetX(),f=t.getOffsetY(),m=t.getRotateWithView(),g=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=void 0===p?0:p,this.textOffsetY_=void 0===f?0:f,this.textRotateWithView_=void 0!==m&&m,this.textRotation_=void 0===g?0:g,this.strokeKey_=r?("string"==typeof r.strokeStyle?r.strokeStyle:YC(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.textBaseline||"?"),this.fillKey_=n?"string"==typeof n.fillStyle?n.fillStyle:"|"+YC(n.fillStyle):""}else this.text_="";this.declutterImageWithText_=e},e}(XZ)},cq=function(){function t(t,e,i,n){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=n,this.resolution_=i,this.buildersByZIndex_={}}return t.prototype.finish=function(){var t={};for(var e in this.buildersByZIndex_){t[e]=t[e]||{};var i=this.buildersByZIndex_[e];for(var n in i){var r=i[n].finish();t[e][n]=r}}return t},t.prototype.getBuilder=function(t,e){var i=void 0!==t?t.toString():"0",n=this.buildersByZIndex_[i];void 0===n&&(this.buildersByZIndex_[i]=n={});var r=n[e];return void 0===r&&(r=new(0,lq[e])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),n[e]=r),r},t}();function hq(t,e,i,n,r,s,o,a,l,c,h,u){var d=t[e],p=t[e+1],f=0,m=0,g=0,A=0;function b(){f=d,m=p,d=t[e+=n],p=t[e+1],A+=g,g=Math.sqrt((d-f)*(d-f)+(p-m)*(p-m))}do{b()}while(e<i-n&&A+g<s);for(var v=(s-A)/g,_=vk(f,d,v),y=vk(m,p,v),w=e-n,x=A,C=s+a*l(c,r,h);e<i-n&&A+g<C;)b();var S,k=vk(f,d,v=(C-A)/g),E=vk(m,p,v);if(u){var D=[_,y,k,E];pM(D,0,4,2,u,D,D),S=D[0]>D[2]}else S=_>k;var I,P=Math.PI,O=[],M=w+n===e;if(g=0,A=x,d=t[e=w],p=t[e+1],M){b();var T=Math.atan2(p-m,d-f);return S&&(T+=T>0?-P:P),O[0]=[z=(k+_)/2,H=(E+y)/2,(C-s)/2,T,r],O}for(var R=0,V=r.length;R<V;){b();var F=Math.atan2(p-m,d-f);if(S&&(F+=F>0?-P:P),void 0!==I){var L=F-I;if(L+=L>P?-2*P:L<-P?2*P:0,Math.abs(L)>o)return null}I=F;for(var U=R,B=0;R<V;++R){var N=a*l(c,r[S?V-R-1:R],h);if(e+n<i&&A+g<s+B+N/2)break;B+=N}if(R!==U){var j=S?r.substring(V-U,V-R):r.substring(U,R),z=vk(f,d,v=(s+B/2-A)/g),H=vk(m,p,v);O.push([z,H,B/2,F,j]),s+=B}}return O}var uq=[1/0,1/0,-1/0,-1/0],dq=[],pq=[],fq=[],mq=[];function gq(t){return t[3].declutterBox}var Aq=new RegExp("["+String.fromCharCode(1425)+"-"+String.fromCharCode(2303)+String.fromCharCode(64285)+"-"+String.fromCharCode(65023)+String.fromCharCode(65136)+"-"+String.fromCharCode(65276)+String.fromCharCode(67584)+"-"+String.fromCharCode(69631)+String.fromCharCode(124928)+"-"+String.fromCharCode(126975)+"]");function bq(t,e){return"start"!==e&&"end"!==e||Aq.test(t)||(e="start"===e?"left":"right"),aq[e]}var vq=function(){function t(t,e,i,n,r){this.overlaps=i,this.pixelRatio=e,this.resolution=t,this.instructions=n.instructions,this.coordinates=n.coordinates,this.coordinateCache_={},this.renderBuffer_=r,this.renderedTransform_=[1,0,0,1,0,0],this.hitDetectionInstructions=n.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=n.fillStates||{},this.strokeStates=n.strokeStates||{},this.textStates=n.textStates||{},this.widths_={},this.labels_={}}return t.prototype.createLabel=function(t,e,i,n){var r=t+e+i+n;if(this.labels_[r])return this.labels_[r];var s=n?this.strokeStates[n]:null,o=i?this.fillStates[i]:null,a=this.textStates[e],l=this.pixelRatio,c=[a.scale[0]*l,a.scale[1]*l],h=bq(t,a.textAlign||"center"),u=n&&s.lineWidth?s.lineWidth:0,d=t.split("\n"),p=d.length,f=[],m=function(t,e,i){for(var n=e.length,r=0,s=0;s<n;++s){var o=iW(t,e[s]);r=Math.max(r,o),i.push(o)}return r}(a.font,d,f),g=function(t){var e=JG[t];if(null==e){if(lS){var i=GG(t),n=eW(t,"\u017dg");e=(isNaN(Number(i.lineHeight))?1.2:Number(i.lineHeight))*(n.actualBoundingBoxAscent+n.actualBoundingBoxDescent)}else QG||((QG=document.createElement("div")).innerHTML="M",QG.style.margin="0 !important",QG.style.padding="0 !important",QG.style.position="absolute !important",QG.style.left="-99999px !important"),QG.style.font=t,document.body.appendChild(QG),e=QG.offsetHeight,document.body.removeChild(QG);JG[t]=e}return e}(a.font),A=m+u,b=[],v=(A+2)*c[0],_=(g*p+u)*c[1],y={width:v<0?Math.floor(v):Math.ceil(v),height:_<0?Math.floor(_):Math.ceil(_),contextInstructions:b};1==c[0]&&1==c[1]||b.push("scale",c),b.push("font",a.font),n&&(b.push("strokeStyle",s.strokeStyle),b.push("lineWidth",u),b.push("lineCap",s.lineCap),b.push("lineJoin",s.lineJoin),b.push("miterLimit",s.miterLimit),(lS?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D).prototype.setLineDash&&(b.push("setLineDash",[s.lineDash]),b.push("lineDashOffset",s.lineDashOffset))),i&&b.push("fillStyle",o.fillStyle),b.push("textBaseline","middle"),b.push("textAlign","center");var w,x=.5-h,C=h*A+x*u;if(n)for(w=0;w<p;++w)b.push("strokeText",[d[w],C+x*f[w],.5*(u+g)+w*g]);if(i)for(w=0;w<p;++w)b.push("fillText",[d[w],C+x*f[w],.5*(u+g)+w*g]);return this.labels_[r]=y,y},t.prototype.replayTextBackground_=function(t,e,i,n,r,s,o){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,i),t.lineTo.apply(t,n),t.lineTo.apply(t,r),t.lineTo.apply(t,e),s&&(this.alignFill_=s[2],this.fill_(t)),o&&(this.setStrokeStyle_(t,o),t.stroke())},t.prototype.calculateImageOrLabelDimensions_=function(t,e,i,n,r,s,o,a,l,c,h,u,d,p,f,m){var g,A=i-(o*=u[0]),b=n-(a*=u[1]),v=r+l>t?t-l:r,_=s+c>e?e-c:s,y=p[3]+v*u[0]+p[1],w=p[0]+_*u[1]+p[2],x=A-p[3],C=b-p[0];return(f||0!==h)&&(dq[0]=x,mq[0]=x,dq[1]=C,pq[1]=C,pq[0]=x+y,fq[0]=pq[0],fq[1]=C+w,mq[1]=fq[1]),0!==h?(lM(g=cM([1,0,0,1,0,0],i,n,1,1,h,-i,-n),dq),lM(g,pq),lM(g,fq),lM(g,mq),PS(Math.min(dq[0],pq[0],fq[0],mq[0]),Math.min(dq[1],pq[1],fq[1],mq[1]),Math.max(dq[0],pq[0],fq[0],mq[0]),Math.max(dq[1],pq[1],fq[1],mq[1]),uq)):PS(Math.min(x,x+y),Math.min(C,C+w),Math.max(x,x+y),Math.max(C,C+w),uq),d&&(A=Math.round(A),b=Math.round(b)),{drawImageX:A,drawImageY:b,drawImageW:v,drawImageH:_,originX:l,originY:c,declutterBox:{minX:uq[0],minY:uq[1],maxX:uq[2],maxY:uq[3],value:m},canvasTransform:g,scale:u}},t.prototype.replayImageOrLabel_=function(t,e,i,n,r,s,o){var a=n.declutterBox,l=t.canvas,c=o?o[2]*n.scale[0]/2:0;return a.minX-c<=l.width/e&&a.maxX+c>=0&&a.minY-c<=l.height/e&&a.maxY+c>=0&&(!(!s&&!o)&&this.replayTextBackground_(t,dq,pq,fq,mq,s,o),function(t,e,i,n,r,s,o,a,l,c,h){t.save(),1!==i&&(t.globalAlpha*=i),e&&t.setTransform.apply(t,e),n.contextInstructions?(t.translate(l,c),t.scale(h[0],h[1]),function(t,e){for(var i=t.contextInstructions,n=0,r=i.length;n<r;n+=2)Array.isArray(i[n+1])?e[i[n]].apply(e,i[n+1]):e[i[n]]=i[n+1]}(n,t)):h[0]<0||h[1]<0?(t.translate(l,c),t.scale(h[0],h[1]),t.drawImage(n,r,s,o,a,0,0,o,a)):t.drawImage(n,r,s,o,a,l,c,o*h[0],a*h[1]),t.restore()}(t,n.canvasTransform,r,i,n.originX,n.originY,n.drawImageW,n.drawImageH,n.drawImageX,n.drawImageY,n.scale)),!0},t.prototype.fill_=function(t){if(this.alignFill_){var e=lM(this.renderedTransform_,[0,0]),i=512*this.pixelRatio;t.save(),t.translate(e[0]%i,e[1]%i),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()},t.prototype.setStrokeStyle_=function(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.setLineDash&&(t.lineDashOffset=e[7],t.setLineDash(e[6]))},t.prototype.drawLabelWithPointPlacement_=function(t,e,i,n){var r=this.textStates[e],s=this.createLabel(t,e,n,i),o=this.strokeStates[i],a=this.pixelRatio,l=bq(t,r.textAlign||"center"),c=aq[r.textBaseline||"middle"],h=o&&o.lineWidth?o.lineWidth:0;return{label:s,anchorX:l*(s.width/a-2*r.scale[0])+2*(.5-l)*h,anchorY:c*s.height/a+2*(.5-c)*h}},t.prototype.execute_=function(t,e,i,n,r,s,o,a){var l,c,h;this.pixelCoordinates_&&UC(i,this.renderedTransform_)?l=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),l=dM(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),(c=this.renderedTransform_)[0]=(h=i)[0],c[1]=h[1],c[2]=h[2],c[3]=h[3],c[4]=h[4],c[5]=h[5]);for(var u,d,p,f,m,g,A,b,v,_,y,w,x,C,S,k,E=0,D=n.length,I=0,P=0,O=0,M=null,T=null,R=this.coordinateCache_,V=this.viewRotation_,F=Math.round(1e12*Math.atan2(-i[1],i[0]))/1e12,L={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:V},U=this.instructions!=n||this.overlaps?0:200;E<D;){var B=n[E];switch(B[0]){case qZ.BEGIN_GEOMETRY:k=B[3],(x=B[1]).getGeometry()?void 0===o||QS(o,k.getExtent())?++E:E=B[2]+1:E=B[2];break;case qZ.BEGIN_PATH:P>U&&(this.fill_(t),P=0),O>U&&(t.stroke(),O=0),P||O||(t.beginPath(),f=NaN,m=NaN),++E;break;case qZ.CIRCLE:var N=l[I=B[1]],j=l[I+1],z=l[I+2]-N,H=l[I+3]-j,K=Math.sqrt(z*z+H*H);t.moveTo(N+K,j),t.arc(N,j,K,0,2*Math.PI,!0),++E;break;case qZ.CLOSE_PATH:t.closePath(),++E;break;case qZ.CUSTOM:I=B[1],u=B[2];var $=B[4],G=6==B.length?B[5]:void 0;L.geometry=B[3],L.feature=x,E in R||(R[E]=[]);var W=R[E];G?G(l,I,u,2,W):(W[0]=l[I],W[1]=l[I+1],W.length=2),$(W,L),++E;break;case qZ.DRAW_IMAGE:I=B[1],u=B[2],d=B[4],p=B[5];var Z=B[6],q=B[7],Y=B[8],Q=B[9],X=B[10],J=B[11],tt=B[12],et=B[13],it=B[14];if(!(b=B[3])&&B.length>=19){var nt=this.drawLabelWithPointPlacement_(v=B[18],_=B[19],y=B[20],w=B[21]);B[3]=b=nt.label,B[4]=d=(nt.anchorX-B[22])*this.pixelRatio,B[5]=p=(nt.anchorY-B[23])*this.pixelRatio,B[6]=Z=b.height,B[13]=et=b.width}var rt=void 0;B.length>24&&(rt=B[24]);var st=void 0,ot=void 0,at=void 0;B.length>16?(st=B[15],ot=B[16],at=B[17]):(st=ZG,ot=!1,at=!1),X&&F?J+=V:X||F||(J-=V);for(var lt=0;I<u;I+=2)if(!(rt&&rt[lt++]<et/this.pixelRatio)){var ct=[t,e,b,Tt=this.calculateImageOrLabelDimensions_(b.width,b.height,l[I],l[I+1],et,Z,d,p,Y,Q,J,tt,r,st,ot||at,x),q,ot?M:null,at?T:null],ht=void 0,ut=void 0;if(a&&it){if(!it[I]){it[I]=ct;continue}if(ht=it[I],delete it[I],ut=gq(ht),a.collides(ut))continue}a&&a.collides(Tt.declutterBox)||(ht&&(a&&a.insert(ut),this.replayImageOrLabel_.apply(this,ht)),a&&a.insert(Tt.declutterBox),this.replayImageOrLabel_.apply(this,ct))}++E;break;case qZ.DRAW_CHARS:var dt=B[1],pt=B[2],ft=B[3],mt=B[4];w=B[5];var gt=B[6],At=B[7],bt=B[8];y=B[9];var vt=B[10];v=B[11];var _t=[B[13],B[13]],yt=this.textStates[_=B[12]],wt=yt.font,xt=[yt.scale[0]*At,yt.scale[1]*At],Ct=void 0;wt in this.widths_?Ct=this.widths_[wt]:this.widths_[wt]=Ct={};var St=CH(l,dt,pt,2),kt=Math.abs(xt[0])*nW(wt,v,Ct);if(mt||kt<=St){var Et=hq(l,dt,pt,2,v,(St-kt)*aq[this.textStates[_].textAlign],gt,Math.abs(xt[0]),nW,wt,Ct,F?0:this.viewRotation_);t:if(Et){var Dt=[],It=void 0,Pt=void 0,Ot=void 0,Mt=void 0;if(y)for(It=0,Pt=Et.length;It<Pt;++It){Ot=this.createLabel((Mt=Et[It])[4],_,"",y);var Tt=this.calculateImageOrLabelDimensions_(Ot.width,Ot.height,Mt[0],Mt[1],Ot.width,Ot.height,d=Mt[2]+(xt[0]<0?-vt:vt),p=ft*Ot.height+2*(.5-ft)*vt*xt[1]/xt[0]-bt,0,0,Mt[3],_t,!1,ZG,!1,x);if(a&&a.collides(Tt.declutterBox))break t;Dt.push([t,e,Ot,Tt,1,null,null])}if(w)for(It=0,Pt=Et.length;It<Pt;++It){if(Ot=this.createLabel((Mt=Et[It])[4],_,w,""),Tt=this.calculateImageOrLabelDimensions_(Ot.width,Ot.height,Mt[0],Mt[1],Ot.width,Ot.height,d=Mt[2],p=ft*Ot.height-bt,0,0,Mt[3],_t,!1,ZG,!1,x),a&&a.collides(Tt.declutterBox))break t;Dt.push([t,e,Ot,Tt,1,null,null])}a&&a.load(Dt.map(gq));for(var Rt=0,Vt=Dt.length;Rt<Vt;++Rt)this.replayImageOrLabel_.apply(this,Dt[Rt])}}++E;break;case qZ.END_GEOMETRY:if(void 0!==s){var Ft=s(x=B[1],k);if(Ft)return Ft}++E;break;case qZ.FILL:U?P++:this.fill_(t),++E;break;case qZ.MOVE_TO_LINE_TO:for(u=B[2],A=(S=l[(I=B[1])+1])+.5|0,(g=(C=l[I])+.5|0)===f&&A===m||(t.moveTo(C,S),f=g,m=A),I+=2;I<u;I+=2)g=(C=l[I])+.5|0,A=(S=l[I+1])+.5|0,I!=u-2&&g===f&&A===m||(t.lineTo(C,S),f=g,m=A);++E;break;case qZ.SET_FILL_STYLE:M=B,this.alignFill_=B[2],P&&(this.fill_(t),P=0,O&&(t.stroke(),O=0)),t.fillStyle=B[1],++E;break;case qZ.SET_STROKE_STYLE:T=B,O&&(t.stroke(),O=0),this.setStrokeStyle_(t,B),++E;break;case qZ.STROKE:U?O++:t.stroke(),++E;break;default:++E}}P&&this.fill_(t),O&&t.stroke()},t.prototype.execute=function(t,e,i,n,r,s){this.viewRotation_=n,this.execute_(t,e,i,this.instructions,r,void 0,void 0,s)},t.prototype.executeHitDetection=function(t,e,i,n,r){return this.viewRotation_=i,this.execute_(t,1,e,this.hitDetectionInstructions,!0,n,r)},t}(),_q=["Polygon","Circle","LineString","Image","Text","Default"],yq=function(){function t(t,e,i,n,r,s){this.maxExtent_=t,this.overlaps_=n,this.pixelRatio_=i,this.resolution_=e,this.renderBuffer_=s,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=[1,0,0,1,0,0],this.createExecutors_(r)}return t.prototype.clip=function(t,e){var i=this.getClipCoords(e);t.beginPath(),t.moveTo(i[0],i[1]),t.lineTo(i[2],i[3]),t.lineTo(i[4],i[5]),t.lineTo(i[6],i[7]),t.clip()},t.prototype.createExecutors_=function(t){for(var e in t){var i=this.executorsByZIndex_[e];void 0===i&&(this.executorsByZIndex_[e]=i={});var n=t[e],r=[this.renderBuffer_||0,this.renderBuffer_||0];for(var s in n)i[s]=new vq(this.resolution_,this.pixelRatio_,this.overlaps_,n[s],r)}},t.prototype.hasExecutors=function(t){for(var e in this.executorsByZIndex_)for(var i=this.executorsByZIndex_[e],n=0,r=t.length;n<r;++n)if(t[n]in i)return!0;return!1},t.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,r,s){var o=2*(n=Math.round(n))+1,a=cM(this.hitDetectionTransform_,n+.5,n+.5,1/e,-1/e,-i,-t[0],-t[1]),l=!this.hitDetectionContext_;l&&(this.hitDetectionContext_=uS(o,o));var c,h=this.hitDetectionContext_;h.canvas.width!==o||h.canvas.height!==o?(h.canvas.width=o,h.canvas.height=o):l||h.clearRect(0,0,o,o),void 0!==this.renderBuffer_&&(FS(c=[1/0,1/0,-1/0,-1/0],t),xS(c,e*(this.renderBuffer_+n),c));var u,d=function(t){if(void 0!==wq[t])return wq[t];for(var e=2*t+1,i=t*t,n=new Array(i+1),r=0;r<=t;++r)for(var s=0;s<=t;++s){var o=r*r+s*s;if(o>i)break;var a=n[o];a||(n[o]=a=[]),a.push(4*((t+r)*e+(t+s))+3),r>0&&a.push(4*((t-r)*e+(t+s))+3),s>0&&(a.push(4*((t+r)*e+(t-s))+3),r>0&&a.push(4*((t-r)*e+(t-s))+3))}for(var l=[],c=(r=0,n.length);r<c;++r)n[r]&&l.push.apply(l,n[r]);return wq[t]=l,l}(n);function p(t,e){for(var i=h.getImageData(0,0,o,o).data,a=0,l=d.length;a<l;a++)if(i[d[a]]>0){if(!s||"Image"!==u&&"Text"!==u||-1!==s.indexOf(t)){var c=(d[a]-3)/4,p=n-c%o,f=n-(c/o|0),m=r(t,e,p*p+f*f);if(m)return m}h.clearRect(0,0,o,o);break}}var f,m,g,A,b,v=Object.keys(this.executorsByZIndex_).map(Number);for(v.sort(TC),f=v.length-1;f>=0;--f){var _=v[f].toString();for(g=this.executorsByZIndex_[_],m=_q.length-1;m>=0;--m)if(void 0!==(A=g[u=_q[m]])&&(b=A.executeHitDetection(h,a,i,p,c)))return b}},t.prototype.getClipCoords=function(t){var e=this.maxExtent_;if(!e)return null;var i=e[0],n=e[1],r=e[2],s=e[3],o=[i,n,i,s,r,s,r,n];return dM(o,0,8,2,t,o),o},t.prototype.isEmpty=function(){return $C(this.executorsByZIndex_)},t.prototype.execute=function(t,e,i,n,r,s,o){var a=Object.keys(this.executorsByZIndex_).map(Number);a.sort(TC),this.maxExtent_&&(t.save(),this.clip(t,i));var l,c,h,u,d,p,f=s||_q;for(o&&a.reverse(),l=0,c=a.length;l<c;++l){var m=a[l].toString();for(d=this.executorsByZIndex_[m],h=0,u=f.length;h<u;++h)void 0!==(p=d[f[h]])&&p.execute(t,e,i,n,r,o)}this.maxExtent_&&t.restore()},t}(),wq={},xq=yq,Cq=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Sq=function(t){function e(e,i,n,r,s,o,a){var l=t.call(this)||this;return l.context_=e,l.pixelRatio_=i,l.extent_=n,l.transform_=r,l.viewRotation_=s,l.squaredTolerance_=o,l.userTransform_=a,l.contextFillState_=null,l.contextStrokeState_=null,l.contextTextState_=null,l.fillState_=null,l.strokeState_=null,l.image_=null,l.imageAnchorX_=0,l.imageAnchorY_=0,l.imageHeight_=0,l.imageOpacity_=0,l.imageOriginX_=0,l.imageOriginY_=0,l.imageRotateWithView_=!1,l.imageRotation_=0,l.imageScale_=[0,0],l.imageWidth_=0,l.text_="",l.textOffsetX_=0,l.textOffsetY_=0,l.textRotateWithView_=!1,l.textRotation_=0,l.textScale_=[0,0],l.textFillState_=null,l.textStrokeState_=null,l.textState_=null,l.pixelCoordinates_=[],l.tmpLocalTransform_=[1,0,0,1,0,0],l}return Cq(e,t),e.prototype.drawImages_=function(t,e,i,n){if(this.image_){var r=dM(t,e,i,2,this.transform_,this.pixelCoordinates_),s=this.context_,o=this.tmpLocalTransform_,a=s.globalAlpha;1!=this.imageOpacity_&&(s.globalAlpha=a*this.imageOpacity_);var l=this.imageRotation_;this.imageRotateWithView_&&(l+=this.viewRotation_);for(var c=0,h=r.length;c<h;c+=2){var u=r[c]-this.imageAnchorX_,d=r[c+1]-this.imageAnchorY_;if(0!==l||1!=this.imageScale_[0]||1!=this.imageScale_[1]){var p=u+this.imageAnchorX_,f=d+this.imageAnchorY_;cM(o,p,f,1,1,l,-p,-f),s.setTransform.apply(s,o),s.translate(p,f),s.scale(this.imageScale_[0],this.imageScale_[1]),s.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),s.setTransform(1,0,0,1,0,0)}else s.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,u,d,this.imageWidth_,this.imageHeight_)}1!=this.imageOpacity_&&(s.globalAlpha=a)}},e.prototype.drawText_=function(t,e,i,n){if(this.textState_&&""!==this.text_){this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);var r=dM(t,e,i,n,this.transform_,this.pixelCoordinates_),s=this.context_,o=this.textRotation_;for(this.textRotateWithView_&&(o+=this.viewRotation_);e<i;e+=n){var a=r[e]+this.textOffsetX_,l=r[e+1]+this.textOffsetY_;if(0!==o||1!=this.textScale_[0]||1!=this.textScale_[1]){var c=cM(this.tmpLocalTransform_,a,l,1,1,o,-a,-l);s.setTransform.apply(s,c),s.translate(a,l),s.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&s.strokeText(this.text_,0,0),this.textFillState_&&s.fillText(this.text_,0,0),s.setTransform(1,0,0,1,0,0)}else this.textStrokeState_&&s.strokeText(this.text_,a,l),this.textFillState_&&s.fillText(this.text_,a,l)}}},e.prototype.moveToLineTo_=function(t,e,i,n,r){var s=this.context_,o=dM(t,e,i,n,this.transform_,this.pixelCoordinates_);s.moveTo(o[0],o[1]);var a=o.length;r&&(a-=2);for(var l=2;l<a;l+=2)s.lineTo(o[l],o[l+1]);return r&&s.closePath(),i},e.prototype.drawRings_=function(t,e,i,n){for(var r=0,s=i.length;r<s;++r)e=this.moveToLineTo_(t,e,i[r],n,!0);return e},e.prototype.drawCircle=function(t){if(QS(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=function(t,e,i){var n=t.getFlatCoordinates();if(n){var r=t.getStride();return dM(n,0,n.length,r,e,i)}return null}(t,this.transform_,this.pixelCoordinates_),i=e[2]-e[0],n=e[3]-e[1],r=Math.sqrt(i*i+n*n),s=this.context_;s.beginPath(),s.arc(e[0],e[1],r,0,2*Math.PI),this.fillState_&&s.fill(),this.strokeState_&&s.stroke()}""!==this.text_&&this.drawText_(t.getCenter(),0,2,2)}},e.prototype.setStyle=function(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())},e.prototype.setTransform=function(t){this.transform_=t},e.prototype.drawGeometry=function(t){switch(t.getType()){case"Point":this.drawPoint(t);break;case"LineString":this.drawLineString(t);break;case"Polygon":this.drawPolygon(t);break;case"MultiPoint":this.drawMultiPoint(t);break;case"MultiLineString":this.drawMultiLineString(t);break;case"MultiPolygon":this.drawMultiPolygon(t);break;case"GeometryCollection":this.drawGeometryCollection(t);break;case"Circle":this.drawCircle(t)}},e.prototype.drawFeature=function(t,e){var i=e.getGeometryFunction()(t);i&&QS(this.extent_,i.getExtent())&&(this.setStyle(e),this.drawGeometry(i))},e.prototype.drawGeometryCollection=function(t){for(var e=t.getGeometriesArray(),i=0,n=e.length;i<n;++i)this.drawGeometry(e[i])},e.prototype.drawPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)},e.prototype.drawMultiPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)},e.prototype.drawLineString=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),QS(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var e=this.context_,i=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(i,0,i.length,t.getStride(),!1),e.stroke()}if(""!==this.text_){var n=t.getFlatMidpoint();this.drawText_(n,0,2,2)}}},e.prototype.drawMultiLineString=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getExtent();if(QS(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var i=this.context_,n=t.getFlatCoordinates(),r=0,s=t.getEnds(),o=t.getStride();i.beginPath();for(var a=0,l=s.length;a<l;++a)r=this.moveToLineTo_(n,r,s[a],o,!1);i.stroke()}if(""!==this.text_){var c=t.getFlatMidpoints();this.drawText_(c,0,c.length,2)}}},e.prototype.drawPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),QS(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var i=t.getFlatInteriorPoint();this.drawText_(i,0,2,2)}}},e.prototype.drawMultiPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),QS(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_,i=t.getOrientedFlatCoordinates(),n=0,r=t.getEndss(),s=t.getStride();e.beginPath();for(var o=0,a=r.length;o<a;++o)n=this.drawRings_(i,n,r[o],s);this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var l=t.getFlatInteriorPoints();this.drawText_(l,0,l.length,2)}}},e.prototype.setContextFillState_=function(t){var e=this.context_,i=this.contextFillState_;i?i.fillStyle!=t.fillStyle&&(i.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})},e.prototype.setContextStrokeState_=function(t){var e=this.context_,i=this.contextStrokeState_;i?(i.lineCap!=t.lineCap&&(i.lineCap=t.lineCap,e.lineCap=t.lineCap),e.setLineDash&&(UC(i.lineDash,t.lineDash)||e.setLineDash(i.lineDash=t.lineDash),i.lineDashOffset!=t.lineDashOffset&&(i.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset)),i.lineJoin!=t.lineJoin&&(i.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),i.lineWidth!=t.lineWidth&&(i.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),i.miterLimit!=t.miterLimit&&(i.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),i.strokeStyle!=t.strokeStyle&&(i.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,e.setLineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})},e.prototype.setContextTextState_=function(t){var e=this.context_,i=this.contextTextState_,n=t.textAlign?t.textAlign:"center";i?(i.font!=t.font&&(i.font=t.font,e.font=t.font),i.textAlign!=n&&(i.textAlign=n,e.textAlign=n),i.textBaseline!=t.textBaseline&&(i.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=n,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:n,textBaseline:t.textBaseline})},e.prototype.setFillStrokeStyle=function(t,e){if(t){var i=t.getColor();this.fillState_={fillStyle:IZ(i||"#000")}}else this.fillState_=null;if(e){var n=e.getColor(),r=e.getLineCap(),s=e.getLineDash(),o=e.getLineDashOffset(),a=e.getLineJoin(),l=e.getWidth(),c=e.getMiterLimit();this.strokeState_={lineCap:void 0!==r?r:"round",lineDash:s||WG,lineDashOffset:o||0,lineJoin:void 0!==a?a:"round",lineWidth:this.pixelRatio_*(void 0!==l?l:1),miterLimit:void 0!==c?c:10,strokeStyle:IZ(n||"#000")}}else this.strokeState_=null},e.prototype.setImageStyle=function(t){if(t){var e=t.getSize();if(e){var i=t.getAnchor(),n=t.getImage(1),r=t.getOrigin(),s=t.getScaleArray();this.imageAnchorX_=i[0],this.imageAnchorY_=i[1],this.imageHeight_=e[1],this.image_=n,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=r[0],this.imageOriginY_=r[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation(),this.imageScale_=[this.pixelRatio_*s[0],this.pixelRatio_*s[1]],this.imageWidth_=e[0]}else this.image_=null}else this.image_=null},e.prototype.setTextStyle=function(t){if(t){var e=t.getFill();if(e){var i=e.getColor();this.textFillState_={fillStyle:IZ(i||"#000")}}else this.textFillState_=null;var n=t.getStroke();if(n){var r=n.getColor(),s=n.getLineCap(),o=n.getLineDash(),a=n.getLineDashOffset(),l=n.getLineJoin(),c=n.getWidth(),h=n.getMiterLimit();this.textStrokeState_={lineCap:void 0!==s?s:"round",lineDash:o||WG,lineDashOffset:a||0,lineJoin:void 0!==l?l:"round",lineWidth:void 0!==c?c:1,miterLimit:void 0!==h?h:10,strokeStyle:IZ(r||"#000")}}else this.textStrokeState_=null;var u=t.getFont(),d=t.getOffsetX(),p=t.getOffsetY(),f=t.getRotateWithView(),m=t.getRotation(),g=t.getScaleArray(),A=t.getText(),b=t.getTextAlign(),v=t.getTextBaseline();this.textState_={font:void 0!==u?u:"10px sans-serif",textAlign:void 0!==b?b:"center",textBaseline:void 0!==v?v:"middle"},this.text_=void 0!==A?A:"",this.textOffsetX_=void 0!==d?this.pixelRatio_*d:0,this.textOffsetY_=void 0!==p?this.pixelRatio_*p:0,this.textRotateWithView_=void 0!==f&&f,this.textRotation_=void 0!==m?m:0,this.textScale_=[this.pixelRatio_*g[0],this.pixelRatio_*g[1]]}else this.text_=""},e}(YZ),kq=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Eq=null,Dq=function(t){function e(e,i,n,r,s,o){var a=t.call(this)||this;return a.hitDetectionImage_=null,a.image_=e||new Image,null!==r&&(a.image_.crossOrigin=r),a.canvas_={},a.color_=o,a.unlisten_=null,a.imageState_=s,a.size_=n,a.src_=i,a}return kq(e,t),e.prototype.isTainted_=function(){if(void 0===this.tainted_&&2===this.imageState_){Eq||(Eq=uS(1,1)),Eq.drawImage(this.image_,0,0);try{Eq.getImageData(0,0,1,1),this.tainted_=!1}catch($nt){Eq=null,this.tainted_=!0}}return!0===this.tainted_},e.prototype.dispatchChangeEvent_=function(){this.dispatchEvent("change")},e.prototype.handleImageError_=function(){this.imageState_=3,this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.handleImageLoad_=function(){this.imageState_=2,this.size_?(this.image_.width=this.size_[0],this.image_.height=this.size_[1]):this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.getImage=function(t){return this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_},e.prototype.getPixelRatio=function(t){return this.replaceColor_(t),this.canvas_[t]?t:1},e.prototype.getImageState=function(){return this.imageState_},e.prototype.getHitDetectionImage=function(){if(!this.hitDetectionImage_)if(this.isTainted_()){var t=this.size_[0],e=this.size_[1],i=uS(t,e);i.fillRect(0,0,t,e),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_},e.prototype.getSize=function(){return this.size_},e.prototype.getSrc=function(){return this.src_},e.prototype.load=function(){if(0==this.imageState_){this.imageState_=1;try{this.image_.src=this.src_}catch($nt){this.handleImageError_()}this.unlisten_=rk(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}},e.prototype.replaceColor_=function(t){if(this.color_&&!this.canvas_[t]){var e=document.createElement("canvas");this.canvas_[t]=e,e.width=Math.ceil(this.image_.width*t),e.height=Math.ceil(this.image_.height*t);var i=e.getContext("2d");if(i.scale(t,t),i.drawImage(this.image_,0,0),i.globalCompositeOperation="multiply","multiply"===i.globalCompositeOperation||this.isTainted_())i.fillStyle=mW(this.color_),i.fillRect(0,0,e.width,e.height),i.globalCompositeOperation="destination-in",i.drawImage(this.image_,0,0);else{for(var n=i.getImageData(0,0,e.width,e.height),r=n.data,s=this.color_[0]/255,o=this.color_[1]/255,a=this.color_[2]/255,l=this.color_[3],c=0,h=r.length;c<h;c+=4)r[c]*=s,r[c+1]*=o,r[c+2]*=a,r[c+3]*=l;i.putImageData(n,0,0)}}},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(WC),Iq=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Pq=function(t){function e(e){var i=this,n=e||{};(i=t.call(this,{opacity:void 0!==n.opacity?n.opacity:1,rotation:void 0!==n.rotation?n.rotation:0,scale:void 0!==n.scale?n.scale:1,displacement:void 0!==n.displacement?n.displacement:[0,0],rotateWithView:void 0!==n.rotateWithView&&n.rotateWithView})||this).anchor_=void 0!==n.anchor?n.anchor:[.5,.5],i.normalizedAnchor_=null,i.anchorOrigin_=void 0!==n.anchorOrigin?n.anchorOrigin:"top-left",i.anchorXUnits_=void 0!==n.anchorXUnits?n.anchorXUnits:"fraction",i.anchorYUnits_=void 0!==n.anchorYUnits?n.anchorYUnits:"fraction",i.crossOrigin_=void 0!==n.crossOrigin?n.crossOrigin:null;var r=void 0!==n.img?n.img:null,s=void 0!==n.imgSize?n.imgSize:null,o=n.src;yS(!(void 0!==o&&r),4),yS(!r||r&&s,5),void 0!==o&&0!==o.length||!r||(o=r.src||YC(r)),yS(void 0!==o&&o.length>0,6);var a=void 0!==n.src?0:2;return i.color_=void 0!==n.color?_W(n.color):null,i.iconImage_=function(t,e,i,n,r,s){var o=CW.get(e,n,s);return o||(o=new Dq(t,e,i,n,r,s),CW.set(e,n,s,o)),o}(r,o,s,i.crossOrigin_,a,i.color_),i.offset_=void 0!==n.offset?n.offset:[0,0],i.offsetOrigin_=void 0!==n.offsetOrigin?n.offsetOrigin:"top-left",i.origin_=null,i.size_=void 0!==n.size?n.size:null,i}return Iq(e,t),e.prototype.clone=function(){var t=this.getScale();return new e({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,crossOrigin:this.crossOrigin_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,src:this.getSrc(),offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,size:null!==this.size_?this.size_.slice():void 0,opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})},e.prototype.getAnchor=function(){if(this.normalizedAnchor_)return this.normalizedAnchor_;var t=this.anchor_,e=this.getSize();if("fraction"==this.anchorXUnits_||"fraction"==this.anchorYUnits_){if(!e)return null;t=this.anchor_.slice(),"fraction"==this.anchorXUnits_&&(t[0]*=e[0]),"fraction"==this.anchorYUnits_&&(t[1]*=e[1])}if("top-left"!=this.anchorOrigin_){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),"top-right"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[0]=-t[0]+e[0]),"bottom-left"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[1]=-t[1]+e[1])}return this.normalizedAnchor_=t,this.normalizedAnchor_},e.prototype.setAnchor=function(t){this.anchor_=t,this.normalizedAnchor_=null},e.prototype.getColor=function(){return this.color_},e.prototype.getImage=function(t){return this.iconImage_.getImage(t)},e.prototype.getPixelRatio=function(t){return this.iconImage_.getPixelRatio(t)},e.prototype.getImageSize=function(){return this.iconImage_.getSize()},e.prototype.getHitDetectionImageSize=function(){return this.getImageSize()},e.prototype.getImageState=function(){return this.iconImage_.getImageState()},e.prototype.getHitDetectionImage=function(){return this.iconImage_.getHitDetectionImage()},e.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var t=this.offset_,e=this.getDisplacement();if("top-left"!=this.offsetOrigin_){var i=this.getSize(),n=this.iconImage_.getSize();if(!i||!n)return null;t=t.slice(),"top-right"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[0]=n[0]-i[0]-t[0]),"bottom-left"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[1]=n[1]-i[1]-t[1])}return t[0]+=e[0],t[1]+=e[1],this.origin_=t,this.origin_},e.prototype.getSrc=function(){return this.iconImage_.getSrc()},e.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},e.prototype.listenImageChange=function(t){this.iconImage_.addEventListener("change",t)},e.prototype.load=function(){this.iconImage_.load()},e.prototype.unlistenImageChange=function(t){this.iconImage_.removeEventListener("change",t)},e}(DZ),Oq={Point:function(t,e,i,n,r){var s,o=i.getImage(),a=i.getText();if(r&&(t=r,s=o&&a&&a.getText()?{}:void 0),o){if(2!=o.getImageState())return;var l=t.getBuilder(i.getZIndex(),"Image");l.setImageStyle(o,s),l.drawPoint(e,n)}if(a&&a.getText()){var c=t.getBuilder(i.getZIndex(),"Text");c.setTextStyle(a,s),c.drawText(e,n)}},LineString:function(t,e,i,n,r){var s=i.getStroke();if(s){var o=t.getBuilder(i.getZIndex(),"LineString");o.setFillStrokeStyle(null,s),o.drawLineString(e,n)}var a=i.getText();if(a&&a.getText()){var l=(r||t).getBuilder(i.getZIndex(),"Text");l.setTextStyle(a),l.drawText(e,n)}},Polygon:function(t,e,i,n,r){var s=i.getFill(),o=i.getStroke();if(s||o){var a=t.getBuilder(i.getZIndex(),"Polygon");a.setFillStrokeStyle(s,o),a.drawPolygon(e,n)}var l=i.getText();if(l&&l.getText()){var c=(r||t).getBuilder(i.getZIndex(),"Text");c.setTextStyle(l),c.drawText(e,n)}},MultiPoint:function(t,e,i,n,r){var s,o=i.getImage(),a=i.getText();if(r&&(t=r,s=o&&a&&a.getText()?{}:void 0),o){if(2!=o.getImageState())return;var l=t.getBuilder(i.getZIndex(),"Image");l.setImageStyle(o,s),l.drawMultiPoint(e,n)}if(a&&a.getText()){var c=(r||t).getBuilder(i.getZIndex(),"Text");c.setTextStyle(a,s),c.drawText(e,n)}},MultiLineString:function(t,e,i,n,r){var s=i.getStroke();if(s){var o=t.getBuilder(i.getZIndex(),"LineString");o.setFillStrokeStyle(null,s),o.drawMultiLineString(e,n)}var a=i.getText();if(a&&a.getText()){var l=(r||t).getBuilder(i.getZIndex(),"Text");l.setTextStyle(a),l.drawText(e,n)}},MultiPolygon:function(t,e,i,n,r){var s=i.getFill(),o=i.getStroke();if(o||s){var a=t.getBuilder(i.getZIndex(),"Polygon");a.setFillStrokeStyle(s,o),a.drawMultiPolygon(e,n)}var l=i.getText();if(l&&l.getText()){var c=(r||t).getBuilder(i.getZIndex(),"Text");c.setTextStyle(l),c.drawText(e,n)}},GeometryCollection:function(t,e,i,n,r){var s,o,a=e.getGeometriesArray();for(s=0,o=a.length;s<o;++s)(0,Oq[a[s].getType()])(t,a[s],i,n,r)},Circle:function(t,e,i,n,r){var s=i.getFill(),o=i.getStroke();if(s||o){var a=t.getBuilder(i.getZIndex(),"Circle");a.setFillStrokeStyle(s,o),a.drawCircle(e,n)}var l=i.getText();if(l&&l.getText()){var c=(r||t).getBuilder(i.getZIndex(),"Text");c.setTextStyle(l),c.drawText(e,n)}}};function Mq(t,e){return parseInt(YC(t),10)-parseInt(YC(e),10)}function Tq(t,e){var i=Rq(t,e);return i*i}function Rq(t,e){return.5*t/e}function Vq(t,e,i,n,r,s,o){var a=!1,l=i.getImage();if(l){var c=l.getImageState();2==c||3==c?l.unlistenImageChange(r):(0==c&&l.load(),c=l.getImageState(),l.listenImageChange(r),a=!0)}return function(t,e,i,n,r,s){var o=i.getGeometryFunction()(e);if(o){var a=o.simplifyTransformed(n,r);i.getRenderer()?Fq(t,a,i,e):(0,Oq[a.getType()])(t,a,i,e,s)}}(t,e,i,n,s,o),a}function Fq(t,e,i,n){if("GeometryCollection"!=e.getType())t.getBuilder(i.getZIndex(),"Default").drawCustom(e,n,i.getRenderer());else for(var r=e.getGeometries(),s=0,o=r.length;s<o;++s)Fq(t,r[s],i,n)}var Lq=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Uq=function(t){function e(e){var i=t.call(this,e)||this;return i.boundHandleStyleImageChange_=i.handleStyleImageChange_.bind(i),i.dirty_=!1,i.hitDetectionImageData_=null,i.renderedFeatures_=null,i.renderedRevision_=-1,i.renderedResolution_=NaN,i.renderedExtent_=[1/0,1/0,-1/0,-1/0],i.renderedCenter_=null,i.renderedProjection_=null,i.renderedRenderOrder_=null,i.replayGroup_=null,i.replayGroupChanged=!0,i.declutterExecutorGroup=null,i.clipping=!0,i}return Lq(e,t),e.prototype.useContainer=function(e,i,n){n<1&&(e=null),t.prototype.useContainer.call(this,e,i,n)},e.prototype.renderWorlds=function(t,e,i){var n=e.extent,r=e.viewState,s=r.center,o=r.resolution,a=r.projection,l=r.rotation,c=a.getExtent(),h=this.getLayer().getSource(),u=e.pixelRatio,d=e.viewHints,p=!(d[0]||d[1]),f=this.context,m=Math.round(e.size[0]*u),g=Math.round(e.size[1]*u),A=h.getWrapX()&&a.canWrapX(),b=A?YS(c):null,v=A?Math.ceil((n[2]-c[2])/b)+1:1,_=A?Math.floor((n[0]-c[0])/b):0;do{var y=this.getRenderTransform(s,o,l,u,m,g,_*b);t.execute(f,1,y,l,p,void 0,i)}while(++_<v)},e.prototype.renderDeclutter=function(t){this.declutterExecutorGroup&&this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree)},e.prototype.renderFrame=function(t,e){var i=t.pixelRatio,n=t.layerStatesArray[t.layerIndex];!function(t,e,i){aM(t,e,0,0,i,0,0)}(this.pixelTransform,1/i,1/i),hM(this.inversePixelTransform,this.pixelTransform);var r=uM(this.pixelTransform);this.useContainer(e,r,n.opacity);var s=this.context,o=s.canvas,a=this.replayGroup_,l=this.declutterExecutorGroup;if((!a||a.isEmpty())&&(!l||l.isEmpty()))return!this.containerReused&&o.width>0&&(o.width=0),this.container;var c=Math.round(t.size[0]*i),h=Math.round(t.size[1]*i);o.width!=c||o.height!=h?(o.width=c,o.height=h,o.style.transform!==r&&(o.style.transform=r)):this.containerReused||s.clearRect(0,0,c,h),this.preRender(s,t);var u=t.viewState,d=!1;if(n.extent&&this.clipping){var p=mE(n.extent);(d=!ES(p,t.extent)&&QS(p,t.extent))&&this.clipUnrotated(s,t,p)}this.renderWorlds(a,t),d&&s.restore(),this.postRender(s,t);var f=n.opacity,m=this.container;return f!==parseFloat(m.style.opacity)&&(m.style.opacity=1===f?"":String(f)),this.renderedRotation_!==u.rotation&&(this.renderedRotation_=u.rotation,this.hitDetectionImageData_=null),this.container},e.prototype.getFeatures=function(t){return new Promise((function(e){if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){var i=[this.context.canvas.width,this.context.canvas.height];lM(this.pixelTransform,i);var n=this.renderedCenter_,r=this.renderedResolution_,s=this.renderedRotation_,o=this.renderedProjection_,a=this.renderedExtent_,l=this.getLayer(),c=[],h=i[0]/2,u=i[1]/2;c.push(this.getRenderTransform(n,r,s,.5,h,u,0).slice());var d=l.getSource(),p=o.getExtent();if(d.getWrapX()&&o.canWrapX()&&!ES(p,a)){for(var f=a[0],m=YS(p),g=0;f<p[0];)--g,c.push(this.getRenderTransform(n,r,s,.5,h,u,m*g).slice()),f+=m;for(g=0,f=a[2];f>p[2];)++g,c.push(this.getRenderTransform(n,r,s,.5,h,u,m*g).slice()),f-=m}this.hitDetectionImageData_=function(t,e,i,n,r,s,o){var a=uS(t[0]/2,t[1]/2);a.imageSmoothingEnabled=!1;for(var l=a.canvas,c=new Sq(a,.5,r,null,o),h=i.length,u=Math.floor(16777215/h),d={},p=1;p<=h;++p){var f=i[p-1],m=f.getStyleFunction()||n;if(n){var g=m(f,s);if(g){Array.isArray(g)||(g=[g]);for(var A="#"+("000000"+(p*u).toString(16)).slice(-6),b=0,v=g.length;b<v;++b){var _=g[b],y=_.clone(),w=y.getFill();w&&w.setColor(A);var x=y.getStroke();x&&x.setColor(A),y.setText(void 0);var C=_.getImage();if(C){var S=C.getImageSize();if(!S)continue;var k=document.createElement("canvas");k.width=S[0],k.height=S[1];var E=k.getContext("2d",{alpha:!1});E.fillStyle=A;var D=E.canvas;E.fillRect(0,0,D.width,D.height),uS(S?S[0]:D.width,S?S[1]:D.height).drawImage(D,0,0),y.setImage(new Pq({img:D,imgSize:S,anchor:C.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:C.getOrigin(),size:C.getSize(),opacity:C.getOpacity(),scale:C.getScale(),rotation:C.getRotation(),rotateWithView:C.getRotateWithView()}))}var I=Number(y.getZIndex());(T=d[I])||(d[I]=T={},T.Polygon=[],T.Circle=[],T.LineString=[],T.Point=[]);var P=y.getGeometryFunction()(f);P&&QS(r,P.getExtent())&&T[P.getType().replace("Multi","")].push(P,y)}}}}for(var O=Object.keys(d).map(Number).sort(TC),M=(p=0,O.length);p<M;++p){var T=d[O[p]];for(var R in T){var V=T[R];for(b=0,v=V.length;b<v;b+=2){c.setStyle(V[b+1]);for(var F=0,L=e.length;F<L;++F)c.setTransform(e[F]),c.drawGeometry(V[b])}}}return a.getImageData(0,0,l.width,l.height)}(i,c,this.renderedFeatures_,l.getStyleFunction(),a,r,s)}e(function(t,e,i){var n=[];if(i){var r=4*(Math.round(t[0]/2)+Math.round(t[1]/2)*i.width),s=i.data[r+2]+256*(i.data[r+1]+256*i.data[r]),o=Math.floor(16777215/e.length);s&&s%o==0&&n.push(e[s/o-1])}return n}(t,this.renderedFeatures_,this.hitDetectionImageData_))}).bind(this))},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,r){var s=this;if(this.replayGroup_){var o,a=e.viewState.resolution,l=e.viewState.rotation,c=this.getLayer(),h={},u=function(t,e,i){var s=YC(t),o=h[s];if(o){if(!0!==o&&i<o.distanceSq){if(0===i)return h[s]=!0,r.splice(r.lastIndexOf(o),1),n(t,c,e);o.geometry=e,o.distanceSq=i}}else{if(0===i)return h[s]=!0,n(t,c,e);r.push(h[s]={feature:t,layer:c,geometry:e,distanceSq:i,callback:n})}},d=[this.replayGroup_];return this.declutterExecutorGroup&&d.push(this.declutterExecutorGroup),d.some(function(n){return o=n.forEachFeatureAtCoordinate(t,a,l,i,u,n===s.declutterExecutorGroup?e.declutterTree.all().map(function(t){return t.value}):null)}),o}},e.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.prepareFrame=function(t){var e=this.getLayer(),i=e.getSource();if(!i)return!1;var n=t.viewHints[0],r=t.viewHints[1],s=e.getUpdateWhileAnimating(),o=e.getUpdateWhileInteracting();if(!this.dirty_&&!s&&n||!o&&r)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;var a=t.extent,l=t.viewState,c=l.projection,h=l.resolution,u=t.pixelRatio,d=e.getRevision(),p=e.getRenderBuffer(),f=e.getRenderOrder();void 0===f&&(f=Mq);var m=l.center.slice(),g=xS(a,p*h),A=[g.slice()],b=c.getExtent();if(i.getWrapX()&&c.canWrapX()&&!ES(b,t.extent)){var v=YS(b),_=Math.max(YS(g)/2,v);g[0]=b[0]-_,g[2]=b[2]+_,Qk(m,c);var y=function(t,e){var i=e.getExtent(),n=HS(t);if(e.canWrapX()&&(n[0]<i[0]||n[0]>=i[2])){var r=YS(i),s=Math.floor((n[0]-i[0])/r)*r;t[0]-=s,t[2]-=s}return t}(A[0],c);y[0]<b[0]&&y[2]<b[2]?A.push([y[0]+v,y[1],y[2]+v,y[3]]):y[0]>b[0]&&y[2]>b[2]&&A.push([y[0]-v,y[1],y[2]-v,y[3]])}if(!this.dirty_&&this.renderedResolution_==h&&this.renderedRevision_==d&&this.renderedRenderOrder_==f&&ES(this.renderedExtent_,g))return this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;var w,x,C,S=new cq(Rq(h,u),g,h,u);for(this.getLayer().getDeclutter()&&(w=new cq(Rq(h,u),g,h,u)),x=0,C=A.length;x<C;++x)i.loadFeatures(A[x],h,c);var k=Tq(h,u),E=(function(t){var i,n=t.getStyleFunction()||e.getStyleFunction();if(n&&(i=n(t,h)),i){var r=this.renderFeature(t,k,i,S,undefined,w);this.dirty_=this.dirty_||r}}).bind(this),D=fE(g),I=i.getFeaturesInExtent(D);for(f&&I.sort(f),x=0,C=I.length;x<C;++x)E(I[x]);this.renderedFeatures_=I;var P=S.finish(),O=new xq(g,h,u,i.getOverlaps(),P,e.getRenderBuffer());return w&&(this.declutterExecutorGroup=new xq(g,h,u,i.getOverlaps(),w.finish(),e.getRenderBuffer())),this.renderedResolution_=h,this.renderedRevision_=d,this.renderedRenderOrder_=f,this.renderedExtent_=g,this.renderedCenter_=m,this.renderedProjection_=c,this.replayGroup_=O,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0},e.prototype.renderFeature=function(t,e,i,n,r,s){if(!i)return!1;var o=!1;if(Array.isArray(i))for(var a=0,l=i.length;a<l;++a)o=Vq(n,t,i[a],e,this.boundHandleStyleImageChange_,r,s)||o;else o=Vq(n,t,i,e,this.boundHandleStyleImageChange_,r,s);return o},e}(lW),Bq=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Nq=function(t){function e(e){return t.call(this,e)||this}return Bq(e,t),e.prototype.createRenderer=function(){return new Uq(this)},e}(HZ);function jq(t,e){return[[-1/0,-1/0,1/0,1/0]]}function zq(t,e){return function(i,n,r,s,o){var a=this;!function(t,e,i,n,r,s,o){var a=new XMLHttpRequest;a.open("GET","function"==typeof t?t(i,n,r):t,!0),"arraybuffer"==e.getType()&&(a.responseType="arraybuffer"),a.withCredentials=!1,a.onload=function(t){if(!a.status||a.status>=200&&a.status<300){var n=e.getType(),l=void 0;"json"==n||"text"==n?l=a.responseText:"xml"==n?(l=a.responseXML)||(l=(new DOMParser).parseFromString(a.responseText,"application/xml")):"arraybuffer"==n&&(l=a.response),l?s(e.readFeatures(l,{extent:i,featureProjection:r}),e.readProjection(l)):o()}else o()},a.onerror=o,a.send()}(t,e,i,n,r,function(t,e){void 0!==s&&s(t),a.addFeatures(t)},o||jC)}}var Hq=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Kq=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r.feature=i,r.features=n,r}return Hq(e,t),e}(MC),$q=function(t){function e(e){var i=this,n=e||{};(i=t.call(this,{attributions:n.attributions,projection:void 0,state:"ready",wrapX:void 0===n.wrapX||n.wrapX})||this).loader_=jC,i.format_=n.format,i.overlaps_=void 0===n.overlaps||n.overlaps,i.url_=n.url,void 0!==n.loader?i.loader_=n.loader:void 0!==i.url_&&(yS(i.format_,7),i.loader_=zq(i.url_,i.format_)),i.strategy_=void 0!==n.strategy?n.strategy:jq;var r,s,o=void 0===n.useSpatialIndex||n.useSpatialIndex;return i.featuresRtree_=o?new EZ:null,i.loadedExtentsRtree_=new EZ,i.nullGeometryFeatures_={},i.idIndex_={},i.uidIndex_={},i.featureChangeKeys_={},i.featuresCollection_=null,Array.isArray(n.features)?s=n.features:n.features&&(s=(r=n.features).getArray()),o||void 0!==r||(r=new j$(s)),void 0!==s&&i.addFeaturesInternal(s),void 0!==r&&i.bindFeaturesCollection_(r),i}return Hq(e,t),e.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},e.prototype.addFeatureInternal=function(t){var e=YC(t);if(this.addToIndex_(e,t)){this.setupChangeEvents_(e,t);var i=t.getGeometry();if(i){var n=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(n,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new Kq("addfeature",t))}else this.featuresCollection_&&this.featuresCollection_.remove(t)},e.prototype.setupChangeEvents_=function(t,e){this.featureChangeKeys_[t]=[tk(e,"change",this.handleFeatureChange_,this),tk(e,"propertychange",this.handleFeatureChange_,this)]},e.prototype.addToIndex_=function(t,e){var i=!0,n=e.getId();return void 0!==n&&(n.toString()in this.idIndex_?i=!1:this.idIndex_[n.toString()]=e),i&&(yS(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),i},e.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},e.prototype.addFeaturesInternal=function(t){for(var e=[],i=[],n=[],r=0,s=t.length;r<s;r++){var o=YC(l=t[r]);this.addToIndex_(o,l)&&i.push(l)}r=0;for(var a=i.length;r<a;r++){var l;o=YC(l=i[r]),this.setupChangeEvents_(o,l);var c=l.getGeometry();if(c){var h=c.getExtent();e.push(h),n.push(l)}else this.nullGeometryFeatures_[o]=l}this.featuresRtree_&&this.featuresRtree_.load(e,n),r=0;for(var u=i.length;r<u;r++)this.dispatchEvent(new Kq("addfeature",i[r]))},e.prototype.bindFeaturesCollection_=function(t){var e=!1;this.addEventListener("addfeature",function(i){e||(e=!0,t.push(i.feature),e=!1)}),this.addEventListener("removefeature",function(i){e||(e=!0,t.remove(i.feature),e=!1)}),t.addEventListener("add",(function(t){e||(e=!0,this.addFeature(t.element),e=!1)}).bind(this)),t.addEventListener("remove",(function(t){e||(e=!0,this.removeFeature(t.element),e=!1)}).bind(this)),this.featuresCollection_=t},e.prototype.clear=function(t){if(t){for(var e in this.featureChangeKeys_)this.featureChangeKeys_[e].forEach(ik);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_)for(var i in this.featuresRtree_.forEach(this.removeFeatureInternal.bind(this)),this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[i]);this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};var n=new Kq("clear");this.dispatchEvent(n),this.changed()},e.prototype.forEachFeature=function(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)},e.prototype.forEachFeatureAtCoordinateDirect=function(t,e){return this.forEachFeatureInExtent([t[0],t[1],t[0],t[1]],function(i){return i.getGeometry().intersectsCoordinate(t)?e(i):void 0})},e.prototype.forEachFeatureInExtent=function(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)},e.prototype.forEachFeatureIntersectingExtent=function(t,e){return this.forEachFeatureInExtent(t,function(i){if(i.getGeometry().intersectsExtent(t)){var n=e(i);if(n)return n}})},e.prototype.getFeaturesCollection=function(){return this.featuresCollection_},e.prototype.getFeatures=function(){var t;return this.featuresCollection_?t=this.featuresCollection_.getArray():this.featuresRtree_&&(t=this.featuresRtree_.getAll(),$C(this.nullGeometryFeatures_)||LC(t,KC(this.nullGeometryFeatures_))),t},e.prototype.getFeaturesAtCoordinate=function(t){var e=[];return this.forEachFeatureAtCoordinateDirect(t,function(t){e.push(t)}),e},e.prototype.getFeaturesInExtent=function(t){return this.featuresRtree_?this.featuresRtree_.getInExtent(t):this.featuresCollection_?this.featuresCollection_.getArray():[]},e.prototype.getClosestFeatureToCoordinate=function(t,e){var i=t[0],n=t[1],r=null,s=[NaN,NaN],o=1/0,a=[-1/0,-1/0,1/0,1/0],l=e||BC;return this.featuresRtree_.forEachInExtent(a,function(t){if(l(t)){var e=t.getGeometry(),c=o;if((o=e.closestPointXY(i,n,s,o))<c){r=t;var h=Math.sqrt(o);a[0]=i-h,a[1]=n-h,a[2]=i+h,a[3]=n+h}}}),r},e.prototype.getExtent=function(t){return this.featuresRtree_.getExtent(t)},e.prototype.getFeatureById=function(t){var e=this.idIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getFeatureByUid=function(t){var e=this.uidIndex_[t];return void 0!==e?e:null},e.prototype.getFormat=function(){return this.format_},e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.getUrl=function(){return this.url_},e.prototype.handleFeatureChange_=function(t){var e=t.target,i=YC(e),n=e.getGeometry();if(n){var r=n.getExtent();i in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[i],this.featuresRtree_&&this.featuresRtree_.insert(r,e)):this.featuresRtree_&&this.featuresRtree_.update(r,e)}else i in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[i]=e);var s=e.getId();if(void 0!==s){var o=s.toString();this.idIndex_[o]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[o]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[i]=e;this.changed(),this.dispatchEvent(new Kq("changefeature",e))},e.prototype.hasFeature=function(t){var e=t.getId();return void 0!==e?e in this.idIndex_:YC(t)in this.uidIndex_},e.prototype.isEmpty=function(){return this.featuresRtree_.isEmpty()&&$C(this.nullGeometryFeatures_)},e.prototype.loadFeatures=function(t,e,i){var n=this.loadedExtentsRtree_,r=this.strategy_(t,e);this.loading=!1;for(var s=function(t,s){var a=r[t];n.forEachInExtent(a,function(t){return ES(t.extent,a)})||(o.dispatchEvent(new Kq("featuresloadstart")),o.loader_.call(o,a,e,i,(function(t){this.dispatchEvent(new Kq("featuresloadend",void 0,t))}).bind(o),(function(){this.dispatchEvent(new Kq("featuresloaderror"))}).bind(o)),n.insert(a,{extent:a.slice()}),o.loading=o.loader_!==jC)},o=this,a=0,l=r.length;a<l;++a)s(a)},e.prototype.refresh=function(){this.clear(!0),this.loadedExtentsRtree_.clear(),t.prototype.refresh.call(this)},e.prototype.removeLoadedExtent=function(t){var e,i=this.loadedExtentsRtree_;i.forEachInExtent(t,function(i){if(RS(i.extent,t))return e=i,!0}),e&&i.remove(e)},e.prototype.removeFeature=function(t){var e=YC(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t),this.changed()},e.prototype.removeFeatureInternal=function(t){var e=YC(t);this.featureChangeKeys_[e].forEach(ik),delete this.featureChangeKeys_[e];var i=t.getId();void 0!==i&&delete this.idIndex_[i.toString()],delete this.uidIndex_[e],this.dispatchEvent(new Kq("removefeature",t))},e.prototype.removeFromIdIndex_=function(t){var e=!1;for(var i in this.idIndex_)if(this.idIndex_[i]===t){delete this.idIndex_[i],e=!0;break}return e},e.prototype.setLoader=function(t){this.loader_=t},e.prototype.setUrl=function(t){yS(this.format_,7),this.setLoader(zq(t,this.format_))},e}(zE),Gq=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Wq=[0,0,0,0],Zq=[],qq=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r.features=i,r.mapBrowserEvent=n,r}return Gq(e,t),e}(MC);function Yq(t,e){return t.index-e.index}function Qq(t,e,i){var n=e.geometry;if("Circle"===n.getType()){var r=n;if(1===e.index){var s=Wk(r.getCenter(),pE(t)),o=Math.sqrt(s)-r.getRadius();return o*o}}var a=pE(t);return Zq[0]=pE(e.segment[0]),Zq[1]=pE(e.segment[1]),qk(a,Zq)}function Xq(t,e,i){var n=e.geometry;if("Circle"===n.getType()&&1===e.index)return dE(n.getClosestPoint(pE(t)));var r=pE(t);return Zq[0]=pE(e.segment[0]),Zq[1]=pE(e.segment[1]),dE(Hk(r,Zq))}var Jq=function(t){function e(e){var i,n,r=t.call(this,e)||this;if(r.boundHandleFeatureChange_=r.handleFeatureChange_.bind(r),r.condition_=e.condition?e.condition:aG,r.defaultDeleteCondition_=function(t){return function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey}(t)&&function(t){return t.type==$$.SINGLECLICK}(t)},r.deleteCondition_=e.deleteCondition?e.deleteCondition:r.defaultDeleteCondition_,r.insertVertexCondition_=e.insertVertexCondition?e.insertVertexCondition:tG,r.vertexFeature_=null,r.vertexSegments_=null,r.lastPixel_=[0,0],r.ignoreNextSingleClick_=!1,r.featuresBeingModified_=null,r.rBush_=new EZ,r.pixelTolerance_=void 0!==e.pixelTolerance?e.pixelTolerance:10,r.snappedToVertex_=!1,r.changingFeature_=!1,r.dragSegments_=[],r.overlay_=new Nq({source:new $q({useSpatialIndex:!1,wrapX:!!e.wrapX}),style:e.style?e.style:(i=BZ(),function(t,e){return i.Point}),updateWhileAnimating:!0,updateWhileInteracting:!0}),r.SEGMENT_WRITERS_={Point:r.writePointGeometry_.bind(r),LineString:r.writeLineStringGeometry_.bind(r),LinearRing:r.writeLineStringGeometry_.bind(r),Polygon:r.writePolygonGeometry_.bind(r),MultiPoint:r.writeMultiPointGeometry_.bind(r),MultiLineString:r.writeMultiLineStringGeometry_.bind(r),MultiPolygon:r.writeMultiPolygonGeometry_.bind(r),Circle:r.writeCircleGeometry_.bind(r),GeometryCollection:r.writeGeometryCollectionGeometry_.bind(r)},r.source_=null,r.hitDetection_=null,e.features?n=e.features:e.source&&(r.source_=e.source,n=new j$(r.source_.getFeatures()),r.source_.addEventListener("addfeature",r.handleSourceAdd_.bind(r)),r.source_.addEventListener("removefeature",r.handleSourceRemove_.bind(r))),!n)throw new Error("The modify interaction requires features, a source or a layer");return e.hitDetection&&(r.hitDetection_=e.hitDetection),r.features_=n,r.features_.forEach(r.addFeature_.bind(r)),r.features_.addEventListener("add",r.handleFeatureAdd_.bind(r)),r.features_.addEventListener("remove",r.handleFeatureRemove_.bind(r)),r.lastPointerEvent_=null,r.delta_=[0,0],r}return Gq(e,t),e.prototype.addFeature_=function(t){var e=t.getGeometry();if(e){var i=this.SEGMENT_WRITERS_[e.getType()];i&&i(t,e)}var n=this.getMap();n&&n.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,n),t.addEventListener("change",this.boundHandleFeatureChange_)},e.prototype.willModifyFeatures_=function(t,e){if(!this.featuresBeingModified_){this.featuresBeingModified_=new j$;for(var i=this.featuresBeingModified_.getArray(),n=0,r=e.length;n<r;++n){var s=e[n][0].feature;-1===i.indexOf(s)&&this.featuresBeingModified_.push(s)}this.dispatchEvent(new qq("modifystart",this.featuresBeingModified_,t))}},e.prototype.removeFeature_=function(t){this.removeFeatureSegmentData_(t),this.vertexFeature_&&0===this.features_.getLength()&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.removeEventListener("change",this.boundHandleFeatureChange_)},e.prototype.removeFeatureSegmentData_=function(t){var e=this.rBush_,i=[];e.forEach(function(e){t===e.feature&&i.push(e)});for(var n=i.length-1;n>=0;--n){for(var r=i[n],s=this.dragSegments_.length-1;s>=0;--s)this.dragSegments_[s][0]===r&&this.dragSegments_.splice(s,1);e.remove(r)}},e.prototype.setActive=function(e){this.vertexFeature_&&!e&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.prototype.setActive.call(this,e)},e.prototype.setMap=function(e){this.overlay_.setMap(e),t.prototype.setMap.call(this,e)},e.prototype.getOverlay=function(){return this.overlay_},e.prototype.handleSourceAdd_=function(t){t.feature&&this.features_.push(t.feature)},e.prototype.handleSourceRemove_=function(t){t.feature&&this.features_.remove(t.feature)},e.prototype.handleFeatureAdd_=function(t){this.addFeature_(t.element)},e.prototype.handleFeatureChange_=function(t){if(!this.changingFeature_){var e=t.target;this.removeFeature_(e),this.addFeature_(e)}},e.prototype.handleFeatureRemove_=function(t){this.removeFeature_(t.element)},e.prototype.writePointGeometry_=function(t,e){var i=e.getCoordinates(),n={feature:t,geometry:e,segment:[i,i]};this.rBush_.insert(e.getExtent(),n)},e.prototype.writeMultiPointGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length;n<r;++n){var s=i[n],o={feature:t,geometry:e,depth:[n],index:n,segment:[s,s]};this.rBush_.insert(e.getExtent(),o)}},e.prototype.writeLineStringGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length-1;n<r;++n){var s=i.slice(n,n+2),o={feature:t,geometry:e,index:n,segment:s};this.rBush_.insert(wS(s),o)}},e.prototype.writeMultiLineStringGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length;n<r;++n)for(var s=i[n],o=0,a=s.length-1;o<a;++o){var l=s.slice(o,o+2),c={feature:t,geometry:e,depth:[n],index:o,segment:l};this.rBush_.insert(wS(l),c)}},e.prototype.writePolygonGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length;n<r;++n)for(var s=i[n],o=0,a=s.length-1;o<a;++o){var l=s.slice(o,o+2),c={feature:t,geometry:e,depth:[n],index:o,segment:l};this.rBush_.insert(wS(l),c)}},e.prototype.writeMultiPolygonGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length;n<r;++n)for(var s=i[n],o=0,a=s.length;o<a;++o)for(var l=s[o],c=0,h=l.length-1;c<h;++c){var u=l.slice(c,c+2),d={feature:t,geometry:e,depth:[o,n],index:c,segment:u};this.rBush_.insert(wS(u),d)}},e.prototype.writeCircleGeometry_=function(t,e){var i=e.getCenter(),n={feature:t,geometry:e,index:0,segment:[i,i]},r={feature:t,geometry:e,index:1,segment:[i,i]},s=[n,r];n.featureSegments=s,r.featureSegments=s,this.rBush_.insert(MS(i),n),this.rBush_.insert(e.getExtent(),r)},e.prototype.writeGeometryCollectionGeometry_=function(t,e){for(var i=e.getGeometriesArray(),n=0;n<i.length;++n){var r=i[n];(0,this.SEGMENT_WRITERS_[r.getType()])(t,r)}},e.prototype.createOrUpdateVertexFeature_=function(t,e,i){var n=this.vertexFeature_;return n?n.getGeometry().setCoordinates(t):(n=new pH(new jM(t)),this.vertexFeature_=n,this.overlay_.getSource().addFeature(n)),n.set("features",e),n.set("geometries",i),n},e.prototype.handleEvent=function(e){return!e.originalEvent||(this.lastPointerEvent_=e,e.map.getView().getInteracting()||e.type!=$$.POINTERMOVE||this.handlingDownUpSequence||this.handlePointerMove_(e),this.vertexFeature_&&this.deleteCondition_(e)&&(i=!(e.type!=$$.SINGLECLICK||!this.ignoreNextSingleClick_)||this.removePoint()),e.type==$$.SINGLECLICK&&(this.ignoreNextSingleClick_=!1),t.prototype.handleEvent.call(this,e)&&!i);var i},e.prototype.handleDragEvent=function(t){this.ignoreNextSingleClick_=!1,this.willModifyFeatures_(t,this.dragSegments_);for(var e=[t.coordinate[0]+this.delta_[0],t.coordinate[1]+this.delta_[1]],i=[],n=[],r=0,s=this.dragSegments_.length;r<s;++r){var o=this.dragSegments_[r],a=o[0],l=a.feature;-1===i.indexOf(l)&&i.push(l);var c=a.geometry;-1===n.indexOf(c)&&n.push(c);for(var h=a.depth,u=void 0,d=a.segment,p=o[1];e.length<c.getStride();)e.push(d[p][e.length]);switch(c.getType()){case"Point":u=e,d[0]=e,d[1]=e;break;case"MultiPoint":(u=c.getCoordinates())[a.index]=e,d[0]=e,d[1]=e;break;case"LineString":(u=c.getCoordinates())[a.index+p]=e,d[p]=e;break;case"MultiLineString":case"Polygon":(u=c.getCoordinates())[h[0]][a.index+p]=e,d[p]=e;break;case"MultiPolygon":(u=c.getCoordinates())[h[1]][h[0]][a.index+p]=e,d[p]=e;break;case"Circle":if(d[0]=e,d[1]=e,0===a.index)this.changingFeature_=!0,c.setCenter(e),this.changingFeature_=!1;else{this.changingFeature_=!0,t.map.getView().getProjection();var f=Zk(pE(c.getCenter()),pE(e));c.setRadius(f),this.changingFeature_=!1}}u&&this.setGeometryCoordinates_(c,u)}this.createOrUpdateVertexFeature_(e,i,n)},e.prototype.handleDownEvent=function(t){if(!this.condition_(t))return!1;var e=t.coordinate;this.handlePointerAtPixel_(t.pixel,t.map,e),this.dragSegments_.length=0,this.featuresBeingModified_=null;var i=this.vertexFeature_;if(i){t.map.getView().getProjection();var n=[],r=i.getGeometry().getCoordinates(),s=wS([r]),o=this.rBush_.getInExtent(s),a={};o.sort(Yq);for(var l=0,c=o.length;l<c;++l){var h=o[l],u=h.segment,d=YC(h.geometry),p=h.depth;if(p&&(d+="-"+p.join("-")),a[d]||(a[d]=new Array(2)),"Circle"!==h.geometry.getType()||1!==h.index)if(!$k(u[0],r)||a[d][0])if(!$k(u[1],r)||a[d][1])YC(u)in this.vertexSegments_&&!a[d][0]&&!a[d][1]&&this.insertVertexCondition_(t)&&n.push(h);else{if(("LineString"===h.geometry.getType()||"MultiLineString"===h.geometry.getType())&&a[d][0]&&0===a[d][0].index)continue;this.dragSegments_.push([h,1]),a[d][1]=h}else this.dragSegments_.push([h,0]),a[d][0]=h;else $k(Xq(e,h),r)&&!a[d][0]&&(this.dragSegments_.push([h,0]),a[d][0]=h)}n.length&&this.willModifyFeatures_(t,[n]);for(var f=n.length-1;f>=0;--f)this.insertVertex_(n[f],r)}return!!this.vertexFeature_},e.prototype.handleUpEvent=function(t){for(var e=this.dragSegments_.length-1;e>=0;--e){var i=this.dragSegments_[e][0],n=i.geometry;if("Circle"===n.getType()){var r=n.getCenter(),s=i.featureSegments[0],o=i.featureSegments[1];s.segment[0]=r,s.segment[1]=r,o.segment[0]=r,o.segment[1]=r,this.rBush_.update(MS(r),s),this.rBush_.update(n.getExtent(),o)}else this.rBush_.update(wS(i.segment),i)}return this.featuresBeingModified_&&(this.dispatchEvent(new qq("modifyend",this.featuresBeingModified_,t)),this.featuresBeingModified_=null),!1},e.prototype.handlePointerMove_=function(t){this.lastPixel_=t.pixel,this.handlePointerAtPixel_(t.pixel,t.map,t.coordinate)},e.prototype.handlePointerAtPixel_=function(t,e,i){var n,r,s=this,o=i||e.getCoordinateFromPixel(t);if(e.getView().getProjection(),this.hitDetection_&&e.forEachFeatureAtPixel(t,function(t,e,i){if("Point"===(i=i||t.getGeometry()).getType()){r=i;var s=i.getCoordinates();n=[{feature:t,geometry:i,segment:[s,s]}]}return!0},{layerFilter:"object"==typeof this.hitDetection_?function(t){return t===s.hitDetection_}:void 0}),!n){var a=fE(xS(mE(MS(o,Wq)),e.getView().getResolution()*this.pixelTolerance_,Wq));n=this.rBush_.getInExtent(a)}if(n&&n.length>0){var l=n.sort(function(t,e){return Qq(o,t)-Qq(o,e)})[0],c=l.segment,h=Xq(o,l),u=e.getPixelFromCoordinate(h),d=Zk(t,u);if(r||d<=this.pixelTolerance_){var p={};if(p[YC(c)]=!0,this.delta_[0]=h[0]-o[0],this.delta_[1]=h[1]-o[1],"Circle"===l.geometry.getType()&&1===l.index)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(h,[l.feature],[l.geometry]);else{var f=e.getPixelFromCoordinate(c[0]),m=e.getPixelFromCoordinate(c[1]),g=Wk(u,f),A=Wk(u,m);d=Math.sqrt(Math.min(g,A)),this.snappedToVertex_=d<=this.pixelTolerance_,this.snappedToVertex_&&(h=g>A?c[1]:c[0]),this.createOrUpdateVertexFeature_(h,[l.feature],[l.geometry]);var b={};b[YC(l.geometry)]=!0;for(var v=1,_=n.length;v<_;++v){var y=n[v].segment;if(!($k(c[0],y[0])&&$k(c[1],y[1])||$k(c[0],y[1])&&$k(c[1],y[0])))break;var w=YC(n[v].geometry);w in b||(b[w]=!0,p[YC(y)]=!0)}}return void(this.vertexSegments_=p)}}this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null)},e.prototype.insertVertex_=function(t,e){for(var i,n=t.segment,r=t.feature,s=t.geometry,o=t.depth,a=t.index;e.length<s.getStride();)e.push(0);switch(s.getType()){case"MultiLineString":case"Polygon":(i=s.getCoordinates())[o[0]].splice(a+1,0,e);break;case"MultiPolygon":(i=s.getCoordinates())[o[1]][o[0]].splice(a+1,0,e);break;case"LineString":(i=s.getCoordinates()).splice(a+1,0,e);break;default:return}this.setGeometryCoordinates_(s,i);var l=this.rBush_;l.remove(t),this.updateSegmentIndices_(s,a,o,1);var c={segment:[n[0],e],feature:r,geometry:s,depth:o,index:a};l.insert(wS(c.segment),c),this.dragSegments_.push([c,1]);var h={segment:[e,n[1]],feature:r,geometry:s,depth:o,index:a+1};l.insert(wS(h.segment),h),this.dragSegments_.push([h,0]),this.ignoreNextSingleClick_=!0},e.prototype.removePoint=function(){if(this.lastPointerEvent_&&this.lastPointerEvent_.type!=$$.POINTERDRAG){var t=this.lastPointerEvent_;this.willModifyFeatures_(t,this.dragSegments_);var e=this.removeVertex_();return this.dispatchEvent(new qq("modifyend",this.featuresBeingModified_,t)),this.featuresBeingModified_=null,e}return!1},e.prototype.removeVertex_=function(){var t,e,i,n,r,s,o,a,l,c,h,u=this.dragSegments_,d={},p=!1;for(r=u.length-1;r>=0;--r)h=YC((c=(i=u[r])[0]).feature),c.depth&&(h+="-"+c.depth.join("-")),h in d||(d[h]={}),0===i[1]?(d[h].right=c,d[h].index=c.index):1==i[1]&&(d[h].left=c,d[h].index=c.index+1);for(h in d){switch(l=d[h].right,(a=(s=d[h].index)-1)<0&&(a=0),t=e=(n=(c=void 0!==(o=d[h].left)?o:l).geometry).getCoordinates(),p=!1,n.getType()){case"MultiLineString":e[c.depth[0]].length>2&&(e[c.depth[0]].splice(s,1),p=!0);break;case"LineString":e.length>2&&(e.splice(s,1),p=!0);break;case"MultiPolygon":t=t[c.depth[1]];case"Polygon":(t=t[c.depth[0]]).length>4&&(s==t.length-1&&(s=0),t.splice(s,1),p=!0,0===s&&(t.pop(),t.push(t[0]),a=t.length-1))}if(p){this.setGeometryCoordinates_(n,e);var f=[];if(void 0!==o&&(this.rBush_.remove(o),f.push(o.segment[0])),void 0!==l&&(this.rBush_.remove(l),f.push(l.segment[1])),void 0!==o&&void 0!==l){var m={depth:c.depth,feature:c.feature,geometry:c.geometry,index:a,segment:f};this.rBush_.insert(wS(m.segment),m)}this.updateSegmentIndices_(n,s,c.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),u.length=0}}return p},e.prototype.setGeometryCoordinates_=function(t,e){this.changingFeature_=!0,t.setCoordinates(e),this.changingFeature_=!1},e.prototype.updateSegmentIndices_=function(t,e,i,n){this.rBush_.forEachInExtent(t.getExtent(),function(r){r.geometry===t&&(void 0===i||void 0===r.depth||UC(r.depth,i))&&r.index>e&&(r.index+=n)})},e}(Y$),tY=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),eY=function(t){function e(e,i,n){var r=t.call(this)||this;return void 0!==n&&void 0===i?r.setFlatCoordinates(n,e):r.setCenterAndRadius(e,i||0,n),r}return tY(e,t),e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,i,n){var r=this.flatCoordinates,s=t-r[0],o=e-r[1],a=s*s+o*o;if(a<n){if(0===a)for(var l=0;l<this.stride;++l)i[l]=r[l];else{var c=this.getRadius()/Math.sqrt(a);for(i[0]=r[0]+c*s,i[1]=r[1]+c*o,l=2;l<this.stride;++l)i[l]=r[l]}return i.length=this.stride,a}return n},e.prototype.containsXY=function(t,e){var i=this.flatCoordinates,n=t-i[0],r=e-i[1];return n*n+r*r<=this.getRadiusSquared_()},e.prototype.getCenter=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.computeExtent=function(t){var e=this.flatCoordinates,i=e[this.stride]-e[0];return PS(e[0]-i,e[1]-i,e[0]+i,e[1]+i,t)},e.prototype.getRadius=function(){return Math.sqrt(this.getRadiusSquared_())},e.prototype.getRadiusSquared_=function(){var t=this.flatCoordinates[this.stride]-this.flatCoordinates[0],e=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return t*t+e*e},e.prototype.getType=function(){return"Circle"},e.prototype.intersectsExtent=function(t){if(QS(t,this.getExtent())){var e=this.getCenter();return t[0]<=e[0]&&t[2]>=e[0]||t[1]<=e[1]&&t[3]>=e[1]||BS(t,this.intersectsCoordinate.bind(this))}return!1},e.prototype.setCenter=function(t){var e=this.stride,i=this.flatCoordinates[e]-this.flatCoordinates[0],n=t.slice();n[e]=n[0]+i;for(var r=1;r<e;++r)n[e+r]=t[r];this.setFlatCoordinates(this.layout,n),this.changed()},e.prototype.setCenterAndRadius=function(t,e,i){this.setLayout(i,t,0),this.flatCoordinates||(this.flatCoordinates=[]);var n=this.flatCoordinates,r=kM(n,0,t);n[r++]=n[0]+e;for(var s=1,o=this.stride;s<o;++s)n[r++]=n[s];n.length=r,this.changed()},e.prototype.getCoordinates=function(){return null},e.prototype.setCoordinates=function(t,e){},e.prototype.setRadius=function(t){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+t,this.changed()},e.prototype.rotate=function(t,e){var i=this.getCenter(),n=this.getStride();this.setCenter(pM(i,0,i.length,n,t,e,i)),this.changed()},e.prototype.translate=function(t,e){var i=this.getCenter(),n=this.getStride();this.setCenter(fM(i,0,i.length,n,t,e,i)),this.changed()},e}(_M),iY=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),nY=function(t){function e(e,i){var n=t.call(this,e)||this;return n.feature=i,n}return iY(e,t),e}(MC),rY=function(t){function e(e){var i,n,r=this,s=e;s.stopDown||(s.stopDown=NC),(r=t.call(this,s)||this).shouldHandle_=!1,r.downPx_=null,r.freehand_=!1,r.source_=e.source?e.source:null,r.features_=e.features?e.features:null,r.snapTolerance_=e.snapTolerance?e.snapTolerance:12,r.type_=e.type,r.mode_=("Point"===(i=r.type_)||"MultiPoint"===i?n="Point":"LineString"===i||"MultiLineString"===i?n="LineString":"Polygon"===i||"MultiPolygon"===i?n="Polygon":"Circle"===i&&(n="Circle"),n),r.stopClick_=!!e.stopClick,r.minPoints_=e.minPoints?e.minPoints:"Polygon"===r.mode_?3:2,r.maxPoints_="Circle"===r.mode_?2:e.maxPoints?e.maxPoints:1/0,r.finishCondition_=e.finishCondition?e.finishCondition:BC;var o,a=e.geometryFunction;if(!a){var l,c=r.mode_;"Circle"===c?a=function(t,e,i){var n=e||new eY([NaN,NaN]),r=pE(t[0]),s=Wk(r,pE(t[t.length-1]));return n.setCenterAndRadius(r,Math.sqrt(s)),n}:("Point"===c?l=jM:"LineString"===c?l=kH:"Polygon"===c&&(l=iT),a=function(t,e,i){return e?e.setCoordinates("Polygon"===c?t[0].length?[t[0].concat([t[0][0]])]:[]:t):e=new l(t),e})}return r.geometryFunction_=a,r.dragVertexDelay_=void 0!==e.dragVertexDelay?e.dragVertexDelay:500,r.finishCoordinate_=null,r.sketchFeature_=null,r.sketchPoint_=null,r.sketchCoords_=null,r.sketchLine_=null,r.sketchLineCoords_=null,r.squaredClickTolerance_=e.clickTolerance?e.clickTolerance*e.clickTolerance:36,r.overlay_=new Nq({source:new $q({useSpatialIndex:!1,wrapX:!!e.wrapX&&e.wrapX}),style:e.style?e.style:(o=BZ(),function(t,e){return o[t.getGeometry().getType()]}),updateWhileInteracting:!0}),r.geometryName_=e.geometryName,r.condition_=e.condition?e.condition:iG,r.freehandCondition_=e.freehand?tG:e.freehandCondition?e.freehandCondition:rG,r.addEventListener(UE("active"),r.updateState_),r}return iY(e,t),e.prototype.setMap=function(e){t.prototype.setMap.call(this,e),this.updateState_()},e.prototype.getOverlay=function(){return this.overlay_},e.prototype.handleEvent=function(e){"contextmenu"===e.originalEvent.type&&e.originalEvent.preventDefault(),this.freehand_="Point"!==this.mode_&&this.freehandCondition_(e);var i=e.type===$$.POINTERMOVE,n=!0;return!this.freehand_&&this.lastDragTime_&&e.type===$$.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=e.pixel,this.shouldHandle_=!this.freehand_,i=!0):this.lastDragTime_=void 0,this.shouldHandle_&&void 0!==this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)),this.freehand_&&e.type===$$.POINTERDRAG&&null!==this.sketchFeature_?(this.addToDrawing_(e.coordinate),n=!1):this.freehand_&&e.type===$$.POINTERDOWN?n=!1:i&&this.getPointerCount()<2?(n=e.type===$$.POINTERMOVE)&&this.freehand_?(this.handlePointerMove_(e),this.shouldHandle_&&e.originalEvent.preventDefault()):("mouse"===e.originalEvent.pointerType||e.type===$$.POINTERDRAG&&void 0===this.downTimeout_)&&this.handlePointerMove_(e):e.type===$$.DBLCLICK&&(n=!1),t.prototype.handleEvent.call(this,e)&&n},e.prototype.handleDownEvent=function(t){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=t.pixel,this.finishCoordinate_||this.startDrawing_(t.coordinate),!0):this.condition_(t)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout((function(){this.handlePointerMove_(new VW($$.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}).bind(this),this.dragVertexDelay_),this.downPx_=t.pixel,!0):(this.lastDragTime_=void 0,!1)},e.prototype.handleUpEvent=function(t){var e=!0;if(0===this.getPointerCount())if(this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(t),this.shouldHandle_){switch(!0){case!this.finishCoordinate_:if(this.startDrawing_(t.coordinate),"Point"!==this.mode_)break;case this.freehand_||this.atFinish_(t.pixel)&&this.finishCondition_(t):this.finishDrawing();break;case!this.freehand_:this.addToDrawing_(t.coordinate)}e=!1}else this.freehand_&&this.abortDrawing();return!e&&this.stopClick_&&t.originalEvent.stopPropagation(),e},e.prototype.handlePointerMove_=function(t){if(this.pointerType_=t.originalEvent.pointerType,this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){var e=this.downPx_,i=t.pixel,n=e[0]-i[0],r=e[1]-i[1],s=n*n+r*r;if(this.shouldHandle_=this.freehand_?s>this.squaredClickTolerance_:s<=this.squaredClickTolerance_,!this.shouldHandle_)return}this.finishCoordinate_?this.modifyDrawing_(t.coordinate):this.createOrUpdateSketchPoint_(t)},e.prototype.atFinish_=function(t){var e=!1;if(this.sketchFeature_){var i=!1,n=[this.finishCoordinate_],r=this.mode_;if("Point"===r)e=!0;else if("Circle"===r)e=2===this.sketchCoords_.length;else if("LineString"===r)i=this.sketchCoords_.length>this.minPoints_;else if("Polygon"===r){var s=this.sketchCoords_;i=s[0].length>this.minPoints_,n=[s[0][0],s[0][s[0].length-2]]}if(i)for(var o=this.getMap(),a=0,l=n.length;a<l;a++){var c=n[a],h=o.getPixelFromCoordinate(c),u=t[0]-h[0],d=t[1]-h[1],p=this.freehand_?1:this.snapTolerance_;if(e=Math.sqrt(u*u+d*d)<=p){this.finishCoordinate_=c;break}}}return e},e.prototype.createOrUpdateSketchPoint_=function(t){var e=t.coordinate.slice();this.sketchPoint_?this.sketchPoint_.getGeometry().setCoordinates(e):(this.sketchPoint_=new pH(new jM(e)),this.updateSketchFeatures_())},e.prototype.createOrUpdateCustomSketchLine_=function(t){this.sketchLine_||(this.sketchLine_=new pH);var e=t.getLinearRing(0),i=this.sketchLine_.getGeometry();i?(i.setFlatCoordinates(e.getLayout(),e.getFlatCoordinates()),i.changed()):(i=new kH(e.getFlatCoordinates(),e.getLayout()),this.sketchLine_.setGeometry(i))},e.prototype.startDrawing_=function(t){var e=this.getMap().getView().getProjection();this.finishCoordinate_=t,"Point"===this.mode_?this.sketchCoords_=t.slice():"Polygon"===this.mode_?(this.sketchCoords_=[[t.slice(),t.slice()]],this.sketchLineCoords_=this.sketchCoords_[0]):this.sketchCoords_=[t.slice(),t.slice()],this.sketchLineCoords_&&(this.sketchLine_=new pH(new kH(this.sketchLineCoords_)));var i=this.geometryFunction_(this.sketchCoords_,void 0,e);this.sketchFeature_=new pH,this.geometryName_&&this.sketchFeature_.setGeometryName(this.geometryName_),this.sketchFeature_.setGeometry(i),this.updateSketchFeatures_(),this.dispatchEvent(new nY("drawstart",this.sketchFeature_))},e.prototype.modifyDrawing_=function(t){var e,i,n=this.getMap(),r=this.sketchFeature_.getGeometry(),s=n.getView().getProjection();"Point"===this.mode_?i=this.sketchCoords_:"Polygon"===this.mode_?(i=(e=this.sketchCoords_[0])[e.length-1],this.atFinish_(n.getPixelFromCoordinate(t))&&(t=this.finishCoordinate_.slice())):i=(e=this.sketchCoords_)[e.length-1],i[0]=t[0],i[1]=t[1],this.geometryFunction_(this.sketchCoords_,r,s),this.sketchPoint_&&this.sketchPoint_.getGeometry().setCoordinates(t),"Polygon"===r.getType()&&"Polygon"!==this.mode_?this.createOrUpdateCustomSketchLine_(r):this.sketchLineCoords_&&this.sketchLine_.getGeometry().setCoordinates(this.sketchLineCoords_),this.updateSketchFeatures_()},e.prototype.addToDrawing_=function(t){var e,i,n=this.sketchFeature_.getGeometry(),r=this.getMap().getView().getProjection(),s=this.mode_;"LineString"===s||"Circle"===s?(this.finishCoordinate_=t.slice(),(i=this.sketchCoords_).length>=this.maxPoints_&&(this.freehand_?i.pop():e=!0),i.push(t.slice()),this.geometryFunction_(i,n,r)):"Polygon"===s&&((i=this.sketchCoords_[0]).length>=this.maxPoints_&&(this.freehand_?i.pop():e=!0),i.push(t.slice()),e&&(this.finishCoordinate_=i[0]),this.geometryFunction_(this.sketchCoords_,n,r)),this.updateSketchFeatures_(),e&&this.finishDrawing()},e.prototype.removeLastPoint=function(){if(this.sketchFeature_){var t,e=this.sketchFeature_.getGeometry(),i=this.getMap().getView().getProjection(),n=this.mode_;if("LineString"===n||"Circle"===n){if((t=this.sketchCoords_).splice(-2,1),t.length>=2){this.finishCoordinate_=t[t.length-2].slice();var r=this.finishCoordinate_.slice();t[t.length-1]=r,this.sketchPoint_.setGeometry(new jM(r))}this.geometryFunction_(t,e,i),"Polygon"===e.getType()&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(e)}else if("Polygon"===n){(t=this.sketchCoords_[0]).splice(-2,1);var s=this.sketchLine_.getGeometry();t.length>=2&&(r=t[t.length-2].slice(),t[t.length-1]=r,this.sketchPoint_.setGeometry(new jM(r))),s.setCoordinates(t),this.geometryFunction_(this.sketchCoords_,e,i)}1===t.length&&this.abortDrawing(),this.updateSketchFeatures_()}},e.prototype.finishDrawing=function(){var t=this.abortDrawing_();if(t){var e=this.sketchCoords_,i=t.getGeometry(),n=this.getMap().getView().getProjection();"LineString"===this.mode_?(e.pop(),this.geometryFunction_(e,i,n)):"Polygon"===this.mode_&&(e[0].pop(),this.geometryFunction_(e,i,n),e=i.getCoordinates()),"MultiPoint"===this.type_?t.setGeometry(new PH([e])):"MultiLineString"===this.type_?t.setGeometry(new DH([e])):"MultiPolygon"===this.type_&&t.setGeometry(new MH([e])),this.dispatchEvent(new nY("drawend",t)),this.features_&&this.features_.push(t),this.source_&&this.source_.addFeature(t)}},e.prototype.abortDrawing_=function(){this.finishCoordinate_=null;var t=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),t},e.prototype.abortDrawing=function(){var t=this.abortDrawing_();t&&this.dispatchEvent(new nY("drawabort",t))},e.prototype.appendCoordinates=function(t){var e,i=this.mode_,n=!this.sketchFeature_;if(n&&this.startDrawing_(t[0]),"LineString"===i||"Circle"===i)e=this.sketchCoords_;else{if("Polygon"!==i)return;e=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[]}n&&e.shift(),e.pop();for(var r=0;r<t.length;r++)this.addToDrawing_(t[r]);var s=t[t.length-1];this.addToDrawing_(s),this.modifyDrawing_(s)},e.prototype.extend=function(t){var e=t.getGeometry();this.sketchFeature_=t,this.sketchCoords_=e.getCoordinates();var i=this.sketchCoords_[this.sketchCoords_.length-1];this.finishCoordinate_=i.slice(),this.sketchCoords_.push(i.slice()),this.sketchPoint_=new pH(new jM(i)),this.updateSketchFeatures_(),this.dispatchEvent(new nY("drawstart",this.sketchFeature_))},e.prototype.updateSketchFeatures_=function(){var t=[];this.sketchFeature_&&t.push(this.sketchFeature_),this.sketchLine_&&t.push(this.sketchLine_),this.sketchPoint_&&t.push(this.sketchPoint_);var e=this.overlay_.getSource();e.clear(!0),e.addFeatures(t)},e.prototype.updateState_=function(){var t=this.getMap(),e=this.getActive();t&&e||this.abortDrawing(),this.overlay_.setMap(e?t:null)},e}(Y$),sY=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function oY(t){return t.feature?t.feature:t.element?t.element:void 0}var aY=[],lY=function(t){function e(e){var i=this,n=e||{},r=n;return r.handleDownEvent||(r.handleDownEvent=BC),r.stopDown||(r.stopDown=NC),(i=t.call(this,r)||this).source_=n.source?n.source:null,i.vertex_=void 0===n.vertex||n.vertex,i.edge_=void 0===n.edge||n.edge,i.features_=n.features?n.features:null,i.featuresListenerKeys_=[],i.featureChangeListenerKeys_={},i.indexedFeaturesExtents_={},i.pendingFeatures_={},i.pixelTolerance_=void 0!==n.pixelTolerance?n.pixelTolerance:10,i.rBush_=new EZ,i.SEGMENT_WRITERS_={Point:i.writePointGeometry_.bind(i),LineString:i.writeLineStringGeometry_.bind(i),LinearRing:i.writeLineStringGeometry_.bind(i),Polygon:i.writePolygonGeometry_.bind(i),MultiPoint:i.writeMultiPointGeometry_.bind(i),MultiLineString:i.writeMultiLineStringGeometry_.bind(i),MultiPolygon:i.writeMultiPolygonGeometry_.bind(i),GeometryCollection:i.writeGeometryCollectionGeometry_.bind(i),Circle:i.writeCircleGeometry_.bind(i)},i}return sY(e,t),e.prototype.addFeature=function(t,e){var i=void 0===e||e,n=YC(t),r=t.getGeometry();if(r){var s=this.SEGMENT_WRITERS_[r.getType()];s&&(this.indexedFeaturesExtents_[n]=r.getExtent([1/0,1/0,-1/0,-1/0]),s(t,r))}i&&(this.featureChangeListenerKeys_[n]=tk(t,"change",this.handleFeatureChange_,this))},e.prototype.forEachFeatureAdd_=function(t){this.addFeature(t)},e.prototype.forEachFeatureRemove_=function(t){this.removeFeature(t)},e.prototype.getFeatures_=function(){var t;return this.features_?t=this.features_:this.source_&&(t=this.source_.getFeatures()),t},e.prototype.handleEvent=function(e){var i=this.snapTo(e.pixel,e.coordinate,e.map);return i.snapped&&(e.coordinate=i.vertex.slice(0,2),e.pixel=i.vertexPixel),t.prototype.handleEvent.call(this,e)},e.prototype.handleFeatureAdd_=function(t){var e=oY(t);this.addFeature(e)},e.prototype.handleFeatureRemove_=function(t){var e=oY(t);this.removeFeature(e)},e.prototype.handleFeatureChange_=function(t){var e=t.target;if(this.handlingDownUpSequence){var i=YC(e);i in this.pendingFeatures_||(this.pendingFeatures_[i]=e)}else this.updateFeature_(e)},e.prototype.handleUpEvent=function(t){var e=KC(this.pendingFeatures_);return e.length&&(e.forEach(this.updateFeature_.bind(this)),this.pendingFeatures_={}),!1},e.prototype.removeFeature=function(t,e){var i=void 0===e||e,n=YC(t),r=this.indexedFeaturesExtents_[n];if(r){var s=this.rBush_,o=[];s.forEachInExtent(r,function(e){t===e.feature&&o.push(e)});for(var a=o.length-1;a>=0;--a)s.remove(o[a])}i&&(ik(this.featureChangeListenerKeys_[n]),delete this.featureChangeListenerKeys_[n])},e.prototype.setMap=function(e){var i=this.getMap(),n=this.featuresListenerKeys_,r=this.getFeatures_();i&&(n.forEach(ik),n.length=0,r.forEach(this.forEachFeatureRemove_.bind(this))),t.prototype.setMap.call(this,e),e&&(this.features_?n.push(tk(this.features_,"add",this.handleFeatureAdd_,this),tk(this.features_,"remove",this.handleFeatureRemove_,this)):this.source_&&n.push(tk(this.source_,"addfeature",this.handleFeatureAdd_,this),tk(this.source_,"removefeature",this.handleFeatureRemove_,this)),r.forEach(this.forEachFeatureAdd_.bind(this)))},e.prototype.snapTo=function(t,e,i){var n=wS([i.getCoordinateFromPixel([t[0]-this.pixelTolerance_,t[1]+this.pixelTolerance_]),i.getCoordinateFromPixel([t[0]+this.pixelTolerance_,t[1]-this.pixelTolerance_])]),r=this.rBush_.getInExtent(n);this.vertex_&&!this.edge_&&(r=r.filter(function(t){return"Circle"!==t.feature.getGeometry().getType()}));var s=!1,o=null,a=null;if(0===r.length)return{snapped:s,vertex:o,vertexPixel:a};i.getView().getProjection();for(var l,c=pE(e),h=1/0,u=0;u<r.length;++u){var d=r[u];aY[0]=pE(d.segment[0]),aY[1]=pE(d.segment[1]);var p=qk(c,aY);p<h&&(l=d,h=p)}var f=l.segment;if(this.vertex_&&!this.edge_){var m=i.getPixelFromCoordinate(f[0]),g=i.getPixelFromCoordinate(f[1]),A=Wk(t,m),b=Wk(t,g);Math.sqrt(Math.min(A,b))<=this.pixelTolerance_&&(s=!0,a=i.getPixelFromCoordinate(o=A>b?f[1]:f[0]))}else if(this.edge_){var v="Circle"===l.feature.getGeometry().getType();if(v)o=dE(function(t,e){var i=e.getRadius(),n=e.getCenter(),r=n[0],s=n[1],o=t[0]-r,a=t[1]-s;0===o&&0===a&&(o=1);var l=Math.sqrt(o*o+a*a);return[r+i*o/l,s+i*a/l]}(c,l.feature.getGeometry()));else aY[0]=pE(f[0]),aY[1]=pE(f[1]),o=dE(Hk(c,aY));Zk(t,a=i.getPixelFromCoordinate(o))<=this.pixelTolerance_&&(s=!0,this.vertex_&&!v)&&(m=i.getPixelFromCoordinate(f[0]),g=i.getPixelFromCoordinate(f[1]),A=Wk(a,m),b=Wk(a,g),Math.sqrt(Math.min(A,b))<=this.pixelTolerance_&&(a=i.getPixelFromCoordinate(o=A>b?f[1]:f[0])))}return s&&(a=[Math.round(a[0]),Math.round(a[1])]),{snapped:s,vertex:o,vertexPixel:a}},e.prototype.updateFeature_=function(t){this.removeFeature(t,!1),this.addFeature(t,!1)},e.prototype.writeCircleGeometry_=function(t,e){this.getMap().getView().getProjection();for(var i=function(t,e,i){for(var n=e||32,r=t.getStride(),s=t.getLayout(),o=t.getCenter(),a=r*(n+1),l=new Array(a),c=0;c<a;c+=r){l[c]=0,l[c+1]=0;for(var h=2;h<r;h++)l[c+h]=o[h]}var u=new eT(l,s,[l.length]);return function(t,e,i,n){for(var r=t.getFlatCoordinates(),s=t.getStride(),o=r.length/s-1,a=n||0,l=0;l<=o;++l){var c=l*s,h=a+2*bk(l,o)*Math.PI/o;r[c]=e[0]+i*Math.cos(h),r[c+1]=e[1]+i*Math.sin(h)}t.changed()}(u,o,t.getRadius(),i),u}(e).getCoordinates()[0],n=0,r=i.length-1;n<r;++n){var s=i.slice(n,n+2),o={feature:t,segment:s};this.rBush_.insert(wS(s),o)}},e.prototype.writeGeometryCollectionGeometry_=function(t,e){for(var i=e.getGeometriesArray(),n=0;n<i.length;++n){var r=this.SEGMENT_WRITERS_[i[n].getType()];r&&r(t,i[n])}},e.prototype.writeLineStringGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length-1;n<r;++n){var s=i.slice(n,n+2),o={feature:t,segment:s};this.rBush_.insert(wS(s),o)}},e.prototype.writeMultiLineStringGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length;n<r;++n)for(var s=i[n],o=0,a=s.length-1;o<a;++o){var l=s.slice(o,o+2),c={feature:t,segment:l};this.rBush_.insert(wS(l),c)}},e.prototype.writeMultiPointGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length;n<r;++n){var s=i[n],o={feature:t,segment:[s,s]};this.rBush_.insert(e.getExtent(),o)}},e.prototype.writeMultiPolygonGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length;n<r;++n)for(var s=i[n],o=0,a=s.length;o<a;++o)for(var l=s[o],c=0,h=l.length-1;c<h;++c){var u=l.slice(c,c+2),d={feature:t,segment:u};this.rBush_.insert(wS(u),d)}},e.prototype.writePointGeometry_=function(t,e){var i=e.getCoordinates(),n={feature:t,segment:[i,i]};this.rBush_.insert(e.getExtent(),n)},e.prototype.writePolygonGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length;n<r;++n)for(var s=i[n],o=0,a=s.length-1;o<a;++o){var l=s.slice(o,o+2),c={feature:t,segment:l};this.rBush_.insert(wS(l),c)}},e}(Y$),cY=function(){function t(t){var e=t||{};this.font_=e.font,this.rotation_=e.rotation,this.rotateWithView_=e.rotateWithView,this.scale_=e.scale,this.scaleArray_=ZE(void 0!==e.scale?e.scale:1),this.text_=e.text,this.textAlign_=e.textAlign,this.textBaseline_=e.textBaseline,this.fill_=void 0!==e.fill?e.fill:new RZ({color:"#333"}),this.maxAngle_=void 0!==e.maxAngle?e.maxAngle:Math.PI/4,this.placement_=void 0!==e.placement?e.placement:"point",this.overflow_=!!e.overflow,this.stroke_=void 0!==e.stroke?e.stroke:null,this.offsetX_=void 0!==e.offsetX?e.offsetX:0,this.offsetY_=void 0!==e.offsetY?e.offsetY:0,this.backgroundFill_=e.backgroundFill?e.backgroundFill:null,this.backgroundStroke_=e.backgroundStroke?e.backgroundStroke:null,this.padding_=void 0===e.padding?null:e.padding}return t.prototype.clone=function(){var e=this.getScale();return new t({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(e)?e.slice():e,text:this.getText(),textAlign:this.getTextAlign(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()})},t.prototype.getOverflow=function(){return this.overflow_},t.prototype.getFont=function(){return this.font_},t.prototype.getMaxAngle=function(){return this.maxAngle_},t.prototype.getPlacement=function(){return this.placement_},t.prototype.getOffsetX=function(){return this.offsetX_},t.prototype.getOffsetY=function(){return this.offsetY_},t.prototype.getFill=function(){return this.fill_},t.prototype.getRotateWithView=function(){return this.rotateWithView_},t.prototype.getRotation=function(){return this.rotation_},t.prototype.getScale=function(){return this.scale_},t.prototype.getScaleArray=function(){return this.scaleArray_},t.prototype.getStroke=function(){return this.stroke_},t.prototype.getText=function(){return this.text_},t.prototype.getTextAlign=function(){return this.textAlign_},t.prototype.getTextBaseline=function(){return this.textBaseline_},t.prototype.getBackgroundFill=function(){return this.backgroundFill_},t.prototype.getBackgroundStroke=function(){return this.backgroundStroke_},t.prototype.getPadding=function(){return this.padding_},t.prototype.setOverflow=function(t){this.overflow_=t},t.prototype.setFont=function(t){this.font_=t},t.prototype.setMaxAngle=function(t){this.maxAngle_=t},t.prototype.setOffsetX=function(t){this.offsetX_=t},t.prototype.setOffsetY=function(t){this.offsetY_=t},t.prototype.setPlacement=function(t){this.placement_=t},t.prototype.setRotateWithView=function(t){this.rotateWithView_=t},t.prototype.setFill=function(t){this.fill_=t},t.prototype.setRotation=function(t){this.rotation_=t},t.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=ZE(void 0!==t?t:1)},t.prototype.setStroke=function(t){this.stroke_=t},t.prototype.setText=function(t){this.text_=t},t.prototype.setTextAlign=function(t){this.textAlign_=t},t.prototype.setTextBaseline=function(t){this.textBaseline_=t},t.prototype.setBackgroundFill=function(t){this.backgroundFill_=t},t.prototype.setBackgroundStroke=function(t){this.backgroundStroke_=t},t.prototype.setPadding=function(t){this.padding_=t},t}();const hY=new VZ({color:"rgba(195, 38, 125, 1)",lineDash:[4,8],width:2}),uY=new jZ({image:new TZ({radius:13,stroke:hY})}),dY=new jZ({stroke:hY}),pY=new RZ({color:"#000000"}),fY={Point(t){const e=new cY({text:t.name,font:"12px sans-serif",placement:"point",offsetY:-20,fill:pY}),i=[new jZ({text:e,image:new TZ({radius:7,stroke:new VZ({color:t.color}),fill:new RZ({color:`${t.color}9f`})})})];return t.editing&&i.push(uY),i},LineString(t){const e=new cY({text:t.name,font:"12px sans-serif",placement:"line",textBaseline:"bottom",offsetY:-5,overflow:!0,fill:pY}),i=new VZ({color:t.color,width:2}),n=[new jZ({stroke:i})],r=t.getGeometry();return r.forEachSegment((t,i)=>{n.push(new jZ({geometry:new kH([t,i]),text:e}))}),t.editing&&(n.push(dY),r.getCoordinates().forEach(e=>{const r=new jM(e);n.push(new jZ({geometry:r,image:new TZ({radius:13,stroke:hY})})),n.push(new jZ({geometry:r,image:new TZ({radius:7,stroke:i,fill:new RZ({color:t.color})})}))})),n},Polygon(t){const e=new cY({text:t.name,font:"12px sans-serif",placement:"point",fill:pY}),i=new VZ({color:t.color}),n=[new jZ({text:e,stroke:i,fill:new RZ({color:`${t.color}3f`})})];return t.editing&&(n.push(dY),t.getGeometry().getCoordinates()[0].forEach(e=>{const r=new jM(e);n.push(new jZ({geometry:r,image:new TZ({radius:13,stroke:hY})})),n.push(new jZ({geometry:r,image:new TZ({radius:7,stroke:i,fill:new RZ({color:t.color})})}))})),n}};class mY extends pH{constructor(t){super({geometry:LH.readGeometry(t.geom)}),this.editing=!1,this.annotation=t,this.color=this.annotation.color,this.name=this.annotation.name,t.geom&&this.setStyle(fY[this.getGeometry().getType()](this))}updateColor(t){this.color=t,this.changed()}updateName(t){this.name=t,this.changed()}setEditingStyle(){this.editing=!0,this.getGeometry()&&this.setStyle(fY[this.getGeometry().getType()])}}new jZ;const gY=new VZ({color:"rgba(0, 0, 0, 0.8)"}),AY=new RZ({color:"rgba(255, 255, 255, 0.2)"}),bY=new jZ({image:new TZ({radius:7,stroke:gY,fill:AY})});let vY=(()=>{class t extends LT{constructor(t,e,i,n,r,s){super(),this.ngZone=t,this.annotationsService=e,this.interactionsService=i,this.mapService=n,this.mapStateService=r,this.tooltipsService=s,this.modifyCollection=new j$,this.updatingGeomFromLayer=!1}ngOnInit(){this.ensureMandatoryInputParams("map"),this.source=new $q({features:[]}),this.layer=new Nq({source:this.source,updateWhileAnimating:!0,updateWhileInteracting:!0,zIndex:2}),this.layer.selectable=!0,this.map.addLayer(this.layer),this.subscriptions.push(this.mapStateService.featuresSelectable$.subscribe(t=>{this.layer.selectable=t}),this.annotationsService.annotations$.subscribe(t=>{this.source.clear(!0),this.source.addFeatures(t.map(t=>new mY(t)))}),Hg([this.annotationsService.editedAnnotation$.pipe(Object(Ge.a)(t=>!!t),mn()),this.annotationsService.editedAnnotationGeomType$]).pipe(Be(16)).subscribe(([t,e])=>{this.ngZone.runOutsideAngular(()=>{this.removeInteractions(),t&&this.createInteractions(e)})}),this.mapStateService.showAnnotationsLayer$.subscribe(t=>{this.layer.setVisible(t)})),this.eventListeners.push(this.map.on("click",t=>{this.ngZone.run(()=>{this.handleClickEvent(t)})})),this.subscriptions.push(this.mapService.pointerMove$.subscribe(t=>{this.handleMoveEvent(t)}))}ngOnDestroy(){super.ngOnDestroy(),this.map.removeLayer(this.layer)}createInteractions(t){const e=this.annotationsService.editedAnnotation$.value;let i=this.source.forEachFeature(t=>{if(t.annotation.id===e.id)return t});i||(i=new mY(e),this.source.addFeature(i)),i.setEditingStyle(),this.editedFeature=i,this.modifyCollection.clear(),this.modifyCollection.push(i),this.modifyInteraction=new Jq({features:this.modifyCollection,style:bY,condition:aG}),this.map.addInteraction(this.modifyInteraction);const n=new j$;this.drawInteraction=new rY({type:t,features:n,style:bY,condition:aG}),this.map.addInteraction(this.drawInteraction),this.snapInteraction=new lY({features:this.modifyCollection,pixelTolerance:20}),this.map.addInteraction(this.snapInteraction),this.drawInteraction.on("drawstart",t=>{CC({category:"app",message:"annotation: drawstart"}),this.modifyInteraction.setActive(!1),this.editedFeature.setGeometry(t.feature.getGeometry()),this.editedFeature.setEditingStyle(),this.updateEditedAnnotationGeometry(null)}),this.drawInteraction.on("drawend",t=>{CC({category:"app",message:"annotation: drawend"}),this.modifyInteraction.setActive(!0),this.updateEditedAnnotationGeometry(t.feature)}),this.drawInteraction.on("drawabort",t=>{this.modifyInteraction.setActive(!0)}),this.modifyInteraction.on("modifyend",t=>{CC({category:"app",message:"annotation: modifyend"}),this.updateEditedAnnotationGeometry(t.features.pop())}),this.annotationsService.editedAnnotation$.pipe(Gg(1),ar(t=>!!t),Object(Ge.a)(t=>t.color),mn()).subscribe(t=>{this.editedFeature.updateColor(t)}),this.annotationsService.editedAnnotation$.pipe(Gg(1),ar(t=>!!t),Object(Ge.a)(t=>t.name),mn()).subscribe(t=>{this.editedFeature.updateName(t)}),this.annotationsService.editedAnnotation$.pipe(Gg(1),ar(t=>!!t),Object(Ge.a)(t=>t.geom),mn(),He(()=>!this.updatingGeomFromLayer)).subscribe(t=>{this.editedFeature.setGeometry(LH.readGeometry(t)),this.editedFeature.setEditingStyle()})}updateEditedAnnotationGeometry(t){this.updatingGeomFromLayer=!0,this.annotationsService.updateEditedAnnotationGeom(t?LH.writeGeometryObject(t.getGeometry()):null),this.updatingGeomFromLayer=!1}removeInteractions(){this.editedFeature&&(this.editedFeature=null),this.drawInteraction&&this.map.removeInteraction(this.drawInteraction),this.modifyInteraction&&this.map.removeInteraction(this.modifyInteraction),this.snapInteraction&&this.map.removeInteraction(this.snapInteraction)}handleClickEvent(t){this.layer.selectable&&this.map.forEachFeatureAtPixel(t.pixel,t=>(this.interactionsService.clickOnEntity(OP.Annotation,t.annotation),!0),{layerFilter:t=>t===this.layer})}handleMoveEvent(t){this.layer.selectable&&(this.map.forEachFeatureAtPixel(t.pixel,e=>{const[i,n]=oE(t.coordinate);return e.annotation.lon=i,e.annotation.lat=n,this.tooltipsService.hoverEntity(OP.Annotation,e.annotation),!0},{hitTolerance:3,layerFilter:t=>t===this.layer})||this.tooltipsService.hoverEntity(OP.Annotation,null))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.B),r.Pb(MP),r.Pb(ET),r.Pb(pI),r.Pb(gT),r.Pb(kT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-annotations-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();var _Y=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),yY=function(t){function e(e){var i=t.call(this,e)||this;return i.image_=null,i}return _Y(e,t),e.prototype.getImage=function(){return this.image_?this.image_.getImage():null},e.prototype.prepareFrame=function(t){var e=t.layerStatesArray[t.layerIndex],i=t.pixelRatio,n=t.viewState,r=n.resolution,s=this.getLayer().getSource(),o=t.viewHints,a=t.extent;if(void 0!==e.extent&&(a=WS(a,mE(e.extent))),!o[0]&&!o[1]&&!XS(a))if(s){var l=s.getImage(a,r,i,n.projection);l&&this.loadImage(l)&&(this.image_=l)}else this.image_=null;return!!this.image_},e.prototype.renderFrame=function(t,e){var i=this.image_,n=i.getExtent(),r=i.getResolution(),s=i.getPixelRatio(),o=t.layerStatesArray[t.layerIndex],a=t.pixelRatio,l=t.viewState,c=l.center,h=t.size,u=a*r/(l.resolution*s),d=Math.round(h[0]*a),p=Math.round(h[1]*a),f=l.rotation;if(f){var m=Math.round(Math.sqrt(d*d+p*p));d=m,p=m}cM(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/a,1/a,f,-d/2,-p/2),hM(this.inversePixelTransform,this.pixelTransform);var g=oW(this.pixelTransform);this.useContainer(e,g,o.opacity);var A=this.context,b=A.canvas;b.width!=d||b.height!=p?(b.width=d,b.height=p):this.containerReused||A.clearRect(0,0,d,p);var v=!1;if(o.extent){var _=mE(o.extent);(v=!ES(_,t.extent)&&QS(_,t.extent))&&this.clipUnrotated(A,t,_)}var y=i.getImage(),w=cM(this.tempTransform,d/2,p/2,u,u,0,s*(n[0]-c[0])/r,s*(c[1]-n[3])/r);this.renderedResolution=r*a/s;var x=w[4],C=w[5],S=y.width*w[0],k=y.height*w[3];if(zC(A,this.getLayer().getSource().getContextOptions()),this.preRender(A,t),S>=.5&&k>=.5){var E=o.opacity,D=void 0;1!==E&&(D=this.context.globalAlpha,this.context.globalAlpha=E),this.context.drawImage(y,0,0,+y.width,+y.height,Math.round(x),Math.round(C),Math.round(S),Math.round(k)),1!==E&&(this.context.globalAlpha=D)}return this.postRender(A,t),v&&A.restore(),g!==b.style.transform&&(b.style.transform=g),this.container},e}(lW),wY=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),xY=function(t){function e(e,i,n,r,s){var o=this;return(o=t.call(this,e,i,n,void 0!==s?0:2)||this).loader_=void 0!==s?s:null,o.canvas_=r,o.error_=null,o}return wY(e,t),e.prototype.getError=function(){return this.error_},e.prototype.handleLoad_=function(t){t?(this.error_=t,this.state=3):this.state=2,this.changed()},e.prototype.load=function(){0==this.state&&(this.state=1,this.changed(),this.loader_(this.handleLoad_.bind(this)))},e.prototype.getImage=function(){return this.canvas_},e}(bS),CY=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),SY=function(t){function e(e){var i=t.call(this,e)||this;return i.vectorRenderer_=new Uq(e),i.layerImageRatio_=e.getImageRatio(),i.coordinateToVectorPixelTransform_=[1,0,0,1,0,0],i.renderedPixelToCoordinateTransform_=null,i}return CY(e,t),e.prototype.disposeInternal=function(){this.vectorRenderer_.dispose(),t.prototype.disposeInternal.call(this)},e.prototype.getFeatures=function(t){if(this.vectorRenderer_){var e=lM(this.coordinateToVectorPixelTransform_,lM(this.renderedPixelToCoordinateTransform_,t.slice()));return this.vectorRenderer_.getFeatures(e)}return new Promise(function(t,e){t([])})},e.prototype.handleFontsChanged=function(){this.vectorRenderer_.handleFontsChanged()},e.prototype.prepareFrame=function(t){var e=t.pixelRatio,i=t.viewState,n=i.resolution,r=t.viewHints,s=this.vectorRenderer_,o=t.extent;1!==this.layerImageRatio_&&JS(o=o.slice(0),this.layerImageRatio_);var a=YS(o)/n,l=GS(o)/n;if(!r[0]&&!r[1]&&!XS(o)){s.useContainer(null,null,1);var c=s.context,h=zC({},t,{declutterTree:new kZ.a(9),extent:o,size:[a,l],viewState:zC({},t.viewState,{rotation:0})}),u=new xY(o,n,e,c.canvas,function(t){s.prepareFrame(h)&&s.replayGroupChanged&&(s.clipping=!1,s.renderFrame(h,null),s.renderDeclutter(h),t())});u.addEventListener("change",(function(){if(2===u.getState()){this.image_=u;var t=u.getResolution(),n=u.getPixelRatio(),r=t*e/n;this.renderedResolution=r,this.coordinateToVectorPixelTransform_=cM(this.coordinateToVectorPixelTransform_,a/2,l/2,1/r,-1/r,0,-i.center[0],-i.center[1])}}).bind(this)),u.load()}return this.image_&&(this.renderedPixelToCoordinateTransform_=t.pixelToCoordinateTransform.slice()),!!this.image_},e.prototype.preRender=function(){},e.prototype.postRender=function(){},e.prototype.renderDeclutter=function(){},e.prototype.forEachFeatureAtCoordinate=function(e,i,n,r,s){return this.vectorRenderer_?this.vectorRenderer_.forEachFeatureAtCoordinate(e,i,n,r,s):t.prototype.forEachFeatureAtCoordinate.call(this,e,i,n,r,s)},e}(yY),kY=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),EY=function(t){function e(e){var i=this,n=e||{},r=zC({},n);return delete r.imageRatio,(i=t.call(this,r)||this).imageRatio_=void 0!==n.imageRatio?n.imageRatio:1,i}return kY(e,t),e.prototype.getImageRatio=function(){return this.imageRatio_},e.prototype.createRenderer=function(){return new SY(this)},e}(HZ);class DY extends pH{constructor(t){super(),this.h3index=t,super.setGeometry(oT(t))}static New(t){return new DY(t)}}new jZ({stroke:new VZ({color:"#cc0000",width:1}),fill:new RZ({color:"#ff00001a"})});const IY=new jZ({stroke:new VZ({color:"#ff0000",width:1}),fill:new RZ({color:"#ff00004a"})}),PY=["#F1C40F","#27AE60","#9B59B6","#3498DB","#E74C3C","#1ABC9C","#E67E22","#16A085","#C0392B","#8E44AD","#2980B9","#F39C12","#2ECC71","#D35400"],OY={1:1,2:1,3:1,4:2,5:3,6:3,7:4,8:5,9:5,10:6,11:7,12:7,13:8,14:8,15:9,16:9,17:10,18:11,19:12,20:12,21:12},MY={1:0,2:0,3:0,4:1,5:2,6:2,7:3,8:4,9:4,10:5,11:6,12:7,13:7,14:8,15:9,16:9,17:10,18:10,19:10,20:10,21:10},TY=PY.map(t=>new jZ({stroke:new VZ({color:t,width:1}),fill:new RZ({color:"rgba(0, 0, 255, 0)"})}));let RY=(()=>{class t extends LT{constructor(t,e,i,n,r){super(),this.configService=t,this.drawingService=e,this.mapConfigService=i,this.mapService=n,this.mapStateService=r}ngOnInit(){this.ensureMandatoryInputParams("map"),this.source=new $q({features:[]}),this.layer=new EY({source:this.source}),this.map.addLayer(this.layer),this.subscriptions.push(this.mapStateService.selectableHexagons$.subscribe(t=>{this.layer.selectable=t,!t&&this.hoveredHexagonFeature&&(this.hoveredHexagonFeature.setStyle(TY[this.hexagonsResolution()]),this.hoveredHexagonFeature=null)}),this.mapStateService.showHexagonsLayer$.subscribe(t=>{this.layer.setVisible(t)}),Hg([this.mapStateService.showHexagonsLayer$,this.mapService.view$]).pipe(Gg(1),He(([t,e])=>t&&!!e),Be(200)).subscribe(([t,e])=>this.refreshFeatures(e)),this.mapService.pointerMove$.pipe(He(()=>this.layer.selectable)).subscribe(t=>{this.handleMoveEvent(t)})),this.eventListeners.push(this.map.on("click",t=>this.handleClickEvent(t)))}ngOnDestroy(){super.ngOnDestroy(),this.map.removeLayer(this.layer)}refreshFeatures(t){this.source.clear(!0);let e=this.hexagonsResolution();const i=qD.fromOLExtent(t.extent).scale(1.2);let n=this.generateFeatures(i,e);n.forEach(t=>{t.setStyle(TY[e])}),this.source.addFeatures(n),this.mapConfigService.debugH3Trace$.value&&(e-=1,e>=1&&(n=this.generateFeatures(i,e),n.forEach(t=>{t.setStyle(TY[e])}),this.source.addFeatures(n)),e-=1,e>=1&&(n=this.generateFeatures(i,e),n.forEach(t=>{t.setStyle(TY[e])}),this.source.addFeatures(n)))}generateFeatures(t,e){return t.getBoundedPolygons().map(t=>mP(t,e,!0)).flat().map(t=>new DY(t))}hexagonsResolution(){return(this.mapConfigService.highHexagonsResolution$.value?OY:MY)[Math.round(this.map.getView().getZoom())]}handleClickEvent(t){this.layer.selectable&&this.map.forEachFeatureAtPixel(t.pixel,t=>(this.configService.devMode&&console.log("DEBUG: select hexagon",t.h3index),this.drawingService.selectHexagon(t.h3index),!0),{layerFilter:t=>t===this.layer})}handleMoveEvent(t){const e=this.map.forEachFeatureAtPixel(t.pixel,t=>t,{layerFilter:t=>t===this.layer});e?e!==this.hoveredHexagonFeature&&(this.hoveredHexagonFeature&&this.hoveredHexagonFeature.setStyle(TY[this.hexagonsResolution()]),e.setStyle(IY),this.hoveredHexagonFeature=e):this.hoveredHexagonFeature&&(this.hoveredHexagonFeature.setStyle(TY[this.hexagonsResolution()]),this.hoveredHexagonFeature=null)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(cI),r.Pb(TP),r.Pb(hI),r.Pb(pI),r.Pb(gT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-hexagons-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();class VY extends pH{constructor(t){super(),this.edgeGroup=t,this.setGeometry(new iT(this.edgeGroup.edges.map(t=>lT(t).map(t=>sE(t))))),this.setStyle(new jZ({stroke:new VZ({color:this.edgeGroup.color,width:1}),fill:new RZ({color:`${this.edgeGroup.color}9f`})}))}}const FY=new VZ({color:"#ff0000aa",width:4});class LY extends pH{constructor(t,e){super(),this.h3index=t,this.color=e,this.setId(t),this.setGeometry(new iT([lT(t).map(t=>sE(t))])),this.resetStyle()}resetStyle(){var t;this.setStyle(this.color?new jZ({stroke:new VZ({color:this.color,width:1}),fill:new RZ({color:`${this.color}9f`})}):TY[(t=this.h3index,parseInt(t.charAt(2),16))])}enableHighlightedStyle(){const t=[IY,new jZ({stroke:new VZ({color:this.color,width:1}),fill:new RZ({color:`${this.color}9f`})})],[e,i]=vP(this.h3index),n=new kH([sE(sI(dP(e))),sE(sI(dP(i)))]);n.applyTransform(t=>(Object.assign(t,function(t,e){if(4!==t.length)throw new Error(`Invalid line length. Expected 4, got ${t.length}`);const i=(t[2]-t[0])/2,n=(t[3]-t[1])/2,r=t[0]+i,s=t[1]+n;return[r-.5*i,s-.5*n,r+.5*i,s+.5*n]}(t)),null)),t.push(new jZ({geometry:n,stroke:FY})),n.forEachSegment((e,i)=>{const n=i[0]-e[0],r=i[1]-e[1],s=Math.sqrt(n*n+r*r)/8,o=Math.atan2(r,n),a=new kH([i,[i[0]-1.5*s,i[1]+s]]);a.rotate(o,i);const l=new kH([i,[i[0]-1.5*s,i[1]-s]]);l.rotate(o,i),t.push(new jZ({geometry:a,stroke:FY})),t.push(new jZ({geometry:l,stroke:FY}))}),this.setStyle(t)}}let UY=(()=>{class t extends LT{constructor(t,e,i,n){super(),this.configService=t,this.mapService=e,this.mapStateService=i,this.movesService=n}ngOnInit(){this.ensureMandatoryInputParams("map"),this.gridSource=new $q({features:[]}),this.gridLayer=new EY({source:this.gridSource}),this.map.addLayer(this.gridLayer),this.gridLayer.selectable=!0,this.selectionSource=new $q({features:[]}),this.selectionLayer=new EY({source:this.selectionSource}),this.map.addLayer(this.selectionLayer),this.subscriptions.push(this.movesService.selectedEdgeGroups$.subscribe(t=>{this.refreshSelectedEdgeGroupsFeatures(t)}),this.mapStateService.showEdgesLayer$.subscribe(t=>{this.gridLayer.setVisible(t)}),Hg([this.mapStateService.showEdgesLayer$,this.mapService.view$]).pipe(Gg(1),He(([t,e])=>t&&!!e),Be(200)).subscribe(([t,e])=>this.refreshGridFeatures(e)),this.mapService.pointerMove$.pipe(He(()=>this.gridLayer.getVisible())).subscribe(t=>{this.handleMoveEvent(t)})),this.eventListeners.push(this.map.on("click",t=>this.handleClickEvent(t)))}ngOnDestroy(){super.ngOnDestroy(),this.map.removeLayer(this.gridLayer),this.map.removeLayer(this.selectionLayer)}refreshGridFeatures(t){this.gridSource.clear(!0);const e=qD.fromOLExtent(t.extent).scale(t.zoom<=5?1.1:t.zoom<=9?1.5:2);let i=this.edgesResolution();const n=[this.generateFeatures(e,i)];i-=1,i>=1&&n.push(this.generateFeatures(e,i)),i-=1,i>=1&&t.zoom<8&&n.push(this.generateFeatures(e,i)),this.gridSource.addFeatures(n.flat())}refreshSelectedEdgeGroupsFeatures(t){this.selectionSource.clear(!0),this.selectionSource.addFeatures(t.map(t=>new VY(t)))}generateFeatures(t,e){return t.getBoundedPolygons().map(t=>mP(t,e,!0)).flat().map(t=>function(t){var e=tP(t),i=e[0],n=e[1],r=$I._calloc(6,ZI);WI.getH3UnidirectionalEdgesFromHexagon(i,n,r);var s=aP(r,6);return $I._free(r),s}(t)).flat().filter(t=>{const e=gP(t),i=AP(t),n="string"!=typeof(r=e)?-1:parseInt(r.charAt(1),16);var r;const s=fP(e,n-1),o=fP(i,n-1);return 2===n||n>2&&s===o}).map(t=>new LY(t))}edgesResolution(){return Math.min(OY[Math.round(this.map.getView().getZoom())],6)}handleClickEvent(t){this.gridLayer.selectable&&this.map.forEachFeatureAtPixel(t.pixel,t=>(this.configService.devMode&&console.log("DEBUG: select h3 edge",t.h3index),this.movesService.toggleEdge(t.h3index),!0),{layerFilter:t=>t===this.gridLayer})}handleMoveEvent(t){const e=this.map.forEachFeatureAtPixel(t.pixel,t=>t,{layerFilter:t=>t===this.gridLayer});e?e!==this.hoveredEdgeFeature&&(this.hoveredEdgeFeature&&this.hoveredEdgeFeature.resetStyle(),e.enableHighlightedStyle(),this.hoveredEdgeFeature=e):this.hoveredEdgeFeature&&(this.hoveredEdgeFeature.resetStyle(),this.hoveredEdgeFeature=null)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(cI),r.Pb(pI),r.Pb(gT),r.Pb(mT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-edges-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();class BY extends pH{constructor(t){super({geometry:new MH(t.h3indexes.map(t=>oT(t)))}),this.zone=t}}const NY=nM.map(t=>new jZ({stroke:new VZ({color:t,width:1}),fill:new RZ({color:`${t}1a`})})),jY=new jZ({text:new cY({font:"12px Calibri,sans-serif",fill:new RZ({color:"#000"}),stroke:new VZ({color:"#fff",width:3})})});let zY=(()=>{class t extends LT{constructor(t){super(),this.zonesLayerService=t}ngOnInit(){this.ensureMandatoryInputParams("map"),this.source=new $q({features:[]}),this.layer=new Nq({source:this.source,updateWhileAnimating:!0,updateWhileInteracting:!0,zIndex:1}),this.map.addLayer(this.layer),this.subscriptions.push(this.zonesLayerService.zones$.subscribe(t=>{this.source.clear(!0),this.source.addFeatures(t.map((t,e)=>{const i=new BY(t);return i.setStyle(function(){return jY.getText().setText(t.name),[NY[e%NY.length],jY]}),i}))}))}ngOnDestroy(){super.ngOnDestroy(),this.map.removeLayer(this.layer)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(DT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-zones-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();var HY,KY=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function $Y(t,e){for(var i=KY.length,n=0;n<i;++n)try{var r=t.getContext(KY[n],e);if(r)return r}catch($nt){}return null}function GY(t){switch(t){case 34962:return Float32Array;case 34963:return Uint32Array;default:return Float32Array}}var WY=function(){function t(t,e){this.array=null,this.type=t,yS(34962===t||34963===t,62),this.usage=void 0!==e?e:35044}return t.prototype.ofSize=function(t){this.array=new(GY(this.type))(t)},t.prototype.fromArray=function(t){this.array=GY(this.type).from(t)},t.prototype.fromArrayBuffer=function(t){this.array=new(GY(this.type))(t)},t.prototype.getType=function(){return this.type},t.prototype.getArray=function(){return this.array},t.prototype.getUsage=function(){return this.usage},t.prototype.getSize=function(){return this.array?this.array.length:0},t}(),ZY=function(){function t(t){this.gl_=t.webGlContext;var e=this.gl_;this.scaleRatio_=t.scaleRatio||1,this.renderTargetTexture_=e.createTexture(),this.renderTargetTextureSize_=null,this.frameBuffer_=e.createFramebuffer();var i=e.createShader(e.VERTEX_SHADER);e.shaderSource(i,t.vertexShader||"\n precision mediump float;\n \n attribute vec2 a_position;\n varying vec2 v_texCoord;\n varying vec2 v_screenCoord;\n \n uniform vec2 u_screenSize;\n \n void main() {\n v_texCoord = a_position * 0.5 + 0.5;\n v_screenCoord = v_texCoord * u_screenSize;\n gl_Position = vec4(a_position, 0.0, 1.0);\n }\n"),e.compileShader(i);var n=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(n,t.fragmentShader||"\n precision mediump float;\n \n uniform sampler2D u_image;\n \n varying vec2 v_texCoord;\n \n void main() {\n gl_FragColor = texture2D(u_image, v_texCoord);\n }\n"),e.compileShader(n),this.renderTargetProgram_=e.createProgram(),e.attachShader(this.renderTargetProgram_,i),e.attachShader(this.renderTargetProgram_,n),e.linkProgram(this.renderTargetProgram_),this.renderTargetVerticesBuffer_=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,-1,1,1,-1,1]),e.STATIC_DRAW),this.renderTargetAttribLocation_=e.getAttribLocation(this.renderTargetProgram_,"a_position"),this.renderTargetUniformLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_screenSize"),this.renderTargetTextureLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_image"),this.uniforms_=[],t.uniforms&&Object.keys(t.uniforms).forEach((function(i){this.uniforms_.push({value:t.uniforms[i],location:e.getUniformLocation(this.renderTargetProgram_,i)})}).bind(this))}return t.prototype.getGL=function(){return this.gl_},t.prototype.init=function(t){var e=this.getGL(),i=[e.drawingBufferWidth*this.scaleRatio_,e.drawingBufferHeight*this.scaleRatio_];if(e.bindFramebuffer(e.FRAMEBUFFER,this.getFrameBuffer()),e.viewport(0,0,i[0],i[1]),!this.renderTargetTextureSize_||this.renderTargetTextureSize_[0]!==i[0]||this.renderTargetTextureSize_[1]!==i[1]){this.renderTargetTextureSize_=i;var n=e.RGBA,r=e.RGBA,s=e.UNSIGNED_BYTE;e.bindTexture(e.TEXTURE_2D,this.renderTargetTexture_),e.texImage2D(e.TEXTURE_2D,0,n,i[0],i[1],0,r,s,null),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.renderTargetTexture_,0)}},t.prototype.apply=function(t,e){var i=this.getGL(),n=t.size;i.bindFramebuffer(i.FRAMEBUFFER,e?e.getFrameBuffer():null),i.activeTexture(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,this.renderTargetTexture_),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),i.enable(i.BLEND),i.blendFunc(i.ONE,i.ONE_MINUS_SRC_ALPHA),i.viewport(0,0,i.drawingBufferWidth,i.drawingBufferHeight),i.bindBuffer(i.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),i.useProgram(this.renderTargetProgram_),i.enableVertexAttribArray(this.renderTargetAttribLocation_),i.vertexAttribPointer(this.renderTargetAttribLocation_,2,i.FLOAT,!1,0,0),i.uniform2f(this.renderTargetUniformLocation_,n[0],n[1]),i.uniform1i(this.renderTargetTextureLocation_,0),this.applyUniforms(t),i.drawArrays(i.TRIANGLES,0,6)},t.prototype.getFrameBuffer=function(){return this.frameBuffer_},t.prototype.applyUniforms=function(t){var e,i=this.getGL(),n=1;this.uniforms_.forEach(function(r){if((e="function"==typeof r.value?r.value(t):r.value)instanceof HTMLCanvasElement||e instanceof ImageData)r.texture||(r.texture=i.createTexture()),i.activeTexture(i["TEXTURE"+n]),i.bindTexture(i.TEXTURE_2D,r.texture),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),e instanceof ImageData?i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,e.width,e.height,0,i.UNSIGNED_BYTE,new Uint8Array(e.data)):i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,e),i.uniform1i(r.location,n++);else if(Array.isArray(e))switch(e.length){case 2:return void i.uniform2f(r.location,e[0],e[1]);case 3:return void i.uniform3f(r.location,e[0],e[1],e[2]);case 4:return void i.uniform4f(r.location,e[0],e[1],e[2],e[3]);default:return}else"number"==typeof e&&i.uniform1f(r.location,e)})},t}();function qY(t,e){return t[0]=e[0],t[1]=e[1],t[4]=e[2],t[5]=e[3],t[12]=e[4],t[13]=e[5],t}var YY=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),QY={UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123,UNSIGNED_INT:5125,FLOAT:5126};function XY(t){switch(t){case QY.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case QY.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case QY.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case QY.FLOAT:default:return Float32Array.BYTES_PER_ELEMENT}}var JY=function(t){function e(e){var i=t.call(this)||this,n=e||{};i.boundHandleWebGLContextLost_=i.handleWebGLContextLost.bind(i),i.boundHandleWebGLContextRestored_=i.handleWebGLContextRestored.bind(i),i.canvas_=document.createElement("canvas"),i.canvas_.style.position="absolute",i.canvas_.style.left="0",i.gl_=$Y(i.canvas_);var r=i.getGL();if(i.bufferCache_={},i.currentProgram_=null,yS(RC(function(){if(!HY){var t=$Y(document.createElement("canvas"));t&&(HY=t.getSupportedExtensions())}return HY}(),"OES_element_index_uint"),63),r.getExtension("OES_element_index_uint"),i.canvas_.addEventListener("webglcontextlost",i.boundHandleWebGLContextLost_),i.canvas_.addEventListener("webglcontextrestored",i.boundHandleWebGLContextRestored_),i.offsetRotateMatrix_=[1,0,0,1,0,0],i.offsetScaleMatrix_=[1,0,0,1,0,0],i.tmpMat4_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],i.uniformLocations_={},i.attribLocations_={},i.uniforms_=[],n.uniforms)for(var s in n.uniforms)i.uniforms_.push({name:s,value:n.uniforms[s]});return i.postProcessPasses_=n.postProcesses?n.postProcesses.map(function(t){return new ZY({webGlContext:r,scaleRatio:t.scaleRatio,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms})}):[new ZY({webGlContext:r})],i.shaderCompileErrors_=null,i.startTime_=Date.now(),i}return YY(e,t),e.prototype.bindBuffer=function(t){var e=this.getGL(),i=YC(t),n=this.bufferCache_[i];if(!n){var r=e.createBuffer();this.bufferCache_[i]=n={buffer:t,webGlBuffer:r}}e.bindBuffer(t.getType(),n.webGlBuffer)},e.prototype.flushBufferData=function(t){var e=this.getGL();this.bindBuffer(t),e.bufferData(t.getType(),t.getArray(),t.getUsage())},e.prototype.deleteBuffer=function(t){var e=this.getGL(),i=YC(t),n=this.bufferCache_[i];e.isContextLost()||e.deleteBuffer(n.buffer),delete this.bufferCache_[i]},e.prototype.disposeInternal=function(){this.canvas_.removeEventListener("webglcontextlost",this.boundHandleWebGLContextLost_),this.canvas_.removeEventListener("webglcontextrestored",this.boundHandleWebGLContextRestored_)},e.prototype.prepareDraw=function(t){var e=this.getGL(),i=this.getCanvas(),n=t.size,r=t.pixelRatio;i.width=n[0]*r,i.height=n[1]*r,i.style.width=n[0]+"px",i.style.height=n[1]+"px",e.useProgram(this.currentProgram_);for(var s=this.postProcessPasses_.length-1;s>=0;s--)this.postProcessPasses_[s].init(t);e.bindTexture(e.TEXTURE_2D,null),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.enable(e.BLEND),e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA),e.useProgram(this.currentProgram_),this.applyFrameState(t),this.applyUniforms(t)},e.prototype.prepareDrawToRenderTarget=function(t,e,i){var n=this.getGL(),r=e.getSize();n.bindFramebuffer(n.FRAMEBUFFER,e.getFramebuffer()),n.viewport(0,0,r[0],r[1]),n.bindTexture(n.TEXTURE_2D,e.getTexture()),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),n.enable(n.BLEND),n.blendFunc(n.ONE,i?n.ZERO:n.ONE_MINUS_SRC_ALPHA),n.useProgram(this.currentProgram_),this.applyFrameState(t),this.applyUniforms(t)},e.prototype.drawElements=function(t,e){var i=this.getGL();i.drawElements(i.TRIANGLES,e-t,i.UNSIGNED_INT,4*t)},e.prototype.finalizeDraw=function(t){for(var e=0;e<this.postProcessPasses_.length;e++)this.postProcessPasses_[e].apply(t,this.postProcessPasses_[e+1]||null)},e.prototype.getCanvas=function(){return this.canvas_},e.prototype.getGL=function(){return this.gl_},e.prototype.applyFrameState=function(t){var e=t.size,i=t.viewState.rotation,n=sM(this.offsetScaleMatrix_);!function(t,e,i){oM(t,aM(rM,e,0,0,i,0,0))}(n,2/e[0],2/e[1]);var r,s,o,a,l=sM(this.offsetRotateMatrix_);0!==i&&(r=l,s=-i,o=Math.cos(s),a=Math.sin(s),oM(r,aM(rM,o,a,-a,o,0,0))),this.setUniformMatrixValue("u_offsetScaleMatrix",qY(this.tmpMat4_,n)),this.setUniformMatrixValue("u_offsetRotateMatrix",qY(this.tmpMat4_,l)),this.setUniformFloatValue("u_time",.001*(Date.now()-this.startTime_)),this.setUniformFloatValue("u_zoom",t.viewState.zoom),this.setUniformFloatValue("u_resolution",t.viewState.resolution)},e.prototype.applyUniforms=function(t){var e,i=this.getGL(),n=0;this.uniforms_.forEach((function(r){if((e="function"==typeof r.value?r.value(t):r.value)instanceof HTMLCanvasElement||e instanceof HTMLImageElement||e instanceof ImageData)r.texture||(r.prevValue=void 0,r.texture=i.createTexture()),i.activeTexture(i["TEXTURE"+n]),i.bindTexture(i.TEXTURE_2D,r.texture),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),(!(e instanceof HTMLImageElement)||e.complete)&&r.prevValue!==e&&(r.prevValue=e,i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,e)),i.uniform1i(this.getUniformLocation(r.name),n++);else if(Array.isArray(e)&&6===e.length)this.setUniformMatrixValue(r.name,qY(this.tmpMat4_,e));else if(Array.isArray(e)&&e.length<=4)switch(e.length){case 2:return void i.uniform2f(this.getUniformLocation(r.name),e[0],e[1]);case 3:return void i.uniform3f(this.getUniformLocation(r.name),e[0],e[1],e[2]);case 4:return void i.uniform4f(this.getUniformLocation(r.name),e[0],e[1],e[2],e[3]);default:return}else"number"==typeof e&&i.uniform1f(this.getUniformLocation(r.name),e)}).bind(this))},e.prototype.useProgram=function(t){return t!=this.currentProgram_&&(this.getGL().useProgram(t),this.currentProgram_=t,this.uniformLocations_={},this.attribLocations_={},!0)},e.prototype.compileShader=function(t,e){var i=this.getGL(),n=i.createShader(e);return i.shaderSource(n,t),i.compileShader(n),n},e.prototype.getProgram=function(t,e){var i=this.getGL(),n=this.compileShader(t,i.FRAGMENT_SHADER),r=this.compileShader(e,i.VERTEX_SHADER);this.shaderCompileErrors_=null,i.getShaderInfoLog(n)&&(this.shaderCompileErrors_="Fragment shader compilation failed:\n"+i.getShaderInfoLog(n)),i.getShaderInfoLog(r)&&(this.shaderCompileErrors_=(this.shaderCompileErrors_||"")+"Vertex shader compilation failed:\n"+i.getShaderInfoLog(r));var s=i.createProgram();return i.attachShader(s,n),i.attachShader(s,r),i.linkProgram(s),s},e.prototype.getShaderCompileErrors=function(){return this.shaderCompileErrors_},e.prototype.getUniformLocation=function(t){return void 0===this.uniformLocations_[t]&&(this.uniformLocations_[t]=this.getGL().getUniformLocation(this.currentProgram_,t)),this.uniformLocations_[t]},e.prototype.getAttributeLocation=function(t){return void 0===this.attribLocations_[t]&&(this.attribLocations_[t]=this.getGL().getAttribLocation(this.currentProgram_,t)),this.attribLocations_[t]},e.prototype.makeProjectionTransform=function(t,e){var i=t.size,n=t.viewState.rotation,r=t.viewState.resolution,s=t.viewState.center;return sM(e),cM(e,0,0,2/(r*i[0]),2/(r*i[1]),-n,-s[0],-s[1]),e},e.prototype.setUniformFloatValue=function(t,e){this.getGL().uniform1f(this.getUniformLocation(t),e)},e.prototype.setUniformMatrixValue=function(t,e){this.getGL().uniformMatrix4fv(this.getUniformLocation(t),!1,e)},e.prototype.enableAttributeArray_=function(t,e,i,n,r){var s=this.getAttributeLocation(t);s<0||(this.getGL().enableVertexAttribArray(s),this.getGL().vertexAttribPointer(s,e,i,!1,n,r))},e.prototype.enableAttributes=function(t){for(var e=function(t){for(var e=0,i=0;i<t.length;i++){var n=t[i];e+=n.size*XY(n.type)}return e}(t),i=0,n=0;n<t.length;n++){var r=t[n];this.enableAttributeArray_(r.name,r.size,r.type||5126,e,i),i+=r.size*XY(r.type)}},e.prototype.handleWebGLContextLost=function(){HC(this.bufferCache_),this.currentProgram_=null},e.prototype.handleWebGLContextRestored=function(){},e.prototype.createTexture=function(t,e,i){var n=this.getGL(),r=i||n.createTexture(),s=n.RGBA,o=n.RGBA,a=n.UNSIGNED_BYTE;return n.bindTexture(n.TEXTURE_2D,r),e?n.texImage2D(n.TEXTURE_2D,0,s,o,a,e):n.texImage2D(n.TEXTURE_2D,0,s,t[0],t[1],0,o,a,null),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),r},e}(OC),tQ=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),eQ=function(t){function e(e,i){var n=t.call(this,e)||this,r=i||{};return n.helper=new JY({postProcesses:r.postProcesses,uniforms:r.uniforms}),void 0!==r.className&&(n.helper.getCanvas().className=r.className),n}return tQ(e,t),e.prototype.disposeInternal=function(){this.helper.dispose(),t.prototype.disposeInternal.call(this)},e.prototype.getShaderCompileErrors=function(){return this.helper.getShaderCompileErrors()},e.prototype.dispatchRenderEvent_=function(t,e){var i=this.getLayer();if(i.hasListener(t)){var n=new HG(t,null,e,null);i.dispatchEvent(n)}},e.prototype.preRender=function(t){this.dispatchRenderEvent_("prerender",t)},e.prototype.postRender=function(t){this.dispatchRenderEvent_("postrender",t)},e}(jG),iQ=new Uint8Array(4),nQ=function(){function t(t,e){this.helper_=t;var i=t.getGL();this.texture_=i.createTexture(),this.framebuffer_=i.createFramebuffer(),this.size_=e||[1,1],this.data_=new Uint8Array(0),this.dataCacheDirty_=!0,this.updateSize_()}return t.prototype.setSize=function(t){UC(t,this.size_)||(this.size_[0]=t[0],this.size_[1]=t[1],this.updateSize_())},t.prototype.getSize=function(){return this.size_},t.prototype.clearCachedData=function(){this.dataCacheDirty_=!0},t.prototype.readAll=function(){if(this.dataCacheDirty_){var t=this.size_,e=this.helper_.getGL();e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.readPixels(0,0,t[0],t[1],e.RGBA,e.UNSIGNED_BYTE,this.data_),this.dataCacheDirty_=!1}return this.data_},t.prototype.readPixel=function(t,e){if(t<0||e<0||t>this.size_[0]||e>=this.size_[1])return iQ[0]=0,iQ[1]=0,iQ[2]=0,iQ[3]=0,iQ;this.readAll();var i=Math.floor(t)+(this.size_[1]-Math.floor(e)-1)*this.size_[0];return iQ[0]=this.data_[4*i],iQ[1]=this.data_[4*i+1],iQ[2]=this.data_[4*i+2],iQ[3]=this.data_[4*i+3],iQ},t.prototype.getTexture=function(){return this.texture_},t.prototype.getFramebuffer=function(){return this.framebuffer_},t.prototype.updateSize_=function(){var t=this.size_,e=this.helper_.getGL();this.texture_=this.helper_.createTexture(t,null,this.texture_),e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.viewport(0,0,t[0],t[1]),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture_,0),this.data_=new Uint8Array(t[0]*t[1]*4)},t}(),rQ=new Blob(['var e="function"==typeof Object.assign?Object.assign:function(e,n){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1,o=arguments.length;r<o;++r){var i=arguments[r];if(null!=i)for(var f in i)i.hasOwnProperty(f)&&(t[f]=i[f])}return t},n="GENERATE_BUFFERS",t=[],r={vertexPosition:0,indexPosition:0};function o(e,n,t,r,o){e[n+0]=t,e[n+1]=r,e[n+2]=o}function i(e,n,i,f,s,u){var a=3+s,l=e[n+0],v=e[n+1],c=t;c.length=s;for(var g=0;g<c.length;g++)c[g]=e[n+2+g];var b=u?u.vertexPosition:0,h=u?u.indexPosition:0,d=b/a;return o(i,b,l,v,0),c.length&&i.set(c,b+3),o(i,b+=a,l,v,1),c.length&&i.set(c,b+3),o(i,b+=a,l,v,2),c.length&&i.set(c,b+3),o(i,b+=a,l,v,3),c.length&&i.set(c,b+3),b+=a,f[h++]=d,f[h++]=d+1,f[h++]=d+3,f[h++]=d+1,f[h++]=d+2,f[h++]=d+3,r.vertexPosition=b,r.indexPosition=h,r}var f=self;f.onmessage=function(t){var r=t.data;if(r.type===n){for(var o=r.customAttributesCount,s=2+o,u=new Float32Array(r.renderInstructions),a=u.length/s,l=4*a*(o+3),v=new Uint32Array(6*a),c=new Float32Array(l),g=null,b=0;b<u.length;b+=s)g=i(u,b,c,v,o,g);var h=e({vertexBuffer:c.buffer,indexBuffer:v.buffer,renderInstructions:u.buffer},r);f.postMessage(h,[c.buffer,v.buffer,u.buffer])}};'],{type:"application/javascript"}),sQ=URL.createObjectURL(rQ),oQ=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),aQ=function(t){function e(e,i){var n=this,r=i.uniforms||{},s=[1,0,0,1,0,0];r.u_projectionMatrix=s,(n=t.call(this,e,{className:i.className,uniforms:r,postProcesses:i.postProcesses})||this).sourceRevision_=-1,n.verticesBuffer_=new WY(34962,35048),n.hitVerticesBuffer_=new WY(34962,35048),n.indicesBuffer_=new WY(34963,35048),n.program_=n.helper.getProgram(i.fragmentShader,i.vertexShader),n.hitDetectionEnabled_=!(!i.hitFragmentShader||!i.hitVertexShader),n.hitProgram_=n.hitDetectionEnabled_&&n.helper.getProgram(i.hitFragmentShader,i.hitVertexShader);var o=i.attributes?i.attributes.map(function(t){return{name:"a_"+t.name,size:1,type:QY.FLOAT}}):[];n.attributes=[{name:"a_position",size:2,type:QY.FLOAT},{name:"a_index",size:1,type:QY.FLOAT}].concat(o),n.hitDetectionAttributes=[{name:"a_position",size:2,type:QY.FLOAT},{name:"a_index",size:1,type:QY.FLOAT},{name:"a_hitColor",size:4,type:QY.FLOAT},{name:"a_featureUid",size:1,type:QY.FLOAT}].concat(o),n.customAttributes=i.attributes?i.attributes:[],n.previousExtent_=[1/0,1/0,-1/0,-1/0],n.currentTransform_=s,n.renderTransform_=[1,0,0,1,0,0],n.invertRenderTransform_=[1,0,0,1,0,0],n.renderInstructions_=new Float32Array(0),n.hitRenderInstructions_=new Float32Array(0),n.hitRenderTarget_=n.hitDetectionEnabled_&&new nQ(n.helper),n.worker_=new Worker(sQ),n.worker_.addEventListener("message",(function(t){var e=t.data;if("GENERATE_BUFFERS"===e.type){var i=e.projectionTransform;e.hitDetection?(this.hitVerticesBuffer_.fromArrayBuffer(e.vertexBuffer),this.helper.flushBufferData(this.hitVerticesBuffer_)):(this.verticesBuffer_.fromArrayBuffer(e.vertexBuffer),this.helper.flushBufferData(this.verticesBuffer_)),this.indicesBuffer_.fromArrayBuffer(e.indexBuffer),this.helper.flushBufferData(this.indicesBuffer_),this.renderTransform_=i,hM(this.invertRenderTransform_,this.renderTransform_),e.hitDetection?this.hitRenderInstructions_=new Float32Array(t.data.renderInstructions):this.renderInstructions_=new Float32Array(t.data.renderInstructions),this.getLayer().changed()}}).bind(n)),n.featureCache_={},n.featureCount_=0;var a=n.getLayer().getSource();return n.sourceListenKeys_=[tk(a,"addfeature",n.handleSourceFeatureAdded_,n),tk(a,"changefeature",n.handleSourceFeatureChanged_,n),tk(a,"removefeature",n.handleSourceFeatureDelete_,n),tk(a,"clear",n.handleSourceFeatureClear_,n)],a.forEachFeature((function(t){this.featureCache_[YC(t)]={feature:t,properties:t.getProperties(),geometry:t.getGeometry()},this.featureCount_++}).bind(n)),n}return oQ(e,t),e.prototype.handleSourceFeatureAdded_=function(t){var e=t.feature;this.featureCache_[YC(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()},this.featureCount_++},e.prototype.handleSourceFeatureChanged_=function(t){var e=t.feature;this.featureCache_[YC(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()}},e.prototype.handleSourceFeatureDelete_=function(t){delete this.featureCache_[YC(t.feature)],this.featureCount_--},e.prototype.handleSourceFeatureClear_=function(){this.featureCache_={},this.featureCount_=0},e.prototype.renderFrame=function(t){this.preRender(t);var e=this.indicesBuffer_.getSize();this.helper.drawElements(0,e),this.helper.finalizeDraw(t);var i=this.helper.getCanvas(),n=t.layerStatesArray[t.layerIndex].opacity;return n!==parseFloat(i.style.opacity)&&(i.style.opacity=String(n)),this.hitDetectionEnabled_&&(this.renderHitDetection(t),this.hitRenderTarget_.clearCachedData()),this.postRender(t),i},e.prototype.prepareFrame=function(t){var e=this.getLayer(),i=e.getSource(),n=t.viewState,r=!t.viewHints[0]&&!t.viewHints[1],s=!RS(this.previousExtent_,t.extent),o=this.sourceRevision_<i.getRevision();if(o&&(this.sourceRevision_=i.getRevision()),r&&(s||o)){var a=n.projection,l=n.resolution,c=e instanceof HZ?e.getRenderBuffer():0,h=xS(t.extent,c*l);i.loadFeatures(h,l,a),this.rebuildBuffers_(t),this.previousExtent_=t.extent.slice()}return this.helper.makeProjectionTransform(t,this.currentTransform_),oM(this.currentTransform_,this.invertRenderTransform_),this.helper.useProgram(this.program_),this.helper.prepareDraw(t),this.helper.bindBuffer(this.verticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.attributes),!0},e.prototype.rebuildBuffers_=function(t){var e=[1,0,0,1,0,0];this.helper.makeProjectionTransform(t,e);var i,n,r=(2+this.customAttributes.length)*this.featureCount_;if(this.renderInstructions_&&this.renderInstructions_.length===r||(this.renderInstructions_=new Float32Array(r)),this.hitDetectionEnabled_){var s=(7+this.customAttributes.length)*this.featureCount_;this.hitRenderInstructions_&&this.hitRenderInstructions_.length===s||(this.hitRenderInstructions_=new Float32Array(s))}var o,a,l,c=[],h=[],u=0,d=0;for(var p in this.featureCache_)if((n=(i=this.featureCache_[p]).geometry)&&"Point"===n.getType()){c[0]=n.getFlatCoordinates()[0],c[1]=n.getFlatCoordinates()[1],lM(e,c),a=d+6,l=void 0,(l=h||[])[0]=Math.floor(a/256/256/256)/255,l[1]=Math.floor(a/256/256)%256/255,l[2]=Math.floor(a/256)%256/255,l[3]=a%256/255,o=l,this.renderInstructions_[u++]=c[0],this.renderInstructions_[u++]=c[1],this.hitDetectionEnabled_&&(this.hitRenderInstructions_[d++]=c[0],this.hitRenderInstructions_[d++]=c[1],this.hitRenderInstructions_[d++]=o[0],this.hitRenderInstructions_[d++]=o[1],this.hitRenderInstructions_[d++]=o[2],this.hitRenderInstructions_[d++]=o[3],this.hitRenderInstructions_[d++]=Number(p));for(var f=void 0,m=0;m<this.customAttributes.length;m++)f=this.customAttributes[m].callback(i.feature,i.properties),this.renderInstructions_[u++]=f,this.hitDetectionEnabled_&&(this.hitRenderInstructions_[d++]=f)}var g={type:"GENERATE_BUFFERS",renderInstructions:this.renderInstructions_.buffer,customAttributesCount:this.customAttributes.length};if(g.projectionTransform=e,this.worker_.postMessage(g,[this.renderInstructions_.buffer]),this.renderInstructions_=null,this.hitDetectionEnabled_){var A={type:"GENERATE_BUFFERS",renderInstructions:this.hitRenderInstructions_.buffer,customAttributesCount:5+this.customAttributes.length};A.projectionTransform=e,A.hitDetection=!0,this.worker_.postMessage(A,[this.hitRenderInstructions_.buffer]),this.hitRenderInstructions_=null}},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,r){if(yS(this.hitDetectionEnabled_,66),this.hitRenderInstructions_){var s=lM(e.coordinateToPixelTransform,t.slice()),o=this.hitRenderTarget_.readPixel(s[0]/2,s[1]/2),a=(h=[o[0]/255,o[1]/255,o[2]/255,o[3]/255],u=0,u+=Math.round(256*h[0]*256*256*255),u+=Math.round(256*h[1]*256*255),(u+=Math.round(256*h[2]*255))+Math.round(255*h[3])),l=Math.floor(this.hitRenderInstructions_[a]).toString(),c=this.getLayer().getSource().getFeatureByUid(l);return c?n(c,this.getLayer(),null):void 0}var h,u},e.prototype.renderHitDetection=function(t){if(this.hitVerticesBuffer_.getSize()){this.hitRenderTarget_.setSize([Math.floor(t.size[0]/2),Math.floor(t.size[1]/2)]),this.helper.useProgram(this.hitProgram_),this.helper.prepareDrawToRenderTarget(t,this.hitRenderTarget_,!0),this.helper.bindBuffer(this.hitVerticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.hitDetectionAttributes);var e=this.indicesBuffer_.getSize();this.helper.drawElements(0,e)}},e.prototype.disposeInternal=function(){this.worker_.terminate(),this.layer_=null,this.sourceListenKeys_.forEach(function(t){ik(t)}),this.sourceListenKeys_=null,t.prototype.disposeInternal.call(this)},e}(eQ),lQ={};function cQ(t){if("number"==typeof t)return 1;if("boolean"==typeof t)return 8;if("string"==typeof t)return fW.test(e=t)&&(e=gW(e)),pW.test(e)||0===e.indexOf("rgba(")||0===e.indexOf("rgb(")?6:2;var e;if(!Array.isArray(t))throw new Error("Unhandled value type: "+JSON.stringify(t));var i=t;if(i.every(function(t){return"number"==typeof t}))return 3===i.length||4===i.length?20:16;if("string"!=typeof i[0])throw new Error("Expected an expression operator but received: "+JSON.stringify(i));var n=lQ[i[0]];if(void 0===n)throw new Error("Unrecognized expression operator: "+JSON.stringify(i));return n.getReturnType(i.slice(1))}function hQ(t){var e=t.toString();return-1===e.indexOf(".")?e+".0":e}function uQ(t){if(t.length<2||t.length>4)throw new Error("`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.");return"vec"+t.length+"("+t.map(hQ).join(", ")+")"}function dQ(t,e){return void 0===t.stringLiteralsMap[e]&&(t.stringLiteralsMap[e]=Object.keys(t.stringLiteralsMap).length),t.stringLiteralsMap[e]}function pQ(t,e,i){if(Array.isArray(e)&&"string"==typeof e[0]){var n=lQ[e[0]];if(void 0===n)throw new Error("Unrecognized expression operator: "+JSON.stringify(e));return n.toGlsl(t,e.slice(1),i)}var r,s=cQ(e);return(1&s)>0?hQ(e):(8&s)>0?e.toString():(2&s)>0&&(void 0===i||2==i)?function(t,e){return hQ(dQ(t,e))}(t,e.toString()):(4&s)>0&&(void 0===i||4==i)?((r=_W(e).slice()).length<4&&r.push(1),uQ(r.map(function(t,e){return e<3?t/255:t}))):(16&s)>0?uQ(e):void 0}function fQ(t){if(!(1&cQ(t)))throw new Error("A numeric value was expected, got "+JSON.stringify(t)+" instead")}function mQ(t){for(var e=0;e<t.length;e++)fQ(t[e])}function gQ(t){if(!(2&cQ(t)))throw new Error("A string value was expected, got "+JSON.stringify(t)+" instead")}function AQ(t){if(!(8&cQ(t)))throw new Error("A boolean value was expected, got "+JSON.stringify(t)+" instead")}function bQ(t,e){if(t.length!==e)throw new Error("Exactly "+e+" arguments were expected, got "+t.length+" instead")}function vQ(t,e){if(t.length<e)throw new Error("At least "+e+" arguments were expected, got "+t.length+" instead")}function _Q(t,e){if(t.length>e)throw new Error("At most "+e+" arguments were expected, got "+t.length+" instead")}function yQ(t){if(t.length%2!=0)throw new Error("An even amount of arguments was expected, got "+t+" instead")}function wQ(t,e){if(Math.log2(e)%1!=0)throw new Error("Could not infer only one type from the following expression: "+JSON.stringify(t))}function xQ(t){return{getReturnType:function(t){return 8},toGlsl:function(e,i){bQ(i,2);for(var n=31,r=0;r<i.length;r++)n&=cQ(i[r]);if(0===n)throw new Error("All arguments should be of compatible type, got "+JSON.stringify(i)+" instead");return"("+pQ(e,i[0],n)+" "+t+" "+pQ(e,i[1],n)+")"}}}function CQ(t){return{getReturnType:function(t){return 8},toGlsl:function(e,i){vQ(i,2);for(var n=0;n<i.length;n++)AQ(i[n]);return"("+i.map(function(t){return pQ(e,t)}).join(" "+t+" ")+")"}}}lQ.get={getReturnType:function(t){return 31},toGlsl:function(t,e){bQ(e,1),gQ(e[0]);var i=e[0].toString();return-1===t.attributes.indexOf(i)&&t.attributes.push(i),(t.inFragmentShader?"v_":"a_")+i}},lQ.var={getReturnType:function(t){return 31},toGlsl:function(t,e){bQ(e,1),gQ(e[0]);var i=e[0].toString();return-1===t.variables.indexOf(i)&&t.variables.push(i),"u_"+i}},lQ.time={getReturnType:function(t){return 1},toGlsl:function(t,e){return bQ(e,0),"u_time"}},lQ.zoom={getReturnType:function(t){return 1},toGlsl:function(t,e){return bQ(e,0),"u_zoom"}},lQ.resolution={getReturnType:function(t){return 1},toGlsl:function(t,e){return bQ(e,0),"u_resolution"}},lQ["*"]={getReturnType:function(t){return 1},toGlsl:function(t,e){return bQ(e,2),mQ(e),"("+pQ(t,e[0])+" * "+pQ(t,e[1])+")"}},lQ["/"]={getReturnType:function(t){return 1},toGlsl:function(t,e){return bQ(e,2),mQ(e),"("+pQ(t,e[0])+" / "+pQ(t,e[1])+")"}},lQ["+"]={getReturnType:function(t){return 1},toGlsl:function(t,e){return bQ(e,2),mQ(e),"("+pQ(t,e[0])+" + "+pQ(t,e[1])+")"}},lQ["-"]={getReturnType:function(t){return 1},toGlsl:function(t,e){return bQ(e,2),mQ(e),"("+pQ(t,e[0])+" - "+pQ(t,e[1])+")"}},lQ.clamp={getReturnType:function(t){return 1},toGlsl:function(t,e){bQ(e,3),mQ(e);var i=pQ(t,e[1]),n=pQ(t,e[2]);return"clamp("+pQ(t,e[0])+", "+i+", "+n+")"}},lQ["%"]={getReturnType:function(t){return 1},toGlsl:function(t,e){return bQ(e,2),mQ(e),"mod("+pQ(t,e[0])+", "+pQ(t,e[1])+")"}},lQ["^"]={getReturnType:function(t){return 1},toGlsl:function(t,e){return bQ(e,2),mQ(e),"pow("+pQ(t,e[0])+", "+pQ(t,e[1])+")"}},lQ[">"]={getReturnType:function(t){return 8},toGlsl:function(t,e){return bQ(e,2),mQ(e),"("+pQ(t,e[0])+" > "+pQ(t,e[1])+")"}},lQ[">="]={getReturnType:function(t){return 8},toGlsl:function(t,e){return bQ(e,2),mQ(e),"("+pQ(t,e[0])+" >= "+pQ(t,e[1])+")"}},lQ["<"]={getReturnType:function(t){return 8},toGlsl:function(t,e){return bQ(e,2),mQ(e),"("+pQ(t,e[0])+" < "+pQ(t,e[1])+")"}},lQ["<="]={getReturnType:function(t){return 8},toGlsl:function(t,e){return bQ(e,2),mQ(e),"("+pQ(t,e[0])+" <= "+pQ(t,e[1])+")"}},lQ["=="]=xQ("=="),lQ["!="]=xQ("!="),lQ["!"]={getReturnType:function(t){return 8},toGlsl:function(t,e){return bQ(e,1),AQ(e[0]),"(!"+pQ(t,e[0])+")"}},lQ.all=CQ("&&"),lQ.any=CQ("||"),lQ.between={getReturnType:function(t){return 8},toGlsl:function(t,e){bQ(e,3),mQ(e);var i=pQ(t,e[1]),n=pQ(t,e[2]),r=pQ(t,e[0]);return"("+r+" >= "+i+" && "+r+" <= "+n+")"}},lQ.array={getReturnType:function(t){return 16},toGlsl:function(t,e){vQ(e,2),_Q(e,4),mQ(e);var i=e.map(function(e){return pQ(t,e,1)});return"vec"+e.length+"("+i.join(", ")+")"}},lQ.color={getReturnType:function(t){return 4},toGlsl:function(t,e){vQ(e,3),_Q(e,4),mQ(e),3===e.length&&e.push(1);var i=e.map(function(e,i){return pQ(t,e,1)+(i<3?" / 255.0":"")});return"vec"+e.length+"("+i.join(", ")+")"}},lQ.interpolate={getReturnType:function(t){for(var e=5,i=3;i<t.length;i+=2)e&=cQ(t[i]);return e},toGlsl:function(t,e,i){yQ(e),vQ(e,6);var n,r=e[0];switch(r[0]){case"linear":n=1;break;case"exponential":n=r[1];break;default:n=null}if(!n)throw new Error('Invalid interpolation type for "interpolate" operator, received: '+JSON.stringify(r));var s=void 0!==i?i:31,o=lQ.interpolate.getReturnType(e)&s;wQ(e,o);for(var a=pQ(t,e[1]),l=null,c=2;c<e.length-2;c+=2){var h=pQ(t,e[c]),u=pQ(t,e[c+1],o),d=pQ(t,e[c+2]);l="mix("+(l||u)+", "+pQ(t,e[c+3],o)+", pow(clamp(("+a+" - "+h+") / ("+d+" - "+h+"), 0.0, 1.0), "+hQ(n)+"))"}return l}},lQ.match={getReturnType:function(t){for(var e=31,i=2;i<t.length;i+=2)e&=cQ(t[i]);return e&cQ(t[t.length-1])},toGlsl:function(t,e,i){yQ(e),vQ(e,4);var n=void 0!==i?i:31,r=lQ.match.getReturnType(e)&n;wQ(e,r);for(var s=pQ(t,e[0]),o=pQ(t,e[e.length-1],r),a=null,l=e.length-3;l>=1;l-=2)a="("+s+" == "+pQ(t,e[l])+" ? "+pQ(t,e[l+1],r)+" : "+(a||o)+")";return a}},lQ.case={getReturnType:function(t){for(var e=31,i=1;i<t.length;i+=2)e&=cQ(t[i]);return e&cQ(t[t.length-1])},toGlsl:function(t,e,i){!function(t){if(t.length%2==0)throw new Error("An odd amount of arguments was expected, got "+t+" instead")}(e),vQ(e,3);var n=void 0!==i?i:31,r=lQ.case.getReturnType(e)&n;wQ(e,r);for(var s=0;s<e.length-1;s+=2)AQ(e[s]);var o=pQ(t,e[e.length-1],r),a=null;for(s=e.length-3;s>=0;s-=2)a="("+pQ(t,e[s])+" ? "+pQ(t,e[s+1],r)+" : "+(a||o)+")";return a}};var SQ=function(){function t(){this.uniforms=[],this.attributes=[],this.varyings=[],this.sizeExpression="vec2(1.0)",this.rotationExpression="0.0",this.offsetExpression="vec2(0.0)",this.colorExpression="vec4(1.0)",this.texCoordExpression="vec4(0.0, 0.0, 1.0, 1.0)",this.discardExpression="false",this.rotateWithView=!1}return t.prototype.addUniform=function(t){return this.uniforms.push(t),this},t.prototype.addAttribute=function(t){return this.attributes.push(t),this},t.prototype.addVarying=function(t,e,i){return this.varyings.push({name:t,type:e,expression:i}),this},t.prototype.setSizeExpression=function(t){return this.sizeExpression=t,this},t.prototype.setRotationExpression=function(t){return this.rotationExpression=t,this},t.prototype.setSymbolOffsetExpression=function(t){return this.offsetExpression=t,this},t.prototype.setColorExpression=function(t){return this.colorExpression=t,this},t.prototype.setTextureCoordinateExpression=function(t){return this.texCoordExpression=t,this},t.prototype.setFragmentDiscardExpression=function(t){return this.discardExpression=t,this},t.prototype.setSymbolRotateWithView=function(t){return this.rotateWithView=t,this},t.prototype.getSizeExpression=function(){return this.sizeExpression},t.prototype.getOffsetExpression=function(){return this.offsetExpression},t.prototype.getColorExpression=function(){return this.colorExpression},t.prototype.getTextureCoordinateExpression=function(){return this.texCoordExpression},t.prototype.getFragmentDiscardExpression=function(){return this.discardExpression},t.prototype.getSymbolVertexShader=function(t){var e=this.rotateWithView?"u_offsetScaleMatrix * u_offsetRotateMatrix":"u_offsetScaleMatrix",i=this.attributes,n=this.varyings;return t&&(i=i.concat("vec4 a_hitColor"),n=n.concat({name:"v_hitColor",type:"vec4",expression:"a_hitColor"})),"precision mediump float;\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\n"+this.uniforms.map(function(t){return"uniform "+t+";"}).join("\n")+"\nattribute vec2 a_position;\nattribute float a_index;\n"+i.map(function(t){return"attribute "+t+";"}).join("\n")+"\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\n"+n.map(function(t){return"varying "+t.type+" "+t.name+";"}).join("\n")+"\nvoid main(void) {\n mat4 offsetMatrix = "+e+";\n vec2 halfSize = "+this.sizeExpression+" * 0.5;\n vec2 offset = "+this.offsetExpression+";\n float angle = "+this.rotationExpression+";\n float offsetX;\n float offsetY;\n if (a_index == 0.0) {\n offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\n offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\n } else if (a_index == 1.0) {\n offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\n offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\n } else if (a_index == 2.0) {\n offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\n offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\n } else {\n offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\n offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\n }\n vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n vec4 texCoord = "+this.texCoordExpression+";\n float u = a_index == 0.0 || a_index == 3.0 ? texCoord.s : texCoord.p;\n float v = a_index == 2.0 || a_index == 3.0 ? texCoord.t : texCoord.q;\n v_texCoord = vec2(u, v);\n u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n v = a_index == 2.0 || a_index == 3.0 ? 0.0 : 1.0;\n v_quadCoord = vec2(u, v);\n"+n.map(function(t){return" "+t.name+" = "+t.expression+";"}).join("\n")+"\n}"},t.prototype.getSymbolFragmentShader=function(t){var e=t?" if (gl_FragColor.a < 0.1) { discard; } gl_FragColor = v_hitColor;":"",i=this.varyings;return t&&(i=i.concat({name:"v_hitColor",type:"vec4",expression:"a_hitColor"})),"precision mediump float;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\n"+this.uniforms.map(function(t){return"uniform "+t+";"}).join("\n")+"\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\n"+i.map(function(t){return"varying "+t.type+" "+t.name+";"}).join("\n")+"\nvoid main(void) {\n if ("+this.discardExpression+") { discard; }\n gl_FragColor = "+this.colorExpression+";\n gl_FragColor.rgb *= gl_FragColor.a;\n"+e+"\n}"},t}(),kQ=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),EQ=function(t){function e(e){var i=this,n=zC({},e);return(i=t.call(this,n)||this).parseResult_=function(t){var e=t.symbol,i=void 0!==e.size?e.size:1,n=e.color||"white",r=e.textureCoord||[0,0,1,1],s=e.offset||[0,0],o=void 0!==e.opacity?e.opacity:1,a=void 0!==e.rotation?e.rotation:0,l={inFragmentShader:!1,variables:[],attributes:[],stringLiteralsMap:{}},c=pQ(l,i,17),h=pQ(l,s,16),u=pQ(l,r,16),d=pQ(l,a,1),p={inFragmentShader:!0,variables:l.variables,attributes:[],stringLiteralsMap:l.stringLiteralsMap},f=pQ(p,n,4),m=pQ(p,o,1),g="1.0",A="vec2("+pQ(p,i,17)+").x";switch(e.symbolType){case"square":case"image":break;case"circle":g="(1.0-smoothstep(1.-4./"+A+",1.,dot(v_quadCoord-.5,v_quadCoord-.5)*4.))";break;case"triangle":var b="(v_quadCoord*2.-1.)",v="(atan("+b+".x,"+b+".y))";g="(1.0-smoothstep(.5-3./"+A+",.5,cos(floor(.5+"+v+"/2.094395102)*2.094395102-"+v+")*length("+b+")))";break;default:throw new Error("Unexpected symbol type: "+e.symbolType)}var _=(new SQ).setSizeExpression("vec2("+c+")").setRotationExpression(d).setSymbolOffsetExpression(h).setTextureCoordinateExpression(u).setSymbolRotateWithView(!!e.rotateWithView).setColorExpression("vec4("+f+".rgb, "+f+".a * "+m+" * "+g+")");if(t.filter){var y=pQ(p,t.filter,8);_.setFragmentDiscardExpression("!"+y)}var w={};if(p.variables.forEach(function(e){_.addUniform("float u_"+e),w["u_"+e]=function(){if(!t.variables||void 0===t.variables[e])throw new Error("The following variable is missing from the style: "+e);var i=t.variables[e];return"string"==typeof i&&(i=dQ(l,i)),void 0!==i?i:-9999999}}),"image"===e.symbolType&&e.src){var x=new Image;x.src=e.src,_.addUniform("sampler2D u_texture").setColorExpression(_.getColorExpression()+" * texture2D(u_texture, v_texCoord)"),w.u_texture=x}return p.attributes.forEach(function(t){-1===l.attributes.indexOf(t)&&l.attributes.push(t),_.addVarying("v_"+t,"float","a_"+t)}),l.attributes.forEach(function(t){_.addAttribute("float a_"+t)}),{builder:_,attributes:l.attributes.map(function(t){return{name:t,callback:function(e,i){var n=i[t];return"string"==typeof n&&(n=dQ(l,n)),void 0!==n?n:-9999999}}}),uniforms:w}}(e.style),i.hitDetectionDisabled_=!!e.disableHitDetection,i}return kQ(e,t),e.prototype.createRenderer=function(){return new aQ(this,{className:this.getClassName(),vertexShader:this.parseResult_.builder.getSymbolVertexShader(),fragmentShader:this.parseResult_.builder.getSymbolFragmentShader(),hitVertexShader:!this.hitDetectionDisabled_&&this.parseResult_.builder.getSymbolVertexShader(!0),hitFragmentShader:!this.hitDetectionDisabled_&&this.parseResult_.builder.getSymbolFragmentShader(!0),uniforms:this.parseResult_.uniforms,attributes:this.parseResult_.attributes})},e.prototype.disposeInternal=function(){this.getRenderer().disposeInternal(),t.prototype.disposeInternal.call(this)},e}(LG);window.ol&&!ol.ext&&(ol.ext={});var DQ=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t};window.ol&&(ol.inherits||(ol.inherits=DQ)),window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),window.Element&&!Element.prototype.remove&&(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)});var IQ=DQ,PQ=function(t,e){var i=t[0]-e[0],n=t[1]-e[1];return Math.sqrt(i*i+n*n)},OQ=function(t,e){return t[0]==e[0]&&t[1]==e[1]};kH.prototype.splitAt=function(t,e){var i;if(!t)return[this];if(e||(e=1e-10),t.length&&t[0].length){var n=[this];for(i=0;i<t.length;i++){for(var r=[],s=0;s<n.length;s++){var o=n[s].splitAt(t[i],e);r=r.concat(o)}n=r}return n}if(OQ(t,this.getFirstCoordinate())||OQ(t,this.getLastCoordinate()))return[this];var a=this.getCoordinates(),l=[a[0]],c=[];for(i=0;i<a.length-1;i++)if(!OQ(a[i],a[i+1])){if(OQ(t,a[i+1]))l.push(a[i+1]),c.push(new kH(l)),l=[];else if(!OQ(t,a[i])){var h,u=!1;a[i][0]==a[i+1][0]?(h=(a[i][1]-t[1])/(a[i][1]-a[i+1][1]),u=a[i][0]==t[0]&&0<h&&h<=1):a[i][1]==a[i+1][1]?(h=(a[i][0]-t[0])/(a[i][0]-a[i+1][0]),u=a[i][1]==t[1]&&0<h&&h<=1):(h=(a[i][0]-t[0])/(a[i][0]-a[i+1][0]),u=Math.abs(h-(a[i][1]-t[1])/(a[i][1]-a[i+1][1]))<=e&&0<h&&h<=1),u&&(l.push(t),c.push(new kH(l)),l=[t])}l.push(a[i+1])}return l.length>1&&c.push(new kH(l)),c.length?c:[this]};var MQ=function(t){t||(t={}),jZ.call(this,{renderer:this._render.bind(this),stroke:t.stroke,text:t.text,zIndex:t.zIndex,geometry:t.geometry}),this._visible=!1!==t.visible,"function"==typeof t.width?this._widthFn=t.width:this.setWidth(t.width),this.setWidth2(t.width2),"function"==typeof t.color?this._colorFn=t.color:this.setColor(t.color),this.setColor2(t.color2),this.setLineCap(t.lineCap),this.setArrow(t.arrow),this.setArrowSize(t.arrowSize),this.setArrowColor(t.arrowColor),this._offset=[0,0],this.setOffset(t.offset0,0),this.setOffset(t.offset1,1)};IQ(MQ,jZ),MQ.prototype.setWidth=function(t){this._width=t||0},MQ.prototype.setWidth2=function(t){this._width2=t},MQ.prototype.getOffset=function(t){return this._offset[t]},MQ.prototype.setOffset=function(t,e){switch(t=Math.max(0,parseFloat(t)),e){case 0:this._offset[0]=t;break;case 1:this._offset[1]=t}},MQ.prototype.setLineCap=function(t){this._lineCap="round"===t?"round":"butt"},MQ.prototype.getWidth=function(t,e){return this._widthFn?this._widthFn(t,e):this._width+(("number"==typeof this._width2?this._width2:this._width)-this._width)*e},MQ.prototype.setColor=function(t){try{this._color=_W(t)}catch($nt){this._color=[0,0,0,1]}},MQ.prototype.setColor2=function(t){try{this._color2=_W(t)}catch($nt){this._color2=null}},MQ.prototype.setArrowColor=function(t){try{this._acolor=mW(t)}catch($nt){this._acolor=null}},MQ.prototype.getColor=function(t,e){if(this._colorFn)return mW(this._colorFn(t,e));var i=this._color,n=this._color2||this._color;return"rgba("+ +Math.round(i[0]+(n[0]-i[0])*e)+","+Math.round(i[1]+(n[1]-i[1])*e)+","+Math.round(i[2]+(n[2]-i[2])*e)+","+(i[3]+(n[3]-i[3])*e)+")"},MQ.prototype.getArrow=function(){return this._arrow},MQ.prototype.setArrow=function(t){this._arrow=parseInt(t),(this._arrow<-1||this._arrow>2)&&(this._arrow=0)},MQ.prototype.getArrowSize=function(){return this._arrowSize||[16,16]},MQ.prototype.setArrowSize=function(t){Array.isArray(t)?this._arrowSize=t:"number"==typeof t&&(this._arrowSize=[t,t])},MQ.prototype.drawArrow=function(t,e,i,n,r){var s=this.getArrowSize()[0]*r,o=PQ(e,i),a=(e[0]-i[0])/o,l=(e[1]-i[1])/o;n=Math.max(this.getArrowSize()[1]/2,n/2)*r,t.beginPath(),t.moveTo(e[0],e[1]),t.lineTo(e[0]-s*a+n*l,e[1]-s*l-n*a),t.lineTo(e[0]-s*a-n*l,e[1]-s*l+n*a),t.lineTo(e[0],e[1]),t.fill()},MQ.prototype._render=function(t,e){if("LineString"===e.geometry.getType()){var i,n,r,s=e.context;if(!this._visible){var o=e.pixelRatio/e.resolution,a=Math.cos(e.rotation),l=Math.sin(e.rotation);n=e.geometry.getCoordinates();var c=t[0][0]-n[0][0]*o*a-n[0][1]*o*l,h=t[0][1]-n[0][0]*o*l+n[0][1]*o*a;for(t=[],i=0;r=n[i];i++)t[i]=[c+r[0]*o*a+r[1]*o*l,h+r[0]*o*l-r[1]*o*a,r[2]]}var u=this.getArrowSize()[0]*e.pixelRatio;s.save(),this.getOffset(0)&&this._splitAsize(t,this.getOffset(0)*e.pixelRatio),this.getOffset(1)&&this._splitAsize(t,this.getOffset(1)*e.pixelRatio,!0),t.length>1&&(-1===this.getArrow()||2===this.getArrow())&&(r=this._splitAsize(t,u),s.fillStyle=this._acolor?this._acolor:this.getColor(e.feature,0),this.drawArrow(s,r[0],r[1],this.getWidth(e.feature,0),e.pixelRatio)),t.length>1&&this.getArrow()>0&&(r=this._splitAsize(t,u,!0),s.fillStyle=this._acolor?this._acolor:this.getColor(e.feature,1),this.drawArrow(s,r[0],r[1],this.getWidth(e.feature,1),e.pixelRatio));var d=this._splitInto(t,255,2),p=0,f=d.length;if(s.lineJoin="round",s.lineCap=this._lineCap||"butt",d.length>1)for(p=0;p<d.length;p++){var m=p/f;for(n=d[p],s.lineWidth=this.getWidth(e.feature,m)*e.pixelRatio,s.strokeStyle=this.getColor(e.feature,m),s.beginPath(),s.moveTo(n[0][0],n[0][1]),i=1;r=n[i];i++)s.lineTo(r[0],r[1]);s.stroke()}s.restore()}},MQ.prototype._splitAsize=function(t,e,i){var n,r,s,o,a=0;for(n=s=i?t.pop():t.shift();t.length;){if(r=i?t.pop():t.shift(),a+(o=PQ(n,r))>e){o=PQ(n=[n[0]+(r[0]-n[0])*(e-a)/o,n[1]+(r[1]-n[1])*(e-a)/o],s),i?(t.push(r),t.push(n),t.push([n[0]+(s[0]-n[0])/o,n[1]+(s[1]-n[1])/o])):(t.unshift(r),t.unshift(n),t.unshift([n[0]+(s[0]-n[0])/o,n[1]+(s[1]-n[1])/o]));break}a+=o,n=r}return[s,n]},MQ.prototype._splitInto=function(t,e,i){var n,r,s,o=[],a=0;for(n=1;r=t[n];n++)a+=PQ(t[n-1],r);var l=Math.max(i||2,a/(e||255)),c=t[0];a=0;var h=[c];for(n=1,r=t[1];n<t.length;){var u=r[0]-c[0],d=r[1]-c[1];if(a+(s=Math.sqrt(u*u+d*d))>l){var p=(l-a)/s;h.push([c[0]+u*p,c[1]+d*p]),o.push(h),h=[c=[c[0]+u*p*.9,c[1]+d*p*.9]],a=0}else a+=s,h.push(c=r),r=t[++n]}return o.push(h),o};var TQ=MQ;const RQ=[13e3,12500,12e3,11500,11e3,10500,1e4,9500,9e3,8500,8500,7500,7e3,6500,6e3,5500,5e3,4500,4e3,3500,3e3,2500,2e3,1500,1200,1e3,800,600,400,300,200,100],VQ=["#ff0000","#ff00e4","#d800ff","#ae00ff","#9600ff","#7800ff","#6000ff","#4e00ff","#3600ff","#2400ff","#1200ff","#0000ff","#001eff","#0030ff","#0054ff","#0078ff","#0096ff","#00a8ff","#00c0ff","#00eaff","#00ffe4","#00ffd2","#00ff9c","#00ff72","#00ff36","#00ff0c","#1eff00","#42ff00","#ccff00","#f0ff00","#ffea00","#ffe062"],FQ=VQ.map(t=>CP(t));function LQ(t){return(t*=.3048)<=100?"#ffffff":VQ[RQ.findIndex(e=>e<t)]}class UQ extends pH{constructor(t,e,i,n){super({geometry:new kH([sE(t),sE(e)])}),super.setStyle(new TQ({color:LQ(i),color2:LQ(n),width:2}))}}class BQ extends pH{constructor(t){super({geometry:new jM(sE([t.lon,t.lat]))}),this.position=t;const[e,i,n]=(r=t.altitude,(r*=.3048)<=100?[255,255,255]:FQ[RQ.findIndex(t=>t<r)]);var r;this.set("red",e,!0),this.set("green",i,!0),this.set("blue",n,!0)}}class NQ extends pH{constructor(t,e){super({geometry:new jM(sE([t.lon,t.lat]))}),this.position=t;const i=iM[e];this.set("red",i[0],!0),this.set("green",i[1],!0),this.set("blue",i[2],!0)}}const jQ=eM.map(t=>new jZ({stroke:new VZ({color:t,width:2})})),zQ=eM.map(t=>new jZ({stroke:new VZ({color:t,lineDash:[5,15],width:2})}));class HQ extends pH{constructor(t,e,i){super({geometry:new kH([sE(t),sE(e)])}),super.setStyle(i)}}let KQ=(()=>{class t{constructor(t,e,i){this.eventsService=t,this.fleetsService=e,this.selectionService=i,this.trails$=new Av.a([]),Hg([this.eventsService.transhipmentTrail$,this.fleetsService.fleetTrails$,this.selectionService.trails$]).subscribe(([t,e,i])=>{this.trails$.next([t,...e,...i].filter(t=>!!t))})}clear(){this.trails$.next([])}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(IT),r.Zb(OT),r.Zb(xT))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),$Q=(()=>{class t extends LT{constructor(t,e,i,n,r,s){super(),this.interactionsService=t,this.mapConfigService=e,this.mapService=i,this.mapStateService=n,this.tooltipsService=r,this.trailsLayerService=s,this.pointerMoveSubscription=new ye.a,this.show=!1}ngOnInit(){this.ensureMandatoryInputParams("map"),this.positionsSource=new $q({features:[]}),this.positionsLayer=new EQ({source:this.positionsSource,style:{symbol:{symbolType:"circle",size:9,color:["color",["get","red"],["get","green"],["get","blue"]],offset:[0,0]}}}),this.positionsLayer.selectable=!0,this.map.addLayer(this.positionsLayer),this.trailSource=new $q({features:[],wrapX:!1}),this.trailsLayer=new Nq({source:this.trailSource,updateWhileAnimating:!0,updateWhileInteracting:!0}),this.map.addLayer(this.trailsLayer),this.subscriptions.push(this.mapStateService.featuresSelectable$.subscribe(t=>{this.positionsLayer.selectable=t})),this.subscriptions.push(this.mapStateService.showTrailsLayer$.subscribe(t=>{this.show=t,this.updatePositionsLayerVisibility(),this.trailsLayer.setVisible(this.show),this.show?this.pointerMoveSubscription=this.mapService.pointerMove$.subscribe(t=>{this.handleMoveEvent(t)}):this.pointerMoveSubscription.unsubscribe()})),this.subscriptions.push(this.trailsLayerService.trails$.pipe(mn((t,e)=>{return(i=t).length===(n=e).length&&i.every((t,e)=>t===n[e]);var i,n})).subscribe(t=>{const e=[],i=[];t.filter(t=>{var e;return!!(null===(e=t[0])||void 0===e?void 0:e.ship)}).forEach((t,n)=>{e.push(...t.map(t=>new NQ(t,n%eM.length))),i.push(...function(t,e){if(t.length<2)return[];const i=[];for(let n=1;n<t.length;n++){const r=t[n-1],s=t[n];i.push(new HQ([r.lon,r.lat],[s.lon,s.lat],(t[n-1].gap?zQ:jQ)[e%eM.length]))}return i}(t,n))}),t.filter(t=>{var e;return!!(null===(e=t[0])||void 0===e?void 0:e.aircraft)}).forEach((t,n)=>{e.push(...t.map(t=>new BQ(t))),i.push(...function(t,e){if(t.length<2)return[];const i=[];for(let n=1;n<t.length;n++){const e=t[n-1],r=t[n];i.push(new UQ([e.lon,e.lat],[r.lon,r.lat],e.altitude,r.altitude))}return i}(t))}),this.trailSource.clear(!0),this.positionsSource.clear(!0),this.trailSource.addFeatures(i),this.positionsSource.addFeatures(e)})),this.subscriptions.push(this.mapService.view$.subscribe(()=>{this.updatePositionsLayerVisibility()})),this.eventListeners.push(this.map.on("click",t=>this.handleClickEvent(t)))}ngOnDestroy(){super.ngOnDestroy(),this.map.removeLayer(this.positionsLayer),this.map.removeLayer(this.trailsLayer),this.pointerMoveSubscription.unsubscribe()}handleClickEvent(t){this.positionsLayer.selectable&&this.map.forEachFeatureAtPixel(t.pixel,t=>(t.position.ship?this.interactionsService.clickOnEntity(OP.ShipPosition,t.position):t.position.aircraft&&this.interactionsService.clickOnEntity(OP.AircraftPosition,t.position),!0),{hitTolerance:3,layerFilter:t=>t===this.positionsLayer})}handleMoveEvent(t){if(this.positionsLayer.selectable){let e=!1,i=!1;this.map.forEachFeatureAtPixel(t.pixel,t=>(t.position.ship?(e=!0,this.tooltipsService.hoverEntity(OP.ShipPosition,t.position)):t.position.aircraft&&(i=!0,this.tooltipsService.hoverEntity(OP.AircraftPosition,t.position)),!0),{hitTolerance:3,layerFilter:t=>t===this.positionsLayer}),e||this.tooltipsService.hoverEntity(OP.ShipPosition,null),i||this.tooltipsService.hoverEntity(OP.AircraftPosition,null)}}updatePositionsLayerVisibility(){const t=this.mapService.view$.value;this.positionsLayer.setVisible(this.show&&t&&(!this.mapConfigService.hidePositionsInLowZooms$.value||t.zoom>=8))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(ET),r.Pb(hI),r.Pb(pI),r.Pb(gT),r.Pb(kT),r.Pb(KQ))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-trails-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();class GQ{constructor(t){if(this.hexCode={0:"0000",1:"0001",2:"0010",3:"0011",4:"0100",5:"0101",6:"0110",7:"0111",8:"1000",9:"1001",a:"1010",b:"1011",c:"1100",d:"1101",e:"1110",f:"1111"},this.bits="",null!=t){15===t.length&&(this.bits+="0000");for(let e=0;e<t.length;e++)this.bits+=this.hexCode[t[e]]}}getLiteral(){const t=this.getLiteralArr();let e=`${t[0]}`;for(let i=1;i<t.length;i++)(i-1)%3==0&&(e+="-"),e+=`${t[i]}`;return e}getLiteralEdge(t){const e=this.getLiteralArr(),i=t.getLiteralArr();let n=`${e[0]}`;for(let r=1;r<e.length-1;r++)(r-1)%3==0&&(n+="-"),n+=`${e[r]}`;return n+=` / ${e[e.length-1]}-${i[i.length-1]}`,n}getLiteralArr(){const t=[];t.push(this.getFaceNb());for(let e=1;e<=15;e++){const i=this.getCellNb(e);7!==i&&t.push(i)}return t}getFaceNb(){let t="";for(let e=12;e<19;e++)t=this.bits[e]+t;return t=this.reverse(t),parseInt(t,2)}getCellNb(t){let e="";const i=16+3*t;for(let n=i;n<i+3;n++)e=this.bits[n]+e;return e=this.reverse(e),parseInt(e,2)}reverse(t){return t.split("").reverse().join("")}}function WQ(t){const e=t.getGeometry(),i=new VZ({color:PY[t.element.edge?t.element.res:t.element.res+1],lineCap:"square",width:4}),n=[new jZ({stroke:i})];return t.element.edge&&e.forEachSegment((e,r)=>{const s=Math.atan2(r[1]-e[1],r[0]-e[0]),o=5+10*Math.pow(12-t.element.res,2),a=new kH([r,[r[0]-o,r[1]+o]]);a.rotate(s,r);const l=new kH([r,[r[0]-o,r[1]-o]]);l.rotate(s,r),n.push(new jZ({geometry:a,stroke:i})),n.push(new jZ({geometry:l,stroke:i}))}),n}class ZQ extends pH{constructor(t,e){super({geometry:2===e.length?new kH(e):new iT(e)}),this.element=t,super.setStyle(WQ)}static New(t){return new ZQ(t,ZQ.PointsArr(t))}static PointsArr(t){let e=[];if(bP(t.h3index)){const i=gP(t.h3index),n=AP(t.h3index),r=dP(i),s=dP(n);t.edge=!0,t.lat=s[0],t.lon=s[1];const o=new GQ(i),a=new GQ(n);t.literal=o.getLiteralEdge(a),e.push(sE([r[1],r[0]])),e.push(sE([s[1],s[0]])),t.shift&&ZQ.shift(e,15-t.res)}else{const i=dP(t.h3index);t.edge=!1,t.lat=i[0],t.lon=i[1];const n=new GQ(t.h3index);t.literal=n.getLiteral(),e=[pP(t.h3index,!0).map(t=>sE(t))]}return e}static shift(t,e){const i=t[0],n=t[1],r=Math.atan2(n[1]-i[1],n[0]-i[0]),s=4*e,o=[Math.sin(r)*s+i[0],-Math.cos(r)*s+i[1]],a=[Math.sin(r)*s+n[0],-Math.cos(r)*s+n[1]];t[0]=o,t[1]=a}}class qQ{static reversedEdge(t){const e=vP(t);return i=e[0],r=(n=tP(e[1]))[0],s=n[1],o=tP(i),sP(WI.getH3UnidirectionalEdge(r,s,o[0],o[1]));var i,n,r,s,o}}let YQ=(()=>{class t extends LT{constructor(t,e,i,n,r,s){super(),this.h3TracesLayerService=t,this.interactionsService=e,this.tooltipsService=i,this.mapConfigService=n,this.mapService=r,this.mapStateService=s}ngOnInit(){this.ensureMandatoryInputParams("map"),this.h3ElementsSource=new $q({features:[]}),this.h3ElementsLayer=new Nq({source:this.h3ElementsSource,updateWhileAnimating:!0,updateWhileInteracting:!0}),this.h3ElementsLayer.selectable=!0,this.map.addLayer(this.h3ElementsLayer),this.subscriptions.push(this.mapStateService.featuresSelectable$.subscribe(t=>{this.h3ElementsLayer.selectable=t})),this.subscriptions.push(this.mapService.view$.subscribe(t=>{t&&this.h3ElementsLayer.setVisible(!this.mapConfigService.hidePositionsInLowZooms$.value||t.zoom>=8)})),this.subscriptions.push(this.h3TracesLayerService.trails$.subscribe(t=>{this.h3ElementsSource.clear(!0),this.mapConfigService.debugH3Trace$.value&&this.h3ElementsSource.addFeatures(t.map(QQ).flat())})),this.eventListeners.push(this.map.on("click",t=>{this.handleClickEvent(t)})),this.subscriptions.push(this.mapService.pointerMove$.subscribe(t=>{this.handleMoveEvent(t)}))}ngOnDestroy(){super.ngOnDestroy(),this.map.removeLayer(this.h3ElementsLayer)}handleClickEvent(t){this.h3ElementsLayer.selectable&&this.map.forEachFeatureAtPixel(t.pixel,t=>(this.interactionsService.clickOnEntity(OP.H3Element,t.element),!0),{hitTolerance:3,layerFilter:t=>t===this.h3ElementsLayer})}handleMoveEvent(t){this.h3ElementsLayer.selectable&&(this.map.forEachFeatureAtPixel(t.pixel,t=>(this.tooltipsService.hoverEntity(OP.H3Element,t.element),!0),{hitTolerance:3,layerFilter:t=>t===this.h3ElementsLayer})||this.tooltipsService.hoverEntity(OP.H3Element,null))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(GP),r.Pb(ET),r.Pb(kT),r.Pb(hI),r.Pb(pI),r.Pb(gT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-h3traces-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();function QQ(t){const e=t.elements,i=[],n={};for(let r=1;r<e.length;r++){const t=e[r];bP(t.h3index)&&(n[t.h3index]=1,n[qQ.reversedEdge(t.h3index)]&&(t.shift=!0)),i.push(ZQ.New(t))}return i}class XQ extends aQ{constructor(t,e){super(t,e)}prepareFrame(t){const e=this.getLayer(),i=e.getSource(),n=t.viewState,r=!t.viewHints[0]&&!t.viewHints[1],s=!RS(this.previousExtent_,t.extent),o=this.sourceRevision_<i.getRevision();return o&&(this.sourceRevision_=i.getRevision()),(r&&s||o)&&(clearTimeout(this.pendingBufferRefresh),this.pendingBufferRefresh=setTimeout(()=>{const r=n.projection,s=n.resolution,o=e instanceof HZ?e.getRenderBuffer():0,a=xS(t.extent,o*s);i.loadFeatures(a,s,r),this.rebuildBuffers_(t),this.previousExtent_=t.extent.slice()},300)),this.helper.makeProjectionTransform(t,this.currentTransform_),oM(this.currentTransform_,this.invertRenderTransform_),this.helper.useProgram(this.program_),this.helper.prepareDraw(t),this.helper.bindBuffer(this.verticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.attributes),!0}}var JQ=function(t){return t[t.Ship=0]="Ship",t[t.Point=1]="Point",t}({});const tX={aircraft:"/assets/images/aircraft.png",ship:"/assets/images/ship.png",point:"/assets/images/point.png"},eX={};let iX=(()=>{class t{init(){return Object(ue.a)(this,void 0,void 0,function*(){yield Promise.all(Object.entries(tX).map(([t,e])=>Object(ue.a)(this,void 0,void 0,function*(){eX[t]=yield function(t){return Object(ue.a)(this,void 0,void 0,function*(){return new Promise(e=>{const i=new Image;i.src=t,i.onload=()=>{e(i)}})})}(e)})))})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();class nX extends Nq{constructor(t){super(t)}createRenderer(){const t=new XQ(this,{attributes:[{name:"angle",callback:t=>t.ship.course},{name:"red",callback:t=>t.iconColor[0]},{name:"green",callback:t=>t.iconColor[1]},{name:"blue",callback:t=>t.iconColor[2]},{name:"alpha",callback:t=>t.ship.visible?t.ship.transparent?.5:1:0},{name:"iconKey",callback:t=>t.iconKey}],uniforms:{u_texture_point:eX.point,u_texture_ship:eX.ship,u_iconSize:12},vertexShader:"\nprecision mediump float;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_iconSize;\n\nattribute vec2 a_position;\nattribute float a_index;\nattribute float a_angle;\nattribute float a_red;\nattribute float a_green;\nattribute float a_blue;\nattribute float a_alpha;\nattribute float a_iconKey;\n\nvarying vec2 v_texCoord;\nvarying vec4 v_color;\nvarying float v_iconKey;\nvarying float v_alpha;\n\nvoid main(void) {\n vec2 size = vec2(u_iconSize);\n mat4 offsetMatrix = u_offsetScaleMatrix;\n vec2 offset = vec2(0.0);\n float offsetX = a_index == 0.0 || a_index == 3.0 ? offset.x - size.x / 2.0 : offset.x + size.x / 2.0;\n float offsetY = a_index == 0.0 || a_index == 1.0 ? offset.y - size.y / 2.0 : offset.y + size.y / 2.0;\n vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n\n vec4 texCoord = vec4(0.0, 0.0, 1.0, 1.0);\n float u = a_index == 0.0 || a_index == 3.0 ? texCoord.s : texCoord.q;\n float v = a_index == 2.0 || a_index == 3.0 ? texCoord.t : texCoord.p;\n v_texCoord = vec2(u, v);\n\n if (a_iconKey == 0.0) {\n vec2 rotationVector = vec2(sin(a_angle), cos(a_angle));\n vec2 centeredTexCoord = v_texCoord - 0.5;\n vec2 rotatedPosition = vec2(\n centeredTexCoord.x * rotationVector.y + centeredTexCoord.y * rotationVector.x,\n centeredTexCoord.y * rotationVector.y - centeredTexCoord.x * rotationVector.x\n ) + 0.5;\n v_texCoord = rotatedPosition;\n }\n\n v_color = vec4(a_red, a_green, a_blue, a_alpha);\n v_iconKey = a_iconKey;\n v_alpha = a_alpha;\n}\n",fragmentShader:"\nprecision mediump float;\n\nuniform sampler2D u_texture_ship;\nuniform sampler2D u_texture_point;\n\nvarying vec2 v_texCoord;\nvarying vec4 v_color;\nvarying float v_iconKey;\nvarying float v_alpha;\n\nvoid main(void) {\n if (v_alpha == 0.0) {\n discard;\n }\n vec4 textureColor;\n if (v_iconKey == 0.0) {\n textureColor = texture2D(u_texture_ship, v_texCoord);\n } else if (v_iconKey == 1.0) {\n textureColor = texture2D(u_texture_point, v_texCoord);\n } else {\n // error\n }\n gl_FragColor = v_color * textureColor;\n gl_FragColor.rgb *= gl_FragColor.a;\n}\n",hitVertexShader:"\nprecision mediump float;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_iconSize;\n\nattribute vec2 a_position;\nattribute float a_index;\nattribute vec4 a_hitColor;\nattribute float a_angle;\nattribute float a_iconKey;\nattribute float a_alpha;\n\nvarying vec2 v_texCoord;\nvarying vec4 v_hitColor;\nvarying float v_iconKey;\nvarying float v_alpha;\n\nvoid main(void) {\n float size = u_iconSize;\n mat4 offsetMatrix = u_offsetScaleMatrix;\n float offsetX = a_index == 0.0 || a_index == 3.0 ? -size / 2.0 : size / 2.0;\n float offsetY = a_index == 0.0 || a_index == 1.0 ? -size / 2.0 : size / 2.0;\n vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n\n vec4 texCoord = vec4(0.0, 0.0, 1.0, 1.0);\n float u = a_index == 0.0 || a_index == 3.0 ? texCoord.s : texCoord.q;\n float v = a_index == 2.0 || a_index == 3.0 ? texCoord.t : texCoord.p;\n v_texCoord = vec2(u, v);\n\n if (a_iconKey == 0.0) {\n vec2 rotationVector = vec2(sin(a_angle), cos(a_angle));\n vec2 centeredTexCoord = vec2(u, v) - 0.5;\n vec2 rotatedPosition = vec2(\n centeredTexCoord.x * rotationVector.y + centeredTexCoord.y * rotationVector.x,\n centeredTexCoord.y * rotationVector.y - centeredTexCoord.x * rotationVector.x\n ) + 0.5;\n v_texCoord = rotatedPosition;\n }\n\n v_hitColor = a_hitColor;\n v_iconKey = a_iconKey;\n v_alpha = a_alpha;\n}\n",hitFragmentShader:"\nprecision mediump float;\n\nuniform sampler2D u_texture_ship;\nuniform sampler2D u_texture_point;\n\nvarying vec2 v_texCoord;\nvarying vec4 v_hitColor;\nvarying float v_iconKey;\nvarying float v_alpha;\n\nvoid main(void) {\n if (v_alpha == 0.0) {\n discard;\n }\n vec4 textureColor;\n if (v_iconKey == 0.0) {\n textureColor = texture2D(u_texture_ship, v_texCoord);\n } else if (v_iconKey == 1.0) {\n textureColor = texture2D(u_texture_point, v_texCoord);\n } else {\n // error\n }\n if (textureColor.a < 0.1) {\n discard;\n }\n\n gl_FragColor = v_hitColor;\n}\n"});return t.renderDeclutter=function(){},t}disposeInternal(){this.renderer_.dispose(),super.disposeInternal()}}const rX=xP("#000000"),sX=xP("#f31717"),oX=xP("#fddb21"),aX=xP("#3fd830");class lX extends pH{constructor(t,e){super({geometry:new jM(sE(e>0?cX(t,e):[t.lon,t.lat]))}),this.ship=t}updateStyle(t){this.ship.visible?(this.iconColor=t.colorModeShipType?this.ship.shipType.rgbColor:this.ship.colorResultTimestamp>=t.absoluteImportantTimestamp?sX:this.ship.colorResultTimestamp>=t.absoluteMinimumTimestamp?oX:aX,this.iconKey=this.ship.stationary?JQ.Point:JQ.Ship):this.iconColor=rX}updateShip(t,e){e>0?this.extrapolatePosition(e):this.ship.lon!==t.lon&&this.ship.lat!==t.lat&&super.getGeometry().setCoordinates(sE([t.lon,t.lat])),this.ship=t}extrapolatePosition(t){t>0&&super.getGeometry().setCoordinates(sE(cX(this.ship,t)))}}function cX(t,e){const{lon:i,lat:n,course:r,numberSog:s,timestamp:o}=t,a=e-o;return a>0?function([t,e],i,n){let r=e*Math.PI/180,s=t*Math.PI/180;return r=Math.asin(Math.sin(r)*Math.cos(i/6378137)+Math.cos(r)*Math.sin(i/6378137)*Math.cos(n)),s+=Math.atan2(Math.sin(n)*Math.sin(i/6378137)*Math.cos(r),Math.cos(i/6378137)-Math.sin(r)*Math.sin(r)),[180*s/Math.PI,180*r/Math.PI]}([i,n],a*s/1.944,r):[i,n]}let hX=(()=>{class t{constructor(t,e,i){this.historyService=t,this.mapConfigService=e,this.uiService=i}registerVisibleAircraftsCallback(t){this.getVisibleAircraftsFn=t}registerVisibleShipsCallback(t){this.getVisibleShipsFn=t}exportVisiblePositions(){let t=this.historyService.timestamp$.value;0===t&&(t=NO(new Date));const e=FO(1e3*t,"yyyy-MM-dd'T'HH-mm-ss");let i=!1;const n=this.mapConfigService.showShipsLayer$.value;if(n){const t=this.getVisibleShipsFn();t.length&&(i=!0,YH(function(t){return[["timestamp","lon","lat","hdms","mmsi","imo","callsign","name","flag","cargo","type","length","width","draught","destination","departure","eta"].join(","),...t.map(t=>function(t){return[HO(1e3*t.timestamp),t.lon,t.lat,t.hdms,...QO(t)]}(t).join(","))].join("\n")}(t),`anais-pistes-ships-${e}.csv`,"text/csv"))}const r=this.mapConfigService.showAircraftsLayer$.value;if(r){const t=this.getVisibleAircraftsFn();t.length&&(i=!0,YH(function(t){return[["icao","callsign","squawk","timestamp","lon","lat","hdms","altitude"].join(","),...t.map(t=>function(t){return[t.icao,t.callsign,t.squawk,HO(t.timestamp),t.lon,t.lat,Yk([t.lon,t.lat]),t.altitude]}(t).join(","))].join("\n")}(t),`anais-pistes-aircrafts-${e}.csv`,"text/csv"))}if(!i){const t=[n&&"navire",r&&"a\xe9ronef"].filter(t=>!!t).join(" ou ")||"navire ou a\xe9ronef";this.uiService.error(`La vue courante ne contient aucun ${t}`)}}getEntitiesInExtent(t){const e=[];return this.mapConfigService.showShipsLayer$.value&&e.push(...this.getVisibleShipsFn(t)),this.mapConfigService.showAircraftsLayer$.value&&e.push(...this.getVisibleAircraftsFn(t)),e}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(bI),r.Zb(hI),r.Zb(VI))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),uX=(()=>{class t{constructor(t,e,i){this.fleetsService=t,this.mapConfigService=e,this.selectionService=i,this.selectedShips$=new Av.a([]),Hg([this.fleetsService.selectedFleet$.pipe(Object(Ge.a)(t=>t?t.ships:[])),this.selectionService.entities$.pipe(Object(Ge.a)(t=>t.filter(t=>!!t.entity&&t.type===OP.Ship).map(t=>t.entity)))]).subscribe(([t,e])=>{const i=[].concat(...t,...e);this.mapConfigService.updateSelectedShipsFilter(i.map(t=>t.mmsi)),this.selectedShips$.next(i)})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(OT),r.Zb(hI),r.Zb(xT))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),dX=(()=>{class t extends LT{constructor(t,e,i,n,r,s,o,a,l,c,h,u){super(),this.ngZone=t,this.configService=e,this.exportService=i,this.historyService=n,this.interactionsService=r,this.mapConfigService=s,this.mapService=o,this.mapStateService=a,this.selectedShipsService=l,this.shipsService=c,this.workerService=h,this.tooltipsService=u,this.shipFeaturesByArea=new Map,this.timestampByArea=new Map,this.oldTimestamp=-1,this.viewedAreas=[],this.chunkedFeedUpdateByArea=new Map,this.selectedShipsFeaturesByMMSI=new Map}ngOnInit(){this.ensureMandatoryInputParams("map"),this.source=new $q({features:[]}),this.layer=new nX({source:this.source,updateWhileAnimating:!0,updateWhileInteracting:!0}),this.layer.selectable=!0,this.map.addLayer(this.layer),this.layer.getRenderer().helper.getCanvas().addEventListener("webglcontextlost",t=>{throw new Error("Le contexte WebGL a \xe9t\xe9 perdu (les navires et avions ne sont plus affichables). Veuillez rafraichir l'onglet ou fermer puis r\xe9ouvrir votre navigateur.")},{once:!0});const t=this.layer.getRenderer().helper.uniforms_.find(t=>"u_iconSize"===t.name);this.subscriptions.push(this.mapService.view$.subscribe(e=>{if(!e)return;const i=Math.min(Math.round((e.zoom-4)/12*16+12),28);i!==t.value&&(t.value=i,this.layer.changed()),this.viewedAreas=DC(qD.fromOLExtent(this.mapService.view$.value.extent).toLatLonExtent()).map(t=>t.id)}),this.mapStateService.showShipsLayer$.subscribe(t=>{t||(this.shipFeaturesByArea.clear(),this.timestampByArea.clear(),this.source.clear(!0)),setTimeout(()=>{this.layer.setVisible(t)})}),this.mapStateService.showShipsLayer$.pipe(Gg(1),He(t=>t)).subscribe(()=>{this.source.addFeatures([...this.selectedShipsFeaturesByMMSI.values()])}),this.mapConfigService.manualMapFetch$.subscribe(()=>{this.shipFeaturesByArea.clear(),this.timestampByArea.clear(),this.source.clear(!0)}),this.mapStateService.featuresSelectable$.subscribe(t=>{this.layer.selectable=t}),this.mapConfigService.shipFilter$.subscribe(t=>{this.configService.devMode&&console.time(`ships-layer: update ${this.shipsService.shipsCount$.value} ship states`),this.source.forEachFeature(e=>{YO(e.ship,t),e.updateStyle(t)}),this.configService.devMode&&console.timeEnd(`ships-layer: update ${this.shipsService.shipsCount$.value} ship states`),this.shipFilter=t,this.source.changed()}),this.mapConfigService.enableHistoryModeExtrapolation$.subscribe(t=>{if(t&&this.historyService.timestamp$.value>0){const t=this.historyService.timestamp$.value;this.source.forEachFeature(e=>{e.ship.stationary||e.extrapolatePosition(t)})}else this.source.forEachFeature(t=>{const{lon:e,lat:i}=t.ship;t.setGeometry(new jM(sE([e,i])))});this.source.changed()}),this.historyService.timestamp$.subscribe(t=>{(0===t&&this.oldTimestamp>0||t>0&&0===this.oldTimestamp)&&(this.shipFeaturesByArea.clear(),this.timestampByArea.clear(),this.source.clear(!0),0===t&&this.oldTimestamp>0&&this.source.addFeatures([...this.selectedShipsFeaturesByMMSI.values()])),this.oldTimestamp=t}),this.mapConfigService.restrictedAreaLonLat$.subscribe(()=>{this.shipFeaturesByArea.clear(),this.timestampByArea.clear(),this.source.clear(!0)}),this.workerService.areaShipsFeeds$.subscribe(t=>{if(!t.chunked||t.start){const e=(this.shipFeaturesByArea.get(t.area.id)||[]).reduce((t,e)=>(t[e.ship.mmsi]=e,t),{});this.chunkedFeedUpdateByArea.set(t.area.id,{featuresByMMSI:e,additions:[],updates:[]})}const e=this.chunkedFeedUpdateByArea.get(t.area.id);let i=t.data;const n=!this.mapConfigService.manualMapFetch$.value&&this.mapConfigService.restrictedAreaLonLat$.value;if(n){const[t,e,r,s]=n;i=i.filter(i=>t<=i.lon&&i.lon<=r&&e<=i.lat&&i.lat<=s)}const r=this.mapConfigService.enableHistoryModeExtrapolation$.value&&this.historyService.timestamp$.value>0?this.historyService.timestamp$.value:0,s=[];i.filter(t=>t.lon).forEach(t=>{YO(t,this.shipFilter);let i=e.featuresByMMSI[t.mmsi];i?(i.updateShip(t,r),e.updates.push(i)):(i=new lX(t,r),s.push(i)),i.updateStyle(this.shipFilter),delete e.featuresByMMSI[t.mmsi]}),this.source.addFeatures(s),e.additions=e.additions.concat(s),t.chunked&&!t.end||(Object.values(e.featuresByMMSI).forEach(t=>{this.source.hasFeature(t)&&this.source.removeFeature(t)}),this.shipFeaturesByArea.set(t.area.id,e.updates.concat(e.additions)),this.timestampByArea.set(t.area.id,Date.now()),this.chunkedFeedUpdateByArea.delete(t.area.id),this.refreshTotalShipsCount())}),this.selectedShipsService.selectedShips$.subscribe(t=>{const e=this.historyService.timestamp$.value;if(e>0)return;const i=[],n=[],r=new Map;t.forEach(t=>{YO(t,this.shipFilter);let s=this.selectedShipsFeaturesByMMSI.get(t.mmsi);s?(s.updateShip(t,e),n.push(s)):(s=new lX(t,e),i.push(s)),r.set(t.mmsi,s),s.updateStyle(this.shipFilter),this.selectedShipsFeaturesByMMSI.delete(t.mmsi)}),[...this.selectedShipsFeaturesByMMSI.values()].forEach(t=>{this.source.hasFeature(t)&&this.source.removeFeature(t)}),this.source.addFeatures(i),this.selectedShipsFeaturesByMMSI=r})),this.eventListeners.push(this.map.on("click",t=>{this.ngZone.run(()=>{this.handleClickEvent(t)})})),this.subscriptions.push(Hg([this.mapService.view$.pipe(Gg(1),wm(500,Le,{leading:!1,trailing:!0})),this.mapConfigService.shipFilter$,this.workerService.areaShipsFeeds$.pipe(Be(300,on))]).subscribe(([t])=>{const e=this.source.getFeaturesInExtent(t.extent).filter(t=>t.ship.visible).map(t=>t.ship);if(e.length<200){const t=e.sort((t,e)=>t.mmsi<e.mmsi?-1:1);this.shipsService.shipsInView$.next(t)}else this.shipsService.shipsInView$.next([])}),this.mapService.pointerMove$.subscribe(t=>{this.handleMoveEvent(t)}),AT(6e4).pipe(He(()=>!this.mapConfigService.manualMapFetch$.value&&!this.historyService.timestamp$.value)).subscribe(()=>{const t=Date.now();for(const[e,i]of this.timestampByArea.entries())!this.viewedAreas.includes(e)&&i<t-18e4&&((this.shipFeaturesByArea.get(e)||[]).forEach(t=>{this.source.hasFeature(t)&&this.source.removeFeature(t)}),this.shipFeaturesByArea.delete(e),this.timestampByArea.delete(e))})),this.exportService.registerVisibleShipsCallback(t=>this.source.getFeaturesInExtent(null!=t?t:this.map.getView().calculateExtent()).map(t=>t.ship).filter(t=>t.visible))}ngOnDestroy(){super.ngOnDestroy(),this.map.removeLayer(this.layer)}handleClickEvent(t){this.layer.selectable&&this.map.forEachFeatureAtPixel(t.pixel,t=>(this.configService.devMode&&console.log("DEBUG: select ship",t.ship),this.interactionsService.clickOnEntity(OP.Ship,t.ship),!0),{hitTolerance:3,layerFilter:t=>t===this.layer})}handleMoveEvent(t){this.layer.selectable&&(this.map.forEachFeatureAtPixel(t.pixel,t=>(this.tooltipsService.hoverEntity(OP.Ship,t.ship),!0),{hitTolerance:3,layerFilter:t=>t===this.layer})||this.tooltipsService.hoverEntity(OP.Ship,null))}refreshTotalShipsCount(){let t=0;for(const e of this.shipFeaturesByArea.values())t+=e.length;this.shipsService.shipsCount$.next(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.B),r.Pb(cI),r.Pb(hX),r.Pb(bI),r.Pb(ET),r.Pb(hI),r.Pb(pI),r.Pb(gT),r.Pb(uX),r.Pb(wT),r.Pb(_I.a),r.Pb(kT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-ships-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();class pX extends pH{constructor(t){super({geometry:new jM(sE([t.lon,t.lat])),rotation:t.radiansTrack}),this.aircraft=t}updateAircraft(t){this.aircraft.lon!==t.lon&&this.aircraft.lat!==t.lat&&(super.getGeometry().setCoordinates(sE([t.lon,t.lat])),super.set("rotation",t.radiansTrack)),this.aircraft=t}}let fX=(()=>{class t{constructor(){this.aircraftsInView$=new Av.a([])}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),mX=(()=>{class t extends LT{constructor(t,e,i,n,r,s,o,a,l,c,h,u){super(),this.changeDetectorRef=t,this.ngZone=e,this.aircraftsService=i,this.configService=n,this.exportService=r,this.historyService=s,this.interactionsService=o,this.mapService=a,this.mapConfigService=l,this.mapStateService=c,this.tooltipsService=h,this.workerService=u,this.aircraftsFeaturesByArea=new Map,this.oldTimestamp=-1}ngOnInit(){this.ensureMandatoryInputParams("map"),this.changeDetectorRef.detach(),this.source=new $q({features:[]}),this.layer=new EQ({source:this.source,style:{symbol:{symbolType:"image",src:"assets/images/aircraft.png",size:["interpolate",["linear"],["zoom"],4,12,10,30],rotation:["get","rotation"],offset:[0,0]}}}),this.layer.selectable=!0,this.map.addLayer(this.layer),this.subscriptions.push(this.mapStateService.showAircraftsLayer$.subscribe(t=>{t||(this.aircraftsFeaturesByArea.clear(),this.source.clear(!0)),setTimeout(()=>{this.layer.setVisible(t)})}),this.mapConfigService.manualMapFetch$.subscribe(()=>{this.aircraftsFeaturesByArea.clear(),this.source.clear(!0)}),this.mapStateService.featuresSelectable$.subscribe(t=>{this.layer.selectable=t}),this.historyService.timestamp$.subscribe(t=>{(0===t&&this.oldTimestamp>0||t>0&&0===this.oldTimestamp)&&(this.aircraftsFeaturesByArea.clear(),this.source.clear(!0)),this.oldTimestamp=t}),this.mapConfigService.restrictedAreaLonLat$.subscribe(()=>{this.aircraftsFeaturesByArea.clear(),this.source.clear(!0)}),this.workerService.areaAircraftsFeeds$.subscribe(t=>{const e=(this.aircraftsFeaturesByArea.get(t.area.id)||[]).reduce((t,e)=>(t[e.aircraft.icao]=e,t),{}),i=[],n=[];let r=t.data;const s=!this.mapConfigService.manualMapFetch$.value&&this.mapConfigService.restrictedAreaLonLat$.value;if(s){const[t,e,i,n]=s;r=r.filter(r=>t<=r.lon&&r.lon<=i&&e<=r.lat&&r.lat<=n)}r.forEach(t=>{let r=e[t.icao];r?(r.updateAircraft(t),n.push(r)):(r=new pX(t),i.push(r)),delete e[t.icao]}),Object.values(e).forEach(t=>{this.source.hasFeature(t)&&this.source.removeFeature(t)}),this.source.addFeatures(i),this.aircraftsFeaturesByArea.set(t.area.id,n.concat(i)),this.source.changed()})),this.eventListeners.push(this.map.on("click",t=>{this.ngZone.run(()=>{this.handleClickEvent(t)})})),this.subscriptions.push(Hg([this.mapService.view$.pipe(Gg(1),wm(500,Le,{leading:!1,trailing:!0})),this.workerService.areaAircraftsFeeds$.pipe(Be(16))]).subscribe(([t])=>{const e=this.source.getFeaturesInExtent(t.extent).filter(t=>t.aircraft.visible).map(t=>t.aircraft);if(e.length<200){const t=e.sort((t,e)=>t.icao<e.icao?-1:1);this.aircraftsService.aircraftsInView$.next(t)}else this.aircraftsService.aircraftsInView$.next([])}),this.mapService.pointerMove$.subscribe(t=>{this.handleMoveEvent(t)})),this.exportService.registerVisibleAircraftsCallback(t=>this.source.getFeaturesInExtent(null!=t?t:this.map.getView().calculateExtent()).map(t=>t.aircraft).filter(t=>t.visible))}ngOnDestroy(){super.ngOnDestroy(),this.map.removeLayer(this.layer)}handleClickEvent(t){this.layer.selectable&&this.map.forEachFeatureAtPixel(t.pixel,t=>(this.configService.devMode&&console.log("DEBUG: select aircraft",JSON.stringify(t.aircraft,null,2)),this.interactionsService.clickOnEntity(OP.Aircraft,t.aircraft),!0),{hitTolerance:3,layerFilter:t=>t===this.layer})}handleMoveEvent(t){this.layer.selectable&&(this.map.forEachFeatureAtPixel(t.pixel,t=>(this.tooltipsService.hoverEntity(OP.Aircraft,t.aircraft),!0),{hitTolerance:3,layerFilter:t=>t===this.layer})||this.tooltipsService.hoverEntity(OP.Aircraft,null))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(r.B),r.Pb(fX),r.Pb(cI),r.Pb(hX),r.Pb(bI),r.Pb(ET),r.Pb(pI),r.Pb(hI),r.Pb(gT),r.Pb(kT),r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-aircrafts-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2}),t})();class gX extends pH{constructor(t){super({geometry:new jM(sE([t.lon,t.lat]))}),this.alert=t,this.set("red",t.rgbVecColor[0],!0),this.set("green",t.rgbVecColor[1],!0),this.set("blue",t.rgbVecColor[2],!0)}}let AX=(()=>{class t{constructor(t,e,i){this.alertsService=t,this.fleetsService=e,this.selectionService=i,this.alerts$=new Av.a([]),Hg([this.alertsService.alerts$,this.fleetsService.fleetAlerts$,this.selectionService.alerts$]).subscribe(([t,e,i])=>{this.alerts$.next([...t,...e,...i])})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(IP),r.Zb(OT),r.Zb(xT))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),bX=(()=>{class t extends LT{constructor(t,e,i,n,r,s){super(),this.ngZone=t,this.alertsLayerService=e,this.interactionsService=i,this.mapService=n,this.mapStateService=r,this.tooltipsService=s}ngOnInit(){this.ensureMandatoryInputParams("map"),this.source=new $q({features:[]}),this.layer=new EQ({source:this.source,style:{symbol:{symbolType:"triangle",size:18,color:["color",["get","red"],["get","green"],["get","blue"]],offset:[0,0]}}}),this.layer.selectable=!0,this.map.addLayer(this.layer),this.subscriptions.push(this.mapStateService.featuresSelectable$.subscribe(t=>{this.layer.selectable=t})),this.subscriptions.push(this.alertsLayerService.alerts$.subscribe(t=>{const e=t.map(t=>new gX(t));this.source.clear(!0),this.source.addFeatures(e)}),this.mapStateService.showAlertsLayer$.subscribe(t=>{this.layer.setVisible(t)})),this.eventListeners.push(this.map.on("click",t=>{this.ngZone.run(()=>{this.handleClickEvent(t)})})),this.subscriptions.push(this.mapService.pointerMove$.subscribe(t=>{this.handleMoveEvent(t)}))}ngOnDestroy(){super.ngOnDestroy(),this.map.removeLayer(this.layer)}handleClickEvent(t){this.layer.selectable&&this.map.forEachFeatureAtPixel(t.pixel,t=>(this.interactionsService.clickOnEntity(OP.Alert,t.alert),!0),{layerFilter:t=>t===this.layer})}handleMoveEvent(t){this.layer.selectable&&(this.map.forEachFeatureAtPixel(t.pixel,t=>(this.tooltipsService.hoverEntity(OP.Alert,t.alert),!0),{hitTolerance:3,layerFilter:t=>t===this.layer})||this.tooltipsService.hoverEntity(OP.Alert,null))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.B),r.Pb(AX),r.Pb(ET),r.Pb(pI),r.Pb(gT),r.Pb(kT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-alerts-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();const vX=VP.reduce((t,e)=>(t[e.key]=CP(e.color),t),{}),_X=CP("grey");class yX extends pH{constructor(t){super({geometry:new jM(sE([t.lon,t.lat]))}),this.event=t;const e=vX[t.type]||_X;this.set("red",e[0],!0),this.set("green",e[1],!0),this.set("blue",e[2],!0)}static New(t){return new yX(t)}}let wX=(()=>{class t extends LT{constructor(t,e,i,n,r,s){super(),this.ngZone=t,this.eventsLayerService=e,this.interactionsService=i,this.mapService=n,this.mapStateService=r,this.tooltipsService=s}ngOnInit(){this.ensureMandatoryInputParams("map"),this.source=new $q({features:[]}),this.layer=new EQ({source:this.source,style:{symbol:{symbolType:"circle",size:9,color:["color",["get","red"],["get","green"],["get","blue"]],offset:[0,0]}}}),this.layer.selectable=!0,this.map.addLayer(this.layer),this.subscriptions.push(this.mapStateService.featuresSelectable$.subscribe(t=>{this.layer.selectable=t})),this.subscriptions.push(this.eventsLayerService.events$.subscribe(t=>{const e=t.map(yX.New);this.source.clear(!0),this.source.addFeatures(e)}),this.mapStateService.showEventsLayer$.subscribe(t=>{this.layer.setVisible(t)})),this.eventListeners.push(this.map.on("click",t=>{this.ngZone.run(()=>{this.handleClickEvent(t)})})),this.subscriptions.push(this.mapService.pointerMove$.subscribe(t=>{this.handleMoveEvent(t)}))}ngOnDestroy(){super.ngOnDestroy(),this.map.removeLayer(this.layer)}handleClickEvent(t){this.layer.selectable&&this.map.forEachFeatureAtPixel(t.pixel,t=>(this.interactionsService.clickOnEntity(OP.Event,t.event),!0),{hitTolerance:3,layerFilter:t=>t===this.layer})}handleMoveEvent(t){this.layer.selectable&&(this.map.forEachFeatureAtPixel(t.pixel,t=>(this.tooltipsService.hoverEntity(OP.Event,t.event),!0),{hitTolerance:3,layerFilter:t=>t===this.layer})||this.tooltipsService.hoverEntity(OP.Event,null))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.B),r.Pb($P),r.Pb(ET),r.Pb(pI),r.Pb(gT),r.Pb(kT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-events-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();const xX=nM.map(t=>new jZ({stroke:new VZ({color:t,width:1}),fill:new RZ({color:`${t}1a`})})),CX=new jZ({text:new cY({font:"11px Calibri,sans-serif",fill:new RZ({color:"#000"}),stroke:new VZ({color:"#fff",width:3})})});let SX=(()=>{class t extends LT{constructor(t,e,i){super(),this.mapService=t,this.mapStateService=e,this.portsService=i,this.portsZones=[]}ngOnInit(){this.ensureMandatoryInputParams("map"),this.source=new $q({features:[]}),this.layer=new Nq({source:this.source,updateWhileAnimating:!0,updateWhileInteracting:!0,zIndex:1,visible:!1}),this.map.addLayer(this.layer),this.subscriptions.push(Hg([this.mapStateService.showPortsLayer$,this.mapService.view$]).pipe(Object(Ge.a)(([t,e])=>t&&e&&e.zoom>=11),mn()).subscribe(t=>{this.layer.setVisible(t)}),this.portsService.ports$.subscribe(t=>{this.portsZones=t.map(t=>({name:`${t.label} - ${t.iso3}\n${t.sourcesLabels}`,h3indexes:t.h3indexes})),this.source.clear(!0),this.source.addFeatures(this.portsZones.map((t,e)=>{const i=new BY(t);return i.setStyle(function(){return CX.getText().setText(t.name),[xX[e%xX.length],CX]}),i}))}))}ngOnDestroy(){super.ngOnDestroy(),this.map.removeLayer(this.layer)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(pI),r.Pb(gT),r.Pb(TT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-ports-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();var kX=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),EX=function(t){function e(e){var i=t.call(this)||this;i.options=e,i.id=e.id,i.insertFirst=void 0===e.insertFirst||e.insertFirst,i.stopEvent=void 0===e.stopEvent||e.stopEvent,i.element=document.createElement("div"),i.element.className=void 0!==e.className?e.className:"ol-overlay-container ol-selectable",i.element.style.position="absolute",i.element.style.pointerEvents="auto";var n=e.autoPan;return n&&"object"!=typeof n&&(n={animation:e.autoPanAnimation,margin:e.autoPanMargin}),i.autoPan=n||!1,i.rendered={transform_:"",visible:!0},i.mapPostrenderListenerKey=null,i.addEventListener(UE("element"),i.handleElementChanged),i.addEventListener(UE("map"),i.handleMapChanged),i.addEventListener(UE("offset"),i.handleOffsetChanged),i.addEventListener(UE("position"),i.handlePositionChanged),i.addEventListener(UE("positioning"),i.handlePositioningChanged),void 0!==e.element&&i.setElement(e.element),i.setOffset(void 0!==e.offset?e.offset:[0,0]),i.setPositioning(void 0!==e.positioning?e.positioning:"top-left"),void 0!==e.position&&i.setPosition(e.position),i}return kX(e,t),e.prototype.getElement=function(){return this.get("element")},e.prototype.getId=function(){return this.id},e.prototype.getMap=function(){return this.get("map")},e.prototype.getOffset=function(){return this.get("offset")},e.prototype.getPosition=function(){return this.get("position")},e.prototype.getPositioning=function(){return this.get("positioning")},e.prototype.handleElementChanged=function(){gS(this.element);var t=this.getElement();t&&this.element.appendChild(t)},e.prototype.handleMapChanged=function(){this.mapPostrenderListenerKey&&(mS(this.element),ik(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);var t=this.getMap();if(t){this.mapPostrenderListenerKey=tk(t,"postrender",this.render,this),this.updatePixelPosition();var e=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?e.insertBefore(this.element,e.childNodes[0]||null):e.appendChild(this.element),this.performAutoPan()}},e.prototype.render=function(){this.updatePixelPosition()},e.prototype.handleOffsetChanged=function(){this.updatePixelPosition()},e.prototype.handlePositionChanged=function(){this.updatePixelPosition(),this.performAutoPan()},e.prototype.handlePositioningChanged=function(){this.updatePixelPosition()},e.prototype.setElement=function(t){this.set("element",t)},e.prototype.setMap=function(t){this.set("map",t)},e.prototype.setOffset=function(t){this.set("offset",t)},e.prototype.setPosition=function(t){this.set("position",t)},e.prototype.performAutoPan=function(){this.autoPan&&this.panIntoView(this.autoPan)},e.prototype.panIntoView=function(t){var e=this.getMap();if(e&&e.getTargetElement()&&this.get("position")){var i=this.getRect(e.getTargetElement(),e.getSize()),n=this.getElement(),r=this.getRect(n,[dS(n),pS(n)]),s=t||{},o=void 0===s.margin?20:s.margin;if(!ES(i,r)){var a=r[0]-i[0],l=i[2]-r[2],c=r[1]-i[1],h=i[3]-r[3],u=[0,0];if(a<0?u[0]=a-o:l<0&&(u[0]=Math.abs(l)+o),c<0?u[1]=c-o:h<0&&(u[1]=Math.abs(h)+o),0!==u[0]||0!==u[1]){var d=e.getView().getCenterInternal(),p=e.getPixelFromCoordinateInternal(d);if(!p)return;var f=[p[0]+u[0],p[1]+u[1]],m=s.animation||{};e.getView().animateInternal({center:e.getCoordinateFromPixelInternal(f),duration:m.duration,easing:m.easing})}}}},e.prototype.getRect=function(t,e){var i=t.getBoundingClientRect(),n=i.left+window.pageXOffset,r=i.top+window.pageYOffset;return[n,r,n+e[0],r+e[1]]},e.prototype.setPositioning=function(t){this.set("positioning",t)},e.prototype.setVisible=function(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)},e.prototype.updatePixelPosition=function(){var t=this.getMap(),e=this.getPosition();if(t&&t.isRendered()&&e){var i=t.getPixelFromCoordinate(e),n=t.getSize();this.updateRenderedPosition(i,n)}else this.setVisible(!1)},e.prototype.updateRenderedPosition=function(t,e){var i=this.element.style,n=this.getOffset(),r=this.getPositioning();this.setVisible(!0);var s="0%",o="0%";"bottom-right"==r||"center-right"==r||"top-right"==r?s="-100%":"bottom-center"!=r&&"center-center"!=r&&"top-center"!=r||(s="-50%"),"bottom-left"==r||"bottom-center"==r||"bottom-right"==r?o="-100%":"center-left"!=r&&"center-center"!=r&&"center-right"!=r||(o="-50%");var a="translate("+s+", "+o+") translate("+Math.round(t[0]+n[0])+"px, "+Math.round(t[1]+n[1])+"px)";this.rendered.transform_!=a&&(this.rendered.transform_=a,i.transform=a,i.msTransform=a)},e.prototype.getOptions=function(){return this.options},e}(BE);class DX extends pH{constructor(t){super({id:t.mmsi,geometry:new jM(sE(t.position))}),this.positionIndex=0,this.ship=t,this.setStyle(new jZ({image:new Pq({src:"/assets/images/ship.png",rotation:t.course,opacity:t.visible?1:0,color:t.shipType.color})}))}}const IX=["root"],PX=["*"];function OX(t,e){const i=t.getBoundingClientRect(),n=i.left+window.pageXOffset,r=i.top+window.pageYOffset;return[n,r,n+e[0],r+e[1]]}let MX=(()=>{class t{constructor(){this.positioning="bottom-center",this.className="",this.offset=[0,-20],this.stopEvent=!0,this.autoPositioning=!1,this.opacity=1}ngOnInit(){this.overlay=new EX({element:this.rootElement.nativeElement,positioning:this.positioning,offset:this.offset,stopEvent:this.stopEvent,insertFirst:!1,className:`ol-overlay-container ol-selectable ${this.className} ${this.autoPositioning?"overlay-hidden":"overlay-positioning-bottom-center"}`,position:sE([this.longitude,this.latitude])}),this.map.addOverlay(this.overlay),this.autoPositioning&&setTimeout(()=>{this.updatePositioning(),this.overlay.getElement().parentElement.classList.remove("overlay-hidden")})}ngOnChanges(t){this.overlay&&(t.positioning&&this.overlay.setPositioning(this.positioning),t.offset&&this.overlay.setOffset(this.offset),(t.latitude||t.longitude)&&this.overlay.setPosition(sE([this.longitude,this.latitude])))}ngOnDestroy(){this.map.removeOverlay(this.overlay)}updatePositioning(){if(!this.map||!this.map.getTargetElement())return;const t=OX(this.map.getTargetElement(),this.map.getSize()),e=this.overlay.getElement(),i=OX(e,[dS(e),pS(e)]);if(ES(t,i))this.overlay.getElement().parentElement.classList.add("overlay-positioning-bottom-center");else{const e=i[0]-t[0],n=t[2]-i[2],r=i[1]-t[1],s=t[3]-i[3],o=[0,0];e<0?o[0]=e-20:n<0&&(o[0]=Math.abs(n)+20),r<0?o[1]=r-20:s<0&&(o[1]=Math.abs(s)+20);let a="bottom",l="center",c=0,h=0;if(0!==o[0]){if(a="center",0===o[1]){const e=i[3]-i[1];i[3]+e/2+20>=t[3]&&(o[1]=e/2)}o[0]>0?(l="right",h=-20):(l="left",h=20)}0!==o[1]&&(o[1]>0?(a="bottom",c=-20):(a="top",c=20));const u=`${a}-${l}`;this.overlay.setPositioning(u),this.overlay.setOffset([h,c]),this.overlay.getElement().parentElement.classList.add(`overlay-positioning-${u}`)}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-map-tooltip"]],viewQuery:function(t,e){if(1&t&&r.Pc(IX,3),2&t){let t;r.vc(t=r.dc())&&(e.rootElement=t.first)}},inputs:{map:"map",latitude:"latitude",longitude:"longitude",positioning:"positioning",className:"className",offset:"offset",stopEvent:"stopEvent",autoPositioning:"autoPositioning",opacity:"opacity"},features:[r.Bb],ngContentSelectors:PX,decls:3,vars:2,consts:[["root",""]],template:function(t,e){1&t&&(r.mc(),r.Vb(0,"div",null,0),r.lc(2),r.Ub()),2&t&&r.Fc("opacity",e.opacity)},styles:[".overlay-hidden{opacity:0}"],encapsulation:2,changeDetection:0}),t})();const TX=function(t){return{transform:t}};let RX=(()=>{class t extends LT{constructor(t){super(),this.mapConfigService=t,this.hdms=""}ngOnInit(){this.ensureMandatoryInputParams("ship","animationTimestamp")}ngOnChanges(t){this.hdms=Yk(this.ship.position)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-playback-ship-tooltip"]],inputs:{ship:"ship",animationTimestamp:"animationTimestamp"},features:[r.Ab,r.Bb],decls:48,vars:20,consts:[[1,"ship-tooltip"],[1,"ship-tooltip__header"],[1,"ship-tooltip__flag",3,"flag"],[1,"ship-tooltip__title"],[1,"ship-tooltip__name"],[1,"ship-tooltip__type"],[1,"ship-tooltip__row"],[1,"ship-tooltip__info-cell"],[1,"ship-tooltip__info-label"],[3,"vertical"],[1,"d-flex-center"],[1,"ship-tooltip__course-icon",3,"ngStyle"],[1,"ship-tooltip__footer"],[1,"ship-tooltip__signal-label"],[1,"u-flex"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Qb(2,"app-flag",2),r.Vb(3,"div",3),r.Vb(4,"strong",4),r.Kc(5),r.Ub(),r.Vb(6,"small",5),r.Kc(7),r.Ub(),r.Ub(),r.Ub(),r.Vb(8,"div",6),r.Vb(9,"div",7),r.Vb(10,"div",8),r.Kc(11,"MMSI"),r.Ub(),r.Vb(12,"strong"),r.Kc(13),r.Ub(),r.Ub(),r.Qb(14,"mat-divider",9),r.Vb(15,"div",7),r.Vb(16,"div",8),r.Kc(17,"IMO"),r.Ub(),r.Vb(18,"strong"),r.Kc(19),r.Ub(),r.Ub(),r.Qb(20,"mat-divider",9),r.Vb(21,"div",7),r.Vb(22,"div",8),r.Kc(23,"Callsign"),r.Ub(),r.Vb(24,"strong"),r.Kc(25),r.Ub(),r.Ub(),r.Ub(),r.Qb(26,"mat-divider"),r.Vb(27,"div",6),r.Vb(28,"div",7),r.Vb(29,"div",8),r.Kc(30,"Vitesse / Cap"),r.Ub(),r.Vb(31,"strong",10),r.Kc(32),r.Vb(33,"mat-icon",11),r.Kc(34,"arrow_right_alt"),r.Ub(),r.Ub(),r.Ub(),r.Qb(35,"mat-divider",9),r.Vb(36,"div",7),r.Vb(37,"div",8),r.Kc(38,"Position"),r.Ub(),r.Vb(39,"strong"),r.Kc(40),r.Ub(),r.Ub(),r.Ub(),r.Vb(41,"div",12),r.Vb(42,"span",13),r.Kc(43,"R\xe9ception (estim\xe9e) :\xa0"),r.Ub(),r.Vb(44,"strong",14),r.Vb(45,"span"),r.Kc(46),r.hc(47,"date"),r.Ub(),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(2),r.nc("flag",e.ship.country.flag),r.Db(3),r.Lc(e.ship.name||"?"),r.Db(2),r.Lc(e.ship.shipType.label),r.Db(6),r.Lc(e.ship.mmsi),r.Db(1),r.nc("vertical",!0),r.Db(5),r.Lc(e.ship.imo||"?"),r.Db(1),r.nc("vertical",!0),r.Db(5),r.Lc(e.ship.callsign||"?"),r.Db(7),r.Nc(" ",e.ship.speed," kt / ",(180*e.ship.course/3.14159).toFixed(0),"\xb0 "),r.Db(1),r.nc("ngStyle",r.sc(18,TX,"rotate("+(e.ship.course-1.570795)+"rad)")),r.Db(2),r.nc("vertical",!0),r.Db(5),r.Lc(e.hdms),r.Db(6),r.Lc(r.kc(47,14,1e3*e.animationTimestamp,"yyyy-MM-dd HH:mm:ss z",e.mapConfigService.useUTCDates$.value&&"z")))},directives:[GF,GT,Yp,bt],pipes:[kt],styles:['.ship-tooltip[_ngcontent-%COMP%]{min-width:320px;background-color:#e7ecf0;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2);border-radius:2px}.ship-tooltip[_ngcontent-%COMP%]:after{content:" ";position:absolute;border:12px solid transparent;pointer-events:none}.ship-tooltip__header[_ngcontent-%COMP%]{background-color:#cdd1d4;display:flex}.ship-tooltip__move-icon[_ngcontent-%COMP%]{cursor:move}.ship-tooltip__link[_ngcontent-%COMP%]{flex:1;padding:0;line-height:inherit;text-align:inherit;font-size:inherit;font-weight:inherit}.ship-tooltip__link[_ngcontent-%COMP%] .mat-button-wrapper{display:flex}.ship-tooltip__flag[_ngcontent-%COMP%]{margin:5px}.ship-tooltip__title[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:5px 0;flex:1}.ship-tooltip__name[_ngcontent-%COMP%]{font-size:1.2em}.ship-tooltip__type[_ngcontent-%COMP%]{font-size:.9em;color:#555}.ship-tooltip__row[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;font-size:.9em}.ship-tooltip__info-cell[_ngcontent-%COMP%]{padding:.4em;text-align:center}.ship-tooltip__info-label[_ngcontent-%COMP%]{color:grey;font-weight:500;padding-bottom:.2em}.ship-tooltip__course-icon[_ngcontent-%COMP%]{line-height:.7em;height:.7em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ship-tooltip__footer[_ngcontent-%COMP%]{background-color:#cdd1d4;padding-left:.4em;display:flex;align-items:center;font-size:.85em;line-height:36px}.ship-tooltip__signal-label[_ngcontent-%COMP%]{font-weight:500;color:#595959} .overlay-positioning-center-right .ship-tooltip:after{top:50%;left:100%;margin-top:-12px;border-left-color:#cdd1d4} .overlay-positioning-center-left .ship-tooltip:after{top:50%;right:100%;margin-top:-12px;border-right-color:#cdd1d4} .overlay-positioning-bottom-center .ship-tooltip:after{top:100%;left:50%;margin-left:-12px;border-top-color:#cdd1d4} .overlay-positioning-top-center .ship-tooltip:after{bottom:100%;left:50%;margin-left:-12px;border-bottom-color:#cdd1d4}'],changeDetection:0}),t})();function VX(t,e){if(1&t&&(r.Vb(0,"app-map-tooltip",1),r.Qb(1,"app-playback-ship-tooltip",2),r.Ub()),2&t){const t=r.gc();r.nc("map",t.map)("latitude",t.hoveredPosition[1])("longitude",t.hoveredPosition[0])("stopEvent",!1)("autoPositioning",!0),r.Db(1),r.nc("ship",t.hoveredShip)("animationTimestamp",t.animationTimestamp)}}let FX=(()=>{class t extends LT{constructor(t,e,i,n){super(),this.ngZone=t,this.elementRef=e,this.mapService=i,this.playbackService=n,this.hoveredShip=null,this.animationTimestamp=-1,this.hoveredPosition=null,this.featuresByMMSI={},this.layerRenderListener=null}ngOnInit(){this.ensureMandatoryInputParams("map"),this.source=new $q({features:[],useSpatialIndex:!1}),this.layer=new Nq({source:this.source,updateWhileAnimating:!0,updateWhileInteracting:!0}),this.map.addLayer(this.layer),this.overlay=new EX({element:this.elementRef.nativeElement,positioning:"bottom-center",offset:[0,-20],stopEvent:!0,insertFirst:!1,className:"ol-overlay-container ol-selectable hover-tooltip mat-elevation-z16 overlay-positioning-bottom-center"}),this.map.addOverlay(this.overlay),this.subscriptions.push(Hg([this.playbackService.active$,this.playbackService.shipsByMMSI$.pipe(Object(Ge.a)(t=>!!t))]).pipe(Be(16),Object(Ge.a)(([t,e])=>t&&!e),mn()).subscribe(t=>{t?(this.bboxFeature=new pH(new DH([])),this.updateBboxFeatureGeometry(),this.source.addFeature(this.bboxFeature),this.layerRenderListener=this.layer.on("prerender",()=>{this.updateBboxFeatureGeometry()})):this.bboxFeature&&(this.source.removeFeature(this.bboxFeature),this.bboxFeature=null,ME(this.layerRenderListener))}),this.playbackService.shipsByMMSI$.subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){if(!t)return this.featuresByMMSI={},this.source.clear(!0),this.bboxFeature=null,void ME(this.layerRenderListener);this.bboxFeature&&(this.source.removeFeature(this.bboxFeature),this.bboxFeature=null,ME(this.layerRenderListener));const e=Object.values(t).filter(t=>!this.featuresByMMSI[t.mmsi]).map(t=>this.featuresByMMSI[t.mmsi]=new DX(t));this.source.addFeatures(e)})),this.playbackService.animationTimestamp$.subscribe(t=>{this.animationTimestamp=t,this.source.forEachFeature(t=>{t.getGeometry().setCoordinates(sE(t.ship.position)),t.getStyle().getImage().setRotation(t.ship.course),t.getStyle().getImage().setOpacity(t.ship.visible?1:0)}),this.source.changed(),this.hoveredShip&&(this.hoveredPosition=this.hoveredShip.position)}),this.mapService.pointerMove$.subscribe(t=>{this.ngZone.run(()=>{this.handleMoveEvent(t)})}))}ngOnDestroy(){super.ngOnDestroy(),this.hoveredShip=null,this.map.removeOverlay(this.overlay),this.map.removeLayer(this.layer),ME(this.layerRenderListener)}handleMoveEvent(t){this.map.forEachFeatureAtPixel(t.pixel,t=>(this.hoveredShip=t.ship,this.hoveredPosition=oE(t.getGeometry().getCoordinates()),!0),{hitTolerance:3,layerFilter:t=>t===this.layer})||(this.hoveredShip=null)}updateBboxFeatureGeometry(){const t=this.getRestrictedBoundingBox(),e=aT(t.getPolygon()).map(t=>sE(t));(function(t,e){if(t.length!==e.length)return!1;for(let i=0;i<t.length;i++)if(t[i][0]!==e[i][0]||t[i][1]!==e[i][1])return!1;return!0})(this.bboxFeature.getGeometry().getCoordinates()[0]||[],e)||(this.bboxFeature.getGeometry().setCoordinates([e]),this.playbackService.updateViewBox(t.toLatLonExtent()))}getRestrictedBoundingBox(){const t=hZ.fromOLView(this.map.getView()),e=Math.min(t.extent[2]-t.extent[0],sE([20,0])[0])/2,i=t.center[0]-e,n=t.center[0]+e,r=Math.min(t.extent[3]-t.extent[1],function(t){const[,e]=oE(t.center),[,i]=sE([0,e+7.5]),[,n]=sE([0,e-7.5]);return i-n}(t))/2;return qD.fromOLExtent([i,t.center[1]-r,n,t.center[1]+r]).scale(.8)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.B),r.Pb(r.l),r.Pb(pI),r.Pb(tM))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-playback-layer"]],inputs:{map:"map"},features:[r.Ab],decls:1,vars:1,consts:[["className","mat-elevation-z16",3,"map","latitude","longitude","stopEvent","autoPositioning",4,"ngIf"],["className","mat-elevation-z16",3,"map","latitude","longitude","stopEvent","autoPositioning"],[3,"ship","animationTimestamp"]],template:function(t,e){1&t&&r.Ic(0,VX,2,7,"app-map-tooltip",0),2&t&&r.nc("ngIf",e.hoveredShip)},directives:[ut,MX,RX],encapsulation:2}),t})();const LX=Math.floor(10),UX=new jZ({image:new OZ({stroke:new VZ({color:"#010a40",lineDash:[LX+4,16,2*LX+4+1,18,2*LX+4+1,16,2*LX+4+1,18],width:4}),points:4,radius:30,angle:Math.PI/4})});class BX extends pH{constructor(t){super({geometry:new jM(sE([t.lon,t.lat]))}),super.setStyle(UX)}}let NX=(()=>{class t extends LT{constructor(t,e,i){super(),this.fleetsService=t,this.mapStateConfig=e,this.selectionService=i}ngOnInit(){this.ensureMandatoryInputParams("map"),this.source=new $q({features:[]}),this.layer=new Nq({source:this.source,updateWhileAnimating:!0,updateWhileInteracting:!0,zIndex:2}),this.map.addLayer(this.layer),this.subscriptions.push(Hg([this.fleetsService.selectedFleet$,this.selectionService.entities$.pipe(Object(Ge.a)(t=>t.map(t=>t.entity).filter(t=>!!t)))]).subscribe(([t,e])=>{this.layer.getSource().clear(!0);const i=[];t&&i.push(...t.ships.filter(t=>FD(t.lon)&&FD(t.lat)).map(t=>new ZD(t.lon,t.lat))),e.length&&i.push(...e.filter(t=>FD(t.lon)&&FD(t.lat)).map(t=>new ZD(t.lon,t.lat))),this.layer.getSource().addFeatures(i.map(t=>new BX(t)))}),this.mapStateConfig.showSelectionMarkers$.subscribe(t=>{this.layer.setVisible(t)}))}ngOnDestroy(){super.ngOnDestroy(),this.map.removeLayer(this.layer)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(OT),r.Pb(gT),r.Pb(xT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-selection-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();const jX=new jZ({image:new TZ});let zX=(()=>{class t extends LT{constructor(t){super(),this.mapService=t}ngOnInit(){this.ensureMandatoryInputParams("map"),this.source=new $q({features:[],useSpatialIndex:!1}),this.layer=new Nq({source:this.source,updateWhileAnimating:!0,updateWhileInteracting:!0,zIndex:3}),this.map.addLayer(this.layer),this.subscriptions.push(this.mapService.pingLocation$.subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){yield this.animatePing(t)})))}ngOnDestroy(){super.ngOnDestroy(),this.map.removeLayer(this.layer)}animatePing(t){return Object(ue.a)(this,void 0,void 0,function*(){const e=new pH(new jM(sE(t)));e.setStyle(jX),this.source.addFeature(e),this.flash(e),yield PD(3500),this.source.removeFeature(e)})}flash(t){const e=(new Date).getTime();let i=null;const n=n=>{const r=n.frameState.time-e,s=r/3e3;if(r>3e3)return void ME(i);const o=150-145*XC(s),a=2*XC(1-s),l=2*Math.PI*o/8,c=new jZ({image:new TZ({radius:o,stroke:new VZ({color:`rgba(255, 0, 0, ${a})`,lineDash:[1*l/3,2*l/3],lineDashOffset:6*s*o,width:1+a})})}),h=function(t){var e=t.frameState,i=oM(t.inversePixelTransform.slice(),e.coordinateToPixelTransform),n=Tq(e.viewState.resolution,e.pixelRatio);return new Sq(t.context,e.pixelRatio,e.extent,i,e.viewState.rotation,n,undefined)}(n);h.setStyle(c),h.drawGeometry(t.getGeometry().clone()),this.map.render()};i=this.layer.on("postrender",t=>{n(t)})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(pI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-ping-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})(),HX=(()=>{class t extends LT{constructor(t,e){super(),this.mapService=t,this.measureService=e,this.pointerMoveSubscription=new ye.a,this.createdTooltips=[]}ngOnInit(){this.ensureMandatoryInputParams("map"),this.source=new $q({features:[],wrapX:!1}),this.layer=new Nq({source:this.source,updateWhileAnimating:!0,updateWhileInteracting:!0,zIndex:2}),this.map.addLayer(this.layer),this.subscriptions.push(this.measureService.active$.subscribe(t=>{t?(this.drawInteraction=this.createInteraction(),this.map.addInteraction(this.drawInteraction)):this.stopInteraction()}))}ngOnDestroy(){super.ngOnDestroy(),this.clear()}clear(){this.source.clear(!0),this.stopInteraction(),this.createdTooltips.forEach(t=>{this.map.removeOverlay(t)})}stopInteraction(){this.map.getViewport().removeEventListener("mouseout",this.mouseOutListener),this.pointerMoveSubscription.unsubscribe(),ME(this.drawChangeListener),this.map.removeInteraction(this.drawInteraction),this.map.removeOverlay(this.helpTooltipOverlay),this.map.removeOverlay(this.measureTooltipOverlay)}createInteraction(){return this.drawInteraction=new rY({source:this.source,type:"LineString",style:bY,condition:aG}),this.createMeasureTooltip(),this.createHelpTooltip(),this.drawInteraction.on("drawstart",t=>{CC({category:"app",message:"measure: drawstart"}),this.sketchFeature=t.feature,this.sketchFeature.setStyle(this.getSketchFeatureStyle),this.drawChangeListener=this.sketchFeature.getGeometry().on("change",t=>{const e=t.target;this.measureTooltipElement.innerHTML=t$(e),this.measureTooltipOverlay.setPosition(e.getLastCoordinate())})}),this.drawInteraction.on("drawend",()=>{CC({category:"app",message:"measure: drawend"});const t=this.measureTooltipOverlay,e=this.sketchFeature;this.measureTooltipOverlay.setOffset([0,-7]),this.sketchFeature.setStyle(this.getSketchFeatureStyle(this.sketchFeature)),this.sketchFeature=null;const i=function(){const t=document.createElement("button");return t.className="material-icons mat-icon",t.innerText="close",t.title="Supprimer la mesure",t.style.padding="0",t.style.marginRight="-8px",t.style.marginTop="-4px",t.style.marginBottom="-4px",t.style.borderTopRightRadius="4px",t.style.borderBottomRightRadius="4px",t.style.fontSize="1.5em",t.style.marginLeft="4px",t.style.color="inherit",t.style.backgroundColor="rgba(0, 0, 0, 0)",t.addEventListener("mouseover",()=>{t.style.backgroundColor="rgba(0, 0, 0, 0.3)"}),t.addEventListener("mouseout",()=>{t.style.backgroundColor="rgba(0, 0, 0, 0)"}),t}();i.addEventListener("click",()=>{this.map.removeOverlay(t),this.source.removeFeature(e)}),this.measureTooltipElement.appendChild(i),this.createdTooltips.push(this.measureTooltipOverlay),this.measureTooltipElement=null,this.createMeasureTooltip(),ME(this.drawChangeListener)}),this.pointerMoveSubscription=this.mapService.pointerMove$.subscribe(t=>{this.handleMoveEvent(t)}),this.mouseOutListener=()=>{this.helpTooltipElement.classList.add("measure-layer__tooltip--hidden")},this.map.getViewport().addEventListener("mouseout",this.mouseOutListener),this.drawInteraction}createHelpTooltip(){this.helpTooltipElement&&this.helpTooltipElement.parentNode.removeChild(this.helpTooltipElement),this.helpTooltipElement=document.createElement("div"),this.helpTooltipElement.className="measure-layer__tooltip",this.helpTooltipOverlay=new EX({element:this.helpTooltipElement,className:"measure-layer__unselectable",offset:[15,0],positioning:"center-left"}),this.map.addOverlay(this.helpTooltipOverlay)}createMeasureTooltip(){this.measureTooltipElement&&this.measureTooltipElement.parentNode.removeChild(this.measureTooltipElement),this.measureTooltipElement=document.createElement("div"),this.measureTooltipElement.className="measure-layer__tooltip measure-layer__tooltip--measure",this.measureTooltipOverlay=new EX({element:this.measureTooltipElement,offset:[0,-15],positioning:"bottom-center",stopEvent:!0}),this.map.addOverlay(this.measureTooltipOverlay)}handleMoveEvent(t){if(t.dragging)return;let e="Cliquer pour d\xe9marrer la mesure";this.sketchFeature&&(e=this.drawInteraction.atFinish_(t)?"Cliquer pour terminer la mesure":"Cliquer pour ajouter un point"),this.helpTooltipElement.innerHTML=e,this.helpTooltipOverlay.setPosition(t.coordinate),this.helpTooltipElement.classList.remove("measure-layer__tooltip--hidden")}getSketchFeatureStyle(t){const e=t.getGeometry(),i=[new jZ({stroke:new VZ({color:"rgba(0, 0, 0, 0.8)",lineDash:[10,10],width:2})})];return e.forEachSegment((t,e)=>{i.push(new jZ({geometry:new kH([t,e]),text:new cY({text:e$(t,e),font:"12px sans-serif",placement:"line",textBaseline:"bottom",overflow:!0,fill:new RZ({color:"#000000"})})}))}),i}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(pI),r.Pb(WP))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-measure-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},styles:['.measure-layer__tooltip{position:relative;background:rgba(0,0,0,.7);border-radius:4px;color:#fff;padding:4px 8px;opacity:.8;white-space:nowrap;font-size:12px}.measure-layer__tooltip--measure{display:flex;align-items:center}.measure-layer__tooltip--measure:before{border-top:6px solid rgba(0,0,0,.7);border-right:6px solid transparent;border-left:6px solid transparent;content:"";position:absolute;bottom:-6px;margin-left:-7px;left:50%}.measure-layer__tooltip--hidden{display:none}.measure-layer__unselectable{pointer-events:none;touch-action:none}'],encapsulation:2,changeDetection:0}),t})();var KX=class extends Jq{handleFeatureChange_(){}};class $X extends lY{handleEvent(t){const e=[...t.pixel],i=super.handleEvent(t);return t.pixel[0]===e[0]&&t.pixel[1]===e[1]||(t.snapped=!0),i}}const GX=new VZ({color:"rgba(0, 0, 0, 0.8)",lineDash:[10,10],width:2}),WX=new jZ({stroke:GX}),ZX=new RZ({color:"#000000"}),qX=["root"];let YX=(()=>{class t extends LT{constructor(){super(...arguments),this.remove=new r.o}ngOnDestroy(){super.ngOnDestroy(),this.map.removeOverlay(this.overlay)}ngOnChanges(t){if(t.tooltip){t.tooltip.firstChange&&(this.overlay=new EX({element:this.rootElement.nativeElement,offset:[0,-15],positioning:"bottom-center",stopEvent:!0}),this.map.addOverlay(this.overlay));const e=t.tooltip.previousValue,i=t.tooltip.currentValue;e&&i.coordinates[0]===e.coordinates[0]&&i.coordinates[1]===e.coordinates[1]||this.overlay.setPosition(this.tooltip.coordinates)}}}return t.\u0275fac=function(e){return QX(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-waypoint-tooltip"]],viewQuery:function(t,e){if(1&t&&r.Pc(qX,3),2&t){let t;r.vc(t=r.dc())&&(e.rootElement=t.first)}},inputs:{map:"map",tooltip:"tooltip"},outputs:{remove:"remove"},features:[r.Ab,r.Bb],decls:5,vars:1,consts:[[1,"waypoint-tooltip"],["root",""],[1,"waypoint-tooltip__remove-btn","material-icons","mat-icon",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"div",0,1),r.Kc(2),r.Vb(3,"button",2),r.cc("click",function(){return e.remove.next()}),r.Kc(4,"close"),r.Ub(),r.Ub()),2&t&&(r.Db(2),r.Mc(" ",e.tooltip.label," "))},styles:['.waypoint-tooltip{position:relative;background:rgba(0,0,0,.7);border-radius:4px;color:#fff;padding:4px 8px;opacity:.8;white-space:nowrap;font-size:12px;display:flex;align-items:center} .waypoint-tooltip:before{border-top:6px solid rgba(0,0,0,.7);border-right:6px solid transparent;border-left:6px solid transparent;content:"";position:absolute;bottom:-6px;margin-left:-7px;left:50%} .waypoint-tooltip__remove-btn{padding:0;border-top-right-radius:4px;border-bottom-right-radius:4px;font-size:1.5em;margin:-4px -8px -4px 4px;color:inherit;background-color:transparent} .waypoint-tooltip__remove-btn:hover{background-color:rgba(0,0,0,.3)}'],changeDetection:0}),t})();const QX=r.Xb(YX);function XX(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-waypoint-tooltip",1),r.cc("remove",function(){r.Ac(t);const i=e.index;return r.gc().emitRemoveEvent(i)}),r.Ub()}if(2&t){const t=e.$implicit,i=r.gc();r.nc("map",i.map)("tooltip",t)}}let JX=(()=>{class t extends LT{constructor(){super(...arguments),this.remove=new r.o,this.waypointTooltips=[]}ngOnDestroy(){super.ngOnDestroy()}ngOnChanges(t){t.pim&&this.buildWaypointTooltipsAndSegmentsLabels()}buildWaypointTooltipsAndSegmentsLabels(){const t=this.pim.feature.getGeometry().getCoordinates();if(t.length<2)throw new Error("PIM invalide (2 points n\xe9cessaires)");const e=this.pim.waypoints;if(e.length<1)throw new Error("PIM invalide (1 \xe9tape n\xe9cessaire)");let i=this.pim.waypoints[0].timestamp;this.waypointTooltips=[{coordinates:t[0],label:eJ(i)}];const n=[];for(let s=1;s<t.length;s++){const o=t[s-1],a=t[s],l=e[s-1],c=(r=a,Math.round(Uk(oE(o),oE(r))/1852*100)/100),h=Math.round(i+c/l.speed*3600),u=BO(h-i);i=h,this.waypointTooltips.push({coordinates:a,label:`ETA: ${eJ(i)}`}),n.push(`${l.speed} kt - ${u}\n${e$(o,a)}`)}var r;this.pim.feature.setStyle(function(t,e){const i=[WX];let n=0;return t.forEachSegment((t,r)=>{const[s,o]=e[n].split("\n");i.push(new jZ({geometry:new kH([t,r]),text:new cY({text:` ${s}\n`,font:"12px sans-serif",placement:"line",textBaseline:"bottom",overflow:!0,fill:ZX})})),i.push(new jZ({geometry:new kH([t,r]),text:new cY({text:o,font:"12px sans-serif",placement:"line",textBaseline:"bottom",overflow:!0,fill:ZX})}));const a=r[0]-t[0],l=r[1]-t[1];if(0!==a||0!==l){const t=Math.atan2(l,a);i.push(new jZ({geometry:new jM(r),image:new Pq({src:"assets/images/arrow-chevron.png",anchor:[.6,.5],rotateWithView:!0,rotation:-t})}))}n++}),i}(this.pim.feature.getGeometry(),n))}trackByIndex(t){return t}emitRemoveEvent(t){this.remove.next({pim:this.pim,index:t})}}return t.\u0275fac=function(e){return tJ(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-pim"]],inputs:{map:"map",pim:"pim"},outputs:{remove:"remove"},features:[r.Ab,r.Bb],decls:1,vars:2,consts:[[3,"map","tooltip","remove",4,"ngFor","ngForOf","ngForTrackBy"],[3,"map","tooltip","remove"]],template:function(t,e){1&t&&r.Ic(0,XX,1,2,"app-waypoint-tooltip",0),2&t&&r.nc("ngForOf",e.waypointTooltips)("ngForTrackBy",e.trackByIndex)},directives:[ct,YX],styles:[""],changeDetection:0}),t})();const tJ=r.Xb(JX);function eJ(t){return FO(1e3*t,"yyyy-MM-dd HH:mm")}function iJ(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-pim",1),r.cc("remove",function(e){return r.Ac(t),r.gc().handleRemoveEvent(e)}),r.Ub()}if(2&t){const t=e.$implicit,i=r.gc();r.nc("map",i.map)("pim",t)}}var nJ=function(t){return t.Idle="idle",t.Draw="draw",t.Modify="modify",t}({});let rJ=(()=>{class t extends LT{constructor(t,e){super(),this.changeDetectorRef=t,this.pimService=e,this.pims=[],this.pointerMoveSubscription=new ye.a,this.currentMode=nJ.Idle,this.lastFeatureSegmentsCount=1,this.isUpdatingPIMGeometry=!1,this.updatedPIMOriginalGeometryCoordinates=null,this.mouseOutListener=()=>{this.helpTooltipOverlay.setPosition(null)}}ngOnInit(){this.ensureMandatoryInputParams("map"),this.source=new $q({features:[],wrapX:!1}),this.layer=new Nq({source:this.source,updateWhileAnimating:!0,updateWhileInteracting:!0,zIndex:2}),this.map.addLayer(this.layer),this.subscriptions.push(this.pimService.active$.subscribe(t=>{t?this.createInteractions():this.removeInteractions()}),this.pimService.nextStartDate$.subscribe(t=>{if(this.currentMode===nJ.Draw){const e=this.pims[this.pims.length-1];e.waypoints[0].timestamp=t,this.updatePIMReference(e)}}),this.pimService.nextSpeed$.subscribe(t=>{if(this.currentMode===nJ.Draw){const e=this.pims[this.pims.length-1],i=e.waypoints;i[i.length-1].speed=t,this.updatePIMReference(e)}}))}ngOnDestroy(){super.ngOnDestroy(),this.clear()}clear(){this.source.clear(!0),this.removeInteractions()}createInteractions(){this.createModifyInteraction(),this.createDrawInteraction(),this.snapInteraction=new $X({source:this.source,pixelTolerance:20}),this.map.addInteraction(this.snapInteraction),this.createHelpTooltip(),this.map.getViewport().addEventListener("mouseout",this.mouseOutListener)}removeInteractions(){this.map.getViewport().removeEventListener("mouseout",this.mouseOutListener),this.pointerMoveSubscription.unsubscribe(),ME(this.featureGeomChangeListener),this.map.removeInteraction(this.drawInteraction),this.map.removeInteraction(this.modifyInteraction),this.map.removeInteraction(this.snapInteraction),this.map.removeOverlay(this.helpTooltipOverlay)}createDrawInteraction(){this.drawInteraction=new rY({type:"LineString",source:this.source,style:bY,condition:aG}),this.map.addInteraction(this.drawInteraction),this.drawInteraction.on("drawstart",t=>{CC({category:"app",message:"pim: drawstart"}),this.currentMode=nJ.Draw,this.map.removeInteraction(this.snapInteraction),this.modifyInteraction.setActive(!1);const e=t.feature,i={feature:e,waypoints:[{timestamp:this.pimService.nextStartDate$.value,speed:this.pimService.nextSpeed$.value}]};e.pim=i,this.pims.push(i),this.listenForDrawedGeometryChanges(e)}),this.drawInteraction.on("drawend",()=>{CC({category:"app",message:"pim: drawend"}),this.currentMode=nJ.Idle,this.map.addInteraction(this.snapInteraction),this.modifyInteraction.setActive(!0),ME(this.featureGeomChangeListener)}),this.drawInteraction.on("drawabort",()=>{CC({category:"app",message:"pim: drawabort"}),this.currentMode=nJ.Idle,this.map.addInteraction(this.snapInteraction),this.modifyInteraction.setActive(!0),ME(this.featureGeomChangeListener),this.pims.splice(this.pims.length-1,1)}),this.pointerMoveSubscription=en(this.map,"pointermove").pipe(Pe(t=>{this.helpTooltipOverlay.setPosition(t.coordinate)}),fI(0)).subscribe(t=>{this.handleMoveEvent(t),this.changeDetectorRef.detectChanges()})}createModifyInteraction(){this.modifyInteraction=new KX({source:this.source,style:bY,condition:aG}),this.map.addInteraction(this.modifyInteraction),this.modifyInteraction.on("modifystart",t=>{CC({category:"app",message:"pim: modifystart"}),this.currentMode=nJ.Modify,this.map.removeInteraction(this.snapInteraction);const e=t.features.item(0);this.listenForGeometryChanges(e)}),this.modifyInteraction.on("modifyend",t=>{CC({category:"app",message:"pim: modifyend"}),this.currentMode=nJ.Idle,this.map.addInteraction(this.snapInteraction),ME(this.featureGeomChangeListener)})}listenForGeometryChanges(t){this.updatedPIMOriginalGeometryCoordinates=t.getGeometry().getCoordinates(),this.lastFeatureSegmentsCount=this.updatedPIMOriginalGeometryCoordinates.length-1,this.featureGeomChangeListener=t.getGeometry().on("change",()=>{const e=t.pim,i=t.getGeometry().getCoordinates(),n=i.length-1;if(n===this.lastFeatureSegmentsCount+1){for(let t=1;t<n;t++){const[n,r]=i[t],[s,o]=this.updatedPIMOriginalGeometryCoordinates[t];if(n!==s||r!==o){e.waypoints.splice(t,0,{speed:this.pimService.nextSpeed$.value});break}}this.lastFeatureSegmentsCount=n,this.handleMoveEvent(this.lastMoveEvent)}this.updatePIMReference(e)})}listenForDrawedGeometryChanges(t){this.updatedPIMOriginalGeometryCoordinates=t.getGeometry().getCoordinates(),this.lastFeatureSegmentsCount=this.updatedPIMOriginalGeometryCoordinates.length-1,this.featureGeomChangeListener=t.getGeometry().on("change",()=>{const e=t.pim,i=t.getGeometry().getCoordinates().length-1;i!==this.lastFeatureSegmentsCount&&(this.isUpdatingPIMGeometry||(i>this.lastFeatureSegmentsCount?(e.waypoints.push({speed:this.pimService.nextSpeed$.value}),CC({category:"app",message:"pim: add waypoint"})):(e.waypoints.splice(e.waypoints.length-1,1),CC({category:"app",message:"pim: remove waypoint"}))),this.lastFeatureSegmentsCount=i,this.handleMoveEvent(this.lastMoveEvent)),this.isUpdatingPIMGeometry||this.updatePIMReference(e)})}createHelpTooltip(){this.helpTooltipElement&&this.helpTooltipElement.parentNode.removeChild(this.helpTooltipElement),this.helpTooltipElement=document.createElement("div"),this.helpTooltipElement.className="help-tooltip",this.helpTooltipOverlay=new EX({element:this.helpTooltipElement,offset:[15,0],className:"help-tooltip__overlay",stopEvent:!1,positioning:"center-left"}),this.map.addOverlay(this.helpTooltipOverlay)}handleMoveEvent(t){this.lastMoveEvent=t;let e="";if(this.currentMode===nJ.Modify&&t.dragging)e="D\xe9placer pour modifier l'\xe9tape";else if(t.snapped)switch(this.currentMode===nJ.Idle&&this.drawInteraction.getActive()&&this.drawInteraction.setActive(!1),this.currentMode){case nJ.Idle:e="Cliquer et maintenir pour ajouter une \xe9tape";break;case nJ.Modify:e="D\xe9placer pour modifier l'\xe9tape"}else switch(this.currentMode!==nJ.Idle||this.drawInteraction.getActive()||this.drawInteraction.setActive(!0),this.currentMode){case nJ.Idle:e="Cliquer pour d\xe9marrer un PIM";break;case nJ.Draw:e=this.drawInteraction.atFinish_(t.pixel)?"Cliquer pour terminer le PIM":"Cliquer pour ajouter une \xe9tape"}this.helpTooltipElement.innerHTML=e}trackByIndex(t){return t}removePIM(t){this.source.hasFeature(t.feature)?this.source.removeFeature(t.feature):this.drawInteraction.abortDrawing();const e=this.pims.findIndex(e=>e===t);this.pims.splice(e,1)}handleRemoveEvent(t){const e=t.pim,i=t.index;if(0===i||1===e.waypoints.length)return this.removePIM(e),void CC({category:"app",message:"pim: remove pim"});if(this.currentMode===nJ.Draw&&this.pims[this.pims.length-1]===e&&i===e.waypoints.length)return;CC({category:"app",message:"pim: remove waypoint"}),e.waypoints.splice(i===e.waypoints.length?i-1:i,1);const n=e.feature.getGeometry(),r=n.getCoordinates();r.splice(i,1),this.isUpdatingPIMGeometry=!0,n.setCoordinates(r),this.isUpdatingPIMGeometry=!1,this.pims[this.pims.length-1]===e&&this.currentMode===nJ.Draw&&(this.drawInteraction.sketchCoords_=r,this.drawInteraction.finishCoordinate_=r[i-1]),this.updatePIMReference(e),this.pimService.active$.value&&(this.map.removeInteraction(this.modifyInteraction),this.createModifyInteraction())}updatePIMReference(t){const e=this.pims.findIndex(e=>e===t);if(-1===e)throw console.warn("PIM non trouv\xe9",t,this.pims),new Error("PIM non trouv\xe9");const i=Object.assign({},t);t.feature.pim=i,this.pims[e]=i}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(KO))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-pim-layer"]],inputs:{map:"map"},features:[r.Ab],decls:1,vars:2,consts:[[3,"map","pim","remove",4,"ngFor","ngForOf","ngForTrackBy"],[3,"map","pim","remove"]],template:function(t,e){1&t&&r.Ic(0,iJ,1,2,"app-pim",0),2&t&&r.nc("ngForOf",e.pims)("ngForTrackBy",e.trackByIndex)},directives:[ct,JX],styles:[".help-tooltip{position:relative;background:rgba(0,0,0,.7);border-radius:4px;color:#fff;padding:4px 8px;opacity:.8;white-space:nowrap;font-size:12px} .help-tooltip__overlay{pointer-events:none!important;touch-action:none}"]}),t})();function sJ(t,e){var i=[];Object.keys(e).forEach(function(t){null!=e[t]&&i.push(t+"="+encodeURIComponent(e[t]))});var n=i.join("&");return(t=-1===(t=t.replace(/[?&]$/,"")).indexOf("?")?t+"?":t+"&")+n}var oJ=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),aJ=function(t){function e(e){var i=this,n=e||{},r=n.params||{};return(i=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,imageSmoothing:n.imageSmoothing,opaque:!(!("TRANSPARENT"in r)||r.TRANSPARENT),projection:n.projection,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileClass:n.tileClass,tileGrid:n.tileGrid,tileLoadFunction:n.tileLoadFunction,url:n.url,urls:n.urls,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition})||this).gutter_=void 0!==n.gutter?n.gutter:0,i.params_=r,i.v13_=!0,i.serverType_=n.serverType,i.hidpi_=void 0===n.hidpi||n.hidpi,i.tmpExtent_=[1/0,1/0,-1/0,-1/0],i.updateV13_(),i.setKey(i.getKeyForParams_()),i}return oJ(e,t),e.prototype.getFeatureInfoUrl=function(t,e,i,n){var r=eE(i),s=this.getProjection(),o=this.getTileGrid();o||(o=this.getTileGridForProjection(r));var a=o.getZForResolution(e,this.zDirection),l=o.getTileCoordForCoordAndZ(t,a);if(!(o.getResolutions().length<=l[0])){var c=o.getResolution(l[0]),h=o.getTileCoordExtent(l,this.tmpExtent_),u=ZE(o.getTileSize(l[0]),this.tmpSize),d=this.gutter_;0!==d&&(u=GE(u,d,this.tmpSize),h=xS(h,c*d,h)),s&&s!==r&&(c=yE(s,r,t,c),h=uE(h,r,s),t=hE(t,r,s));var p={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};zC(p,this.params_,n);var f=Math.floor((t[0]-h[0])/c),m=Math.floor((h[3]-t[1])/c);return p[this.v13_?"I":"X"]=f,p[this.v13_?"J":"Y"]=m,this.getRequestUrl_(l,u,h,1,s||r,p)}},e.prototype.getLegendUrl=function(t,e){if(void 0!==this.urls[0]){var i={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===e||void 0===e.LAYER){var n=this.params_.LAYERS;if(Array.isArray(n)&&1!==n.length)return;i.LAYER=n}if(void 0!==t){var r=this.getProjection()?this.getProjection().getMetersPerUnit():1;i.SCALE=t*r/28e-5}return zC(i,e),sJ(this.urls[0],i)}},e.prototype.getGutter=function(){return this.gutter_},e.prototype.getParams=function(){return this.params_},e.prototype.getRequestUrl_=function(t,e,i,n,r,s){var o=this.urls;if(o){if(s.WIDTH=e[0],s.HEIGHT=e[1],s[this.v13_?"CRS":"SRS"]=r.getCode(),"STYLES"in this.params_||(s.STYLES=""),1!=n)switch(this.serverType_){case"geoserver":var a=90*n+.5|0;"FORMAT_OPTIONS"in s?s.FORMAT_OPTIONS+=";dpi:"+a:s.FORMAT_OPTIONS="dpi:"+a;break;case"mapserver":s.MAP_RESOLUTION=90*n;break;case"carmentaserver":case"qgis":s.DPI=90*n;break;default:yS(!1,52)}var l=r.getAxisOrientation(),c=i;if(this.v13_&&"ne"==l.substr(0,2)){var h=void 0;h=i[0],c[0]=i[1],c[1]=h,h=i[2],c[2]=i[3],c[3]=h}return s.BBOX=c.join(","),sJ(1==o.length?o[0]:o[bk(DE(t),o.length)],s)}},e.prototype.getTilePixelRatio=function(t){return this.hidpi_&&void 0!==this.serverType_?t:1},e.prototype.getKeyForParams_=function(){var t=0,e=[];for(var i in this.params_)e[t++]=i+"-"+this.params_[i];return e.join("/")},e.prototype.updateParams=function(t){zC(this.params_,t),this.updateV13_(),this.setKey(this.getKeyForParams_())},e.prototype.updateV13_=function(){this.v13_=function(t,e){for(var i=(""+t).split("."),n="1.3".split("."),r=0;r<Math.max(i.length,n.length);r++){var s=parseInt(i[r]||"0",10),o=parseInt(n[r]||"0",10);if(s>o)return 1;if(o>s)return-1}return 0}(this.params_.VERSION||"1.3.0")>=0},e.prototype.tileUrlFunction=function(t,e,i){var n=this.getTileGrid();if(n||(n=this.getTileGridForProjection(i)),!(n.getResolutions().length<=t[0])){1==e||this.hidpi_&&void 0!==this.serverType_||(e=1);var r=n.getResolution(t[0]),s=n.getTileCoordExtent(t,this.tmpExtent_),o=ZE(n.getTileSize(t[0]),this.tmpSize),a=this.gutter_;0!==a&&(o=GE(o,a,this.tmpSize),s=xS(s,r*a,s)),1!=e&&(o=WE(o,e,this.tmpSize));var l={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return zC(l,this.params_),this.getRequestUrl_(t,o,s,e,i,l)}},e}(cD);const lJ={limits36Nq:{assets:[{url:"assets/geo/Limite_3milles_peche_WGS84_EPSG4326.geojson",style:new jZ({stroke:new VZ({width:2,color:"#ed791a"})})},{url:"assets/geo/Limite_6milles_bande_cotiere_peche_WGS84_EPSG4326.geojson",style:new jZ({stroke:new VZ({width:2,color:"#7a7a7a"})})}],formatFeature:t=>t.get("nature")},maritimeBoundaries:{assets:[{url:"assets/geo/Delim_accord_WGS84.geojson",style:new jZ({stroke:new VZ({width:2,color:"#090df6"})})},{url:"assets/geo/Lignes_base_droites_WGS84.geojson",style:new jZ({stroke:new VZ({width:2,color:"#000000"})})},{url:"assets/geo/Lim_ext_MT_WGS84.geojson",style:new jZ({stroke:new VZ({width:2,color:"#e31a1c"})})},{url:"assets/geo/Lim_ext_PC_WGS84.geojson",style:new jZ({stroke:new VZ({width:2,color:"#732d2f"})})},{url:"assets/geo/Lim_ext_ZC_WGS84.geojson",style:new jZ({stroke:new VZ({width:2,color:"#c36812"})})},{url:"assets/geo/Lim_ext_ZEE_WGS84.geojson",style:new jZ({stroke:new VZ({width:2,color:"#d60af5"})})},{url:"assets/geo/Lim_sans_accord_WGS84.geojson",style:new jZ({stroke:new VZ({lineDash:[2,5],width:2,color:"#000000"})})}],formatFeature:t=>t.get("nature")},mrcc:{assets:[{url:"assets/geo/mrcc_2020-08-03.geojson",style:new jZ({image:new Pq({src:"/assets/images/lifeline.png"})})}],formatFeature:t=>t.get("name")},searchAndRescue:{assets:[{url:"assets/geo/sar_2020-08-03.geojson",style:new jZ({stroke:new VZ({width:2,color:"#d9161e"})})}],formatFeature:t=>t.get("name")}};let cJ=(()=>{class t extends LT{constructor(t,e){super(),this.mapConfigService=t,this.mapService=e,this.featuresLoaded$=new _e.a,this.assetsFeaturesByType={}}ngOnInit(){this.ensureMandatoryInputParams("map"),this.geoJSONReader=new FH({featureProjection:this.map.getView().getProjection().getCode()}),this.pointsSource=new $q({features:[]}),this.pointsLayer=new Nq({source:this.pointsSource,updateWhileAnimating:!0,updateWhileInteracting:!0}),this.map.addLayer(this.pointsLayer),this.linesSource=new $q({features:[]}),this.linesLayer=new EY({source:this.linesSource}),this.map.addLayer(this.linesLayer),this.eezLayer=new dW({source:new aJ({url:"https://geo.vliz.be/geoserver/gwc/service/wms",params:{SRS:"EPSG:3857",LAYERS:"MarineRegions:eez_boundaries"}}),visible:!1}),this.map.addLayer(this.eezLayer),this.subscriptions.push(Hg([this.mapConfigService.showMaritimeBoundariesLayer$,this.mapConfigService.show36NqLimitsLayer$,this.mapConfigService.showMRCCLayer$,this.mapConfigService.showSARLayer$]).pipe(He(([t,e,i,n])=>t||e||i||n),Rv()).subscribe(()=>Object(ue.a)(this,void 0,void 0,function*(){yield this.fetchFeatures()})),this.featuresLoaded$.pipe(Rv()).subscribe(()=>{this.subscriptions.push(Hg([this.mapConfigService.showMaritimeBoundariesLayer$,this.mapConfigService.show36NqLimitsLayer$,this.mapConfigService.showMRCCLayer$,this.mapConfigService.showSARLayer$]).subscribe(([t,e,i,n])=>{this.pointsSource.clear(!0),this.linesSource.clear(!0),t&&this.linesSource.addFeatures(this.assetsFeaturesByType.maritimeBoundaries),e&&this.linesSource.addFeatures(this.assetsFeaturesByType.limits36Nq),i&&this.pointsSource.addFeatures(this.assetsFeaturesByType.mrcc),n&&this.linesSource.addFeatures(this.assetsFeaturesByType.searchAndRescue)}))}),this.mapConfigService.showEEZLayer$.subscribe(t=>{this.eezLayer.setVisible(t)}),this.mapService.pointerMove$.subscribe(t=>{(this.pointsSource.getFeatures().length||this.linesSource.getFeatures().length)&&this.handleMoveEvent(t)})),this.createTooltip()}ngOnDestroy(){super.ngOnDestroy(),this.map.removeLayer(this.pointsLayer),this.map.removeLayer(this.linesLayer),this.map.removeOverlay(this.tooltipOverlay)}createTooltip(){this.tooltipElement&&this.tooltipElement.parentNode.removeChild(this.tooltipElement),this.tooltipElement=document.createElement("div"),this.tooltipElement.className="additional-features-layer__tooltip",this.tooltipOverlay=new EX({element:this.tooltipElement,offset:[0,-10],positioning:"bottom-center"}),this.map.addOverlay(this.tooltipOverlay)}handleMoveEvent(t){this.map.forEachFeatureAtPixel(t.pixel,e=>(this.tooltipElement.innerHTML=e.title,this.tooltipOverlay.setPosition(t.coordinate),!0),{hitTolerance:3,layerFilter:t=>t===this.pointsLayer||t===this.linesLayer})?this.tooltipElement.classList.remove("additional-features-layer__tooltip--hidden"):this.tooltipElement.classList.add("additional-features-layer__tooltip--hidden")}fetchFeatures(){return Object(ue.a)(this,void 0,void 0,function*(){yield Promise.all(Object.entries(lJ).map(([t,e])=>Object(ue.a)(this,void 0,void 0,function*(){const i=yield Promise.all(e.assets.map(t=>Object(ue.a)(this,void 0,void 0,function*(){var e;const i=yield fetch(t.url);if("ANAIS-UI"!==(null===(e=i.headers)||void 0===e?void 0:e.get("x-server"))){const t=i.headers.get("content-type");throw new Error(`Le serveur n'a pas bien r\xe9pondu${"application/json"!==t?` (re\xe7u: ${t}, attendu: application/json)`:""}. Votre acc\xe8s \xe0 internet est-il bloqu\xe9 par un proxy ?`)}try{return{collection:yield i.json(),style:t.style}}catch(n){throw new Error(`Donn\xe9es corrompues pour le fichier ${t.url}. JSON probablement malform\xe9 (${n.message})`)}})));this.assetsFeaturesByType[t]=i.flatMap(t=>{const i=this.geoJSONReader.readFeatures(t.collection);return i.forEach(i=>{i.setStyle(t.style),i.title=e.formatFeature(i)}),i})}))),this.featuresLoaded$.next(!0)})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(hI),r.Pb(pI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-additional-features-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},styles:['.additional-features-layer__tooltip{position:relative;background:rgba(0,0,0,.7);border-radius:4px;color:#fff;padding:4px 8px;opacity:.8;white-space:nowrap;font-size:12px;pointer-events:none;touch-action:none}.additional-features-layer__tooltip:before{border-top:6px solid rgba(0,0,0,.7);border-right:6px solid transparent;border-left:6px solid transparent;content:"";position:absolute;bottom:-6px;margin-left:-7px;left:50%}.additional-features-layer__tooltip--hidden{display:none}'],encapsulation:2,changeDetection:0}),t})();const hJ={openSeaMap:new uD({url:fD.a.openSeaMapURL,crossOrigin:"anonymous",attributions:'\xa9 <a href="http://openstreetmap.org">OpenStreetMap</a> contributors'}),subcables:new uD({url:fD.a.subcablesURL,crossOrigin:"anonymous",attributions:"\xa9 SHOM"})};let uJ=(()=>{class t extends LT{constructor(t){super(),this.mapConfigService=t,this.layers=[]}ngOnInit(){this.ensureMandatoryInputParams("map"),Object.values(hJ).forEach(t=>{const e=new dW({source:t,visible:!1});this.map.addLayer(e),this.layers.push(e)}),this.subscriptions.push(this.mapConfigService.showOpenSeaMapLayer$.subscribe(t=>{this.layers.find(t=>t.getSource()===hJ.openSeaMap).setVisible(t)}),this.mapConfigService.showSubcablesLayer$.subscribe(t=>{this.layers.find(t=>t.getSource()===hJ.subcables).setVisible(t)}))}ngOnDestroy(){super.ngOnDestroy(),this.layers.forEach(t=>{this.map.removeLayer(t)})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-tile-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();var dJ="http://www.w3.org/2001/XMLSchema-instance";function pJ(t,e){return RJ().createElementNS(t,e)}function fJ(t,e){return mJ(t,e,[]).join("")}function mJ(t,e,i){if(t.nodeType==Node.CDATA_SECTION_NODE||t.nodeType==Node.TEXT_NODE)i.push(e?String(t.nodeValue).replace(/(\r\n|\r|\n)/g,""):t.nodeValue);else{var n=void 0;for(n=t.firstChild;n;n=n.nextSibling)mJ(n,e,i)}return i}function gJ(t){return"documentElement"in t}function AJ(t){return(new DOMParser).parseFromString(t,"application/xml")}function bJ(t,e){return function(i,n){var r=t.call(void 0!==e?e:this,i,n);void 0!==r&&LC(n[n.length-1],r)}}function vJ(t,e){return function(i,n){var r=t.call(void 0!==e?e:this,i,n);void 0!==r&&n[n.length-1].push(r)}}function _J(t,e){return function(i,n){var r=t.call(void 0!==e?e:this,i,n);void 0!==r&&(n[n.length-1]=r)}}function yJ(t,e,i){return function(n,r){var s=t.call(void 0!==i?i:this,n,r);void 0!==s&&(r[r.length-1][void 0!==e?e:n.localName]=s)}}function wJ(t,e){return function(i,n,r){t.call(void 0!==e?e:this,i,n,r),r[r.length-1].node.appendChild(i)}}function xJ(t,e){var i,n;return function(e,r,s){if(void 0===i){i={};var o={};o[e.localName]=t,i[e.namespaceURI]=o,n=CJ(e.localName)}PJ(i,n,r,s)}}function CJ(t,e){var i=t;return function(t,n,r){var s=i;return void 0===s&&(s=r),pJ(void 0!==e?e:n[n.length-1].node.namespaceURI,s)}}var SJ=CJ();function kJ(t,e){for(var i=e.length,n=new Array(i),r=0;r<i;++r)n[r]=t[e[r]];return n}function EJ(t,e,i){var n,r,s=void 0!==i?i:{};for(n=0,r=t.length;n<r;++n)s[t[n]]=e;return s}function DJ(t,e,i,n){var r;for(r=e.firstElementChild;r;r=r.nextElementSibling){var s=t[r.namespaceURI];if(void 0!==s){var o=s[r.localName];void 0!==o&&o.call(n,r,i)}}}function IJ(t,e,i,n,r){return n.push(t),DJ(e,i,n,r),n.pop()}function PJ(t,e,i,n,r,s){for(var o,a,l=(void 0!==r?r:i).length,c=0;c<l;++c)void 0!==(o=i[c])&&void 0!==(a=e.call(void 0!==s?s:this,o,n,void 0!==r?r[c]:void 0))&&t[a.namespaceURI][a.localName].call(s,a,o,n)}function OJ(t,e,i,n,r,s,o){return r.push(t),PJ(e,i,n,r,s,o),r.pop()}var MJ=void 0,TJ=void 0;function RJ(){return void 0===TJ&&"undefined"!=typeof document&&(TJ=document.implementation.createDocument("","",null)),TJ}var VJ=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),FJ=function(t){function e(){var e=t.call(this)||this;return e.xmlSerializer_=(void 0===MJ&&"undefined"!=typeof XMLSerializer&&(MJ=new XMLSerializer),MJ),e}return VJ(e,t),e.prototype.getType=function(){return"xml"},e.prototype.readFeature=function(t,e){if(t){if("string"==typeof t){var i=AJ(t);return this.readFeatureFromDocument(i,e)}return gJ(t)?this.readFeatureFromDocument(t,e):this.readFeatureFromNode(t,e)}return null},e.prototype.readFeatureFromDocument=function(t,e){var i=this.readFeaturesFromDocument(t,e);return i.length>0?i[0]:null},e.prototype.readFeatureFromNode=function(t,e){return null},e.prototype.readFeatures=function(t,e){if(t){if("string"==typeof t){var i=AJ(t);return this.readFeaturesFromDocument(i,e)}return gJ(t)?this.readFeaturesFromDocument(t,e):this.readFeaturesFromNode(t,e)}return[]},e.prototype.readFeaturesFromDocument=function(t,e){for(var i=[],n=t.firstChild;n;n=n.nextSibling)n.nodeType==Node.ELEMENT_NODE&&LC(i,this.readFeaturesFromNode(n,e));return i},e.prototype.readFeaturesFromNode=function(t,e){return ZC()},e.prototype.readGeometry=function(t,e){if(t){if("string"==typeof t){var i=AJ(t);return this.readGeometryFromDocument(i,e)}return gJ(t)?this.readGeometryFromDocument(t,e):this.readGeometryFromNode(t,e)}return null},e.prototype.readGeometryFromDocument=function(t,e){return null},e.prototype.readGeometryFromNode=function(t,e){return null},e.prototype.readProjection=function(t){if(t){if("string"==typeof t){var e=AJ(t);return this.readProjectionFromDocument(e)}return gJ(t)?this.readProjectionFromDocument(t):this.readProjectionFromNode(t)}return null},e.prototype.readProjectionFromDocument=function(t){return this.dataProjection},e.prototype.readProjectionFromNode=function(t){return this.dataProjection},e.prototype.writeFeature=function(t,e){var i=this.writeFeatureNode(t,e);return this.xmlSerializer_.serializeToString(i)},e.prototype.writeFeatureNode=function(t,e){return null},e.prototype.writeFeatures=function(t,e){var i=this.writeFeaturesNode(t,e);return this.xmlSerializer_.serializeToString(i)},e.prototype.writeFeaturesNode=function(t,e){return null},e.prototype.writeGeometry=function(t,e){var i=this.writeGeometryNode(t,e);return this.xmlSerializer_.serializeToString(i)},e.prototype.writeGeometryNode=function(t,e){return null},e}(AH);function LJ(t){var e,i=fJ(t,!1);return(e=/^\s*(true|1)|(false|0)\s*$/.exec(i))?void 0!==e[1]||!1:void 0}function UJ(t){var e=fJ(t,!1),i=Date.parse(e);return isNaN(i)?void 0:i/1e3}function BJ(t){var e,i=fJ(t,!1);return(e=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(i))?parseFloat(e[1]):void 0}function NJ(t){var e,i=fJ(t,!1);return(e=/^\s*(\d+)\s*$/.exec(i))?parseInt(e[1],10):void 0}function jJ(t){return fJ(t,!1).trim()}function zJ(t,e){$J(t,e?"1":"0")}function HJ(t,e){var i=e.toPrecision();t.appendChild(RJ().createTextNode(i))}function KJ(t,e){var i=e.toString();t.appendChild(RJ().createTextNode(i))}function $J(t,e){t.appendChild(RJ().createTextNode(e))}var GJ=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),WJ=[null,"http://www.topografix.com/GPX/1/0","http://www.topografix.com/GPX/1/1"],ZJ={rte:w0,trk:x0,wpt:C0},qJ=EJ(WJ,{rte:vJ(w0),trk:vJ(x0),wpt:vJ(C0)}),YJ=EJ(WJ,{text:yJ(jJ,"linkText"),type:yJ(jJ,"linkType")}),QJ=EJ(WJ,{rte:wJ(function(t,e,i){var n=i[0],r=e.getProperties(),s={node:t};s.properties=r;var o=e.getGeometry();if("LineString"==o.getType()){var a=bH(o,!0,n);s.geometryLayout=a.getLayout(),r.rtept=a.getCoordinates()}var l=a0[i[i.length-1].node.namespaceURI],c=kJ(r,l);OJ(s,l0,SJ,c,i,l)}),trk:wJ(function(t,e,i){var n=i[0],r=e.getProperties(),s={node:t};s.properties=r;var o=e.getGeometry();if("MultiLineString"==o.getType()){var a=bH(o,!0,n);r.trkseg=a.getLineStrings()}var l=h0[i[i.length-1].node.namespaceURI],c=kJ(r,l);OJ(s,u0,SJ,c,i,l)}),wpt:wJ(function(t,e,i){var n=i[0],r=i[i.length-1];r.properties=e.getProperties();var s=e.getGeometry();if("Point"==s.getType()){var o=bH(s,!0,n);r.geometryLayout=o.getLayout(),k0(t,o.getCoordinates(),i)}})}),XJ=function(t){function e(e){var i=t.call(this)||this,n=e||{};return i.dataProjection=eE("EPSG:4326"),i.readExtensions_=n.readExtensions,i}return GJ(e,t),e.prototype.handleReadExtensions_=function(t){t||(t=[]);for(var e=0,i=t.length;e<i;++e){var n=t[e];if(this.readExtensions_){var r=n.get("extensionsNode_")||null;this.readExtensions_(n,r)}n.set("extensionsNode_",void 0)}},e.prototype.readFeatureFromNode=function(t,e){if(!RC(WJ,t.namespaceURI))return null;var i=ZJ[t.localName];if(!i)return null;var n=i(t,[this.getReadOptions(t,e)]);return n?(this.handleReadExtensions_([n]),n):null},e.prototype.readFeaturesFromNode=function(t,e){if(!RC(WJ,t.namespaceURI))return[];if("gpx"==t.localName){var i=IJ([],qJ,t,[this.getReadOptions(t,e)]);return i?(this.handleReadExtensions_(i),i):[]}return[]},e.prototype.writeFeaturesNode=function(t,e){e=this.adaptOptions(e);var i=pJ("http://www.topografix.com/GPX/1/1","gpx");return i.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xsi",dJ),i.setAttributeNS(dJ,"xsi:schemaLocation","http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"),i.setAttribute("version","1.1"),i.setAttribute("creator","OpenLayers"),OJ({node:i},QJ,A0,t,[e]),i},e}(FJ),JJ=EJ(WJ,{name:yJ(jJ),cmt:yJ(jJ),desc:yJ(jJ),src:yJ(jJ),link:_0,number:yJ(NJ),extensions:y0,type:yJ(jJ),rtept:function(t,e){var i=IJ({},t0,t,e);if(i){var n=e[e.length-1];b0(n.flatCoordinates,n.layoutOptions,t,i)}}}),t0=EJ(WJ,{ele:yJ(BJ),time:yJ(UJ)}),e0=EJ(WJ,{name:yJ(jJ),cmt:yJ(jJ),desc:yJ(jJ),src:yJ(jJ),link:_0,number:yJ(NJ),type:yJ(jJ),extensions:y0,trkseg:function(t,e){var i=e[e.length-1];DJ(i0,t,e),i.ends.push(i.flatCoordinates.length)}}),i0=EJ(WJ,{trkpt:function(t,e){var i=IJ({},n0,t,e);if(i){var n=e[e.length-1];b0(n.flatCoordinates,n.layoutOptions,t,i)}}}),n0=EJ(WJ,{ele:yJ(BJ),time:yJ(UJ)}),r0=EJ(WJ,{ele:yJ(BJ),time:yJ(UJ),magvar:yJ(BJ),geoidheight:yJ(BJ),name:yJ(jJ),cmt:yJ(jJ),desc:yJ(jJ),src:yJ(jJ),link:_0,sym:yJ(jJ),type:yJ(jJ),fix:yJ(jJ),sat:yJ(NJ),hdop:yJ(BJ),vdop:yJ(BJ),pdop:yJ(BJ),ageofdgpsdata:yJ(BJ),dgpsid:yJ(NJ),extensions:y0}),s0=["text","type"],o0=EJ(WJ,{text:wJ($J),type:wJ($J)}),a0=EJ(WJ,["name","cmt","desc","src","link","number","type","rtept"]),l0=EJ(WJ,{name:wJ($J),cmt:wJ($J),desc:wJ($J),src:wJ($J),link:wJ(S0),number:wJ(KJ),type:wJ($J),rtept:xJ(wJ(k0))}),c0=EJ(WJ,["ele","time"]),h0=EJ(WJ,["name","cmt","desc","src","link","number","type","trkseg"]),u0=EJ(WJ,{name:wJ($J),cmt:wJ($J),desc:wJ($J),src:wJ($J),link:wJ(S0),number:wJ(KJ),type:wJ($J),trkseg:xJ(wJ(function(t,e,i){var n={node:t};n.geometryLayout=e.getLayout(),n.properties={},OJ(n,p0,d0,e.getCoordinates(),i)}))}),d0=CJ("trkpt"),p0=EJ(WJ,{trkpt:wJ(k0)}),f0=EJ(WJ,["ele","time","magvar","geoidheight","name","cmt","desc","src","link","sym","type","fix","sat","hdop","vdop","pdop","ageofdgpsdata","dgpsid"]),m0=EJ(WJ,{ele:wJ(HJ),time:wJ(function(t,e){var i=new Date(1e3*e),n=i.getUTCFullYear()+"-"+zk(i.getUTCMonth()+1,2)+"-"+zk(i.getUTCDate(),2)+"T"+zk(i.getUTCHours(),2)+":"+zk(i.getUTCMinutes(),2)+":"+zk(i.getUTCSeconds(),2)+"Z";t.appendChild(RJ().createTextNode(n))}),magvar:wJ(HJ),geoidheight:wJ(HJ),name:wJ($J),cmt:wJ($J),desc:wJ($J),src:wJ($J),link:wJ(S0),sym:wJ($J),type:wJ($J),fix:wJ($J),sat:wJ(KJ),hdop:wJ(HJ),vdop:wJ(HJ),pdop:wJ(HJ),ageofdgpsdata:wJ(HJ),dgpsid:wJ(KJ)}),g0={Point:"wpt",LineString:"rte",MultiLineString:"trk"};function A0(t,e,i){var n=t.getGeometry();if(n){var r=g0[n.getType()];if(r)return pJ(e[e.length-1].node.namespaceURI,r)}}function b0(t,e,i,n){return t.push(parseFloat(i.getAttribute("lon")),parseFloat(i.getAttribute("lat"))),"ele"in n?(t.push(n.ele),delete n.ele,e.hasZ=!0):t.push(0),"time"in n?(t.push(n.time),delete n.time,e.hasM=!0):t.push(0),t}function v0(t,e,i){var n="XY",r=2;if(t.hasZ&&t.hasM?(n="XYZM",r=4):t.hasZ?(n="XYZ",r=3):t.hasM&&(n="XYM",r=3),4!==r){for(var s=0,o=e.length/4;s<o;s++)e[s*r]=e[4*s],e[s*r+1]=e[4*s+1],t.hasZ&&(e[s*r+2]=e[4*s+2]),t.hasM&&(e[s*r+2]=e[4*s+3]);if(e.length=e.length/4*r,i)for(s=0,o=i.length;s<o;s++)i[s]=i[s]/4*r}return n}function _0(t,e){var i=e[e.length-1],n=t.getAttribute("href");null!==n&&(i.link=n),DJ(YJ,t,e)}function y0(t,e){e[e.length-1].extensionsNode_=t}function w0(t,e){var i=e[0],n=IJ({flatCoordinates:[],layoutOptions:{}},JJ,t,e);if(n){var r=n.flatCoordinates;delete n.flatCoordinates;var s=n.layoutOptions;delete n.layoutOptions;var o=v0(s,r),a=new kH(r,o);bH(a,!1,i);var l=new pH(a);return l.setProperties(n,!0),l}}function x0(t,e){var i=e[0],n=IJ({flatCoordinates:[],ends:[],layoutOptions:{}},e0,t,e);if(n){var r=n.flatCoordinates;delete n.flatCoordinates;var s=n.ends;delete n.ends;var o=n.layoutOptions;delete n.layoutOptions;var a=v0(o,r,s),l=new DH(r,a,s);bH(l,!1,i);var c=new pH(l);return c.setProperties(n,!0),c}}function C0(t,e){var i=e[0],n=IJ({},r0,t,e);if(n){var r={},s=b0([],r,t,n),o=v0(r,s),a=new jM(s,o);bH(a,!1,i);var l=new pH(a);return l.setProperties(n,!0),l}}function S0(t,e,i){t.setAttribute("href",e);var n=i[i.length-1].properties;OJ({node:t},o0,SJ,[n.linkText,n.linkType],i,s0)}function k0(t,e,i){var n=i[i.length-1],r=n.node.namespaceURI,s=n.properties;switch(t.setAttributeNS(null,"lat",String(e[1])),t.setAttributeNS(null,"lon",String(e[0])),n.geometryLayout){case"XYZM":0!==e[3]&&(s.time=e[3]);case"XYZ":0!==e[2]&&(s.ele=e[2]);break;case"XYM":0!==e[2]&&(s.time=e[2])}var o="rtept"==t.nodeName?c0[r]:f0[r],a=kJ(s,o);OJ({node:t,properties:s},m0,SJ,a,i,o)}var E0=XJ,D0=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function I0(t){return"string"==typeof t?t:""}var P0,O0,M0,T0,R0,V0,F0,L0,U0,B0,N0=function(t){function e(){return t.call(this)||this}return D0(e,t),e.prototype.getType=function(){return"text"},e.prototype.readFeature=function(t,e){return this.readFeatureFromText(I0(t),this.adaptOptions(e))},e.prototype.readFeatureFromText=function(t,e){return ZC()},e.prototype.readFeatures=function(t,e){return this.readFeaturesFromText(I0(t),this.adaptOptions(e))},e.prototype.readFeaturesFromText=function(t,e){return ZC()},e.prototype.readGeometry=function(t,e){return this.readGeometryFromText(I0(t),this.adaptOptions(e))},e.prototype.readGeometryFromText=function(t,e){return ZC()},e.prototype.readProjection=function(t){return this.readProjectionFromText(I0(t))},e.prototype.readProjectionFromText=function(t){return this.dataProjection},e.prototype.writeFeature=function(t,e){return this.writeFeatureText(t,this.adaptOptions(e))},e.prototype.writeFeatureText=function(t,e){return ZC()},e.prototype.writeFeatures=function(t,e){return this.writeFeaturesText(t,this.adaptOptions(e))},e.prototype.writeFeaturesText=function(t,e){return ZC()},e.prototype.writeGeometry=function(t,e){return this.writeGeometryText(t,this.adaptOptions(e))},e.prototype.writeGeometryText=function(t,e){return ZC()},e}(AH),j0=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),z0=/^B(\d{2})(\d{2})(\d{2})(\d{2})(\d{5})([NS])(\d{3})(\d{5})([EW])([AV])(\d{5})(\d{5})/,H0=/^H.([A-Z]{3}).*?:(.*)/,K0=/^HFDTE(\d{2})(\d{2})(\d{2})/,$0=/\r\n|\r|\n/,G0=function(t){function e(e){var i=t.call(this)||this,n=e||{};return i.dataProjection=eE("EPSG:4326"),i.altitudeMode_=n.altitudeMode?n.altitudeMode:"none",i}return j0(e,t),e.prototype.readFeatureFromText=function(t,e){var i,n,r=this.altitudeMode_,s=t.split($0),o={},a=[],l=2e3,c=0,h=1,u=-1;for(i=0,n=s.length;i<n;++i){var d=s[i],p=void 0;if("B"==d.charAt(0)){if(p=z0.exec(d)){var f=parseInt(p[1],10),m=parseInt(p[2],10),g=parseInt(p[3],10),A=parseInt(p[4],10)+parseInt(p[5],10)/6e4;"S"==p[6]&&(A=-A);var b,v=parseInt(p[7],10)+parseInt(p[8],10)/6e4;if("W"==p[9]&&(v=-v),a.push(v,A),"none"!=r)b="gps"==r?parseInt(p[11],10):"barometric"==r?parseInt(p[12],10):0,a.push(b);var _=Date.UTC(l,c,h,f,m,g);_<u&&(_=Date.UTC(l,c,h+1,f,m,g)),a.push(_/1e3),u=_}}else"H"==d.charAt(0)&&((p=K0.exec(d))?(h=parseInt(p[1],10),c=parseInt(p[2],10)-1,l=2e3+parseInt(p[3],10)):(p=H0.exec(d))&&(o[p[1]]=p[2].trim()))}if(0===a.length)return null;var y=new kH(a,"none"==r?"XYM":"XYZM"),w=new pH(bH(y,!1,e));return w.setProperties(o,!0),w},e.prototype.readFeaturesFromText=function(t,e){var i=this.readFeatureFromText(t,e);return i?[i]:[]},e}(N0),W0=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Z0=["http://www.google.com/kml/ext/2.2"],q0=[null,"http://earth.google.com/kml/2.0","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.2","http://www.opengis.net/kml/2.2"],Y0={fraction:"fraction",pixels:"pixels",insetPixels:"pixels"},Q0=EJ(q0,{ExtendedData:K1,Region:$1,MultiGeometry:yJ(V1,"geometry"),LineString:yJ(M1,"geometry"),LinearRing:yJ(T1,"geometry"),Point:yJ(F1,"geometry"),Polygon:yJ(U1,"geometry"),Style:yJ(N1),StyleMap:function(t,e){var i=b1.call(this,t,e);if(i){var n=e[e.length-1];Array.isArray(i)?n.Style=i:"string"==typeof i?n.styleUrl=i:yS(!1,38)}},address:yJ(jJ),description:yJ(jJ),name:yJ(jJ),open:yJ(LJ),phoneNumber:yJ(jJ),styleUrl:yJ(m1),visibility:yJ(LJ)},EJ(Z0,{MultiTrack:yJ(function(t,e){var i=IJ([],S1,t,e);if(i)return new DH(i)},"geometry"),Track:yJ(E1,"geometry")})),X0=EJ(q0,{ExtendedData:K1,Region:$1,Link:function(t,e){DJ(J0,t,e)},address:yJ(jJ),description:yJ(jJ),name:yJ(jJ),open:yJ(LJ),phoneNumber:yJ(jJ),visibility:yJ(LJ)}),J0=EJ(q0,{href:yJ(f1)}),t1=EJ(q0,{LatLonAltBox:function(t,e){var i=IJ({},Z1,t,e);if(i){var n=e[e.length-1],r=[parseFloat(i.west),parseFloat(i.south),parseFloat(i.east),parseFloat(i.north)];n.extent=r,n.altitudeMode=i.altitudeMode,n.minAltitude=parseFloat(i.minAltitude),n.maxAltitude=parseFloat(i.maxAltitude)}},Lod:function(t,e){var i=IJ({},q1,t,e);if(i){var n=e[e.length-1];n.minLodPixels=parseFloat(i.minLodPixels),n.maxLodPixels=parseFloat(i.maxLodPixels),n.minFadeExtent=parseFloat(i.minFadeExtent),n.maxFadeExtent=parseFloat(i.maxFadeExtent)}}}),e1=EJ(q0,["Document","Placemark"]),i1=EJ(q0,{Document:wJ(function(t,e,i){OJ({node:t},t2,e2,e,i,void 0,this)}),Placemark:wJ(S2)}),n1=null,r1=null,s1=null,o1=null,a1=null,l1=null;function c1(t){return t}var h1=function(t){function e(e){var i=t.call(this)||this,n=e||{};return l1||(n1=new RZ({color:P0=[255,255,255,1]}),r1=new Pq({anchor:O0=[20,2],anchorOrigin:"bottom-left",anchorXUnits:M0="pixels",anchorYUnits:T0="pixels",crossOrigin:"anonymous",rotation:0,scale:F0=.5,size:R0=[64,64],src:V0="https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png"}),L0="NO_IMAGE",s1=new VZ({color:P0,width:1}),U0=new VZ({color:[51,51,51,1],width:2}),o1=new cY({font:"bold 16px Helvetica",fill:n1,stroke:U0,scale:.8}),a1=new jZ({fill:n1,image:r1,text:o1,stroke:s1,zIndex:0}),l1=[a1]),i.dataProjection=eE("EPSG:4326"),i.defaultStyle_=n.defaultStyle?n.defaultStyle:l1,i.extractStyles_=void 0===n.extractStyles||n.extractStyles,i.writeStyles_=void 0===n.writeStyles||n.writeStyles,i.sharedStyles_={},i.showPointNames_=void 0===n.showPointNames||n.showPointNames,i.crossOrigin_=void 0!==n.crossOrigin?n.crossOrigin:"anonymous",i.iconUrlFunction_=n.iconUrlFunction?n.iconUrlFunction:c1,i}return W0(e,t),e.prototype.readDocumentOrFolder_=function(t,e){return IJ([],EJ(q0,{Document:bJ(this.readDocumentOrFolder_,this),Folder:bJ(this.readDocumentOrFolder_,this),Placemark:vJ(this.readPlacemark_,this),Style:this.readSharedStyle_.bind(this),StyleMap:this.readSharedStyleMap_.bind(this)}),t,e,this)||void 0},e.prototype.readPlacemark_=function(t,e){var i,n,r,s,o,a=IJ({geometry:null},Q0,t,e,this);if(a){var l=new pH,c=t.getAttribute("id");null!==c&&l.setId(c);var h=a.geometry;if(h&&bH(h,!1,e[0]),l.setGeometry(h),delete a.geometry,this.extractStyles_){var u=(i=a.Style,n=a.styleUrl,r=this.defaultStyle_,s=this.sharedStyles_,o=this.showPointNames_,function(t,e){var a=o,l="",c=[];if(a){var h=t.getGeometry();if(h){var u=h.getType();a="GeometryCollection"===u?(c=h.getGeometriesArrayRecursive().filter(function(t){var e=t.getType();return"Point"===e||"MultiPoint"===e})).length>0:"Point"===u||"MultiPoint"===u}}a&&(l=t.get("name"),(a=a&&!!l)&&l.search(/&[^&]+;/)>-1&&(B0||(B0=document.createElement("textarea")),B0.innerHTML=l,l=B0.value));var d=r;if(i?d=i:n&&(d=u1(n,r,s)),a){var p=function(t,e){var i=[0,0],n="start",r=t.getImage();if(r){var s=r.getImageSize();if(null===s&&(s=R0),2==s.length){var o=r.getScaleArray();i[0]=o[0]*s[0]/2,i[1]=-o[1]*s[1]/2,n="left"}}var a=t.getText();return a?((a=a.clone()).setFont(a.getFont()||o1.getFont()),a.setScale(a.getScale()||o1.getScale()),a.setFill(a.getFill()||o1.getFill()),a.setStroke(a.getStroke()||U0)):a=o1.clone(),a.setText(e),a.setOffsetX(i[0]),a.setOffsetY(i[1]),a.setTextAlign(n),new jZ({image:r,text:a})}(d[0],l);return c.length>0?(p.setGeometry(new gH(c)),[p,new jZ({geometry:d[0].getGeometry(),image:null,fill:d[0].getFill(),stroke:d[0].getStroke(),text:null})].concat(d.slice(1))):p}return d});l.setStyle(u)}return delete a.Style,l.setProperties(a,!0),l}},e.prototype.readSharedStyle_=function(t,e){var i=t.getAttribute("id");if(null!==i){var n=N1.call(this,t,e);if(n){var r,s=t.baseURI;s&&"about:blank"!=s||(s=window.location.href),r=s?new URL("#"+i,s).href:"#"+i,this.sharedStyles_[r]=n}}},e.prototype.readSharedStyleMap_=function(t,e){var i=t.getAttribute("id");if(null!==i){var n=b1.call(this,t,e);if(n){var r,s=t.baseURI;s&&"about:blank"!=s||(s=window.location.href),r=s?new URL("#"+i,s).href:"#"+i,this.sharedStyles_[r]=n}}},e.prototype.readFeatureFromNode=function(t,e){return RC(q0,t.namespaceURI)&&this.readPlacemark_(t,[this.getReadOptions(t,e)])||null},e.prototype.readFeaturesFromNode=function(t,e){if(!RC(q0,t.namespaceURI))return[];var i,n=t.localName;if("Document"==n||"Folder"==n)return(i=this.readDocumentOrFolder_(t,[this.getReadOptions(t,e)]))||[];if("Placemark"==n){var r=this.readPlacemark_(t,[this.getReadOptions(t,e)]);return r?[r]:[]}if("kml"==n){i=[];for(var s=t.firstElementChild;s;s=s.nextElementSibling){var o=this.readFeaturesFromNode(s,e);o&&LC(i,o)}return i}return[]},e.prototype.readName=function(t){if(t){if("string"==typeof t){var e=AJ(t);return this.readNameFromDocument(e)}return gJ(t)?this.readNameFromDocument(t):this.readNameFromNode(t)}},e.prototype.readNameFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE){var i=this.readNameFromNode(e);if(i)return i}},e.prototype.readNameFromNode=function(t){for(var e=t.firstElementChild;e;e=e.nextElementSibling)if(RC(q0,e.namespaceURI)&&"name"==e.localName)return jJ(e);for(e=t.firstElementChild;e;e=e.nextElementSibling){var i=e.localName;if(RC(q0,e.namespaceURI)&&("Document"==i||"Folder"==i||"Placemark"==i||"kml"==i)){var n=this.readNameFromNode(e);if(n)return n}}},e.prototype.readNetworkLinks=function(t){var e=[];if("string"==typeof t){var i=AJ(t);LC(e,this.readNetworkLinksFromDocument(i))}else gJ(t)?LC(e,this.readNetworkLinksFromDocument(t)):LC(e,this.readNetworkLinksFromNode(t));return e},e.prototype.readNetworkLinksFromDocument=function(t){for(var e=[],i=t.firstChild;i;i=i.nextSibling)i.nodeType==Node.ELEMENT_NODE&&LC(e,this.readNetworkLinksFromNode(i));return e},e.prototype.readNetworkLinksFromNode=function(t){for(var e=[],i=t.firstElementChild;i;i=i.nextElementSibling)if(RC(q0,i.namespaceURI)&&"NetworkLink"==i.localName){var n=IJ({},X0,i,[]);e.push(n)}for(i=t.firstElementChild;i;i=i.nextElementSibling){var r=i.localName;!RC(q0,i.namespaceURI)||"Document"!=r&&"Folder"!=r&&"kml"!=r||LC(e,this.readNetworkLinksFromNode(i))}return e},e.prototype.readRegion=function(t){var e=[];if("string"==typeof t){var i=AJ(t);LC(e,this.readRegionFromDocument(i))}else gJ(t)?LC(e,this.readRegionFromDocument(t)):LC(e,this.readRegionFromNode(t));return e},e.prototype.readRegionFromDocument=function(t){for(var e=[],i=t.firstChild;i;i=i.nextSibling)i.nodeType==Node.ELEMENT_NODE&&LC(e,this.readRegionFromNode(i));return e},e.prototype.readRegionFromNode=function(t){for(var e=[],i=t.firstElementChild;i;i=i.nextElementSibling)if(RC(q0,i.namespaceURI)&&"Region"==i.localName){var n=IJ({},t1,i,[]);e.push(n)}for(i=t.firstElementChild;i;i=i.nextElementSibling){var r=i.localName;!RC(q0,i.namespaceURI)||"Document"!=r&&"Folder"!=r&&"kml"!=r||LC(e,this.readRegionFromNode(i))}return e},e.prototype.writeFeaturesNode=function(t,e){e=this.adaptOptions(e);var i=pJ(q0[4],"kml"),n="http://www.w3.org/2000/xmlns/";i.setAttributeNS(n,"xmlns:gx",Z0[0]),i.setAttributeNS(n,"xmlns:xsi",dJ),i.setAttributeNS(dJ,"xsi:schemaLocation","http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd");var r={node:i},s={};t.length>1?s.Document=t:1==t.length&&(s.Placemark=t[0]);var o=e1[i.namespaceURI],a=kJ(s,o);return OJ(r,i1,SJ,a,[e],o,this),i},e}(FJ);function u1(t,e,i){return Array.isArray(t)?t:"string"==typeof t?u1(i[t],e,i):e}function d1(t){var e=fJ(t,!1),i=/^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(e);if(i){var n=i[1];return[parseInt(n.substr(6,2),16),parseInt(n.substr(4,2),16),parseInt(n.substr(2,2),16),parseInt(n.substr(0,2),16)/255]}}function p1(t){var e=fJ(t,!1),i=[];e=e.replace(/\s*,\s*/g,",");for(var n,r=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?),([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|,|$)(?:([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|$))?\s*/i;n=r.exec(e);){var s=parseFloat(n[1]),o=parseFloat(n[2]),a=n[3]?parseFloat(n[3]):0;i.push(s,o,a),e=e.substr(n[0].length)}if(""===e)return i}function f1(t){var e=fJ(t,!1).trim(),i=t.baseURI;return i&&"about:blank"!=i||(i=window.location.href),i?new URL(e,i).href:e}function m1(t){var e=fJ(t,!1).trim().replace(/^(?!.*#)/,"#"),i=t.baseURI;return i&&"about:blank"!=i||(i=window.location.href),i?new URL(e,i).href:e}function g1(t){return BJ(t)}var A1=EJ(q0,{Pair:function(t,e){var i=IJ({},G1,t,e,this);if(i){var n=i.key;if(n&&"normal"==n){var r=i.styleUrl;r&&(e[e.length-1]=r);var s=i.Style;s&&(e[e.length-1]=s)}}}});function b1(t,e){return IJ(void 0,A1,t,e,this)}var v1=EJ(q0,{Icon:yJ(function(t,e){return IJ({},D1,t,e)||null}),color:yJ(d1),heading:yJ(BJ),hotSpot:yJ(function(t){var e,i=t.getAttribute("xunits"),n=t.getAttribute("yunits");return e="insetPixels"!==i?"insetPixels"!==n?"bottom-left":"top-left":"insetPixels"!==n?"bottom-right":"top-right",{x:parseFloat(t.getAttribute("x")),xunits:Y0[i],y:parseFloat(t.getAttribute("y")),yunits:Y0[n],origin:e}}),scale:yJ(g1)}),_1=EJ(q0,{color:yJ(d1),scale:yJ(g1)}),y1=EJ(q0,{color:yJ(d1),width:yJ(BJ)}),w1=EJ(q0,{color:yJ(d1),fill:yJ(LJ),outline:yJ(LJ)}),x1=EJ(q0,{coordinates:_J(p1)});function C1(t,e){return IJ(null,x1,t,e)}var S1=EJ(Z0,{Track:vJ(E1)}),k1=EJ(q0,{when:function(t,e){var i=e[e.length-1].whens,n=fJ(t,!1),r=Date.parse(n);i.push(isNaN(r)?0:r)}},EJ(Z0,{coord:function(t,e){var i=e[e.length-1].flatCoordinates,n=fJ(t,!1),r=/^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i.exec(n);if(r){var s=parseFloat(r[1]),o=parseFloat(r[2]),a=parseFloat(r[3]);i.push(s,o,a,0)}else i.push(0,0,0,0)}}));function E1(t,e){var i=IJ({flatCoordinates:[],whens:[]},k1,t,e);if(i){for(var n=i.flatCoordinates,r=i.whens,s=0,o=Math.min(n.length,r.length);s<o;++s)n[4*s+3]=r[s];return new kH(n,"XYZM")}}var D1=EJ(q0,{href:yJ(f1)},EJ(Z0,{x:yJ(BJ),y:yJ(BJ),w:yJ(BJ),h:yJ(BJ)})),I1=EJ(q0,{coordinates:_J(p1)});function P1(t,e){return IJ(null,I1,t,e)}var O1=EJ(q0,{extrude:yJ(LJ),tessellate:yJ(LJ),altitudeMode:yJ(jJ)});function M1(t,e){var i=IJ({},O1,t,e),n=P1(t,e);if(n){var r=new kH(n,"XYZ");return r.setProperties(i,!0),r}}function T1(t,e){var i=IJ({},O1,t,e),n=P1(t,e);if(n){var r=new iT(n,"XYZ",[n.length]);return r.setProperties(i,!0),r}}var R1=EJ(q0,{LineString:vJ(M1),LinearRing:vJ(T1),MultiGeometry:vJ(V1),Point:vJ(F1),Polygon:vJ(U1)});function V1(t,e){var i,n=IJ([],R1,t,e);if(!n)return null;if(0===n.length)return new gH(n);for(var r=!0,s=n[0].getType(),o=1,a=n.length;o<a;++o)if(n[o].getType()!=s){r=!1;break}if(r){var l=void 0,c=void 0;if("Point"==s){var h=n[0];for(l=h.getLayout(),c=h.getFlatCoordinates(),o=1,a=n.length;o<a;++o)LC(c,n[o].getFlatCoordinates());j1(i=new PH(c,l),n)}else"LineString"==s?j1(i=new DH(n),n):"Polygon"==s?j1(i=new MH(n),n):"GeometryCollection"==s?i=new gH(n):yS(!1,37)}else i=new gH(n);return i}function F1(t,e){var i=IJ({},O1,t,e),n=P1(t,e);if(n){var r=new jM(n,"XYZ");return r.setProperties(i,!0),r}}var L1=EJ(q0,{innerBoundaryIs:function(t,e){var i=IJ(void 0,Y1,t,e);i&&e[e.length-1].push(i)},outerBoundaryIs:function(t,e){var i=IJ(void 0,Q1,t,e);i&&(e[e.length-1][0]=i)}});function U1(t,e){var i=IJ({},O1,t,e),n=IJ([null],L1,t,e);if(n&&n[0]){for(var r=n[0],s=[r.length],o=1,a=n.length;o<a;++o)LC(r,n[o]),s.push(r.length);var l=new iT(r,"XYZ",s);return l.setProperties(i,!0),l}}var B1=EJ(q0,{IconStyle:function(t,e){var i=IJ({},v1,t,e);if(i){var n,r,s,o,a=e[e.length-1],l="Icon"in i?i.Icon:{},c=!("Icon"in i)||Object.keys(l).length>0,h=l.href;h?n=h:c&&(n=V0);var u,d="bottom-left",p=i.hotSpot;p?(r=[p.x,p.y],s=p.xunits,o=p.yunits,d=p.origin):n===V0?(r=O0,s=M0,o=T0):/^http:\/\/maps\.(?:google|gstatic)\.com\//.test(n)&&(r=[.5,0],s="fraction",o="fraction");var f,m=l.x,g=l.y;void 0!==m&&void 0!==g&&(u=[m,g]);var A,b=l.w,v=l.h;void 0!==b&&void 0!==v&&(f=[b,v]);var _=i.heading;void 0!==_&&(A=Ak(_));var y=i.scale,w=i.color;if(c){n==V0&&(f=R0,void 0===y&&(y=F0));var x=new Pq({anchor:r,anchorOrigin:d,anchorXUnits:s,anchorYUnits:o,crossOrigin:this.crossOrigin_,offset:u,offsetOrigin:"bottom-left",rotation:A,scale:y,size:f,src:this.iconUrlFunction_(n),color:w});a.imageStyle=x}else a.imageStyle=L0}},LabelStyle:function(t,e){var i=IJ({},_1,t,e);if(i){var n=e[e.length-1],r=new cY({fill:new RZ({color:"color"in i?i.color:P0}),scale:i.scale});n.textStyle=r}},LineStyle:function(t,e){var i=IJ({},y1,t,e);if(i){var n=e[e.length-1],r=new VZ({color:"color"in i?i.color:P0,width:"width"in i?i.width:1});n.strokeStyle=r}},PolyStyle:function(t,e){var i=IJ({},w1,t,e);if(i){var n=e[e.length-1],r=new RZ({color:"color"in i?i.color:P0});n.fillStyle=r;var s=i.fill;void 0!==s&&(n.fill=s);var o=i.outline;void 0!==o&&(n.outline=o)}}});function N1(t,e){var i=IJ({},B1,t,e,this);if(!i)return null;var n,r="fillStyle"in i?i.fillStyle:n1,s=i.fill;void 0===s||s||(r=null),"imageStyle"in i?i.imageStyle!=L0&&(n=i.imageStyle):n=r1;var o="textStyle"in i?i.textStyle:o1,a="strokeStyle"in i?i.strokeStyle:s1,l=i.outline;return void 0===l||l?[new jZ({fill:r,image:n,stroke:a,text:o,zIndex:void 0})]:[new jZ({geometry:function(t){var e=t.getGeometry(),i=e.getType();return"GeometryCollection"===i?new gH(e.getGeometriesArrayRecursive().filter(function(t){var e=t.getType();return"Polygon"!==e&&"MultiPolygon"!==e})):"Polygon"!==i&&"MultiPolygon"!==i?e:void 0},fill:r,image:n,stroke:a,text:o,zIndex:void 0}),new jZ({geometry:function(t){var e=t.getGeometry(),i=e.getType();return"GeometryCollection"===i?new gH(e.getGeometriesArrayRecursive().filter(function(t){var e=t.getType();return"Polygon"===e||"MultiPolygon"===e})):"Polygon"===i||"MultiPolygon"===i?e:void 0},fill:r,stroke:null,zIndex:void 0})]}function j1(t,e){var i,n,r,s=e.length,o=new Array(e.length),a=new Array(e.length),l=new Array(e.length);i=!1,n=!1,r=!1;for(var c=0;c<s;++c){var h=e[c];o[c]=h.get("extrude"),a[c]=h.get("tessellate"),l[c]=h.get("altitudeMode"),i=i||void 0!==o[c],n=n||void 0!==a[c],r=r||l[c]}i&&t.set("extrude",o),n&&t.set("tessellate",a),r&&t.set("altitudeMode",l)}var z1=EJ(q0,{displayName:yJ(jJ),value:yJ(jJ)}),H1=EJ(q0,{Data:function(t,e){var i=t.getAttribute("name");DJ(z1,t,e);var n=e[e.length-1];i&&n.displayName?n[i]={value:n.value,displayName:n.displayName,toString:function(){return n.value}}:null!==i?n[i]=n.value:null!==n.displayName&&(n[n.displayName]=n.value),delete n.value},SchemaData:function(t,e){DJ(W1,t,e)}});function K1(t,e){DJ(H1,t,e)}function $1(t,e){DJ(t1,t,e)}var G1=EJ(q0,{Style:yJ(N1),key:yJ(jJ),styleUrl:yJ(m1)}),W1=EJ(q0,{SimpleData:function(t,e){var i=t.getAttribute("name");if(null!==i){var n=jJ(t);e[e.length-1][i]=n}}}),Z1=EJ(q0,{altitudeMode:yJ(jJ),minAltitude:yJ(BJ),maxAltitude:yJ(BJ),north:yJ(BJ),south:yJ(BJ),east:yJ(BJ),west:yJ(BJ)}),q1=EJ(q0,{minLodPixels:yJ(BJ),maxLodPixels:yJ(BJ),minFadeExtent:yJ(BJ),maxFadeExtent:yJ(BJ)}),Y1=EJ(q0,{LinearRing:_J(C1)}),Q1=EJ(q0,{LinearRing:_J(C1)});function X1(t,e){for(var i=_W(e),n=[255*(4==i.length?i[3]:1),i[2],i[1],i[0]],r=0;r<4;++r){var s=Math.floor(n[r]).toString(16);n[r]=1==s.length?"0"+s:s}$J(t,n.join(""))}var J1=EJ(q0,{Data:wJ(function(t,e,i){t.setAttribute("name",e.name);var n={node:t},r=e.value;"object"==typeof r?(null!==r&&r.displayName&&OJ(n,J1,SJ,[r.displayName],i,["displayName"]),null!==r&&r.value&&OJ(n,J1,SJ,[r.value],i,["value"])):OJ(n,J1,SJ,[r],i,["value"])}),value:wJ(function(t,e){$J(t,e)}),displayName:wJ(function(t,e){!function(t,e){t.appendChild(RJ().createCDATASection(e))}(t,e)})}),t2=EJ(q0,{Placemark:wJ(S2)}),e2=function(t,e,i){return pJ(e[e.length-1].node.namespaceURI,"Placemark")},i2=CJ("Data"),n2=EJ(q0,["href"],EJ(Z0,["x","y","w","h"])),r2=EJ(q0,{href:wJ($J)},EJ(Z0,{x:wJ(HJ),y:wJ(HJ),w:wJ(HJ),h:wJ(HJ)})),s2=function(t,e,i){return pJ(Z0[0],"gx:"+i)},o2=EJ(q0,["scale","heading","Icon","color","hotSpot"]),a2=EJ(q0,{Icon:wJ(function(t,e,i){var n={node:t},r=n2[i[i.length-1].node.namespaceURI],s=kJ(e,r);OJ(n,r2,SJ,s,i,r),s=kJ(e,r=n2[Z0[0]]),OJ(n,r2,s2,s,i,r)}),color:wJ(X1),heading:wJ(HJ),hotSpot:wJ(function(t,e){t.setAttribute("x",String(e.x)),t.setAttribute("y",String(e.y)),t.setAttribute("xunits",e.xunits),t.setAttribute("yunits",e.yunits)}),scale:wJ(V2)}),l2=EJ(q0,["color","scale"]),c2=EJ(q0,{color:wJ(X1),scale:wJ(V2)}),h2=EJ(q0,["color","width"]),u2=EJ(q0,{color:wJ(X1),width:wJ(HJ)}),d2={Point:"Point",LineString:"LineString",LinearRing:"LinearRing",Polygon:"Polygon",MultiPoint:"MultiGeometry",MultiLineString:"MultiGeometry",MultiPolygon:"MultiGeometry",GeometryCollection:"MultiGeometry"},p2=function(t,e,i){if(t)return pJ(e[e.length-1].node.namespaceURI,d2[t.getType()])},f2=CJ("Point"),m2=CJ("LineString"),g2=CJ("LinearRing"),A2=CJ("Polygon"),b2=EJ(q0,{LineString:wJ(D2),Point:wJ(D2),Polygon:wJ(T2),GeometryCollection:wJ(v2)});function v2(t,e,i){var n,r={node:t},s=e.getType(),o=[];"GeometryCollection"===s?(e.getGeometriesArrayRecursive().forEach(function(t){var e=t.getType();"MultiPoint"===e?o=o.concat(t.getPoints()):"MultiLineString"===e?o=o.concat(t.getLineStrings()):"MultiPolygon"===e?o=o.concat(t.getPolygons()):"Point"===e||"LineString"===e||"Polygon"===e?o.push(t):yS(!1,39)}),n=p2):"MultiPoint"===s?(o=e.getPoints(),n=f2):"MultiLineString"===s?(o=e.getLineStrings(),n=m2):"MultiPolygon"===s?(o=e.getPolygons(),n=A2):yS(!1,39),OJ(r,b2,n,o,i)}var _2=EJ(q0,{LinearRing:wJ(D2)});function y2(t,e,i){OJ({node:t},_2,g2,[e],i)}var w2=EJ(q0,{ExtendedData:wJ(function(t,e,i){for(var n={node:t},r=e.names,s=e.values,o=r.length,a=0;a<o;a++)OJ(n,J1,i2,[{name:r[a],value:s[a]}],i)}),MultiGeometry:wJ(v2),LineString:wJ(D2),LinearRing:wJ(D2),Point:wJ(D2),Polygon:wJ(T2),Style:wJ(function(t,e,i){var n,r={node:t},s={};if(e.pointStyles.length){var o=e.pointStyles[0].getText();o&&(s.LabelStyle=o);var a=e.pointStyles[0].getImage();a&&"function"==typeof a.getSrc&&(s.IconStyle=a)}e.lineStyles.length&&(n=e.lineStyles[0].getStroke())&&(s.LineStyle=n),e.polyStyles.length&&((n=e.polyStyles[0].getStroke())&&!s.LineStyle&&(s.LineStyle=n),s.PolyStyle=e.polyStyles[0]);var l=F2[i[i.length-1].node.namespaceURI],c=kJ(s,l);OJ(r,L2,SJ,c,i,l)}),address:wJ($J),description:wJ($J),name:wJ($J),open:wJ(zJ),phoneNumber:wJ($J),styleUrl:wJ($J),visibility:wJ(zJ)}),x2=EJ(q0,["name","open","visibility","address","phoneNumber","description","styleUrl","Style"]),C2=CJ("ExtendedData");function S2(t,e,i){var n={node:t};e.getId()&&t.setAttribute("id",e.getId());var r=e.getProperties(),s={address:1,description:1,name:1,open:1,phoneNumber:1,styleUrl:1,visibility:1};s[e.getGeometryName()]=1;var o=Object.keys(r||{}).sort().filter(function(t){return!s[t]}),a=e.getStyleFunction();if(a){var l=a(e,0);if(l){var c=Array.isArray(l)?l:[l],h=c;if(e.getGeometry()&&(h=c.filter(function(t){var i=t.getGeometryFunction()(e);if(i){var n=i.getType();return"GeometryCollection"===n?i.getGeometriesArrayRecursive().filter(function(t){var e=t.getType();return"Point"===e||"MultiPoint"===e}).length:"Point"===n||"MultiPoint"===n}})),this.writeStyles_){var u=c,d=c;e.getGeometry()&&(u=c.filter(function(t){var i=t.getGeometryFunction()(e);if(i){var n=i.getType();return"GeometryCollection"===n?i.getGeometriesArrayRecursive().filter(function(t){var e=t.getType();return"LineString"===e||"MultiLineString"===e}).length:"LineString"===n||"MultiLineString"===n}}),d=c.filter(function(t){var i=t.getGeometryFunction()(e);if(i){var n=i.getType();return"GeometryCollection"===n?i.getGeometriesArrayRecursive().filter(function(t){var e=t.getType();return"Polygon"===e||"MultiPolygon"===e}).length:"Polygon"===n||"MultiPolygon"===n}})),r.Style={pointStyles:h,lineStyles:u,polyStyles:d}}if(h.length&&void 0===r.name){var p=h[0].getText();p&&(r.name=p.getText())}}}var f=x2[i[i.length-1].node.namespaceURI],m=kJ(r,f);if(OJ(n,w2,SJ,m,i,f),o.length>0){var g=kJ(r,o);OJ(n,w2,C2,[{names:o,values:g}],i)}var A=i[0],b=e.getGeometry();b&&(b=bH(b,!0,A)),OJ(n,w2,p2,[b],i)}var k2=EJ(q0,["extrude","tessellate","altitudeMode","coordinates"]),E2=EJ(q0,{extrude:wJ(zJ),tessellate:wJ(zJ),altitudeMode:wJ($J),coordinates:wJ(function(t,e,i){var n,r=i[i.length-1],s=r.layout,o=r.stride;"XY"==s||"XYM"==s?n=2:"XYZ"==s||"XYZM"==s?n=3:yS(!1,34);var a=e.length,l="";if(a>0){l+=e[0];for(var c=1;c<n;++c)l+=","+e[c];for(var h=o;h<a;h+=o)for(l+=" "+e[h],c=1;c<n;++c)l+=","+e[h+c]}$J(t,l)})});function D2(t,e,i){var n=e.getFlatCoordinates(),r={node:t};r.layout=e.getLayout(),r.stride=e.getStride();var s=e.getProperties();s.coordinates=n;var o=k2[i[i.length-1].node.namespaceURI],a=kJ(s,o);OJ(r,E2,SJ,a,i,o)}var I2=EJ(q0,["color","fill","outline"]),P2=EJ(q0,{outerBoundaryIs:wJ(y2),innerBoundaryIs:wJ(y2)}),O2=CJ("innerBoundaryIs"),M2=CJ("outerBoundaryIs");function T2(t,e,i){var n=e.getLinearRings(),r=n.shift(),s={node:t};OJ(s,P2,O2,n,i),OJ(s,P2,M2,[r],i)}var R2=EJ(q0,{color:wJ(X1),fill:wJ(zJ),outline:wJ(zJ)});function V2(t,e){HJ(t,Math.round(1e6*e)/1e6)}var F2=EJ(q0,["IconStyle","LabelStyle","LineStyle","PolyStyle"]),L2=EJ(q0,{IconStyle:wJ(function(t,e,i){var n={node:t},r={},s=e.getSrc(),o=e.getSize(),a=e.getImageSize(),l={href:s};if(o){l.w=o[0],l.h=o[1];var c=e.getAnchor(),h=e.getOrigin();h&&a&&0!==h[0]&&h[1]!==o[1]&&(l.x=h[0],l.y=a[1]-(h[1]+o[1])),!c||c[0]===o[0]/2&&c[1]===o[1]/2||(r.hotSpot={x:c[0],xunits:"pixels",y:o[1]-c[1],yunits:"pixels"})}r.Icon=l;var u=e.getScale();1!==u&&(r.scale=u);var d=e.getRotation();0!==d&&(r.heading=d);var p=e.getColor();p&&(r.color=p);var f=o2[i[i.length-1].node.namespaceURI],m=kJ(r,f);OJ(n,a2,SJ,m,i,f)}),LabelStyle:wJ(function(t,e,i){var n={node:t},r={},s=e.getFill();s&&(r.color=s.getColor());var o=e.getScale();o&&1!==o&&(r.scale=o);var a=l2[i[i.length-1].node.namespaceURI],l=kJ(r,a);OJ(n,c2,SJ,l,i,a)}),LineStyle:wJ(function(t,e,i){var n={node:t},r={color:e.getColor(),width:Number(e.getWidth())||1},s=h2[i[i.length-1].node.namespaceURI],o=kJ(r,s);OJ(n,u2,SJ,o,i,s)}),PolyStyle:wJ(function(t,e,i){var n={node:t},r=e.getFill(),s=e.getStroke(),o={color:r?r.getColor():void 0,fill:!!r&&void 0,outline:!!s&&void 0},a=I2[i[i.length-1].node.namespaceURI],l=kJ(o,a);OJ(n,R2,SJ,l,i,a)})}),U2=h1,B2=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),N2=function(t){function e(e){var i=t.call(this)||this,n=e||{};return i.layerName_=n.layerName,i.layers_=n.layers?n.layers:null,i.dataProjection=eE(n.dataProjection?n.dataProjection:"EPSG:4326"),i}return B2(e,t),e.prototype.readFeaturesFromObject=function(t,e){if("Topology"==t.type){var i=t,n=void 0,r=null,s=null;i.transform&&(r=(n=i.transform).scale,s=n.translate);var o=i.arcs;n&&function(t,e,i){for(var n=0,r=t.length;n<r;++n)$2(t[n],e,i)}(o,r,s);var a=[],l=i.objects,c=this.layerName_;for(var h in l)this.layers_&&-1==this.layers_.indexOf(h)||("GeometryCollection"===l[h].type?a.push.apply(a,H2(l[h],o,r,s,c,h,e)):a.push(K2(l[h],o,r,s,c,h,e)));return a}return[]},e.prototype.readProjectionFromObject=function(t){return this.dataProjection},e}(yH),j2={Point:function(t,e,i){var n=t.coordinates;return e&&i&&G2(n,e,i),new jM(n)},LineString:function(t,e){var i=z2(t.arcs,e);return new kH(i)},Polygon:function(t,e){for(var i=[],n=0,r=t.arcs.length;n<r;++n)i[n]=z2(t.arcs[n],e);return new iT(i)},MultiPoint:function(t,e,i){var n=t.coordinates;if(e&&i)for(var r=0,s=n.length;r<s;++r)G2(n[r],e,i);return new PH(n)},MultiLineString:function(t,e){for(var i=[],n=0,r=t.arcs.length;n<r;++n)i[n]=z2(t.arcs[n],e);return new DH(i)},MultiPolygon:function(t,e){for(var i=[],n=0,r=t.arcs.length;n<r;++n){for(var s=t.arcs[n],o=[],a=0,l=s.length;a<l;++a)o[a]=z2(s[a],e);i[n]=o}return new MH(i)}};function z2(t,e){for(var i,n,r=[],s=0,o=t.length;s<o;++s)i=t[s],s>0&&r.pop(),n=i>=0?e[i]:e[~i].slice().reverse(),r.push.apply(r,n);for(var a=0,l=r.length;a<l;++a)r[a]=r[a].slice();return r}function H2(t,e,i,n,r,s,o){for(var a=t.geometries,l=[],c=0,h=a.length;c<h;++c)l[c]=K2(a[c],e,i,n,r,s,o);return l}function K2(t,e,i,n,r,s,o){var a,l=t.type,c=j2[l];a="Point"===l||"MultiPoint"===l?c(t,i,n):c(t,e);var h=new pH;h.setGeometry(bH(a,!1,o)),void 0!==t.id&&h.setId(t.id);var u=t.properties;return r&&(u||(u={}),u[r]=s),u&&h.setProperties(u,!0),h}function $2(t,e,i){for(var n=0,r=0,s=0,o=t.length;s<o;++s){var a=t[s];r+=a[1],a[0]=n+=a[0],a[1]=r,G2(a,e,i)}}function G2(t,e,i){t[0]=t[0]*e[0]+i[0],t[1]=t[1]*e[1]+i[1]}var W2=N2,Z2=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),q2=function(t){function e(e,i,n,r){var s=t.call(this,e)||this;return s.features=n,s.file=i,s.projection=r,s}return Z2(e,t),e}(MC),Y2=function(t){function e(e){var i=this,n=e||{};(i=t.call(this,{handleEvent:BC})||this).readAsBuffer_=!1,i.formats_=[];for(var r=n.formatConstructors?n.formatConstructors:[],s=0,o=r.length;s<o;++s){var a=r[s];"function"==typeof a&&(a=new a),i.formats_.push(a),i.readAsBuffer_=i.readAsBuffer_||"arraybuffer"===a.getType()}return i.projection_=n.projection?eE(n.projection):null,i.dropListenKeys_=null,i.source_=n.source||null,i.target=n.target?n.target:null,i}return Z2(e,t),e.prototype.handleResult_=function(t,e){var i,n=e.target.result,r=this.getMap(),s=this.projection_;s||(s=r.getView().getProjection());for(var o=this.formats_,a=0,l=o.length;a<l;++a){var c=o[a],h=n;this.readAsBuffer_&&"arraybuffer"!==c.getType()&&(void 0===i&&(i=(new TextDecoder).decode(n)),h=i);var u=this.tryReadFeatures_(c,h,{featureProjection:s});if(u&&u.length>0){this.source_&&(this.source_.clear(),this.source_.addFeatures(u)),this.dispatchEvent(new q2("addfeatures",t,u,s));break}}},e.prototype.registerListeners_=function(){var t=this.getMap();if(t){var e=this.target?this.target:t.getViewport();this.dropListenKeys_=[tk(e,"drop",this.handleDrop,this),tk(e,"dragenter",this.handleStop,this),tk(e,"dragover",this.handleStop,this),tk(e,"drop",this.handleStop,this)]}},e.prototype.setActive=function(e){!this.getActive()&&e&&this.registerListeners_(),this.getActive()&&!e&&this.unregisterListeners_(),t.prototype.setActive.call(this,e)},e.prototype.setMap=function(e){this.unregisterListeners_(),t.prototype.setMap.call(this,e),this.getActive()&&this.registerListeners_()},e.prototype.tryReadFeatures_=function(t,e,i){try{return t.readFeatures(e,i)}catch($nt){return null}},e.prototype.unregisterListeners_=function(){this.dropListenKeys_&&(this.dropListenKeys_.forEach(ik),this.dropListenKeys_=null)},e.prototype.handleDrop=function(t){for(var e=t.dataTransfer.files,i=0,n=e.length;i<n;++i){var r=e.item(i),s=new FileReader;s.addEventListener("load",this.handleResult_.bind(this,r)),this.readAsBuffer_?s.readAsArrayBuffer(r):s.readAsText(r)}},e.prototype.handleStop=function(t){t.stopPropagation(),t.preventDefault(),t.dataTransfer.dropEffect="copy"},e}(K$);let Q2=(()=>{class t{constructor(){this.importEvent$=new _e.a}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function X2(t,e){1&t&&(r.Vb(0,"div",1),r.Vb(1,"mat-icon"),r.Kc(2,"arrow_forward"),r.Ub(),r.Kc(3," D\xe9posez vos fichiers GeoJSON, KML, TopoJSON, GPX, IGC... "),r.Vb(4,"mat-icon"),r.Kc(5,"arrow_back"),r.Ub(),r.Ub()),2&t&&r.nc("@fadeAnimation",void 0)}const J2=new RZ({color:"rgba(255,255,255,0.4)"}),t3=new VZ({color:"#3399CC",width:1.25}),e3=new jZ({image:new TZ({fill:J2,stroke:t3,radius:5}),fill:J2,stroke:t3}),i3=new RZ({color:"rgba(200,200,255,0.2)"}),n3=new VZ({color:"#1155FF",width:1.25}),r3=new jZ({image:new TZ({fill:i3,stroke:n3,radius:5}),fill:i3,stroke:n3}),s3=["ID","latitude_deg","longitude_deg","timestamp_utc"];let o3=(()=>{class t extends LT{constructor(t,e,i){super(),this.historyService=t,this.featureImportService=e,this.mapService=i,this.dragging=!1,this.previousHoveredFeatures=[]}ngOnInit(){this.ensureMandatoryInputParams("map"),this.source=new $q,this.layer=new Nq({source:this.source,updateWhileAnimating:!0,updateWhileInteracting:!0,style:e3}),this.map.addLayer(this.layer),this.dragAndDrop=new Y2({formatConstructors:[E0,FH,G0,U2,W2]}),this.dragAndDrop.on("addfeatures",t=>{const e=new EZ;var i;t.features.forEach(t=>{e.insert(t.getGeometry().getExtent(),t)}),this.mapService.fitOn(e.getExtent(),0),function(t){const e=t.getProperties();return s3.every(t=>void 0!==e[t])}(t.features[0])&&this.historyService.setTimestamp((i=t.features[0].get("timestamp_utc"),NO(new Date(i)))),this.source.addFeatures(t.features)}),this.map.addInteraction(this.dragAndDrop),this.createTooltip(),this.startDraggingListener=()=>{this.dragging=!0},this.stopDraggingListener=()=>{this.dragging=!1},this.map.getViewport().addEventListener("dragenter",this.startDraggingListener),this.map.getViewport().addEventListener("dragleave",this.stopDraggingListener),this.map.getViewport().addEventListener("drop",this.stopDraggingListener),this.subscriptions.push(this.mapService.pointerMove$.subscribe(t=>{this.handleMoveEvent(t)}),this.featureImportService.importEvent$.subscribe(t=>{this.dragAndDrop.handleDrop(t)}))}ngOnDestroy(){super.ngOnDestroy(),this.map.removeLayer(this.layer),this.map.removeInteraction(this.dragAndDrop),this.map.getViewport().removeEventListener("dragenter",this.startDraggingListener),this.map.getViewport().removeEventListener("dragleave",this.stopDraggingListener),this.map.getViewport().removeEventListener("drop",this.stopDraggingListener)}createTooltip(){this.tooltipElement&&this.tooltipElement.parentNode.removeChild(this.tooltipElement),this.tooltipElement=document.createElement("div"),this.tooltipElement.className="feature-import-layer__tooltip",this.tooltipOverlay=new EX({element:this.tooltipElement,offset:[0,-10],positioning:"bottom-center"}),this.map.addOverlay(this.tooltipOverlay)}handleMoveEvent(t){const e=[];this.map.forEachFeatureAtPixel(t.pixel,t=>(e.push(t),!1),{hitTolerance:3,layerFilter:t=>t===this.layer});const i=e.filter(t=>!this.previousHoveredFeatures.includes(t)),n=this.previousHoveredFeatures.filter(t=>!e.includes(t));if(i.filter(t=>!t.getStyle()).forEach(t=>{t.setStyle(r3)}),n.filter(t=>t.getStyle()===r3).forEach(t=>{t.setStyle(null)}),i.length>0||n.length>0){const t=e.map(t=>Object.entries(t.getProperties()).filter(([t,e])=>"geometry"!==t).map(([t,e])=>`${t} : ${e}`).join("<br>")||"<em>G\xe9om\xe9trie import\xe9e</em>");this.tooltipElement.innerHTML=t.join('<hr class="feature-import-layer__separator">'),this.previousHoveredFeatures=e}e.length>0?(this.tooltipOverlay.setPosition(t.coordinate),this.tooltipElement.classList.remove("feature-import-layer__tooltip--hidden")):this.tooltipElement.classList.add("feature-import-layer__tooltip--hidden")}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(bI),r.Pb(Q2),r.Pb(pI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-feature-import-layer"]],inputs:{map:"map"},features:[r.Ab],decls:1,vars:1,consts:[["class","feature-import-layer__dropzone",4,"ngIf"],[1,"feature-import-layer__dropzone"]],template:function(t,e){1&t&&r.Ic(0,X2,6,1,"div",0),2&t&&r.nc("ngIf",e.dragging)},directives:[ut,Yp],styles:['.feature-import-layer__dropzone{position:absolute;top:0;left:0;bottom:0;right:0;z-index:20;display:flex;background-color:rgba(96,216,216,.5019607843137255);justify-content:center;align-items:center;border:4px dashed #20a4a4;font-size:2em;pointer-events:none;touch-action:none;-webkit-animation:fontZoom 1s ease infinite alternate;animation:fontZoom 1s ease infinite alternate}.feature-import-layer__dropzone .mat-icon{font-size:2em;height:1em;width:1em}.feature-import-layer__tooltip{position:relative;background:rgba(0,0,0,.7);border-radius:4px;color:#fff;padding:4px 8px;opacity:.8;white-space:nowrap;font-size:12px;pointer-events:none;touch-action:none}.feature-import-layer__tooltip:before{border-top:6px solid rgba(0,0,0,.7);border-right:6px solid transparent;border-left:6px solid transparent;content:"";position:absolute;bottom:-6px;margin-left:-7px;left:50%}.feature-import-layer__tooltip--hidden{display:none}.feature-import-layer__separator{background-color:#fff}@-webkit-keyframes fontZoom{0%{transform:scale(1)}to{transform:scale(1.2)}}@keyframes fontZoom{0%{transform:scale(1)}to{transform:scale(1.2)}}'],encapsulation:2,data:{animation:[$r("fadeAnimation",[Qr(":enter",[Zr({opacity:0}),Gr(500,Zr({opacity:1}))]),Qr(":leave",[Gr(500,Zr({opacity:0}))])])]}}),t})(),a3=(()=>{class t{constructor(t,e,i,n,r){this.aircraftsService=t,this.mapConfigService=e,this.mapService=i,this.mapStateService=n,this.shipsService=r,this.tooltips$=new Av.a([]),this.aircraftsExcludeList=[],this.shipsExcludeList=[],this.movedAircraftsTooltipsByICAO={},this.movedShipsTooltipsByMMSI={},this.refresh$=new Av.a(null),this.mapConfigService.showPermanentTooltips$.subscribe(t=>{t||(this.aircraftsExcludeList=[],this.shipsExcludeList=[],this.movedAircraftsTooltipsByICAO={},this.movedShipsTooltipsByMMSI={}),this.triggerRefresh()}),Hg([this.mapStateService.showAircraftsLayer$,this.aircraftsService.aircraftsInView$.pipe(mn((t,e)=>t.length===e.length&&t.every((t,i)=>e[i].icao===t.icao&&e[i].timestamp===t.timestamp))),this.mapStateService.showShipsLayer$,this.shipsService.shipsInView$.pipe(mn((t,e)=>t.length===e.length&&t.every((t,i)=>e[i].mmsi===t.mmsi&&e[i].timestamp===t.timestamp))),this.refresh$]).subscribe(([t,e,i,n])=>{const r=t?e.filter(t=>!this.aircraftsExcludeList.includes(t.icao)):[],s=i?n.filter(t=>!this.shipsExcludeList.includes(t.mmsi)):[],o=[].concat(r,s);this.tooltips$.next(o.map(t=>{let e;return e=t.kind===OP.Aircraft?this.movedAircraftsTooltipsByICAO[t.icao]:this.movedShipsTooltipsByMMSI[t.mmsi],e&&(e.entity=t),e||{lon:t.lon,lat:t.lat,positioning:"bottom-left",offset:[12,-12],entity:t}}))})}triggerRefresh(){this.refresh$.next(null)}excludeAircraft(t){this.aircraftsExcludeList.push(t),this.triggerRefresh()}excludeShip(t){this.shipsExcludeList.push(t),this.triggerRefresh()}startEntityTooltipMovement(t,e=[0,0]){var i;const n=this.tooltips$.value.findIndex(e=>e===t);if(-1===n)throw new Error("Impossible de d\xe9placer l'entit\xe9 (inconnue)");t.entity.kind===OP.Aircraft?this.movedAircraftsTooltipsByICAO[t.entity.icao]=t:this.movedShipsTooltipsByMMSI[t.entity.mmsi]=t,this.tooltips$.value[n].positioning="center-center",this.tooltips$.value[n].offset=[0,0],null===(i=this.pointerEventsSubscription)||void 0===i||i.unsubscribe(),this.pointerEventsSubscription=this.mapService.pointerMove$.subscribe(i=>{const r=i.map.getCoordinateFromPixel([i.pixel[0]+e[0],i.pixel[1]+e[1]]);if(!r)return;const s=aT([[t.entity.lon,t.entity.lat],oE(r)]);this.tooltips$.value[n].lon=s[1][0],this.tooltips$.value[n].lat=s[1][1],this.tooltips$.next(this.tooltips$.value)})}endEntityTooltipMovement(){this.pointerEventsSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(fX),r.Zb(hI),r.Zb(pI),r.Zb(gT),r.Zb(wT))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function l3(t,e){if(1&t&&(r.Vb(0,"span"),r.Kc(1),r.hc(2,"date"),r.Ub()),2&t){const t=r.gc(2);r.Db(1),r.Lc(r.kc(2,1,t.aircraft.timestamp,"yyyy-MM-dd HH:mm:ss z",t.mapConfigService.useUTCDates$.value&&"z"))}}function c3(t,e){if(1&t&&(r.Vb(0,"span",22),r.hc(1,"date"),r.Kc(2),r.hc(3,"timeago"),r.Ub()),2&t){const t=r.gc(2);r.oc("title",r.kc(1,2,t.aircraft.timestamp,"yyyy-MM-dd HH:mm:ss z",t.mapConfigService.useUTCDates$.value&&"z")),r.Db(2),r.Lc(r.ic(3,6,t.aircraft.timestamp))}}function h3(t,e){if(1&t&&(r.Vb(0,"div",8),r.Vb(1,"div",9),r.Vb(2,"div",10),r.Kc(3),r.Ub(),r.Qb(4,"mat-divider",11),r.Vb(5,"div",12),r.Kc(6),r.Ub(),r.Qb(7,"mat-divider",11),r.Vb(8,"div",13),r.Kc(9),r.Ub(),r.Ub(),r.Qb(10,"mat-divider"),r.Vb(11,"div",9),r.Vb(12,"div",14),r.Kc(13),r.Ub(),r.Qb(14,"mat-divider",11),r.Vb(15,"div",15),r.Kc(16),r.Ub(),r.Ub(),r.Qb(17,"mat-divider"),r.Vb(18,"div",9),r.Vb(19,"div",16),r.Kc(20),r.Ub(),r.Qb(21,"mat-divider",11),r.Vb(22,"div",17),r.Kc(23),r.Ub(),r.Ub(),r.Qb(24,"mat-divider"),r.Vb(25,"div",18),r.Vb(26,"mat-icon",19),r.Kc(27,"access_time"),r.Ub(),r.Ic(28,l3,3,5,"span",20),r.Ic(29,c3,4,8,"ng-template",null,21,r.Jc),r.Ub(),r.Ub()),2&t){const t=r.wc(30),e=r.gc();r.Db(3),r.Lc(e.aircraft.icao),r.Db(1),r.nc("vertical",!0),r.Db(2),r.Lc(e.aircraft.callsign||"?"),r.Db(1),r.nc("vertical",!0),r.Db(2),r.Lc(e.aircraft.registration||"?"),r.Db(4),r.Lc(e.aircraft.squawk||"?"),r.Db(1),r.nc("vertical",!0),r.Db(2),r.Lc(e.aircraft.altitude?e.aircraft.altitude+" ft":"?"),r.Db(4),r.Nc(" ",e.aircraft.fromIcao||"?"," \u2192 ",e.aircraft.toIcao||"?"," "),r.Db(1),r.nc("vertical",!0),r.Db(2),r.Lc(e.aircraft.speed?e.aircraft.speed+" kt":"?"),r.Db(5),r.nc("ngIf",e.historyModeActive)("ngIfElse",t)}}let u3=(()=>{class t extends LT{constructor(t){super(),this.mapConfigService=t,this.mini=!1,this.remove=new r.o,this.drag=new r.o}ngOnInit(){this.ensureMandatoryInputParams("aircraft","historyModeActive")}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-permanent-aircraft-tooltip"]],inputs:{aircraft:"aircraft",historyModeActive:"historyModeActive",mini:"mini"},outputs:{remove:"remove",drag:"drag"},features:[r.Ab],decls:13,vars:8,consts:[[1,"permanent-tooltip"],[1,"permanent-tooltip__header"],[1,"permanent-tooltip__flag",3,"flag"],[1,"permanent-tooltip__name"],["class","permanent-tooltip__content",4,"ngIf"],[1,"permanent-tooltip__overlay"],["mat-button","","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",1,"u-flex","small-mat-button",2,"cursor","move",3,"pointerdown"],["mat-button","","title","Fermer l'\xe9tiquette",1,"u-flex","small-mat-button",3,"click"],[1,"permanent-tooltip__content"],[1,"permanent-tooltip__row"],["title","ICAO"],[3,"vertical"],["title","Callsign"],["title","Registration"],["title","Squawk"],["title","Altitude"],["title","Destination"],["title","Vitesse"],[1,"permanent-tooltip__contact-row"],["title","R\xe9ception"],[4,"ngIf","ngIfElse"],["liveDisplay",""],[3,"title"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Qb(2,"app-flag",2),r.Vb(3,"strong",3),r.Kc(4),r.Ub(),r.Ub(),r.Ic(5,h3,31,14,"div",4),r.Vb(6,"div",5),r.Vb(7,"button",6),r.cc("pointerdown",function(t){return e.drag.emit(t)}),r.Vb(8,"mat-icon"),r.Kc(9,"control_camera"),r.Ub(),r.Ub(),r.Vb(10,"button",7),r.cc("click",function(){return e.remove.emit()}),r.Vb(11,"mat-icon"),r.Kc(12,"close"),r.Ub(),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(2),r.nc("flag",e.aircraft.country.flag),r.Db(2),r.Nc("",e.aircraft.callsign||"?"," / ",e.aircraft.icao,""),r.Db(1),r.nc("ngIf",!e.mini),r.Db(2),r.Hb("small-mat-button--line",e.mini),r.Db(3),r.Hb("small-mat-button--line",e.mini))},directives:[GF,ut,Dl,Yp,GT],pipes:[kt,Tx],styles:[".permanent-tooltip[_ngcontent-%COMP%]{width:-webkit-max-content;width:-moz-max-content;width:max-content;background-color:#e7ecf0;font-size:.7em;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2);border:1px solid #ccc;display:grid}.permanent-tooltip__overlay[_ngcontent-%COMP%]{visibility:hidden;position:absolute;display:flex;height:100%;width:100%}.permanent-tooltip[_ngcontent-%COMP%]:hover .permanent-tooltip__content[_ngcontent-%COMP%], .permanent-tooltip[_ngcontent-%COMP%]:hover .permanent-tooltip__header[_ngcontent-%COMP%]{opacity:.1}.permanent-tooltip[_ngcontent-%COMP%]:hover .permanent-tooltip__overlay[_ngcontent-%COMP%]{visibility:visible}.permanent-tooltip__header[_ngcontent-%COMP%]{background-color:#cdd1d4;padding:.2em}.permanent-tooltip__flag[_ngcontent-%COMP%]{font-size:1.2em}.permanent-tooltip__name[_ngcontent-%COMP%]{margin-left:.3em}.permanent-tooltip__content[_ngcontent-%COMP%]{padding:.1em .1em 0;font-size:.9em;font-weight:300}.permanent-tooltip__row[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly}.permanent-tooltip__contact-row[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:.9em}.permanent-tooltip__contact-row[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%]{font-size:1em;height:1em;width:1.2em}"],changeDetection:0}),t})();function d3(t,e){if(1&t&&(r.Vb(0,"div",20),r.Kc(1),r.Ub(),r.Qb(2,"mat-divider",11)),2&t){const t=r.gc(2);r.Db(1),r.Lc(t.ship.destination||"?"),r.Db(1),r.nc("vertical",!0)}}function p3(t,e){if(1&t&&(r.Qb(0,"mat-divider"),r.Vb(1,"div",9),r.Vb(2,"div",21),r.Kc(3),r.Ub(),r.Qb(4,"mat-divider",11),r.Qb(5,"div",22),r.Ub()),2&t){const t=r.gc(2);r.Db(3),r.Lc(t.ship.departure||"?"),r.Db(1),r.nc("vertical",!0)}}function f3(t,e){if(1&t&&(r.Vb(0,"span"),r.Kc(1),r.hc(2,"date"),r.Ub()),2&t){const t=r.gc(2);r.Db(1),r.Lc(r.kc(2,1,1e3*t.ship.timestamp,"yyyy-MM-dd HH:mm:ss z",t.mapConfigService.useUTCDates$.value&&"z"))}}function m3(t,e){if(1&t&&(r.Vb(0,"span",23),r.hc(1,"date"),r.Kc(2),r.hc(3,"timeago"),r.Ub()),2&t){const t=r.gc(2);r.oc("title",r.kc(1,2,1e3*t.ship.timestamp,"yyyy-MM-dd HH:mm:ss z",t.mapConfigService.useUTCDates$.value&&"z")),r.Db(2),r.Lc(r.ic(3,6,1e3*t.ship.timestamp))}}function g3(t,e){if(1&t&&(r.Vb(0,"div",8),r.Vb(1,"div",9),r.Vb(2,"div",10),r.Kc(3),r.Ub(),r.Qb(4,"mat-divider",11),r.Vb(5,"div",12),r.Kc(6),r.Ub(),r.Qb(7,"mat-divider",11),r.Vb(8,"div",13),r.Kc(9),r.Ub(),r.Ub(),r.Qb(10,"mat-divider"),r.Vb(11,"div",9),r.Ic(12,d3,3,2,"ng-template",14),r.Vb(13,"div",15),r.Kc(14),r.Ub(),r.Ub(),r.Ic(15,p3,6,2,"ng-template",14),r.Qb(16,"mat-divider"),r.Vb(17,"div",16),r.Vb(18,"mat-icon",17),r.Kc(19,"access_time"),r.Ub(),r.Ic(20,f3,3,5,"span",18),r.Ic(21,m3,4,8,"ng-template",null,19,r.Jc),r.Ub(),r.Ub()),2&t){const t=r.wc(22),e=r.gc();r.Db(3),r.Lc(e.ship.mmsi),r.Db(1),r.nc("vertical",!0),r.Db(2),r.Lc(e.ship.imo||"?"),r.Db(1),r.nc("vertical",!0),r.Db(2),r.Lc(e.ship.callsign||"?"),r.Db(3),r.nc("ngIf",!e.historyModeActive),r.Db(2),r.Lc(e.ship.sog?e.ship.sog+" kt":"?"),r.Db(1),r.nc("ngIf",!e.historyModeActive),r.Db(5),r.nc("ngIf",e.historyModeActive)("ngIfElse",t)}}let A3=(()=>{class t extends LT{constructor(t){super(),this.mapConfigService=t,this.mini=!1,this.remove=new r.o,this.drag=new r.o,this.vesselTypeLabelsByType=ED}ngOnInit(){this.ensureMandatoryInputParams("ship","historyModeActive")}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-permanent-ship-tooltip"]],inputs:{ship:"ship",historyModeActive:"historyModeActive",mini:"mini"},outputs:{remove:"remove",drag:"drag"},features:[r.Ab],decls:13,vars:8,consts:[[1,"permanent-tooltip"],[1,"permanent-tooltip__header"],[1,"permanent-tooltip__flag",3,"flag"],[1,"permanent-tooltip__name"],["class","permanent-tooltip__content",4,"ngIf"],[1,"permanent-tooltip__overlay"],["mat-button","","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",1,"u-flex","small-mat-button",2,"cursor","move",3,"pointerdown"],["mat-button","","title","Fermer l'\xe9tiquette",1,"u-flex","small-mat-button",3,"click"],[1,"permanent-tooltip__content"],[1,"permanent-tooltip__row"],["title","MMSI"],[3,"vertical"],["title","IMO"],["title","Callsign"],[3,"ngIf"],["title","Vitesse"],[1,"permanent-tooltip__contact-row"],["title","R\xe9ception"],[4,"ngIf","ngIfElse"],["liveDisplay",""],["title","Destination"],["title","Provenance"],[2,"flex",".7"],[3,"title"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Qb(2,"app-flag",2),r.Vb(3,"strong",3),r.Kc(4),r.Ub(),r.Ub(),r.Ic(5,g3,23,10,"div",4),r.Vb(6,"div",5),r.Vb(7,"button",6),r.cc("pointerdown",function(t){return e.drag.emit(t)}),r.Vb(8,"mat-icon"),r.Kc(9,"control_camera"),r.Ub(),r.Ub(),r.Vb(10,"button",7),r.cc("click",function(){return e.remove.emit()}),r.Vb(11,"mat-icon"),r.Kc(12,"close"),r.Ub(),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(2),r.nc("flag",e.ship.country.flag),r.Db(2),r.Nc("",e.ship.name||"?"," (",e.ship.cargo?e.vesselTypeLabelsByType[e.ship.cargo]:"?",")"),r.Db(1),r.nc("ngIf",!e.mini),r.Db(2),r.Hb("small-mat-button--line",e.mini),r.Db(3),r.Hb("small-mat-button--line",e.mini))},directives:[GF,ut,Dl,Yp,GT],pipes:[kt,Tx],styles:[".permanent-tooltip[_ngcontent-%COMP%]{width:-webkit-max-content;width:-moz-max-content;width:max-content;background-color:#e7ecf0;font-size:.7em;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2);border:1px solid #ccc;display:grid}.permanent-tooltip__overlay[_ngcontent-%COMP%]{visibility:hidden;position:absolute;display:flex;height:100%;width:100%}.permanent-tooltip[_ngcontent-%COMP%]:hover .permanent-tooltip__content[_ngcontent-%COMP%], .permanent-tooltip[_ngcontent-%COMP%]:hover .permanent-tooltip__header[_ngcontent-%COMP%]{opacity:.1}.permanent-tooltip[_ngcontent-%COMP%]:hover .permanent-tooltip__overlay[_ngcontent-%COMP%]{visibility:visible}.permanent-tooltip__header[_ngcontent-%COMP%]{background-color:#cdd1d4;padding:.2em}.permanent-tooltip__flag[_ngcontent-%COMP%]{font-size:1.2em}.permanent-tooltip__name[_ngcontent-%COMP%]{margin-left:.3em}.permanent-tooltip__content[_ngcontent-%COMP%]{padding:.1em .1em 0;font-size:.9em;font-weight:300}.permanent-tooltip__row[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly}.permanent-tooltip__contact-row[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:.9em}.permanent-tooltip__contact-row[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%]{font-size:1em;height:1em;width:1.2em}"],changeDetection:0}),t})();function b3(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-permanent-aircraft-tooltip",6),r.cc("remove",function(){r.Ac(t);const e=r.gc().$implicit;return r.gc(2).permanentTooltipsService.excludeAircraft(e.entity.icao)})("drag",function(e){r.Ac(t);const i=r.gc().$implicit;return r.gc(2).startDragging(i,e)}),r.Ub()}if(2&t){const t=r.gc().$implicit,e=r.gc(2);r.nc("aircraft",t.entity)("mini",e.showMini)("historyModeActive",e.historyModeActive)}}function v3(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-permanent-ship-tooltip",7),r.cc("remove",function(){r.Ac(t);const e=r.gc().$implicit;return r.gc(2).permanentTooltipsService.excludeShip(e.entity.mmsi)})("drag",function(e){r.Ac(t);const i=r.gc().$implicit;return r.gc(2).startDragging(i,e)}),r.Ub()}if(2&t){const t=r.gc().$implicit,e=r.gc(2);r.nc("ship",t.entity)("mini",e.showMini)("historyModeActive",e.historyModeActive)}}function _3(t,e){if(1&t&&(r.Vb(0,"app-map-tooltip",2),r.Tb(1,3),r.Ic(2,b3,1,3,"app-permanent-aircraft-tooltip",4),r.Ic(3,v3,1,3,"app-permanent-ship-tooltip",5),r.Sb(),r.Ub()),2&t){const t=e.$implicit,i=r.gc(2);r.nc("map",i.map)("latitude",t.lat)("longitude",t.lon)("positioning",t.positioning)("offset",t.offset)("stopEvent",!1)("opacity",i.tooltipsOpacity),r.Db(1),r.nc("ngSwitch",t.entity.kind),r.Db(1),r.nc("ngSwitchCase",i.EntityType.Aircraft),r.Db(1),r.nc("ngSwitchCase",i.EntityType.Ship)}}function y3(t,e){if(1&t&&r.Ic(0,_3,4,10,"app-map-tooltip",1),2&t){const t=r.gc();r.nc("ngForOf",t.tooltips)("ngForTrackBy",t.trackByEntityId)}}const w3=new jZ({stroke:new VZ({color:"#666",lineDash:[10,10],width:2})});let x3=(()=>{class t extends LT{constructor(t,e,i,n,r){super(),this.changeDetectorRef=t,this.mapConfigService=e,this.mapStateService=i,this.historyService=n,this.permanentTooltipsService=r,this.showTooltips=!1,this.showMini=!1,this.historyModeActive=!1,this.tooltips=[],this.EntityType=OP,this.tooltipsOpacity=1,this.permanentTooltipsLimit=200}ngOnInit(){this.changeDetectorRef.detach(),this.ensureMandatoryInputParams("map"),this.source=new $q({features:[],useSpatialIndex:!1,wrapX:!1}),this.layer=new Nq({source:this.source,style:w3,zIndex:5}),this.map.addLayer(this.layer),this.subscriptions.push(this.historyService.timestamp$.subscribe(t=>{this.historyModeActive=0!==t,this.changeDetectorRef.detectChanges()}),this.mapConfigService.tooltipsOpacity$.subscribe(t=>{this.tooltipsOpacity=t,this.changeDetectorRef.detectChanges()}),this.mapConfigService.showPermanentTooltips$.subscribe(t=>{this.showTooltips=t,this.changeDetectorRef.detectChanges()}),this.mapConfigService.showMiniPermanentTooltips$.subscribe(t=>{this.showMini=t,this.changeDetectorRef.detectChanges()}),this.permanentTooltipsService.tooltips$.subscribe(t=>{this.tooltips=t;const e=t.filter(t=>t.lon!==t.entity.lon||t.lat!==t.entity.lat).map(t=>new pH(new kH([[t.lon,t.lat],[t.entity.lon,t.entity.lat]].map(t=>sE(t)))));this.source.clear(!0),this.source.addFeatures(e),this.changeDetectorRef.detectChanges()}))}ngOnDestroy(){super.ngOnDestroy(),this.source.clear(!0)}trackByEntityId(t,e){return e.entity.icao||e.entity.mmsi}startDragging(t,e){var i;e.stopPropagation();const n=null===(i=e.target.closest(".permanent-tooltip"))||void 0===i?void 0:i.getBoundingClientRect();if(!n)throw new Error("Impossible de d\xe9placer l'\xe9tiquette (\xe9l\xe9ment parent introuvable)");this.permanentTooltipsService.startEntityTooltipMovement(t,[n.x+n.width/2-e.clientX,n.y+n.height/2-e.clientY]),document.body.addEventListener("pointerup",()=>{this.permanentTooltipsService.endEntityTooltipMovement()},{capture:!0,once:!0})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(hI),r.Pb(gT),r.Pb(bI),r.Pb(a3))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-permanent-tooltips"]],inputs:{map:"map"},features:[r.Ab],decls:1,vars:1,consts:[[3,"ngIf"],[3,"map","latitude","longitude","positioning","offset","stopEvent","opacity",4,"ngFor","ngForOf","ngForTrackBy"],[3,"map","latitude","longitude","positioning","offset","stopEvent","opacity"],[3,"ngSwitch"],[3,"aircraft","mini","historyModeActive","remove","drag",4,"ngSwitchCase"],[3,"ship","mini","historyModeActive","remove","drag",4,"ngSwitchCase"],[3,"aircraft","mini","historyModeActive","remove","drag"],[3,"ship","mini","historyModeActive","remove","drag"]],template:function(t,e){1&t&&r.Ic(0,y3,1,2,"ng-template",0),2&t&&r.nc("ngIf",e.showTooltips&&e.tooltips.length<=e.permanentTooltipsLimit)},directives:[ut,ct,MX,mt,gt,u3,A3],encapsulation:2}),t})(),C3=(()=>{class t extends LT{constructor(t,e,i){super(),this.exportService=t,this.mapStateService=e,this.selectionService=i}ngOnInit(){this.ensureMandatoryInputParams("map"),this.dragBoxInteraction=new bG({condition:nG}),this.map.addInteraction(this.dragBoxInteraction),this.dragBoxInteraction.on("boxend",()=>{const t=this.dragBoxInteraction.getGeometry().getExtent(),e=this.exportService.getEntitiesInExtent(t);CC({category:"app",message:`box-select: ${e.length} entities`}),e.forEach(t=>{this.selectionService.addToSelection(t.kind,t.icao||t.mmsi)})}),this.subscriptions.push(this.mapStateService.featuresSelectable$.subscribe(t=>{this.dragBoxInteraction.setActive(t)}))}ngOnDestroy(){super.ngOnDestroy(),this.map.removeInteraction(this.dragBoxInteraction)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(hX),r.Pb(gT),r.Pb(xT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-box-selection-interaction"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();const S3=new pH;S3.setStyle(new jZ({image:new TZ({radius:8,fill:new RZ({color:"#3399CC"}),stroke:new VZ({color:"#fff",width:3})})}));let k3=(()=>{class t extends LT{constructor(t){super(),this.geolocationLayerService=t,this.animationListenerKey=null}ngOnInit(){this.ensureMandatoryInputParams("map"),this.source=new $q({features:[S3],useSpatialIndex:!1}),this.layer=new Nq({source:this.source,updateWhileAnimating:!0,updateWhileInteracting:!0,zIndex:1}),this.map.addLayer(this.layer),this.subscriptions.push(this.geolocationLayerService.enable$.subscribe(t=>{this.layer.setVisible(t)})),this.subscriptions.push(this.geolocationLayerService.location$.pipe(mn((t,e)=>!t&&!e||t&&e&&t.lat===e.lat&&t.lon===e.lon)).subscribe(t=>{this.updatePosition(t)}))}ngOnDestroy(){super.ngOnDestroy(),this.map.removeLayer(this.layer)}updatePosition(t){if(this.animationListenerKey&&(ME(this.animationListenerKey),this.animationListenerKey=null),t){const e=S3.getGeometry();if(!e)return void S3.setGeometry(new jM(sE([t.lon,t.lat])));const i=e.getCoordinates(),n=sE([t.lon,t.lat]),r=n[0]-i[0],s=n[1]-i[1],o=(new Date).getTime(),a=t=>{const e=t.frameState.time-o,n=e/2e3;if(e>2e3){ME(this.animationListenerKey),this.animationListenerKey=null;const t=[i[0]+r,i[1]+s];return void S3.getGeometry().setCoordinates(t)}const a=[i[0]+r*n,i[1]+s*n];S3.getGeometry().setCoordinates(a)};this.layer.changed(),this.animationListenerKey=this.layer.on("prerender",t=>{a(t)})}else S3.setGeometry(null)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(n$))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-geolocation-layer"]],inputs:{map:"map"},features:[r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})(),E3=(()=>{class t{constructor(t,e){this.mapService=t,this.tooltipsService=e}startEntityTooltipMovement(t,e=[0,0]){var i;const n=this.tooltipsService.pinnedEntitiesTooltips$.value.findIndex(e=>e===t);if(-1===n)throw new Error("Impossible de d\xe9placer l'entit\xe9 (inconnue)");null===(i=this.pointerEventsSubscription)||void 0===i||i.unsubscribe(),this.pointerEventsSubscription=this.mapService.pointerMove$.subscribe(i=>{const r=i.map.getCoordinateFromPixel([i.pixel[0]+e[0],i.pixel[1]+e[1]]);if(!r)return;const s=aT([[t.entity.lon,t.entity.lat],oE(r)]);this.tooltipsService.pinnedEntitiesTooltips$.value[n].lon=s[1][0],this.tooltipsService.pinnedEntitiesTooltips$.value[n].lat=s[1][1],this.tooltipsService.pinnedEntitiesTooltips$.next(this.tooltipsService.pinnedEntitiesTooltips$.value)})}endEntityTooltipMovement(){this.pointerEventsSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(pI),r.Zb(kT))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function D3(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",14),r.cc("pointerdown",function(e){return r.Ac(t),r.gc().drag.emit(e)}),r.Vb(1,"mat-icon"),r.Kc(2,"control_camera"),r.Ub(),r.Ub()}}function I3(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",15),r.cc("click",function(){return r.Ac(t),r.gc().close.emit(null)}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function P3(t,e){if(1&t&&(r.Vb(0,"span"),r.Kc(1),r.hc(2,"date"),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Lc(r.kc(2,1,t.aircraft.timestamp,"yyyy-MM-dd HH:mm:ss z",t.mapConfigService.useUTCDates$.value&&"z"))}}function O3(t,e){if(1&t&&(r.Vb(0,"span",16),r.hc(1,"date"),r.Kc(2),r.hc(3,"timeago"),r.Ub()),2&t){const t=r.gc();r.oc("title",r.kc(1,2,t.aircraft.timestamp,"yyyy-MM-dd HH:mm:ss z",t.mapConfigService.useUTCDates$.value&&"z")),r.Db(2),r.Lc(r.ic(3,6,t.aircraft.timestamp))}}let M3=(()=>{class t extends LT{constructor(t,e){super(),this.historyService=t,this.mapConfigService=e,this.pinned=!1,this.close=new r.o,this.drag=new r.o}ngOnInit(){this.ensureMandatoryInputParams("aircraft")}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(bI),r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-aircraft-tooltip"]],inputs:{pinned:"pinned",aircraft:"aircraft"},outputs:{close:"close",drag:"drag"},features:[r.Ab],decls:19,vars:12,consts:[[1,"ship-tooltip"],[1,"ship-tooltip__header"],[1,"ship-tooltip__flag",3,"flag"],[1,"ship-tooltip__title","ml-2"],[1,"ship-tooltip__name"],[1,"ship-tooltip__type"],["mat-button","","class","small-mat-button ship-tooltip__move-icon","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",3,"pointerdown",4,"ngIf"],["mat-button","","class","small-mat-button","title","Fermer l'infobulle",3,"click",4,"ngIf"],[1,"ship-details-panel__infos",3,"aircraft","extensive"],[1,"ship-tooltip__footer"],[1,"ship-tooltip__signal-label"],[1,"u-flex"],[4,"ngIf","ngIfElse"],["liveDisplay",""],["mat-button","","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",1,"small-mat-button","ship-tooltip__move-icon",3,"pointerdown"],["mat-button","","title","Fermer l'infobulle",1,"small-mat-button",3,"click"],[3,"title"]],template:function(t,e){if(1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Qb(2,"app-flag",2),r.Vb(3,"div",3),r.Vb(4,"strong",4),r.Kc(5),r.Ub(),r.Vb(6,"small",5),r.Kc(7),r.Ub(),r.Ub(),r.Ic(8,D3,3,0,"button",6),r.Ic(9,I3,3,0,"button",7),r.Ub(),r.Qb(10,"app-aircraft-infos",8),r.Vb(11,"div",9),r.Vb(12,"span",10),r.Kc(13,"R\xe9ception :\xa0"),r.Ub(),r.Vb(14,"strong",11),r.Ic(15,P3,3,5,"span",12),r.hc(16,"async"),r.Ic(17,O3,4,8,"ng-template",null,13,r.Jc),r.Ub(),r.Ub(),r.Ub()),2&t){const t=r.wc(18);r.Db(2),r.nc("flag",e.aircraft.country.flag),r.Db(3),r.Nc("",e.aircraft.callsign||"?"," / ",e.aircraft.icao,""),r.Db(2),r.Mc("Type code: ",e.aircraft.icaoTypeCode||"?",""),r.Db(1),r.nc("ngIf",e.pinned),r.Db(1),r.nc("ngIf",e.pinned),r.Db(1),r.nc("aircraft",e.aircraft)("extensive",!0),r.Db(5),r.nc("ngIf",r.ic(16,10,e.historyService.timestamp$))("ngIfElse",t)}},directives:[GF,ut,XF,Dl,Yp],pipes:[St,kt,Tx],styles:['.ship-tooltip[_ngcontent-%COMP%]{min-width:320px;background-color:#e7ecf0;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2);border-radius:2px}.ship-tooltip[_ngcontent-%COMP%]:after{content:" ";position:absolute;border:12px solid transparent;pointer-events:none}.ship-tooltip__header[_ngcontent-%COMP%]{background-color:#cdd1d4;display:flex}.ship-tooltip__move-icon[_ngcontent-%COMP%]{cursor:move}.ship-tooltip__link[_ngcontent-%COMP%]{flex:1;padding:0;line-height:inherit;text-align:inherit;font-size:inherit;font-weight:inherit}.ship-tooltip__link[_ngcontent-%COMP%] .mat-button-wrapper{display:flex}.ship-tooltip__flag[_ngcontent-%COMP%]{margin:5px}.ship-tooltip__title[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:5px 0;flex:1}.ship-tooltip__name[_ngcontent-%COMP%]{font-size:1.2em}.ship-tooltip__type[_ngcontent-%COMP%]{font-size:.9em;color:#555}.ship-tooltip__row[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;font-size:.9em}.ship-tooltip__info-cell[_ngcontent-%COMP%]{padding:.4em;text-align:center}.ship-tooltip__info-label[_ngcontent-%COMP%]{color:grey;font-weight:500;padding-bottom:.2em}.ship-tooltip__course-icon[_ngcontent-%COMP%]{line-height:.7em;height:.7em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ship-tooltip__footer[_ngcontent-%COMP%]{background-color:#cdd1d4;padding-left:.4em;display:flex;align-items:center;font-size:.85em;line-height:36px}.ship-tooltip__signal-label[_ngcontent-%COMP%]{font-weight:500;color:#595959} .overlay-positioning-center-right .ship-tooltip:after{top:50%;left:100%;margin-top:-12px;border-left-color:#cdd1d4} .overlay-positioning-center-left .ship-tooltip:after{top:50%;right:100%;margin-top:-12px;border-right-color:#cdd1d4} .overlay-positioning-bottom-center .ship-tooltip:after{top:100%;left:50%;margin-left:-12px;border-top-color:#cdd1d4} .overlay-positioning-top-center .ship-tooltip:after{bottom:100%;left:50%;margin-left:-12px;border-bottom-color:#cdd1d4}'],changeDetection:0}),t})();function T3(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",9),r.cc("pointerdown",function(e){return r.Ac(t),r.gc().drag.emit(e)}),r.Vb(1,"mat-icon"),r.Kc(2,"control_camera"),r.Ub(),r.Ub()}}function R3(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",10),r.cc("click",function(){return r.Ac(t),r.gc().close.emit(null)}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}let V3=(()=>{class t extends LT{constructor(t){super(),this.mapConfigService=t,this.pinned=!1,this.close=new r.o,this.drag=new r.o}ngOnInit(){this.ensureMandatoryInputParams("alert")}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-alert-tooltip"]],inputs:{pinned:"pinned",alert:"alert"},outputs:{close:"close",drag:"drag"},features:[r.Ab],decls:16,vars:8,consts:[[1,"ship-tooltip"],[1,"ship-tooltip__header"],[1,"d-flex-center","u-flex","pa-2"],["title","Alerte",1,"mr-2"],["mat-button","","class","small-mat-button ship-tooltip__move-icon","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",3,"pointerdown",4,"ngIf"],["mat-button","","class","small-mat-button","title","Fermer l'infobulle",3,"click",4,"ngIf"],[1,"ship-tooltip__footer"],[1,"ship-tooltip__signal-label"],[1,"u-flex"],["mat-button","","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",1,"small-mat-button","ship-tooltip__move-icon",3,"pointerdown"],["mat-button","","title","Fermer l'infobulle",1,"small-mat-button",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"div",2),r.Vb(3,"mat-icon",3),r.Kc(4,"warning"),r.Ub(),r.Vb(5,"strong"),r.Kc(6),r.Ub(),r.Ub(),r.Ic(7,T3,3,0,"button",4),r.Ic(8,R3,3,0,"button",5),r.Ub(),r.Qb(9,"mat-divider"),r.Vb(10,"div",6),r.Vb(11,"span",7),r.Kc(12,"R\xe9ception :\xa0"),r.Ub(),r.Vb(13,"strong",8),r.Kc(14),r.hc(15,"date"),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(6),r.Lc(e.alert.rule_name||e.alert.ship_name||"MMSI: "+e.alert.mmsi),r.Db(1),r.nc("ngIf",e.pinned),r.Db(1),r.nc("ngIf",e.pinned),r.Db(6),r.Lc(r.kc(15,4,1e3*e.alert.start,"yyyy-MM-dd HH:mm:ss z",e.mapConfigService.useUTCDates$.value&&"z")))},directives:[Yp,ut,GT,Dl],pipes:[kt],styles:["",'.ship-tooltip[_ngcontent-%COMP%]{min-width:320px;background-color:#e7ecf0;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2);border-radius:2px}.ship-tooltip[_ngcontent-%COMP%]:after{content:" ";position:absolute;border:12px solid transparent;pointer-events:none}.ship-tooltip__header[_ngcontent-%COMP%]{background-color:#cdd1d4;display:flex}.ship-tooltip__move-icon[_ngcontent-%COMP%]{cursor:move}.ship-tooltip__link[_ngcontent-%COMP%]{flex:1;padding:0;line-height:inherit;text-align:inherit;font-size:inherit;font-weight:inherit}.ship-tooltip__link[_ngcontent-%COMP%] .mat-button-wrapper{display:flex}.ship-tooltip__flag[_ngcontent-%COMP%]{margin:5px}.ship-tooltip__title[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:5px 0;flex:1}.ship-tooltip__name[_ngcontent-%COMP%]{font-size:1.2em}.ship-tooltip__type[_ngcontent-%COMP%]{font-size:.9em;color:#555}.ship-tooltip__row[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;font-size:.9em}.ship-tooltip__info-cell[_ngcontent-%COMP%]{padding:.4em;text-align:center}.ship-tooltip__info-label[_ngcontent-%COMP%]{color:grey;font-weight:500;padding-bottom:.2em}.ship-tooltip__course-icon[_ngcontent-%COMP%]{line-height:.7em;height:.7em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ship-tooltip__footer[_ngcontent-%COMP%]{background-color:#cdd1d4;padding-left:.4em;display:flex;align-items:center;font-size:.85em;line-height:36px}.ship-tooltip__signal-label[_ngcontent-%COMP%]{font-weight:500;color:#595959} .overlay-positioning-center-right .ship-tooltip:after{top:50%;left:100%;margin-top:-12px;border-left-color:#cdd1d4} .overlay-positioning-center-left .ship-tooltip:after{top:50%;right:100%;margin-top:-12px;border-right-color:#cdd1d4} .overlay-positioning-bottom-center .ship-tooltip:after{top:100%;left:50%;margin-left:-12px;border-top-color:#cdd1d4} .overlay-positioning-top-center .ship-tooltip:after{bottom:100%;left:50%;margin-left:-12px;border-bottom-color:#cdd1d4}'],changeDetection:0}),t})();function F3(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",11),r.cc("pointerdown",function(e){return r.Ac(t),r.gc().drag.emit(e)}),r.Vb(1,"mat-icon"),r.Kc(2,"control_camera"),r.Ub(),r.Ub()}}function L3(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",12),r.cc("click",function(){return r.Ac(t),r.gc().close.emit(null)}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function U3(t,e){if(1&t&&(r.Qb(0,"mat-divider"),r.Vb(1,"div",13),r.Kc(2),r.Ub()),2&t){const t=r.gc();r.Db(2),r.Mc(" ",t.annotation.description," ")}}function B3(t,e){if(1&t&&(r.Vb(0,"div",14),r.Vb(1,"div",15),r.Kc(2,"Position :\xa0"),r.Ub(),r.Vb(3,"strong"),r.Kc(4),r.Ub(),r.Ub()),2&t){const t=r.gc();r.Db(4),r.Lc(t.annotation.hdms)}}let N3=(()=>{class t extends LT{constructor(t){super(),this.mapConfigService=t,this.pinned=!1,this.close=new r.o,this.drag=new r.o}ngOnInit(){this.ensureMandatoryInputParams("annotation")}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-annotation-tooltip"]],inputs:{pinned:"pinned",annotation:"annotation"},outputs:{close:"close",drag:"drag"},features:[r.Ab],decls:20,vars:15,consts:[[1,"ship-tooltip","annotation"],[1,"ship-tooltip__header"],[1,"d-flex-center","u-flex","pa-2"],["title","Annotation",1,"mr-2"],["mat-button","","class","small-mat-button ship-tooltip__move-icon","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",3,"pointerdown",4,"ngIf"],["mat-button","","class","small-mat-button","title","Fermer l'infobulle",3,"click",4,"ngIf"],[3,"ngIf"],["class","annotation__row",4,"ngIf"],[1,"ship-tooltip__footer",3,"title"],[1,"ship-tooltip__signal-label"],[1,"u-flex"],["mat-button","","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",1,"small-mat-button","ship-tooltip__move-icon",3,"pointerdown"],["mat-button","","title","Fermer l'infobulle",1,"small-mat-button",3,"click"],["title","Description",1,"annotation__description"],[1,"annotation__row"],[1,"annotation__property-label"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"div",2),r.Vb(3,"mat-icon",3),r.Kc(4,"loyalty"),r.Ub(),r.Vb(5,"strong"),r.Kc(6),r.Ub(),r.Ub(),r.Ic(7,F3,3,0,"button",4),r.Ic(8,L3,3,0,"button",5),r.Ub(),r.Ic(9,U3,3,1,"ng-template",6),r.Qb(10,"mat-divider"),r.Ic(11,B3,5,1,"div",7),r.Qb(12,"mat-divider"),r.Vb(13,"div",8),r.hc(14,"date"),r.Vb(15,"span",9),r.Kc(16,"Mise \xe0 jour :\xa0"),r.Ub(),r.Vb(17,"strong",10),r.Kc(18),r.hc(19,"date"),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(6),r.Lc(e.annotation.name),r.Db(1),r.nc("ngIf",e.pinned),r.Db(1),r.nc("ngIf",e.pinned),r.Db(1),r.nc("ngIf",e.annotation.description),r.Db(2),r.nc("ngIf","Point"===e.annotation.geom.type),r.Db(2),r.pc("title","Cr\xe9\xe9 le ",r.kc(14,7,e.annotation.created_at,"yyyy-MM-dd HH:mm:ss z",e.mapConfigService.useUTCDates$.value&&"z"),""),r.Db(5),r.Lc(r.kc(19,11,e.annotation.updated_at,"yyyy-MM-dd HH:mm:ss z",e.mapConfigService.useUTCDates$.value&&"z")))},directives:[Yp,ut,GT,Dl],pipes:[kt],styles:[".annotation[_ngcontent-%COMP%]{max-width:400px}.annotation__description[_ngcontent-%COMP%]{font-size:.8em;padding:8px;white-space:pre-line}.annotation__row[_ngcontent-%COMP%]{display:flex;margin:4px 8px;font-size:.8em}.annotation__property-label[_ngcontent-%COMP%]{color:grey;font-weight:500}",'.ship-tooltip[_ngcontent-%COMP%]{min-width:320px;background-color:#e7ecf0;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2);border-radius:2px}.ship-tooltip[_ngcontent-%COMP%]:after{content:" ";position:absolute;border:12px solid transparent;pointer-events:none}.ship-tooltip__header[_ngcontent-%COMP%]{background-color:#cdd1d4;display:flex}.ship-tooltip__move-icon[_ngcontent-%COMP%]{cursor:move}.ship-tooltip__link[_ngcontent-%COMP%]{flex:1;padding:0;line-height:inherit;text-align:inherit;font-size:inherit;font-weight:inherit}.ship-tooltip__link[_ngcontent-%COMP%] .mat-button-wrapper{display:flex}.ship-tooltip__flag[_ngcontent-%COMP%]{margin:5px}.ship-tooltip__title[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:5px 0;flex:1}.ship-tooltip__name[_ngcontent-%COMP%]{font-size:1.2em}.ship-tooltip__type[_ngcontent-%COMP%]{font-size:.9em;color:#555}.ship-tooltip__row[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;font-size:.9em}.ship-tooltip__info-cell[_ngcontent-%COMP%]{padding:.4em;text-align:center}.ship-tooltip__info-label[_ngcontent-%COMP%]{color:grey;font-weight:500;padding-bottom:.2em}.ship-tooltip__course-icon[_ngcontent-%COMP%]{line-height:.7em;height:.7em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ship-tooltip__footer[_ngcontent-%COMP%]{background-color:#cdd1d4;padding-left:.4em;display:flex;align-items:center;font-size:.85em;line-height:36px}.ship-tooltip__signal-label[_ngcontent-%COMP%]{font-weight:500;color:#595959} .overlay-positioning-center-right .ship-tooltip:after{top:50%;left:100%;margin-top:-12px;border-left-color:#cdd1d4} .overlay-positioning-center-left .ship-tooltip:after{top:50%;right:100%;margin-top:-12px;border-right-color:#cdd1d4} .overlay-positioning-bottom-center .ship-tooltip:after{top:100%;left:50%;margin-left:-12px;border-top-color:#cdd1d4} .overlay-positioning-top-center .ship-tooltip:after{bottom:100%;left:50%;margin-left:-12px;border-bottom-color:#cdd1d4}'],changeDetection:0}),t})();function j3(t,e){var i;t.color=(null===(i=LP[t.type])||void 0===i?void 0:i.color)||"grey",t.additionalInfos=function(t,e){var i;t.color=(null===(i=LP[t.type])||void 0===i?void 0:i.color)||"grey";const n=t.data.old,r=t.data.new;let s="";switch(t.type){case UP.ShipIdChanged:return FD(n.imo)&&(s+=`<div>IMO: ${n.imo} &rarr; ${r.imo}</div>`),FD(n.callsign)&&(s+=`<div>Callsign: ${n.callsign} &rarr; ${r.callsign}</div>`),FD(n.name)&&(s+=`<div>Nom: ${n.name} &rarr; ${r.name}</div>`),FD(n.cargo)&&(s+=`<div>Type: ${ED[n.cargo]} &rarr; ${ED[r.cargo]}</div>`),void 0===n.dimA&&void 0===n.dimB&&void 0===n.dimC&&void 0===n.dimD||(s+=`<div>Dimensions: ${z3(n)} &rarr; ${z3(r)}</div>`),FD(n.draught)&&(s+=`<div>Tirant d'eau: ${n.draught}m &rarr; ${r.draught}m</div>`),s;case UP.InvalidImo:return`<div>IMO usurp\xe9: ${t.data.imo}</div>`;case UP.InvalidCallsign:return`<div>Callsign usurp\xe9: ${t.data.callsign}</div>`;case UP.Spoofing:return`<div>MMSI: ${t.data.mmsi||"?"}<br></div>\n <div>IMO: ${t.data.imo||"?"}<br></div>\n <div>Callsign: ${t.data.callsign||"?"}<br></div>`;case UP.VoyageChanged:if(FD(n.destination)&&(s+=`<div>Destination: ${n.destination} &rarr; ${r.destination}</div>`),FD(r.etaMo)||FD(r.etaDay)||FD(r.etaHr)||FD(r.etaMin))if(FD(r.etaMo)&&FD(r.etaDay)&&FD(r.etaHr)&&FD(r.etaMin)){let t=LD(r.etaMo),e=LD(r.etaDay),i=LD(r.etaHr),o=LD(r.etaMin);FD(n.etaMo)&&(t=`<b>${t}</b>`),FD(n.etaDay)&&(e=`<b>${e}</b>`),FD(n.etaHr)&&(i=`<b>${i}</b>`),FD(n.etaMin)&&(o=`<b>${o}</b>`),s+=`<div>ETA: ${FD(n.etaMo)?LD(n.etaMo):LD(r.etaMo)}-${FD(n.etaDay)?LD(n.etaDay):LD(r.etaDay)} ${FD(n.etaHr)?LD(n.etaHr):LD(r.etaHr)}h${FD(n.etaMin)?LD(n.etaMin):LD(r.etaMin)}m<br>&nbsp;&nbsp;&nbsp;&nbsp;&rarr; ${t}-${e} ${i}h${o}m</div>`}else s+=`<div>ETA: ${FD(n.etaMo)?LD(n.etaMo):"XX"}-${FD(n.etaDay)?LD(n.etaDay):"XX"} ${FD(n.etaHr)?LD(n.etaHr):"XX"}h${FD(n.etaMin)?LD(n.etaMin):"XX"}m<br>&nbsp;&nbsp;&nbsp;&nbsp;&rarr; ${FD(r.etaMo)?LD(r.etaMo):"XX"}-${FD(r.etaDay)?LD(r.etaDay):"XX"} ${FD(r.etaHr)?LD(r.etaHr):"XX"}h${FD(r.etaMin)?LD(r.etaMin):"XX"}m</div>`;return s;case UP.PositionDubious:return`<div>Distance: ${Math.round(t.data.distance)} Nq</div>`;case UP.StatusChanged:return`<div>Statut: ${JH[n]} &rarr; ${JH[r]}</div>`;case UP.MoveZoneEntry:case UP.MoveZoneExit:return e[t.data.zone].name;case UP.MoveErratic:return`R\xe9solution: ${t.data.resolution}`;case UP.MoveMeetingAtSea:return`Autre navire: ${t.data.mmsi}`}return""}(t,e)}function z3(t){const e=`${FD(t.dimA)?t.dimA:"X"}-${FD(t.dimB)?t.dimB:"X"}-${FD(t.dimC)?t.dimC:"X"}-${FD(t.dimD)?t.dimD:"X"}`;return"X-X-X-X"===e?"N\xe9ant":e}function H3(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",13),r.cc("pointerdown",function(e){return r.Ac(t),r.gc().drag.emit(e)}),r.Vb(1,"mat-icon"),r.Kc(2,"control_camera"),r.Ub(),r.Ub()}}function K3(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",14),r.cc("click",function(){return r.Ac(t),r.gc().close.emit(null)}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}let $3=(()=>{class t extends LT{constructor(t,e,i){super(),this.domSanitizer=t,this.mapConfigService=e,this.zonesService=i,this.pinned=!1,this.close=new r.o,this.drag=new r.o,this.eventTypeLabelByKey=FP}ngOnInit(){this.ensureMandatoryInputParams("event"),j3(this.event,this.zonesService.zonesById),this.additionalInfos=this.domSanitizer.bypassSecurityTrustHtml(this.event.additionalInfos)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(ne),r.Pb(hI),r.Pb(kP))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-event-tooltip"]],inputs:{pinned:"pinned",event:"event"},outputs:{close:"close",drag:"drag"},features:[r.Ab],decls:20,vars:11,consts:[[1,"ship-tooltip"],[1,"ship-tooltip__header"],[1,"u-flex","pa-2"],["title","\xc9v\xe9nements",1,"event-icon"],["mat-button","","class","small-mat-button ship-tooltip__move-icon","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",3,"pointerdown",4,"ngIf"],["mat-button","","class","small-mat-button","title","Fermer l'infobulle",3,"click",4,"ngIf"],[1,"ship-tooltip__row"],[1,"ship-tooltip__info-cell"],[1,"ship-tooltip__info-label"],[1,"event-additional-infos",3,"innerHTML"],[1,"ship-tooltip__footer"],[1,"ship-tooltip__signal-label"],[1,"u-flex"],["mat-button","","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",1,"small-mat-button","ship-tooltip__move-icon",3,"pointerdown"],["mat-button","","title","Fermer l'infobulle",1,"small-mat-button",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"div",2),r.Qb(3,"span",3),r.Vb(4,"strong"),r.Kc(5),r.Ub(),r.Ub(),r.Ic(6,H3,3,0,"button",4),r.Ic(7,K3,3,0,"button",5),r.Ub(),r.Vb(8,"div",6),r.Vb(9,"div",7),r.Vb(10,"div",8),r.Kc(11,"Informations"),r.Ub(),r.Qb(12,"div",9),r.Ub(),r.Ub(),r.Qb(13,"mat-divider"),r.Vb(14,"div",10),r.Vb(15,"span",11),r.Kc(16,"R\xe9ception :\xa0"),r.Ub(),r.Vb(17,"strong",12),r.Kc(18),r.hc(19,"date"),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(3),r.Fc("background-color",e.event.color),r.Db(2),r.Lc(e.eventTypeLabelByKey[e.event.type]||"Inconnu"),r.Db(1),r.nc("ngIf",e.pinned),r.Db(1),r.nc("ngIf",e.pinned),r.Db(5),r.nc("innerHTML",e.additionalInfos,r.Bc),r.Db(6),r.Lc(r.kc(19,7,1e3*e.event.timestamp,"yyyy-MM-dd HH:mm:ss z",e.mapConfigService.useUTCDates$.value&&"z")))},directives:[ut,GT,Dl,Yp],pipes:[kt],styles:[".event-icon[_ngcontent-%COMP%]{height:1em;width:1em;border-radius:50%;margin:0 .3em}.event-additional-infos[_ngcontent-%COMP%]{text-align:left;font-size:.9em;line-height:1.5em;font-weight:400;white-space:normal}.event-additional-infos[_ngcontent-%COMP%] b{color:#172db7}",'.ship-tooltip[_ngcontent-%COMP%]{min-width:320px;background-color:#e7ecf0;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2);border-radius:2px}.ship-tooltip[_ngcontent-%COMP%]:after{content:" ";position:absolute;border:12px solid transparent;pointer-events:none}.ship-tooltip__header[_ngcontent-%COMP%]{background-color:#cdd1d4;display:flex}.ship-tooltip__move-icon[_ngcontent-%COMP%]{cursor:move}.ship-tooltip__link[_ngcontent-%COMP%]{flex:1;padding:0;line-height:inherit;text-align:inherit;font-size:inherit;font-weight:inherit}.ship-tooltip__link[_ngcontent-%COMP%] .mat-button-wrapper{display:flex}.ship-tooltip__flag[_ngcontent-%COMP%]{margin:5px}.ship-tooltip__title[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:5px 0;flex:1}.ship-tooltip__name[_ngcontent-%COMP%]{font-size:1.2em}.ship-tooltip__type[_ngcontent-%COMP%]{font-size:.9em;color:#555}.ship-tooltip__row[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;font-size:.9em}.ship-tooltip__info-cell[_ngcontent-%COMP%]{padding:.4em;text-align:center}.ship-tooltip__info-label[_ngcontent-%COMP%]{color:grey;font-weight:500;padding-bottom:.2em}.ship-tooltip__course-icon[_ngcontent-%COMP%]{line-height:.7em;height:.7em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ship-tooltip__footer[_ngcontent-%COMP%]{background-color:#cdd1d4;padding-left:.4em;display:flex;align-items:center;font-size:.85em;line-height:36px}.ship-tooltip__signal-label[_ngcontent-%COMP%]{font-weight:500;color:#595959} .overlay-positioning-center-right .ship-tooltip:after{top:50%;left:100%;margin-top:-12px;border-left-color:#cdd1d4} .overlay-positioning-center-left .ship-tooltip:after{top:50%;right:100%;margin-top:-12px;border-right-color:#cdd1d4} .overlay-positioning-bottom-center .ship-tooltip:after{top:100%;left:50%;margin-left:-12px;border-top-color:#cdd1d4} .overlay-positioning-top-center .ship-tooltip:after{bottom:100%;left:50%;margin-left:-12px;border-bottom-color:#cdd1d4}'],changeDetection:0}),t})();function G3(t,e){if(1&t&&(r.Qb(0,"mat-divider"),r.Vb(1,"div",0),r.Vb(2,"div",1),r.Vb(3,"div",2),r.Kc(4,"Type"),r.Ub(),r.Vb(5,"strong"),r.Kc(6),r.Ub(),r.Ub(),r.Qb(7,"mat-divider",3),r.Vb(8,"div",1),r.Vb(9,"div",2),r.Kc(10,"Information de navigation"),r.Ub(),r.Vb(11,"strong"),r.Kc(12),r.Ub(),r.Ub(),r.Ub(),r.Qb(13,"mat-divider"),r.Vb(14,"div",0),r.Vb(15,"div",1),r.Vb(16,"div",2),r.Kc(17,"Dimensions"),r.Ub(),r.Vb(18,"strong"),r.Kc(19),r.Ub(),r.Ub(),r.Qb(20,"mat-divider",3),r.Vb(21,"div",1),r.Vb(22,"div",2),r.Kc(23,"Tirant d'eau"),r.Ub(),r.Vb(24,"strong"),r.Kc(25),r.Ub(),r.Ub(),r.Ub()),2&t){const t=r.gc();r.Db(6),r.Mc(" ",t.vesselTypeLabelsByType[t.ship.cargo]||"?"," "),r.Db(1),r.nc("vertical",!0),r.Db(5),r.Mc(" ",t.navigationStatusByKey[t.ship.status]||"?"," "),r.Db(7),r.Nc(" ",t.ship.length||"?"," x ",t.ship.width||"?","m "),r.Db(1),r.nc("vertical",!0),r.Db(5),r.Mc(" ",t.ship.draught?t.ship.draught+"m":"?"," ")}}const W3=function(t){return{transform:t}};function Z3(t,e){if(1&t&&(r.Kc(0),r.Vb(1,"mat-icon",8),r.Kc(2,"arrow_right_alt"),r.Ub()),2&t){const t=r.gc();r.Mc(" ",t.position.cog,"\xb0 "),r.Db(1),r.nc("ngStyle",r.sc(2,W3,"rotate("+(t.position.cog-90)+"deg)"))}}function q3(t,e){1&t&&r.Kc(0," ? ")}function Y3(t,e){if(1&t&&(r.Qb(0,"mat-divider"),r.Vb(1,"div",0),r.Vb(2,"div",1),r.Vb(3,"div",2),r.Kc(4,"Destination"),r.Ub(),r.Vb(5,"strong"),r.Kc(6),r.Ub(),r.Ub(),r.Qb(7,"mat-divider",3),r.Vb(8,"div",1),r.Vb(9,"div",2),r.Kc(10,"ETA"),r.Ub(),r.Vb(11,"strong"),r.Kc(12),r.hc(13,"date"),r.Ub(),r.Ub(),r.Ub(),r.Qb(14,"mat-divider"),r.Vb(15,"div",0),r.Vb(16,"div",9),r.Vb(17,"div",10),r.Kc(18,"Provenance"),r.Ub(),r.Vb(19,"strong"),r.Kc(20),r.Ub(),r.Ub(),r.Qb(21,"mat-divider",3),r.Qb(22,"div",11),r.Ub()),2&t){const t=r.gc();r.Db(6),r.Mc(" ",t.ship.destination||"?"," "),r.Db(1),r.nc("vertical",!0),r.Db(5),r.Lc(t.ship.eta?r.jc(13,5,t.ship.eta,"yyyy-MM-dd HH:mm"):"?"),r.Db(8),r.Mc(" ",t.ship.departure||"?"," "),r.Db(1),r.nc("vertical",!0)}}let Q3=(()=>{class t extends LT{constructor(){super(...arguments),this.positionInput=null,this.full=!1,this.historyMode=!1,this.position=null,this.navigationStatusByKey=JH,this.vesselTypeLabelsByType=ED}ngOnInit(){this.ensureMandatoryInputParams("ship")}ngOnChanges(t){t.positionInput&&(this.position=this.positionInput),t.ship&&!this.positionInput&&(this.position=this.ship)}}return t.\u0275fac=function(e){return X3(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-ship-infos"]],inputs:{ship:"ship",positionInput:["position","positionInput"],full:"full",historyMode:"historyMode"},features:[r.Ab,r.Bb],decls:36,vars:12,consts:[[1,"ship-infos__row"],[1,"ship-infos__info-cell"],[1,"ship-infos__info-label"],[3,"vertical"],[3,"ngIf"],[1,"d-flex-center"],[3,"ngIf","ngIfElse"],["unknown",""],[1,"ship-infos__course-icon",3,"ngStyle"],[1,"ship-infos__info-cell",2,"flex","1"],["title","Ancienne destination d\xe9clar\xe9e",1,"ship-infos__info-label"],[2,"flex","1"]],template:function(t,e){if(1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"div",2),r.Kc(3,"MMSI"),r.Ub(),r.Vb(4,"strong"),r.Kc(5),r.Ub(),r.Ub(),r.Qb(6,"mat-divider",3),r.Vb(7,"div",1),r.Vb(8,"div",2),r.Kc(9,"IMO"),r.Ub(),r.Vb(10,"strong"),r.Kc(11),r.Ub(),r.Ub(),r.Qb(12,"mat-divider",3),r.Vb(13,"div",1),r.Vb(14,"div",2),r.Kc(15,"Callsign"),r.Ub(),r.Vb(16,"strong"),r.Kc(17),r.Ub(),r.Ub(),r.Ub(),r.Ic(18,G3,26,7,"ng-template",4),r.Qb(19,"mat-divider"),r.Vb(20,"div",0),r.Vb(21,"div",1),r.Vb(22,"div",2),r.Kc(23,"Vitesse / Cap"),r.Ub(),r.Vb(24,"strong",5),r.Kc(25),r.Ic(26,Z3,3,4,"ng-template",6),r.Ic(27,q3,1,0,"ng-template",null,7,r.Jc),r.Ub(),r.Ub(),r.Qb(29,"mat-divider",3),r.Vb(30,"div",1),r.Vb(31,"div",2),r.Kc(32,"Position"),r.Ub(),r.Vb(33,"strong"),r.Kc(34),r.Ub(),r.Ub(),r.Ub(),r.Ic(35,Y3,23,8,"ng-template",4)),2&t){const t=r.wc(28);r.Db(5),r.Lc(e.ship.mmsi),r.Db(1),r.nc("vertical",!0),r.Db(5),r.Lc(e.ship.imo||"?"),r.Db(1),r.nc("vertical",!0),r.Db(5),r.Lc(e.ship.callsign||"?"),r.Db(1),r.nc("ngIf",e.full),r.Db(7),r.Mc(" ",e.position.sog?e.position.sog+" kt":"?"," / "),r.Db(1),r.nc("ngIf",e.position.cog)("ngIfElse",t),r.Db(3),r.nc("vertical",!0),r.Db(5),r.Lc(e.position.hdms),r.Db(1),r.nc("ngIf",!e.historyMode)}},directives:[GT,ut,Yp,bt],pipes:[kt],styles:['.ship-infos[_ngcontent-%COMP%]{background-color:#e7ecf0;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2);border-radius:2px}.ship-infos[_ngcontent-%COMP%]:after{content:" ";position:absolute;top:100%;left:50%;margin-left:-12px;border:12px solid transparent;border-top-color:#cdd1d4}.ship-infos__header[_ngcontent-%COMP%]{background-color:#cdd1d4;display:flex}.ship-infos__link[_ngcontent-%COMP%]{flex:1;padding:0;line-height:inherit;text-align:inherit;font-size:inherit;font-weight:inherit}.ship-infos__link[_ngcontent-%COMP%] .mat-button-wrapper{display:flex}.ship-infos__flag[_ngcontent-%COMP%]{margin:5px}.ship-infos__title[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:5px 0;flex:1}.ship-infos__name[_ngcontent-%COMP%]{font-size:1.2em}.ship-infos__type[_ngcontent-%COMP%]{font-size:.9em;color:#555}.ship-infos__row[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;font-size:.9em}.ship-infos__info-cell[_ngcontent-%COMP%]{padding:.4em;text-align:center}.ship-infos__info-label[_ngcontent-%COMP%]{color:grey;font-weight:500;padding-bottom:.2em}.ship-infos__course-icon[_ngcontent-%COMP%]{line-height:.7em;height:.7em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ship-infos__footer[_ngcontent-%COMP%]{background-color:#cdd1d4;padding-left:.4em;display:flex;align-items:center;font-size:.85em;line-height:36px}.ship-infos__signal-label[_ngcontent-%COMP%]{font-weight:500;color:#595959}'],changeDetection:0}),t})();const X3=r.Xb(Q3);function J3(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",14),r.cc("pointerdown",function(e){return r.Ac(t),r.gc().drag.emit(e)}),r.Vb(1,"mat-icon"),r.Kc(2,"control_camera"),r.Ub(),r.Ub()}}function t4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",15),r.cc("click",function(){return r.Ac(t),r.gc().close.emit(null)}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function e4(t,e){if(1&t&&(r.Vb(0,"span"),r.Kc(1),r.hc(2,"date"),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Lc(r.kc(2,1,1e3*t.ship.timestamp,"yyyy-MM-dd HH:mm:ss z",t.mapConfigService.useUTCDates$.value&&"z"))}}function i4(t,e){if(1&t&&(r.Vb(0,"span",16),r.hc(1,"date"),r.Kc(2),r.hc(3,"timeago"),r.Ub()),2&t){const t=r.gc();r.oc("title",r.kc(1,2,1e3*t.ship.timestamp,"yyyy-MM-dd HH:mm:ss z",t.mapConfigService.useUTCDates$.value&&"z")),r.Db(2),r.Lc(r.ic(3,6,1e3*t.ship.timestamp))}}let n4=(()=>{class t extends LT{constructor(t,e){super(),this.historyService=t,this.mapConfigService=e,this.pinned=!1,this.close=new r.o,this.drag=new r.o,this.vesselTypeLabelsByType=ED}ngOnInit(){this.ensureMandatoryInputParams("ship")}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(bI),r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-ship-tooltip"]],inputs:{pinned:"pinned",ship:"ship"},outputs:{close:"close",drag:"drag"},features:[r.Ab],decls:20,vars:13,consts:[[1,"ship-tooltip"],[1,"ship-tooltip__header"],[1,"ship-tooltip__flag",3,"mmsi"],[1,"ship-tooltip__title"],[1,"ship-tooltip__name"],[1,"ship-tooltip__type"],["mat-button","","class","small-mat-button ship-tooltip__move-icon","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",3,"pointerdown",4,"ngIf"],["mat-button","","class","small-mat-button","title","Fermer l'infobulle",3,"click",4,"ngIf"],[1,"ship-details-panel__infos",3,"ship","historyMode"],[1,"ship-tooltip__footer"],[1,"ship-tooltip__signal-label"],[1,"u-flex"],[4,"ngIf","ngIfElse"],["liveDisplay",""],["mat-button","","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",1,"small-mat-button","ship-tooltip__move-icon",3,"pointerdown"],["mat-button","","title","Fermer l'infobulle",1,"small-mat-button",3,"click"],[3,"title"]],template:function(t,e){if(1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Qb(2,"app-flag",2),r.Vb(3,"div",3),r.Vb(4,"strong",4),r.Kc(5),r.Ub(),r.Vb(6,"small",5),r.Kc(7),r.Ub(),r.Ub(),r.Ic(8,J3,3,0,"button",6),r.Ic(9,t4,3,0,"button",7),r.Ub(),r.Qb(10,"app-ship-infos",8),r.hc(11,"async"),r.Vb(12,"div",9),r.Vb(13,"span",10),r.Kc(14,"R\xe9ception :\xa0"),r.Ub(),r.Vb(15,"strong",11),r.Ic(16,e4,3,5,"span",12),r.hc(17,"async"),r.Ic(18,i4,4,8,"ng-template",null,13,r.Jc),r.Ub(),r.Ub(),r.Ub()),2&t){const t=r.wc(19);r.Db(2),r.nc("mmsi",e.ship.mmsi),r.Db(3),r.Lc(e.ship.name||"?"),r.Db(2),r.Lc(e.ship.cargo?e.vesselTypeLabelsByType[e.ship.cargo]:"?"),r.Db(1),r.nc("ngIf",e.pinned),r.Db(1),r.nc("ngIf",e.pinned),r.Db(1),r.nc("ship",e.ship)("historyMode",r.ic(11,9,e.historyService.timestamp$)),r.Db(6),r.nc("ngIf",r.ic(17,11,e.historyService.timestamp$))("ngIfElse",t)}},directives:[GF,ut,Q3,Dl,Yp],pipes:[St,kt,Tx],styles:['.ship-tooltip[_ngcontent-%COMP%]{min-width:320px;background-color:#e7ecf0;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2);border-radius:2px}.ship-tooltip[_ngcontent-%COMP%]:after{content:" ";position:absolute;border:12px solid transparent;pointer-events:none}.ship-tooltip__header[_ngcontent-%COMP%]{background-color:#cdd1d4;display:flex}.ship-tooltip__move-icon[_ngcontent-%COMP%]{cursor:move}.ship-tooltip__link[_ngcontent-%COMP%]{flex:1;padding:0;line-height:inherit;text-align:inherit;font-size:inherit;font-weight:inherit}.ship-tooltip__link[_ngcontent-%COMP%] .mat-button-wrapper{display:flex}.ship-tooltip__flag[_ngcontent-%COMP%]{margin:5px}.ship-tooltip__title[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:5px 0;flex:1}.ship-tooltip__name[_ngcontent-%COMP%]{font-size:1.2em}.ship-tooltip__type[_ngcontent-%COMP%]{font-size:.9em;color:#555}.ship-tooltip__row[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;font-size:.9em}.ship-tooltip__info-cell[_ngcontent-%COMP%]{padding:.4em;text-align:center}.ship-tooltip__info-label[_ngcontent-%COMP%]{color:grey;font-weight:500;padding-bottom:.2em}.ship-tooltip__course-icon[_ngcontent-%COMP%]{line-height:.7em;height:.7em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ship-tooltip__footer[_ngcontent-%COMP%]{background-color:#cdd1d4;padding-left:.4em;display:flex;align-items:center;font-size:.85em;line-height:36px}.ship-tooltip__signal-label[_ngcontent-%COMP%]{font-weight:500;color:#595959} .overlay-positioning-center-right .ship-tooltip:after{top:50%;left:100%;margin-top:-12px;border-left-color:#cdd1d4} .overlay-positioning-center-left .ship-tooltip:after{top:50%;right:100%;margin-top:-12px;border-right-color:#cdd1d4} .overlay-positioning-bottom-center .ship-tooltip:after{top:100%;left:50%;margin-left:-12px;border-top-color:#cdd1d4} .overlay-positioning-top-center .ship-tooltip:after{bottom:100%;left:50%;margin-left:-12px;border-bottom-color:#cdd1d4}'],changeDetection:0}),t})();function r4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",14),r.cc("pointerdown",function(e){return r.Ac(t),r.gc().drag.emit(e)}),r.Vb(1,"mat-icon"),r.Kc(2,"control_camera"),r.Ub(),r.Ub()}}function s4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",15),r.cc("click",function(){return r.Ac(t),r.gc().close.emit(null)}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function o4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",16),r.cc("click",function(){r.Ac(t);const e=r.gc();return e.historyService.setTimestamp(e.position.timestamp)}),r.Vb(1,"mat-icon"),r.Kc(2,"history"),r.Ub(),r.Ub()}}const a4=function(t){return["/ships/",t]};let l4=(()=>{class t extends LT{constructor(t,e){super(),this.historyService=t,this.mapConfigService=e,this.pinned=!1,this.close=new r.o,this.drag=new r.o,this.vesselTypeLabelsByType=ED}ngOnInit(){this.ensureMandatoryInputParams("position")}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(bI),r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-position-tooltip"]],inputs:{pinned:"pinned",position:"position"},outputs:{close:"close",drag:"drag"},features:[r.Ab],decls:20,vars:19,consts:[[1,"ship-tooltip"],[1,"ship-tooltip__header"],["mat-button","","title","Ouvrir la fiche du navire",1,"ship-tooltip__link",3,"routerLink"],[1,"ship-tooltip__flag",3,"mmsi"],[1,"ship-tooltip__title"],[1,"ship-tooltip__name"],[1,"ship-tooltip__type"],["mat-button","","class","small-mat-button ship-tooltip__move-icon","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",3,"pointerdown",4,"ngIf"],["mat-button","","class","small-mat-button","title","Fermer l'infobulle",3,"click",4,"ngIf"],[1,"ship-details-panel__infos",3,"ship","position","historyMode"],[1,"ship-tooltip__footer"],[1,"ship-tooltip__signal-label"],[1,"u-flex"],["mat-button","","title","Afficher la situation des navires \xe0 cette date",3,"click",4,"ngIf"],["mat-button","","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",1,"small-mat-button","ship-tooltip__move-icon",3,"pointerdown"],["mat-button","","title","Fermer l'infobulle",1,"small-mat-button",3,"click"],["mat-button","","title","Afficher la situation des navires \xe0 cette date",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"a",2),r.Qb(3,"app-flag",3),r.Vb(4,"div",4),r.Vb(5,"strong",5),r.Kc(6),r.Ub(),r.Vb(7,"small",6),r.Kc(8),r.Ub(),r.Ub(),r.Ub(),r.Ic(9,r4,3,0,"button",7),r.Ic(10,s4,3,0,"button",8),r.Ub(),r.Qb(11,"app-ship-infos",9),r.hc(12,"async"),r.Vb(13,"div",10),r.Vb(14,"span",11),r.Kc(15,"R\xe9ception :\xa0"),r.Ub(),r.Vb(16,"strong",12),r.Kc(17),r.hc(18,"date"),r.Ub(),r.Ic(19,o4,3,0,"button",13),r.Ub(),r.Ub()),2&t&&(r.Db(2),r.nc("routerLink",r.sc(17,a4,e.position.ship.mmsi)),r.Db(1),r.nc("mmsi",e.position.ship.mmsi),r.Db(3),r.Lc(e.position.ship.name||"?"),r.Db(2),r.Lc(e.position.ship.cargo?e.vesselTypeLabelsByType[e.position.ship.cargo]:"?"),r.Db(1),r.nc("ngIf",e.pinned),r.Db(1),r.nc("ngIf",e.pinned),r.Db(1),r.nc("ship",e.position.ship)("position",e.position)("historyMode",r.ic(12,11,e.historyService.timestamp$)),r.Db(6),r.Lc(r.kc(18,13,1e3*e.position.timestamp,"yyyy-MM-dd HH:mm:ss z",e.mapConfigService.useUTCDates$.value&&"z")),r.Db(2),r.nc("ngIf",e.pinned))},directives:[Il,aw,GF,ut,Q3,Dl,Yp],pipes:[St,kt],styles:['.ship-tooltip[_ngcontent-%COMP%]{min-width:320px;background-color:#e7ecf0;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2);border-radius:2px}.ship-tooltip[_ngcontent-%COMP%]:after{content:" ";position:absolute;border:12px solid transparent;pointer-events:none}.ship-tooltip__header[_ngcontent-%COMP%]{background-color:#cdd1d4;display:flex}.ship-tooltip__move-icon[_ngcontent-%COMP%]{cursor:move}.ship-tooltip__link[_ngcontent-%COMP%]{flex:1;padding:0;line-height:inherit;text-align:inherit;font-size:inherit;font-weight:inherit}.ship-tooltip__link[_ngcontent-%COMP%] .mat-button-wrapper{display:flex}.ship-tooltip__flag[_ngcontent-%COMP%]{margin:5px}.ship-tooltip__title[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:5px 0;flex:1}.ship-tooltip__name[_ngcontent-%COMP%]{font-size:1.2em}.ship-tooltip__type[_ngcontent-%COMP%]{font-size:.9em;color:#555}.ship-tooltip__row[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;font-size:.9em}.ship-tooltip__info-cell[_ngcontent-%COMP%]{padding:.4em;text-align:center}.ship-tooltip__info-label[_ngcontent-%COMP%]{color:grey;font-weight:500;padding-bottom:.2em}.ship-tooltip__course-icon[_ngcontent-%COMP%]{line-height:.7em;height:.7em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ship-tooltip__footer[_ngcontent-%COMP%]{background-color:#cdd1d4;padding-left:.4em;display:flex;align-items:center;font-size:.85em;line-height:36px}.ship-tooltip__signal-label[_ngcontent-%COMP%]{font-weight:500;color:#595959} .overlay-positioning-center-right .ship-tooltip:after{top:50%;left:100%;margin-top:-12px;border-left-color:#cdd1d4} .overlay-positioning-center-left .ship-tooltip:after{top:50%;right:100%;margin-top:-12px;border-right-color:#cdd1d4} .overlay-positioning-bottom-center .ship-tooltip:after{top:100%;left:50%;margin-left:-12px;border-top-color:#cdd1d4} .overlay-positioning-top-center .ship-tooltip:after{bottom:100%;left:50%;margin-left:-12px;border-bottom-color:#cdd1d4}'],changeDetection:0}),t})();function c4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",14),r.cc("pointerdown",function(e){return r.Ac(t),r.gc().drag.emit(e)}),r.Vb(1,"mat-icon"),r.Kc(2,"control_camera"),r.Ub(),r.Ub()}}function h4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",15),r.cc("click",function(){return r.Ac(t),r.gc().close.emit(null)}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function u4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",16),r.cc("click",function(){r.Ac(t);const e=r.gc();return e.historyService.setTimestamp(e.position.timestamp)}),r.Vb(1,"mat-icon"),r.Kc(2,"history"),r.Ub(),r.Ub()}}const d4=function(t){return["/aircrafts/",t]};let p4=(()=>{class t extends LT{constructor(t,e){super(),this.historyService=t,this.mapConfigService=e,this.pinned=!1,this.close=new r.o,this.drag=new r.o}ngOnInit(){this.ensureMandatoryInputParams("position")}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(bI),r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-aircraft-position-tooltip"]],inputs:{pinned:"pinned",position:"position"},outputs:{close:"close",drag:"drag"},features:[r.Ab],decls:19,vars:17,consts:[[1,"ship-tooltip"],[1,"ship-tooltip__header"],["mat-button","","title","Ouvrir la fiche de l'a\xe9ronef",1,"ship-tooltip__link",3,"routerLink"],[1,"ship-tooltip__flag",3,"flag"],[1,"ship-tooltip__title","ml-2"],[1,"ship-tooltip__name"],[1,"ship-tooltip__type"],["mat-button","","class","small-mat-button ship-tooltip__move-icon","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",3,"pointerdown",4,"ngIf"],["mat-button","","class","small-mat-button","title","Fermer l'infobulle",3,"click",4,"ngIf"],[1,"ship-details-panel__infos",3,"aircraft","position"],[1,"ship-tooltip__footer"],[1,"ship-tooltip__signal-label"],[1,"u-flex"],["mat-button","","title","Afficher la situation des navires \xe0 cette date",3,"click",4,"ngIf"],["mat-button","","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",1,"small-mat-button","ship-tooltip__move-icon",3,"pointerdown"],["mat-button","","title","Fermer l'infobulle",1,"small-mat-button",3,"click"],["mat-button","","title","Afficher la situation des navires \xe0 cette date",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"a",2),r.Qb(3,"app-flag",3),r.Vb(4,"div",4),r.Vb(5,"strong",5),r.Kc(6),r.Ub(),r.Vb(7,"small",6),r.Kc(8),r.Ub(),r.Ub(),r.Ub(),r.Ic(9,c4,3,0,"button",7),r.Ic(10,h4,3,0,"button",8),r.Ub(),r.Qb(11,"app-aircraft-infos",9),r.Vb(12,"div",10),r.Vb(13,"span",11),r.Kc(14,"R\xe9ception :\xa0"),r.Ub(),r.Vb(15,"strong",12),r.Kc(16),r.hc(17,"date"),r.Ub(),r.Ic(18,u4,3,0,"button",13),r.Ub(),r.Ub()),2&t&&(r.Db(2),r.nc("routerLink",r.sc(15,d4,e.position.aircraft.icao)),r.Db(1),r.nc("flag",e.position.aircraft.country.flag),r.Db(3),r.Nc("",e.position.aircraft.callsign||"?"," / ",e.position.aircraft.icao,""),r.Db(2),r.Mc("Type code: ",e.position.aircraft.icaoTypeCode||"?",""),r.Db(1),r.nc("ngIf",e.pinned),r.Db(1),r.nc("ngIf",e.pinned),r.Db(1),r.nc("aircraft",e.position.aircraft)("position",e.position),r.Db(5),r.Lc(r.kc(17,11,1e3*e.position.timestamp,"yyyy-MM-dd HH:mm:ss z",e.mapConfigService.useUTCDates$.value&&"z")),r.Db(2),r.nc("ngIf",e.pinned))},directives:[Il,aw,GF,ut,XF,Dl,Yp],pipes:[kt],styles:['.ship-tooltip[_ngcontent-%COMP%]{min-width:320px;background-color:#e7ecf0;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2);border-radius:2px}.ship-tooltip[_ngcontent-%COMP%]:after{content:" ";position:absolute;border:12px solid transparent;pointer-events:none}.ship-tooltip__header[_ngcontent-%COMP%]{background-color:#cdd1d4;display:flex}.ship-tooltip__move-icon[_ngcontent-%COMP%]{cursor:move}.ship-tooltip__link[_ngcontent-%COMP%]{flex:1;padding:0;line-height:inherit;text-align:inherit;font-size:inherit;font-weight:inherit}.ship-tooltip__link[_ngcontent-%COMP%] .mat-button-wrapper{display:flex}.ship-tooltip__flag[_ngcontent-%COMP%]{margin:5px}.ship-tooltip__title[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:5px 0;flex:1}.ship-tooltip__name[_ngcontent-%COMP%]{font-size:1.2em}.ship-tooltip__type[_ngcontent-%COMP%]{font-size:.9em;color:#555}.ship-tooltip__row[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;font-size:.9em}.ship-tooltip__info-cell[_ngcontent-%COMP%]{padding:.4em;text-align:center}.ship-tooltip__info-label[_ngcontent-%COMP%]{color:grey;font-weight:500;padding-bottom:.2em}.ship-tooltip__course-icon[_ngcontent-%COMP%]{line-height:.7em;height:.7em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ship-tooltip__footer[_ngcontent-%COMP%]{background-color:#cdd1d4;padding-left:.4em;display:flex;align-items:center;font-size:.85em;line-height:36px}.ship-tooltip__signal-label[_ngcontent-%COMP%]{font-weight:500;color:#595959} .overlay-positioning-center-right .ship-tooltip:after{top:50%;left:100%;margin-top:-12px;border-left-color:#cdd1d4} .overlay-positioning-center-left .ship-tooltip:after{top:50%;right:100%;margin-top:-12px;border-right-color:#cdd1d4} .overlay-positioning-bottom-center .ship-tooltip:after{top:100%;left:50%;margin-left:-12px;border-top-color:#cdd1d4} .overlay-positioning-top-center .ship-tooltip:after{bottom:100%;left:50%;margin-left:-12px;border-bottom-color:#cdd1d4}'],changeDetection:0}),t})();function f4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",17),r.cc("pointerdown",function(e){return r.Ac(t),r.gc().drag.emit(e)}),r.Vb(1,"mat-icon"),r.Kc(2,"control_camera"),r.Ub(),r.Ub()}}function m4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",18),r.cc("click",function(){return r.Ac(t),r.gc().close.emit(null)}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function g4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",19),r.cc("click",function(){r.Ac(t);const e=r.gc();return e.historyService.setTimestamp(e.h3element.timestamp)}),r.Vb(1,"mat-icon"),r.Kc(2,"history"),r.Ub(),r.Ub()}}const A4=function(t){return["/ships/",t]};let b4=(()=>{class t extends LT{constructor(t,e){super(),this.historyService=t,this.mapConfigService=e,this.pinned=!1,this.close=new r.o,this.drag=new r.o,this.vesselTypeLabelsByType=ED}ngOnInit(){this.ensureMandatoryInputParams("h3element")}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(bI),r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-h3element-tooltip"]],inputs:{pinned:"pinned",h3element:"h3element"},outputs:{close:"close",drag:"drag"},features:[r.Ab],decls:39,vars:20,consts:[[1,"ship-tooltip"],[1,"ship-tooltip__header"],["mat-button","","title","Ouvrir la fiche du navire",1,"ship-tooltip__link",3,"routerLink"],[1,"ship-tooltip__flag",3,"mmsi"],[1,"ship-tooltip__title"],[1,"ship-tooltip__name"],[1,"ship-tooltip__type"],["mat-button","","class","small-mat-button ship-tooltip__move-icon","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",3,"pointerdown",4,"ngIf"],["mat-button","","class","small-mat-button","title","Fermer l'infobulle",3,"click",4,"ngIf"],[1,"ship-tooltip__row"],[1,"ship-tooltip__info-cell"],[1,"ship-tooltip__info-label"],[3,"vertical"],[1,"ship-tooltip__footer"],[1,"ship-tooltip__signal-label"],[1,"u-flex"],["mat-button","","title","Afficher la situation des navires \xe0 cette date",3,"click",4,"ngIf"],["mat-button","","title","Cliquer et maintenir pour d\xe9placer l'\xe9tiquette",1,"small-mat-button","ship-tooltip__move-icon",3,"pointerdown"],["mat-button","","title","Fermer l'infobulle",1,"small-mat-button",3,"click"],["mat-button","","title","Afficher la situation des navires \xe0 cette date",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"a",2),r.Qb(3,"app-flag",3),r.Vb(4,"div",4),r.Vb(5,"strong",5),r.Kc(6),r.Ub(),r.Vb(7,"small",6),r.Kc(8),r.Ub(),r.Ub(),r.Ub(),r.Ic(9,f4,3,0,"button",7),r.Ic(10,m4,3,0,"button",8),r.Ub(),r.Vb(11,"div",9),r.Vb(12,"div",10),r.Vb(13,"div",11),r.Kc(14,"Res"),r.Ub(),r.Vb(15,"strong"),r.Kc(16),r.Ub(),r.Ub(),r.Qb(17,"mat-divider",12),r.Vb(18,"div",10),r.Vb(19,"div",11),r.Kc(20,"Literal"),r.Ub(),r.Vb(21,"strong"),r.Kc(22),r.Ub(),r.Ub(),r.Ub(),r.Qb(23,"mat-divider"),r.Vb(24,"div",9),r.Vb(25,"div",10),r.Vb(26,"div",11),r.Kc(27,"H3"),r.Ub(),r.Ub(),r.Qb(28,"mat-divider",12),r.Vb(29,"div",10),r.Vb(30,"strong"),r.Kc(31),r.Ub(),r.Ub(),r.Ub(),r.Vb(32,"div",13),r.Vb(33,"span",14),r.Kc(34,"R\xe9ception :\xa0"),r.Ub(),r.Vb(35,"strong",15),r.Kc(36),r.hc(37,"date"),r.Ub(),r.Ic(38,g4,3,0,"button",16),r.Ub(),r.Ub()),2&t&&(r.Db(2),r.nc("routerLink",r.sc(18,A4,e.h3element.ship.mmsi)),r.Db(1),r.nc("mmsi",e.h3element.ship.mmsi),r.Db(3),r.Lc(e.h3element.ship.name||"?"),r.Db(2),r.Nc("",e.h3element.ship.mmsi," - ",e.h3element.ship.cargo?e.vesselTypeLabelsByType[e.h3element.ship.cargo]:"?",""),r.Db(1),r.nc("ngIf",e.pinned),r.Db(1),r.nc("ngIf",e.pinned),r.Db(6),r.Lc(e.h3element.res||"?"),r.Db(1),r.nc("vertical",!0),r.Db(5),r.Lc(e.h3element.literal),r.Db(6),r.nc("vertical",!0),r.Db(3),r.Lc(e.h3element.h3index||"?"),r.Db(5),r.Lc(r.kc(37,14,1e3*e.h3element.timestamp,"yyyy-MM-dd HH:mm:ss z",e.mapConfigService.useUTCDates$.value&&"z")),r.Db(2),r.nc("ngIf",e.pinned))},directives:[Il,aw,GF,ut,GT,Dl,Yp],pipes:[kt],styles:['.ship-tooltip[_ngcontent-%COMP%]{min-width:320px;background-color:#e7ecf0;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2);border-radius:2px}.ship-tooltip[_ngcontent-%COMP%]:after{content:" ";position:absolute;border:12px solid transparent;pointer-events:none}.ship-tooltip__header[_ngcontent-%COMP%]{background-color:#cdd1d4;display:flex}.ship-tooltip__move-icon[_ngcontent-%COMP%]{cursor:move}.ship-tooltip__link[_ngcontent-%COMP%]{flex:1;padding:0;line-height:inherit;text-align:inherit;font-size:inherit;font-weight:inherit}.ship-tooltip__link[_ngcontent-%COMP%] .mat-button-wrapper{display:flex}.ship-tooltip__flag[_ngcontent-%COMP%]{margin:5px}.ship-tooltip__title[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:5px 0;flex:1}.ship-tooltip__name[_ngcontent-%COMP%]{font-size:1.2em}.ship-tooltip__type[_ngcontent-%COMP%]{font-size:.9em;color:#555}.ship-tooltip__row[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;font-size:.9em}.ship-tooltip__info-cell[_ngcontent-%COMP%]{padding:.4em;text-align:center}.ship-tooltip__info-label[_ngcontent-%COMP%]{color:grey;font-weight:500;padding-bottom:.2em}.ship-tooltip__course-icon[_ngcontent-%COMP%]{line-height:.7em;height:.7em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ship-tooltip__footer[_ngcontent-%COMP%]{background-color:#cdd1d4;padding-left:.4em;display:flex;align-items:center;font-size:.85em;line-height:36px}.ship-tooltip__signal-label[_ngcontent-%COMP%]{font-weight:500;color:#595959} .overlay-positioning-center-right .ship-tooltip:after{top:50%;left:100%;margin-top:-12px;border-left-color:#cdd1d4} .overlay-positioning-center-left .ship-tooltip:after{top:50%;right:100%;margin-top:-12px;border-right-color:#cdd1d4} .overlay-positioning-bottom-center .ship-tooltip:after{top:100%;left:50%;margin-left:-12px;border-top-color:#cdd1d4} .overlay-positioning-top-center .ship-tooltip:after{bottom:100%;left:50%;margin-left:-12px;border-bottom-color:#cdd1d4}']}),t})();function v4(t,e){if(1&t&&r.Qb(0,"app-aircraft-tooltip",11),2&t){const t=r.gc(2);r.nc("aircraft",t.entity)}}function _4(t,e){if(1&t&&r.Qb(0,"app-alert-tooltip",12),2&t){const t=r.gc(2);r.nc("alert",t.entity)}}function y4(t,e){if(1&t&&r.Qb(0,"app-annotation-tooltip",13),2&t){const t=r.gc(2);r.nc("annotation",t.entity)}}function w4(t,e){if(1&t&&r.Qb(0,"app-event-tooltip",14),2&t){const t=r.gc(2);r.nc("event",t.entity)}}function x4(t,e){if(1&t&&r.Qb(0,"app-ship-tooltip",15),2&t){const t=r.gc(2);r.nc("ship",t.entity)}}function C4(t,e){if(1&t&&r.Qb(0,"app-position-tooltip",16),2&t){const t=r.gc(2);r.nc("position",t.entity)}}function S4(t,e){if(1&t&&r.Qb(0,"app-aircraft-position-tooltip",16),2&t){const t=r.gc(2);r.nc("position",t.entity)}}function k4(t,e){if(1&t&&r.Qb(0,"app-h3element-tooltip",17),2&t){const t=r.gc(2);r.nc("h3element",t.entity)}}function E4(t,e){if(1&t&&(r.Vb(0,"app-map-tooltip",2),r.Tb(1,3),r.Ic(2,v4,1,1,"app-aircraft-tooltip",4),r.Ic(3,_4,1,1,"app-alert-tooltip",5),r.Ic(4,y4,1,1,"app-annotation-tooltip",6),r.Ic(5,w4,1,1,"app-event-tooltip",7),r.Ic(6,x4,1,1,"app-ship-tooltip",8),r.Ic(7,C4,1,1,"app-position-tooltip",9),r.Ic(8,S4,1,1,"app-aircraft-position-tooltip",9),r.Ic(9,k4,1,1,"app-h3element-tooltip",10),r.Sb(),r.Ub()),2&t){const t=r.gc();r.nc("map",t.map)("latitude",t.entity.lat)("longitude",t.entity.lon)("stopEvent",!1)("autoPositioning",!0)("opacity",t.tooltipsOpacity),r.Db(1),r.nc("ngSwitch",t.entity.kind),r.Db(1),r.nc("ngSwitchCase",t.EntityType.Aircraft),r.Db(1),r.nc("ngSwitchCase",t.EntityType.Alert),r.Db(1),r.nc("ngSwitchCase",t.EntityType.Annotation),r.Db(1),r.nc("ngSwitchCase",t.EntityType.Event),r.Db(1),r.nc("ngSwitchCase",t.EntityType.Ship),r.Db(1),r.nc("ngSwitchCase",t.EntityType.ShipPosition),r.Db(1),r.nc("ngSwitchCase",t.EntityType.AircraftPosition),r.Db(1),r.nc("ngSwitchCase",t.EntityType.H3Element)}}function D4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-aircraft-tooltip",26),r.cc("close",function(){r.Ac(t);const e=r.gc().$implicit;return r.gc().tooltipsService.unpinTooltip(e)})("drag",function(e){r.Ac(t);const i=r.gc().$implicit;return r.gc().startDragging(i,e)}),r.Ub()}if(2&t){const t=r.gc().$implicit;r.nc("aircraft",t.entity)("pinned",!0)}}function I4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-alert-tooltip",27),r.cc("close",function(){r.Ac(t);const e=r.gc().$implicit;return r.gc().tooltipsService.unpinTooltip(e)})("drag",function(e){r.Ac(t);const i=r.gc().$implicit;return r.gc().startDragging(i,e)}),r.Ub()}if(2&t){const t=r.gc().$implicit;r.nc("alert",t.entity)("pinned",!0)}}function P4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-annotation-tooltip",28),r.cc("close",function(){r.Ac(t);const e=r.gc().$implicit;return r.gc().tooltipsService.unpinTooltip(e)})("drag",function(e){r.Ac(t);const i=r.gc().$implicit;return r.gc().startDragging(i,e)}),r.Ub()}if(2&t){const t=r.gc().$implicit;r.nc("annotation",t.entity)("pinned",!0)}}function O4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-event-tooltip",29),r.cc("close",function(){r.Ac(t);const e=r.gc().$implicit;return r.gc().tooltipsService.unpinTooltip(e)})("drag",function(e){r.Ac(t);const i=r.gc().$implicit;return r.gc().startDragging(i,e)}),r.Ub()}if(2&t){const t=r.gc().$implicit;r.nc("event",t.entity)("pinned",!0)}}function M4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-ship-tooltip",30),r.cc("close",function(){r.Ac(t);const e=r.gc().$implicit;return r.gc().tooltipsService.unpinTooltip(e)})("drag",function(e){r.Ac(t);const i=r.gc().$implicit;return r.gc().startDragging(i,e)}),r.Ub()}if(2&t){const t=r.gc().$implicit;r.nc("ship",t.entity)("pinned",!0)}}function T4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-position-tooltip",31),r.cc("close",function(){r.Ac(t);const e=r.gc().$implicit;return r.gc().tooltipsService.unpinTooltip(e)})("drag",function(e){r.Ac(t);const i=r.gc().$implicit;return r.gc().startDragging(i,e)}),r.Ub()}if(2&t){const t=r.gc().$implicit;r.nc("position",t.entity)("pinned",!0)}}function R4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-aircraft-position-tooltip",31),r.cc("close",function(){r.Ac(t);const e=r.gc().$implicit;return r.gc().tooltipsService.unpinTooltip(e)})("drag",function(e){r.Ac(t);const i=r.gc().$implicit;return r.gc().startDragging(i,e)}),r.Ub()}if(2&t){const t=r.gc().$implicit;r.nc("position",t.entity)("pinned",!0)}}function V4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-h3element-tooltip",32),r.cc("close",function(){r.Ac(t);const e=r.gc().$implicit;return r.gc().tooltipsService.unpinTooltip(e)})("drag",function(e){r.Ac(t);const i=r.gc().$implicit;return r.gc().startDragging(i,e)}),r.Ub()}if(2&t){const t=r.gc().$implicit;r.nc("h3element",t.entity)("pinned",!0)}}function F4(t,e){if(1&t&&(r.Vb(0,"app-map-tooltip",18),r.Tb(1,3),r.Ic(2,D4,1,2,"app-aircraft-tooltip",19),r.Ic(3,I4,1,2,"app-alert-tooltip",20),r.Ic(4,P4,1,2,"app-annotation-tooltip",21),r.Ic(5,O4,1,2,"app-event-tooltip",22),r.Ic(6,M4,1,2,"app-ship-tooltip",23),r.Ic(7,T4,1,2,"app-position-tooltip",24),r.Ic(8,R4,1,2,"app-aircraft-position-tooltip",24),r.Ic(9,V4,1,2,"app-h3element-tooltip",25),r.Sb(),r.Ub()),2&t){const t=e.$implicit,i=r.gc();r.nc("map",i.map)("latitude",t.lat)("longitude",t.lon)("stopEvent",!1)("opacity",i.tooltipsOpacity),r.Db(1),r.nc("ngSwitch",t.entity.kind),r.Db(1),r.nc("ngSwitchCase",i.EntityType.Aircraft),r.Db(1),r.nc("ngSwitchCase",i.EntityType.Alert),r.Db(1),r.nc("ngSwitchCase",i.EntityType.Annotation),r.Db(1),r.nc("ngSwitchCase",i.EntityType.Event),r.Db(1),r.nc("ngSwitchCase",i.EntityType.Ship),r.Db(1),r.nc("ngSwitchCase",i.EntityType.ShipPosition),r.Db(1),r.nc("ngSwitchCase",i.EntityType.AircraftPosition),r.Db(1),r.nc("ngSwitchCase",i.EntityType.H3Element)}}const L4=new jZ({stroke:new VZ({color:"#666",lineDash:[10,10],width:2})});let U4=(()=>{class t extends LT{constructor(t,e,i,n){super(),this.changeDetectorRef=t,this.mapConfigService=e,this.tooltipMoveService=i,this.tooltipsService=n,this.entity=null,this.pinnedEntitiesTooltips=[],this.EntityType=OP,this.tooltipsOpacity=1}ngOnInit(){this.ensureMandatoryInputParams("map"),this.changeDetectorRef.detach(),this.source=new $q({features:[],useSpatialIndex:!1,wrapX:!1}),this.layer=new Nq({source:this.source,style:L4,zIndex:5}),this.map.addLayer(this.layer),this.subscriptions.push(this.tooltipsService.displayedEntity$.subscribe(t=>{this.entity=t,this.changeDetectorRef.detectChanges()}),this.tooltipsService.pinnedEntitiesTooltips$.subscribe(t=>{this.pinnedEntitiesTooltips=t;const e=t.filter(t=>t.lon!==t.entity.lon||t.lat!==t.entity.lat).map(t=>new pH(new kH([[t.lon,t.lat],[t.entity.lon,t.entity.lat]].map(t=>sE(t)))));this.source.clear(!0),this.source.addFeatures(e),this.changeDetectorRef.detectChanges()}),this.mapConfigService.tooltipsOpacity$.subscribe(t=>{this.tooltipsOpacity=t,this.changeDetectorRef.detectChanges()}))}ngOnDestroy(){super.ngOnDestroy(),this.source.clear(!0)}startDragging(t,e){var i;e.stopPropagation();const n=null===(i=e.target.closest(".ship-tooltip"))||void 0===i?void 0:i.getBoundingClientRect();if(!n)throw new Error("Impossible de d\xe9placer l'\xe9tiquette (\xe9l\xe9ment parent introuvable)");this.tooltipMoveService.startEntityTooltipMovement(t,[n.x+n.width/2-e.clientX,n.height-(e.clientY-n.y)+20]),document.body.addEventListener("pointerup",()=>{this.tooltipMoveService.endEntityTooltipMovement()},{capture:!0,once:!0})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(hI),r.Pb(E3),r.Pb(kT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-entity-tooltips"]],inputs:{map:"map"},features:[r.Ab],decls:2,vars:2,consts:[["className","hover-tooltip mat-elevation-z16",3,"map","latitude","longitude","stopEvent","autoPositioning","opacity",4,"ngIf"],["className","pinned-tooltip mat-elevation-z8",3,"map","latitude","longitude","stopEvent","opacity",4,"ngFor","ngForOf"],["className","hover-tooltip mat-elevation-z16",3,"map","latitude","longitude","stopEvent","autoPositioning","opacity"],[3,"ngSwitch"],[3,"aircraft",4,"ngSwitchCase"],[3,"alert",4,"ngSwitchCase"],[3,"annotation",4,"ngSwitchCase"],[3,"event",4,"ngSwitchCase"],[3,"ship",4,"ngSwitchCase"],[3,"position",4,"ngSwitchCase"],[3,"h3element",4,"ngSwitchCase"],[3,"aircraft"],[3,"alert"],[3,"annotation"],[3,"event"],[3,"ship"],[3,"position"],[3,"h3element"],["className","pinned-tooltip mat-elevation-z8",3,"map","latitude","longitude","stopEvent","opacity"],[3,"aircraft","pinned","close","drag",4,"ngSwitchCase"],[3,"alert","pinned","close","drag",4,"ngSwitchCase"],[3,"annotation","pinned","close","drag",4,"ngSwitchCase"],[3,"event","pinned","close","drag",4,"ngSwitchCase"],[3,"ship","pinned","close","drag",4,"ngSwitchCase"],[3,"position","pinned","close","drag",4,"ngSwitchCase"],[3,"h3element","pinned","close","drag",4,"ngSwitchCase"],[3,"aircraft","pinned","close","drag"],[3,"alert","pinned","close","drag"],[3,"annotation","pinned","close","drag"],[3,"event","pinned","close","drag"],[3,"ship","pinned","close","drag"],[3,"position","pinned","close","drag"],[3,"h3element","pinned","close","drag"]],template:function(t,e){1&t&&(r.Ic(0,E4,10,15,"app-map-tooltip",0),r.Ic(1,F4,10,14,"app-map-tooltip",1)),2&t&&(r.nc("ngIf",e.entity),r.Db(1),r.nc("ngForOf",e.pinnedEntitiesTooltips))},directives:[ut,ct,MX,mt,gt,M3,V3,N3,$3,n4,l4,p4,b4],styles:[".hover-tooltip{z-index:2}.pinned-tooltip{z-index:1}"],encapsulation:2}),t})();var B4=function(t){return t.Uninitialized="uninitialized",t.Initializing="initializing",t.Initialized="initialized",t}({});const N4=window;let j4=(()=>{class t{constructor(t){this.authenticationService=t,this.enabled=!"https://chat.anais.beta.gouv.fr".startsWith("{{")&&!"Bjc2UJejiNyuJXPgQpSNdiSV".startsWith("{{"),this.dialogActive=!1,this.state=B4.Uninitialized,this.authenticationService.user$.subscribe(t=>{this.user=t,!this.user&&N4.$chatwoot&&(N4.$chatwoot.reset(),this.dialogActive=!1)})}toggleChat(){return Object(ue.a)(this,void 0,void 0,function*(){this.state!==B4.Initializing&&(this.state===B4.Uninitialized&&(this.state=B4.Initializing,yield this.initialize(),this.state=B4.Initialized),N4.$chatwoot.toggle(),this.dialogActive=!this.dialogActive,setTimeout(()=>{N4.$chatwoot.setUser(this.user.email,{email:this.user.email})},500))})}initialize(){return Object(ue.a)(this,void 0,void 0,function*(){return new Promise(t=>{N4.chatwootSettings={hideMessageBubble:!0,position:"right",locale:"fr"};const e=document.createElement("script"),i=document.getElementsByTagName("script")[0];e.src="https://chat.anais.beta.gouv.fr/packs/js/sdk.js",i.parentNode.insertBefore(e,i),e.onload=()=>{N4.chatwootSDK.run({baseUrl:"https://chat.anais.beta.gouv.fr",websiteToken:"Bjc2UJejiNyuJXPgQpSNdiSV"}),N4.$chatwoot.reset(),window.addEventListener("message",t=>{'chatwoot-widget:{"event":"toggleBubble"}'===t.data&&(this.dialogActive=!1)}),t()}})})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(yI))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),z4=(()=>{class t{constructor(){this.screenshotMode$=new Av.a(!1)}toggleScreenshotMode(){this.screenshotMode$.next(!this.screenshotMode$.value)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),H4=(()=>{class t{constructor(t,e,i,n){this.historyService=t,this.mapConfigService=e,this.mapService=i,this.workerService=n}init(){Hg([this.mapService.view$,this.mapConfigService.manualMapFetch$]).pipe(Gg(1),He(([t,e])=>e)).subscribe(([t])=>{const e=qD.fromOLExtent(t.extent).toLatLonExtent();this.viewExtent(e)})}viewExtent(t){this.lastExtent=t}fetchData(){return Object(ue.a)(this,void 0,void 0,function*(){0!==this.historyService.timestamp$.value?this.mapConfigService.showShipsLayer$.value&&this.workerService.areaShipsFeeds$.next({area:new EC(0,0),data:yield this.workerService.ships.getShipsAtBboxAndTimestamp(this.lastExtent,this.historyService.timestamp$.value)}):yield Promise.all([this.mapConfigService.showShipsLayer$.value&&(()=>Object(ue.a)(this,void 0,void 0,function*(){this.workerService.areaShipsFeeds$.next({area:new EC(0,0),data:yield this.workerService.ships.getShipsAtBbox(this.lastExtent)})}))(),this.mapConfigService.showAircraftsLayer$.value&&(()=>Object(ue.a)(this,void 0,void 0,function*(){this.workerService.areaAircraftsFeeds$.next({area:new EC(0,0),data:yield this.workerService.aircrafts.getAircraftsAtBbox(this.lastExtent)})}))()])})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(bI),r.Zb(hI),r.Zb(pI),r.Zb(_I.a))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function K4(t,e){1&t&&(r.Vb(0,"mat-error",14),r.Kc(1," Le nom est obligatoire. "),r.Ub())}function $4(t,e){if(1&t&&(r.Vb(0,"mat-option",15),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.key),r.Db(1),r.Mc(" ",t.name," ")}}function G4(t,e){1&t&&(r.Vb(0,"mat-error",14),r.Kc(1," La position est obligatoire. "),r.Ub())}function W4(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-form-field",7),r.Vb(1,"mat-label"),r.Kc(2,"Position"),r.Ub(),r.Vb(3,"input",16),r.cc("accept",function(){return r.Ac(t),r.gc().onPositionUpdate()})("complete",function(e){return r.Ac(t),r.gc().onPositionComplete(e)}),r.Ub(),r.Ic(4,G4,2,0,"mat-error",4),r.Ub()}if(2&t){const t=r.gc();r.Db(3),r.nc("imask",t.lonLatMask),r.Db(1),r.nc("ngIf",null==t.form.controls.position.errors?null:t.form.controls.position.errors.required)}}let Z4=(()=>{class t extends LT{constructor(t,e){super(),this.formBuilder=t,this.annotationService=e,this.validGeom=!1,this.showColorPicker=!1,this.geometryTypes=PP,this.lonLatMask={mask:"LAT\xb0`MIN'`MIN\"NS LON\xb0`MIN'`MIN\"EW",lazy:!1,blocks:{LON:{mask:ob,from:0,to:180},LAT:{mask:ob,from:0,to:85},NS:{mask:gb,enum:["N","S"]},EW:{mask:gb,enum:["E","W"]},MIN:{mask:ob,from:0,to:59}}},this.updatingGeomFromLayer=!1,this.updatingGeomFromForm=!1,this.saveEditedAnnotation=()=>Object(ue.a)(this,void 0,void 0,function*(){yield this.annotationService.saveEditedAnnotation()})}ngOnInit(){var t,e;const i=this.annotationService.editedAnnotation$.value,n=null!==(e=null===(t=i.geom)||void 0===t?void 0:t.type)&&void 0!==e?e:this.annotationService.editedAnnotationGeomType$.value;this.form=this.formBuilder.group({name:[i.name,pc.required],description:[i.description],color:[i.color],geomType:[n]});const r="Point"===n&&i.geom?rI([i.lon,i.lat]):null;this.updatePositionControl(n,r),this.subscriptions.push(this.form.controls.geomType.valueChanges.subscribe(t=>{this.annotationService.editedAnnotationGeomType$.next(t),this.updatePositionControl(t)}),this.form.valueChanges.pipe(He(()=>!this.updatingGeomFromLayer&&!this.updatingGeomFromForm)).subscribe(t=>{this.annotationService.editedAnnotation$.value.name=t.name,this.annotationService.editedAnnotation$.value.description=t.description,this.annotationService.editedAnnotation$.value.color=t.color,this.annotationService.refreshEditedAnnotation()}),this.annotationService.editedAnnotation$.pipe(ar(t=>!!t),Object(Ge.a)(t=>t.geom),mn(),Pe(t=>{this.validGeom=!!t}),He(()=>!this.updatingGeomFromForm)).subscribe(t=>{if("Point"===(null==t?void 0:t.type)){const e=rI(t.coordinates);this.updatingGeomFromLayer=!0,this.form.get("position").setValue(e,{emitEvent:!1}),this.updatingGeomFromLayer=!1}}))}updatePositionControl(t,e){"Point"===t?(this.form.addControl("position",new eh(null!=e?e:"__\xb0__'__\"_ ___\xb0__'__\"_",pc.required)),this.form.controls.position.valueChanges.pipe(He(()=>!this.updatingGeomFromLayer&&!this.updatingGeomFromForm)).subscribe(()=>{this.updatingGeomFromForm=!0})):this.form.removeControl("position")}onPositionUpdate(){this.form.controls.position.setErrors({required:!0}),this.updatingGeomFromForm=!1}onPositionComplete(t){try{const{lon:e,lat:i}=WK()(t);this.form.controls.position.setErrors(null),this.updatingGeomFromLayer||(this.updatingGeomFromForm=!0,this.annotationService.updateEditedAnnotationGeom({type:"Point",coordinates:[e,i]}),this.updatingGeomFromForm=!1)}catch($nt){}}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Lh),r.Pb(MP))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-annotation-form"]],features:[r.Ab],decls:23,vars:12,consts:[[1,"pa-1","d-flex-column","annotation-form",3,"formGroup"],[1,"d-flex-baseline"],["appearance","outline",1,"pa-1","u-flex"],["matInput","","type","text","name","name","formControlName","name","required",""],["class","input-error",4,"ngIf"],["mat-mini-fab","","title","Changer la couleur du marqueur",1,"annotation-form__color-picker-button",3,"click"],["name","color","formControlName","color",1,"annotation-form__color-picker-attach",3,"colorPicker","cpAlphaChannel","cpOutputFormat","cpToggle","colorPickerChange","cpToggleChange"],["appearance","outline",1,"pa-1"],["matInput","","name","description","formControlName","description","cdkTextareaAutosize","","cdkAutosizeMinRows","3","cdkAutosizeMaxRows","6"],[1,"d-flex"],["name","geomType","formControlName","geomType","required",""],[3,"value",4,"ngFor","ngForOf"],["appearance","outline","class","pa-1",4,"ngIf"],["mat-stroked-button","","color","primary","title","Sauvegarder l'annotation",3,"app-async-action","disabled"],[1,"input-error"],[3,"value"],["matInput","","name","position","formControlName","position","required","",3,"imask","accept","complete"]],template:function(t,e){1&t&&(r.Vb(0,"form",0),r.Vb(1,"div",1),r.Vb(2,"mat-form-field",2),r.Vb(3,"mat-label"),r.Kc(4,"Nom"),r.Ub(),r.Qb(5,"input",3),r.Ic(6,K4,2,0,"mat-error",4),r.Ub(),r.Vb(7,"button",5),r.cc("click",function(){return e.showColorPicker=!e.showColorPicker}),r.Ub(),r.Vb(8,"input",6),r.cc("colorPickerChange",function(t){return e.form.get("color").setValue(t)})("cpToggleChange",function(t){return e.showColorPicker=t}),r.Ub(),r.Ub(),r.Vb(9,"mat-form-field",7),r.Vb(10,"mat-label"),r.Kc(11,"Description"),r.Ub(),r.Vb(12,"textarea",8),r.Kc(13," "),r.Ub(),r.Ub(),r.Vb(14,"div",9),r.Vb(15,"mat-form-field",7),r.Vb(16,"mat-label"),r.Kc(17,"Type"),r.Ub(),r.Vb(18,"mat-select",10),r.Ic(19,$4,2,2,"mat-option",11),r.Ub(),r.Ub(),r.Ic(20,W4,5,2,"mat-form-field",12),r.Ub(),r.Vb(21,"button",13),r.Kc(22,"Sauvegarder"),r.Ub(),r.Ub()),2&t&&(r.nc("formGroup",e.form),r.Db(6),r.nc("ngIf",null==e.form.controls.name.errors?null:e.form.controls.name.errors.required),r.Db(1),r.Fc("background-color",e.form.get("color").value),r.Db(1),r.nc("colorPicker",e.form.get("color").value)("cpAlphaChannel","disabled")("cpOutputFormat","hex")("cpToggle",e.showColorPicker),r.Db(11),r.nc("ngForOf",e.geometryTypes),r.Db(1),r.nc("ngIf","Point"===e.form.controls.geomType.value),r.Db(1),r.nc("app-async-action",e.saveEditedAnnotation)("disabled",e.form.invalid||!e.validGeom))},directives:[dh,Fc,_h,_u,cu,Ou,ac,Vc,Eh,Ih,ut,Dl,mv,Cu,Vg,ct,dR,nu,bl,Cb],styles:[".annotation-form[_ngcontent-%COMP%]{min-width:340px}.annotation-form__color-picker-button[_ngcontent-%COMP%]{margin-left:16px;margin-right:8px;height:30px;width:30px} .annotation-form__color-picker-button.mat-fab:not(.mat-button-disabled):active:not([class*=mat-elevation-z]), .annotation-form__color-picker-button.mat-mini-fab:not(.mat-button-disabled):active:not([class*=mat-elevation-z]){box-shadow:0 5px 7px -2px rgba(0,0,0,.2),0 8px 14px 2px rgba(0,0,0,.14),0 4px 20px 2px rgba(0,0,0,.12)!important}.annotation-form__color-picker-attach[_ngcontent-%COMP%]{opacity:0;width:1px;height:1px;pointer-events:none}"]}),t})();function q4(t){return!["INPUT","TEXTAREA"].includes(t.target.nodeName)}function Y4(t){return t.value instanceof Date?null:{invalid:!0}}function Q4(t,e){1&t&&r.Qb(0,"mat-spinner",19)}let X4=(()=>{class t extends LT{constructor(t,e,i){super(),this.historyService=t,this.mapConfigService=e,this.workerService=i,this.useUTCDates=!1,this.dateControl=new eh(null,[Y4]),this.inflightRequests=!1}ngOnInit(){this.subscriptions.push(this.mapConfigService.useUTCDates$.subscribe(t=>{this.useUTCDates=t}),this.dateControl.valueChanges.subscribe(t=>{this.historyService.setTimestamp(NO(t))}),this.workerService.inflightRequests$.subscribe(t=>{this.inflightRequests=t}))}ngOnDestroy(){super.ngOnDestroy()}updateMapTimestamp(t){this.selectedTimestamp!==t&&(this.selectedTimestamp=t,this.historyService.setTimestamp(this.selectedTimestamp))}formatTimestampAsDate(t){return t?K(1e3*t,"yyyy-MM-dd \xe0 HH:mm:ss","en-US"):""}onGlobalKeyUp(t){if(!this.historyService.timestamp$.value||!q4(t))return;const e=60*(t.shiftKey?30:5);"ArrowLeft"===t.key&&this.historyService.incrementTimestamp(-e),"ArrowRight"===t.key&&this.historyService.incrementTimestamp(e)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(bI),r.Pb(hI),r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-timeline-panel"]],hostBindings:function(t,e){1&t&&r.cc("keyup",function(t){return e.onGlobalKeyUp(t)},!1,r.zc)},features:[r.Ab],decls:36,vars:19,consts:[[1,"timeline-panel"],[1,"timeline-panel__header"],[1,"timeline-panel__title"],["class","mt-2","strokeWidth","3","diameter","30",4,"ngIf"],["matInput","",2,"width","0",3,"ngxMatDatetimePicker","formControl"],[3,"showSeconds"],["picker",""],["gid","history-datepicker","date","2021-06-17"],["mat-button","","title","Choisir une date",2,"height","100%",3,"disabled","click"],["gid","history-extrapolation","date","2021-05-21"],["mat-button","","title","[Exp\xe9rimental] Extrapoler les traces au temps exact (avec cap / vitesse)",2,"height","100%",3,"click"],[3,"color"],["mat-button","","title","Revenir au temps-r\xe9el",3,"click"],[1,"d-flex-center"],["mat-button","","title","Revenir 30 minutes en arri\xe8re",3,"disabled","click"],["mat-button","","title","Revenir 5 minutes en arri\xe8re",3,"disabled","click"],[1,"mx-2","u-flex"],["mat-button","","title","Avancer de 5 minutes",3,"disabled","click"],["mat-button","","title","Avancer de 30 minutes",3,"disabled","click"],["strokeWidth","3","diameter","30",1,"mt-2"]],template:function(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"div",2),r.Kc(3," Situation maritime instantan\xe9e "),r.Ub(),r.Ic(4,Q4,1,0,"mat-spinner",3),r.Qb(5,"input",4),r.Qb(6,"ngx-mat-datetime-picker",5,6),r.Vb(8,"app-glitter",7),r.Vb(9,"button",8),r.cc("click",function(){return r.Ac(t),r.wc(7).open()}),r.Vb(10,"mat-icon"),r.Kc(11,"today"),r.Ub(),r.Ub(),r.Ub(),r.Vb(12,"app-glitter",9),r.Vb(13,"button",10),r.cc("click",function(){return e.mapConfigService.toggleEnableHistoryModeExtrapolation()}),r.Vb(14,"mat-icon",11),r.Kc(15,"insights"),r.Ub(),r.Ub(),r.Ub(),r.Vb(16,"button",12),r.cc("click",function(){return e.historyService.resetTimestamp()}),r.Vb(17,"mat-icon"),r.Kc(18,"close"),r.Ub(),r.Ub(),r.Ub(),r.Vb(19,"div",13),r.Vb(20,"button",14),r.cc("click",function(){return e.historyService.incrementTimestamp(-1800)}),r.Vb(21,"mat-icon"),r.Kc(22,"replay_30"),r.Ub(),r.Ub(),r.Vb(23,"button",15),r.cc("click",function(){return e.historyService.incrementTimestamp(-300)}),r.Vb(24,"mat-icon"),r.Kc(25,"replay_5"),r.Ub(),r.Ub(),r.Vb(26,"div",16),r.Kc(27),r.hc(28,"date"),r.hc(29,"async"),r.Ub(),r.Vb(30,"button",17),r.cc("click",function(){return e.historyService.incrementTimestamp(300)}),r.Vb(31,"mat-icon"),r.Kc(32,"forward_5"),r.Ub(),r.Ub(),r.Vb(33,"button",18),r.cc("click",function(){return e.historyService.incrementTimestamp(1800)}),r.Vb(34,"mat-icon"),r.Kc(35,"forward_30"),r.Ub(),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=r.wc(7);r.Db(4),r.nc("ngIf",e.inflightRequests),r.Db(1),r.nc("ngxMatDatetimePicker",t)("formControl",e.dateControl),r.Db(1),r.nc("showSeconds",!0),r.Db(3),r.nc("disabled",e.inflightRequests),r.Db(5),r.Fc("font-weight",e.mapConfigService.enableHistoryModeExtrapolation$.value?"bold":"400"),r.nc("color",e.mapConfigService.enableHistoryModeExtrapolation$.value?"primary":"default"),r.Db(6),r.nc("disabled",e.inflightRequests),r.Db(3),r.nc("disabled",e.inflightRequests),r.Db(4),r.Lc(r.kc(28,13,1e3*r.ic(29,17,e.historyService.timestamp$),"yyyy-MM-dd \xe0 HH:mm:ss z",e.useUTCDates&&"z")),r.Db(3),r.nc("disabled",e.inflightRequests),r.Db(3),r.nc("disabled",e.inflightRequests)}},directives:[ut,Ou,am,ac,Vc,bh,im,DL,Dl,Yp,fF],pipes:[kt,St],styles:[".timeline-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:stretch}.timeline-panel__header[_ngcontent-%COMP%]{display:flex;background-color:#e6e6e6;min-height:50px}.timeline-panel__title[_ngcontent-%COMP%]{padding:.5em;font-size:1.1em;align-self:center;flex:1}"]}),t})(),J4=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-chip-experimental"]],decls:2,vars:0,consts:[["title","Cette fonctionnalit\xe9 est exp\xe9rimentale et peut rendre l'application instable.",1,"chip"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Kc(1,"Exp\xe9rimental"),r.Ub())},styles:[".chip[_ngcontent-%COMP%] {\n display: inline-block;\n padding: 3px 6px;\n border-radius: 8px;\n font-size: .7rem;\n line-height: 1rem;\n background-color: #df7132;\n color: #ffffff;\n}"],changeDetection:0}),t})();function t5(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",9),r.cc("click",function(){return r.Ac(t),r.gc().resetPlayback()}),r.Vb(1,"mat-icon"),r.Kc(2,"chevron_left"),r.Ub(),r.Ub()}}function e5(t,e){if(1&t&&(r.Vb(0,"div",10),r.Vb(1,"mat-form-field",11),r.Qb(2,"input",12),r.Qb(3,"mat-datepicker-toggle",13),r.Qb(4,"ngx-mat-datetime-picker",14,15),r.Ub(),r.Vb(6,"button",16),r.Kc(7," Charger le rejeu ! "),r.Ub(),r.Ub()),2&t){const t=r.wc(5),e=r.gc();r.Db(2),r.nc("ngxMatDatetimePicker",t)("formControl",e.dateControl),r.Db(1),r.nc("for",t),r.Db(1),r.nc("showSeconds",!1),r.Db(2),r.nc("app-async-action",e.loadPlayback)("disabled",e.dateControl.invalid)}}function i5(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",17),r.Vb(1,"button",18),r.cc("click",function(){return r.Ac(t),r.gc().playbackService.reinitiate()}),r.Vb(2,"mat-icon"),r.Kc(3,"restore"),r.Ub(),r.Ub(),r.Vb(4,"button",19),r.cc("click",function(){return r.Ac(t),r.gc().playbackService.togglePause()}),r.Vb(5,"mat-icon"),r.Kc(6),r.Ub(),r.Ub(),r.Vb(7,"div",20),r.Kc(8),r.hc(9,"date"),r.hc(10,"async"),r.Ub(),r.Vb(11,"button",21),r.cc("click",function(){return r.Ac(t),r.gc().playbackService.updateSpeed("-")}),r.Kc(12,"-"),r.Ub(),r.Vb(13,"div",22),r.Kc(14),r.hc(15,"async"),r.Ub(),r.Vb(16,"button",23),r.cc("click",function(){return r.Ac(t),r.gc().playbackService.updateSpeed("+")}),r.Kc(17,"+"),r.Ub(),r.Vb(18,"button",24),r.cc("click",function(){return r.Ac(t),r.gc().playbackService.toggleReverseMode()}),r.Vb(19,"mat-icon"),r.Kc(20),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.Db(4),r.nc("title",t.playbackService.paused$.value?"D\xe9marrer la lecture":"Mettre en pause la lecture"),r.Db(2),r.Lc(t.playbackService.paused$.value?"play_arrow":"pause"),r.Db(2),r.Lc(r.kc(9,5,1e3*r.ic(10,9,t.playbackService.animationTimestamp$),"yyyy-MM-dd \xe0 HH:mm z",t.useUTCDates&&"z")),r.Db(6),r.Mc("x",r.ic(15,11,t.playbackService.animationSpeed$)," "),r.Db(6),r.Lc(t.playbackService.reverseMode$.value?"west":"east")}}let n5=(()=>{class t extends LT{constructor(t,e){super(),this.playbackService=t,this.mapConfigService=e,this.experimentalText="Cette fonctionnalit\xe9 est exp\xe9rimentale et n'est pas compl\xe8tement adapt\xe9e au reste des fonctionnalit\xe9s ANAIS. Ne fonctionnent pas :\n- les filtres sur les navires ;\n- les \xe9tiquettes permanentes ;\n- le clic sur les navires pour ouvrir la fiche navire ou visualiser les traces.\nLes donn\xe9es sont charg\xe9es par heure avec 1 seule position prise toutes les 6 minutes.\nIl se peut que la trajectoire affich\xe9e ne repr\xe9sente pas la r\xe9alit\xe9 si leur trajectoire n'est pas stable (contrairement \xe0 un cargo par exemple).",this.useUTCDates=!1,this.dateControl=new eh(null,[Y4]),this.playbackLoaded=!1,this.loadingPlayback=!1,this.duration=3600,this.loadPlayback=()=>Object(ue.a)(this,void 0,void 0,function*(){this.loadingPlayback=!0;try{yield this.playbackService.loadPlayback(NO(this.dateControl.value),this.duration)}finally{this.loadingPlayback=!1}this.playbackLoaded=!0})}ngOnInit(){this.subscriptions.push(this.mapConfigService.useUTCDates$.subscribe(t=>{this.useUTCDates=t}))}resetPlayback(){this.playbackLoaded=!1,this.playbackService.exitPlaybackMode(),this.playbackService.enterPlaybackMode()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(tM),r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-playback-panel"]],features:[r.Ab],decls:13,vars:4,consts:[[1,"playback-panel"],[1,"playback-panel__header"],[1,"playback-panel__title","d-flex-center"],[1,"ml-1"],["matTooltipPosition","above",1,"ml-1",2,"cursor","help",3,"matTooltip"],["mat-button","","title","Revenir au choix de la date",3,"click",4,"ngIf"],["mat-button","","title","Fermer le panneau","routerLink","/"],["class","d-flex pa-2",4,"ngIf"],["class","d-flex-center",4,"ngIf"],["mat-button","","title","Revenir au choix de la date",3,"click"],[1,"d-flex","pa-2"],["appearance","outline",1,"mr-2","playback-panel__date-input"],["matInput","","placeholder","S\xe9lectionnez une date",3,"ngxMatDatetimePicker","formControl"],["matSuffix","",3,"for"],[3,"showSeconds"],["picker",""],["mat-stroked-button","","title","Charger les donn\xe9es du rejeu",3,"app-async-action","disabled"],[1,"d-flex-center"],["mat-button","","title","Revenir \xe0 l'heure de d\xe9part",3,"click"],["mat-button","",3,"title","click"],[1,"mx-2"],["mat-button","","title","Diminuer la vitesse de lecture",3,"click"],["title","Vitesse de lecture (x1 = 1 seconde de lecture \xe9quivaut \xe0 6 secondes r\xe9elles)",1,"mx-2"],["mat-button","","title","Augmenter la vitesse de lecture",3,"click"],["mat-button","","title","Changer le sens de lecture",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"div",2),r.Kc(3," Rejeu de situation "),r.Qb(4,"app-chip-experimental",3),r.Vb(5,"mat-icon",4),r.Kc(6,"help"),r.Ub(),r.Ub(),r.Ic(7,t5,3,0,"button",5),r.Vb(8,"button",6),r.Vb(9,"mat-icon"),r.Kc(10,"close"),r.Ub(),r.Ub(),r.Ub(),r.Ic(11,e5,8,6,"div",7),r.Ic(12,i5,21,13,"div",8),r.Ub()),2&t&&(r.Db(5),r.nc("matTooltip",e.experimentalText),r.Db(2),r.nc("ngIf",e.playbackLoaded),r.Db(4),r.nc("ngIf",!e.playbackLoaded),r.Db(1),r.nc("ngIf",e.playbackLoaded))},directives:[J4,Yp,oA,ut,Dl,ow,_u,Ou,am,ac,Vc,bh,Bd,fu,im,dR],pipes:[kt,St],styles:[".playback-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:stretch}.playback-panel__header[_ngcontent-%COMP%]{display:flex;background-color:#e6e6e6;min-height:50px}.playback-panel__title[_ngcontent-%COMP%]{padding:.5em;font-size:1.1em;align-self:center;flex:1}.playback-panel__date-input[_ngcontent-%COMP%] .mat-form-field-wrapper{padding-bottom:0!important;margin:0!important}"]}),t})();function r5(t,e){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var i in e=e||{})e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function s5(t,e,i){ZP(2,arguments);var n=i||{},r=n.locale,s=r&&r.options&&r.options.weekStartsOn,o=null==s?0:sO(s),a=null==n.weekStartsOn?o:sO(n.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var l=qP(t),c=sO(e),h=l.getUTCDay(),u=c%7,d=(u+7)%7,p=(d<a?7:0)+c-h;return l.setUTCDate(l.getUTCDate()+p),l}var o5=/^(1[0-2]|0?\d)/,a5=/^(3[0-1]|[0-2]?\d)/,l5=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,c5=/^(5[0-3]|[0-4]?\d)/,h5=/^(2[0-3]|[0-1]?\d)/,u5=/^(2[0-4]|[0-1]?\d)/,d5=/^(1[0-1]|0?\d)/,p5=/^(1[0-2]|0?\d)/,f5=/^[0-5]?\d/,m5=/^[0-5]?\d/,g5=/^\d/,A5=/^\d{1,2}/,b5=/^\d{1,3}/,v5=/^\d{1,4}/,_5=/^-?\d+/,y5=/^-?\d/,w5=/^-?\d{1,2}/,x5=/^-?\d{1,3}/,C5=/^-?\d{1,4}/,S5=/^([+-])(\d{2})(\d{2})?|Z/,k5=/^([+-])(\d{2})(\d{2})|Z/,E5=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,D5=/^([+-])(\d{2}):(\d{2})|Z/,I5=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function P5(t,e,i){var n=e.match(t);if(!n)return null;var r=parseInt(n[0],10);return{value:i?i(r):r,rest:e.slice(n[0].length)}}function O5(t,e){var i=e.match(t);return i?"Z"===i[0]?{value:0,rest:e.slice(1)}:{value:("+"===i[1]?1:-1)*(36e5*(i[2]?parseInt(i[2],10):0)+6e4*(i[3]?parseInt(i[3],10):0)+1e3*(i[5]?parseInt(i[5],10):0)),rest:e.slice(i[0].length)}:null}function M5(t,e){return P5(_5,t,e)}function T5(t,e,i){switch(t){case 1:return P5(g5,e,i);case 2:return P5(A5,e,i);case 3:return P5(b5,e,i);case 4:return P5(v5,e,i);default:return P5(new RegExp("^\\d{1,"+t+"}"),e,i)}}function R5(t,e,i){switch(t){case 1:return P5(y5,e,i);case 2:return P5(w5,e,i);case 3:return P5(x5,e,i);case 4:return P5(C5,e,i);default:return P5(new RegExp("^-?\\d{1,"+t+"}"),e,i)}}function V5(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function F5(t,e){var i,n=e>0,r=n?e:1-e;if(r<=50)i=t||100;else{var s=r+50;i=t+100*Math.floor(s/100)-(t>=s%100?100:0)}return n?i:1-i}var L5=[31,28,31,30,31,30,31,31,30,31,30,31],U5=[31,29,31,30,31,30,31,31,30,31,30,31];function B5(t){return t%400==0||t%4==0&&t%100!=0}var N5={G:{priority:140,parse:function(t,e,i,n){switch(e){case"G":case"GG":case"GGG":return i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"});case"GGGGG":return i.era(t,{width:"narrow"});case"GGGG":default:return i.era(t,{width:"wide"})||i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"})}},set:function(t,e,i,n){return e.era=i,t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["R","u","t","T"]},y:{priority:130,parse:function(t,e,i,n){var r=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return T5(4,t,r);case"yo":return i.ordinalNumber(t,{unit:"year",valueCallback:r});default:return T5(e.length,t,r)}},validate:function(t,e,i){return e.isTwoDigitYear||e.year>0},set:function(t,e,i,n){var r=t.getUTCFullYear();if(i.isTwoDigitYear){var s=F5(i.year,r);return t.setUTCFullYear(s,0,1),t.setUTCHours(0,0,0,0),t}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","u","w","I","i","e","c","t","T"]},Y:{priority:130,parse:function(t,e,i,n){var r=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return T5(4,t,r);case"Yo":return i.ordinalNumber(t,{unit:"year",valueCallback:r});default:return T5(e.length,t,r)}},validate:function(t,e,i){return e.isTwoDigitYear||e.year>0},set:function(t,e,i,n){var r=fO(t,n);if(i.isTwoDigitYear){var s=F5(i.year,r);return t.setUTCFullYear(s,0,n.firstWeekContainsDate),t.setUTCHours(0,0,0,0),pO(t,n)}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,n.firstWeekContainsDate),t.setUTCHours(0,0,0,0),pO(t,n)},incompatibleTokens:["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:{priority:130,parse:function(t,e,i,n){return R5("R"===e?4:e.length,t)},set:function(t,e,i,n){var r=new Date(0);return r.setUTCFullYear(i,0,4),r.setUTCHours(0,0,0,0),cO(r)},incompatibleTokens:["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:{priority:130,parse:function(t,e,i,n){return R5("u"===e?4:e.length,t)},set:function(t,e,i,n){return t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["G","y","Y","R","w","I","i","e","c","t","T"]},Q:{priority:120,parse:function(t,e,i,n){switch(e){case"Q":case"QQ":return T5(e.length,t);case"Qo":return i.ordinalNumber(t,{unit:"quarter"});case"QQQ":return i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(t,{width:"wide",context:"formatting"})||i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,i){return e>=1&&e<=4},set:function(t,e,i,n){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:{priority:120,parse:function(t,e,i,n){switch(e){case"q":case"qq":return T5(e.length,t);case"qo":return i.ordinalNumber(t,{unit:"quarter"});case"qqq":return i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(t,{width:"wide",context:"standalone"})||i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"})}},validate:function(t,e,i){return e>=1&&e<=4},set:function(t,e,i,n){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:{priority:110,parse:function(t,e,i,n){var r=function(t){return t-1};switch(e){case"M":return P5(o5,t,r);case"MM":return T5(2,t,r);case"Mo":return i.ordinalNumber(t,{unit:"month",valueCallback:r});case"MMM":return i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(t,{width:"wide",context:"formatting"})||i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,i){return e>=0&&e<=11},set:function(t,e,i,n){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]},L:{priority:110,parse:function(t,e,i,n){var r=function(t){return t-1};switch(e){case"L":return P5(o5,t,r);case"LL":return T5(2,t,r);case"Lo":return i.ordinalNumber(t,{unit:"month",valueCallback:r});case"LLL":return i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(t,{width:"wide",context:"standalone"})||i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"})}},validate:function(t,e,i){return e>=0&&e<=11},set:function(t,e,i,n){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:{priority:100,parse:function(t,e,i,n){switch(e){case"w":return P5(c5,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return T5(e.length,t)}},validate:function(t,e,i){return e>=1&&e<=53},set:function(t,e,i,n){return pO(function(t,e,i){ZP(2,arguments);var n=qP(t),r=sO(e),s=gO(n,i)-r;return n.setUTCDate(n.getUTCDate()-7*s),n}(t,i,n),n)},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:{priority:100,parse:function(t,e,i,n){switch(e){case"I":return P5(c5,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return T5(e.length,t)}},validate:function(t,e,i){return e>=1&&e<=53},set:function(t,e,i,n){return cO(function(t,e){ZP(2,arguments);var i=qP(t),n=sO(e),r=dO(i)-n;return i.setUTCDate(i.getUTCDate()-7*r),i}(t,i,n),n)},incompatibleTokens:["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:{priority:90,subPriority:1,parse:function(t,e,i,n){switch(e){case"d":return P5(a5,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return T5(e.length,t)}},validate:function(t,e,i){var n=B5(t.getUTCFullYear()),r=t.getUTCMonth();return n?e>=1&&e<=U5[r]:e>=1&&e<=L5[r]},set:function(t,e,i,n){return t.setUTCDate(i),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:{priority:90,subPriority:1,parse:function(t,e,i,n){switch(e){case"D":case"DD":return P5(l5,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return T5(e.length,t)}},validate:function(t,e,i){return B5(t.getUTCFullYear())?e>=1&&e<=366:e>=1&&e<=365},set:function(t,e,i,n){return t.setUTCMonth(0,i),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:{priority:90,parse:function(t,e,i,n){switch(e){case"E":case"EE":case"EEE":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,i){return e>=0&&e<=6},set:function(t,e,i,n){return(t=s5(t,i,n)).setUTCHours(0,0,0,0),t},incompatibleTokens:["D","i","e","c","t","T"]},e:{priority:90,parse:function(t,e,i,n){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+n.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return T5(e.length,t,r);case"eo":return i.ordinalNumber(t,{unit:"day",valueCallback:r});case"eee":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeeee":return i.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,i){return e>=0&&e<=6},set:function(t,e,i,n){return(t=s5(t,i,n)).setUTCHours(0,0,0,0),t},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:{priority:90,parse:function(t,e,i,n){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+n.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return T5(e.length,t,r);case"co":return i.ordinalNumber(t,{unit:"day",valueCallback:r});case"ccc":return i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"ccccc":return i.day(t,{width:"narrow",context:"standalone"});case"cccccc":return i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return i.day(t,{width:"wide",context:"standalone"})||i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"})}},validate:function(t,e,i){return e>=0&&e<=6},set:function(t,e,i,n){return(t=s5(t,i,n)).setUTCHours(0,0,0,0),t},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:{priority:90,parse:function(t,e,i,n){var r=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return T5(e.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return i.day(t,{width:"abbreviated",context:"formatting",valueCallback:r})||i.day(t,{width:"short",context:"formatting",valueCallback:r})||i.day(t,{width:"narrow",context:"formatting",valueCallback:r});case"iiiii":return i.day(t,{width:"narrow",context:"formatting",valueCallback:r});case"iiiiii":return i.day(t,{width:"short",context:"formatting",valueCallback:r})||i.day(t,{width:"narrow",context:"formatting",valueCallback:r});case"iiii":default:return i.day(t,{width:"wide",context:"formatting",valueCallback:r})||i.day(t,{width:"abbreviated",context:"formatting",valueCallback:r})||i.day(t,{width:"short",context:"formatting",valueCallback:r})||i.day(t,{width:"narrow",context:"formatting",valueCallback:r})}},validate:function(t,e,i){return e>=1&&e<=7},set:function(t,e,i,n){return(t=function(t,e){ZP(2,arguments);var i=sO(e);i%7==0&&(i-=7);var n=1,r=qP(t),s=r.getUTCDay(),o=((i%7+7)%7<n?7:0)+i-s;return r.setUTCDate(r.getUTCDate()+o),r}(t,i,n)).setUTCHours(0,0,0,0),t},incompatibleTokens:["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:{priority:80,parse:function(t,e,i,n){switch(e){case"a":case"aa":case"aaa":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}},set:function(t,e,i,n){return t.setUTCHours(V5(i),0,0,0),t},incompatibleTokens:["b","B","H","K","k","t","T"]},b:{priority:80,parse:function(t,e,i,n){switch(e){case"b":case"bb":case"bbb":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}},set:function(t,e,i,n){return t.setUTCHours(V5(i),0,0,0),t},incompatibleTokens:["a","B","H","K","k","t","T"]},B:{priority:80,parse:function(t,e,i,n){switch(e){case"B":case"BB":case"BBB":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}},set:function(t,e,i,n){return t.setUTCHours(V5(i),0,0,0),t},incompatibleTokens:["a","b","t","T"]},h:{priority:70,parse:function(t,e,i,n){switch(e){case"h":return P5(p5,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return T5(e.length,t)}},validate:function(t,e,i){return e>=1&&e<=12},set:function(t,e,i,n){var r=t.getUTCHours()>=12;return t.setUTCHours(r&&i<12?i+12:r||12!==i?i:0,0,0,0),t},incompatibleTokens:["H","K","k","t","T"]},H:{priority:70,parse:function(t,e,i,n){switch(e){case"H":return P5(h5,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return T5(e.length,t)}},validate:function(t,e,i){return e>=0&&e<=23},set:function(t,e,i,n){return t.setUTCHours(i,0,0,0),t},incompatibleTokens:["a","b","h","K","k","t","T"]},K:{priority:70,parse:function(t,e,i,n){switch(e){case"K":return P5(d5,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return T5(e.length,t)}},validate:function(t,e,i){return e>=0&&e<=11},set:function(t,e,i,n){var r=t.getUTCHours()>=12;return t.setUTCHours(r&&i<12?i+12:i,0,0,0),t},incompatibleTokens:["a","b","h","H","k","t","T"]},k:{priority:70,parse:function(t,e,i,n){switch(e){case"k":return P5(u5,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return T5(e.length,t)}},validate:function(t,e,i){return e>=1&&e<=24},set:function(t,e,i,n){return t.setUTCHours(i<=24?i%24:i,0,0,0),t},incompatibleTokens:["a","b","h","H","K","t","T"]},m:{priority:60,parse:function(t,e,i,n){switch(e){case"m":return P5(f5,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return T5(e.length,t)}},validate:function(t,e,i){return e>=0&&e<=59},set:function(t,e,i,n){return t.setUTCMinutes(i,0,0),t},incompatibleTokens:["t","T"]},s:{priority:50,parse:function(t,e,i,n){switch(e){case"s":return P5(m5,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return T5(e.length,t)}},validate:function(t,e,i){return e>=0&&e<=59},set:function(t,e,i,n){return t.setUTCSeconds(i,0),t},incompatibleTokens:["t","T"]},S:{priority:30,parse:function(t,e,i,n){return T5(e.length,t,function(t){return Math.floor(t*Math.pow(10,3-e.length))})},set:function(t,e,i,n){return t.setUTCMilliseconds(i),t},incompatibleTokens:["t","T"]},X:{priority:10,parse:function(t,e,i,n){switch(e){case"X":return O5(S5,t);case"XX":return O5(k5,t);case"XXXX":return O5(E5,t);case"XXXXX":return O5(I5,t);case"XXX":default:return O5(D5,t)}},set:function(t,e,i,n){return e.timestampIsSet?t:new Date(t.getTime()-i)},incompatibleTokens:["t","T","x"]},x:{priority:10,parse:function(t,e,i,n){switch(e){case"x":return O5(S5,t);case"xx":return O5(k5,t);case"xxxx":return O5(E5,t);case"xxxxx":return O5(I5,t);case"xxx":default:return O5(D5,t)}},set:function(t,e,i,n){return e.timestampIsSet?t:new Date(t.getTime()-i)},incompatibleTokens:["t","T","X"]},t:{priority:40,parse:function(t,e,i,n){return M5(t)},set:function(t,e,i,n){return[new Date(1e3*i),{timestampIsSet:!0}]},incompatibleTokens:"*"},T:{priority:20,parse:function(t,e,i,n){return M5(t)},set:function(t,e,i,n){return[new Date(i),{timestampIsSet:!0}]},incompatibleTokens:"*"}},j5=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,z5=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,H5=/^'([^]*?)'?$/,K5=/''/g,$5=/\S/,G5=/[a-zA-Z]/;function W5(t,e,i,n){ZP(3,arguments);var r=String(t),s=String(e),o=n||{},a=o.locale||rO;if(!a.match)throw new RangeError("locale must contain match property");var l=a.options&&a.options.firstWeekContainsDate,c=null==l?1:sO(l),h=null==o.firstWeekContainsDate?c:sO(o.firstWeekContainsDate);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=a.options&&a.options.weekStartsOn,d=null==u?0:sO(u),p=null==o.weekStartsOn?d:sO(o.weekStartsOn);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===s)return""===r?qP(i):new Date(NaN);var f,m={firstWeekContainsDate:h,weekStartsOn:p,locale:a},g=[{priority:10,subPriority:-1,set:Z5,index:0}],A=s.match(z5).map(function(t){var e=t[0];return"p"===e||"P"===e?(0,xO[e])(t,a.formatLong,m):t}).join("").match(j5),b=[];for(f=0;f<A.length;f++){var v=A[f];!o.useAdditionalWeekYearTokens&&IO(v)&&PO(v,s,t),!o.useAdditionalDayOfYearTokens&&DO(v)&&PO(v,s,t);var _=v[0],y=N5[_];if(y){var w=y.incompatibleTokens;if(Array.isArray(w)){for(var x=void 0,C=0;C<b.length;C++){var S=b[C].token;if(-1!==w.indexOf(S)||S===_){x=b[C];break}}if(x)throw new RangeError("The format string mustn't contain `".concat(x.fullToken,"` and `").concat(v,"` at the same time"))}else if("*"===y.incompatibleTokens&&b.length)throw new RangeError("The format string mustn't contain `".concat(v,"` and any other token at the same time"));b.push({token:_,fullToken:v});var k=y.parse(r,v,a.match,m);if(!k)return new Date(NaN);g.push({priority:y.priority,subPriority:y.subPriority||0,set:y.set,validate:y.validate,value:k.value,index:g.length}),r=k.rest}else{if(_.match(G5))throw new RangeError("Format string contains an unescaped latin alphabet character `"+_+"`");if("''"===v?v="'":"'"===_&&(v=q5(v)),0!==r.indexOf(v))return new Date(NaN);r=r.slice(v.length)}}if(r.length>0&&$5.test(r))return new Date(NaN);var E=g.map(function(t){return t.priority}).sort(function(t,e){return e-t}).filter(function(t,e,i){return i.indexOf(t)===e}).map(function(t){return g.filter(function(e){return e.priority===t}).sort(function(t,e){return e.subPriority-t.subPriority})}).map(function(t){return t[0]}),D=qP(i);if(isNaN(D))return new Date(NaN);var I=aO(D,SO(D)),P={};for(f=0;f<E.length;f++){var O=E[f];if(O.validate&&!O.validate(I,O.value,m))return new Date(NaN);var M=O.set(I,P,O.value,m);M[0]?(I=M[0],r5(P,M[1])):I=M}return I}function Z5(t,e){if(e.timestampIsSet)return t;var i=new Date(0);return i.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),i.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),i}function q5(t){return t.match(H5)[1].replace(K5,"'")}function Y5(t,e){1&t&&(r.Vb(0,"mat-error",6),r.Kc(1," Ce champ ne peut \xeatre vide. "),r.Ub())}function Q5(t,e){1&t&&(r.Vb(0,"mat-error",6),r.Kc(1," Ce champ ne peut \xeatre vide. "),r.Ub())}function X5(t,e){1&t&&(r.Vb(0,"mat-error",6),r.Kc(1," La vitesse doit \xeatre sup\xe9rieure \xe0 0 kt. "),r.Ub())}let J5=(()=>{class t extends LT{constructor(t,e){super(),this.formBuilder=t,this.pimService=e,this.startDateMask={mask:Date,pattern:"YYYY-`MM-`DD `HH:`mm",lazy:!1,min:new Date(2018,0,1),max:new Date(2025,0,1),format:t=>FO(t,"yyyy-MM-dd HH:mm"),parse:t=>W5(t,"yyyy-MM-dd HH:mm",new Date),blocks:{YYYY:{mask:ob,from:2018,to:2025},MM:{mask:ob,from:1,to:12},DD:{mask:ob,from:1,to:31},HH:{mask:ob,from:0,to:23},mm:{mask:ob,from:0,to:59}}}}ngOnInit(){this.form=this.formBuilder.group({startDate:[FO(new Date(1e3*this.pimService.nextStartDate$.value),"yyyy-MM-dd HH:mm"),[pc.required]],speed:[this.pimService.nextSpeed$.value,[pc.required,pc.min(.1)]]}),this.subscriptions.push(this.form.controls.speed.valueChanges.subscribe(t=>{t>0&&this.pimService.nextSpeed$.next(t)}))}resetStartDate(){this.form.controls.startDate.setValue(FO(new Date,"yyyy-MM-dd HH:mm"))}onStartDateComplete(t){this.pimService.nextStartDate$.next(NO(W5(t,"yyyy-MM-dd HH:mm",new Date)))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Lh),r.Pb(KO))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-pim-form"]],features:[r.Ab],decls:13,vars:5,consts:[[1,"pa-3","d-flex-column",3,"formGroup"],[1,"mat-small","mb-2"],["matInput","","placeholder","Date et heure de d\xe9part du PIM","name","startDate","formControlName","startDate","required","",3,"imask","complete"],["class","input-error",4,"ngIf"],["mat-button","","matSuffix","","mat-icon-button","","title","R\xe9initialiser \xe0 la date actuelle",3,"click"],["matInput","","type","number","placeholder","Vitesse (en n\u0153uds) du tron\xe7on en cours de trac\xe9 ","name","speed","formControlName","speed","required","","min","0","max","50"],[1,"input-error"]],template:function(t,e){1&t&&(r.Vb(0,"form",0),r.Vb(1,"div",1),r.Kc(2,"Ces informations ci-dessous permettent de modifier les informations du PIM en cours de trac\xe9."),r.Ub(),r.Vb(3,"mat-form-field"),r.Vb(4,"input",2),r.cc("complete",function(t){return e.onStartDateComplete(t)}),r.Ub(),r.Ic(5,Y5,2,0,"mat-error",3),r.Vb(6,"button",4),r.cc("click",function(){return e.resetStartDate()}),r.Vb(7,"mat-icon"),r.Kc(8,"restore"),r.Ub(),r.Ub(),r.Ub(),r.Vb(9,"mat-form-field"),r.Qb(10,"input",5),r.Ic(11,Q5,2,0,"mat-error",3),r.Ic(12,X5,2,0,"mat-error",3),r.Ub(),r.Ub()),2&t&&(r.nc("formGroup",e.form),r.Db(4),r.nc("imask",e.startDateMask),r.Db(1),r.nc("ngIf",null==e.form.controls.startDate.errors?null:e.form.controls.startDate.errors.required),r.Db(6),r.nc("ngIf",null==e.form.controls.speed.errors?null:e.form.controls.speed.errors.required),r.Db(1),r.nc("ngIf",null==e.form.controls.speed.errors?null:e.form.controls.speed.errors.min))},directives:[dh,Fc,_h,_u,Ou,ac,Vc,Eh,Ih,Cb,ut,Dl,fu,Yp,fh,nu],styles:[""]}),t})();function t8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",5),r.Vb(1,"div",6),r.Vb(2,"div",7),r.Kc(3),r.Ub(),r.Vb(4,"button",8),r.cc("click",function(){return r.Ac(t),r.gc().annotationsService.cancelEditing()}),r.Vb(5,"mat-icon"),r.Kc(6,"close"),r.Ub(),r.Ub(),r.Ub(),r.Qb(7,"app-annotation-form"),r.Ub()}if(2&t){const t=r.gc();r.Db(3),r.Mc(" ",t.isNewAnnotation?"Nouvelle annotation":"\xc9dition d'une annotation"," ")}}function e8(t,e){1&t&&(r.Vb(0,"div",13),r.Vb(1,"mat-icon",11),r.Kc(2,"warning"),r.Ub(),r.Kc(3," La zone utilise trop d'hexagones. Veuillez r\xe9duire leur nombre. "),r.Ub())}function i8(t,e){if(1&t&&(r.Vb(0,"div",9),r.Vb(1,"div",10),r.Vb(2,"mat-icon",11),r.Kc(3,"warning"),r.Ub(),r.Kc(4," Attention, la modification d'une zone est effective imm\xe9diatement et impacte toutes les r\xe8gles l'utilisant. "),r.Ub(),r.Ic(5,e8,4,0,"div",12),r.Ub()),2&t){const t=r.gc();r.Db(5),r.nc("ngIf",t.tooManyHexagons)}}function n8(t,e){1&t&&r.Qb(0,"app-timeline-panel")}function r8(t,e){1&t&&r.Qb(0,"app-playback-panel")}function s8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div"),r.Vb(1,"button",14),r.cc("click",function(){return r.Ac(t),r.gc().mapRestrictionService.cancelSelectingArea()}),r.Kc(2," Annuler "),r.Ub(),r.Vb(3,"button",15),r.cc("click",function(){return r.Ac(t),r.gc().mapRestrictionService.finishSelectingArea()}),r.Kc(4," Restreindre \xe0 cette vue "),r.Ub(),r.Ub()}}function o8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",16),r.Vb(1,"div",17),r.Kc(2," Mode mesure "),r.Ub(),r.Vb(3,"button",18),r.cc("click",function(){return r.Ac(t),r.gc().measureService.toggleMeasureMode()}),r.Vb(4,"mat-icon"),r.Kc(5,"close"),r.Ub(),r.Ub(),r.Ub()}}function a8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",5),r.Vb(1,"div",6),r.Vb(2,"div",7),r.Kc(3," Mode PIM "),r.Ub(),r.Vb(4,"button",19),r.cc("click",function(){return r.Ac(t),r.gc().pimService.togglePIMMode()}),r.Vb(5,"mat-icon"),r.Kc(6,"close"),r.Ub(),r.Ub(),r.Ub(),r.Qb(7,"app-pim-form"),r.Ub()}}let l8=(()=>{class t extends LT{constructor(t,e,i,n,r,s,o){super(),this.annotationsService=t,this.editZoneService=e,this.historyService=i,this.mapRestrictionService=n,this.measureService=r,this.pimService=s,this.playbackService=o,this.show=!1,this.isEditingAnnotation=!1,this.isNewAnnotation=!0,this.isEditingZone=!1,this.tooManyHexagons=!1,this.isSelectingArea=!1,this.isHistoryModeActive=!1,this.isMeasureModeActive=!1,this.isPIMModeActive=!1,this.isPlaybackModeActive=!1}ngOnInit(){this.subscriptions.push(this.annotationsService.editedAnnotation$.pipe(Object(Ge.a)(t=>!!t),mn()).subscribe(t=>{this.isEditingAnnotation=t}),this.annotationsService.editedAnnotation$.pipe(Object(Ge.a)(t=>!(null==t?void 0:t.id)),mn()).subscribe(t=>{this.isNewAnnotation=t}),this.editZoneService.editedZone$.pipe(Object(Ge.a)(t=>!!t),mn()).subscribe(t=>{this.isEditingZone=t}),this.editZoneService.tooManyHexagons$.pipe(mn()).subscribe(t=>{this.tooManyHexagons=t}),this.mapRestrictionService.isSelectingArea$.pipe(mn()).subscribe(t=>{this.isSelectingArea=t}),this.historyService.timestamp$.pipe(Object(Ge.a)(t=>!!t),mn()).subscribe(t=>{this.isHistoryModeActive=t}),this.measureService.active$.pipe(mn()).subscribe(t=>{this.isMeasureModeActive=t}),this.pimService.active$.pipe(mn()).subscribe(t=>{this.isPIMModeActive=t}),this.playbackService.active$.pipe(mn()).subscribe(t=>{this.isPlaybackModeActive=t}),Hg([this.annotationsService.editedAnnotation$.pipe(Object(Ge.a)(t=>!!t)),this.editZoneService.editedZone$.pipe(Object(Ge.a)(t=>!!t)),this.mapRestrictionService.isSelectingArea$,this.historyService.timestamp$.pipe(Object(Ge.a)(t=>!!t)),this.measureService.active$,this.pimService.active$,this.playbackService.active$]).pipe(mn()).subscribe(([t,e,i,n,r,s,o])=>{this.show=t||e||i||n||r||s||o}))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(MP),r.Pb(sL),r.Pb(bI),r.Pb(RK),r.Pb(WP),r.Pb(KO),r.Pb(tM))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-context-info-bar"]],features:[r.Ab],decls:8,vars:9,consts:[[1,"context-info-bar"],["class","bar d-flex-column",4,"ngIf"],["class","pa-2",4,"ngIf"],[4,"ngIf"],["class","bar",4,"ngIf"],[1,"bar","d-flex-column"],[1,"d-flex",2,"background-color","#ededed"],[1,"u-flex","pa-3",2,"align-self","center"],["mat-button","","title","Quitter le mode annotation",3,"click"],[1,"pa-2"],[1,"d-flex-center"],[1,"mr-2"],["class","d-flex-center error-message",4,"ngIf"],[1,"d-flex-center","error-message"],["mat-button","",3,"click"],["mat-button","","color","primary",3,"click"],[1,"bar"],[1,"pa-3",2,"align-self","center"],["mat-button","","title","Quitter le mode mesure",3,"click"],["mat-button","","title","Quitter le mode PIM",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Ic(1,t8,8,1,"div",1),r.Ic(2,i8,6,1,"div",2),r.Ic(3,n8,1,0,"app-timeline-panel",3),r.Ic(4,r8,1,0,"app-playback-panel",3),r.Ic(5,s8,5,0,"div",3),r.Ic(6,o8,6,0,"div",4),r.Ic(7,a8,8,0,"div",1),r.Ub()),2&t&&(r.Hb("context-info-bar--visible",e.show),r.Db(1),r.nc("ngIf",e.isEditingAnnotation),r.Db(1),r.nc("ngIf",e.isEditingZone),r.Db(1),r.nc("ngIf",e.isHistoryModeActive),r.Db(1),r.nc("ngIf",e.isPlaybackModeActive),r.Db(1),r.nc("ngIf",e.isSelectingArea),r.Db(1),r.nc("ngIf",e.isMeasureModeActive),r.Db(1),r.nc("ngIf",e.isPIMModeActive))},directives:[ut,Dl,Yp,Z4,X4,n5,J5],styles:[".context-info-bar[_ngcontent-%COMP%]{position:fixed;z-index:10;bottom:2em;left:50%;transform:translateX(-50%) translateY(200%);transition:all .5s;opacity:0;background-color:#fff;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2)}@media (max-width:1366px){.context-info-bar[_ngcontent-%COMP%]{bottom:3em}}.context-info-bar--visible[_ngcontent-%COMP%]{opacity:1;transform:translateX(-50%) translateY(0)}.bar[_ngcontent-%COMP%]{display:flex;min-height:50px}"]}),t})(),c8=(()=>{class t{constructor(t){if(this.httpClient=t,this.appVersion=fD.a.applicationVersion,this.appDate=fD.a.applicationDate,this.needsReload$=new _e.a,!fD.a.production)return;this.checkVersion();const e=setInterval(()=>Object(ue.a)(this,void 0,void 0,function*(){(yield this.checkVersion())&&clearInterval(e)}),6e4)}checkVersion(){return Object(ue.a)(this,void 0,void 0,function*(){try{if((yield this.httpClient.get(`/assets/version.json?time=${Date.now()}`).toPromise()).version!==this.appVersion)return this.needsReload$.next(),!0}catch($nt){}return!1})}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(_p))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function h8(t,e){if(1&t&&(r.Vb(0,"mat-list-item",2),r.Vb(1,"mat-radio-button",3),r.Kc(2),r.Ub(),r.Ub()),2&t){const t=e.$implicit;r.Db(1),r.nc("value",t),r.Db(1),r.Mc(" ",t.label," ")}}let u8=(()=>{class t{constructor(t){this.mapConfigService=t,this.availableBaseLayers=gD}ngOnInit(){this.activeLayer=this.mapConfigService.baseLayer$.value}changeLayer(t){this.mapConfigService.updateBaseLayer(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-base-layer-switcher"]],decls:2,vars:2,consts:[[3,"ngModel","ngModelChange","change"],["class","base-layer-switcher__list-item",4,"ngFor","ngForOf"],[1,"base-layer-switcher__list-item"],["color","primary",3,"value"]],template:function(t,e){1&t&&(r.Vb(0,"mat-radio-group",0),r.cc("ngModelChange",function(t){return e.activeLayer=t})("change",function(t){return e.changeLayer(t.value)}),r.Ic(1,h8,3,2,"mat-list-item",1),r.Ub()),2&t&&(r.nc("ngModel",e.activeLayer),r.Db(1),r.nc("ngForOf",e.availableBaseLayers))},directives:[sR,Vc,uh,ct,SU,hR],styles:[".base-layer-switcher__list-item[_ngcontent-%COMP%]{height:30px}.base-layer-switcher__list-item[_ngcontent-%COMP%] .mat-radio-label-content{white-space:pre-line}"],changeDetection:0}),t})(),d8=1;const p8=document.createElement("style");document.head.appendChild(p8);const f8=p8.sheet;let m8=(()=>{class t extends LT{constructor(t){super(),this.changeDetectorRef=t,this.change=new r.o,this.componentId="dual-slider-"+d8++,this.sliderRefresh=new r.o}ngOnInit(){this.ensureMandatoryInputParams("steps","colors","value","highValue"),this.stepLabelsByValue=this.steps.reduce((t,e)=>(t[e.value]=e.label,t),{}),this.thresholdsValues={value:this.value,highValue:this.highValue},this.sliderOptions={stepsArray:this.steps,showTicks:!0,hideLimitLabels:!0,animate:!1,showSelectionBar:!0,disabled:!1,showOuterSelectionBars:!0,getTickColor:t=>{const e=this.steps[t].value;return e<this.thresholdsValues.highValue?this.colors.right:e<this.thresholdsValues.value?this.colors.middle:this.colors.left},combineLabels:(t,e)=>t===e?t:`${t} - ${e}`,translate:(t,e)=>this.stepLabelsByValue[t]},[`.${this.componentId} .ngx-slider-left-out-selection .ngx-slider-bar { background-color: ${this.colors.left} !important; }`,`.${this.componentId} .ngx-slider-right-out-selection .ngx-slider-bar, .${this.componentId} .ngx-slider-pointer-max { background-color: ${this.colors.right} !important; }`,`.${this.componentId} .ngx-slider-selection, .${this.componentId} .ngx-slider-pointer-min, .${this.componentId} .ngx-slider-tick.ngx-slider-selected { background-color: ${this.colors.middle} !important;}`].forEach(t=>{f8.insertRule(t,0)}),this.disabled$&&this.subscriptions.push(this.disabled$.pipe(mn()).subscribe(t=>{this.sliderOptions=Object.assign(Object.assign({},this.sliderOptions),{disabled:t}),this.changeDetectorRef.detectChanges()})),this.refresh$&&this.subscriptions.push(this.refresh$.subscribe(()=>{this.sliderRefresh.emit()}))}ngOnDestroy(){super.ngOnDestroy();let t=0;for(;t<f8.cssRules.length;)f8.cssRules[t].cssText.includes(this.componentId)?f8.deleteRule(t):t++}emitChange(t){this.change.next(t)}updateThresholdsValues(t){this.thresholdsValues=t,this.sliderRefresh.emit()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-dual-slider"]],inputs:{steps:"steps",colors:"colors",value:"value",highValue:"highValue",disabled$:"disabled$",refresh$:"refresh$"},outputs:{change:"change"},features:[r.Ab],decls:2,vars:6,consts:[[3,"options","manualRefresh","value","highValue","userChange","userChangeEnd"]],template:function(t,e){1&t&&(r.Vb(0,"div"),r.Vb(1,"ngx-slider",0),r.cc("userChange",function(t){return e.updateThresholdsValues(t)})("userChangeEnd",function(t){return e.emitChange(t)}),r.Ub(),r.Ub()),2&t&&(r.Fb("dual-slider "+e.componentId),r.Db(1),r.nc("options",e.sliderOptions)("manualRefresh",e.sliderRefresh)("value",e.value)("highValue",e.highValue))},directives:[pg],styles:[".dual-slider{margin-right:8px} .dual-slider .ngx-slider .ngx-slider-pointer{background-color:#3f51b5;width:20px;height:20px;top:-8px;border-radius:10px;transform:translateX(50%)} .dual-slider .ngx-slider .ngx-slider-pointer:after{display:none}"],changeDetection:0}),t})();function g8(t,e){if(1&t&&(r.Vb(0,"mat-list-item",24),r.Vb(1,"mat-radio-button",25),r.Kc(2),r.Ub(),r.Ub()),2&t){const t=e.$implicit;r.Db(1),r.nc("value",t.key),r.Db(1),r.Mc(" ",t.label," ")}}function A8(t,e){1&t&&(r.Vb(0,"div",26),r.Kc(1,"Les navires qui correspondent \xe0 au moins un des crit\xe8res s\xe9lectionn\xe9s seront color\xe9s."),r.Ub())}function b8(t,e){if(1&t&&(r.Vb(0,"mat-option",34),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.id),r.Db(1),r.Mc(" ",t.name," ")}}function v8(t,e){if(1&t&&(r.Vb(0,"mat-option",34),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.key),r.Db(1),r.Mc(" ",t.label," ")}}function _8(t,e){1&t&&(r.Vb(0,"div",35),r.Vb(1,"mat-icon",36),r.Kc(2,"warning"),r.Ub(),r.Kc(3," Aucun filtre n'a \xe9t\xe9 s\xe9lectionn\xe9. "),r.Ub())}function y8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"h3",7),r.Kc(1,"Recherche"),r.Ub(),r.Vb(2,"div",6),r.Vb(3,"mat-form-field",27),r.Vb(4,"mat-label"),r.Kc(5,"R\xe8gles"),r.Ub(),r.Vb(6,"mat-select",28),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc().alertRulesService.updateAlertRulesFilter(e)}),r.Ic(7,b8,2,2,"mat-option",29),r.Ub(),r.Ub(),r.Vb(8,"mat-form-field",27),r.Vb(9,"mat-label"),r.Kc(10,"\xc9v\xe9nements"),r.Ub(),r.Vb(11,"mat-select",28),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc().mapConfigService.updateEventTypesFilter(e)}),r.Ic(12,v8,2,2,"mat-option",29),r.Ub(),r.Ub(),r.Ub(),r.Ic(13,_8,4,0,"div",30),r.Vb(14,"h3",7),r.Kc(15,"Seuils de coloration"),r.Ub(),r.Vb(16,"div",31),r.Kc(17,"Les navires sont affich\xe9s en rouge et jaune, en fonction de la date de l'alerte ou de l'\xe9v\xe9nement depuis l'instant pr\xe9sent."),r.Ub(),r.Vb(18,"div",32),r.Vb(19,"app-dual-slider",33),r.cc("change",function(e){return r.Ac(t),r.gc().updateHighlightThresholds(e)}),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.Db(6),r.nc("ngModel",t.mapConfigService.shipFilter$.value.alertRules)("disabled",t.mapConfigService.shipFilter$.value.colorModeShipType),r.Db(1),r.nc("ngForOf",t.alertRules),r.Db(4),r.nc("ngModel",t.mapConfigService.shipFilter$.value.eventTypes)("disabled",t.mapConfigService.shipFilter$.value.colorModeShipType),r.Db(1),r.nc("ngForOf",t.eventTypes),r.Db(1),r.nc("ngIf",t.mapConfigService.shipFilter$.value.isMissingColorFilterConfiguration),r.Db(6),r.nc("steps",t.highlightThresholdsSteps)("colors",t.highlightThresholdsColors)("value",t.mapConfigService.shipFilter$.value.minimumTimestampThreshold)("highValue",t.mapConfigService.shipFilter$.value.importantTimestampThreshold)("disabled$",t.highlightThesholdsDisabled$)("refresh$",t.slidersRefresh$)}}function w8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-checkbox",17),r.cc("ngModelChange",function(){return r.Ac(t),r.gc().mapConfigService.togglePortsLayer()}),r.Kc(1,"Zones de ports"),r.Ub()}if(2&t){const t=r.gc();r.nc("ngModel",t.mapConfigService.showPortsLayer$.value)}}let x8=(()=>{class t extends LT{constructor(t,e,i){super(),this.configService=t,this.alertRulesService=e,this.mapConfigService=i,this.colorModes=GD,this.alertRules=[],this.eventTypes=VP,this.highlightThresholdsSteps=bD,this.highlightThresholdsColors=_D,this.highlightThesholdsDisabled$=new Av.a(!1),this.slidersRefresh$=new _e.a}ngOnInit(){this.subscriptions.push(this.alertRulesService.alertRules$.subscribe(t=>{this.alertRules=t}),this.mapConfigService.shipFilter$.subscribe(t=>{this.highlightThesholdsDisabled$.next(t.colorModeShipType)}))}onMenuOpen(){setTimeout(()=>{this.slidersRefresh$.next(null)},200)}updateHighlightThresholds(t){this.mapConfigService.updateTimestampThresholds(t.value,t.highValue)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(cI),r.Pb(DP),r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-layers-control"]],features:[r.Ab],decls:53,vars:24,consts:[["mat-button","","title","Configurer les informations affich\xe9es","joyrideStep","layers-button","text","Ce menu permet de configurer les couches de donn\xe9es affich\xe9es et aussi g\xe9rer les modes d'affichage.",1,"toolbar__button",3,"matMenuTriggerFor","click"],["svgIcon","layers"],[1,"large-menu"],["menu","matMenu"],[1,"pt-0",3,"click"],[1,"mat-title","layers-control__section-title"],[1,"d-flex"],[1,"mat-subheader","layers-control__subsection-title"],[3,"ngModel","ngModelChange"],["class","layers-control__list-item",4,"ngFor","ngForOf"],[3,"vertical"],["class","d-flex-center pa-2 mat-body",4,"ngIf"],[3,"ngIf"],[1,"d-flex","my-2"],["color","primary",1,"layers-control__list-item","mx-3",3,"ngModel","ngModelChange"],[1,"u-flex"],[1,"u-flex","mr-3",2,"margin-bottom","5px"],["color","primary",1,"d-block","layers-control__list-item",3,"ngModel","ngModelChange"],["gid","36nqlimits-layer","date","2021-02-16",3,"width","height"],["gid","eez-layer","date","2020-12-10",3,"width","height"],["color","primary","title","Search And Rescue",1,"d-block","layers-control__list-item",3,"ngModel","ngModelChange"],["color","primary","title","Maritime Rescue Coordination Centres",1,"d-block","layers-control__list-item",3,"ngModel","ngModelChange"],["class","d-block layers-control__list-item","color","primary",3,"ngModel","ngModelChange",4,"ngIf"],["gid","subcables-layer","date","2021-07-06",3,"width","height"],[1,"layers-control__list-item"],["color","primary",3,"value"],[1,"d-flex-center","pa-2","mat-body"],[1,"d-block","px-3"],["multiple","",3,"ngModel","disabled","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["class","no-filter-selected-warning px-3",4,"ngIf"],[1,"px-3","mat-body"],[1,"px-3"],[3,"steps","colors","value","highValue","disabled$","refresh$","change"],[3,"value"],[1,"no-filter-selected-warning","px-3"],[1,"mr-2"]],template:function(t,e){if(1&t&&(r.Vb(0,"button",0),r.cc("click",function(){return e.onMenuOpen()}),r.Qb(1,"mat-icon",1),r.Ub(),r.Vb(2,"mat-menu",2,3),r.Vb(4,"mat-list",4),r.cc("click",function(t){return t.stopPropagation()}),r.Vb(5,"div",5),r.Kc(6,"Alertes et \xe9v\xe9nements"),r.Ub(),r.Vb(7,"div",6),r.Vb(8,"div"),r.Vb(9,"h3",7),r.Kc(10,"Modes d'affichage"),r.Ub(),r.Vb(11,"mat-radio-group",8),r.cc("ngModelChange",function(t){return e.mapConfigService.updateColorMode(t)}),r.Ic(12,g8,3,2,"mat-list-item",9),r.Ub(),r.Ub(),r.Qb(13,"mat-divider",10),r.Ic(14,A8,2,0,"div",11),r.Ub(),r.Ic(15,y8,20,13,"ng-template",12),r.Vb(16,"div",5),r.Kc(17,"Donn\xe9es"),r.Ub(),r.Vb(18,"div",13),r.Vb(19,"mat-checkbox",14),r.cc("ngModelChange",function(){return e.mapConfigService.toggleShipsLayer()}),r.Kc(20,"Navires"),r.Ub(),r.Vb(21,"mat-checkbox",14),r.cc("ngModelChange",function(){return e.mapConfigService.toggleAircraftsLayer()}),r.Kc(22,"A\xe9ronefs"),r.Ub(),r.Vb(23,"mat-checkbox",14),r.cc("ngModelChange",function(){return e.mapConfigService.toggleAnnotationsLayer()}),r.Kc(24,"Annotations"),r.Ub(),r.Ub(),r.Vb(25,"div",6),r.Vb(26,"div",15),r.Vb(27,"h3",7),r.Kc(28,"Fond de carte"),r.Ub(),r.Qb(29,"app-base-layer-switcher"),r.Ub(),r.Vb(30,"div",16),r.Vb(31,"h3",7),r.Kc(32,"Autres informations"),r.Ub(),r.Vb(33,"mat-checkbox",17),r.cc("ngModelChange",function(){return e.mapConfigService.toggleMaritimeBoundariesLayer()}),r.Kc(34,"D\xe9limitations maritimes FR"),r.Ub(),r.Vb(35,"app-glitter",18),r.Vb(36,"mat-checkbox",17),r.cc("ngModelChange",function(){return e.mapConfigService.toggle36NqLimitsLayer()}),r.Kc(37,"Limites 3 et 6 nautiques FR"),r.Ub(),r.Ub(),r.Vb(38,"app-glitter",19),r.Vb(39,"mat-checkbox",17),r.cc("ngModelChange",function(){return e.mapConfigService.toggleEEZLayer()}),r.Kc(40," Zones \xe9conomiques exclusives "),r.Ub(),r.Ub(),r.Vb(41,"mat-checkbox",20),r.cc("ngModelChange",function(){return e.mapConfigService.toggleSARLayer()}),r.Kc(42,"Zones SAR"),r.Ub(),r.Vb(43,"mat-checkbox",21),r.cc("ngModelChange",function(){return e.mapConfigService.toggleMRCCLayer()}),r.Kc(44,"MRCC"),r.Ub(),r.Ic(45,w8,2,1,"mat-checkbox",22),r.Vb(46,"mat-checkbox",17),r.cc("ngModelChange",function(){return e.mapConfigService.toggleHexagonsLayer()}),r.Kc(47,"Hexagones"),r.Ub(),r.Vb(48,"mat-checkbox",17),r.cc("ngModelChange",function(){return e.mapConfigService.toggleOpenSeaMapLayer()}),r.Kc(49,"OpenSeaMap"),r.Ub(),r.Vb(50,"app-glitter",23),r.Vb(51,"mat-checkbox",17),r.cc("ngModelChange",function(){return e.mapConfigService.toggleSubcablesLayer()}),r.Kc(52,"C\xe2bles sous-marins et pipelines"),r.Ub(),r.Ub(),r.Ub(),r.Ub(),r.Ub(),r.Ub()),2&t){const t=r.wc(3);r.nc("matMenuTriggerFor",t),r.Db(11),r.nc("ngModel",e.mapConfigService.shipFilter$.value.colorMode),r.Db(1),r.nc("ngForOf",e.colorModes),r.Db(1),r.nc("vertical",!0),r.Db(1),r.nc("ngIf",!e.mapConfigService.shipFilter$.value.colorModeShipType),r.Db(1),r.nc("ngIf",!e.mapConfigService.shipFilter$.value.colorModeShipType),r.Db(4),r.nc("ngModel",e.mapConfigService.showShipsLayer$.value),r.Db(2),r.nc("ngModel",e.mapConfigService.showAircraftsLayer$.value),r.Db(2),r.nc("ngModel",e.mapConfigService.showAnnotationsLayer$.value),r.Db(10),r.nc("ngModel",e.mapConfigService.showMaritimeBoundariesLayer$.value),r.Db(2),r.nc("width",240)("height",30),r.Db(1),r.nc("ngModel",e.mapConfigService.show36NqLimitsLayer$.value),r.Db(2),r.nc("width",240)("height",30),r.Db(1),r.nc("ngModel",e.mapConfigService.showEEZLayer$.value),r.Db(2),r.nc("ngModel",e.mapConfigService.showSARLayer$.value),r.Db(2),r.nc("ngModel",e.mapConfigService.showMRCCLayer$.value),r.Db(2),r.nc("ngIf",e.configService.devMode),r.Db(1),r.nc("ngModel",e.mapConfigService.showHexagonsLayer$.value),r.Db(2),r.nc("ngModel",e.mapConfigService.showOpenSeaMapLayer$.value),r.Db(2),r.nc("width",240)("height",30),r.Db(1),r.nc("ngModel",e.mapConfigService.showSubcablesLayer$.value)}},directives:[Dl,ax,sU,Yp,eU,yU,sR,Vc,uh,ct,GT,ut,tF,u8,DL,SU,hR,_u,cu,Vg,m8,bl],styles:[".layers-control__section-title[_ngcontent-%COMP%]{background-color:hsla(0,0%,91.8%,.5686274509803921);padding-top:8px;padding-left:16px;padding-bottom:8px;margin-bottom:8px}.layers-control__subsection-title[_ngcontent-%COMP%]{height:32px!important}.layers-control__list-item[_ngcontent-%COMP%]{height:30px!important}.no-filter-selected-warning[_ngcontent-%COMP%]{color:#e41010;display:flex;justify-content:center;line-height:1.5em} .large-menu{max-width:500px!important} .large-menu .mat-menu-content{padding:0!important}"],changeDetection:0}),t})();class C8{constructor(t,e){this.count=t,this.source=e}call(t,e){return e.subscribe(new S8(t,this.count,this.source))}}class S8 extends Ee.a{constructor(t,e,i){super(t),this.count=e,this.source=i}complete(){if(!this.isStopped){const{source:t,count:e}=this;if(0===e)return super.complete();e>-1&&(this.count=e-1),t.subscribe(this._unsubscribeAndRecycle())}}}function k8(t,e){1&t&&(r.Vb(0,"mat-error"),r.Kc(1,"Ce champ est obligatoire"),r.Ub())}function E8(t,e){1&t&&(r.Vb(0,"mat-error"),r.Kc(1,"Ce nom est d\xe9j\xe0 utilis\xe9"),r.Ub())}let D8=(()=>{class t extends LT{constructor(t){super(),this.filterConfigurationsService=t,this.cancel=new r.o,this.save=new r.o,this.otherConfigurationsNames=[]}ngOnInit(){this.subscriptions.push(this.filterConfigurationsService.configurations$.subscribe(t=>{this.otherConfigurationsNames=t.map(t=>t.name).filter(t=>t!==this.name)})),this.form=new eh(this.name,[pc.required,t=>this.otherConfigurationsNames.includes(t.value)?{nameConflict:!0}:null]),this.name&&this.form.markAsTouched()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(PT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-filter-configuration-form"]],inputs:{name:"name"},outputs:{cancel:"cancel",save:"save"},features:[r.Ab],decls:12,vars:4,consts:[["matInput","",3,"formControl"],[4,"ngIf"],["mat-button","","title","Annuler",3,"click"],["mat-button","","type","submit","color","primary","title","Sauvegarder",3,"disabled","click"]],template:function(t,e){1&t&&(r.Vb(0,"mat-form-field"),r.Vb(1,"mat-label"),r.Kc(2,"Nom"),r.Ub(),r.Qb(3,"input",0),r.Ic(4,k8,2,0,"mat-error",1),r.Ic(5,E8,2,0,"mat-error",1),r.Ub(),r.Vb(6,"button",2),r.cc("click",function(){return e.cancel.emit()}),r.Vb(7,"mat-icon"),r.Kc(8,"clear"),r.Ub(),r.Ub(),r.Vb(9,"button",3),r.cc("click",function(){return e.save.emit(e.form.value)}),r.Vb(10,"mat-icon"),r.Kc(11,"check"),r.Ub(),r.Ub()),2&t&&(r.Db(3),r.nc("formControl",e.form),r.Db(1),r.nc("ngIf",null==e.form.errors?null:e.form.errors.required),r.Db(1),r.nc("ngIf",null==e.form.errors?null:e.form.errors.nameConflict),r.Db(4),r.nc("disabled",e.form.invalid))},directives:[_u,cu,Ou,ac,Vc,bh,ut,Dl,Yp,nu],styles:["[_nghost-%COMP%]{display:flex}"]}),t})();const I8=["importFileInput"];function P8(t,e){if(1&t&&(r.Vb(0,"mat-option",7),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.name),r.Db(1),r.Mc(" ",t.name," ")}}function O8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",9),r.Vb(1,"mat-icon"),r.Kc(2,"more_vert"),r.Ub(),r.Ub(),r.Vb(3,"mat-menu",null,10),r.Vb(5,"div",11),r.Vb(6,"button",12),r.cc("click",function(){return r.Ac(t),r.gc(2).showRenameForm()}),r.Vb(7,"mat-icon"),r.Kc(8,"create"),r.Ub(),r.Vb(9,"span"),r.Kc(10,"Renommer"),r.Ub(),r.Ub(),r.Vb(11,"button",13),r.cc("click",function(){return r.Ac(t),r.gc(2).exportConfiguration()}),r.Vb(12,"mat-icon"),r.Kc(13,"cloud_download"),r.Ub(),r.Vb(14,"span"),r.Kc(15,"Exporter"),r.Ub(),r.Ub(),r.Vb(16,"button",14),r.cc("click",function(){return r.Ac(t),r.gc(2).deleteConfiguration()}),r.Vb(17,"mat-icon"),r.Kc(18,"delete"),r.Ub(),r.Vb(19,"span"),r.Kc(20,"Supprimer"),r.Ub(),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=r.wc(4);r.nc("matMenuTriggerFor",t)}}function M8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",15),r.cc("click",function(){return r.Ac(t),r.gc(2).updateActiveConfigurationFilters()}),r.Vb(1,"mat-icon"),r.Kc(2,"save"),r.Ub(),r.Ub()}}function T8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-form-field"),r.Vb(1,"mat-label"),r.Kc(2,"Configuration active"),r.Ub(),r.Vb(3,"mat-select",4),r.cc("selectionChange",function(e){return r.Ac(t),r.gc().selectConfiguration(e.value)}),r.Vb(4,"mat-option"),r.Kc(5,"-- Aucun --"),r.Ub(),r.Ic(6,P8,2,2,"mat-option",5),r.Vb(7,"mat-optgroup",6),r.Vb(8,"mat-option",7),r.Vb(9,"mat-icon"),r.Kc(10,"restore"),r.Ub(),r.Kc(11," R\xe9initialiser les filtres "),r.Ub(),r.Vb(12,"mat-option",7),r.Vb(13,"mat-icon"),r.Kc(14,"cloud_upload"),r.Ub(),r.Kc(15," Importer "),r.Ub(),r.Vb(16,"mat-option",7),r.Vb(17,"mat-icon"),r.Kc(18,"add"),r.Ub(),r.Kc(19," Nouvelle configuration "),r.Ub(),r.Ub(),r.Ub(),r.Ub(),r.Ic(20,O8,21,1,"ng-template",2),r.Ic(21,M8,3,0,"button",8)}if(2&t){const t=r.gc();r.Db(3),r.nc("value",t.activeConfigurationName)("disableOptionCentering",!0),r.Db(3),r.nc("ngForOf",t.configurations)("ngForTrackBy",t.trackByName),r.Db(2),r.nc("value",t.clearConfigurationKey),r.Db(4),r.nc("value",t.importConfigurationKey),r.Db(4),r.nc("value",t.createNewConfigurationKey),r.Db(4),r.nc("ngIf",t.activeConfigurationName),r.Db(1),r.nc("ngIf",t.dirtyFilters)}}function R8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-filter-configuration-form",16),r.cc("cancel",function(){return r.Ac(t),r.gc().cancelRename()})("save",function(e){return r.Ac(t),r.gc().saveRename(e)}),r.Ub()}if(2&t){const t=r.gc();r.nc("name",t.activeConfigurationName)}}let V8=(()=>{class t extends LT{constructor(t,e){super(),this.filterConfigurationsService=t,this.uiService=e,this.configurations=[],this.activeConfigurationName=null,this.activeConfiguration=null,this.isRenamingConfiguration=!1,this.dirtyFilters=!1,this.clearConfigurationKey="@@@@clear-configuration@@@@",this.createNewConfigurationKey="@@@@new-configuration@@@@",this.importConfigurationKey="@@@@import-configuration@@@@"}ngOnInit(){this.subscriptions.push(this.filterConfigurationsService.configurations$.subscribe(t=>{this.configurations=t}),this.filterConfigurationsService.activeConfigurationName$.subscribe(t=>{this.activeConfigurationName=t}),this.filterConfigurationsService.activeConfiguration$.subscribe(t=>{this.activeConfiguration=t}),this.filterConfigurationsService.dirtyActiveConfiguration$.subscribe(t=>{this.dirtyFilters=t}))}selectConfiguration(t){t===this.clearConfigurationKey?(this.select.value=this.activeConfigurationName,this.filterConfigurationsService.clearMapFilters()):t===this.createNewConfigurationKey?(this.filterConfigurationsService.selectConfiguration(""),this.showRenameForm()):t===this.importConfigurationKey?(this.select.value=this.activeConfigurationName,this.triggerImportConfigurationDialog()):this.filterConfigurationsService.selectConfiguration(t)}showRenameForm(){this.isRenamingConfiguration=!0}triggerImportConfigurationDialog(){this.importFileInput.nativeElement.click()}onFilesChange(t){return Object(ue.a)(this,void 0,void 0,function*(){const e=t.target.files||t.dataTransfer.files;if(e.length)try{const i=yield Promise.all(Array.from(e).map(t=>Object(ue.a)(this,void 0,void 0,function*(){try{const e=JSON.parse(yield XH(t));if("string"==typeof e.name&&"object"==typeof e.filters)return e;throw new Error("Structure JSON incorrecte")}catch(e){throw new Error(`Import du fichier \`${t.name}\` \xe9chou\xe9: ${e.message}`)}}))),n=this.configurations.map(t=>t.name),r=i.filter(t=>n.includes(t.name)),s=i.filter(t=>!n.includes(t.name));if(r.length>0){const t=r.map(t=>t.name).join(", ");if(!(yield this.uiService.confirmAsync({title:"Conflits",message:1===r.length?`La configuration ${t} existe d\xe9j\xe0 et sera mise \xe0 jour. Confirmez-vous la mise \xe0 jour de cette configuration ?`:`Les configurations ${t} existent d\xe9j\xe0 et seront mises \xe0 jour. Confirmez-vous la mise \xe0 jour de ces configurations ?`})))return!0}yield Promise.all([...s.map(t=>Object(ue.a)(this,void 0,void 0,function*(){yield this.filterConfigurationsService.importConfiguration(t)})),...r.map(t=>Object(ue.a)(this,void 0,void 0,function*(){yield this.filterConfigurationsService.updateConfiguration(t)}))]),this.uiService.success(1===i.length?"La configuration a \xe9t\xe9 import\xe9e":"Les configurations ont \xe9t\xe9 import\xe9es")}finally{t.target.value=""}})}cancelRename(){this.isRenamingConfiguration=!1}saveRename(t){this.activeConfigurationName?this.filterConfigurationsService.renameConfiguration(this.activeConfigurationName,t):(this.filterConfigurationsService.createConfiguration(t),this.filterConfigurationsService.selectConfiguration(t)),this.cancelRename()}deleteConfiguration(){this.uiService.confirm({title:"Suppression",message:"Une fois supprim\xe9e, cette configuration de filtres ne sera plus accessible. Confirmez-vous la suppression ?",action:t=>Object(ue.a)(this,void 0,void 0,function*(){t&&(yield this.filterConfigurationsService.deleteConfiguration(this.activeConfigurationName))})})}exportConfiguration(){const t=this.filterConfigurationsService.activeConfiguration$.value,e=(new Date).toISOString().substr(0,19).replace(/:/g,"-");qH(t,`ANAIS-configuration-filtre-${t.name}-${e}.json`)}trackByName(t,e){return e.name}updateActiveConfigurationFilters(){this.filterConfigurationsService.updateActiveConfigurationFilters()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(PT),r.Pb(VI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-filter-configuration-switcher"]],viewQuery:function(t,e){if(1&t&&(r.Pc(I8,3),r.Pc(Vg,1)),2&t){let t;r.vc(t=r.dc())&&(e.importFileInput=t.first),r.vc(t=r.dc())&&(e.select=t.first)}},features:[r.Ab],decls:4,vars:2,consts:[["type","file","accept","application/json","multiple","","hidden","",3,"change"],["importFileInput",""],[3,"ngIf"],[3,"name","cancel","save",4,"ngIf"],[3,"value","disableOptionCentering","selectionChange"],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],["label","Actions"],[3,"value"],["mat-button","","color","primary","title","Des filtres ont \xe9t\xe9 modifi\xe9s. Cliquer pour enregistrer les modifications",3,"click",4,"ngIf"],["mat-button","","title","Voir les actions",3,"matMenuTriggerFor"],["actionsMenu","matMenu"],[1,"py-0"],["mat-menu-item","","title","Renommer la configuration",3,"click"],["mat-menu-item","","title","Exporter la configuration au format JSON",3,"click"],["mat-menu-item","","title","Supprimer la configuration",1,"warn-menu-item",3,"click"],["mat-button","","color","primary","title","Des filtres ont \xe9t\xe9 modifi\xe9s. Cliquer pour enregistrer les modifications",3,"click"],[3,"name","cancel","save"]],template:function(t,e){1&t&&(r.Vb(0,"input",0,1),r.cc("change",function(t){return e.onFilesChange(t)}),r.Ub(),r.Ic(2,T8,22,9,"ng-template",2),r.Ic(3,R8,1,1,"app-filter-configuration-form",3)),2&t&&(r.Db(2),r.nc("ngIf",!e.isRenamingConfiguration),r.Db(1),r.nc("ngIf",e.isRenamingConfiguration))},directives:[ut,_u,cu,Vg,bl,ct,pl,Yp,Dl,sU,eU,QL,D8],styles:["[_nghost-%COMP%]{display:flex}.warn-menu-item[_ngcontent-%COMP%], .warn-menu-item[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{color:rgba(244,67,54,.87)!important}"]}),t})();function F8(t,e){if(1&t&&(r.Vb(0,"mat-option",40),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.key),r.Db(1),r.Mc(" ",t.name," ")}}function L8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",41),r.cc("click",function(e){r.Ac(t);const i=r.gc();return e.stopPropagation(),i.mapConfigService.updateShipTypesFilter([])}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function U8(t,e){if(1&t&&(r.Vb(0,"mat-option",40),r.Qb(1,"app-flag",42),r.Kc(2),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.flag),r.Db(1),r.nc("flag",t.flag),r.Db(1),r.Mc(" ",t.name," ")}}function B8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",41),r.cc("click",function(e){r.Ac(t);const i=r.gc();return e.stopPropagation(),i.mapConfigService.updateShipFlagsFilter([])}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function N8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",41),r.cc("click",function(){return r.Ac(t),r.gc().mapConfigService.updateShipIdentifierFilter("")}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function j8(t,e){if(1&t&&(r.Vb(0,"mat-option",40),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.id),r.Db(1),r.Mc(" ",t.name," ")}}function z8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",41),r.cc("click",function(e){r.Ac(t);const i=r.gc();return e.stopPropagation(),i.fleetsService.updateFleetsFilter([])}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function H8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",41),r.cc("click",function(){return r.Ac(t),r.gc().mapConfigService.updateShipDepartureFilter("")}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function K8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",41),r.cc("click",function(){return r.Ac(t),r.gc().mapConfigService.updateShipDestinationFilter("")}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function $8(t,e){if(1&t&&(r.Vb(0,"mat-option",40),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.key),r.Db(1),r.Mc(" ",t.label," ")}}function G8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",41),r.cc("click",function(e){r.Ac(t);const i=r.gc();return e.stopPropagation(),i.mapConfigService.updateShipStatusFilter([])}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}const W8={floor:0,animate:!1,inputEventsInterval:166,mouseEventsInterval:166,touchEventsInterval:166};let Z8=(()=>{class t extends LT{constructor(t,e,i){super(),this.changeDetectorRef=t,this.fleetsService=e,this.mapConfigService=i,this.configurations=[],this.activeConfiguration=null,this.shipFilter=null,this.vesselTypes=kD,this.countries=jI,this.eventTypes=VP,this.navigationStatus=tK,this.visibilityThresholdsSteps=yD,this.visibilityThresholdsColors=xD,this.slidersRefresh$=new r.o,this.speedSliderOptions=Object.assign({ceil:100,translate:t=>`${t} kt`},W8),this.lengthSliderOptions=Object.assign({ceil:500,translate:t=>`${t} m`},W8),this.widthSliderOptions=Object.assign({ceil:100,translate:t=>`${t} m`},W8),this.draughtSliderOptions=Object.assign({ceil:30,translate:t=>`${t} m`},W8),this.yearofbuildSliderOptions=Object.assign(Object.assign({},W8),{floor:1874,ceil:ID}),this.speedForm=new eh([this.speedSliderOptions.floor,this.speedSliderOptions.ceil]),this.lengthForm=new eh([this.lengthSliderOptions.floor,this.lengthSliderOptions.ceil]),this.widthForm=new eh([this.widthSliderOptions.floor,this.widthSliderOptions.ceil]),this.draughtForm=new eh([this.widthSliderOptions.floor,this.widthSliderOptions.ceil]),this.yearofbuildForm=new eh([this.yearofbuildSliderOptions.floor,this.yearofbuildSliderOptions.ceil]),this.speedFilterActive=!1,this.lengthFilterActive=!1,this.widthFilterActive=!1,this.draughtFilterActive=!1,this.yearofbuildFilterActive=!1,this.courseFilterActive=!1,this.hasActiveShipFilters=!1,this.MaximumShipCourse=360,this.updatingFilter=!1}ngOnInit(){this.subscriptions.push(this.mapConfigService.shipFilter$.pipe(wm(300)).subscribe(t=>{this.shipFilter=t,this.updatingFilter=!0,this.speedForm.setValue([t.shipSpeed.min,t.shipSpeed.max],{emitEvent:!1}),this.lengthForm.setValue([t.shipLength.min,t.shipLength.max],{emitEvent:!1}),this.widthForm.setValue([t.shipWidth.min,t.shipWidth.max],{emitEvent:!1}),this.draughtForm.setValue([t.shipDraught.min,t.shipDraught.max],{emitEvent:!1}),this.yearofbuildForm.setValue([t.shipYearofbuild.min,t.shipYearofbuild.max],{emitEvent:!1}),this.speedFilterActive=0!==t.shipSpeed.min||100!==t.shipSpeed.max,this.lengthFilterActive=0!==t.shipLength.min||500!==t.shipLength.max,this.widthFilterActive=0!==t.shipWidth.min||100!==t.shipWidth.max,this.draughtFilterActive=0!==t.shipDraught.min||30!==t.shipDraught.max,this.yearofbuildFilterActive=1874!==t.shipYearofbuild.min||t.shipYearofbuild.max!==ID||!t.shipYearofbuildIncludeNulls,this.courseFilterActive=0!==t.shipCourse.min||360!==t.shipCourse.max,this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.updatingFilter=!1})}),this.mapConfigService.hasActiveShipFilters$.subscribe(t=>{this.hasActiveShipFilters=t,this.changeDetectorRef.markForCheck()}),this.fleetsService.fleets$.subscribe(t=>{this.fleets=t,this.changeDetectorRef.markForCheck()}),this.speedForm.valueChanges.pipe(He(()=>!this.updatingFilter),Pe(()=>{this.changeDetectorRef.markForCheck()}),Be(500)).subscribe(([t,e])=>{this.mapConfigService.updateShipSpeedFilter({min:t,max:e})}),this.lengthForm.valueChanges.pipe(He(()=>!this.updatingFilter),Pe(()=>{this.changeDetectorRef.markForCheck()}),Be(500)).subscribe(([t,e])=>{this.mapConfigService.updateShipLengthFilter({min:t,max:e})}),this.widthForm.valueChanges.pipe(He(()=>!this.updatingFilter),Pe(()=>{this.changeDetectorRef.markForCheck()}),Be(500)).subscribe(([t,e])=>{this.mapConfigService.updateShipWidthFilter({min:t,max:e})}),this.draughtForm.valueChanges.pipe(He(()=>!this.updatingFilter),Pe(()=>{this.changeDetectorRef.markForCheck()}),Be(500)).subscribe(([t,e])=>{this.mapConfigService.updateShipDraughtFilter({min:t,max:e})}),this.yearofbuildForm.valueChanges.pipe(He(()=>!this.updatingFilter),Pe(()=>{this.changeDetectorRef.markForCheck()}),Be(500)).subscribe(([t,e])=>{this.mapConfigService.updateShipYearofbuildFilter({min:t,max:e})}))}onMenuOpen(){AT(0,on).pipe(function(t=-1){return e=>0===t?Ye():e.lift(new C8(t<0?-1:t-1,e))}(),Sn(wn(200))).subscribe(()=>{this.slidersRefresh$.next(null)})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(OT),r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-filters-control"]],features:[r.Ab],decls:127,vars:62,consts:[["gid","filter-menu","date","2020-11-04"],["mat-button","","title","Configurer les filtres","joyrideStep","filters-button","title","Configuration des filtres de carte","text","Ce menu permet de configurer les filtres appliqu\xe9s, notamment l'anciennet\xe9 des pistes affich\xe9es.",1,"toolbar__button",3,"matMenuTriggerFor","click"],["svgIcon","filter"],[1,"large-menu"],["menu","matMenu"],[1,"pt-0",3,"click"],[1,"d-flex-center","filters-control__section-title"],[1,"mat-title","mr-3"],[1,"d-flex"],[1,"d-block","px-3"],["multiple","",3,"ngModel","ngModelChange"],["typeSelection","ngModel"],[3,"model","values","key"],[3,"value",4,"ngFor","ngForOf"],["mat-button","","matSuffix","","mat-icon-button","","title","R\xe9initialiser le filtre",3,"click",4,"ngIf"],["countrySelection","ngModel"],["matInput","",3,"ngModel","ngModelChange"],["align","start"],[1,"d-flex-center","px-3"],[1,"filters-control__slider-label"],["mat-icon-button","","title","R\xe9initialiser le filtre",1,"filters-control__reset-button",3,"click"],[1,"app-slider","u-flex"],["name","speed",3,"formControl","options","manualRefresh"],["name","length",3,"formControl","options","manualRefresh"],["name","width",3,"formControl","options","manualRefresh"],["name","draught",3,"formControl","options","manualRefresh"],["name","yearofbuild",3,"formControl","options","manualRefresh"],["title","Inclure les navires pour lesquels l'ann\xe9e de construction n'est pas d\xe9finie",1,"u-center","ml-1"],[1,"mat-small"],["color","primary",3,"ngModel","ngModelChange"],[1,"d-flex-center","px-3","mb-2"],[1,"u-flex","d-flex-center"],[1,"mat-body","mr-2"],["type","number","min","0","step","1","max","360","title","Angle minimum (0 - 360)",2,"width","60px",3,"ngModel","ngModelChange"],[1,"mat-body","mx-2"],["type","number","min","0","step","1","max","360","title","Angle maximum (0 - 360)",2,"width","60px",3,"ngModel","ngModelChange"],[1,"mat-title","filters-control__section-title"],[1,"px-3","mat-body"],[1,"px-3","mb-2"],[3,"steps","colors","value","highValue","refresh$","change"],[3,"value"],["mat-button","","matSuffix","","mat-icon-button","","title","R\xe9initialiser le filtre",3,"click"],[3,"flag"]],template:function(t,e){if(1&t&&(r.Vb(0,"app-glitter",0),r.Vb(1,"button",1),r.cc("click",function(){return e.onMenuOpen()}),r.Qb(2,"mat-icon",2),r.Ub(),r.Ub(),r.Vb(3,"mat-menu",3,4),r.Vb(5,"mat-list",5),r.cc("click",function(t){return t.stopPropagation()}),r.Vb(6,"div",6),r.Vb(7,"div",7),r.Kc(8,"Filtres"),r.Ub(),r.Qb(9,"app-filter-configuration-switcher"),r.Ub(),r.Vb(10,"div",8),r.Vb(11,"mat-form-field",9),r.Vb(12,"mat-label"),r.Kc(13,"Type de navire"),r.Ub(),r.Vb(14,"mat-select",10,11),r.cc("ngModelChange",function(t){return e.mapConfigService.updateShipTypesFilter(t)}),r.Qb(16,"app-select-check-all",12),r.Ic(17,F8,2,2,"mat-option",13),r.Ub(),r.Ic(18,L8,3,0,"button",14),r.Ub(),r.Vb(19,"mat-form-field",9),r.Vb(20,"mat-label"),r.Kc(21,"Pavillon"),r.Ub(),r.Vb(22,"mat-select",10,15),r.cc("ngModelChange",function(t){return e.mapConfigService.updateShipFlagsFilter(t)}),r.Qb(24,"app-select-check-all",12),r.Ic(25,U8,3,3,"mat-option",13),r.Ub(),r.Ic(26,B8,3,0,"button",14),r.Ub(),r.Ub(),r.Vb(27,"div",8),r.Vb(28,"mat-form-field",9),r.Vb(29,"mat-label"),r.Kc(30,"Nom / IMO / MMSI"),r.Ub(),r.Vb(31,"input",16),r.cc("ngModelChange",function(t){return e.mapConfigService.updateShipIdentifierFilter(t)}),r.Ub(),r.Ic(32,N8,3,0,"button",14),r.Ub(),r.Vb(33,"mat-form-field",9),r.Vb(34,"mat-label"),r.Kc(35,"Flotte"),r.Ub(),r.Vb(36,"mat-select",10),r.cc("ngModelChange",function(t){return e.fleetsService.updateFleetsFilter(t)}),r.Ic(37,j8,2,2,"mat-option",13),r.Ub(),r.Ic(38,z8,3,0,"button",14),r.Ub(),r.Ub(),r.Vb(39,"div",8),r.Vb(40,"mat-form-field",9),r.Vb(41,"mat-label"),r.Kc(42,"Provenance"),r.Ub(),r.Vb(43,"input",16),r.cc("ngModelChange",function(t){return e.mapConfigService.updateShipDepartureFilter(t)}),r.Ub(),r.Ic(44,H8,3,0,"button",14),r.Vb(45,"mat-hint",17),r.Kc(46,"S\xe9parer par des virgules pour plusieurs valeurs"),r.Ub(),r.Ub(),r.Vb(47,"mat-form-field",9),r.Vb(48,"mat-label"),r.Kc(49,"Destination"),r.Ub(),r.Vb(50,"input",16),r.cc("ngModelChange",function(t){return e.mapConfigService.updateShipDestinationFilter(t)}),r.Ub(),r.Ic(51,K8,3,0,"button",14),r.Vb(52,"mat-hint",17),r.Kc(53,"S\xe9parer par des virgules pour plusieurs valeurs"),r.Ub(),r.Ub(),r.Ub(),r.Vb(54,"div",8),r.Vb(55,"mat-form-field",9),r.Vb(56,"mat-label"),r.Kc(57,"Status"),r.Ub(),r.Vb(58,"mat-select",10),r.cc("ngModelChange",function(t){return e.mapConfigService.updateShipStatusFilter(t)}),r.Ic(59,$8,2,2,"mat-option",13),r.Ub(),r.Ic(60,G8,3,0,"button",14),r.Ub(),r.Ub(),r.Vb(61,"div",18),r.Vb(62,"label",19),r.Kc(63,"Vitesse"),r.Ub(),r.Vb(64,"button",20),r.cc("click",function(){return e.speedForm.reset([e.speedSliderOptions.floor,e.speedSliderOptions.ceil])}),r.Vb(65,"mat-icon"),r.Kc(66,"clear"),r.Ub(),r.Ub(),r.Vb(67,"div",21),r.Qb(68,"ngx-slider",22),r.Ub(),r.Ub(),r.Vb(69,"div",18),r.Vb(70,"label",19),r.Kc(71,"Longueur"),r.Ub(),r.Vb(72,"button",20),r.cc("click",function(){return e.lengthForm.reset([e.lengthSliderOptions.floor,e.lengthSliderOptions.ceil])}),r.Vb(73,"mat-icon"),r.Kc(74,"clear"),r.Ub(),r.Ub(),r.Vb(75,"div",21),r.Qb(76,"ngx-slider",23),r.Ub(),r.Ub(),r.Vb(77,"div",18),r.Vb(78,"label",19),r.Kc(79,"Largeur"),r.Ub(),r.Vb(80,"button",20),r.cc("click",function(){return e.widthForm.reset([e.widthSliderOptions.floor,e.widthSliderOptions.ceil])}),r.Vb(81,"mat-icon"),r.Kc(82,"clear"),r.Ub(),r.Ub(),r.Vb(83,"div",21),r.Qb(84,"ngx-slider",24),r.Ub(),r.Ub(),r.Vb(85,"div",18),r.Vb(86,"label",19),r.Kc(87,"Tirant d'eau"),r.Ub(),r.Vb(88,"button",20),r.cc("click",function(){return e.draughtForm.reset([e.draughtSliderOptions.floor,e.draughtSliderOptions.ceil])}),r.Vb(89,"mat-icon"),r.Kc(90,"clear"),r.Ub(),r.Ub(),r.Vb(91,"div",21),r.Qb(92,"ngx-slider",25),r.Ub(),r.Ub(),r.Vb(93,"div",18),r.Vb(94,"label",19),r.Kc(95,"Ann\xe9e de construction"),r.Ub(),r.Vb(96,"button",20),r.cc("click",function(){return e.yearofbuildForm.reset([e.yearofbuildSliderOptions.floor,e.yearofbuildSliderOptions.ceil]),e.mapConfigService.updateShipYearofbuildIncludeNullsFilter(!0)}),r.Vb(97,"mat-icon"),r.Kc(98,"clear"),r.Ub(),r.Ub(),r.Vb(99,"div",21),r.Qb(100,"ngx-slider",26),r.Ub(),r.Vb(101,"div",27),r.Vb(102,"div",28),r.Kc(103,"Valeurs"),r.Qb(104,"br"),r.Kc(105,"manquantes"),r.Ub(),r.Vb(106,"mat-checkbox",29),r.cc("ngModelChange",function(t){return e.mapConfigService.updateShipYearofbuildIncludeNullsFilter(t)}),r.Ub(),r.Ub(),r.Ub(),r.Vb(107,"div",30),r.Vb(108,"label",19),r.Kc(109,"Cap"),r.Ub(),r.Vb(110,"button",20),r.cc("click",function(){return e.mapConfigService.updateShipCourseFilter({min:0,max:e.MaximumShipCourse})}),r.Vb(111,"mat-icon"),r.Kc(112,"clear"),r.Ub(),r.Ub(),r.Vb(113,"div",31),r.Vb(114,"div",32),r.Kc(115,"du"),r.Ub(),r.Vb(116,"input",33),r.cc("ngModelChange",function(t){return e.mapConfigService.updateShipCourseFilter({min:t,max:e.shipFilter.shipCourse.max})}),r.Ub(),r.Vb(117,"div",34),r.Kc(118,"au"),r.Ub(),r.Vb(119,"input",35),r.cc("ngModelChange",function(t){return e.mapConfigService.updateShipCourseFilter({min:e.shipFilter.shipCourse.min,max:t})}),r.Ub(),r.Ub(),r.Ub(),r.Qb(120,"mat-divider"),r.Vb(121,"div",36),r.Kc(122,"Pistes"),r.Ub(),r.Vb(123,"div",37),r.Kc(124,"Les seuils ci-dessous permettent de masquer les pistes ou et de les rendre l\xe9g\xe8rement transparentes."),r.Ub(),r.Vb(125,"div",38),r.Vb(126,"app-dual-slider",39),r.cc("change",function(t){return e.mapConfigService.updateVisibilityThresholds(t.value,t.highValue)}),r.Ub(),r.Ub(),r.Ub(),r.Ub()),2&t){const t=r.wc(4),i=r.wc(15),n=r.wc(23);r.Db(1),r.Hb("filters-control__active-button",e.hasActiveShipFilters),r.nc("matMenuTriggerFor",t),r.Db(13),r.nc("ngModel",e.shipFilter.shipTypes),r.Db(2),r.nc("model",i)("values",e.vesselTypes)("key","key"),r.Db(1),r.nc("ngForOf",e.vesselTypes),r.Db(1),r.nc("ngIf",e.shipFilter.shipTypes.length>0),r.Db(4),r.nc("ngModel",e.shipFilter.shipFlags),r.Db(2),r.nc("model",n)("values",e.countries)("key","flag"),r.Db(1),r.nc("ngForOf",e.countries),r.Db(1),r.nc("ngIf",e.shipFilter.shipFlags.length>0),r.Db(5),r.nc("ngModel",e.shipFilter.shipIdentifier),r.Db(1),r.nc("ngIf",e.shipFilter.shipIdentifier),r.Db(4),r.nc("ngModel",e.shipFilter.fleets),r.Db(1),r.nc("ngForOf",e.fleets),r.Db(1),r.nc("ngIf",e.shipFilter.fleets.length>0),r.Db(5),r.nc("ngModel",e.shipFilter.shipDeparture),r.Db(1),r.nc("ngIf",e.shipFilter.shipDeparture),r.Db(6),r.nc("ngModel",e.shipFilter.shipDestination),r.Db(1),r.nc("ngIf",e.shipFilter.shipDestination),r.Db(7),r.nc("ngModel",e.shipFilter.shipStatus),r.Db(1),r.nc("ngForOf",e.navigationStatus),r.Db(1),r.nc("ngIf",e.shipFilter.shipStatus.length>0),r.Db(4),r.Fc("opacity",e.speedFilterActive?1:0),r.Db(4),r.nc("formControl",e.speedForm)("options",e.speedSliderOptions)("manualRefresh",e.slidersRefresh$),r.Db(4),r.Fc("opacity",e.lengthFilterActive?1:0),r.Db(4),r.nc("formControl",e.lengthForm)("options",e.lengthSliderOptions)("manualRefresh",e.slidersRefresh$),r.Db(4),r.Fc("opacity",e.widthFilterActive?1:0),r.Db(4),r.nc("formControl",e.widthForm)("options",e.widthSliderOptions)("manualRefresh",e.slidersRefresh$),r.Db(4),r.Fc("opacity",e.draughtFilterActive?1:0),r.Db(4),r.nc("formControl",e.draughtForm)("options",e.draughtSliderOptions)("manualRefresh",e.slidersRefresh$),r.Db(4),r.Fc("opacity",e.yearofbuildFilterActive?1:0),r.Db(4),r.nc("formControl",e.yearofbuildForm)("options",e.yearofbuildSliderOptions)("manualRefresh",e.slidersRefresh$),r.Db(6),r.nc("ngModel",e.shipFilter.shipYearofbuildIncludeNulls),r.Db(4),r.Fc("opacity",e.courseFilterActive?1:0),r.Db(6),r.nc("ngModel",e.shipFilter.shipCourse.min),r.Db(3),r.nc("ngModel",e.shipFilter.shipCourse.max),r.Db(7),r.nc("steps",e.visibilityThresholdsSteps)("colors",e.visibilityThresholdsColors)("value",e.shipFilter.shipLastPositionTimestampThreshold)("highValue",e.shipFilter.transparencyThreshold)("refresh$",e.slidersRefresh$)}},directives:[DL,Dl,ax,sU,Yp,eU,yU,V8,_u,cu,Vg,Vc,uh,tj,ct,ut,Ou,ac,lu,pg,bh,tF,fh,GT,m8,bl,fu,GF],styles:[".filters-control__active-button[_ngcontent-%COMP%]{color:#005cee}.filters-control__active-button[_ngcontent-%COMP%] ellipse{stroke:#005cee}.filters-control__active-button[_ngcontent-%COMP%] path{stroke:#005cee;fill:#005cee}.filters-control__section-title[_ngcontent-%COMP%]{background-color:hsla(0,0%,91.8%,.5686274509803921);padding-top:8px;padding-left:16px;padding-bottom:8px;margin-bottom:8px}.filters-control__list-item[_ngcontent-%COMP%]{height:30px!important}.filters-control__slider-label[_ngcontent-%COMP%]{width:90px;color:#777}.filters-control__reset-button[_ngcontent-%COMP%]{width:24px!important;height:24px!important;line-height:24px!important;margin:0 4px} .large-menu{max-width:500px!important} .large-menu .mat-menu-content{padding:0!important}"],changeDetection:0}),t})();const q8=["searchInput"];function Y8(t,e){1&t&&(r.Vb(0,"mat-icon",12),r.Kc(1,"cached"),r.Ub())}function Q8(t,e){1&t&&(r.Vb(0,"mat-icon"),r.Kc(1,"search"),r.Ub())}function X8(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",13),r.cc("click",function(){return r.Ac(t),r.gc().searchFormControl.setValue("")}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function J8(t,e){1&t&&(r.Vb(0,"mat-option",14),r.Kc(1," Aucun r\xe9sultat "),r.Ub())}function t6(t,e){if(1&t&&(r.Vb(0,"mat-option",15),r.Vb(1,"div",16),r.Vb(2,"div",17),r.Vb(3,"div",18),r.Qb(4,"app-flag",19),r.Vb(5,"div",20),r.Vb(6,"div",21),r.Kc(7),r.Ub(),r.Vb(8,"small",22),r.Kc(9),r.Ub(),r.Ub(),r.Ub(),r.Vb(10,"div",23),r.Vb(11,"mat-icon",24),r.Kc(12,"access_time"),r.Ub(),r.Vb(13,"div",25),r.hc(14,"timeago"),r.Kc(15),r.hc(16,"date"),r.Ub(),r.Ub(),r.Ub(),r.Vb(17,"div",26),r.Vb(18,"div"),r.Kc(19),r.Ub(),r.Vb(20,"div"),r.Kc(21),r.Ub(),r.Vb(22,"div"),r.Kc(23),r.Ub(),r.Ub(),r.Ub(),r.Ub()),2&t){const t=e.$implicit,i=r.gc();r.nc("value",t),r.Db(4),r.nc("flag",t.country.flag),r.Db(3),r.Lc(t.name||"?"),r.Db(2),r.Lc(t.cargo?i.vesselTypeLabelsByType[t.cargo]:"?"),r.Db(4),r.oc("title",r.ic(14,9,1e3*t.timestamp)),r.Db(2),r.Lc(r.kc(16,11,1e3*t.timestamp,"yyyy-MM-dd HH:mm:ss z",i.mapConfigService.useUTCDates$.value&&"z")),r.Db(4),r.Mc("MMSI ",t.mmsi,""),r.Db(2),r.Mc("IMO ",t.imo||"?",""),r.Db(2),r.Mc("Callsign ",t.callsign||"?","")}}let e6=(()=>{class t extends LT{constructor(t,e,i){super(),this.errorHandler=t,this.mapConfigService=e,this.workerService=i,this.selectItem=new r.o,this.searchFormControl=new eh,this.loadingResults=!1,this.noResults=!1,this.vesselTypeLabelsByType=ED}ngOnInit(){this.subscriptions.push(this.searchFormControl.valueChanges.pipe(Be(300),Object(Ge.a)(t=>"string"==typeof t?t:void 0===t?"":"object"==typeof t&&(null==t?void 0:t.name)||""),Object(Ge.a)(t=>t.trim()),mn(),Pe(()=>{this.loadingResults=!0,this.noResults=!1}),Mn(t=>""===t?Se(null):Ol(()=>Object(ue.a)(this,void 0,void 0,function*(){try{return yield this.workerService.ships.findShips(t)}catch($nt){return $nt.name===kC.Unauthorized&&this.errorHandler.handleError($nt),[]}})))).subscribe(t=>{this.loadingResults=!1,this.noResults=0===(null==t?void 0:t.length),this.searchResults=t}))}ngAfterViewInit(){this.inputElement.nativeElement.addEventListener("blur",()=>{this.noResults=!1})}selectShip(t){t&&(this.selectItem.emit(t),this.searchFormControl.reset(""),this.inputElement.nativeElement.blur())}focusInputOnShift(t){q4(t)&&"/"===t.key&&this.inputElement.nativeElement.focus()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.n),r.Pb(hI),r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-ship-search"]],viewQuery:function(t,e){if(1&t&&r.Pc(q8,3,r.l),2&t){let t;r.vc(t=r.dc())&&(e.inputElement=t.first)}},hostBindings:function(t,e){1&t&&r.cc("keyup",function(t){return e.focusInputOnShift(t)},!1,r.zc)},outputs:{selectItem:"selectItem"},features:[r.Ab],decls:12,vars:8,consts:[["matAutocompleteOrigin","",1,"shipsearch"],["origin","matAutocompleteOrigin"],[1,"shipsearch__label"],["class","spin",4,"ngIf"],[4,"ngIf"],["type","search","placeholder","Nom, MMSI, IMO, Callsign...","matInput","",1,"shipsearch__input",3,"formControl","matAutocomplete","matAutocompleteConnectedTo"],["searchInput",""],["mat-button","","class","shipsearch__clear-btn","matSuffix","","mat-icon-button","","aria-label","R\xe9initialiser",3,"click",4,"ngIf"],["autoActiveFirstOption","",3,"optionSelected"],["autocomplete","matAutocomplete"],["class","shipsearch__no-results",4,"ngIf"],["class","shipsearch__result-item-wrapper","title","Ouvrir la fiche navire et localiser le navire",3,"value",4,"ngFor","ngForOf"],[1,"spin"],["mat-button","","matSuffix","","mat-icon-button","","aria-label","R\xe9initialiser",1,"shipsearch__clear-btn",3,"click"],[1,"shipsearch__no-results"],["title","Ouvrir la fiche navire et localiser le navire",1,"shipsearch__result-item-wrapper",3,"value"],[1,"result-item"],[1,"result-item__col1"],[1,"u-flex","d-flex-center"],[1,"result-item__flag",3,"flag"],[1,"d-flex-column"],[1,"result-item__name"],[1,"result-item__type"],[1,"result-item__timestamp"],["title","R\xe9ception"],[3,"title"],[1,"result-item__col2"]],template:function(t,e){if(1&t&&(r.Vb(0,"div",0,1),r.Vb(2,"label",2),r.Ic(3,Y8,2,0,"mat-icon",3),r.Ic(4,Q8,2,0,"mat-icon",4),r.Qb(5,"input",5,6),r.Ic(7,X8,3,0,"button",7),r.Ub(),r.Vb(8,"mat-autocomplete",8,9),r.cc("optionSelected",function(){return e.selectShip(e.searchFormControl.value)}),r.Ic(10,J8,2,0,"mat-option",10),r.Ic(11,t6,24,15,"mat-option",11),r.Ub(),r.Ub()),2&t){const t=r.wc(1),i=r.wc(9);r.Db(3),r.nc("ngIf",e.loadingResults),r.Db(1),r.nc("ngIf",!e.loadingResults),r.Db(1),r.nc("formControl",e.searchFormControl)("matAutocomplete",i)("matAutocompleteConnectedTo",t),r.Db(2),r.nc("ngIf",e.searchFormControl.value),r.Db(3),r.nc("ngIf",e.noResults),r.Db(1),r.nc("ngForOf",e.searchResults)}},directives:[FN,ut,Ou,ac,zN,Vc,bh,TN,ct,Yp,Dl,fu,bl,GF],pipes:[Tx,kt],styles:[".shipsearch[_ngcontent-%COMP%]{padding:2px 8px;flex:1;display:flex;color:#50647f}.shipsearch__label[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center;width:300px}.shipsearch__input[_ngcontent-%COMP%]{border:0;outline:0;padding:8px;height:1.5em}.shipsearch__result-item-wrapper[_ngcontent-%COMP%]{line-height:16px;padding:0;height:56px}.shipsearch__no-results[_ngcontent-%COMP%]{pointer-events:none}.shipsearch__clear-btn[_ngcontent-%COMP%]{width:24px;height:24px;line-height:24px}.result-item[_ngcontent-%COMP%]{padding:0 4px;font-size:12px;display:flex}.result-item__col1[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column}.result-item__col2[_ngcontent-%COMP%]{display:flex;flex-direction:column;text-align:right}.result-item__flag[_ngcontent-%COMP%]{margin-right:4px}.result-item__name[_ngcontent-%COMP%]{font-size:14px}.result-item__type[_ngcontent-%COMP%]{line-height:1em;font-size:11px}.result-item__timestamp[_ngcontent-%COMP%]{display:flex;align-items:center;color:grey}.result-item__timestamp[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%]{font-size:1em;height:1em;width:1em;margin-right:.3em;margin-left:.3em}"]}),t})();const i6=[{id:1,type:"new",title:"Liste des mises \xe0 jour",content:"Les changements majeurs (nouveaut\xe9s et am\xe9liorations) sont maintenant list\xe9s via ce menu. Ainsi vous ne manquerez pas les nouvelles fonctionnalit\xe9s d'ANAIS !"},{id:2,type:"improvement",title:"Optimisation des flux",content:"Les flux entre l'interface et le serveur ont \xe9t\xe9 r\xe9duits (x4) afin de fournir une plus grande r\xe9activit\xe9 et une consommation du r\xe9seau moindre."},{id:3,type:"new",title:"Ajout d'un filtre par nom / MMSI / IMO",content:"Il est maintenant possible de filtrer les navires affich\xe9s par identifiant (nom / MMSI / IMO)."},{id:4,type:"improvement",title:"Enregistrement automatique de la configuration",content:"La configuration de l'application, les param\xe8tres et les filtres de la carte sont maintenant enregistr\xe9s et restaur\xe9s lorsque l'application est r\xe9ouverte.\n

A noter que la sauvegarde de cette configuration se fait en local uniquement (dans le navigateur), et sera donc \xe0 refaire si vous vous utilisez un autre navigateur.

"},{id:5,type:"new",title:"Plein de param\xe8tres pour am\xe9liorer les performances",content:"Un nouveau menu permet de configurer des param\xe8tres g\xe9n\xe9raux d'ANAIS. Voici les nouveaut\xe9s majeures :\n <ul>\n <li>Il est maintenant possible de restreindre les navires charg\xe9s \xe0 une zone afin de gagner en fluidit\xe9 quand la bande passante est contrainte.\n Combin\xe9 \xe0 l'<em>\xe9conomiseur de bande passante</em>, cela permet de ne rafraichir qu'une seule zone, peu importe les d\xe9placements de carte.</li>\n <li>La fr\xe9quence de rafraichissement du mode temps r\xe9el est maintenant configurable et a \xe9t\xe9 augment\xe9e \xe0 30 secondes par d\xe9faut.</li>\n <li>La limite d'historique lorsque l'on s\xe9lectionne un navire a \xe9t\xe9 abaiss\xe9e \xe0 1 jour par d\xe9faut.</li>\n <li>Les hexagones sont maintenant plus grands afin de s\xe9lectionner plus rapidement les zones pour l'\xe9dition de r\xe8gles. Il est possible de revenir \xe0 l'ancienne taille via le param\xe8tre <em>Utiliser des hexagones de haute r\xe9solution</em></li>\n </ul>"},{id:6,type:"new",title:"Navigation dans l'historique des traces",content:"L'historique des traces visibles des navires est maintenant r\xe9glable plus facilement et plus finement qu'auparavant.\n <br><br>\n Il est par exemple possible de remonter dans le temps pour n'afficher qu'une semaine d'historique, il y a 6 mois.\n "},{id:7,type:"improvement",title:"Infobulles de position au survol et \xe9pingles",content:"Le fonctionnement li\xe9e aux infobulles des positions a chang\xe9 pour qu'elles apparaissent lorsque l'on survole la position avec le curseur.\n <br><br>\n Cliquer sur une position va \xe9pingler l'infobulle de cette derni\xe8re qui restera alors affich\xe9e tant que le navire courant sera s\xe9lectionn\xe9.\n Cette fonctionnalit\xe9 est notamment utile pour construire la cin\xe9matique d'un navire.\n "},{id:8,type:"new",title:"Mesure de distances",content:"Un outil de mesure de distances est maintenant disponible pour calculer les distances de trajectoires.\n <br><br>\n Il est possible de mesurer la distance entre 2 points, ainsi que la distance totale pour une trajectoire comprenant plusieurs segments."},{id:9,type:"new",title:"Flottes de navires",content:"Il est maintenant possible de g\xe9rer des flottes de navires afin de suivre plus facilement plusieurs navires d'un seul coup et visualiser simultan\xe9ment plusieurs traces.\n <br><br>\n Les flottes cr\xe9\xe9es sont utilisables en tant que filtre de visualisation mais aussi en tant que filtre de r\xe8gle."},{id:10,type:"improvement",title:"Infobulles au survol des navires",content:"Le survol d'un navire avec le curseur fait maintenant appara\xeetre une infobulle avec les informations principales du navire."},{id:11,type:"new",title:"Emails de bienvenue et r\xe9initialisation de mot de passe",content:"Les utilisateurs avec le profil administrateur peuvent maintenant acc\xe9der \xe0 un \xe9cran de gestion des utilisateurs. C'est \xe0 partir de l\xe0 que les nouveaux utilisateurs sont ajout\xe9s \xe0 ANAIS.\n <br><br>\n Il est maintenant possible de r\xe9initialiser et changer son mot de passe via l'\xe9cran de connexion. Un mail vous est envoy\xe9 avec un lien pour saisir le nouveau mot de passe.\n "},{id:12,type:"improvement",title:"Couleurs diff\xe9rentes pour les traces de flottes",content:"Jusqu'\xe0 pr\xe9sent, les traces des navires au sein d'une flotte \xe9taient affich\xe9es de la m\xeame couleur, ce qui rendait difficile leur distinction quand elles \xe9taient proches.\n <br><br>\n Dor\xe9navant, les traces des navires utilisent une palette de couleur et se distinguent plus facilement. Les couleurs ne sont pas d\xe9finitives et toute suggestion ou remarque sera fortement appr\xe9ci\xe9e.\n "},{id:13,type:"new",title:"D\xe9limitations maritimes et zones de recherches et secours",content:"Les d\xe9limitations maritimes et les zones de recherches et secours (SAR) peuvent maintenant \xeatre affich\xe9es via le menu Configuration de la carte > Donn\xe9es affich\xe9es. Les donn\xe9es proviennent du SHOM.\n "},{id:14,type:"new",title:"Import / Export de flottes",content:"Un nouveau bouton permet d'exporter les flottes de navires au format JSON en vue de les partager \xe0 quelqu'un d'autre qui pourra alors les importer dans son compte ANAIS.\n Cela peut aussi permettre d'\xe9diter les flottes \xe0 l'ext\xe9rieur d'ANAIS, si on dispose d'une grande liste de MMSI de navires \xe0 suivre.\n "},{id:15,type:"improvement",title:"Destination et ETA dans les infobulles",content:"Les infobulles des navires affich\xe9es au survol contiennent maintenant une ligne avec la destination et l'ETA annonc\xe9s du navire.\n "},{id:16,type:"improvement",title:"Icones de navires stationnaires",content:"Les navires consid\xe9r\xe9s comme stationnaires (vitesse inf\xe9rieure \xe0 1 noeud) sont maintenant repr\xe9sent\xe9s par un point sur la carte. Il sera ainsi plus facile de voir les navires naviguant dans une zone de mouillage.\n "},{id:17,type:"improvement",title:"Tailles d'icones adapative",content:"Toujours pour gagner en lisibilit\xe9, un nouveau param\xe8tre (activ\xe9 par d\xe9faut) permet d'adapter la taille des icones de la carte en fonction du niveau de zoom.\n <ul>\n <li>Lorsque le zoom est bas, c'est que l'on veut une vision d'ensemble. La taille des icones est donc r\xe9duite.</li>\n <li>Lorsque le zoom est haut, c'est que l'on s'int\xe9resse plus pr\xe9cis\xe9ment \xe0 une situation et on doit pouvoir s\xe9lectionner plus facilement les navires. La taille des icones augmente donc.</li>\n </ul>\n <br>\n Il est toujours possible de revenir au fonctionnement ant\xe9rieur. Pour cela, il suffit de d\xe9sactiver le param\xe8tre via le menu Param\xe8tres > Affichage > Adapter la taille des icones en fonction du niveau de zoom.\n "},{id:18,type:"new",title:"Coloration par type de navires",content:"Un mode d'affichage de coloration des navires par type remplace maintenant le mode sans coloration qui n'\xe9tait pas utile.\n <br>\n Une fois ce mode actif, les couleurs des icones repr\xe9sentent le type des navires. Ainsi, le vert repr\xe9sente les navires transportant des marchandises (cargo).\n "},{id:19,type:"new",title:"Coloration des \xe9v\xe9nements sur la carte",content:"Lorsque l'on s\xe9lectionne un navire, les \xe9v\xe9nements du journal de bord sont maintenant color\xe9s afin d'\xeatre distinguables plus facilement. Une l\xe9gende est \xe9galement affich\xe9e pour indiquer les couleurs associ\xe9e \xe0 chaque cat\xe9gorie.\n "},{id:20,type:"improvement",title:"Am\xe9lioration des performances et fluidit\xe9",content:"Des gros travaux ont \xe9t\xe9 entrepris pour am\xe9liorer les performances de la carte en temps r\xe9el mais aussi en mode historique. Le chargement se fait maintenant par tuiles. Ainsi, il n'y a pas besoin de rafraichir les navires tant que l'on reste dans la m\xeame tuile. Idem en mode historique.\n <br>\n Le tuilage permet de mettre en cache les navires c\xf4t\xe9 serveur afin d'avoir les temps de r\xe9ponse les plus courts possibles en temps r\xe9el.\n "},{id:21,type:"new",title:"Affichage d'une position GPS en temps r\xe9el",content:"La nouvelle fonctionnalit\xe9 de g\xe9olocalisation permet d'afficher une position en temps-r\xe9el sur la carte \xe0 partir d'une position ext\xe9rieure \xe0 ANAIS.\n <br>\n C'est utile si vous \xeates en mission dans un avion ou navire, et que vous souhaitez afficher votre position sur la carte ANAIS afin de faire correspondre plus facilement la situation r\xe9elle avec celle sur la carte.\n <br>\n <br>\n Pour la mise en oeuvre, il faut cr\xe9er un serveur HTTP en local qui expose la position mise \xe0 jour. Pour plus de d\xe9tails, voir la page Param\xe8tres > G\xe9olocalisation.\n <br>\n <br>\n Concernant la s\xe9curit\xe9 de cette fonctionnalit\xe9, notez bien que cette position n'est <strong>jamais</strong> envoy\xe9e sur internet (serveur ANAIS ou autre).\n <br>\n Si avez encore des doutes \xe0 ce sujet, vous pouvez \xe0 tout instant couper le serveur HTTP pour arr\xeater la mise \xe0 jour de la position.\n "},{id:22,type:"new",title:"Affichage des a\xe9ronefs",content:"Les a\xe9ronefs sont maintenant visibles en m\xeame temps que les navires gr\xe2ce \xe0 notre partenaire <a href=\"https://beta.gouv.fr/startups/sepia.html\">SEPIA</a>.\n <br>\n Derri\xe8re SEPIA, les donn\xe9es proviennent principalement de ADS-B Exchange et Flightradar24.\n <br>\n <br>\n L'int\xe9gration est pour le moment minimale. Il n'est pas encore possible de visualiser la fiche de l'a\xe9ronef et ni visualiser sa trace, de rechercher ou d'utiliser les filtres.\n <br>\n En fonction des retours utilisateurs, nous pourront prioriser le d\xe9veloppement de nouvelles fonctionnalit\xe9s.\n "},{id:23,type:"new",title:"Int\xe9gration d'un tchat",content:"Un tchat a \xe9t\xe9 int\xe9gr\xe9 \xe0 ANAIS afin que vous puissiez plus facilement discuter avec les membres de l'\xe9quipe.\n <br>\n <br>\n Le tchat utilise le logiciel open-source <a href=\"https://www.chatwoot.com/\">Chatwoot</a> et est h\xe9berg\xe9 sur les serveurs ANAIS.\n <br>\n <br>\n Pour y acc\xe9der, il faut cliquer sur l'icone <b>?</b> en bas \xe0 droite.\n "},{id:24,type:"new",title:"Zones SAR et MRCC mondiaux",content:"Les zones SAR et MRCC du monde entier peuvent maintenant \xeatre affich\xe9s via le menu <em>Configuration de la carte</em>."},{id:25,type:"new",title:"D\xe9calage coupure antim\xe9ridien",content:"ANAIS utilise des coordonn\xe9es du syst\xe8me g\xe9od\xe9sique mondial (WGS 84). C'est-\xe0-dire que les donn\xe9es affich\xe9es voient leur longitude varier de -180\xb0 \xe0 +180\xb0.\n Actuellement, notre moteur de rendu ne g\xe8re pas bien dans l'affichage au niveau de l'antim\xe9ridien (au milieu du pacifique) et cela occasionne donc une coupure nette des donn\xe9es affich\xe9es.\n <br>\n <br>\n En attendant que cette gestion soit automatique, nous avons ajout\xe9 un param\xe8tre pour d\xe9caler le centre de longitude afin de d\xe9caler cette coupure.\n Si vous travaillez sur une zone du pacifique par exemple, cela vous sera utile afin de voir la zone en entier.\n <br>\n <br>\n Vous trouverez ce nouveau param\xe8tre via le menu Param\xe8tres > Affichage > D\xe9calage de longitude."},{id:26,type:"new",title:"Ajout de la provenance",content:"La provenance des navires est maintenant affich\xe9e dans les infobulles et dans la fiche navire. La valeur correspond \xe0 l'avant derni\xe8re destination d\xe9clar\xe9e.\n <br>\n <br>\n Il est \xe9galement possible de filtrer les navires par provenance, comme pour destination."},{id:27,type:"new",title:"Ajout de la fiche avion",content:"Il est maintenant possible de consulter la fiche d'un avion et de visualiser sa trace.\n <br>\n La trace est color\xe9e selon l'altitude de l'avion avec la m\xeame \xe9chelle que Flightradar24."},{id:28,type:"new",title:"Ajout de la page statistiques (beta)",content:"Une nouvelle page exp\xe9rimentale permet d'effectuer des recherches de passage de navires pour une transition entre deux hexagones.\n <br>\n C'est utile par exemple si l'on veut connaitre les navires ayant pass\xe9 un d\xe9troit au cours d'une p\xe9riode de temps (6 mois maximum pour l'instant) et pouvoir faire des statistiques par pavillon ou type de navire.\n <br>\n Les r\xe9sultats de la recherche sont exportables au format CSV et peuvent ainsi \xeatre travaill\xe9s dans un tableau externe.\n <br>\n <br>\n La s\xe9lection des transitions est sujette \xe0 des limitations au-del\xe0 du niveau de zoom minimal : seules les transitions au sein d'hexagones ayant le m\xeame hexagone p\xe8re sont utilisables.\n Nous allons essayer de supprimer cette limitation dans le futur pour que la recherche soit pleinement utilisable.\n <br>\n <br>\n Pour utiliser cette fonctionnalit\xe9, il faut <em>activer le panneau des statistiques</em> dans les param\xe8tres."},{id:29,type:"new",title:"Configurations de filtre",content:"Les filtres de carte ont \xe9t\xe9 extraits dans un nouveau menu <em>Filtres</em> (ils \xe9taient auparavant dans le menu <em>Configuration de la carte</em>).\n Dans ce nouveau menu, en plus de trouver de nouveaux filtres (status, vitesse, longueur, largeur, tirant d'eau), vous allez pouvoir g\xe9rer vos configurations de filtre.\n <br>\n <br>\n Les configurations de filtre vont vous permettre de basculer rapidement entre plusieurs ensembles de filtres que vous aurez enregistr\xe9s au pr\xe9alable.\n <br>\n <br>\n Vous pouvez partager vos configurations en les exportant et les r\xe9important dans un autre compte."},{id:30,type:"improvement",title:"Masquage des \xe9tiquettes",content:"Les \xe9tiquettes peuvent d\xe9sormais \xeatre masqu\xe9es afin d'am\xe9liorer temporairement la lisibilit\xe9 d'une situation.\n <br>\n Pour ce faire, il suffit simplement de cliquer sur les \xe9tiquettes \xe0 masquer. Ces derni\xe8res vont alors disparaitre.\n <br>\n <br>\n Pour r\xe9afficher les \xe9tiquettes masqu\xe9es, il suffit de d\xe9sactiver puis r\xe9activer l'affichage des \xe9tiquettes."},{id:31,type:"new",title:"Am\xe9liorations de bande passante",content:"Deux nouveaut\xe9s permettent de limiter la bande passante utilis\xe9e par ANAIS :\n <ul>\n <li>le chargement manuel : Plut\xf4t que de rafraichir les donn\xe9es affich\xe9es automatiquement et les r\xe9cup\xe9rer par tuiles, vous pouvez maintenant opter pour d\xe9clencher manuellement la r\xe9cup\xe9ration des donn\xe9es pour la vue courante. Ce mode est activable dans les param\xe8tres.</<li>\n <li>les traces simplifi\xe9es : Ce mode est activ\xe9 par d\xe9faut et indique au serveur de simplifier la trace avant de la renvoyer au navigateur, \xe9conomisant ainsi de la bande passante. Il est possible de changer de mode via la fiche navire.</li>\n </ul>\n N'h\xe9sitez pas \xe0 tester ces fonctionnalit\xe9s et nous faire des retours d'utilisation. &#128521;"},{id:32,type:"new",title:"Transparence des \xe9tiquettes",content:"Un nouveau param\xe8tre vient de faire son entr\xe9e dans le menu Param\xe8tres et permet d'ajuster la transparence des \xe9tiquettes permanentes et infobulles (au survol et \xe9pingl\xe9es)."},{id:33,type:"new",title:"Format des dates",content:"Jusqu'\xe0 pr\xe9sent, la plupart des dates affich\xe9es dans ANAIS \xe9taient affich\xe9es de fa\xe7on relative \xe0 l'instant courant (par exemple, il y a 2h). Cela posait des probl\xe8mes \xe0 certains utilisateurs au moment de faire des captures d'\xe9cran car la date devait \xeatre ajout\xe9e manuellement.\n <br><br>\n D\xe9sormais, seuls les infobulles (au survol) des navires / a\xe9ronefs contiennt la date en relatif. Tous les autres endroits (fiche navire, liste d'alertes et \xe9v\xe9nements, etc) utilisent un format classique de date.\n <br><br>\n \xc0 noter \xe9galement qu'un nouveau param\xe8tre permettant d'afficher la date en UTC plut\xf4t qu'en temps local a \xe9t\xe9 ajout\xe9. Il contr\xf4le le format de toutes les dates affich\xe9es."},{id:34,type:"new",title:"Filtrage par cap",content:"Le filtre <em>Cap</em> permet de filtrer les navires affich\xe9s en fonction de leur cap en degr\xe9s (0\xb0 - 360\xb0).\n <br><br>\n Comme les autres filtres, c'est uniquement le cap de la derni\xe8re position qui est utilis\xe9 et le filtrage est r\xe9alis\xe9 en local dans votre navigateur."},{id:35,type:"new",title:"Zones \xe9conomiques exclusives",content:'Il est d\xe9sormais possible d\'afficher une couche de tuiles contenant les zones \xe9conomiques exclusives via le menu de configuration de la carte.\n <br><br>\n Les tuiles sont charg\xe9es directement \xe0 partir du site <a href="https://www.marineregions.org/eezmapper.php">Marineregions.org</a>.'},{id:36,type:"new",title:"Export des traces en CSV",content:"Les traces des navires sont maintenant exportables au format CSV. Cela vous permettra de conduire des analyses de ces traces en les important dans d'autres applications.\n <br><br>\n Les boutons sont pr\xe9sents dans les panneaux de d\xe9tail d'un navire et d'une flotte."},{id:37,type:"new",title:"PIM pistes",content:"\xc0 la mani\xe8re de l'outil de mesure de distances, un outil d'\xe9valuation de PIM piste est d\xe9sormais disponible dans le menu contextuel (disponible via clic droit sur la carte).\n <br><br>\n Gr\xe2ce \xe0 cet outil, vous pourrez, \xe0 partir d'une heure de d\xe9part et d'une vitesse, obtenir l'heure d'arriv\xe9e estim\xe9e d'un ou plusieurs navires \xe0 un point donn\xe9."},{id:38,type:"new",title:"Raccourcis clavier PIM et mesure",content:"En plus du menu contextuel pour acc\xe9der au mode PIM et mesure, des raccourcis clavier ont \xe9t\xe9 ajout\xe9s. La touche <strong>P</strong> permet d'acc\xe9der au mode PIM, la touche <strong>M</strong> au mode mesure.\n <br><br>\n Ces raccourcis s'ajoutent \xe0 la touche <strong>/</strong> (slash) qui permet de s\xe9lectionner le champ de recherche en haut \xe0 droite."},{id:39,type:"new",title:"Mode capture d'\xe9cran",content:"Un nouveau bouton en bas \xe0 droite de l'\xe9cran permet d'entrer en mode capture d'\xe9cran. Ce mode permet de masquer la plupart des \xe9l\xe9ments de l'interface afin de laisser le plus de place possible pour la carte et le panneau de gauche."},{id:40,type:"new",title:"Tableau de bord des alertes",content:"Un nouveau panneau contenant le tableau de bord des alertes est accessible via le bouton Alerte de la barre d'outils. Ce tableau de bord vous permet d'afficher les alertes de toutes vos r\xe8gles en fonction de la p\xe9riode s\xe9lectionn\xe9e.\n <br><br>\n Aussi, des indicateurs du nombre d'alertes lev\xe9es au cours des derni\xe8res 24 heures et des 7 derniers jours sont maintenant visibles dans le tableau de bord et dans la liste des r\xe8gles. Vous pourrez ainsi avoir une id\xe9e plus pr\xe9cise du nombre d'alerte lev\xe9es avec vos r\xe8gles et mieux les ajuster si trop d'alertes sont lev\xe9es.\n "},{id:41,type:"new",title:"Multi-s\xe9lection des navires / a\xe9ronefs",content:"Il est d\xe9sormais possible de visualiser simultan\xe9ment les traces de plusieurs navires et a\xe9ronefs sans devoir cr\xe9er une flotte.\n <br><br>\n Pour ce faire, il faut commencer par activer le mode multi-s\xe9lection via l'icone de la barre d'outils. Puis, chaque clic sur la carte ajoutera l'entit\xe9 s\xe9lectionn\xe9e \xe0 la s\xe9lection. Pour retirer l'entit\xe9 de la s\xe9lection, il faut soit effectuer un nouveau clic sur la carte, soit utiliser la croix correspondante en haut \xe0 gauche de l'\xe9cran.\n "},{id:42,type:"new",title:"Informations Lloyd's",content:"Une nouvelle section est disponible dans la fiche navire avec les informations Lloyd's provenant de notre fournisseur de donn\xe9es CLS.\n <br><br>\n Vous pourrez y voir des informations d\xe9taill\xe9es comme le propri\xe9taire du navire, ou encore sa capacit\xe9.\n "},{id:43,type:"new",title:"Notes de fiche navire",content:"Il est maintenant possible de cr\xe9er des notes dans les fiches navires. Une note est un emplacement textuel libre d\xe9di\xe9 dans lequel vous pouvez renseigner des informations sur un navire, afin de les retrouver plus tard.\n <br><br>\n Chaque note est sp\xe9cifique \xe0 un navire et \xe0 un utilisateur. Vos notes ne sont donc visibles que par vous-m\xeame.\n "},{id:44,type:"new",title:"Limites \xe0 3 et 6 nautiques",content:"Les limites fran\xe7aises des 3 et 6 milles marins relatives \xe0 la p\xeache sont dor\xe9navant affichables. Vous les trouverez dans le menu de configuration de la carte."},{id:45,type:"new",title:"Annotations g\xe9ographiques",content:"Un nouveau menu (encore un !) vient d'appara\xeetre pour vous permettre de cr\xe9er des annotations g\xe9ographiques.\n <br><br>\n Les annotations sont de simples marqueurs apparaissant sur la carte sous forme de points, de ligne ou de zones (polygone) et poss\xe9dant un titre, une description et une couleur.\n Le menu contextuel (accessible via clic droit) contient \xe9galement un nouveau raccourci pour la cr\xe9ation d'une annotation.\n <br><br>\n Ces annotations seront tr\xe8s probablement partageables entre utilisateurs dans le futur lorsque les groupes utilisateurs seront impl\xe9ment\xe9s.\n "},{id:46,type:"new",title:"Salon Tchap",content:"ANAIS est maintenant pr\xe9sent sur la messagerie instantan\xe9e Tchap via un salon de discussion !\n <br><br>\n Pour le rejoindre, utilisez ce <a href=\"https://tchap.gouv.fr/#/room/#ANAIS96Clw3VeN7q:agent.dinum.tchap.gouv.fr\">lien d'invitation au salon ANAIS</a>\n <br><br>\n Vous pourrez utiliser ce salon de discussion pour dialoguer fonctionnalit\xe9s avec d'autres utilisateurs et l'\xe9quipe ANAIS.\n "},{id:48,type:"new",title:"\xc9tiquettes d\xe9pla\xe7ables",content:"Cette fonctionnalit\xe9 \xe9tait demand\xe9e depuis longtemps par un bon nombre d'utilisateurs pour faciliter la constitution de rapports... les \xe9tiquettes sont d\xe9sormais d\xe9pla\xe7ables !\n <br><br>\n Pour les \xe9tiquettes \xe9pingl\xe9es (sur les traces, \xe9v\xe9nements, etc), un bouton en haut \xe0 droite s'affiche maintenant et vous permet de d\xe9placer l'\xe9tiquette via un glisser-d\xe9poser.\n Pour les \xe9tiquettes permanentes, le survol du curseur permet maintenant de faire apparaitre un bouton d\xe9placer et un bouton supprimer.\n Une ligne en pointill\xe9 est dessin\xe9e pour associer visuellement chaque \xe9tiquette \xe0 son point d'origine.\n "},{id:49,type:"new",title:"Mode \xe9tiquettes mini",content:"Le bouton d'affichage des \xe9tiquettes bascule maintenant entre 3 modes : aucune \xe9tiquettes, \xe9tiquettes sur une ligne, et \xe9tiquettes compl\xe8tes."},{id:50,type:"new",title:"Recherche de mouvements",content:"Un nouveau panneau intitul\xe9 <i>Recherche de mouvements</i> vous permet de rechercher des passages de navires dans diff\xe9rentes zones.\n <br><br>\n Cette recherche se base sur les mouvements des navires qu'on enregistre sous la forme de transitions entre hexagones dans notre grille hexagonale multi-niveaux. Trois niveaux de la grille hexagonale sont affich\xe9s.\n <br>\n La recherche utilise le concept de portes, une porte est un groupe de transitions adjacentes. Ainsi, pour trouver les navires ayant travers\xe9 la Manche pour une semaine donn\xe9e, on pourra cr\xe9er une porte en entr\xe9e et une autre en sortie de Manche.\n <br><br>\n Les r\xe9sultats de la recherche sont exportables au format CSV et peuvent ainsi \xeatre travaill\xe9s dans un tableau externe.\n <br><br>\n \xc0 noter que ce panneau am\xe9liore remplace l'ancien panneau <i>Statistiques</i> qui permettait seulement de rechercher des transitions entre deux hexagones de la grille hexagonale.\n "},{id:51,type:"new",title:"Extrapolation des positions en mode historique",content:"Une nouvelle fonction exp\xe9rimentale permet maintenant d'extrapoler les positions des navires en mode historique, pour faire appara\xeetre le navire \xe0 sa position estim\xe9e par son cap et sa vitesse.\n <br><br>\n Cette fonction est notamment tr\xe8s utile pour faire le rapprochement avec des relev\xe9s de positions ajout\xe9s via <i>drag'n'drop</i> ou bien par <i>clic droit > Importer des objets g\xe9ographiques</i>.\n "},{id:52,type:"new",title:"Couleurs personnalis\xe9es des alertes",content:"Les r\xe8gles d'alertes permettent maintenant de d\xe9finir une couleur qui sera utilis\xe9e pour colorer le marqueur des alertes sur la carte.\n <br><br>\n Par d\xe9faut, les alertes restent violettes.\n "},{id:53,type:"new",title:"Rapport quotidien des alertes par email",content:"Un nouveau param\xe8tre est disponible sur chaque r\xe8gle d'alertes et vous permet de recevoir quotidiennement par email un rapport sur les alertes lev\xe9es par vos r\xe8gles au cours de la journ\xe9e pass\xe9e.\n <br>\n Cet email contient, pour l'ensemble de vos r\xe8gles actives et choisies, le nombre d'alertes lev\xe9es au cours de la derni\xe8re journ\xe9e, ainsi qu'un aper\xe7u de quelques alertes.\n <br><br>\n La fonctionnalit\xe9 est volontairement simple et ne permet pas de configurer le plus de choses pour l'instant mais c'est une premi\xe8re \xe9tape vers les notifications.\n <br><br>\n N'h\xe9sitez pas \xe0 nous faire vos retours via le chat.\n "},{id:54,type:"new",title:"C\xe2bles sous-marins et pipelines",content:"Une nouvelle couche de donn\xe9es vient de faire son apparition et permet d'afficher avec les c\xe2bles sous-marins et pipelines.\n "}].reverse();function n6(t,e){1&t&&(r.Vb(0,"span",2),r.Kc(1,"Am\xe9lioration"),r.Ub())}function r6(t,e){1&t&&(r.Vb(0,"span",3),r.Kc(1,"Nouveaut\xe9"),r.Ub())}let s6=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-change-type"]],inputs:{type:"type"},decls:2,vars:2,consts:[["class","change-type change-type--improvement",4,"ngIf"],["class","change-type change-type--new",4,"ngIf"],[1,"change-type","change-type--improvement"],[1,"change-type","change-type--new"]],template:function(t,e){1&t&&(r.Ic(0,n6,2,0,"span",0),r.Ic(1,r6,2,0,"span",1)),2&t&&(r.nc("ngIf","improvement"===e.type),r.Db(1),r.nc("ngIf","new"===e.type))},directives:[ut],styles:[".change-type[_ngcontent-%COMP%]{border-radius:10px;padding:2px 6px;font-size:11px;margin-right:8px}.change-type--improvement[_ngcontent-%COMP%]{background-color:#b26cee;color:#fff}.change-type--new[_ngcontent-%COMP%]{background-color:#3778ff;color:#fff}"],changeDetection:0}),t})();function o6(t,e){if(1&t){const t=r.Wb();r.Vb(0,"a",13),r.cc("click",function(){r.Ac(t);const i=e.$implicit;return r.gc().viewItem(i)}),r.Vb(1,"div",14),r.Qb(2,"app-change-type",15),r.Vb(3,"div",16),r.Kc(4),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=e.$implicit;r.Hb("changelog__item--unread",!t.read),r.Db(2),r.nc("type",t.type),r.Db(2),r.Lc(t.title)}}function a6(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",5),r.Vb(1,"div",6),r.Vb(2,"button",17),r.cc("click",function(){return r.Ac(t),r.gc().unselectItem()}),r.Vb(3,"mat-icon"),r.Kc(4,"chevron_left"),r.Ub(),r.Ub(),r.Vb(5,"div",7),r.Kc(6),r.Ub(),r.Ub(),r.Qb(7,"mat-divider"),r.Vb(8,"div",18),r.Vb(9,"div",19),r.Vb(10,"div",20),r.Qb(11,"app-change-type",21),r.Ub(),r.Qb(12,"div",22),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.Db(6),r.Mc(" ",t.selectedItem.title," "),r.Db(3),r.Hb("changelog__item-content--scrollable",t.selectedItem),r.Db(2),r.nc("type",t.selectedItem.type),r.Db(1),r.nc("innerHTML",t.selectedItem.content,r.Bc)}}let l6=(()=>{class t{constructor(){this.selectedItem=null,this.changelog=i6,this.readItems=[];try{this.readItems=JSON.parse(localStorage.getItem("anais-read-items"))||[]}catch($nt){}this.changelog.forEach(t=>{t.read=this.readItems.includes(t.id)}),this.refreshNewItems()}viewItem(t){this.selectedItem=t,this.readItems.includes(t.id)||(t.read=!0,this.readItems.push(t.id),localStorage.setItem("anais-read-items",JSON.stringify(this.readItems)),this.refreshNewItems())}unselectItem(){this.selectedItem=null}open(){this.trigger.openMenu()}refreshNewItems(){this.hasNewItems=this.changelog.some(t=>!this.readItems.includes(t.id))}onMenuClose(){setTimeout(()=>{this.unselectItem()},400)}readAllItems(){this.readItems=this.changelog.map(t=>(t.read=!0,t.id)),localStorage.setItem("anais-read-items",JSON.stringify(this.readItems)),this.hasNewItems=!1}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-changelog"]],viewQuery:function(t,e){if(1&t&&r.Pc(sU,1),2&t){let t;r.vc(t=r.dc())&&(e.trigger=t.first)}},decls:18,vars:8,consts:[["mat-button","","title","Voir les mises \xe0 jour","joyrideStep","changelog-button","title","Mises \xe0 jour","text","Ce bouton ouvre le menu des mises \xe0 jour de l'application. Tous les changements majeurs de l'application feront l'objet d'une note dans ce menu afin que vous puissiez suivre les \xe9volutions d'ANAIS.",1,"toolbar__button",3,"color","matMenuTriggerFor"],["xPosition","before",1,"changelog",3,"closed"],["menu","matMenu"],[1,"changelog__outer",3,"click"],[1,"changelog__inner"],[1,"changelog__body"],[1,"d-flex"],[1,"changelog__title"],["mat-button","","title","Tout marquer comme lu",3,"click"],[1,"changelog__read-all-icon"],[1,"changelog__list"],["matRipple","","class","changelog__item","title","Voir le d\xe9tail de cette mise \xe0 jour",3,"changelog__item--unread","click",4,"ngFor","ngForOf"],["class","changelog__body",4,"ngIf"],["matRipple","","title","Voir le d\xe9tail de cette mise \xe0 jour",1,"changelog__item",3,"click"],[1,"u-flex"],[2,"float","left",3,"type"],[1,"changelog__item-title"],["mat-button","","title","Revenir \xe0 la liste",2,"float","left",3,"click"],[1,"changelog__list","changelog__list--mini"],[1,"changelog__item-content"],[1,"mb-2"],[3,"type"],[3,"innerHTML"]],template:function(t,e){if(1&t&&(r.Vb(0,"button",0),r.Vb(1,"mat-icon"),r.Kc(2,"info"),r.Ub(),r.Ub(),r.Vb(3,"mat-menu",1,2),r.cc("closed",function(){return e.onMenuClose()}),r.Vb(5,"div",3),r.cc("click",function(t){return t.stopPropagation()}),r.Vb(6,"div",4),r.Vb(7,"div",5),r.Vb(8,"div",6),r.Vb(9,"div",7),r.Kc(10,"Mise(s) \xe0 jour"),r.Ub(),r.Vb(11,"button",8),r.cc("click",function(){return e.readAllItems()}),r.Vb(12,"mat-icon",9),r.Kc(13,"check_circle"),r.Ub(),r.Ub(),r.Ub(),r.Qb(14,"mat-divider"),r.Vb(15,"div",10),r.Ic(16,o6,5,4,"a",11),r.Ub(),r.Ub(),r.Ic(17,a6,13,5,"div",12),r.Ub(),r.Ub(),r.Ub()),2&t){const t=r.wc(4);r.nc("color",e.hasNewItems?"primary":"default")("matMenuTriggerFor",t),r.Db(1),r.Hb("newinfos",e.hasNewItems),r.Db(5),r.Hb("changelog__inner--shifted",!!e.selectedItem),r.Db(10),r.nc("ngForOf",e.changelog),r.Db(1),r.nc("ngIf",e.selectedItem)}},directives:[Dl,ax,sU,Yp,eU,GT,ct,ut,il,s6],styles:[".newinfos{-webkit-animation:swing 2s ease-in-out infinite;animation:swing 2s ease-in-out infinite}@-webkit-keyframes swing{70%{transform:rotate(0deg)}75%{transform:rotate(45deg)}80%{transform:rotate(-35deg)}85%{transform:rotate(25deg)}90%{transform:rotate(-15deg)}95%{transform:rotate(5deg)}to{transform:rotate(0deg)}}@keyframes swing{70%{transform:rotate(0deg)}75%{transform:rotate(45deg)}80%{transform:rotate(-35deg)}85%{transform:rotate(25deg)}90%{transform:rotate(-15deg)}95%{transform:rotate(5deg)}to{transform:rotate(0deg)}}.changelog{min-width:340px!important;max-width:340px!important}.changelog>.mat-menu-content:not(:empty){padding-top:0!important;padding-bottom:0!important}.changelog__outer{overflow-x:hidden;width:340px}.changelog__inner{width:680px;transform:translate(0);overflow:hidden;position:relative;transition:all .3s ease-out;height:450px}.changelog__inner--shifted{transform:translateX(-50%);height:250px}.changelog__body{display:flex;flex-direction:column;width:340px;float:left;height:100%}.changelog__title{padding:.8em;font-weight:600;flex:1;text-align:center}.changelog__read-all-icon{font-size:1.2em}.changelog__item{display:flex;cursor:pointer;font-size:13px;line-height:19px;padding:.6em .8em}.changelog__item:hover{background:rgba(0,0,0,.04)}.changelog__item:first-of-type{padding-top:.8em}.changelog__item:last-of-type{padding-bottom:.6em}.changelog__item--unread{border-left:3px solid #3778ff;padding-left:.6em;letter-spacing:.2px;font-weight:600}.changelog__item-title{color:#000}.changelog__item-content{padding:.6em .8em;font-size:13px}.changelog__list{overflow-y:auto}"],encapsulation:2}),t})();function c6(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",39),r.cc("click",function(){return r.Ac(t),r.gc().mapConfigService.toggleHexagonsLayer()}),r.Qb(1,"mat-icon",40),r.Ub(),r.Qb(2,"mat-divider",3),r.Vb(3,"button",41),r.Qb(4,"mat-icon",42),r.Ub(),r.Qb(5,"mat-divider",3)}if(2&t){const t=r.gc();r.Hb("toolbar__button--active",t.mapConfigService.showHexagonsLayer$.value),r.Db(2),r.nc("vertical",!0),r.Db(3),r.nc("vertical",!0)}}function h6(t,e){1&t&&(r.Qb(0,"mat-divider",3),r.Vb(1,"button",43),r.Vb(2,"mat-icon"),r.Kc(3,"not_started"),r.Ub(),r.Ub()),2&t&&r.nc("vertical",!0)}function u6(t,e){1&t&&r.Qb(0,"mat-icon",44)}function d6(t,e){1&t&&r.Qb(0,"mat-icon",45)}function p6(t,e){if(1&t&&(r.Vb(0,"p",46),r.Vb(1,"mat-icon",47),r.Kc(2,"account_circle"),r.Ub(),r.Kc(3),r.Ub()),2&t){const t=e.ngIf;r.Db(3),r.Mc(" ",t.email," ")}}function f6(t,e){if(1&t){const t=r.Wb();r.Qb(0,"mat-divider"),r.Vb(1,"mat-list"),r.Vb(2,"mat-list-item"),r.Vb(3,"mat-checkbox",48),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc().configService.set("devMode",e)}),r.Kc(4,"Mode d\xe9veloppeur"),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.Db(3),r.nc("ngModel",t.configService.devMode)}}function m6(t,e){1&t&&(r.Qb(0,"mat-divider"),r.Vb(1,"button",49),r.Vb(2,"mat-icon"),r.Kc(3,"build"),r.Ub(),r.Vb(4,"span"),r.Kc(5,"Administration"),r.Ub(),r.Ub())}function g6(t,e){1&t&&(r.Vb(0,"button",50),r.Kc(1,"Pr\xe9c\xe9dent"),r.Ub())}function A6(t,e){1&t&&(r.Vb(0,"button",51),r.Kc(1,"Suivant"),r.Ub())}function b6(t,e){1&t&&(r.Vb(0,"button",52),r.Kc(1,"Terminer"),r.Ub())}let v6=(()=>{class t extends LT{constructor(t,e,i,n,r,s,o,a,l,c,h,u,d){super(),this.router=t,this.authenticationService=e,this.configService=i,this.initializationService=n,this.mapService=r,this.mapConfigService=s,this.measureService=o,this.selectionService=a,this.shipsService=l,this.uiService=c,this.appVersionService=h,this.joyrideService=u,this.workerService=d,this.permanentTooltipsLimit=200,this.devModeAttempts=0}ngOnInit(){this.authenticationService.user$.value.preferences.tourLaunched||setTimeout(()=>Object(ue.a)(this,void 0,void 0,function*(){this.startJoyride(),yield this.workerService.authentication.setUserTourLaunched(!0)}),2e3)}tryEnableDevMode(){this.devModeAttempts++,5===this.devModeAttempts&&(this.configService.set("devMode",!0),this.uiService.success("Mode d\xe9veloppeur activ\xe9")),setTimeout(()=>{this.devModeAttempts=0},5e3)}onShipSearchSelection(t){return Object(ue.a)(this,void 0,void 0,function*(){FD(t.lon)&&FD(t.lat)&&this.mapService.locateFit([t.lon,t.lat]),yield this.selectionService.selectShip(t.mmsi)})}logout(){return Object(ue.a)(this,void 0,void 0,function*(){yield this.authenticationService.logout(),this.initializationService.destroy(),yield this.router.navigateByUrl("/login")})}toggleMeasureModeOnKeyM(t){q4(t)&&"m"===t.key&&this.measureService.toggleMeasureMode()}startJoyrideOnKeyH(t){q4(t)&&"h"===t.key&&this.startJoyride()}startJoyride(){this.joyrideService.startTour({waitingTime:300,steps:["welcome","alerts-panel-button@/","alerts-panel@/alerts/dashboard","rules-panel@/alerts/rules","fleets-panel-button@/","fleets-panel@fleets","create-fleet-button","import-fleet-button","zones-panel-button@/","annotations-panel-button@/","search-panel-button","moves-panel-button","moves-panel@moves","ships-toggle-button@/","aircrafts-toggle-button","ship-tooltips-button","ship-color-mode-button","layers-button","filters-button","search-input","joyride-button","changelog-button","settings-button","pause-button","history-button","zoom-buttons","geolocation-buttons","chat-button","scaleline-control","mouse-position-control","ships-legend","map-end"]})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(sw),r.Pb(yI),r.Pb(cI),r.Pb(RT),r.Pb(pI),r.Pb(hI),r.Pb(WP),r.Pb(xT),r.Pb(wT),r.Pb(VI),r.Pb(c8),r.Pb(_x),r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-topbar-control"]],hostBindings:function(t,e){1&t&&r.cc("keyup",function(t){return e.startJoyrideOnKeyH(t)},!1,r.zc)},features:[r.Ab],decls:112,vars:46,consts:[[3,"ngIf"],["mat-button","","joyrideStep","alerts-panel-button","title","Ouvrir le panneau des alertes","text","Ce bouton ouvre le tableau de bord des alertes. Les r\xe8gles d'alerte servent \xe0 lever des alertes en fonction de crit\xe8res choisis.","routerLink","/alerts","routerLinkActive","toolbar__button--active",1,"toolbar__button",3,"prevTemplate","nextTemplate","doneTemplate"],["svgIcon","danger"],[1,"toolbar__h-divider",3,"vertical"],["mat-button","","joyrideStep","fleets-panel-button","title","Ouvrir le panneau des flottes de navires","text","Ce bouton ouvre le panneau des flottes de navires. Une flotte de navire est un groupe de navires, cela permet de suivre plus facilement l'\xe9volution de plusieurs navires simultan\xe9ment (alertes, traces...)","routerLink","/fleets","routerLinkActive","toolbar__button--active",1,"toolbar__button"],["svgIcon","fleets"],["mat-button","","joyrideStep","zones-panel-button","title","Ouvrir le panneau de gestion des zones","text","Ce bouton ouvre le panneau de gestion des zones. Les zones sont utilis\xe9es dans les r\xe8gles d'alerte pour filtrer les r\xe9sultats g\xe9ographiquement.","routerLink","/zones","routerLinkActive","toolbar__button--active",1,"toolbar__button"],["svgIcon","zones"],["gid","annotations","date","2021-03-20"],["mat-button","","joyrideStep","annotations-panel-button","title","Ouvrir le panneau de gestion des annotations","text","Ce bouton ouvre le panneau de gestion des annotations. Les annotations vous permettent de cr\xe9er des points g\xe9ographiques sur la carte ou encore de dessiner des zones.","routerLink","/annotations","routerLinkActive","toolbar__button--active",1,"toolbar__button"],["mat-button","","joyrideStep","search-panel-button","title","Ouvrir le panneau de recherche","text","Ce bouton ouvre le panneau de recherche dans lequel vous pouvez rechercher des navires ou bien des conteneurs.","routerLink","/search","routerLinkActive","toolbar__button--active",1,"toolbar__button"],["mat-button","","joyrideStep","moves-panel-button","title","Ouvrir le panneau de recherche de mouvements","text","Ce bouton ouvre le panneau de recherche de mouvements.","routerLink","/moves","routerLinkActive","toolbar__button--active",1,"toolbar__button"],["mat-button","","joyrideStep","ships-toggle-button","title","Basculer l'affichage des navires","text","Ce bouton permet de basculer l'affichage des navires pour par exemple se concentrer sur des traces.",1,"toolbar__button",3,"click"],["mat-button","","joyrideStep","aircrafts-toggle-button","title","Basculer l'affichage des a\xe9ronefs","text","Ce bouton permet de basculer l'affichage des a\xe9ronefs.",1,"toolbar__button",3,"click"],["gid","multi-selection","date","2021-02-08"],["mat-button","","joyrideStep","multiselection-toggle-button","title","Basculer le mode multi-s\xe9lection","text","Ce bouton permet de basculer le mode multi-s\xe9lection. Dans ce mode, le clic sur un navire n'ouvre pas directement la fiche navire mais le s\xe9lectionne, et on peut ainsi voir la trace de plusieurs navires simultan\xe9ment.",1,"toolbar__button",3,"click"],["mat-button","","joyrideStep","ship-tooltips-button","title","Basculer l'affichage des \xe9tiquettes permanentes","text","Ce bouton permet de basculer l'affichage des \xe9tiquettes permanentes. Les \xe9tiquettes contiennent des informations basiques comme le nom, le MMSI, la date de r\xe9ception et permettent d'obtenir une vision rapide d'une situation maritime. A noter que les \xe9tiquettes sont masqu\xe9es lorsque trop de navires ou avions sont affich\xe9s.",1,"toolbar__button",3,"disabled","click"],["svgIcon","tooltips",4,"ngIf"],["svgIcon","tooltips-mini",4,"ngIf"],["mat-button","","joyrideStep","ship-color-mode-button","title","Basculer vers le mode de coloration par alertes/\xe9v\xe9nements","text","Ce bouton permet de basculer la coloration par type de navires par d\xe9faut vers la coloration par alertes et \xe9v\xe9nements recherch\xe9s.",1,"toolbar__button",3,"click"],["joyrideStep","search-input","title","Recherche de navires","text","Ce champ texte permet de rechercher des navires via leur nom, MMSI ou encore IMO.",1,"topbar-control__search",3,"selectItem"],["mat-button","","title","Lancer l'animation d'introduction","joyrideStep","joyride-button","title","Animation d'introduction","text","Ce bouton permet de rejouer l'animation d'introduction.",1,"toolbar__button",3,"click"],["mat-button","","title","Afficher les param\xe8tres","joyrideStep","settings-button","title","Param\xe8tres","text","Ce bouton ouvre le menu des param\xe8tres. C'est utile pour changer des param\xe8tres globaux, optimiser le d\xe9bit (restriction de zone, fr\xe9quence de rafraichissement...), ou encore se d\xe9connecter de l'application.",1,"toolbar__button",3,"matMenuTriggerFor"],["xPosition","before",1,"large-menu"],["settingsMenu","matMenu"],[3,"click"],[1,"topbar-control__menuitem","topbar-control__app-title",3,"click"],[3,"matTooltip"],["class","topbar-control__menuitem d-flex-center",4,"ngIf"],["mat-menu-item","","routerLink","/settings"],["mat-menu-item","","href","mailto:equipe@anais.beta.gouv.fr?subject=A propos d'ANAIS","target","_blank"],["gid","tchap-link","date","2021-04-09",3,"width","height"],["mat-menu-item","","href","https://tchap.gouv.fr/#/room/#ANAIS96Clw3VeN7q:agent.dinum.tchap.gouv.fr","target","_blank"],["src","assets/images/tchap-logo.png","alt","tchap-logo"],["mat-menu-item","","routerLink","/about"],["mat-menu-item","","title","Se d\xe9connecter",3,"click"],["prevJoyrideButton",""],["nextJoyrideButton",""],["doneJoyrideButton",""],["mat-button","","title","Basculer l'affichage des hexagones",1,"toolbar__button",3,"click"],["svgIcon","hexagon"],["mat-button","","routerLink","/ports","routerLinkActive","toolbar__button--active",1,"toolbar__button"],["svgIcon","anchor"],["mat-button","","joyrideStep","playback-panel-button","title","Ouvrir le mode rejeu","text","Ce bouton active le mode rejeu qui permet de rejouer une situation maritime pass\xe9e.","routerLink","/playback","routerLinkActive","toolbar__button--active",1,"toolbar__button"],["svgIcon","tooltips"],["svgIcon","tooltips-mini"],[1,"topbar-control__menuitem","d-flex-center"],[1,"mr-2"],["color","primary",3,"ngModel","ngModelChange"],["mat-menu-item","","color","accent","routerLink","/admin/users"],["mat-flat-button","","color","primary","title","Aller \xe0 la page pr\xe9c\xe9dente",1,"joyride-button"],["mat-flat-button","","color","primary","title","Aller \xe0 la page suivante",1,"joyride-button"],["mat-flat-button","","color","primary","title","Terminer l'introduction",1,"joyride-button"]],template:function(t,e){if(1&t&&(r.Ic(0,c6,6,4,"ng-template",0),r.Vb(1,"button",1),r.Qb(2,"mat-icon",2),r.Ub(),r.Qb(3,"mat-divider",3),r.Vb(4,"button",4),r.Qb(5,"mat-icon",5),r.Ub(),r.Qb(6,"mat-divider",3),r.Vb(7,"button",6),r.Qb(8,"mat-icon",7),r.Ub(),r.Ic(9,h6,4,1,"ng-template",0),r.Qb(10,"mat-divider",3),r.Vb(11,"app-glitter",8),r.Vb(12,"button",9),r.Vb(13,"mat-icon"),r.Kc(14,"loyalty"),r.Ub(),r.Ub(),r.Ub(),r.Qb(15,"mat-divider",3),r.Vb(16,"button",10),r.Vb(17,"mat-icon"),r.Kc(18,"search"),r.Ub(),r.Ub(),r.Qb(19,"mat-divider",3),r.Vb(20,"button",11),r.Vb(21,"mat-icon"),r.Kc(22,"insert_chart_outlined"),r.Ub(),r.Ub(),r.Qb(23,"mat-divider",3),r.Vb(24,"button",12),r.cc("click",function(){return e.mapConfigService.toggleShipsLayer()}),r.Vb(25,"mat-icon"),r.Kc(26,"directions_boat"),r.Ub(),r.Ub(),r.Qb(27,"mat-divider",3),r.Vb(28,"button",13),r.cc("click",function(){return e.mapConfigService.toggleAircraftsLayer()}),r.Vb(29,"mat-icon"),r.Kc(30,"flight"),r.Ub(),r.Ub(),r.Qb(31,"mat-divider",3),r.Vb(32,"app-glitter",14),r.Vb(33,"button",15),r.cc("click",function(){return e.mapConfigService.toggleMultiSelectionMode()}),r.Vb(34,"mat-icon"),r.Kc(35,"dynamic_feed"),r.Ub(),r.Ub(),r.Ub(),r.Qb(36,"mat-divider",3),r.Vb(37,"button",16),r.cc("click",function(){return e.mapConfigService.toggleShipTooltips()}),r.hc(38,"async"),r.Ic(39,u6,1,0,"mat-icon",17),r.Ic(40,d6,1,0,"mat-icon",18),r.Ub(),r.Qb(41,"mat-divider",3),r.Vb(42,"button",19),r.cc("click",function(){return e.mapConfigService.toggleShipsColorMode()}),r.Vb(43,"mat-icon"),r.Kc(44,"palette"),r.Ub(),r.Ub(),r.Qb(45,"mat-divider",3),r.Qb(46,"app-layers-control"),r.Qb(47,"mat-divider",3),r.Qb(48,"app-filters-control"),r.Qb(49,"mat-divider",3),r.Vb(50,"app-ship-search",20),r.cc("selectItem",function(t){return e.onShipSearchSelection(t)}),r.Ub(),r.Qb(51,"mat-divider",3),r.Vb(52,"button",21),r.cc("click",function(){return e.startJoyride()}),r.Vb(53,"mat-icon"),r.Kc(54,"help"),r.Ub(),r.Ub(),r.Qb(55,"mat-divider",3),r.Qb(56,"app-changelog"),r.Qb(57,"mat-divider",3),r.Vb(58,"button",22),r.Vb(59,"mat-icon"),r.Kc(60,"settings"),r.Ub(),r.Ub(),r.Vb(61,"mat-menu",23,24),r.Vb(63,"div",25),r.cc("click",function(t){return t.stopPropagation()}),r.Vb(64,"p",26),r.cc("click",function(){return e.tryEnableDevMode()}),r.Kc(65," ANAIS - "),r.Vb(66,"small"),r.Kc(67,"Derni\xe8re mise \xe0 jour le "),r.Vb(68,"span",27),r.Kc(69),r.Ub(),r.Ub(),r.Ub(),r.Qb(70,"mat-divider"),r.Ic(71,p6,4,1,"p",28),r.hc(72,"async"),r.Ic(73,f6,5,1,"ng-template",0),r.Ub(),r.Qb(74,"mat-divider"),r.Vb(75,"button",29),r.Vb(76,"mat-icon"),r.Kc(77,"settings"),r.Ub(),r.Vb(78,"span"),r.Kc(79,"Param\xe8tres"),r.Ub(),r.Ub(),r.Ic(80,m6,6,0,"ng-template",0),r.Qb(81,"mat-divider"),r.Vb(82,"a",30),r.Vb(83,"mat-icon"),r.Kc(84,"contact_support"),r.Ub(),r.Vb(85,"span"),r.Kc(86,"Contacter l'\xe9quipe"),r.Ub(),r.Ub(),r.Qb(87,"mat-divider"),r.Vb(88,"app-glitter",31),r.Vb(89,"a",32),r.Vb(90,"mat-icon"),r.Qb(91,"img",33),r.Ub(),r.Vb(92,"span"),r.Kc(93,"Salon ANAIS sur Tchap"),r.Ub(),r.Ub(),r.Ub(),r.Qb(94,"mat-divider"),r.Vb(95,"button",34),r.Vb(96,"mat-icon"),r.Kc(97,"info"),r.Ub(),r.Vb(98,"span"),r.Kc(99,"\xc0 propos"),r.Ub(),r.Ub(),r.Qb(100,"mat-divider"),r.Vb(101,"button",35),r.cc("click",function(){return e.logout()}),r.Vb(102,"mat-icon"),r.Kc(103,"logout"),r.Ub(),r.Vb(104,"span"),r.Kc(105,"D\xe9connexion"),r.Ub(),r.Ub(),r.Ub(),r.Ic(106,g6,2,0,"ng-template",null,36,r.Jc),r.Ic(108,A6,2,0,"ng-template",null,37,r.Jc),r.Ic(110,b6,2,0,"ng-template",null,38,r.Jc)),2&t){const t=r.wc(62),i=r.wc(107),n=r.wc(109),s=r.wc(111);r.nc("ngIf",e.configService.devMode),r.Db(1),r.nc("prevTemplate",i)("nextTemplate",n)("doneTemplate",s),r.Db(2),r.nc("vertical",!0),r.Db(3),r.nc("vertical",!0),r.Db(3),r.nc("ngIf",e.configService.devMode),r.Db(1),r.nc("vertical",!0),r.Db(5),r.nc("vertical",!0),r.Db(4),r.nc("vertical",!0),r.Db(4),r.nc("vertical",!0),r.Db(1),r.Hb("toolbar__button--active",e.mapConfigService.showShipsLayer$.value),r.Db(3),r.nc("vertical",!0),r.Db(1),r.Hb("toolbar__button--active",e.mapConfigService.showAircraftsLayer$.value),r.Db(3),r.nc("vertical",!0),r.Db(2),r.Hb("toolbar__button--active",e.mapConfigService.enableMultiSelectionMode$.value),r.Db(3),r.nc("vertical",!0),r.Db(1),r.Hb("toolbar__button--active",e.mapConfigService.showPermanentTooltips$.value),r.nc("disabled",r.ic(38,42,e.shipsService.shipsInView$).length>e.permanentTooltipsLimit),r.Db(2),r.nc("ngIf",!e.mapConfigService.showMiniPermanentTooltips$.value),r.Db(1),r.nc("ngIf",e.mapConfigService.showMiniPermanentTooltips$.value),r.Db(1),r.nc("vertical",!0),r.Db(1),r.Hb("toolbar__button--active",!e.mapConfigService.shipFilter$.value.colorModeShipType),r.Db(3),r.nc("vertical",!0),r.Db(2),r.nc("vertical",!0),r.Db(2),r.nc("vertical",!0),r.Db(2),r.nc("vertical",!0),r.Db(4),r.nc("vertical",!0),r.Db(2),r.nc("vertical",!0),r.Db(1),r.nc("matMenuTriggerFor",t),r.Db(10),r.nc("matTooltip","#"+e.appVersionService.appVersion),r.Db(1),r.Lc(e.appVersionService.appDate),r.Db(2),r.nc("ngIf",r.ic(72,44,e.authenticationService.user$)),r.Db(2),r.nc("ngIf",e.configService.devMode),r.Db(7),r.nc("ngIf",e.authenticationService.isAdmin()),r.Db(8),r.nc("width",272)("height",48)}},directives:[ut,Dl,ax,ow,cw,Yp,GT,DL,x8,Z8,e6,l6,sU,eU,oA,QL,yU,SU,tF,Vc,uh],pipes:[St],styles:[".topbar-control__search[_ngcontent-%COMP%], [_nghost-%COMP%]{display:flex}.topbar-control__app-title[_ngcontent-%COMP%]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.topbar-control__menuitem[_ngcontent-%COMP%]{padding:0 16px}.topbar-control__section-title[_ngcontent-%COMP%]{background-color:hsla(0,0%,91.8%,.5686274509803921);padding-top:8px;padding-left:16px;padding-bottom:8px;margin-bottom:8px}.topbar-control__subsection-title[_ngcontent-%COMP%]{height:32px!important}.topbar-control__list-item[_ngcontent-%COMP%]{height:30px!important}.no-filter-selected-warning[_ngcontent-%COMP%]{color:#e41010;display:flex;justify-content:center;line-height:1.5em}.joyride-button[_ngcontent-%COMP%]{font-size:14px!important;line-height:1.6em;padding:0 8px} .large-menu{max-width:500px!important} .large-menu .mat-menu-content{padding:0!important}"]}),t})();function _6(t,e){if(1&t&&(r.Vb(0,"div",1),r.Vb(1,"mat-icon",2),r.Kc(2,"warning"),r.Ub(),r.Vb(3,"span"),r.Kc(4),r.Ub(),r.Vb(5,"span",3),r.Kc(6,"Plus d'informations"),r.Ub(),r.Ub()),2&t){const t=r.gc();r.Db(4),r.Lc(t.message),r.Db(1),r.nc("title",t.details)}}let y6=(()=>{class t{constructor(t,e){this.changeDetectorRef=t,this.workerService=e,this.show=!1}ngOnInit(){this.changeDetectorRef.detach(),this.workerService.applicationHealth$.pipe(He(t=>!!t)).subscribe(t=>{this.show="enabled"===t.status&&(t.anais_aircrafts_feed_drift_seconds>600||t.anais_ships_feed_drift_seconds>600),this.details="";const e=[];t.anais_aircrafts_feed_drift_seconds>600&&(this.details+=`Le flux des avions est en retard de ${UO(t.anais_aircrafts_feed_drift_seconds)}.\n`,e.push("a\xe9ronefs")),t.anais_ships_feed_drift_seconds>600&&(this.details+=`Le flux des navires est en retard de ${UO(t.anais_ships_feed_drift_seconds)}.\n`,e.push("navires")),this.details+="\nExplications : Le retard des flux est en g\xe9n\xe9ral caus\xe9 par une maintenance temporaire qui arr\xeate le programme d'ingestion. Dans les cas plus rares, le probl\xe8me peut \xe9galement survenir au niveau des sources de donn\xe9es que nous utilisons.",this.message=`Attention, le${e.length>1?"s":""} flux des ${e.join(" et des ")} pr\xe9sente${e.length>1?"nt":""} un retard !`,this.changeDetectorRef.detectChanges()})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-health-banner"]],decls:1,vars:1,consts:[["class","health-banner mat-elevation-z4 mt05em",4,"ngIf"],[1,"health-banner","mat-elevation-z4","mt05em"],[1,"health-banner__icon"],[1,"health-banner__more-infos",3,"title"]],template:function(t,e){1&t&&r.Ic(0,_6,7,2,"div",0),2&t&&r.nc("ngIf",e.show)},directives:[ut,Yp],styles:[".health-banner[_ngcontent-%COMP%]{display:flex;background:#fff;padding:.5em;font-size:.9em;align-items:center;pointer-events:all;touch-action:all}.health-banner__icon[_ngcontent-%COMP%]{font-size:1.5em;line-height:1em;height:1em;color:#e12f2f;margin-right:4px}.health-banner__more-infos[_ngcontent-%COMP%]{margin-left:8px;font-size:.9em;font-weight:500;color:#5b5b5b;cursor:help}"]}),t})(),w6=(()=>{class t{transform(t){return e=t,Math.floor(e/86400)>=1?`${VD(e/86400)}j`:Math.floor(e%86400/3600)>=1?`${VD(e%86400/3600)}h`:`${VD(e%86400/60)}min`;var e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=r.Ob({name:"timePeriod",type:t,pure:!0}),t})();function x6(t,e){if(1&t&&(r.Kc(0),r.hc(1,"date"),r.Vb(2,"mat-icon"),r.Kc(3,"arrow_right_alt"),r.Ub(),r.Kc(4),r.hc(5,"date")),2&t){const t=r.gc();r.Mc(" ",r.kc(1,2,1e3*t.displayedTimeRange.start,"yyyy-MM-dd HH:mm:ss z",t.mapConfigService.useUTCDates$.value&&"z")," "),r.Db(4),r.Mc(" ",r.kc(5,6,1e3*t.displayedTimeRange.end,"yyyy-MM-dd HH:mm:ss z",t.mapConfigService.useUTCDates$.value&&"z")," ")}}function C6(t,e){if(1&t&&r.Kc(0),2&t){const t=r.gc();r.Mc(" ",t.displayedTimeRange.label," ")}}function S6(t,e){if(1&t&&(r.Vb(0,"mat-option",21),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.oc("title",t.label),r.nc("value",t),r.Db(1),r.Mc(" ",t.label," ")}}let k6=(()=>{class t extends LT{constructor(t,e){super(),this.mapConfigService=t,this.timeRangeService=e,this.selectedTimeRange$=new _e.a,this.minDate=new Date(2019,5,1),this.maxDate=new Date,this.availableTimeRanges=tI}ngOnInit(){this.subscriptions.push(this.timeRangeService.timeRange$.subscribe(t=>{this.displayedTimeRange=t})),this.maxDateRefresherTimer=window.setInterval(()=>{this.maxDate=new Date},6e4)}ngOnDestroy(){super.ngOnDestroy(),clearInterval(this.maxDateRefresherTimer)}selectTimeRange(t){t.isCustom?(this.customRangeStart=new Date(1e3*this.displayedTimeRange.start),this.customRangeEnd=new Date(1e3*this.displayedTimeRange.end),this.calendarMenu.openMenu()):this.timeRangeService.updateTimeRange(t),this.select.writeValue(null)}openSelect(){this.select.open()}applyCustomTimeRange(t,e){this.timeRangeService.setCustom(Math.floor(t.getTime()/1e3),Math.floor(e.getTime()/1e3)),this.calendarMenu.closeMenu()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(hI),r.Pb(yT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-timerange-control"]],viewQuery:function(t,e){if(1&t&&(r.Pc(Vg,3),r.Pc(sU,3)),2&t){let t;r.vc(t=r.dc())&&(e.select=t.first),r.vc(t=r.dc())&&(e.calendarMenu=t.first)}},features:[r.Ab],decls:44,vars:31,consts:[["mat-button","","title","Remonter dans le temps",3,"click"],["mat-button","","title","\xc9tendre la p\xe9riode",3,"click"],["mat-button","",3,"title","click"],[1,"timerange-control__time-icon"],[3,"ngIf"],[1,"hidden",3,"selectionChange"],["select",""],[3,"value","title",4,"ngFor","ngForOf"],[1,"u-wide-menu"],["calendarMenu","matMenu"],[1,"d-flex-column-center","pa-2",3,"click"],["customRangeForm","ngForm"],[1,"mr-2"],["matInput","","name","start","placeholder","D\xe9but",3,"matDatepicker","ngModel","min","max","ngModelChange"],["matSuffix","",3,"for"],["picker1",""],["matInput","","name","end","placeholder","Fin",3,"matDatepicker","ngModel","min","max","ngModelChange"],["picker2",""],["mat-raised-button","","color","primary","title","Appliquer cette p\xe9riode",3,"disabled","click"],[1,"hidden",3,"matMenuTriggerFor"],["mat-button","","title","Avancer dans le temps",3,"click"],[3,"value","title"]],template:function(t,e){if(1&t&&(r.Vb(0,"button",0),r.cc("click",function(){return e.timeRangeService.goBackward()}),r.Vb(1,"mat-icon"),r.Kc(2,"chevron_left"),r.Ub(),r.Kc(3),r.hc(4,"timePeriod"),r.Ub(),r.Vb(5,"button",1),r.cc("click",function(){return e.timeRangeService.extendBackward()}),r.Vb(6,"mat-icon"),r.Kc(7,"skip_previous"),r.Ub(),r.Ub(),r.Vb(8,"button",2),r.cc("click",function(){return e.openSelect()}),r.hc(9,"date"),r.hc(10,"date"),r.Vb(11,"mat-icon",3),r.Kc(12,"timelapse"),r.Ub(),r.Ic(13,x6,6,10,"ng-template",4),r.Ic(14,C6,1,1,"ng-template",4),r.Ub(),r.Vb(15,"mat-select",5,6),r.cc("selectionChange",function(t){return e.selectTimeRange(t.value)}),r.Ic(17,S6,2,3,"mat-option",7),r.Ub(),r.Vb(18,"mat-menu",8,9),r.Vb(20,"div",10),r.cc("click",function(t){return t.stopPropagation()}),r.Vb(21,"ng-form",null,11),r.Vb(23,"mat-form-field",12),r.Vb(24,"input",13),r.cc("ngModelChange",function(t){return e.customRangeStart=t}),r.Ub(),r.Qb(25,"mat-datepicker-toggle",14),r.Qb(26,"mat-datepicker",null,15),r.Ub(),r.Vb(28,"mat-form-field"),r.Vb(29,"input",16),r.cc("ngModelChange",function(t){return e.customRangeEnd=t}),r.Ub(),r.Qb(30,"mat-datepicker-toggle",14),r.Qb(31,"mat-datepicker",null,17),r.Ub(),r.Ub(),r.Vb(33,"button",18),r.cc("click",function(){return e.applyCustomTimeRange(e.customRangeStart,e.customRangeEnd)}),r.Kc(34," Appliquer "),r.Ub(),r.Ub(),r.Ub(),r.Qb(35,"div",19),r.Vb(36,"button",1),r.cc("click",function(){return e.timeRangeService.extendForward()}),r.Vb(37,"mat-icon"),r.Kc(38,"skip_next"),r.Ub(),r.Ub(),r.Vb(39,"button",20),r.cc("click",function(){return e.timeRangeService.goForward()}),r.Kc(40),r.hc(41,"timePeriod"),r.Vb(42,"mat-icon"),r.Kc(43,"chevron_right"),r.Ub(),r.Ub()),2&t){const t=r.wc(19),i=r.wc(22),n=r.wc(27),s=r.wc(32);r.Db(3),r.Mc(" - ",r.ic(4,19,e.displayedTimeRange.value/2),"\n"),r.Db(5),r.qc("title","",r.kc(9,21,1e3*e.displayedTimeRange.start,"yyyy-MM-dd HH:mm:ss z",e.mapConfigService.useUTCDates$.value&&"z")," -> ",r.kc(10,25,1e3*e.displayedTimeRange.end,"yyyy-MM-dd HH:mm:ss z",e.mapConfigService.useUTCDates$.value&&"z"),""),r.Db(5),r.nc("ngIf",e.displayedTimeRange.isCustom),r.Db(1),r.nc("ngIf",!e.displayedTimeRange.isCustom),r.Db(3),r.nc("ngForOf",e.availableTimeRanges),r.Db(7),r.nc("matDatepicker",n)("ngModel",e.customRangeStart)("min",e.minDate)("max",e.maxDate),r.Db(1),r.nc("for",n),r.Db(4),r.nc("matDatepicker",s)("ngModel",e.customRangeEnd)("min",e.minDate)("max",e.maxDate),r.Db(1),r.nc("for",s),r.Db(3),r.nc("disabled",!i.form.valid),r.Db(2),r.nc("matMenuTriggerFor",t),r.Db(5),r.Mc(" + ",r.ic(41,29,e.displayedTimeRange.value/2)," ")}},directives:[Dl,Yp,ut,Vg,ct,eU,oh,_u,Ou,Ld,ac,Vc,uh,Bd,fu,Pd,sU,bl],pipes:[w6,kt],styles:[".timerange-control__time-icon[_ngcontent-%COMP%]{font-size:18px;height:18px;line-height:16px}.hidden[_ngcontent-%COMP%]{display:inline-block;width:0;visibility:hidden}"]}),t})(),E6=(()=>{class t extends LT{constructor(t,e,i){super(),this.mapService=t,this.shipsService=e,this.zonesLayerService=i,this.shipsInViewCount=0,this.shipsCount=0,this.h3indexes=""}ngOnInit(){this.subscriptions.push(Hg([this.shipsService.shipsInView$,this.shipsService.shipsCount$]).pipe(wm(500)).subscribe(([t,e])=>{this.shipsInViewCount=t.length,this.shipsCount=e}))}importZone(){const t=this.h3indexes.split(",");this.zonesLayerService.updateZones([...this.zonesLayerService.zones$.value,{name:`DEBUG ${this.zonesLayerService.zones$.value.length+1}`,h3indexes:t}]),this.mapService.fitOn(wP(t)),this.h3indexes=""}clearZones(){this.zonesLayerService.clear()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(pI),r.Pb(wT),r.Pb(DT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-debug-infos"]],features:[r.Ab],decls:10,vars:3,consts:[[1,"pa-2","mt05em"],["type","text","placeholder","h3index,h3index...","title","Saisir une liste d'hexagones s\xe9par\xe9s par des virgules",3,"ngModel","ngModelChange"],["mat-button","","title","Importer une liste d'hexagones",3,"disabled","click"],["mat-button","","title","Nettoyer les zones affich\xe9es",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div"),r.Kc(2),r.Ub(),r.Vb(3,"div"),r.Vb(4,"input",1),r.cc("ngModelChange",function(t){return e.h3indexes=t}),r.Ub(),r.Vb(5,"button",2),r.cc("click",function(){return e.importZone()}),r.Kc(6," Importer "),r.Ub(),r.Vb(7,"button",3),r.cc("click",function(){return e.clearZones()}),r.Vb(8,"mat-icon"),r.Kc(9,"clear"),r.Ub(),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(2),r.Mc("# ships : ",e.shipsCount,""),r.Db(2),r.nc("ngModel",e.h3indexes),r.Db(1),r.nc("disabled",""===e.h3indexes))},directives:[ac,Vc,uh,Dl,Yp],styles:[""]}),t})(),D6=(()=>{class t{constructor(t){this.mapService=t}zoomIn(){this.mapService.zoomByDelta(1)}zoomOut(){this.mapService.zoomByDelta(-1)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(pI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-zoom-control"]],decls:5,vars:0,consts:[["mat-button","","title","Zoomer",1,"zoom-control-button","toolbar__button",3,"click"],[1,"toolbar__v-divider"],["mat-button","","title","D\xe9zoomer",1,"zoom-control-button","toolbar__button",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"button",0),r.cc("click",function(){return e.zoomIn()}),r.Kc(1,"+"),r.Ub(),r.Qb(2,"mat-divider",1),r.Vb(3,"button",2),r.cc("click",function(){return e.zoomOut()}),r.Kc(4,"\u2212"),r.Ub())},directives:[Dl,GT],styles:[".zoom-control-button[_ngcontent-%COMP%]{font-size:32px;font-weight:300}"],changeDetection:0}),t})();function I6(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",4),r.cc("click",function(){return r.Ac(t),r.gc().locatePosition()}),r.Vb(1,"mat-icon"),r.Kc(2,"center_focus_strong"),r.Ub(),r.Ub(),r.Qb(3,"mat-divider",5)}if(2&t){const t=r.gc();r.nc("disabled",!!t.retrievalError)}}function P6(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",6),r.cc("click",function(){return r.Ac(t),r.gc().toggleGeolocation()}),r.Vb(1,"mat-icon"),r.Kc(2,"gps_fixed"),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.nc("color",t.retrievalError?"warn":"primary")("title","server"!==t.source||t.serverURL?"Localisation active. Cliquer pour d\xe9sactiver la g\xe9olocalisation.":"L'URL de r\xe9cup\xe9ration n'a pas \xe9t\xe9 configur\xe9e. Allez dans `Param\xe8tres > G\xe9olocalisation` pour la configurer.")("disabled","server"===t.source&&!t.serverURL)}}function O6(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",7),r.cc("click",function(){return r.Ac(t),r.gc().toggleGeolocation()}),r.Vb(1,"mat-icon"),r.Kc(2,"gps_off"),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.nc("title","server"!==t.source||t.serverURL?"Localisation d\xe9sactiv\xe9e. Cliquer pour activer la g\xe9olocalisation.":"L'URL de r\xe9cup\xe9ration n'a pas \xe9t\xe9 configur\xe9e. Allez dans `Param\xe8tres > G\xe9olocalisation` pour la configurer.")("disabled","server"===t.source&&!t.serverURL)}}function M6(t,e){if(1&t&&(r.Vb(0,"div",8),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Mc(" ",t.retrievalError,"\n")}}let T6=(()=>{class t extends LT{constructor(t,e){super(),this.geolocationService=t,this.mapService=e}ngOnInit(){this.subscriptions.push(this.geolocationService.enable$.subscribe(t=>{this.enable=t}),this.geolocationService.fixedLocation$.subscribe(t=>{this.fixedLocation=t}),this.geolocationService.serverURL$.subscribe(t=>{this.serverURL=t}),this.geolocationService.source$.subscribe(t=>{this.source=t}),this.geolocationService.retrievalError$.subscribe(t=>{this.retrievalError=t}))}toggleGeolocation(){this.geolocationService.updateEnable(!this.geolocationService.enable$.value),this.geolocationService.validConfiguration$.value&&this.geolocationService.location$.pipe(Gg(1),He(t=>!!t),Rv()).subscribe(t=>{this.mapService.locate([t.lon,t.lat])})}locatePosition(){const t=this.geolocationService.location$.value;t&&this.mapService.locate([t.lon,t.lat])}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(n$),r.Pb(pI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-geolocation-control"]],features:[r.Ab],decls:4,vars:4,consts:[[3,"ngIf"],["mat-button","","class","toolbar__button",3,"color","title","disabled","click",4,"ngIf"],["mat-button","","class","toolbar__button",3,"title","disabled","click",4,"ngIf"],["class","geolocation-error",4,"ngIf"],["mat-button","","title","Centrer la carte sur la position",1,"toolbar__button",3,"disabled","click"],[1,"toolbar__v-divider"],["mat-button","",1,"toolbar__button",3,"color","title","disabled","click"],["mat-button","",1,"toolbar__button",3,"title","disabled","click"],[1,"geolocation-error"]],template:function(t,e){1&t&&(r.Ic(0,I6,4,1,"ng-template",0),r.Ic(1,P6,3,3,"button",1),r.Ic(2,O6,3,2,"button",2),r.Ic(3,M6,2,1,"div",3)),2&t&&(r.nc("ngIf",e.enable&&("browser"===e.source||"server"===e.source&&e.serverURL||"fixed_location"===e.source&&e.fixedLocation)),r.Db(1),r.nc("ngIf",e.enable),r.Db(1),r.nc("ngIf",!e.enable),r.Db(1),r.nc("ngIf",e.retrievalError))},directives:[ut,Dl,Yp,GT],styles:["[_nghost-%COMP%]{position:relative}.geolocation-error[_ngcontent-%COMP%]{position:absolute;right:48px;bottom:0;width:-webkit-max-content;width:-moz-max-content;width:max-content;font-size:.8em;color:#dc1818}"]}),t})();function R6(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",3),r.cc("click",function(){return r.Ac(t),r.gc().toggleBearing()}),r.Vb(1,"mat-icon",4),r.Kc(2),r.Ub(),r.Kc(3),r.Ub(),r.Vb(4,"span",2),r.Kc(5,"-"),r.Ub()}if(2&t){const t=r.gc();r.nc("title",t.usingBearingCoordinates?"Affichage en gisements (cliquer pour basculer l'affichage en azimuts)":"Affichage en azimuts (cliquer pour basculer l'affichage en gisements)")("disabled",!t.validBearingConfiguration),r.Db(2),r.Lc(t.usingBearingCoordinates?"near_me":"navigation"),r.Db(1),r.Mc(" ",t.azimuthCoordinates," ")}}let V6=(()=>{class t extends LT{constructor(t,e,i){super(),this.ngZone=t,this.changeDetectionRef=e,this.geolocationLayerService=i,this.lonLatCoordinates="0\xb0 0' 0\" N 0\xb0 0' 0\" W",this.azimuthCoordinates="",this.gpsLocation=null,this.validBearingConfiguration=!1,this.showBearing=!1,this.usingBearingCoordinates=!1}ngOnInit(){this.ensureMandatoryInputParams("map"),this.changeDetectionRef.detach(),this.subscriptions.push(Hg([this.geolocationLayerService.validConfiguration$,this.geolocationLayerService.showBearing$,this.geolocationLayerService.location$]).subscribe(([t,e,i])=>{i&&(this.gpsLocation=t?sE([i.lon,i.lat]):null,this.showBearing=e,this.refreshAzimuth(),this.changeDetectionRef.detectChanges())}));const t=this.map.getViewport();this.ngZone.runOutsideAngular(()=>{this.subscriptions.push(Object(or.a)(en(t,"mousemove"),en(t,"touchstart")).pipe(He(t=>!t.grabbing),wm(66,Le,{leading:!1,trailing:!0})).subscribe(t=>{this.handleMouseMove(t)}))}),this.changeDetectionRef.detectChanges()}handleMouseMove(t){const e=this.map.getEventCoordinate(t);e&&(this.cursorCoordinates=e,this.lonLatCoordinates=Yk(oE(this.cursorCoordinates)),this.refreshAzimuth(),this.changeDetectionRef.detectChanges())}refreshAzimuth(){this.gpsLocation&&this.cursorCoordinates&&(this.validBearingConfiguration=-1!==this.geolocationLayerService.headingAngle$.value,this.usingBearingCoordinates=this.showBearing&&this.validBearingConfiguration,this.azimuthCoordinates=this.usingBearingCoordinates?function(t,e,i){let n=(i$(e[0]-t[0],e[1]-t[1])-i)%360;return n>180&&(n-=360),n<=-180&&(n+=360),`${n}\xb0 ${t$(new kH([t,e]))}`}(this.gpsLocation,this.cursorCoordinates,this.geolocationLayerService.headingAngle$.value):e$(this.gpsLocation,this.cursorCoordinates))}toggleBearing(){this.geolocationLayerService.toggleShowBearing()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.B),r.Pb(r.h),r.Pb(n$))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-mouse-position-control"]],inputs:{map:"map"},features:[r.Ab],decls:5,vars:2,consts:[[3,"ngIf"],[1,"mouse-position-control"],[1,"mx-1"],["mat-button","",1,"mouse-position-control","mouse-position-control--button",3,"title","disabled","click"],[1,"icon-button"]],template:function(t,e){1&t&&(r.Ic(0,R6,6,4,"ng-template",0),r.Vb(1,"span",1),r.Kc(2),r.Ub(),r.Vb(3,"span",2),r.Kc(4,"-"),r.Ub()),2&t&&(r.nc("ngIf",e.gpsLocation),r.Db(2),r.Mc(" ",e.lonLatCoordinates,"\n"))},directives:[ut,Dl,Yp],styles:["[_nghost-%COMP%]{display:inline-flex;align-items:center}.mouse-position-control[_ngcontent-%COMP%]{display:inline-block;font-size:14px;padding-left:4px;padding-right:4px}.mouse-position-control--button[_ngcontent-%COMP%]{line-height:normal;font-weight:400;padding-left:0}.mouse-position-control--button[disabled][_ngcontent-%COMP%]{color:inherit}.icon-button[_ngcontent-%COMP%]{font-size:1.4em;line-height:1.4em}"]}),t})();const F6=["scale"],L6=[1,2,5];let U6=(()=>{class t extends LT{constructor(t,e,i){super(),this.changeDetectorRef=t,this.mapService=e,this.mapConfigService=i,this.show=!1,this.hexagonsResolution=0}ngOnInit(){this.changeDetectorRef.detach(),this.subscriptions.push(this.mapService.view$.pipe(Gg(1),Be(300)).subscribe(t=>{this.updateScale(t),this.hexagonsResolution=(this.mapConfigService.highHexagonsResolution$.value?OY:MY)[Math.round(t.zoom)],this.changeDetectorRef.detectChanges()}))}updateScale(t){let e=iE(t.projection,t.resolution,t.center,ck.METERS),i="";64*e<1e3?i="m":(i="Nq",e/=1852);let n,r,s=3*Math.floor(Math.log(64*e)/Math.log(10));for(;;){if(n=L6[(s%3+3)%3]*Math.pow(10,Math.floor(s/3)),r=Math.round(n/e),isNaN(r))return void(this.show=!1);if(r>=64)break;++s}this.scaleElement.nativeElement.style.width=`${r}px`,this.scaleValue=`${n} ${i}`,this.show=!0}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(pI),r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-scaleline-control"]],viewQuery:function(t,e){if(1&t&&r.Pc(F6,3),2&t){let t;r.vc(t=r.dc())&&(e.scaleElement=t.first)}},features:[r.Ab],decls:7,vars:4,consts:[[1,"scaleline-control"],[1,"scaleline-control__infos"],[1,"scaleline-control__scale"],[1,"scaleline-control__scale-inner"],["scale",""]],template:function(t,e){1&t&&(r.Vb(0,"span",0),r.Vb(1,"span",1),r.Kc(2),r.Ub(),r.Vb(3,"span",2),r.Vb(4,"div",3,4),r.Kc(6),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Hb("scaleline-control--hide",!e.show),r.Db(2),r.Mc(" H3 (Res ",e.hexagonsResolution,") "),r.Db(4),r.Lc(e.scaleValue))},styles:[".scaleline-control{display:inline-block;font-size:.75em;padding-left:4px;padding-right:4px}.scaleline-control__scale{display:inline-block;margin:4px;border:2px solid grey;border-top:0}.scaleline-control__scale-inner{display:inline-block;text-align:center;will-change:contents,width}"],encapsulation:2}),t})(),B6=(()=>{class t extends LT{constructor(t,e,i){super(),this.changeDetectorRef=t,this.domSanitizer=e,this.mapConfigService=i}ngOnInit(){this.changeDetectorRef.detach(),this.subscriptions.push(this.mapConfigService.baseLayer$.subscribe(t=>{this.attributions=this.domSanitizer.bypassSecurityTrustHtml(t.source.getAttributions()()),this.changeDetectorRef.detectChanges()}))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(ne),r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-attributions-control"]],features:[r.Ab],decls:1,vars:1,consts:[[1,"attributions-control",3,"innerHTML"]],template:function(t,e){1&t&&r.Qb(0,"span",0),2&t&&r.nc("innerHTML",e.attributions,r.Bc)},styles:[".attributions-control[_ngcontent-%COMP%]{display:inline-block;font-size:.75em;padding:4px}"]}),t})();function N6(t,e){if(1&t&&(r.Vb(0,"span",3),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.Fc("color",t.textColor),r.nc("title","AIS : "+t.aisTypes.join(" | ")),r.Db(1),r.Lc(t.label)}}function j6(t,e){if(1&t&&r.Ic(0,N6,2,4,"span",2),2&t){const t=r.gc();r.nc("ngForOf",t.shipTypes)}}function z6(t,e){if(1&t&&(r.Vb(0,"span"),r.Kc(1),r.Ub()),2&t){const t=r.gc(2);r.Fc("color",t.highlightThresholdsColors.middle),r.Db(1),r.Mc("",t.highlightThresholdsStepLabelByValue[t.mapConfigService.shipFilter$.value.minimumTimestampThreshold]," \u21d2\xa0")}}function H6(t,e){1&t&&(r.Vb(0,"div",8),r.Vb(1,"mat-icon",9),r.Kc(2,"warning"),r.Ub(),r.Kc(3," Aucun filtre n'a \xe9t\xe9 s\xe9lectionn\xe9. "),r.Ub())}function K6(t,e){if(1&t&&(r.Vb(0,"span",3),r.Vb(1,"b"),r.Kc(2,"R\xe8gles :"),r.Ub(),r.Kc(3),r.Ub()),2&t){const t=r.gc(2);r.nc("title",t.searchedAlertRulesNames.join(", ")),r.Db(3),r.Mc(" ",t.searchedAlertRulesNames.length>3?t.searchedAlertRulesNames.length+" r\xe8gles":t.searchedAlertRulesNames.join(", "),"")}}function $6(t,e){if(1&t&&(r.Vb(0,"span",3),r.Vb(1,"b"),r.Kc(2,"\xc9v\xe9nements :"),r.Ub(),r.Kc(3),r.Ub()),2&t){const t=r.gc(2);r.nc("title",t.searchedEventTypesNames.join(", ")),r.Db(3),r.Mc(" ",t.searchedEventTypesNames.length>3?t.searchedEventTypesNames.length+" \xe9v\xe9nements":t.searchedEventTypesNames.join(", "),"")}}function G6(t,e){if(1&t&&(r.Vb(0,"div",4),r.Vb(1,"span"),r.Kc(2,"6 mois \u21d2\xa0"),r.Ub(),r.Ic(3,z6,2,3,"span",5),r.Vb(4,"span"),r.Kc(5),r.Ub(),r.Ub(),r.Vb(6,"div"),r.Ic(7,H6,4,0,"div",6),r.Ic(8,K6,4,2,"span",7),r.Ic(9,$6,4,2,"span",7),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Fc("color",t.highlightThresholdsColors.left),r.Db(2),r.nc("ngIf",t.mapConfigService.shipFilter$.value.minimumTimestampThreshold!==t.mapConfigService.shipFilter$.value.importantTimestampThreshold),r.Db(1),r.Fc("color",t.highlightThresholdsColors.right),r.Db(1),r.Mc("",t.highlightThresholdsStepLabelByValue[t.mapConfigService.shipFilter$.value.importantTimestampThreshold]," \u21d2 Pr\xe9sent"),r.Db(2),r.nc("ngIf",t.mapConfigService.shipFilter$.value.isMissingColorFilterConfiguration),r.Db(1),r.nc("ngIf",t.searchedAlertRulesNames.length>0),r.Db(1),r.nc("ngIf",t.searchedEventTypesNames.length>0)}}let W6=(()=>{class t extends LT{constructor(t,e,i){super(),this.changeDetectorRef=t,this.alertRulesService=e,this.mapConfigService=i,this.alertRules=[],this.shipTypes=qO,this.searchedAlertRulesNames=[],this.searchedEventTypesNames=[],this.highlightThresholdsStepLabelByValue=vD,this.highlightThresholdsColors=_D,this.visibilityThresholdsStepLabelByValue=wD,this.visibilityThresholdsColors=xD}ngOnInit(){this.changeDetectorRef.detach(),this.subscriptions.push(this.alertRulesService.alertRules$.subscribe(t=>{this.alertRules=t,this.changeDetectorRef.detectChanges()})),this.subscriptions.push(this.mapConfigService.shipFilter$.subscribe(t=>{this.searchedAlertRulesNames=t.alertRules.map(t=>{var e;return null===(e=this.alertRules.find(e=>e.id===t))||void 0===e?void 0:e.name}).filter(t=>!!t),this.searchedEventTypesNames=t.eventTypes.map(t=>FP[t]),this.changeDetectorRef.detectChanges()}))}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(DP),r.Pb(hI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-ships-legend"]],features:[r.Ab],decls:3,vars:2,consts:[["src","/assets/images/ship.png","alt","Navire","title","Navires",1,"ships-legend__ship-icon"],[3,"ngIf"],["class","ships-legend",3,"color","title",4,"ngFor","ngForOf"],[1,"ships-legend",3,"title"],[1,"ships-legend"],[3,"color",4,"ngIf"],["class","ships-legend d-flex-center ships-legend__warning-icon",4,"ngIf"],["class","ships-legend",3,"title",4,"ngIf"],[1,"ships-legend","d-flex-center","ships-legend__warning-icon"],[1,"mr-1"]],template:function(t,e){1&t&&(r.Qb(0,"img",0),r.Ic(1,j6,1,1,"ng-template",1),r.Ic(2,G6,10,9,"ng-template",1)),2&t&&(r.Db(1),r.nc("ngIf",e.mapConfigService.shipFilter$.value.colorModeShipType),r.Db(1),r.nc("ngIf",!e.mapConfigService.shipFilter$.value.colorModeShipType))},directives:[ut,ct,Yp],styles:["[_nghost-%COMP%]{display:flex;align-items:center}.ships-legend[_ngcontent-%COMP%]{display:inline-block;font-size:.7em;margin:0 .5em;line-height:2em}.ships-legend__warning-icon[_ngcontent-%COMP%]{color:#e41010}.ships-legend__warning-icon[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{height:1em;font-size:1.5em}.ships-legend__ship-icon[_ngcontent-%COMP%]{height:1em}"]}),t})();function Z6(t,e){1&t&&r.Qb(0,"mat-spinner",14)}function q6(t,e){1&t&&r.Qb(0,"app-debug-infos",15)}function Y6(t,e){if(1&t&&(r.Vb(0,"div",9),r.Vb(1,"div",10),r.Ic(2,Z6,1,0,"mat-spinner",11),r.Qb(3,"app-topbar-control"),r.Ub(),r.Qb(4,"app-health-banner"),r.Vb(5,"div",12),r.hc(6,"async"),r.Qb(7,"app-timerange-control"),r.Ub(),r.Ic(8,q6,1,0,"app-debug-infos",13),r.Ub()),2&t){const t=r.gc();r.Db(2),r.nc("ngIf",t.showRequestSpinner),r.Db(3),r.Hb("map-controls__topsubbar--visible",r.ic(6,4,t.showTimeRangeControl$)),r.Db(3),r.nc("ngIf",t.configService.devMode)}}function Q6(t,e){if(1&t&&(r.Vb(0,"app-glitter",20),r.Vb(1,"button",21),r.Vb(2,"mat-icon"),r.Kc(3,"refresh"),r.Ub(),r.Ub(),r.Ub()),2&t){const t=r.gc(3);r.Db(1),r.nc("app-async-action",t.fetchData)("disabled",!t.mapConfigService.showShipsLayer$.value&&!t.mapConfigService.showAircraftsLayer$.value)}}function X6(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",22),r.cc("click",function(){return r.Ac(t),r.gc(3).refreshTimerService.togglePause()}),r.Vb(1,"mat-icon"),r.Kc(2),r.Ub(),r.Ub()}if(2&t){const t=r.gc(3);r.oc("title",t.refreshTimerService.pause$.value?"Reprendre le flux":"Mettre en pause le flux"),r.Db(2),r.Lc(t.refreshTimerService.pause$.value?"play_arrow":"pause")}}function J6(t,e){if(1&t){const t=r.Wb();r.Qb(0,"mat-divider",23),r.Vb(1,"button",24),r.cc("click",function(){return r.Ac(t),r.gc(3).historyService.setTimestampToNow()}),r.Vb(2,"mat-icon"),r.Kc(3,"history"),r.Ub(),r.Ub()}}function t7(t,e){if(1&t&&(r.Vb(0,"div",10),r.Ic(1,Q6,4,2,"ng-template",4),r.hc(2,"async"),r.Ic(3,X6,3,2,"ng-template",4),r.hc(4,"async"),r.Ic(5,J6,4,0,"ng-template",4),r.hc(6,"async"),r.Ub()),2&t){const t=r.gc(2);r.Db(1),r.nc("ngIf",!0===r.ic(2,3,t.mapConfigService.manualMapFetch$)),r.Db(2),r.nc("ngIf",!1===r.ic(4,5,t.mapConfigService.manualMapFetch$)),r.Db(2),r.nc("ngIf",0===r.ic(6,7,t.historyService.timestamp$))}}function e7(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",25),r.Vb(1,"button",7),r.cc("click",function(){return r.Ac(t),r.gc(3).toggleChatwootDialog()}),r.Vb(2,"mat-icon",26),r.Kc(3,"contact_support"),r.Ub(),r.Ub(),r.Ub(),r.Qb(4,"div",8)}if(2&t){const t=r.gc(3);r.Db(1),r.nc("title",t.chatService.dialogActive?"Fermer le chat":"Ouvrir le chat"),r.Db(1),r.nc("color",t.chatService.dialogActive?"primary":"grey")}}function i7(t,e){if(1&t&&r.Ic(0,e7,5,2,"ng-template",4),2&t){const t=r.gc(2);r.nc("ngIf",t.chatService.enabled)}}function n7(t,e){if(1&t&&(r.Ic(0,t7,7,9,"div",16),r.hc(1,"async"),r.Qb(2,"div",8),r.Vb(3,"div",17),r.Qb(4,"app-zoom-control"),r.Ub(),r.Qb(5,"div",8),r.Vb(6,"div",18),r.Qb(7,"app-geolocation-control"),r.Ub(),r.Qb(8,"div",8),r.Ic(9,i7,1,1,void 0,19),r.hc(10,"async")),2&t){const t=r.gc();r.nc("ngIf",!1===r.ic(1,2,t.uiService.drawingMode$)),r.Db(9),r.nc("ngIf",!1===r.ic(10,4,t.screenshotService.screenshotMode$))}}function r7(t,e){if(1&t&&(r.Vb(0,"span",34),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.Fc("color",t.color),r.Db(1),r.Lc(t.label)}}function s7(t,e){if(1&t&&(r.Vb(0,"div",31),r.Qb(1,"span",32),r.Ic(2,r7,2,3,"span",33),r.Ub()),2&t){const t=r.gc(2);r.Db(2),r.nc("ngForOf",t.eventCategories)}}function o7(t,e){if(1&t&&(r.Vb(0,"div",10),r.Qb(1,"app-mouse-position-control",27),r.Qb(2,"app-scaleline-control",28),r.Qb(3,"app-attributions-control"),r.Ub(),r.Vb(4,"div",29),r.Qb(5,"app-ships-legend"),r.Ub(),r.Ic(6,s7,3,1,"div",30),r.hc(7,"async")),2&t){const t=r.gc();r.Db(1),r.nc("map",t.map),r.Db(5),r.nc("ngIf",r.ic(7,2,t.showEventsLegend$))}}let a7=(()=>{class t extends LT{constructor(t,e,i,n,r,s,o,a,l,c,h,u,d,p,f,m){super(),this.ngZone=t,this.alertRulesService=e,this.chatService=i,this.configService=n,this.fleetsService=r,this.historyService=s,this.mapConfigService=o,this.mapRestrictionService=a,this.measureService=l,this.refreshTimerService=c,this.routeService=h,this.selectionService=u,this.screenshotService=d,this.simpleViewService=p,this.uiService=f,this.workerService=m,this.showRequestSpinner=!1,this.eventCategories=RP,this.fetchData=()=>Object(ue.a)(this,void 0,void 0,function*(){yield this.simpleViewService.fetchData()})}ngOnInit(){this.subscriptions.push(this.workerService.inflightRequests$.pipe(wm(1e3,Le,{leading:!1,trailing:!0})).subscribe(t=>{this.ngZone.run(()=>{this.showRequestSpinner=t})})),this.showEventsLegend$=this.selectionService.entities$.pipe(Object(Ge.a)(t=>t.length>0)),this.showTimeRangeControl$=Hg([this.alertRulesService.selectedAlertRule$,this.fleetsService.selectedFleet$,this.selectionService.entities$.pipe(Object(Ge.a)(t=>t.some(t=>t.type===OP.Ship))),this.routeService.route$]).pipe(Object(Ge.a)(([t,e,i,n])=>(null!==t||null!==e||i||"/alerts/dashboard"===n)&&!["/statistics","/zones"].includes(n)),mn())}toggleChatwootDialog(){return Object(ue.a)(this,void 0,void 0,function*(){yield this.chatService.toggleChat()})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.B),r.Pb(DP),r.Pb(j4),r.Pb(cI),r.Pb(OT),r.Pb(bI),r.Pb(hI),r.Pb(RK),r.Pb(WP),r.Pb(_T),r.Pb(vI),r.Pb(xT),r.Pb(z4),r.Pb(H4),r.Pb(VI),r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-map-controls"]],inputs:{map:"map"},features:[r.Ab],decls:19,vars:17,consts:[[1,"map-controls"],["class","map-controls__top-controls",4,"ngIf"],[1,"map-controls__right-controls"],[1,"map-controls__right-bars"],[3,"ngIf"],["joyrideStep","screenshot-button","title","Prendre des captures d'\xe9cran","text","Ce bouton permet de masquer la plupart des \xe9l\xe9ments de la page afin de r\xe9aliser des captures d'\xe9cran.","stepPosition","left",1,"map-controls__bar"],["gid","button-screenshot","date","2021-01-22"],["mat-button","",1,"toolbar__button",3,"title","click"],[1,"map-controls__spacer"],[1,"map-controls__top-controls"],[1,"map-controls__bar"],["class","map-controls__request-spinner","strokeWidth","3","diameter","30",4,"ngIf"],[1,"map-controls__bar","mt05em","map-controls__topsubbar"],["class","map-controls__bar mt05em",4,"ngIf"],["strokeWidth","3","diameter","30",1,"map-controls__request-spinner"],[1,"map-controls__bar","mt05em"],["class","map-controls__bar",4,"ngIf"],["joyrideStep","zoom-buttons","title","Zoom","text","Ces boutons servent \xe0 zoomer ou d\xe9zoomer la carte, en plus de la molette de la souris.","stepPosition","left",1,"map-controls__bar"],["joyrideStep","geolocation-buttons","title","G\xe9olocalisation","text","Ce bouton permet d'afficher une position temps-r\xe9el \xe0 partir d'une source de donn\xe9e locale. Voir la page Param\xe8tres pour la configuration.","stepPosition","left",1,"map-controls__bar"],[4,"ngIf"],["gid","button-manualmapfetch","date","2020-11-17"],["mat-button","","title","Rafra\xeechir les pistes pour cette vue",1,"toolbar__button",3,"app-async-action","disabled"],["mat-button","","joyrideStep","pause-button","title","Pause","text","Ce bouton permet de d\xe9sactiver le rafraichissement automatique des navires.","stepPosition","left",1,"toolbar__button",3,"title","click"],[1,"toolbar__v-divider"],["mat-button","","title","Entrer dans le mode historique","joyrideStep","history-button","title","Mode historique","text","Ce bouton permet de basculer en mode historique afin de visualiser une situation maritime pass\xe9e.","stepPosition","left",1,"toolbar__button",3,"click"],["joyrideStep","chat-button","title","Dialoguer avec l'\xe9quipe ANAIS","text","Ce bouton permet de dialoguer avec les membres de l'\xe9quipe ANAIS par tchat. Vous pouvez utiliser ce tchat quand bon vous semble, si vous rencontrez des erreurs, ou si vous avez des suggestions d'am\xe9lioration.","stepPosition","left",1,"map-controls__bar"],[3,"color"],["joyrideStep","mouse-position-control","title","Position du curseur","text","La position du curseur est indiqu\xe9e ici.","stepPosition","top",3,"map"],["joyrideStep","scaleline-control","title","Echelle de carte","text","L'\xe9chelle de la carte se trouve ici (en nautiques).","stepPosition","top"],["joyrideStep","ships-legend","title","L\xe9gende","text","La l\xe9gende de la carte est indiqu\xe9e ici. Elle est mise \xe0 jour automatiquement en fonction du mode de coloration choisi.","stepPosition","top",1,"map-controls__bar","d-flex-center"],["class","map-controls__bar d-flex-center",4,"ngIf"],[1,"map-controls__bar","d-flex-center"],["title","\xc9v\xe9nements",1,"map-controls__legend-event-icon"],["class","map-controls__map-legend",3,"color",4,"ngFor","ngForOf"],[1,"map-controls__map-legend"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Ic(1,Y6,9,6,"div",1),r.hc(2,"async"),r.hc(3,"async"),r.Vb(4,"div",2),r.Vb(5,"div",3),r.Ic(6,n7,11,6,"ng-template",4),r.hc(7,"async"),r.Vb(8,"div",5),r.Vb(9,"app-glitter",6),r.Vb(10,"button",7),r.cc("click",function(){return e.screenshotService.toggleScreenshotMode()}),r.hc(11,"async"),r.Vb(12,"mat-icon"),r.Kc(13),r.hc(14,"async"),r.Ub(),r.Ub(),r.Ub(),r.Ub(),r.Qb(15,"div",8),r.Ub(),r.Ic(16,o7,8,4,"ng-template",4),r.hc(17,"async"),r.Ub(),r.Qb(18,"app-context-info-bar"),r.Ub()),2&t&&(r.Db(1),r.nc("ngIf",!1===r.ic(2,5,e.uiService.drawingMode$)&&!1===r.ic(3,7,e.screenshotService.screenshotMode$)),r.Db(5),r.nc("ngIf",!1===r.ic(7,9,e.screenshotService.screenshotMode$)),r.Db(4),r.nc("title",!0===r.ic(11,11,e.screenshotService.screenshotMode$)?"Quitter le mode capture d'\xe9cran":"Passer en mode capture d'\xe9cran"),r.Db(3),r.Lc(!0===r.ic(14,13,e.screenshotService.screenshotMode$)?"fullscreen_exit":"fullscreen"),r.Db(3),r.nc("ngIf",!1===r.ic(17,15,e.screenshotService.screenshotMode$)))},directives:[ut,ax,DL,Dl,Yp,l8,v6,y6,k6,fF,E6,D6,T6,dR,GT,V6,U6,B6,W6,ct],pipes:[St],styles:[".map-bar[_ngcontent-%COMP%], .map-controls__bottombar[_ngcontent-%COMP%]{position:absolute;z-index:10;background-color:#fff;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2)}.map-controls[_ngcontent-%COMP%]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.map-controls__request-spinner[_ngcontent-%COMP%]{position:absolute!important;margin-top:5px;left:-50px}.map-controls__top-controls[_ngcontent-%COMP%]{position:absolute;top:.5em;right:.5em;z-index:2;display:flex;flex-direction:column;align-items:flex-end;pointer-events:none;touch-action:none}.map-controls__topsubbar[_ngcontent-%COMP%]{display:flex;transition:all .5s;transform:translateY(-400%);opacity:0;z-index:1}.map-controls__topsubbar--visible[_ngcontent-%COMP%]{transform:translateY(0);opacity:1}.map-controls__bar[_ngcontent-%COMP%]{background-color:#fff;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2);pointer-events:all;touch-action:all}.map-controls__spacer[_ngcontent-%COMP%]{height:.5em;width:.5em}.map-controls__right-controls[_ngcontent-%COMP%]{position:absolute;bottom:0;right:0;z-index:2;display:flex;flex-direction:column;align-items:flex-end;pointer-events:none;touch-action:none}.map-controls__right-bars[_ngcontent-%COMP%]{margin-right:.5em}.map-controls__bottombar[_ngcontent-%COMP%]{position:fixed;bottom:1.5em;left:50%;transform:translateX(-50%) translateY(200%);transition:all .5s;opacity:0}@media (max-width:1820px){.map-controls__bottombar[_ngcontent-%COMP%]{bottom:3.2em}}.map-controls__bottombar--visible[_ngcontent-%COMP%]{opacity:1;transform:translateX(-50%) translateY(0)}.map-controls__map-legend[_ngcontent-%COMP%]{display:inline-block;font-size:.7em;margin:0 .5em;line-height:2em}.map-controls__legend-event-icon[_ngcontent-%COMP%]{height:.7em;width:.7em;border-radius:50%;background-color:#d3d3d3;margin:0 .3em}"]}),t})();const l7=["trigger"],c7=["menu"],h7=["featuresImportInput"];function u7(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",9),r.cc("click",function(){return r.Ac(t),r.gc().annotationsService.cancelEditing()}),r.Kc(1,"Quitter le mode annotation"),r.Ub()}}function d7(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",10),r.cc("click",function(){return r.Ac(t),r.gc().pimService.togglePIMMode()}),r.Kc(1,"Quitter le mode PIM"),r.Ub()}}function p7(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",11),r.cc("click",function(){return r.Ac(t),r.gc().measureService.toggleMeasureMode()}),r.Kc(1,"Quitter le mode mesure"),r.Ub()}}function f7(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",12),r.cc("click",function(){return r.Ac(t),r.gc().pimService.togglePIMMode()}),r.Kc(1,"\xc9valuer PIM piste "),r.Vb(2,"span",13),r.Kc(3,"(p)"),r.Ub(),r.Ub(),r.Vb(4,"button",14),r.cc("click",function(){return r.Ac(t),r.gc().measureService.toggleMeasureMode()}),r.Kc(5,"Mesurer une distance "),r.Vb(6,"span",13),r.Kc(7,"(m)"),r.Ub(),r.Ub(),r.Vb(8,"button",15),r.cc("click",function(){return r.Ac(t),r.gc().setFixedLocation()}),r.Kc(9,"D\xe9finir comme point de r\xe9f\xe9rence"),r.Ub(),r.Vb(10,"button",16),r.cc("click",function(){return r.Ac(t),r.gc().createNewAnnotation()}),r.Kc(11,"Cr\xe9er une annotation ici"),r.Ub(),r.Vb(12,"input",17,18),r.cc("change",function(e){return r.Ac(t),r.gc().onFeaturesImport(e)}),r.Ub(),r.Vb(14,"button",19),r.cc("click",function(){return r.Ac(t),r.gc().triggerImportFeaturesDialog()}),r.Kc(15,"Importer des objets g\xe9ographiques"),r.Ub(),r.Vb(16,"button",20),r.cc("click",function(){return r.Ac(t),r.gc().exportService.exportVisiblePositions()}),r.Kc(17,"Exporter la vue courante en CSV"),r.Ub()}if(2&t){const t=r.gc();r.Db(16),r.nc("disabled",!t.canExportVisiblePositions)}}let m7=(()=>{class t extends LT{constructor(t,e,i,n,r,s,o,a){super(),this.ngZone=t,this.annotationsService=e,this.exportService=i,this.featureImportService=n,this.geolocationService=r,this.mapConfigService=s,this.measureService=o,this.pimService=a,this.isEditingAnnotation=!1,this.isMeasureModeActive=!1,this.isPIMModeActive=!1,this.canExportVisiblePositions=!1,this.onPressEvent=t=>{"touch"===t.pointerType&&this.openMenu(t.srcEvent)},this.openMenu=t=>{const e=t.target;if(("ol-layer"===e.className||"CANVAS"===e.tagName||function(t,e){let i=t;for(;null!==i;){if(e.some(t=>i.classList.contains(t)))return!0;i=i.parentElement}return!1}(e,["cdk-overlay-container","ol-overlaycontainer"]))&&t.preventDefault(),this.trigger.menuOpen){const e=this.menuElement.nativeElement.parentNode.parentNode.parentNode.parentNode;e.style.top=`${t.clientY}px`,"flex-end"===e.style.alignItems?e.style.right=window.innerWidth-t.clientX+"px":e.style.left=`${t.clientX}px`}else{const e=t.target;if("CANVAS"!==e.tagName&&!e.classList.contains("ol-layer"))return;this.triggerElement.nativeElement.style.left=`${t.clientX}px`,this.triggerElement.nativeElement.style.top=`${t.clientY}px`,this.trigger.openMenu()}this.openEvent=t}}ngOnInit(){this.ensureMandatoryInputParams("map"),window.addEventListener("contextmenu",this.openMenu),this.ngZone.runOutsideAngular(()=>{this.hammer=new window.Hammer(this.map.getViewport(),{})}),this.hammer.on("press",this.onPressEvent),this.subscriptions.push(this.annotationsService.editedAnnotation$.pipe(fI(300),Object(Ge.a)(t=>!!t)).subscribe(t=>{this.isEditingAnnotation=t}),this.measureService.active$.pipe(fI(300)).subscribe(t=>{this.isMeasureModeActive=t}),this.pimService.active$.pipe(fI(300)).subscribe(t=>{this.isPIMModeActive=t}),Hg([this.mapConfigService.showShipsLayer$,this.mapConfigService.showAircraftsLayer$]).subscribe(([t,e])=>{this.canExportVisiblePositions=t||e}))}ngOnDestroy(){window.removeEventListener("contextmenu",this.openMenu),this.hammer.off("press",this.onPressEvent),this.hammer.destroy()}setFixedLocation(){const t=this.map.getEventCoordinate(this.openEvent);if(!t)return;const e=rI(oE(t));this.geolocationService.updateFixedLocation(e),this.geolocationService.updateSource(XK.FixedLocation),this.geolocationService.updateEnable(!0)}createNewAnnotation(){const t=this.map.getEventCoordinate(this.openEvent);t&&this.annotationsService.createNewAnnotation({type:"Point",coordinates:oE(t)})}triggerImportFeaturesDialog(){this.featuresImportInput.nativeElement.click()}onFeaturesImport(t){return Object(ue.a)(this,void 0,void 0,function*(){const e=t.target.files||t.dataTransfer.files;e.length&&(this.featureImportService.importEvent$.next({dataTransfer:{files:e}}),t.target.value="")})}onKeyboardEvents(t){if(q4(t))switch(t.key){case"p":this.measureService.active$.value&&this.measureService.toggleMeasureMode(),this.pimService.togglePIMMode();break;case"m":this.pimService.active$.value&&this.pimService.togglePIMMode(),this.measureService.toggleMeasureMode()}}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.B),r.Pb(MP),r.Pb(hX),r.Pb(Q2),r.Pb(n$),r.Pb(hI),r.Pb(WP),r.Pb(KO))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-context-menu"]],viewQuery:function(t,e){if(1&t&&(r.Pc(sU,3),r.Pc(l7,3),r.Pc(c7,3),r.Pc(h7,1)),2&t){let t;r.vc(t=r.dc())&&(e.trigger=t.first),r.vc(t=r.dc())&&(e.triggerElement=t.first),r.vc(t=r.dc())&&(e.menuElement=t.first),r.vc(t=r.dc())&&(e.featuresImportInput=t.first)}},hostBindings:function(t,e){1&t&&r.cc("keyup",function(t){return e.onKeyboardEvents(t)},!1,r.zc)},inputs:{map:"map"},features:[r.Ab],decls:10,vars:5,consts:[[1,"trigger",3,"matMenuTriggerFor"],["trigger",""],[1,"context-menu"],["contextMenu","matMenu"],["menu",""],["mat-menu-item","","title","Quitter le mode annotation",3,"click",4,"ngIf"],["mat-menu-item","","title","Quitter le mode PIM",3,"click",4,"ngIf"],["mat-menu-item","","title","Quitter le mode mesure",3,"click",4,"ngIf"],[3,"ngIf"],["mat-menu-item","","title","Quitter le mode annotation",3,"click"],["mat-menu-item","","title","Quitter le mode PIM",3,"click"],["mat-menu-item","","title","Quitter le mode mesure",3,"click"],["mat-menu-item","","title","\xc9valuer PIM piste",3,"click"],[1,"shortcut"],["mat-menu-item","","title","Mesurer une distance",3,"click"],["mat-menu-item","","title","D\xe9finir comme point de r\xe9f\xe9rence",3,"click"],["mat-menu-item","","title","Cr\xe9er une annotation ici",3,"click"],["type","file","multiple","","accept",".geojson, .kml, .json, .gpx, .igc","hidden","",3,"change"],["featuresImportInput",""],["mat-menu-item","","title","Importer des objets g\xe9ographiques (GeoJSON, KML, TopoJSON, etc)",3,"click"],["mat-menu-item","","title","Exporter les navires et a\xe9ronefs de la vue courante en CSV",3,"disabled","click"]],template:function(t,e){if(1&t&&(r.Qb(0,"span",0,1),r.Vb(2,"mat-menu",2,3),r.Qb(4,"span",null,4),r.Ic(6,u7,2,0,"button",5),r.Ic(7,d7,2,0,"button",6),r.Ic(8,p7,2,0,"button",7),r.Ic(9,f7,18,1,"ng-template",8),r.Ub()),2&t){const t=r.wc(3);r.nc("matMenuTriggerFor",t),r.Db(6),r.nc("ngIf",e.isEditingAnnotation),r.Db(1),r.nc("ngIf",e.isPIMModeActive),r.Db(1),r.nc("ngIf",e.isMeasureModeActive),r.Db(1),r.nc("ngIf",!e.isEditingAnnotation&&!e.isMeasureModeActive&&!e.isPIMModeActive)}},directives:[sU,eU,ut,QL],styles:[".trigger[_ngcontent-%COMP%]{position:fixed}.shortcut[_ngcontent-%COMP%]{color:#919090;margin-left:.5em}"]}),t})();const g7=["drawer"];function A7(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",15),r.Vb(1,"button",16),r.cc("click",function(){return r.Ac(t),r.gc(2).exportTrails()}),r.Kc(2," Exporter les traces "),r.Ub(),r.Ub()}2&t&&r.nc("@fadeAnimation",void 0)}function b7(t,e){if(1&t&&r.Qb(0,"app-entity-selection",17),2&t){const t=e.$implicit;r.nc("@fadeAnimation",void 0)("entitySelection",t)}}function v7(t,e){if(1&t&&(r.Vb(0,"div",12),r.Ic(1,A7,3,1,"div",13),r.hc(2,"async"),r.Ic(3,b7,1,2,"app-entity-selection",14),r.hc(4,"async"),r.Ub()),2&t){const t=r.gc();r.Hb("page__entity-selections--shifted",t.showDrawer),r.Db(1),r.nc("ngIf",r.ic(2,5,t.selectionService.entities$).length>0),r.Db(2),r.nc("ngForOf",r.ic(4,7,t.selectionService.entities$))("ngForTrackBy",t.trackById)}}function _7(t,e){1&t&&(r.Kc(0," Cette introduction va vous pr\xe9senter les principales fonctionnalit\xe9s disponibles sur l'interface d'ANAIS. Vous pouvez l'arr\xeater \xe0 tout moment en cliquant sur la croix en haut \xe0 droite de la fen\xeatre. "),r.Qb(1,"br"),r.Qb(2,"br"),r.Kc(3," Pensez \xe0 rejoindre le "),r.Vb(4,"a",18),r.Kc(5,"salon ANAIS sur Tchap"),r.Ub(),r.Kc(6," afin de discuter avec l'\xe9quipe et d'autres utilisateurs ! "))}function y7(t,e){if(1&t&&(r.Qb(0,"app-annotations-layer",19),r.Qb(1,"app-hexagons-layer",19),r.Qb(2,"app-edges-layer",19),r.Qb(3,"app-zones-layer",19),r.Qb(4,"app-trails-layer",19),r.Qb(5,"app-h3traces-layer",19),r.Qb(6,"app-ships-layer",19),r.Qb(7,"app-aircrafts-layer",19),r.Qb(8,"app-alerts-layer",19),r.Qb(9,"app-events-layer",19),r.Qb(10,"app-ports-layer",19),r.Qb(11,"app-playback-layer",19),r.Qb(12,"app-selection-layer",19),r.Qb(13,"app-ping-layer",19),r.Qb(14,"app-measure-layer",19),r.Qb(15,"app-pim-layer",19),r.Qb(16,"app-additional-features-layer",19),r.Qb(17,"app-tile-layer",19),r.Qb(18,"app-feature-import-layer",19),r.Qb(19,"app-permanent-tooltips",19),r.Qb(20,"app-box-selection-interaction",19),r.Qb(21,"app-geolocation-layer",19),r.Qb(22,"app-entity-tooltips",19),r.Qb(23,"app-map-controls",19),r.Qb(24,"app-context-menu",19)),2&t){r.gc();const t=r.wc(11);r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map),r.Db(1),r.nc("map",t.map)}}let w7=(()=>{class t{constructor(t,e,i,n,r,s,o){this.changeDetectorRef=t,this.router=e,this.activatedRoute=i,this.mapStateService=n,this.mapService=r,this.selectionService=s,this.timeRangeService=o,this.showDrawer=!0,this.drawerWidth=0,this.exportTrails=()=>Object(ue.a)(this,void 0,void 0,function*(){const t=this.timeRangeService.timeRange$.value,e=FO(1e3*t.start,"yyyy-MM-dd'T'HH-mm-ss"),i=FO(1e3*t.end,"yyyy-MM-dd'T'HH-mm-ss"),n=[],r=[];var s;this.selectionService.trails$.value.forEach(t=>{var e;(null===(e=t[0])||void 0===e?void 0:e.ship)?n.push(t):r.push(t)}),n.length&&YH(WH(n.flat()),`anais-traces-ships-${e}-${i}.csv`,"text/csv"),r.length&&YH((s=r.flat(),[["icao","callsign","squawk","type","timestamp","lon","lat","hdms","altitude"].join(","),...s.map(t=>function(t){return[t.aircraft.icao,t.aircraft.callsign,t.aircraft.squawk,t.aircraft.type,HO(1e3*t.timestamp),t.lon,t.lat,Yk([t.lon,t.lat]),t.altitude]}(t).join(","))].join("\n")),`anais-traces-aircrafts-${e}-${i}.csv`,"text/csv")})}onRouteChange(t){this.showDrawer=!(t instanceof $H||t instanceof TK||t instanceof x$||t instanceof UT),setTimeout(()=>{this.drawerWidth=this.showDrawer?this.drawer.nativeElement.clientWidth:0,this.changeDetectorRef.markForCheck()},50)}closeDrawerIfEscape(t){return Object(ue.a)(this,void 0,void 0,function*(){"Escape"===t.code&&(yield this.closeDrawer())})}closeDrawer(){return Object(ue.a)(this,void 0,void 0,function*(){this.mapService.view$.value&&(yield this.router.navigateByUrl(`/${this.mapService.view$.value.toURL()}`))})}trackById(t,e){return e.id}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(sw),r.Pb(N_),r.Pb(gT),r.Pb(pI),r.Pb(xT),r.Pb(yT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-map-page"]],viewQuery:function(t,e){if(1&t&&r.Pc(g7,3,r.l),2&t){let t;r.vc(t=r.dc())&&(e.drawer=t.first)}},hostBindings:function(t,e){1&t&&r.cc("keyup",function(t){return e.closeDrawerIfEscape(t)},!1,r.zc)},decls:16,vars:9,consts:[["hasBackdrop","false",1,"page"],["mode","over","autoFocus","false",1,"page__drawer",3,"opened"],["drawer",""],[3,"activate"],["mat-button","","title","Fermer le panneau",1,"page__close-button",3,"click"],["src","./assets/images/logo_anais.svg","alt","Logo ANAIS",1,"page__anais-logo"],["class","page__entity-selections",3,"page__entity-selections--shifted",4,"ngIf"],["joyrideStep","map-end","text","Cette introduction \xe0 l'interface ANAIS est termin\xe9e. N'h\xe9sitez-pas \xe0 tester plus en d\xe9tail chaque fonctionnalit\xe9 et chaque menu. Si vous avez des remarques, suggestions, conseils ou juste besoin d'aide, l'\xe9quipe derri\xe8re ANAIS est \xe0 votre disposition et sera enchant\xe9e de vous aider.","stepPosition","center",1,"page__map",3,"horizontalCenterShiftPixels","title"],["mapComponent","map"],["joyrideStep","welcome","stepPosition","center",3,"title","stepContent"],["welcomeStepContent",""],[3,"ngIf"],[1,"page__entity-selections"],["class","page__entity-selections-toolbar mat-elevation-z8","title","Exporter les traces de la s\xe9lection en CSV",4,"ngIf"],["class","page__entity-selection",3,"entitySelection",4,"ngFor","ngForOf","ngForTrackBy"],["title","Exporter les traces de la s\xe9lection en CSV",1,"page__entity-selections-toolbar","mat-elevation-z8"],["mat-button","",3,"click"],[1,"page__entity-selection",3,"entitySelection"],["href","https://tchap.gouv.fr/#/room/#ANAIS96Clw3VeN7q:agent.dinum.tchap.gouv.fr","target","_blank"],[3,"map"]],template:function(t,e){if(1&t&&(r.Vb(0,"mat-drawer-container",0),r.Vb(1,"mat-drawer",1,2),r.Vb(3,"router-outlet",3),r.cc("activate",function(t){return e.onRouteChange(t)}),r.Ub(),r.Vb(4,"button",4),r.cc("click",function(){return e.closeDrawer()}),r.Vb(5,"mat-icon"),r.Kc(6,"close"),r.Ub(),r.Ub(),r.Qb(7,"img",5),r.Ic(8,v7,5,9,"div",6),r.hc(9,"async"),r.Ub(),r.Vb(10,"app-map",7,8),r.Qb(12,"div",9),r.Ic(13,_7,7,0,"ng-template",null,10,r.Jc),r.Ic(15,y7,25,25,"ng-template",11),r.Ub(),r.Ub()),2&t){const t=r.wc(11),i=r.wc(14);r.Db(1),r.nc("opened",e.showDrawer),r.Db(7),r.nc("ngIf",r.ic(9,7,e.mapStateService.showEntitiesSelections$)),r.Db(2),r.nc("horizontalCenterShiftPixels",e.drawerWidth)("title","Fin de l'introduction"),r.Db(2),r.nc("title","Bienvenue sur ANAIS")("stepContent",i),r.Db(3),r.nc("ngIf",t.map)}},directives:[L$,F$,hw,Dl,Yp,ut,pZ,ax,ct,CZ,vY,RY,UY,zY,$Q,YQ,dX,mX,bX,wX,SX,FX,NX,zX,HX,rJ,cJ,uJ,o3,x3,C3,k3,U4,a7,m7],pipes:[St],styles:["[_nghost-%COMP%]{flex:1}.page[_ngcontent-%COMP%]{height:100%}.page__drawer[_ngcontent-%COMP%]{min-width:300px;overflow-y:visible} .page__drawer>.mat-drawer-inner-container{overflow:hidden!important} .page>.mat-drawer-content{z-index:auto!important}.page__map[_ngcontent-%COMP%]{height:100%}.page__close-button[_ngcontent-%COMP%]{position:absolute;left:100%;top:12px;min-width:40px;height:40px;padding:0!important;border-radius:0;color:#50647f;background-color:#fff;border-radius:0 10px 10px 0;box-shadow:2px 2px 8px 4px rgba(0,0,0,.2);z-index:-1}.page__entity-selections-toolbar[_ngcontent-%COMP%]{background-color:#fff;margin-left:8px;margin-bottom:8px;display:inline-block}.page__entity-selections[_ngcontent-%COMP%]{position:absolute;left:calc(100%);top:8px;z-index:2;visibility:visible;transition:top .3s ease-out;overflow:auto;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:calc(100% - 44px)}.page__entity-selections--shifted[_ngcontent-%COMP%]{top:60px;max-height:calc(100% - 96px)}.page__entity-selection[_ngcontent-%COMP%]{padding-left:8px;padding-right:14px}@supports (-moz-appearance:none){.page__entity-selection[_ngcontent-%COMP%]{padding-right:34px}}.page__entity-selection[_ngcontent-%COMP%]:last-child{padding-bottom:8px}.page__anais-logo[_ngcontent-%COMP%]{position:absolute;left:calc(100% + 6px);bottom:6px;width:88px;z-index:2;pointer-events:none;touch-action:none;visibility:visible}"],data:{animation:[$r("fadeAnimation",[Qr(":enter",[Zr({opacity:0}),Gr(500,Zr({opacity:1}))]),Qr(":leave",[Zr({pointerEvents:"none"}),Gr(500,Zr({opacity:0,height:0}))])])]}}),t})();function x7(t){ZP(1,arguments);var e=qP(t);return e.setHours(0,0,0,0),e}function C7(t,e){ZP(2,arguments);var i=x7(t),n=x7(e),r=i.getTime()-SO(i),s=n.getTime()-SO(n);return Math.round((r-s)/864e5)}function S7(t,e){var i=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return i<0?-1:i>0?1:i}function k7(t,e){ZP(2,arguments);var i=qP(t),n=sO(e);return isNaN(n)?new Date(NaN):n?(i.setDate(i.getDate()+n),i):i}function E7(t,e){ZP(2,arguments);var i=sO(e);return k7(t,-i)}function D7(t){return["mmsi","imo","callsign","name","flag","cargo","type","length","width","draught","groupsCount",...Array(t).fill(null).map((t,e)=>`timestamp${e+1}`)]}function I7(t,e){YH(function(t,e){return[D7(e).join(","),...t.map(t=>function(t,e){return t.passages.map(i=>[t.mmsi,t.imo,t.callsign,BD(t.name),t.country.flag,t.cargo,t.shipType.key,t.length,t.width,t.draught,t.groupsCount,...i.reduce((t,e)=>(t[e.edgeGroupIndex]=HO(1e3*e.timestamp),t),Array(e).fill(null))].join(","))}(t,e)).flat()].join("\n")}(t,e),`anais-moves-results-${FO(new Date,"yyyy-MM-dd'T'HH-mm-ss")}.csv`,"text/csv")}function P7(t,e){1&t&&(r.Vb(0,"th",23),r.Kc(1,"MMSI"),r.Ub())}function O7(t,e){if(1&t&&(r.Vb(0,"td",24),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.Db(1),r.Lc(t.mmsi)}}function M7(t,e){1&t&&(r.Vb(0,"th",23),r.Kc(1,"IMO"),r.Ub())}function T7(t,e){if(1&t&&(r.Vb(0,"td",24),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.Db(1),r.Lc(t.imo)}}function R7(t,e){1&t&&(r.Vb(0,"th",23),r.Kc(1,"Pavillon"),r.Ub())}function V7(t,e){if(1&t&&(r.Vb(0,"td",24),r.Qb(1,"app-flag",25),r.Ub()),2&t){const t=e.$implicit;r.Db(1),r.nc("flag",t.country.flag)}}function F7(t,e){1&t&&(r.Vb(0,"th",23),r.Kc(1,"Nom"),r.Ub())}function L7(t,e){if(1&t&&(r.Vb(0,"td",24),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.Db(1),r.Lc(t.name)}}function U7(t,e){1&t&&(r.Vb(0,"th",23),r.Kc(1,"Type"),r.Ub())}function B7(t,e){if(1&t&&(r.Vb(0,"td",24),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.Db(1),r.Lc(t.shipType.label)}}function N7(t,e){1&t&&(r.Vb(0,"th",23),r.Kc(1,"# Portes"),r.Ub())}function j7(t,e){if(1&t&&(r.Vb(0,"td",24),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.Db(1),r.Lc(t.groupsCount)}}function z7(t,e){1&t&&(r.Vb(0,"th",26),r.Kc(1,"Passages"),r.Ub())}function H7(t,e){if(1&t&&(r.Vb(0,"div",29),r.hc(1,"date"),r.Kc(2),r.Ub()),2&t){const t=e.$implicit,i=r.gc(3);r.Fc("background-color",i.searchResult.query.edgeGroups[t.edgeGroupIndex].color),r.oc("title",r.kc(1,4,1e3*t.timestamp,"yyyy-MM-dd HH:mm:ss z",i.mapConfigService.useUTCDates$.value&&"z")),r.Db(2),r.Mc(" ",t.edgeGroupIndex+1," ")}}function K7(t,e){if(1&t&&(r.Vb(0,"div"),r.Ic(1,H7,3,8,"div",28),r.Ub()),2&t){const t=e.$implicit;r.Db(1),r.nc("ngForOf",t)}}function $7(t,e){if(1&t&&(r.Vb(0,"td",24),r.Ic(1,K7,2,1,"div",27),r.Ub()),2&t){const t=e.$implicit;r.Db(1),r.nc("ngForOf",t.passages)}}function G7(t,e){1&t&&r.Qb(0,"tr",30)}function W7(t,e){1&t&&r.Qb(0,"tr",31)}const Z7=function(){return[10,20,100]};let q7=(()=>{class t extends LT{constructor(t,e){super(),this.mapConfigService=t,this.movesService=e,this.displayedColumns=["country","name","mmsi","imo","type","groupsCount","passages"]}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.searchResult=this.movesService.searchResult$.value;const t=this.searchResult.query.edgeGroups.length;this.tableDataSource=new NV(this.mapConfigService.movesSearchIncludeIncompletePassages$.value?this.searchResult.results:this.searchResult.results.filter(e=>e.groupsCount===t)),this.tableDataSource.sortingDataAccessor=(t,e)=>{switch(e){case"country":return t.country.flag;case"type":return t.shipType.label;default:return t[e]}},setTimeout(()=>{this.paginator.pageSize=50,this.tableDataSource.paginator=this.paginator,this.tableDataSource.sort=this.sort}),this.subscriptions.push(this.mapConfigService.movesSearchIncludeIncompletePassages$.subscribe(t=>{const e=this.searchResult.query.edgeGroups.length;this.tableDataSource.data=t?this.searchResult.results:this.searchResult.results.filter(t=>t.groupsCount===e)}))})}downloadCSVFile(){I7(this.tableDataSource.data,this.searchResult.query.edgeGroups.length)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(hI),r.Pb(mT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-moves-table-dialog"]],viewQuery:function(t,e){if(1&t&&(r.Pc(CR,1),r.Pc(yA,1)),2&t){let t;r.vc(t=r.dc())&&(e.sort=t.first),r.vc(t=r.dc())&&(e.paginator=t.first)}},features:[r.Ab],decls:41,vars:8,consts:[[1,"d-flex"],[1,"dialog-title"],[1,"u-flex"],["mat-button","","title","Fermer le panneau",3,"mat-dialog-close"],[1,"dialog-content"],[1,"px-3","pb-2","mat-body"],[1,"d-flex-center"],["color","primary",1,"mr-2",3,"ngModel","ngModelChange"],["mat-stroked-button","","title","T\xe9l\xe9charger les r\xe9sultats au format CSV",3,"click"],["mat-table","","matSort","","matSortActive","groupsCount","matSortDirection","desc",1,"table",3,"dataSource"],["matColumnDef","mmsi"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","imo"],["matColumnDef","country"],["matColumnDef","name"],["matColumnDef","type"],["matColumnDef","groupsCount"],["matColumnDef","passages"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[3,"flag"],["mat-header-cell",""],[4,"ngFor","ngForOf"],["class","edge-group-bullet",3,"backgroundColor","title",4,"ngFor","ngForOf"],[1,"edge-group-bullet",3,"title"],["mat-header-row",""],["mat-row",""]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"h1",1),r.Kc(2," Liste des mouvements "),r.Ub(),r.Qb(3,"div",2),r.Vb(4,"button",3),r.Vb(5,"mat-icon"),r.Kc(6,"close"),r.Ub(),r.Ub(),r.Ub(),r.Vb(7,"div",4),r.Vb(8,"div",5),r.Vb(9,"div",6),r.Vb(10,"div",2),r.Kc(11),r.Ub(),r.Vb(12,"mat-slide-toggle",7),r.cc("ngModelChange",function(){return e.mapConfigService.toggleMovesSearchIncludeIncompletePassages()}),r.Kc(13," Inclure les passages incomplets "),r.Ub(),r.Vb(14,"button",8),r.cc("click",function(){return e.downloadCSVFile()}),r.Kc(15,"CSV"),r.Ub(),r.Ub(),r.Ub(),r.Vb(16,"table",9),r.Tb(17,10),r.Ic(18,P7,2,0,"th",11),r.Ic(19,O7,2,1,"td",12),r.Sb(),r.Tb(20,13),r.Ic(21,M7,2,0,"th",11),r.Ic(22,T7,2,1,"td",12),r.Sb(),r.Tb(23,14),r.Ic(24,R7,2,0,"th",11),r.Ic(25,V7,2,1,"td",12),r.Sb(),r.Tb(26,15),r.Ic(27,F7,2,0,"th",11),r.Ic(28,L7,2,1,"td",12),r.Sb(),r.Tb(29,16),r.Ic(30,U7,2,0,"th",11),r.Ic(31,B7,2,1,"td",12),r.Sb(),r.Tb(32,17),r.Ic(33,N7,2,0,"th",11),r.Ic(34,j7,2,1,"td",12),r.Sb(),r.Tb(35,18),r.Ic(36,z7,2,0,"th",19),r.Ic(37,$7,2,1,"td",12),r.Sb(),r.Ic(38,G7,1,0,"tr",20),r.Ic(39,W7,1,0,"tr",21),r.Ub(),r.Qb(40,"mat-paginator",22),r.Ub()),2&t&&(r.Db(11),r.Nc(" ",e.tableDataSource.data.length," r\xe9sultat",e.tableDataSource.data.length>1?"s":""," "),r.Db(1),r.nc("ngModel",e.mapConfigService.movesSearchIncludeIncompletePassages$.value),r.Db(4),r.nc("dataSource",e.tableDataSource),r.Db(22),r.nc("matHeaderRowDef",e.displayedColumns),r.Db(1),r.nc("matRowDefColumns",e.displayedColumns),r.Db(1),r.nc("pageSizeOptions",r.rc(7,Z7)))},directives:[Dl,Zl,Yp,NL,Vc,uh,vV,CR,SV,xV,yV,OV,TV,yA,EV,OR,IV,GF,ct,VV,LV],pipes:[kt],styles:[".dialog-title[_ngcontent-%COMP%]{margin:0;padding:16px}.dialog-content[_ngcontent-%COMP%]{padding:16px}.table[_ngcontent-%COMP%]{width:100%}.table[_ngcontent-%COMP%] tr.mat-row, .table[_ngcontent-%COMP%] tr.mat-header-row[_ngcontent-%COMP%]{height:40px}.table[_ngcontent-%COMP%] td.mat-cell{padding:0 4px!important;font-size:13px}.table[_ngcontent-%COMP%] td.mat-cell:first-of-type{padding-left:24px!important}.table[_ngcontent-%COMP%] td.mat-cell:last-of-type{padding-right:24px!important}.edge-group-bullet[_ngcontent-%COMP%]{display:inline-block;width:16px;height:16px;line-height:18px;text-align:center;border-radius:50%;margin:4px 4px 4px 0;cursor:help;color:#fff;text-shadow:rgba(0,0,0,.3686274509803922) 1px 1px 0;font-size:12px}"]}),t})();function Y7(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",7),r.cc("click",function(){return r.Ac(t),r.gc().locateShip()}),r.Qb(1,"app-flag",8),r.Vb(2,"div",9),r.Vb(3,"strong",10),r.Kc(4),r.Ub(),r.Vb(5,"small",11),r.Kc(6),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.nc("title",t.hasPosition?"Localiser le navire":"Ce navire n'a pas de position")("disabled",!t.hasPosition),r.Db(1),r.nc("mmsi",t.ship.mmsi),r.Db(3),r.Lc(t.ship.name||"?"),r.Db(2),r.Lc(t.ship.cargo?t.vesselTypeLabelsByType[t.ship.cargo]:"?")}}function Q7(t,e){if(1&t&&(r.Vb(0,"div",12),r.Qb(1,"app-flag",8),r.Vb(2,"div",9),r.Vb(3,"strong",10),r.Kc(4),r.Ub(),r.Vb(5,"small",11),r.Kc(6),r.Ub(),r.Ub(),r.Ub()),2&t){const t=r.gc();r.Db(1),r.nc("mmsi",t.ship.mmsi),r.Db(3),r.Lc(t.ship.name||"?"),r.Db(2),r.Lc(t.ship.cargo?t.vesselTypeLabelsByType[t.ship.cargo]:"?")}}const X7=function(t){return["/ships/",t]},J7=["*"];let t9=(()=>{class t extends LT{constructor(t){super(),this.mapService=t,this.showLink=!0,this.vesselTypeLabelsByType=ED,this.hasPosition=!0}ngOnInit(){this.ensureMandatoryInputParams("ship")}ngOnChanges(t){var e,i;t.ship&&(this.hasPosition=FD(null===(e=t.ship.currentValue)||void 0===e?void 0:e.lon)&&FD(null===(i=t.ship.currentValue)||void 0===i?void 0:i.lat))}locateShip(){this.mapService.pingLocation([this.ship.lon,this.ship.lat]),this.mapService.locate([this.ship.lon,this.ship.lat])}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(pI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-ship-item"]],inputs:{ship:"ship",showLink:"showLink"},features:[r.Ab,r.Bb],ngContentSelectors:J7,decls:15,vars:8,consts:[[1,"ship-item__header"],["mat-button","","class","ship-item__link",3,"title","disabled","click",4,"ngIf"],["class","d-flex u-flex",4,"ngIf"],["mat-button","","title","Ouvrir la fiche du navire",1,"d-center",3,"routerLink"],[1,"ship-item__row"],[1,"px-2"],[1,"ship-item__row","ship-item__slot-row"],["mat-button","",1,"ship-item__link",3,"title","disabled","click"],[1,"ship-item__flag",3,"mmsi"],[1,"ship-item__title"],[1,"ship-item__name"],[1,"ship-item__type"],[1,"d-flex","u-flex"]],template:function(t,e){1&t&&(r.mc(),r.Vb(0,"div",0),r.Ic(1,Y7,7,5,"button",1),r.Ic(2,Q7,7,3,"div",2),r.Vb(3,"a",3),r.Vb(4,"mat-icon"),r.Kc(5,"info"),r.Ub(),r.Ub(),r.Ub(),r.Vb(6,"div",4),r.Vb(7,"span"),r.Kc(8),r.Ub(),r.Vb(9,"span",5),r.Kc(10),r.Ub(),r.Vb(11,"span"),r.Kc(12),r.Ub(),r.Ub(),r.Vb(13,"div",6),r.lc(14),r.Ub()),2&t&&(r.Db(1),r.nc("ngIf",e.showLink),r.Db(1),r.nc("ngIf",!e.showLink),r.Db(1),r.nc("routerLink",r.sc(6,X7,e.ship.mmsi)),r.Db(5),r.Mc("MMSI ",e.ship.mmsi,""),r.Db(2),r.Mc("IMO ",e.ship.imo||"?",""),r.Db(2),r.Mc("Callsign ",e.ship.callsign||"?",""))},directives:[ut,Il,aw,Yp,Dl,GF],styles:[".ship-item__header[_ngcontent-%COMP%]{display:flex;padding:4px 4px 0}.ship-item__link[_ngcontent-%COMP%]{flex:1;padding:0;line-height:inherit;text-align:inherit;font-size:inherit;font-weight:inherit}.ship-item__link[_ngcontent-%COMP%] .mat-button-wrapper{display:flex}.ship-item__flag[_ngcontent-%COMP%]{margin:5px}.ship-item__title[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:5px 0;flex:1}.ship-item__type[_ngcontent-%COMP%]{font-size:.9em;color:#555}.ship-item__row[_ngcontent-%COMP%]{padding:0 8px 4px;display:flex;justify-content:space-between;font-size:.9em;flex-wrap:wrap}.ship-item__slot-row[_ngcontent-%COMP%]:empty{display:none}"],changeDetection:0}),t})();function e9(t,e){if(1&t&&(r.Vb(0,"div",23),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Nc("Du ",t.dateRange.start," au ",t.dateRange.end,"")}}function i9(t,e){if(1&t&&(r.Vb(0,"div",24),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Mc(" ",t.searchForm.controls.interval.errors.maxRange," ")}}function n9(t,e){1&t&&(r.Vb(0,"div",25),r.Kc(1," S\xe9lectionnez des transitions sur la carte "),r.Ub())}function r9(t,e){1&t&&(r.Vb(0,"mat-icon"),r.Kc(1,"chevron_right"),r.Ub())}function s9(t,e){if(1&t&&(r.Ic(0,r9,2,0,"mat-icon",26),r.Vb(1,"div",27),r.Kc(2),r.Ub()),2&t){const t=e.index+1,i=e.$implicit;r.nc("ngIf",t>1),r.Db(1),r.Fc("background-color",i.color),r.pc("title","Porte ",t,""),r.Db(1),r.Mc(" ",t," ")}}function o9(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",28),r.cc("click",function(){return r.Ac(t),r.gc().resetEdgeGroups()}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function a9(t,e){if(1&t&&(r.Vb(0,"div",29),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Mc(" ",t.searchForm.controls.edgeGroups.errors.maxEdgeGroups," ")}}function l9(t,e){if(1&t&&(r.Vb(0,"div",29),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Mc(" ",t.searchForm.controls.edgeGroups.errors.maxTransitions," ")}}function c9(t,e){1&t&&(r.Vb(0,"div",30),r.Kc(1," Faites une recherche pour afficher les r\xe9sultats. "),r.Ub())}function h9(t,e){1&t&&(r.Vb(0,"div",30),r.Kc(1," Aucun r\xe9sultat "),r.Ub())}function u9(t,e){1&t&&r.Qb(0,"app-ship-item",39),2&t&&r.nc("ship",e.$implicit)("showLink",!1)}function d9(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",31),r.Vb(1,"mat-slide-toggle",32),r.cc("ngModelChange",function(){return r.Ac(t),r.gc(2).mapConfigService.toggleMovesSearchIncludeIncompletePassages()}),r.Kc(2," Inclure les passages incomplets "),r.Ub(),r.Vb(3,"div",5),r.Vb(4,"div",33),r.Kc(5),r.Ub(),r.Vb(6,"button",34),r.cc("click",function(){return r.Ac(t),r.gc(2).downloadCSVFile()}),r.Kc(7,"CSV"),r.Ub(),r.Vb(8,"button",35),r.cc("click",function(){return r.Ac(t),r.gc(2).openTableDialog()}),r.Kc(9,"Liste d\xe9taill\xe9e"),r.Ub(),r.Ub(),r.Ub(),r.Vb(10,"div",36),r.Ic(11,u9,1,2,"app-ship-item",37),r.Ub(),r.Vb(12,"mat-paginator",38),r.cc("page",function(e){return r.Ac(t),r.gc(2).showResultsPage(e.pageIndex)}),r.Ub()}if(2&t){const t=r.gc(2);r.Db(1),r.nc("ngModel",t.mapConfigService.movesSearchIncludeIncompletePassages$.value),r.Db(4),r.Nc(" ",t.filteredSearchResults$.value.length," r\xe9sultat",t.filteredSearchResults$.value.length>1?"s":""," "),r.Db(6),r.nc("ngForOf",t.displayedSearchResults)("ngForTrackBy",t.trackByIndex),r.Db(1),r.nc("pageIndex",t.currentResultsPageIndex)("length",t.filteredSearchResults$.value.length)("pageSize",t.resultsPageSize)}}function p9(t,e){if(1&t&&(r.Ic(0,h9,2,0,"div",21),r.Ic(1,d9,13,8,"ng-template",22)),2&t){const t=r.gc();r.nc("ngIf",0===t.searchResult.results.length),r.Db(1),r.nc("ngIf",t.searchResult.results.length>0)}}function f9(t){const e={};t.value.length>8&&(e.maxEdgeGroups="Vous ne pouvez pas cr\xe9er plus de 8 groupes de porte.");const i=t.value.reduce((t,e,i)=>(e.edges.length>8&&t.push(i+1),t),[]);if(i.length>0){const t=i.length>1;e.maxTransitions=`Le${t?"s":""} groupe${t?"s":""} ${i.join(", ")} d\xe9passe${t?"nt":""} la limite de 8 transitions par groupe.`}return e}let m9=(()=>{class t extends LT{constructor(t,e,i,n,r,s,o){super(),this.ngZone=t,this.formBuilder=e,this.titleService=i,this.dialog=n,this.mapConfigService=r,this.mapService=s,this.movesService=o,this.minDate=new Date(2020,0,1),this.maxDate=new Date,this.dateRange=null,this.searchResult=null,this.maxIntervalRangeDays=61,this.displayedSearchResults=null,this.currentResultsPageIndex=0,this.resultsPageSize=50,this.currentResultsPageIndex$=new Av.a(0),this.filteredSearchResults$=new Av.a([]),this.search=()=>Object(ue.a)(this,void 0,void 0,function*(){this.searchForm.valid&&(yield this.movesService.search(this.searchForm.value))})}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.titleService.setTitle("Recherche de mouvements - ANAIS"),this.mapService.hasBooted||this.mapService.resetToDefaultView(),this.searchForm=this.formBuilder.group({edgeGroups:[[],[pc.required,f9]],interval:this.formBuilder.group({start:[null,[pc.required]],end:[null,[pc.required]]})}),this.subscriptions.push(this.searchForm.controls.interval.valueChanges.subscribe(t=>{t.start&&t.end&&(function(t,e){ZP(2,arguments);var i=qP(t),n=qP(e),r=S7(i,n),s=Math.abs(C7(i,n));i.setDate(i.getDate()-r*s);var o=S7(i,n)===-r,a=r*(s-o);return 0===a?0:a}(t.end,t.start)>this.maxIntervalRangeDays?this.searchForm.controls.interval.setErrors({maxRange:`La p\xe9riode doit \xeatre au maximum de ${this.maxIntervalRangeDays} jours.`}):this.dateRange={start:jO(t.start),end:jO(t.end)})})),this.movesService.searchQuery$.value?(this.searchForm.setValue(this.movesService.searchQuery$.value),this.searchForm.value.edgeGroups&&this.movesService.selectedEdgeGroups$.next(this.searchForm.value.edgeGroups)):this.searchForm.controls.interval.setValue({start:x7(E7(new Date,7)),end:new Date}),this.subscriptions.push(this.searchForm.valueChanges.subscribe(t=>{this.movesService.searchQuery$.next(t)}),this.movesService.selectedEdgeGroups$.subscribe(t=>{this.ngZone.run(()=>{this.searchForm.controls.edgeGroups.setValue(t)})}),this.movesService.searchResult$.subscribe(t=>{this.searchResult=t}),Hg([this.movesService.searchResult$,this.mapConfigService.movesSearchIncludeIncompletePassages$]).pipe(Object(Ge.a)(([t,e])=>{if(null===t)return[];const i=t.query.edgeGroups.length;return e?t.results:t.results.filter(t=>t.groupsCount===i)})).subscribe(t=>{this.filteredSearchResults$.next(t)}),Hg([this.filteredSearchResults$,this.currentResultsPageIndex$]).pipe(He(([t,e])=>{if(0===t.length&&0!==e)return this.showResultsPage(0),!1;const i=e*this.resultsPageSize;if(0===t.slice(i,i+this.resultsPageSize).length&&t.length>0){const e=Math.ceil(t.length/this.resultsPageSize)-1;return this.showResultsPage(-1===e?0:e),!1}return!0}),Object(Ge.a)(([t,e])=>{const i=e*this.resultsPageSize;return t.slice(i,i+this.resultsPageSize)})).subscribe(t=>{this.displayedSearchResults=t}))})}ngOnDestroy(){super.ngOnDestroy(),this.movesService.resetEdgeGroups()}resetForm(){this.searchForm.reset()}resetEdgeGroups(){this.movesService.resetEdgeGroups(),dT.fill(!0)}downloadCSVFile(){I7(this.filteredSearchResults$.value,this.searchResult.query.edgeGroups.length)}showResultsPage(t){this.currentResultsPageIndex$.next(t),this.currentResultsPageIndex=t}trackByIndex(t){return t}openTableDialog(){this.dialog.open(q7,{maxHeight:"90vh",maxWidth:"90vw",panelClass:"moves-table-dialog",closeOnNavigation:!0})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.B),r.Pb(Lh),r.Pb(he),r.Pb(Gl),r.Pb(hI),r.Pb(pI),r.Pb(mT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-moves-panel"]],features:[r.Ab],decls:31,vars:16,consts:[["joyrideStep","moves-panel","title","Recherche de mouvements","text","C'est ici que vous pouvez rechercher des navires \xe9tant pass\xe9 par plusieurs endroits pour une p\xe9riode de temps donn\xe9e. Cela se fait en s\xe9lectionnant des transitions dans notre indexation hexagonale.",1,"panel","panel--medium"],[1,"panel__header","panel__header--blue"],[1,"panel__title","u-flex"],[1,"pa-3","d-flex-column",3,"formGroup"],[1,"mb-2","mat-body"],[1,"d-flex-center"],[1,"mr-1"],["class","mx-3",4,"ngIf"],["formGroupName","interval",2,"display","none",3,"rangePicker","min","max"],["matStartDate","","formControlName","start"],["matEndDate","","formControlName","end"],["picker",""],["title","Choisir une p\xe9riode",2,"align-self","center",3,"for"],["class","error-message mb-2",4,"ngIf"],[1,"edge-groups-form"],["class","edge-groups-form__placeholder",4,"ngIf"],["ngFor","",3,"ngForOf"],["mat-button","","mat-icon-button","","class","ml-2","title","R\xe9initialiser les portes",3,"click",4,"ngIf"],["class","error-message mat-body mb-2",4,"ngIf"],["mat-stroked-button","","type","submit","title","Lancer la recherche",1,"mt-3",3,"app-async-action","disabled"],[1,"mt-3"],["class","pa-3",4,"ngIf"],[3,"ngIf"],[1,"mx-3"],[1,"error-message","mb-2"],[1,"edge-groups-form__placeholder"],[4,"ngIf"],[1,"edge-groups-form__bullet",3,"title"],["mat-button","","mat-icon-button","","title","R\xe9initialiser les portes",1,"ml-2",3,"click"],[1,"error-message","mat-body","mb-2"],[1,"pa-3"],[1,"px-3","pb-2","mat-body"],["color","primary",1,"mb-2",3,"ngModel","ngModelChange"],[1,"u-flex"],["mat-stroked-button","","title","T\xe9l\xe9charger les r\xe9sultats au format CSV",3,"click"],["mat-stroked-button","","title","Ouvrir la fen\xeatre avec la liste d\xe9taill\xe9e",3,"click"],[1,"scrollable"],[3,"ship","showLink",4,"ngFor","ngForOf","ngForTrackBy"],["showFirstLastButtons","","hidePageSize","",3,"pageIndex","length","pageSize","page"],[3,"ship","showLink"]],template:function(t,e){if(1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"h2",2),r.Kc(3,"Recherche de mouvements"),r.Ub(),r.Ub(),r.Vb(4,"form",3),r.Vb(5,"div",4),r.Kc(6,"Ce module vous permet de rechercher des navires \xe9tant pass\xe9 par plusieurs endroits pour une p\xe9riode de temps."),r.Ub(),r.Vb(7,"div",5),r.Vb(8,"label",6),r.Kc(9,"P\xe9riode :"),r.Ub(),r.Ic(10,e9,2,2,"div",7),r.Vb(11,"mat-date-range-input",8),r.Qb(12,"input",9),r.Qb(13,"input",10),r.Ub(),r.Qb(14,"mat-date-range-picker",null,11),r.Qb(16,"mat-datepicker-toggle",12),r.Ub(),r.Ic(17,i9,2,1,"div",13),r.Vb(18,"div",14),r.Vb(19,"label",6),r.Kc(20,"Passages :"),r.Ub(),r.Ic(21,n9,2,0,"div",15),r.Ic(22,s9,3,5,"ng-template",16),r.Ic(23,o9,3,0,"button",17),r.Ub(),r.Ic(24,a9,2,1,"div",18),r.Ic(25,l9,2,1,"div",18),r.Vb(26,"button",19),r.Kc(27,"Rechercher"),r.Ub(),r.Qb(28,"mat-divider",20),r.Ub(),r.Ic(29,c9,2,0,"div",21),r.Ic(30,p9,2,2,"ng-template",22),r.Ub()),2&t){const t=r.wc(15);r.Db(4),r.nc("formGroup",e.searchForm),r.Db(6),r.nc("ngIf",e.dateRange),r.Db(1),r.nc("rangePicker",t)("min",e.minDate)("max",e.maxDate),r.Db(5),r.nc("for",t),r.Db(1),r.nc("ngIf",null==e.searchForm.controls.interval.errors?null:e.searchForm.controls.interval.errors.maxRange),r.Db(4),r.nc("ngIf",null==e.searchForm.controls.edgeGroups.errors?null:e.searchForm.controls.edgeGroups.errors.required),r.Db(1),r.nc("ngForOf",e.searchForm.controls.edgeGroups.value),r.Db(1),r.nc("ngIf",e.searchForm.controls.edgeGroups.value.length>0),r.Db(1),r.nc("ngIf",null==e.searchForm.controls.edgeGroups.errors?null:e.searchForm.controls.edgeGroups.errors.maxEdgeGroups),r.Db(1),r.nc("ngIf",null==e.searchForm.controls.edgeGroups.errors?null:e.searchForm.controls.edgeGroups.errors.maxTransitions),r.Db(1),r.nc("app-async-action",e.search)("disabled",!e.searchForm.valid),r.Db(3),r.nc("ngIf",null===e.searchResult),r.Db(1),r.nc("ngIf",null!==e.searchResult)}},directives:[ax,dh,Fc,_h,ut,$d,wh,zd,ac,Vc,Eh,Hd,Gd,Bd,ct,Dl,dR,GT,Yp,NL,uh,yA,t9],styles:[".edge-groups-form[_ngcontent-%COMP%]{display:flex;align-items:center;min-height:40px;flex-wrap:wrap}.edge-groups-form__placeholder[_ngcontent-%COMP%]{color:#828282}.edge-groups-form__bullet[_ngcontent-%COMP%]{display:inline-block;width:24px;height:24px;line-height:26px;text-align:center;border-radius:50%;margin:8px 0;color:#fff;text-shadow:rgba(0,0,0,.3686274509803922) 1px 1px 0}.result-passage[_ngcontent-%COMP%]{font-size:12px} .moves-table-dialog .mat-dialog-container{padding:0!important}"]}),t})(),g9=(()=>{class t extends LT{constructor(t,e){super(),this.titleService=t,this.mapService=e}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.titleService.setTitle("Gestion des ports - ANAIS"),this.mapService.hasBooted||this.mapService.resetToDefaultView()})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(he),r.Pb(pI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-ports-panel"]],features:[r.Ab],decls:6,vars:0,consts:[[1,"panel"],[1,"panel__header","panel__header--blue"],[1,"panel__title","u-flex"],[1,"pa-2"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"h2",2),r.Kc(3,"Gestion des ports"),r.Ub(),r.Ub(),r.Vb(4,"p",3),r.Kc(5,"Les ports sont uniquement visualisables sur la carte."),r.Ub(),r.Ub())},encapsulation:2}),t})();var A9=i("gllA"),b9=i.n(A9);let v9=(()=>{class t{constructor(t){this.data=t}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(jl))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-raw-data-dialog"]],decls:9,vars:3,consts:[["mat-dialog-title",""],["mat-dialog-content",""],[1,"mat-small"],["mat-dialog-actions",""],[1,"u-flex"],["mat-button","",3,"mat-dialog-close"]],template:function(t,e){1&t&&(r.Vb(0,"h1",0),r.Kc(1),r.Ub(),r.Vb(2,"div",1),r.Vb(3,"pre",2),r.Kc(4),r.Ub(),r.Ub(),r.Vb(5,"div",3),r.Qb(6,"div",4),r.Vb(7,"button",5),r.Kc(8," Fermer "),r.Ub(),r.Ub()),2&t&&(r.Db(1),r.Lc(e.data.title),r.Db(3),r.Lc(e.data.content),r.Db(3),r.nc("mat-dialog-close",null))},directives:[ql,Yl,Ql,Dl,Zl],encapsulation:2}),t})();function _9(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",13),r.cc("click",function(){r.Ac(t);const e=r.gc(2);return e.locate(e.voyage.arrival.place.geo)}),r.Qb(1,"app-flag",14),r.Vb(2,"span"),r.Kc(3),r.Ub(),r.Ub()}if(2&t){const t=r.gc(2);r.Db(1),r.nc("flag",t.voyage.arrival.place.countryCode.toLowerCase()),r.Db(2),r.Nc("",t.voyage.arrival.place.name," (",t.voyage.arrival.place.unlocode,")")}}function y9(t,e){if(1&t&&(r.Vb(0,"div",15),r.Qb(1,"app-flag",14),r.Vb(2,"span"),r.Kc(3),r.Ub(),r.Ub()),2&t){const t=r.gc(2);r.Db(1),r.nc("flag",t.voyage.arrival.place.countryCode.toLowerCase()),r.Db(2),r.Nc("",t.voyage.arrival.place.name," (",t.voyage.arrival.place.unlocode,")")}}function w9(t,e){1&t&&(r.Vb(0,"div",16),r.Kc(1,"(Estim\xe9)"),r.Ub())}function x9(t,e){if(1&t&&(r.Vb(0,"div",10),r.Ic(1,_9,4,3,"button",6),r.Ic(2,y9,4,3,"div",11),r.Ub(),r.Vb(3,"div",12),r.Vb(4,"div"),r.Kc(5),r.hc(6,"date"),r.Ub(),r.Ic(7,w9,2,0,"div",9),r.Ub()),2&t){const t=r.gc();r.Db(1),r.nc("ngIf",t.voyage.arrival.place.geo),r.Db(1),r.nc("ngIf",!t.voyage.arrival.place.geo),r.Db(3),r.Lc(r.jc(6,4,t.voyage.arrival.date.value,"yyyy-MM-dd HH:mm")),r.Db(2),r.nc("ngIf","Estimated"===t.voyage.arrival.date.type)}}function C9(t,e){1&t&&(r.Vb(0,"div",10),r.Kc(1,"?"),r.Ub(),r.Vb(2,"div",12),r.Kc(3,"?"),r.Ub())}function S9(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",13),r.cc("click",function(){r.Ac(t);const e=r.gc();return e.locate(e.voyage.departure.place.geo)}),r.Qb(1,"app-flag",14),r.Vb(2,"span"),r.Kc(3),r.Ub(),r.Ub()}if(2&t){const t=r.gc();r.Db(1),r.nc("flag",t.voyage.departure.place.countryCode.toLowerCase()),r.Db(2),r.Nc("",t.voyage.departure.place.name," (",t.voyage.departure.place.unlocode,")")}}function k9(t,e){if(1&t&&(r.Vb(0,"div",17),r.Qb(1,"app-flag",14),r.Vb(2,"span"),r.Kc(3),r.Ub(),r.Ub()),2&t){const t=r.gc();r.Db(1),r.nc("flag",t.voyage.departure.place.countryCode.toLowerCase()),r.Db(2),r.Nc("",t.voyage.departure.place.name," (",t.voyage.departure.place.unlocode,")")}}function E9(t,e){1&t&&(r.Vb(0,"div",16),r.Kc(1,"(Estim\xe9)"),r.Ub())}let D9=(()=>{class t extends LT{constructor(t){super(),this.mapService=t}locate(t){const[e,i]=t.split(",").map(t=>+t);this.mapService.pingLocation([i,e]),this.mapService.locate([i,e])}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(pI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-shipment-voyage"]],inputs:{voyage:"voyage"},features:[r.Ab],decls:16,vars:10,consts:[[3,"ngIf"],[1,"transporter","mr-3"],[1,"mr-1"],[1,"arrow-wrapper"],[1,"arrow"],[1,"departure-place","pa-1","u-right"],["mat-button","","title","Localiser",3,"click",4,"ngIf"],["class","mt-2 mr-2",4,"ngIf"],[1,"departure-date","pa-1","mt-2"],["class","estimated-date-label",4,"ngIf"],[1,"arrival-place","pa-1","u-right"],["class","mr-2",4,"ngIf"],[1,"arrival-date","pa-1"],["mat-button","","title","Localiser",3,"click"],[1,"mr-1",3,"flag"],[1,"mr-2"],[1,"estimated-date-label"],[1,"mt-2","mr-2"]],template:function(t,e){1&t&&(r.Ic(0,x9,8,7,"ng-template",0),r.Ic(1,C9,4,0,"ng-template",0),r.Vb(2,"div",1),r.Vb(3,"mat-icon",2),r.Kc(4,"directions_boat"),r.Ub(),r.Kc(5),r.Ub(),r.Vb(6,"div",3),r.Qb(7,"div",4),r.Ub(),r.Vb(8,"div",5),r.Ic(9,S9,4,3,"button",6),r.Ic(10,k9,4,3,"div",7),r.Ub(),r.Vb(11,"div",8),r.Vb(12,"div"),r.Kc(13),r.hc(14,"date"),r.Ub(),r.Ic(15,E9,2,0,"div",9),r.Ub()),2&t&&(r.nc("ngIf",e.voyage.arrival),r.Db(1),r.nc("ngIf",!e.voyage.arrival),r.Db(4),r.Mc(" ",e.voyage.transport.name,"\n"),r.Db(4),r.nc("ngIf",e.voyage.departure.place.geo),r.Db(1),r.nc("ngIf",!e.voyage.departure.place.geo),r.Db(3),r.Lc(r.jc(14,7,e.voyage.departure.date.value,"yyyy-MM-dd HH:mm")),r.Db(2),r.nc("ngIf","Estimated"===e.voyage.departure.date.type))},directives:[ut,Yp,Dl,GF],pipes:[kt],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"arrival-place arrow-wrapper arrival-date" "transporter arrow-wrapper ." "departure-place arrow-wrapper departure-date";grid-template-rows:50px 100px 50px;grid-template-columns:auto 38px 140px}.departure-place[_ngcontent-%COMP%]{grid-area:departure-place}.departure-date[_ngcontent-%COMP%]{grid-area:departure-date}.arrival-place[_ngcontent-%COMP%]{grid-area:arrival-place}.arrival-date[_ngcontent-%COMP%]{grid-area:arrival-date}.transporter[_ngcontent-%COMP%]{grid-area:transporter;display:flex;align-items:center;justify-content:flex-end}.arrow-wrapper[_ngcontent-%COMP%]{grid-area:arrow-wrapper;padding:1.5em 1em 2.5em}.arrow[_ngcontent-%COMP%]{background:#012486;width:6px;height:100%;position:relative}.arrow[_ngcontent-%COMP%]:before{top:-8px}.arrow[_ngcontent-%COMP%]:after, .arrow[_ngcontent-%COMP%]:before{content:"";position:absolute;width:16px;height:16px;background-color:#012486;border-radius:50%;left:-5px}.arrow[_ngcontent-%COMP%]:after{bottom:-8px}.estimated-date-label[_ngcontent-%COMP%]{margin-left:1.8em} .mat-button{font-weight:400;white-space:normal}'],changeDetection:0}),t})();function I9(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",11),r.cc("click",function(){return r.Ac(t),r.gc().f.containerId.reset()}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function P9(t,e){if(1&t&&(r.Vb(0,"mat-error"),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Db(1),r.Lc(t.f.containerId.errors.invalid)}}function O9(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",11),r.cc("click",function(){return r.Ac(t),r.gc().f.billOfLading.reset()}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function M9(t,e){1&t&&(r.Vb(0,"div",12),r.Kc(1," Faites une recherche pour afficher les r\xe9sultats.\n"),r.Ub())}function T9(t,e){1&t&&(r.Vb(0,"div",12),r.Kc(1," Aucun r\xe9sultat "),r.Ub())}function R9(t,e){1&t&&r.Qb(0,"app-shipment-voyage",19),2&t&&r.nc("voyage",e.$implicit)}function V9(t,e){if(1&t&&(r.Vb(0,"div"),r.Vb(1,"div",17),r.Kc(2),r.Ub(),r.Ic(3,R9,1,1,"app-shipment-voyage",18),r.Ub()),2&t){const t=e.$implicit;r.Db(2),r.Mc("Transporteur : ",t.carrierId,""),r.Db(1),r.nc("ngForOf",t.voyages)}}function F9(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",14),r.Ic(1,V9,4,2,"div",15),r.Vb(2,"button",16),r.cc("click",function(){return r.Ac(t),r.gc(2).showRawResponse()}),r.Kc(3,"Afficher la r\xe9ponse brute"),r.Ub(),r.Ub()}if(2&t){const t=r.gc(2);r.Db(1),r.nc("ngForOf",t.searchResults)}}function L9(t,e){if(1&t&&(r.Ic(0,T9,2,0,"div",9),r.Ic(1,F9,4,1,"div",13)),2&t){const t=r.gc();r.nc("ngIf",0===t.searchResults.length),r.Db(1),r.nc("ngIf",t.searchResults.length>0)}}function U9(t){return!t.value||t.dirty&&b9()(t.value)?null:{invalid:"Le num\xe9ro doit \xeatre au format ISO 6346 (ex: TEXU3070079)."}}let B9=(()=>{class t extends LT{constructor(t,e,i,n,r,s){super(),this.formBuilder=t,this.router=e,this.uiService=i,this.titleService=n,this.dialog=r,this.workerService=s,this.searchResults=null,this.search=()=>Object(ue.a)(this,void 0,void 0,function*(){this.searchResults=null,this.searchForm.valid&&(this.searchResults=this.searchForm.controls.containerId.value?yield this.workerService.containers.findContainerTraceByContainerId(this.searchForm.controls.containerId.value):yield this.workerService.containers.findContainerTraceByBillOfLading(this.searchForm.controls.billOfLading.value),this.searchResults.length>0&&this.searchResults.forEach(t=>{t.voyages=t.voyages.sort((t,e)=>t.departure.date.value>=e.departure.date.value?-1:1)}))})}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.titleService.setTitle("Recherche de conteneur - ANAIS"),this.searchForm=this.formBuilder.group({containerId:["",[U9]],billOfLading:[""]},{validator:t=>t.controls.containerId.value||t.controls.billOfLading.value?null:{needOneField:!0}}),this.searchForm.controls.containerId.valueChanges.subscribe(t=>{t?this.f.billOfLading.disable({emitEvent:!1}):this.f.billOfLading.enable({emitEvent:!1})}),this.searchForm.controls.billOfLading.valueChanges.subscribe(t=>{t?this.f.containerId.disable({emitEvent:!1}):this.f.containerId.enable({emitEvent:!1})}),this.uiService.error("La recherche de conteneurs est suspendue car notre exp\xe9rimentation avec Semsoft est arriv\xe9e \xe0 terme."),yield this.router.navigateByUrl("/search/ships")})}get f(){return this.searchForm.controls}showRawResponse(){this.searchResults&&this.dialog.open(v9,{maxWidth:"90vw",maxHeight:"90vh",closeOnNavigation:!0,data:{title:"R\xe9ponse brute de l'API Lestr",content:JSON.stringify(this.searchResults,null,2)}})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Lh),r.Pb(sw),r.Pb(VI),r.Pb(he),r.Pb(Gl),r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-container-search-form"]],features:[r.Ab],decls:19,vars:8,consts:[[1,"pa-3","d-flex-column",3,"formGroup"],["matInput","","formControlName","containerId","minlength","11","maxlength","11"],["type","button","mat-button","","matSuffix","","mat-icon-button","","aria-label","R\xe9initialiser le champ",3,"click",4,"ngIf"],[4,"ngIf"],[1,"u-center"],["title","Bill of lading"],["matInput","","formControlName","billOfLading"],["mat-stroked-button","","type","submit","title","Lancer la rechercher",3,"app-async-action","disabled"],[1,"mt-3"],["class","pa-3",4,"ngIf"],[3,"ngIf"],["type","button","mat-button","","matSuffix","","mat-icon-button","","aria-label","R\xe9initialiser le champ",3,"click"],[1,"pa-3"],["class","d-flex-column mat-body scrollable",4,"ngIf"],[1,"d-flex-column","mat-body","scrollable"],[4,"ngFor","ngForOf"],["mat-button","","title","Afficher la r\xe9ponse brute",1,"mt-3",3,"click"],[1,"pa-2"],[3,"voyage",4,"ngFor","ngForOf"],[3,"voyage"]],template:function(t,e){1&t&&(r.Vb(0,"form",0),r.Vb(1,"mat-form-field"),r.Vb(2,"mat-label"),r.Kc(3,"Num\xe9ro de conteneur"),r.Ub(),r.Qb(4,"input",1),r.Ic(5,I9,3,0,"button",2),r.Ic(6,P9,2,1,"mat-error",3),r.Ub(),r.Vb(7,"div",4),r.Kc(8,"Ou"),r.Ub(),r.Vb(9,"mat-form-field"),r.Vb(10,"mat-label",5),r.Kc(11,"Connaissement"),r.Ub(),r.Qb(12,"input",6),r.Ic(13,O9,3,0,"button",2),r.Ub(),r.Vb(14,"button",7),r.Kc(15,"Rechercher"),r.Ub(),r.Qb(16,"mat-divider",8),r.Ub(),r.Ic(17,M9,2,0,"div",9),r.Ic(18,L9,2,2,"ng-template",10)),2&t&&(r.nc("formGroup",e.searchForm),r.Db(5),r.nc("ngIf",e.f.containerId.value),r.Db(1),r.nc("ngIf",null==e.f.containerId.errors?null:e.f.containerId.errors.invalid),r.Db(7),r.nc("ngIf",e.f.billOfLading.value),r.Db(1),r.nc("app-async-action",e.search)("disabled",!e.searchForm.valid),r.Db(3),r.nc("ngIf",null===e.searchResults),r.Db(1),r.nc("ngIf",null!==e.searchResults))},directives:[dh,Fc,_h,_u,cu,Ou,ac,Vc,Eh,Oh,Th,ut,Dl,dR,GT,fu,Yp,nu,ct,D9],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;overflow:hidden}"]}),t})();function N9(t,e){if(1&t&&(r.Vb(0,"a",5,6),r.Kc(2),r.Ub()),2&t){const t=e.$implicit,i=r.wc(1);r.pc("title","Onglet ",t.label,""),r.nc("routerLink",t.link)("active",i.isActive)("disabled",t.disabled),r.Db(2),r.Mc(" ",t.label," ")}}let j9=(()=>{class t extends LT{constructor(t,e){super(),this.titleService=t,this.mapService=e,this.tabs=[{label:"Navires",link:"ships"},{label:"Conteneurs",link:"containers",disabled:!0}]}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.titleService.setTitle("Recherche - ANAIS"),this.mapService.hasBooted||this.mapService.resetToDefaultView()})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(he),r.Pb(pI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-search-panel"]],features:[r.Ab],decls:7,vars:1,consts:[["joyrideStep","search-panel","title","Recherche","text","C'est ici que vous pouvez rechercher des navires ou conteneurs.",1,"panel","panel--medium"],[1,"panel__header","panel__header--blue"],[1,"panel__title"],["mat-tab-nav-bar","","mat-align-tabs","center"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active","disabled","title",4,"ngFor","ngForOf"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active","disabled","title"],["rla","routerLinkActive"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"h2",2),r.Kc(3,"Recherche"),r.Ub(),r.Ub(),r.Vb(4,"nav",3),r.Ic(5,N9,3,5,"a",4),r.Ub(),r.Qb(6,"router-outlet"),r.Ub()),2&t&&(r.Db(5),r.nc("ngForOf",e.tabs))},directives:[ax,rH,ct,hw,aw,lH,cw],encapsulation:2}),t})();function z9(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",8),r.cc("click",function(){return r.Ac(t),r.gc().f.shipId.reset()}),r.Vb(1,"mat-icon"),r.Kc(2,"close"),r.Ub(),r.Ub()}}function H9(t,e){1&t&&(r.Vb(0,"mat-error"),r.Kc(1,"Ce champ est obligatoire"),r.Ub())}function K9(t,e){1&t&&(r.Vb(0,"div",9),r.Kc(1," Faites une recherche pour afficher les r\xe9sultats.\n"),r.Ub())}function $9(t,e){1&t&&(r.Vb(0,"div",9),r.Kc(1," Aucun r\xe9sultat "),r.Ub())}function G9(t,e){if(1&t&&(r.Vb(0,"app-ship-item",13),r.Vb(1,"div"),r.Kc(2,"R\xe9ception : "),r.Vb(3,"span",14),r.hc(4,"timeago"),r.Kc(5),r.hc(6,"date"),r.Ub(),r.Ub(),r.Ub()),2&t){const t=e.$implicit,i=r.gc(3);r.nc("ship",t),r.Db(3),r.oc("title",r.ic(4,3,1e3*t.timestamp)),r.Db(2),r.Lc(r.kc(6,5,1e3*t.timestamp,"yyyy-MM-dd HH:mm:ss z",i.mapConfigService.useUTCDates$.value&&"z"))}}function W9(t,e){if(1&t&&(r.Vb(0,"div",11),r.Ic(1,G9,7,9,"app-ship-item",12),r.Ub()),2&t){const t=r.gc(2);r.Db(1),r.nc("ngForOf",t.searchResults)}}function Z9(t,e){if(1&t&&(r.Ic(0,$9,2,0,"div",6),r.Ic(1,W9,2,1,"div",10)),2&t){const t=r.gc();r.nc("ngIf",0===t.searchResults.length),r.Db(1),r.nc("ngIf",t.searchResults.length>0)}}let q9=(()=>{class t extends LT{constructor(t,e,i,n){super(),this.formBuilder=t,this.titleService=e,this.mapConfigService=i,this.workerService=n,this.searchResults=null,this.search=()=>Object(ue.a)(this,void 0,void 0,function*(){this.searchForm.valid&&(this.searchResults=yield this.workerService.ships.findShips(this.searchForm.controls.shipId.value))})}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.titleService.setTitle("Recherche de navire - ANAIS"),this.searchForm=this.formBuilder.group({shipId:["",[pc.required,pc.minLength(1)]]})})}get f(){return this.searchForm.controls}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Lh),r.Pb(he),r.Pb(hI),r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-ship-search-form"]],features:[r.Ab],decls:12,vars:7,consts:[[1,"pa-3","d-flex-column",3,"formGroup"],["matInput","","formControlName","shipId","placeholder","Nom, MMSI, IMO...","minlength","1"],["type","button","mat-button","","matSuffix","","mat-icon-button","","aria-label","R\xe9initialiser le champ",3,"click",4,"ngIf"],[4,"ngIf"],["mat-stroked-button","","type","submit","title","Lancer la rechercher",3,"app-async-action","disabled"],[1,"mt-3"],["class","pa-3",4,"ngIf"],[3,"ngIf"],["type","button","mat-button","","matSuffix","","mat-icon-button","","aria-label","R\xe9initialiser le champ",3,"click"],[1,"pa-3"],["class","scrollable",4,"ngIf"],[1,"scrollable"],[3,"ship",4,"ngFor","ngForOf"],[3,"ship"],[3,"title"]],template:function(t,e){1&t&&(r.Vb(0,"form",0),r.Vb(1,"mat-form-field"),r.Vb(2,"mat-label"),r.Kc(3,"Identifiant"),r.Ub(),r.Qb(4,"input",1),r.Ic(5,z9,3,0,"button",2),r.Ic(6,H9,2,0,"mat-error",3),r.Ub(),r.Vb(7,"button",4),r.Kc(8,"Rechercher"),r.Ub(),r.Qb(9,"mat-divider",5),r.Ub(),r.Ic(10,K9,2,0,"div",6),r.Ic(11,Z9,2,2,"ng-template",7)),2&t&&(r.nc("formGroup",e.searchForm),r.Db(5),r.nc("ngIf",e.f.shipId.value),r.Db(1),r.nc("ngIf",null==e.f.shipId.errors?null:e.f.shipId.errors.required),r.Db(1),r.nc("app-async-action",e.search)("disabled",!e.searchForm.valid),r.Db(3),r.nc("ngIf",null===e.searchResults),r.Db(1),r.nc("ngIf",null!==e.searchResults))},directives:[dh,Fc,_h,_u,cu,Ou,ac,Vc,Eh,Oh,ut,Dl,dR,GT,fu,Yp,nu,ct,t9],pipes:[Tx,kt],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;overflow:hidden}"]}),t})();function Y9(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",7),r.cc("click",function(){r.Ac(t);const i=e.$implicit;return r.gc().addShipToFleet(i.id)}),r.Kc(1),r.Ub()}if(2&t){const t=e.$implicit;r.Db(1),r.Mc(" ",t.name," ")}}function Q9(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",8),r.cc("click",function(){return r.Ac(t),r.gc().showCreateFleetForm=!0}),r.Vb(1,"mat-icon"),r.Kc(2,"add"),r.Ub(),r.Kc(3," Cr\xe9er une flotte "),r.Ub()}}function X9(t,e){if(1&t){const t=r.Wb();r.Vb(0,"ng-form",null,9),r.Vb(2,"mat-form-field"),r.Vb(3,"input",10),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc().newFleetName=e}),r.Ub(),r.Ub(),r.Ub(),r.Vb(4,"button",11),r.cc("click",function(){return r.Ac(t),r.gc().createFleet()}),r.Kc(5," Cr\xe9er "),r.Ub()}if(2&t){const t=r.wc(1),e=r.gc();r.Db(3),r.nc("ngModel",e.newFleetName),r.Db(1),r.nc("disabled",!t.form.valid)}}let J9=(()=>{class t{constructor(t,e,i,n){this.data=t,this.fleetsService=e,this.workerService=i,this.dialogRef=n,this.showCreateFleetForm=!1,this.newFleetName=""}addShipToFleet(t){return Object(ue.a)(this,void 0,void 0,function*(){const e=GH(yield this.workerService.fleets.get(t));e.ships.includes(this.data.mmsi)||(e.ships.push(this.data.mmsi),yield this.fleetsService.updateFleet(e)),this.dialogRef.close()})}createFleet(){return Object(ue.a)(this,void 0,void 0,function*(){yield this.fleetsService.createFleet({name:this.newFleetName,ships:[this.data.mmsi]}),this.dialogRef.close()})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(jl),r.Pb(OT),r.Pb(_I.a),r.Pb(Bl))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-add-to-fleet-dialog"]],decls:14,vars:5,consts:[["mat-dialog-title","",1,"d-flex"],[1,"u-flex"],["mat-button","","title","Fermer le panneau",3,"mat-dialog-close"],[1,"d-flex-column"],["mat-button","","title","Ajouter \xe0 la flotte",3,"click",4,"ngFor","ngForOf"],["mat-button","",3,"click",4,"ngIf"],[3,"ngIf"],["mat-button","","title","Ajouter \xe0 la flotte",3,"click"],["mat-button","",3,"click"],["form","ngForm"],["matInput","","name","name","placeholder","Nom de la flotte","required","","maxlength","64",3,"ngModel","ngModelChange"],["mat-button","","color","primary","title","Cr\xe9er la flotte","data-test","create-fleet",1,"create-button",3,"disabled","click"]],template:function(t,e){1&t&&(r.Vb(0,"h1",0),r.Kc(1," Ajouter \xe0 la flotte ... "),r.Qb(2,"div",1),r.Vb(3,"button",2),r.Vb(4,"mat-icon"),r.Kc(5,"close"),r.Ub(),r.Ub(),r.Ub(),r.Qb(6,"mat-divider"),r.Vb(7,"div",3),r.Ic(8,Y9,2,1,"button",4),r.hc(9,"async"),r.Ub(),r.Qb(10,"mat-divider"),r.Vb(11,"div",3),r.Ic(12,Q9,4,0,"button",5),r.Ic(13,X9,6,2,"ng-template",6),r.Ub()),2&t&&(r.Db(8),r.nc("ngForOf",r.ic(9,3,e.fleetsService.fleets$)),r.Db(4),r.nc("ngIf",!e.showCreateFleetForm),r.Db(1),r.nc("ngIf",e.showCreateFleetForm))},directives:[ql,Dl,Zl,Yp,GT,ct,ut,oh,_u,Ou,ac,Ih,Th,Vc,uh],pipes:[St],styles:[".add-to-fleet-dialog .mat-dialog-container{padding:12px} .add-to-fleet-dialog .mat-dialog-content{margin:0 12px;padding:0 12px}.create-button[_ngcontent-%COMP%]{align-self:flex-end}"],changeDetection:0}),t})(),ttt=(()=>{class t extends LT{constructor(){super(...arguments),this.cancel=new r.o,this.save=new r.o}ngOnInit(){this.ensureMandatoryInputParams("initialValue"),this.value=this.initialValue}}return t.\u0275fac=function(e){return ett(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-ship-note-form"]],inputs:{initialValue:"initialValue"},outputs:{cancel:"cancel",save:"save"},features:[r.Ab],decls:15,vars:1,consts:[[1,"header","d-flex-center"],[1,"u-flex","pa-2"],["matTooltip","Cette note n'est accessible que par vous et ne concerne que ce navire.","matTooltipPosition","above",1,"help-icon"],["mat-button","","color","primary","title","Enregistrer les modifications",3,"click"],["mat-button","","color","warn","title","Annuler les modifications",3,"click"],["appearance","outline",1,"note","d-block","pa-2"],["matInput","","rows","5",3,"ngModel","ngModelChange"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Kc(2," Note "),r.Vb(3,"mat-icon",2),r.Kc(4,"help"),r.Ub(),r.Ub(),r.Vb(5,"button",3),r.cc("click",function(){return e.save.emit(e.value)}),r.Vb(6,"mat-icon"),r.Kc(7,"save"),r.Ub(),r.Ub(),r.Vb(8,"button",4),r.cc("click",function(){return e.cancel.emit(null)}),r.Vb(9,"mat-icon"),r.Kc(10,"clear"),r.Ub(),r.Ub(),r.Ub(),r.Vb(11,"mat-form-field",5),r.Vb(12,"mat-label"),r.Kc(13,"Contenu"),r.Ub(),r.Vb(14,"textarea",6),r.cc("ngModelChange",function(t){return e.value=t}),r.Ub(),r.Ub()),2&t&&(r.Db(14),r.nc("ngModel",e.value))},directives:[Yp,oA,Dl,_u,cu,Ou,ac,Vc,uh],styles:[".header[_ngcontent-%COMP%]{background-color:#abb8cb}.note[_ngcontent-%COMP%]{font-size:12px}.note[_ngcontent-%COMP%] .mat-form-field-wrapper{padding-bottom:0!important}"],changeDetection:0}),t})();const ett=r.Xb(ttt);function itt(t,e){1&t&&r.Qb(0,"mat-spinner",2)}function ntt(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-glitter",5),r.Vb(1,"button",6),r.cc("click",function(){return r.Ac(t),r.gc(2).showForm()}),r.Vb(2,"mat-icon"),r.Kc(3,"note_add"),r.Ub(),r.Kc(4," Ajouter une note "),r.Ub(),r.Ub()}}function rtt(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",7),r.Vb(1,"div",8),r.Kc(2," Note "),r.Vb(3,"mat-icon",9),r.Kc(4,"help"),r.Ub(),r.Ub(),r.Vb(5,"button",10),r.cc("click",function(){return r.Ac(t),r.gc(2).showForm()}),r.Vb(6,"mat-icon"),r.Kc(7,"edit"),r.Ub(),r.Ub(),r.Vb(8,"button",11),r.cc("click",function(){return r.Ac(t),r.gc(2).deleteNote()}),r.Vb(9,"mat-icon"),r.Kc(10,"delete"),r.Ub(),r.Ub(),r.Ub(),r.Vb(11,"div",12),r.Kc(12),r.Ub()}if(2&t){const t=r.gc(2);r.Db(12),r.Mc(" ",t.note," ")}}function stt(t,e){if(1&t){const t=r.Wb();r.Vb(0,"app-ship-note-form",13),r.cc("save",function(e){return r.Ac(t),r.gc(2).updateNote(e)})("cancel",function(){return r.Ac(t),r.gc(2).cancelEdition()}),r.Ub()}if(2&t){const t=r.gc(2);r.nc("initialValue",t.note)}}function ott(t,e){if(1&t&&(r.Ic(0,ntt,5,0,"app-glitter",3),r.Ic(1,rtt,13,1,"ng-template",1),r.Ic(2,stt,1,1,"app-ship-note-form",4)),2&t){const t=r.gc();r.nc("ngIf",!t.note&&!t.isEditing),r.Db(1),r.nc("ngIf",t.note&&!t.isEditing),r.Db(1),r.nc("ngIf",t.isEditing)}}let att=(()=>{class t extends LT{constructor(t){super(),this.workerService=t,this.update=new r.o,this.loading=!0,this.isEditing=!1,this.note=""}ngOnInit(){this.ensureMandatoryInputParams("mmsi")}ngOnChanges(t){return Object(ue.a)(this,void 0,void 0,function*(){t.mmsi&&(this.loading=!0,this.note=yield this.workerService.ships.getShipNote(this.mmsi),this.loading=!1)})}showForm(){this.isEditing=!0}deleteNote(){return Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.ships.updateShipNote(this.mmsi,""),this.note=""})}updateNote(t){return Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.ships.updateShipNote(this.mmsi,t),this.note=t,this.cancelEdition()})}cancelEdition(){this.isEditing=!1}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-ship-note"]],inputs:{mmsi:"mmsi"},outputs:{update:"update"},features:[r.Ab,r.Bb],decls:2,vars:2,consts:[["class","small-spinner","strokeWidth","4","diameter","60",4,"ngIf"],[3,"ngIf"],["strokeWidth","4","diameter","60",1,"small-spinner"],["gid","ship-note","date","2021-02-15",4,"ngIf"],[3,"initialValue","save","cancel",4,"ngIf"],["gid","ship-note","date","2021-02-15"],["mat-button","","title","Ajouter une note",1,"d-block",3,"click"],[1,"header","d-flex-center"],[1,"u-flex","pa-2"],["matTooltip","Cette note n'est accessible que par vous et ne concerne que ce navire.","matTooltipPosition","above",1,"help-icon"],["mat-button","","color","primary","title","\xc9diter la note",3,"click"],["mat-button","","color","warn","title","Supprimer la note",3,"click"],[1,"note","pa-2"],[3,"initialValue","save","cancel"]],template:function(t,e){1&t&&(r.Ic(0,itt,1,0,"mat-spinner",0),r.Ic(1,ott,3,3,"ng-template",1)),2&t&&(r.nc("ngIf",e.loading),r.Db(1),r.nc("ngIf",!e.loading))},directives:[ut,fF,DL,Dl,Yp,oA,ttt],styles:[".header[_ngcontent-%COMP%]{background-color:#abb8cb}.note[_ngcontent-%COMP%]{white-space:pre-line;font-size:12px;max-height:117px;overflow-y:auto}"]}),t})(),ltt=0;const ctt=new r.s("CdkAccordion");let htt=(()=>{class t{constructor(){this._stateChanges=new _e.a,this._openCloseAllActions=new _e.a,this.id="cdk-accordion-"+ltt++,this._multi=!1}get multi(){return this._multi}set multi(t){this._multi=ti(t)}openAll(){this._multi&&this._openCloseAllActions.next(!0)}closeAll(){this._openCloseAllActions.next(!1)}ngOnChanges(t){this._stateChanges.next(t)}ngOnDestroy(){this._stateChanges.complete(),this._openCloseAllActions.complete()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["cdk-accordion"],["","cdkAccordion",""]],inputs:{multi:"multi"},exportAs:["cdkAccordion"],features:[r.Cb([{provide:ctt,useExisting:t}]),r.Bb]}),t})(),utt=0,dtt=(()=>{class t{constructor(t,e,i){this.accordion=t,this._changeDetectorRef=e,this._expansionDispatcher=i,this._openCloseAllSubscription=ye.a.EMPTY,this.closed=new r.o,this.opened=new r.o,this.destroyed=new r.o,this.expandedChange=new r.o,this.id="cdk-accordion-child-"+utt++,this._expanded=!1,this._disabled=!1,this._removeUniqueSelectionListener=()=>{},this._removeUniqueSelectionListener=i.listen((t,e)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===e&&this.id!==t&&(this.expanded=!1)}),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}get expanded(){return this._expanded}set expanded(t){t=ti(t),this._expanded!==t&&(this._expanded=t,this.expandedChange.emit(t),t?(this.opened.emit(),this._expansionDispatcher.notify(this.id,this.accordion?this.accordion.id:this.id)):this.closed.emit(),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(t){this._disabled=ti(t)}ngOnDestroy(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()}toggle(){this.disabled||(this.expanded=!this.expanded)}close(){this.disabled||(this.expanded=!1)}open(){this.disabled||(this.expanded=!0)}_subscribeToOpenCloseAllActions(){return this.accordion._openCloseAllActions.subscribe(t=>{this.disabled||(this.expanded=t)})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(ctt,12),r.Pb(r.h),r.Pb(Jn))},t.\u0275dir=r.Kb({type:t,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:"expanded",disabled:"disabled"},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[r.Cb([{provide:ctt,useValue:void 0}])]}),t})(),ptt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({}),t})();const ftt=["body"];function mtt(t,e){}const gtt=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],Att=["mat-expansion-panel-header","*","mat-action-row"];function btt(t,e){if(1&t&&r.Qb(0,"span",2),2&t){const t=r.gc();r.nc("@indicatorRotate",t._getExpandedState())}}const vtt=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],_tt=["mat-panel-title","mat-panel-description","*"],ytt=new r.s("MAT_ACCORDION"),wtt={indicatorRotate:$r("indicatorRotate",[qr("collapsed, void",Zr({transform:"rotate(0deg)"})),qr("expanded",Zr({transform:"rotate(180deg)"})),Qr("expanded <=> collapsed, void => collapsed",Gr("225ms cubic-bezier(0.4,0.0,0.2,1)"))]),bodyExpansion:$r("bodyExpansion",[qr("collapsed, void",Zr({height:"0px",visibility:"hidden"})),qr("expanded",Zr({height:"*",visibility:"visible"})),Qr("expanded <=> collapsed, void => collapsed",Gr("225ms cubic-bezier(0.4,0.0,0.2,1)"))])};let xtt=(()=>{class t{constructor(t){this._template=t}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.O))},t.\u0275dir=r.Kb({type:t,selectors:[["ng-template","matExpansionPanelContent",""]]}),t})(),Ctt=0;const Stt=new r.s("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let ktt=(()=>{class t extends dtt{constructor(t,e,i,n,s,o,a){super(t,e,i),this._viewContainerRef=n,this._animationMode=o,this._hideToggle=!1,this.afterExpand=new r.o,this.afterCollapse=new r.o,this._inputChanges=new _e.a,this._headerId="mat-expansion-panel-header-"+Ctt++,this._bodyAnimationDone=new _e.a,this.accordion=t,this._document=s,this._bodyAnimationDone.pipe(mn((t,e)=>t.fromState===e.fromState&&t.toState===e.toState)).subscribe(t=>{"void"!==t.fromState&&("expanded"===t.toState?this.afterExpand.emit():"collapsed"===t.toState&&this.afterCollapse.emit())}),a&&(this.hideToggle=a.hideToggle)}get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(t){this._hideToggle=ti(t)}get togglePosition(){return this._togglePosition||this.accordion&&this.accordion.togglePosition}set togglePosition(t){this._togglePosition=t}_hasSpacing(){return!!this.accordion&&this.expanded&&"default"===this.accordion.displayMode}_getExpandedState(){return this.expanded?"expanded":"collapsed"}toggle(){this.expanded=!this.expanded}close(){this.expanded=!1}open(){this.expanded=!0}ngAfterContentInit(){this._lazyContent&&this.opened.pipe(Pn(null),He(()=>this.expanded&&!this._portal),Qe(1)).subscribe(()=>{this._portal=new fe(this._lazyContent._template,this._viewContainerRef)})}ngOnChanges(t){this._inputChanges.next(t)}ngOnDestroy(){super.ngOnDestroy(),this._bodyAnimationDone.complete(),this._inputChanges.complete()}_containsFocus(){if(this._body){const t=this._document.activeElement,e=this._body.nativeElement;return t===e||e.contains(t)}return!1}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(ytt,12),r.Pb(r.h),r.Pb(Jn),r.Pb(r.S),r.Pb(a),r.Pb(pa,8),r.Pb(Stt,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-expansion-panel"]],contentQueries:function(t,e,i){if(1&t&&r.Ib(i,xtt,1),2&t){let t;r.vc(t=r.dc())&&(e._lazyContent=t.first)}},viewQuery:function(t,e){if(1&t&&r.Pc(ftt,1),2&t){let t;r.vc(t=r.dc())&&(e._body=t.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(t,e){2&t&&r.Hb("mat-expanded",e.expanded)("_mat-animation-noopable","NoopAnimations"===e._animationMode)("mat-expansion-panel-spacing",e._hasSpacing())},inputs:{disabled:"disabled",expanded:"expanded",hideToggle:"hideToggle",togglePosition:"togglePosition"},outputs:{opened:"opened",closed:"closed",expandedChange:"expandedChange",afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],features:[r.Cb([{provide:ytt,useValue:void 0}]),r.Ab,r.Bb],ngContentSelectors:Att,decls:7,vars:4,consts:[["role","region",1,"mat-expansion-panel-content",3,"id"],["body",""],[1,"mat-expansion-panel-body"],[3,"cdkPortalOutlet"]],template:function(t,e){1&t&&(r.mc(gtt),r.lc(0),r.Vb(1,"div",0,1),r.cc("@bodyExpansion.done",function(t){return e._bodyAnimationDone.next(t)}),r.Vb(3,"div",2),r.lc(4,1),r.Ic(5,mtt,0,0,"ng-template",3),r.Ub(),r.lc(6,2),r.Ub()),2&t&&(r.Db(1),r.nc("@bodyExpansion",e._getExpandedState())("id",e.id),r.Eb("aria-labelledby",e._headerId),r.Db(4),r.nc("cdkPortalOutlet",e._portal))},directives:[be],styles:[".mat-expansion-panel{box-sizing:content-box;display:block;margin:0;border-radius:4px;overflow:hidden;transition:margin 225ms cubic-bezier(0.4, 0, 0.2, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);position:relative}.mat-accordion .mat-expansion-panel:not(.mat-expanded),.mat-accordion .mat-expansion-panel:not(.mat-expansion-panel-spacing){border-radius:0}.mat-accordion .mat-expansion-panel:first-of-type{border-top-right-radius:4px;border-top-left-radius:4px}.mat-accordion .mat-expansion-panel:last-of-type{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.cdk-high-contrast-active .mat-expansion-panel{outline:solid 1px}.mat-expansion-panel.ng-animate-disabled,.ng-animate-disabled .mat-expansion-panel,.mat-expansion-panel._mat-animation-noopable{transition:none}.mat-expansion-panel-content{display:flex;flex-direction:column;overflow:visible}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>*:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>*:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px}.mat-action-row button.mat-button-base,.mat-action-row button.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-action-row button.mat-button-base,[dir=rtl] .mat-action-row button.mat-mdc-button-base{margin-left:0;margin-right:8px}\n"],encapsulation:2,data:{animation:[wtt.bodyExpansion]},changeDetection:0}),t})(),Ett=(()=>{class t{constructor(t,e,i,n,r,s){this.panel=t,this._element=e,this._focusMonitor=i,this._changeDetectorRef=n,this._animationMode=s,this._parentChangeSubscription=ye.a.EMPTY;const o=t.accordion?t.accordion._stateChanges.pipe(He(t=>!(!t.hideToggle&&!t.togglePosition))):qe;this._parentChangeSubscription=Object(or.a)(t.opened,t.closed,o,t._inputChanges.pipe(He(t=>!!(t.hideToggle||t.disabled||t.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),t.closed.pipe(He(()=>t._containsFocus())).subscribe(()=>i.focusVia(e,"program")),r&&(this.expandedHeight=r.expandedHeight,this.collapsedHeight=r.collapsedHeight)}get disabled(){return this.panel.disabled}_toggle(){this.disabled||this.panel.toggle()}_isExpanded(){return this.panel.expanded}_getExpandedState(){return this.panel._getExpandedState()}_getPanelId(){return this.panel.id}_getTogglePosition(){return this.panel.togglePosition}_showToggle(){return!this.panel.hideToggle&&!this.panel.disabled}_getHeaderHeight(){const t=this._isExpanded();return t&&this.expandedHeight?this.expandedHeight:!t&&this.collapsedHeight?this.collapsedHeight:null}_keydown(t){switch(t.keyCode){case 32:case 13:ke(t)||(t.preventDefault(),this._toggle());break;default:return void(this.panel.accordion&&this.panel.accordion._handleHeaderKeydown(t))}}focus(t,e){t?this._focusMonitor.focusVia(this._element,t,e):this._element.nativeElement.focus(e)}ngAfterViewInit(){this._focusMonitor.monitor(this._element).subscribe(t=>{t&&this.panel.accordion&&this.panel.accordion._handleHeaderFocus(this)})}ngOnDestroy(){this._parentChangeSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(ktt,1),r.Pb(r.l),r.Pb(qi),r.Pb(r.h),r.Pb(Stt,8),r.Pb(pa,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-expansion-panel-header"]],hostAttrs:["role","button",1,"mat-expansion-panel-header","mat-focus-indicator"],hostVars:15,hostBindings:function(t,e){1&t&&r.cc("click",function(){return e._toggle()})("keydown",function(t){return e._keydown(t)}),2&t&&(r.Eb("id",e.panel._headerId)("tabindex",e.disabled?-1:0)("aria-controls",e._getPanelId())("aria-expanded",e._isExpanded())("aria-disabled",e.panel.disabled),r.Fc("height",e._getHeaderHeight()),r.Hb("mat-expanded",e._isExpanded())("mat-expansion-toggle-indicator-after","after"===e._getTogglePosition())("mat-expansion-toggle-indicator-before","before"===e._getTogglePosition())("_mat-animation-noopable","NoopAnimations"===e._animationMode))},inputs:{expandedHeight:"expandedHeight",collapsedHeight:"collapsedHeight"},ngContentSelectors:_tt,decls:5,vars:1,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(t,e){1&t&&(r.mc(vtt),r.Vb(0,"span",0),r.lc(1),r.lc(2,1),r.lc(3,2),r.Ub(),r.Ic(4,btt,1,1,"span",1)),2&t&&(r.Db(4),r.nc("ngIf",e._showToggle()))},directives:[ut],styles:['.mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px;border-radius:inherit;transition:height 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel-header._mat-animation-noopable{transition:none}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:none}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before{flex-direction:row-reverse}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 16px 0 0}[dir=rtl] .mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 0 0 16px}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-expansion-panel-header-title,.mat-expansion-panel-header-description{display:flex;flex-grow:1;margin-right:16px}[dir=rtl] .mat-expansion-panel-header-title,[dir=rtl] .mat-expansion-panel-header-description{margin-right:0;margin-left:16px}.mat-expansion-panel-header-description{flex-grow:2}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:"";display:inline-block;padding:3px;transform:rotate(45deg);vertical-align:middle}.cdk-high-contrast-active .mat-expansion-panel .mat-expansion-panel-header.cdk-keyboard-focused:not([aria-disabled=true])::before,.cdk-high-contrast-active .mat-expansion-panel .mat-expansion-panel-header.cdk-program-focused:not([aria-disabled=true])::before,.cdk-high-contrast-active .mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:hover:not([aria-disabled=true])::before{top:0;left:0;right:0;bottom:0;position:absolute;box-sizing:border-box;pointer-events:none;border:3px solid;border-radius:4px;content:""}\n'],encapsulation:2,data:{animation:[wtt.indicatorRotate]},changeDetection:0}),t})(),Dtt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),t})(),Itt=(()=>{class t extends htt{constructor(){super(...arguments),this._ownHeaders=new r.F,this._hideToggle=!1,this.displayMode="default",this.togglePosition="after"}get hideToggle(){return this._hideToggle}set hideToggle(t){this._hideToggle=ti(t)}ngAfterContentInit(){this._headers.changes.pipe(Pn(this._headers)).subscribe(t=>{this._ownHeaders.reset(t.filter(t=>t.panel.accordion===this)),this._ownHeaders.notifyOnChanges()}),this._keyManager=new Ri(this._ownHeaders).withWrap().withHomeAndEnd()}_handleHeaderKeydown(t){this._keyManager.onKeydown(t)}_handleHeaderFocus(t){this._keyManager.updateActiveItem(t)}ngOnDestroy(){super.ngOnDestroy(),this._ownHeaders.destroy()}}return t.\u0275fac=function(e){return Ptt(e||t)},t.\u0275dir=r.Kb({type:t,selectors:[["mat-accordion"]],contentQueries:function(t,e,i){if(1&t&&r.Ib(i,Ett,1),2&t){let t;r.vc(t=r.dc())&&(e._headers=t)}},hostAttrs:[1,"mat-accordion"],hostVars:2,hostBindings:function(t,e){2&t&&r.Hb("mat-accordion-multi",e.multi)},inputs:{multi:"multi",displayMode:"displayMode",togglePosition:"togglePosition",hideToggle:"hideToggle"},exportAs:["matAccordion"],features:[r.Cb([{provide:ytt,useExisting:t}]),r.Ab]}),t})();const Ptt=r.Xb(Itt);let Ott=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Et,Sa,ptt,ve]]}),t})();const Mtt=function(t){return["/ships/",t]};function Ttt(t,e){if(1&t&&(r.Vb(0,"button",12),r.Vb(1,"mat-icon"),r.Kc(2,"info"),r.Ub(),r.Kc(3," Voir d\xe9tail Navire "),r.Ub()),2&t){const t=r.gc();r.nc("routerLink",r.sc(1,Mtt,t.event.data.mmsi))}}let Rtt=(()=>{class t extends LT{constructor(t,e,i,n,r,s,o){super(),this.domSanitizer=t,this.mapService=e,this.configService=i,this.historyService=n,this.interactionsService=r,this.mapConfigService=s,this.zonesService=o,this.highlight=!1,this.eventTypeLabelByKey=FP,this.EventType=UP}ngOnInit(){this.ensureMandatoryInputParams("event")}ngOnChanges(t){t.event&&(j3(this.event,this.zonesService.zonesById),this.additionalInfos=this.domSanitizer.bypassSecurityTrustHtml(this.event.additionalInfos))}locate(t){this.configService.devMode&&console.log("locate-event",JSON.stringify(t,null,2)),this.interactionsService.selectEventItem$.next(t)}locateAndZoom(t){this.mapService.locate([t.lon,t.lat])}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(ne),r.Pb(pI),r.Pb(cI),r.Pb(bI),r.Pb(ET),r.Pb(hI),r.Pb(kP))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-event-item"]],inputs:{event:"event",highlight:"highlight"},features:[r.Ab,r.Bb],decls:21,vars:16,consts:[[1,"event-item"],["mat-button","","title","Localiser l'\xe9v\xe9nement (double-clic = zoom)",1,"event-item__locate-button",3,"click","dblclick"],[1,"event-item__locate-button-content"],[1,"event-item__content"],[1,"event-item__title"],[1,"event-item__additional-infos",3,"innerHTML"],[1,"event-item__timestamp",3,"title"],["mat-button","","title","Actions",3,"matMenuTriggerFor"],[1,"event-item__actions-menu"],["eventActionsMenu","matMenu"],["mat-menu-item","","title","Ouvrir la fiche navire",3,"routerLink",4,"ngIf"],["mat-menu-item","","title","Visualiser la situation des navires",3,"click"],["mat-menu-item","","title","Ouvrir la fiche navire",3,"routerLink"]],template:function(t,e){if(1&t&&(r.Vb(0,"div",0),r.Vb(1,"button",1),r.cc("click",function(){return e.locate(e.event)})("dblclick",function(){return e.locateAndZoom(e.event)}),r.Vb(2,"div",2),r.Vb(3,"div",3),r.Vb(4,"div",4),r.Kc(5),r.Ub(),r.Qb(6,"div",5),r.Vb(7,"div",6),r.hc(8,"timeago"),r.Kc(9),r.hc(10,"date"),r.Ub(),r.Ub(),r.Ub(),r.Ub(),r.Vb(11,"button",7),r.Vb(12,"mat-icon"),r.Kc(13,"more_vert"),r.Ub(),r.Ub(),r.Vb(14,"mat-menu",8,9),r.Ic(16,Ttt,4,3,"button",10),r.Vb(17,"button",11),r.cc("click",function(){return e.historyService.setTimestamp(e.event.timestamp)}),r.Vb(18,"mat-icon"),r.Kc(19,"history"),r.Ub(),r.Kc(20," Visualiser la situation des navires "),r.Ub(),r.Ub(),r.Ub()),2&t){const t=r.wc(15);r.Fc("border-left-color",e.event.color),r.Hb("event-item--highlighted",e.highlight),r.Db(5),r.Mc(" ",e.eventTypeLabelByKey[e.event.type]||"Inconnu"," "),r.Db(1),r.nc("innerHTML",e.additionalInfos,r.Bc),r.Db(1),r.oc("title",r.ic(8,10,1e3*e.event.timestamp)),r.Db(2),r.Mc(" ",r.kc(10,12,1e3*e.event.timestamp,"yyyy-MM-dd HH:mm:ss z",e.mapConfigService.useUTCDates$.value&&"z")," "),r.Db(2),r.nc("matMenuTriggerFor",t),r.Db(5),r.nc("ngIf",e.event.type===e.EventType.MoveMeetingAtSea)}},directives:[Dl,sU,Yp,eU,ut,QL,ow],pipes:[Tx,kt],styles:[".event-item{display:flex;align-items:stretch;justify-content:stretch;transition:background-color 2s ease-out;min-height:82px;border-left:10px solid}.event-item--highlighted{background-color:#f32121;transition:0s}.event-item__locate-button{flex:1;font-weight:inherit!important;padding:0}.event-item__locate-button-content{display:flex;align-items:center}.event-item__icon{line-height:0;padding:1em}.event-item__content{flex:1;display:flex;flex-direction:column;align-items:flex-start;line-height:24px;padding:8px}.event-item__title{width:100%;display:flex;justify-content:space-between;align-items:center;font-size:1.1em;font-weight:600}.event-item__additional-infos{text-align:left;font-size:.9em;line-height:1.5em;font-weight:400;white-space:normal}.event-item__additional-infos b{color:#172db7}.event-item__timestamp{color:#424242;font-weight:500}.event-item__actions-menu{max-width:inherit}"],encapsulation:2,changeDetection:0}),t})();const Vtt=["eventElements"];function Ftt(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-list-item"),r.Vb(1,"mat-checkbox",10),r.cc("ngModelChange",function(){r.Ac(t);const i=e.$implicit;return r.gc().toggleEventFilter(i.key)}),r.Kc(2),r.Ub(),r.Ub()}if(2&t){const t=e.$implicit,i=r.gc();r.Db(1),r.Fc("color",t.textColor),r.nc("ngModel",i.eventsFilter[t.key]),r.Db(1),r.Lc(t.label)}}function Ltt(t,e){if(1&t&&r.Qb(0,"app-event-item",11,12),2&t){const t=e.$implicit,i=r.gc();r.nc("event",t)("highlight",t.id===i.highlightedEventId),r.Eb("data-id",t.id)}}function Utt(t,e){1&t&&(r.Vb(0,"div",13),r.Kc(1," Aucun \xe9v\xe9nement ne correspond aux filtres\n"),r.Ub())}function Btt(t,e){1&t&&(r.Vb(0,"div",13),r.Kc(1," Aucun \xe9v\xe9nement pour cette p\xe9riode\n"),r.Ub())}let Ntt=(()=>{class t extends LT{constructor(t,e,i,n){super(),this.changeDetectorRef=t,this.ngZone=e,this.configService=i,this.interactionsService=n,this.filteredEvents=[],this.displayedEvents=[],this.currentEventsPageIndex=0,this.eventsPageSize=30,this.highlightedEventId=null,this.eventTypes=VP,this.eventsFilter$=new Av.a(null),this.currentEventsPageIndex$=new Av.a(0),this.filteredEvents$=new Av.a([])}ngOnInit(){this.ensureMandatoryInputParams("events$"),this.configService.eventsFilter?this.eventsFilter$.next(this.configService.eventsFilter):this.resetEventsFilter(),this.subscriptions.push(this.events$.subscribe(t=>{this.events=t})),this.subscriptions.push(Hg([this.events$,this.eventsFilter$]).pipe(Object(Ge.a)(([t,e])=>{if(!t.length)return[];const i=Object.entries(e).filter(([,t])=>t).map(([t])=>t);return t.filter(t=>0===i.length||i.includes(`${t.type}`))})).subscribe(t=>{this.filteredEvents=t,this.filteredEvents$.next(t)})),this.subscriptions.push(Hg([this.filteredEvents$,this.currentEventsPageIndex$]).pipe(He(([t,e])=>{if(0===t.length&&0!==e)return this.showEventsPage(0),!1;const i=e*this.eventsPageSize;if(0===t.slice(i,i+this.eventsPageSize).length&&t.length>0){const e=Math.ceil(t.length/this.eventsPageSize)-1;return this.showEventsPage(-1===e?0:e),!1}return!0}),Object(Ge.a)(([t,e])=>{const i=e*this.eventsPageSize;return t.slice(i,i+this.eventsPageSize)})).subscribe(t=>{this.displayedEvents=t,this.changeDetectorRef.markForCheck()})),this.subscriptions.push(this.eventsFilter$.subscribe(t=>{this.eventsFilter=t,this.configService.set("eventsFilter",t),this.showEventsPage(0)})),this.subscriptions.push(this.interactionsService.selectEventFeature$.subscribe(t=>{const e=this.getPageIndexForEventId(t.id);-1!==e&&this.currentEventsPageIndex!==e&&this.showEventsPage(e),setTimeout(()=>{const e=this.eventElements.find(e=>e.nativeElement.dataset.id===t.id);e&&e.nativeElement.scrollIntoView({behavior:"smooth"})},225),this.highlightedEventId=t.id,this.ngZone.run(()=>{setTimeout(()=>{this.highlightedEventId=null,this.changeDetectorRef.markForCheck()},16),this.changeDetectorRef.markForCheck()})}))}get activeEventsFiltersCount(){const t=Object.values(this.eventsFilter).filter(t=>t).length;return t===VP.length?0:t}toggleEventFilter(t){this.eventsFilter[t]=!this.eventsFilter[t],this.eventsFilter$.next(this.eventsFilter),this.triggerEventsFilterUpdate()}updateEventRulesFilter(t){this.eventsFilter=t,this.triggerEventsFilterUpdate()}resetEventsFilter(){const t=VP.map(t=>t.label).reduce((t,[e])=>(t[e]=!1,t),{});this.updateEventRulesFilter(t)}triggerEventsFilterUpdate(){this.eventsFilter$.next(this.eventsFilter)}showEventsPage(t){this.currentEventsPageIndex$.next(t),this.currentEventsPageIndex=t}trackByIndex(t){return t}getPageIndexForEventId(t){const e=this.filteredEvents.findIndex(e=>e.id===t);if(-1===e)return-1;const i=Math.ceil((e+1)/this.eventsPageSize)-1;return-1===i?0:i}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(r.B),r.Pb(cI),r.Pb(ET))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-events-list"]],viewQuery:function(t,e){if(1&t&&r.Pc(Vtt,1,r.l),2&t){let t;r.vc(t=r.dc())&&(e.eventElements=t)}},inputs:{events$:"events$"},features:[r.Ab],decls:16,vars:11,consts:[["mat-button","","title","Filtrer les \xe9v\xe9nements",1,"events-list__filters",3,"color","matMenuTriggerFor"],[1,"u-wide-menu"],["eventsFilterMenu","matMenu"],[3,"click"],["mat-subheader",""],["mat-button","","title","R\xe9initialiser les filtres",1,"events-list__reset-filters-btn",3,"click"],[4,"ngFor","ngForOf"],[3,"event","highlight",4,"ngFor","ngForOf","ngForTrackBy"],["class","panel__content u-center",4,"ngIf"],["showFirstLastButtons","","hidePageSize","",3,"pageIndex","length","pageSize","page"],[3,"ngModel","ngModelChange"],[3,"event","highlight"],["eventElements",""],[1,"panel__content","u-center"]],template:function(t,e){if(1&t&&(r.Vb(0,"button",0),r.Vb(1,"mat-icon"),r.Kc(2,"filter_list"),r.Ub(),r.Kc(3),r.Ub(),r.Vb(4,"mat-menu",1,2),r.Vb(6,"mat-list",3),r.cc("click",function(t){return t.stopPropagation()}),r.Vb(7,"h3",4),r.Kc(8," Filtres d'\xe9v\xe9n\xe9ment "),r.Vb(9,"button",5),r.cc("click",function(){return e.resetEventsFilter()}),r.Kc(10," R\xe9initialiser "),r.Ub(),r.Ub(),r.Ic(11,Ftt,3,4,"mat-list-item",6),r.Ub(),r.Ub(),r.Ic(12,Ltt,2,3,"app-event-item",7),r.Ic(13,Utt,2,0,"div",8),r.Ic(14,Btt,2,0,"div",8),r.Vb(15,"mat-paginator",9),r.cc("page",function(t){return e.showEventsPage(t.pageIndex)}),r.Ub()),2&t){const t=r.wc(5);r.nc("color",e.activeEventsFiltersCount?"primary":"default")("matMenuTriggerFor",t),r.Db(3),r.Mc(" ",e.activeEventsFiltersCount>0?e.activeEventsFiltersCount+" filtre(s) d'\xe9v\xe9nement actif(s)":"Aucun filtre d'\xe9v\xe9nement actif","\n"),r.Db(8),r.nc("ngForOf",e.eventTypes),r.Db(1),r.nc("ngForOf",e.displayedEvents)("ngForTrackBy",e.trackByIndex),r.Db(1),r.nc("ngIf",!e.filteredEvents.length&&e.events.length),r.Db(1),r.nc("ngIf",!e.events.length),r.Db(1),r.nc("pageIndex",e.currentEventsPageIndex)("length",e.filteredEvents.length)("pageSize",e.eventsPageSize)}},directives:[Dl,sU,Yp,eU,yU,CU,ct,ut,yA,SU,tF,Vc,uh,Rtt],styles:[".events-list__filters[_ngcontent-%COMP%]{background-color:#e4e7ec;width:100%}.events-list__reset-filters-btn[_ngcontent-%COMP%]{margin-left:2em}"],changeDetection:0}),t})();const jtt=["button"],ztt=["*"],Htt=new r.s("MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS"),Ktt=new r.s("MatButtonToggleGroup"),$tt={provide:rc,useExisting:Object(r.W)(()=>Ztt),multi:!0};let Gtt=0;class Wtt{constructor(t,e){this.source=t,this.value=e}}let Ztt=(()=>{class t{constructor(t,e){this._changeDetector=t,this._vertical=!1,this._multiple=!1,this._disabled=!1,this._controlValueAccessorChangeFn=()=>{},this._onTouched=()=>{},this._name="mat-button-toggle-group-"+Gtt++,this.valueChange=new r.o,this.change=new r.o,this.appearance=e&&e.appearance?e.appearance:"standard"}get name(){return this._name}set name(t){this._name=t,this._buttonToggles&&this._buttonToggles.forEach(t=>{t.name=this._name,t._markForCheck()})}get vertical(){return this._vertical}set vertical(t){this._vertical=ti(t)}get value(){const t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t.map(t=>t.value):t[0]?t[0].value:void 0}set value(t){this._setSelectionByValue(t),this.valueChange.emit(this.value)}get selected(){const t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t:t[0]||null}get multiple(){return this._multiple}set multiple(t){this._multiple=ti(t)}get disabled(){return this._disabled}set disabled(t){this._disabled=ti(t),this._buttonToggles&&this._buttonToggles.forEach(t=>t._markForCheck())}ngOnInit(){this._selectionModel=new Xn(this.multiple,void 0,!1)}ngAfterContentInit(){this._selectionModel.select(...this._buttonToggles.filter(t=>t.checked))}writeValue(t){this.value=t,this._changeDetector.markForCheck()}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t}_emitChangeEvent(){const t=this.selected,e=Array.isArray(t)?t[t.length-1]:t,i=new Wtt(e,this.value);this._controlValueAccessorChangeFn(i.value),this.change.emit(i)}_syncButtonToggle(t,e,i=!1,n=!1){this.multiple||!this.selected||t.checked||(this.selected.checked=!1),this._selectionModel?e?this._selectionModel.select(t):this._selectionModel.deselect(t):n=!0,n?Promise.resolve().then(()=>this._updateModelValue(i)):this._updateModelValue(i)}_isSelected(t){return this._selectionModel&&this._selectionModel.isSelected(t)}_isPrechecked(t){return void 0!==this._rawValue&&(this.multiple&&Array.isArray(this._rawValue)?this._rawValue.some(e=>null!=t.value&&e===t.value):t.value===this._rawValue)}_setSelectionByValue(t){this._rawValue=t,this._buttonToggles&&(this.multiple&&t?(Array.isArray(t),this._clearSelection(),t.forEach(t=>this._selectValue(t))):(this._clearSelection(),this._selectValue(t)))}_clearSelection(){this._selectionModel.clear(),this._buttonToggles.forEach(t=>t.checked=!1)}_selectValue(t){const e=this._buttonToggles.find(e=>null!=e.value&&e.value===t);e&&(e.checked=!0,this._selectionModel.select(e))}_updateModelValue(t){t&&this._emitChangeEvent(),this.valueChange.emit(this.value)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(Htt,8))},t.\u0275dir=r.Kb({type:t,selectors:[["mat-button-toggle-group"]],contentQueries:function(t,e,i){if(1&t&&r.Ib(i,Qtt,1),2&t){let t;r.vc(t=r.dc())&&(e._buttonToggles=t)}},hostAttrs:["role","group",1,"mat-button-toggle-group"],hostVars:5,hostBindings:function(t,e){2&t&&(r.Eb("aria-disabled",e.disabled),r.Hb("mat-button-toggle-vertical",e.vertical)("mat-button-toggle-group-appearance-standard","standard"===e.appearance))},inputs:{appearance:"appearance",name:"name",vertical:"vertical",value:"value",multiple:"multiple",disabled:"disabled"},outputs:{valueChange:"valueChange",change:"change"},exportAs:["matButtonToggleGroup"],features:[r.Cb([$tt,{provide:Ktt,useExisting:t}])]}),t})();class qtt{}const Ytt=Da(qtt);let Qtt=(()=>{class t extends Ytt{constructor(t,e,i,n,s,o){super(),this._changeDetectorRef=e,this._elementRef=i,this._focusMonitor=n,this._isSingleSelector=!1,this._checked=!1,this.ariaLabelledby=null,this._disabled=!1,this.change=new r.o;const a=Number(s);this.tabIndex=a||0===a?a:null,this.buttonToggleGroup=t,this.appearance=o&&o.appearance?o.appearance:"standard"}get buttonId(){return`${this.id}-button`}get appearance(){return this.buttonToggleGroup?this.buttonToggleGroup.appearance:this._appearance}set appearance(t){this._appearance=t}get checked(){return this.buttonToggleGroup?this.buttonToggleGroup._isSelected(this):this._checked}set checked(t){const e=ti(t);e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&this.buttonToggleGroup._syncButtonToggle(this,this._checked),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled}set disabled(t){this._disabled=ti(t)}ngOnInit(){const t=this.buttonToggleGroup;this._isSingleSelector=t&&!t.multiple,this.id=this.id||"mat-button-toggle-"+Gtt++,this._isSingleSelector&&(this.name=t.name),t&&(t._isPrechecked(this)?this.checked=!0:t._isSelected(this)!==this._checked&&t._syncButtonToggle(this,this._checked))}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){const t=this.buttonToggleGroup;this._focusMonitor.stopMonitoring(this._elementRef),t&&t._isSelected(this)&&t._syncButtonToggle(this,!1,!1,!0)}focus(t){this._buttonElement.nativeElement.focus(t)}_onButtonClick(){const t=!!this._isSingleSelector||!this._checked;t!==this._checked&&(this._checked=t,this.buttonToggleGroup&&(this.buttonToggleGroup._syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup._onTouched())),this.change.emit(new Wtt(this,this.value))}_markForCheck(){this._changeDetectorRef.markForCheck()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Ktt,8),r.Pb(r.h),r.Pb(r.l),r.Pb(qi),r.ac("tabindex"),r.Pb(Htt,8))},t.\u0275cmp=r.Jb({type:t,selectors:[["mat-button-toggle"]],viewQuery:function(t,e){if(1&t&&r.Pc(jtt,1),2&t){let t;r.vc(t=r.dc())&&(e._buttonElement=t.first)}},hostAttrs:["role","presentation",1,"mat-button-toggle"],hostVars:12,hostBindings:function(t,e){1&t&&r.cc("focus",function(){return e.focus()}),2&t&&(r.Eb("aria-label",null)("aria-labelledby",null)("id",e.id)("name",null),r.Hb("mat-button-toggle-standalone",!e.buttonToggleGroup)("mat-button-toggle-checked",e.checked)("mat-button-toggle-disabled",e.disabled)("mat-button-toggle-appearance-standard","standard"===e.appearance))},inputs:{disableRipple:"disableRipple",ariaLabelledby:["aria-labelledby","ariaLabelledby"],tabIndex:"tabIndex",appearance:"appearance",checked:"checked",disabled:"disabled",id:"id",name:"name",ariaLabel:["aria-label","ariaLabel"],value:"value"},outputs:{change:"change"},exportAs:["matButtonToggle"],features:[r.Ab],ngContentSelectors:ztt,decls:6,vars:9,consts:[["type","button",1,"mat-button-toggle-button","mat-focus-indicator",3,"id","disabled","click"],["button",""],[1,"mat-button-toggle-label-content"],[1,"mat-button-toggle-focus-overlay"],["matRipple","",1,"mat-button-toggle-ripple",3,"matRippleTrigger","matRippleDisabled"]],template:function(t,e){if(1&t&&(r.mc(),r.Vb(0,"button",0,1),r.cc("click",function(){return e._onButtonClick()}),r.Vb(2,"span",2),r.lc(3),r.Ub(),r.Ub(),r.Qb(4,"span",3),r.Qb(5,"span",4)),2&t){const t=r.wc(1);r.nc("id",e.buttonId)("disabled",e.disabled||null),r.Eb("tabindex",e.disabled?-1:e.tabIndex)("aria-pressed",e.checked)("name",e.name||null)("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby),r.Db(5),r.nc("matRippleTrigger",t)("matRippleDisabled",e.disableRipple||e.disabled)}},directives:[il],styles:[".mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;border-radius:2px;-webkit-tap-highlight-color:transparent}.cdk-high-contrast-active .mat-button-toggle-standalone,.cdk-high-contrast-active .mat-button-toggle-group{outline:solid 1px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:4px}.cdk-high-contrast-active .mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.cdk-high-contrast-active .mat-button-toggle-group-appearance-standard{outline:0}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:1}.cdk-high-contrast-active .mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:.5}.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{opacity:.04}.mat-button-toggle-appearance-standard.cdk-keyboard-focused:not(.mat-button-toggle-disabled) .mat-button-toggle-focus-overlay{opacity:.12}.cdk-high-contrast-active .mat-button-toggle-appearance-standard.cdk-keyboard-focused:not(.mat-button-toggle-disabled) .mat-button-toggle-focus-overlay{opacity:.5}@media(hover: none){.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-block;line-height:36px;padding:0 16px;position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{border-radius:inherit;pointer-events:none;opacity:0;top:0;left:0;right:0;bottom:0;position:absolute}.mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 36px}.cdk-high-contrast-active .mat-button-toggle-checked .mat-button-toggle-focus-overlay{opacity:.5;height:0}.cdk-high-contrast-active .mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}\n"],encapsulation:2,changeDetection:0}),t})(),Xtt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Sa,nl],Sa]}),t})(),Jtt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-vertical-arrow"]],decls:3,vars:0,consts:[[1,"head"],[1,"shaft"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Kc(1,"\xa0"),r.Ub(),r.Qb(2,"div",1))},styles:["[_nghost-%COMP%]{margin:6px;width:20px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-direction:column;align-items:center}.head[_ngcontent-%COMP%]{height:16px;width:16px;border-bottom:4px solid;transform:rotate(-135deg)}.head[_ngcontent-%COMP%], .shaft[_ngcontent-%COMP%]{border-right:4px solid;color:#595959}.shaft[_ngcontent-%COMP%]{height:100%;margin-top:-16px}"],changeDetection:0}),t})();function tet(t,e){if(1&t&&(r.Vb(0,"div",6),r.hc(1,"timeago"),r.Kc(2),r.hc(3,"date"),r.Ub()),2&t){const t=r.gc();r.pc("title","Heure de d\xe9part : ",r.ic(1,2,1e3*t.portCall.stop),""),r.Db(2),r.Mc(" ",r.kc(3,4,1e3*t.portCall.stop,"yyyy-MM-dd HH:mm:ss z",t.mapConfigService.useUTCDates$.value&&"z")," ")}}function eet(t,e){if(1&t&&(r.Vb(0,"div",7),r.Vb(1,"mat-icon",8),r.Kc(2,"timelapse"),r.Ub(),r.Kc(3),r.Ub()),2&t){const t=r.gc();r.Db(3),r.Mc("",t.portCall.duration," ")}}let iet=(()=>{class t extends LT{constructor(t,e,i){super(),this.configService=t,this.mapConfigService=e,this.mapService=i}ngOnInit(){this.ensureMandatoryInputParams("portCall")}locate(){this.configService.devMode&&console.log("locate-port",JSON.stringify(this.portCall,null,2)),this.mapService.pingLocation([this.portCall.lon,this.portCall.lat]),this.mapService.centerOnLonLat([this.portCall.lon,this.portCall.lat])}locateAndZoom(){}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(cI),r.Pb(hI),r.Pb(pI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-portcall-item"]],inputs:{portCall:"portCall"},features:[r.Ab],decls:13,vars:13,consts:[[1,"portcall-item"],["class","portcall-item__timestamp",3,"title",4,"ngIf"],[1,"d-flex"],["mat-button","",1,"portcall-item__port",3,"title","click"],["svgIcon","anchor",1,"portcall-item__port-icon"],["class","portcall-item__duration","title","Dur\xe9e de l'escale",4,"ngIf"],[1,"portcall-item__timestamp",3,"title"],["title","Dur\xe9e de l'escale",1,"portcall-item__duration"],[1,"mr-1","mini-icon"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Ic(1,tet,4,8,"div",1),r.Vb(2,"div",2),r.Qb(3,"app-vertical-arrow"),r.Vb(4,"div"),r.Vb(5,"button",3),r.cc("click",function(){return e.locate()}),r.Qb(6,"mat-icon",4),r.Kc(7),r.Ub(),r.Ic(8,eet,4,1,"div",5),r.Ub(),r.Ub(),r.Vb(9,"div",6),r.hc(10,"timeago"),r.Kc(11),r.hc(12,"date"),r.Ub(),r.Ub()),2&t&&(r.Db(1),r.nc("ngIf",e.portCall.stop),r.Db(4),r.nc("title","Destination annonc\xe9e \xe0 l'arriv\xe9e: "+e.portCall.destination+". Cliquer pour localiser."),r.Db(2),r.Nc(" ",e.portCall.label," (",e.portCall.iso3,") "),r.Db(1),r.nc("ngIf",e.portCall.duration),r.Db(1),r.pc("title","Heure d'arriv\xe9e : ",r.ic(10,7,1e3*e.portCall.start),""),r.Db(2),r.Mc(" ",r.kc(12,9,1e3*e.portCall.start,"yyyy-MM-dd HH:mm:ss z",e.mapConfigService.useUTCDates$.value&&"z")," "))},directives:[ut,Jtt,Dl,Yp],pipes:[Tx,kt],styles:[".portcall-item[_ngcontent-%COMP%]{font-size:12px;padding:.5em}.portcall-item[_ngcontent-%COMP%]:hover{background-color:#efefef}.portcall-item__port-icon[_ngcontent-%COMP%]{width:16px}.portcall-item__port[_ngcontent-%COMP%]{font-weight:500;padding:0 8px!important}.portcall-item__duration[_ngcontent-%COMP%]{display:flex;align-items:center;margin:4px 0 4px 8px;line-height:1}.portcall-item__timestamp[_ngcontent-%COMP%]{color:#595959;padding:2px}"],changeDetection:0}),t})();function net(t,e){1&t&&r.Qb(0,"app-portcall-item",3),2&t&&r.nc("portCall",e.$implicit)}function ret(t,e){1&t&&(r.Vb(0,"div",4),r.Kc(1," Aucune escale\n"),r.Ub())}let set=(()=>{class t extends LT{constructor(t){super(),this.changeDetectorRef=t,this.portCallsCount=0,this.displayedPortCalls=[],this.currentPageIndex=0,this.pageSize=20,this.currentPageIndex$=new Av.a(0)}ngOnInit(){this.ensureMandatoryInputParams("portCalls$"),this.subscriptions.push(Hg([this.portCalls$,this.currentPageIndex$]).pipe(Pe(([t])=>{this.portCallsCount=t.length}),He(([t,e])=>{if(0===t.length&&0!==e)return this.showPage(0),!1;const i=e*this.pageSize;if(0===t.slice(i,i+this.pageSize).length&&t.length>0){const e=Math.ceil(t.length/this.pageSize)-1;return this.showPage(-1===e?0:e),!1}return!0}),Object(Ge.a)(([t,e])=>{const i=e*this.pageSize;return t.slice(i,i+this.pageSize)})).subscribe(t=>{this.displayedPortCalls=t,this.changeDetectorRef.markForCheck()}))}showPage(t){this.currentPageIndex$.next(t),this.currentPageIndex=t}trackByIndex(t){return t}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-portcalls-list"]],inputs:{portCalls$:"portCalls$"},features:[r.Ab],decls:3,vars:5,consts:[[3,"portCall",4,"ngFor","ngForOf"],["class","panel__content u-center",4,"ngIf"],["showFirstLastButtons","","hidePageSize","",3,"pageIndex","length","pageSize","page"],[3,"portCall"],[1,"panel__content","u-center"]],template:function(t,e){1&t&&(r.Ic(0,net,1,1,"app-portcall-item",0),r.Ic(1,ret,2,0,"div",1),r.Vb(2,"mat-paginator",2),r.cc("page",function(t){return e.showPage(t.pageIndex)}),r.Ub()),2&t&&(r.nc("ngForOf",e.displayedPortCalls),r.Db(1),r.nc("ngIf",!e.displayedPortCalls.length),r.Db(1),r.nc("pageIndex",e.currentPageIndex)("length",e.portCallsCount)("pageSize",e.pageSize))},directives:[ct,ut,yA,iet],styles:[""],changeDetection:0}),t})();function oet(t,e){if(1&t&&(r.Vb(0,"div",9),r.hc(1,"timeago"),r.Kc(2),r.hc(3,"date"),r.Ub()),2&t){const t=r.gc();r.pc("title","Heure d'arriv\xe9e : ",r.ic(1,2,1e3*t.voyage.destination.timestamp),""),r.Db(2),r.Mc(" ",r.kc(3,4,1e3*t.voyage.destination.timestamp,"yyyy-MM-dd HH:mm:ss z",t.mapConfigService.useUTCDates$.value&&"z")," ")}}function aet(t,e){if(1&t&&(r.Vb(0,"div",10),r.Vb(1,"strong",11),r.Kc(2),r.Ub(),r.Kc(3," voyages "),r.Ub()),2&t){const t=r.gc();r.Db(2),r.Lc(t.voyage.voyages.length)}}let cet=(()=>{class t extends LT{constructor(t,e,i){super(),this.configService=t,this.mapConfigService=e,this.mapService=i}ngOnInit(){this.ensureMandatoryInputParams("voyage")}locate(t){this.configService.devMode&&console.log("locate-port",JSON.stringify(t,null,2)),this.mapService.pingLocation([t.lon,t.lat]),this.mapService.centerOnLonLat([t.lon,t.lat])}locateAndZoom(){}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(cI),r.Pb(hI),r.Pb(pI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-voyage-item"]],inputs:{voyage:"voyage"},features:[r.Ab],decls:20,vars:15,consts:[[1,"voyage-item"],["class","voyage-item__timestamp",3,"title",4,"ngIf"],[1,"d-flex"],["mat-button","","title","Port de destination. Cliquer pour localiser",1,"voyage-item__port",3,"click"],["svgIcon","anchor",1,"voyage-item__port-icon"],["title","Dur\xe9e du voyage",1,"voyage-item__duration"],[1,"mr-1","mini-icon"],["class","voyage-item__duration","title","Nombre de voyages du voyage",4,"ngIf"],["mat-button","","title","Port d'origine. Cliquer pour localiser",1,"voyage-item__port",3,"click"],[1,"voyage-item__timestamp",3,"title"],["title","Nombre de voyages du voyage",1,"voyage-item__duration"],[1,"mx-1"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Ic(1,oet,4,8,"div",1),r.Vb(2,"div",2),r.Qb(3,"app-vertical-arrow"),r.Vb(4,"div"),r.Vb(5,"button",3),r.cc("click",function(){return e.locate(e.voyage.destination.port)}),r.Qb(6,"mat-icon",4),r.Kc(7),r.Ub(),r.Vb(8,"div",5),r.Vb(9,"mat-icon",6),r.Kc(10,"timelapse"),r.Ub(),r.Kc(11),r.Ub(),r.Ic(12,aet,4,1,"div",7),r.Vb(13,"button",8),r.cc("click",function(){return e.locate(e.voyage.origin.port)}),r.Qb(14,"mat-icon",4),r.Kc(15),r.Ub(),r.Ub(),r.Ub(),r.Vb(16,"div",9),r.hc(17,"timeago"),r.Kc(18),r.hc(19,"date"),r.Ub(),r.Ub()),2&t&&(r.Db(1),r.nc("ngIf",e.voyage.destination.port),r.Db(6),r.Nc(" ",e.voyage.destination.port.label," (",e.voyage.destination.port.iso3,") "),r.Db(4),r.Mc("",e.voyage.duration," "),r.Db(1),r.nc("ngIf",e.voyage.voyages),r.Db(3),r.Nc(" ",e.voyage.origin.port.label," (",e.voyage.origin.port.iso3,") "),r.Db(1),r.pc("title","Heure de d\xe9part : ",r.ic(17,9,1e3*e.voyage.origin.timestamp),""),r.Db(2),r.Mc(" ",r.kc(19,11,1e3*e.voyage.origin.timestamp,"yyyy-MM-dd HH:mm:ss z",e.mapConfigService.useUTCDates$.value&&"z")," "))},directives:[ut,Jtt,Dl,Yp],pipes:[Tx,kt],styles:[".voyage-item[_ngcontent-%COMP%]{font-size:12px;padding:.5em}.voyage-item[_ngcontent-%COMP%]:hover{background-color:#efefef}.voyage-item__port-icon[_ngcontent-%COMP%]{width:16px}.voyage-item__port[_ngcontent-%COMP%]{font-weight:500;padding:0 8px!important}.voyage-item__duration[_ngcontent-%COMP%]{display:flex;align-items:center;margin:4px 0 4px 8px;line-height:1}.voyage-item__timestamp[_ngcontent-%COMP%]{color:#595959;padding:2px}"],changeDetection:0}),t})();function het(t,e){1&t&&r.Qb(0,"app-voyage-item",3),2&t&&r.nc("voyage",e.$implicit)}function uet(t,e){1&t&&(r.Vb(0,"div",4),r.Kc(1," Aucun voyage\n"),r.Ub())}let det=(()=>{class t extends LT{constructor(t){super(),this.changeDetectorRef=t,this.voyagesCount=0,this.displayedVoyages=[],this.currentPageIndex=0,this.pageSize=20,this.currentPageIndex$=new Av.a(0)}ngOnInit(){this.ensureMandatoryInputParams("voyages$"),this.subscriptions.push(Hg([this.voyages$,this.currentPageIndex$]).pipe(Pe(([t])=>{this.voyagesCount=t.length}),He(([t,e])=>{if(0===t.length&&0!==e)return this.showPage(0),!1;const i=e*this.pageSize;if(0===t.slice(i,i+this.pageSize).length&&t.length>0){const e=Math.ceil(t.length/this.pageSize)-1;return this.showPage(-1===e?0:e),!1}return!0}),Object(Ge.a)(([t,e])=>{const i=e*this.pageSize;return t.slice(i,i+this.pageSize)})).subscribe(t=>{this.displayedVoyages=t,this.changeDetectorRef.markForCheck()}))}showPage(t){this.currentPageIndex$.next(t),this.currentPageIndex=t}trackByIndex(t){return t}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-voyages-list"]],inputs:{voyages$:"voyages$"},features:[r.Ab],decls:3,vars:5,consts:[[3,"voyage",4,"ngFor","ngForOf"],["class","panel__content u-center",4,"ngIf"],["showFirstLastButtons","","hidePageSize","",3,"pageIndex","length","pageSize","page"],[3,"voyage"],[1,"panel__content","u-center"]],template:function(t,e){1&t&&(r.Ic(0,het,1,1,"app-voyage-item",0),r.Ic(1,uet,2,0,"div",1),r.Vb(2,"mat-paginator",2),r.cc("page",function(t){return e.showPage(t.pageIndex)}),r.Ub()),2&t&&(r.nc("ngForOf",e.displayedVoyages),r.Db(1),r.nc("ngIf",!e.displayedVoyages.length),r.Db(1),r.nc("pageIndex",e.currentPageIndex)("length",e.voyagesCount)("pageSize",e.pageSize))},directives:[ct,ut,yA,cet],styles:[""],changeDetection:0}),t})();const pet=["events"];function fet(t,e){1&t&&r.Qb(0,"div",3)}function met(t,e){if(1&t&&r.Kc(0),2&t){const t=r.gc(2);r.Mc("(",null==t.ship.lloydsInfos?null:t.ship.lloydsInfos.generaltype,")")}}function get(t,e){if(1&t&&(r.Vb(0,"img",39),r.cc("load",function(t){return t.target.style.display="block"})("error",function(t){return t.target.remove()}),r.Ub()),2&t){const t=r.gc(2);r.nc("src",t.photoURL,r.Dc)}}function Aet(t,e){if(1&t&&(r.Vb(0,"a",40),r.Qb(1,"img",41),r.Ub()),2&t){const t=r.gc(2);r.pc("href","https://www.seasearcher.com/vessels/?term=",t.ship.imo,"",r.Dc)}}function bet(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",44),r.cc("click",function(){return r.Ac(t),r.gc(3).showMarineTrafficDeparture=!0}),r.Kc(1,"Provenance Marine Traffic"),r.Ub()}}function vet(t,e){if(1&t&&(r.Vb(0,"div",45),r.Qb(1,"iframe",46),r.Ub()),2&t){const t=r.gc(3);r.Db(1),r.nc("src",t.marineTrafficUrl,r.Cc)}}function _et(t,e){if(1&t&&(r.Qb(0,"mat-divider"),r.Ic(1,bet,2,0,"button",42),r.Ic(2,vet,2,1,"div",43)),2&t){const t=r.gc(2);r.Db(1),r.nc("ngIf",!t.showMarineTrafficDeparture),r.Db(1),r.nc("ngIf",t.showMarineTrafficDeparture)}}function yet(t,e){1&t&&(r.Vb(0,"div",47),r.Kc(1," Aucune information Lloyd's "),r.Ub())}function wet(t,e){if(1&t&&(r.Vb(0,"div",48),r.Vb(1,"div",5),r.Vb(2,"div",49),r.Vb(3,"div",50),r.Kc(4,"Cat\xe9gorie"),r.Ub(),r.Vb(5,"div",51),r.Kc(6),r.Ub(),r.Ub(),r.Vb(7,"div",52),r.Vb(8,"div",50),r.Kc(9,"Type"),r.Ub(),r.Vb(10,"div",51),r.Kc(11),r.Ub(),r.Ub(),r.Ub(),r.Vb(12,"div",5),r.Vb(13,"div",53),r.Vb(14,"div",49),r.Vb(15,"span",54),r.Kc(16,"Tonnage :"),r.Ub(),r.Vb(17,"span",51),r.Kc(18),r.Ub(),r.Ub(),r.Vb(19,"div",49),r.Vb(20,"span",54),r.Kc(21,"Port en lourd :"),r.Ub(),r.Vb(22,"span",51),r.Kc(23),r.Ub(),r.Ub(),r.Vb(24,"div",49),r.Vb(25,"span",55),r.Kc(26,"Capacit\xe9 :"),r.Ub(),r.Vb(27,"span",51),r.Kc(28),r.Ub(),r.Ub(),r.Ub(),r.Vb(29,"div",56),r.Vb(30,"div",50),r.Kc(31,"Longueur"),r.Ub(),r.Vb(32,"div",51),r.Kc(33),r.Ub(),r.Vb(34,"div",51),r.Kc(35),r.Ub(),r.Ub(),r.Ub(),r.Vb(36,"div",5),r.Vb(37,"div",52),r.Vb(38,"div",50),r.Kc(39,"Soci\xe9t\xe9 de classification"),r.Ub(),r.Vb(40,"div",51),r.Kc(41),r.Ub(),r.Ub(),r.Vb(42,"div",49),r.Vb(43,"div",50),r.Kc(44,"Mise en service"),r.Ub(),r.Vb(45,"div",51),r.Kc(46),r.Ub(),r.Ub(),r.Ub(),r.Vb(47,"div",57),r.Vb(48,"div",58),r.Vb(49,"div",50),r.Kc(50,"Registered owner"),r.Ub(),r.Vb(51,"div",51),r.Kc(52),r.Ub(),r.Ub(),r.Vb(53,"div",59),r.Vb(54,"div"),r.Vb(55,"span",54),r.Kc(56,"All\xe9geance :"),r.Ub(),r.Vb(57,"span",51),r.Kc(58),r.Ub(),r.Ub(),r.Vb(59,"div"),r.Vb(60,"span",54),r.Kc(61,"Si\xe8ge social :"),r.Ub(),r.Vb(62,"span",51),r.Kc(63),r.Ub(),r.Ub(),r.Ub(),r.Ub(),r.Vb(64,"div",57),r.Vb(65,"div",58),r.Vb(66,"div",50),r.Kc(67,"Beneficial owner"),r.Ub(),r.Vb(68,"div",51),r.Kc(69),r.Ub(),r.Ub(),r.Vb(70,"div",59),r.Vb(71,"div"),r.Vb(72,"span",54),r.Kc(73,"All\xe9geance :"),r.Ub(),r.Vb(74,"span",51),r.Kc(75),r.Ub(),r.Ub(),r.Vb(76,"div"),r.Vb(77,"span",54),r.Kc(78,"Si\xe8ge social :"),r.Ub(),r.Vb(79,"span",51),r.Kc(80),r.Ub(),r.Ub(),r.Ub(),r.Ub(),r.Vb(81,"div",57),r.Vb(82,"div",58),r.Vb(83,"div",50),r.Kc(84,"Commercial operator"),r.Ub(),r.Vb(85,"div",51),r.Kc(86),r.Ub(),r.Ub(),r.Vb(87,"div",59),r.Vb(88,"div"),r.Vb(89,"span",54),r.Kc(90,"All\xe9geance :"),r.Ub(),r.Vb(91,"span",51),r.Kc(92),r.Ub(),r.Ub(),r.Vb(93,"div"),r.Vb(94,"span",54),r.Kc(95,"Si\xe8ge social :"),r.Ub(),r.Vb(96,"span",51),r.Kc(97),r.Ub(),r.Ub(),r.Ub(),r.Ub(),r.Vb(98,"div",57),r.Vb(99,"div",58),r.Vb(100,"div",50),r.Kc(101,"Third party operator"),r.Ub(),r.Vb(102,"div",51),r.Kc(103),r.Ub(),r.Ub(),r.Vb(104,"div",59),r.Vb(105,"div"),r.Vb(106,"span",54),r.Kc(107,"All\xe9geance :"),r.Ub(),r.Vb(108,"span",51),r.Kc(109),r.Ub(),r.Ub(),r.Vb(110,"div"),r.Vb(111,"span",54),r.Kc(112,"Si\xe8ge social :"),r.Ub(),r.Vb(113,"span",51),r.Kc(114),r.Ub(),r.Ub(),r.Ub(),r.Ub(),r.Vb(115,"div",57),r.Vb(116,"div",58),r.Vb(117,"div",50),r.Kc(118,"Technical manager"),r.Ub(),r.Vb(119,"div",51),r.Kc(120),r.Ub(),r.Ub(),r.Vb(121,"div",59),r.Vb(122,"div"),r.Vb(123,"span",54),r.Kc(124,"All\xe9geance :"),r.Ub(),r.Vb(125,"span",51),r.Kc(126),r.Ub(),r.Ub(),r.Vb(127,"div"),r.Vb(128,"span",54),r.Kc(129,"Si\xe8ge social :"),r.Ub(),r.Vb(130,"span",51),r.Kc(131),r.Ub(),r.Ub(),r.Ub(),r.Ub(),r.Ub()),2&t){const t=r.gc(2);r.Db(6),r.Lc(t.ship.lloydsInfos.category||"?"),r.Db(5),r.Lc(t.ship.lloydsInfos.generaltype||"?"),r.Db(7),r.Lc(t.ship.lloydsInfos.gross?t.ship.lloydsInfos.gross:"?"),r.Db(5),r.Lc(t.ship.lloydsInfos.dwt?t.ship.lloydsInfos.dwt+" tpl":"?"),r.Db(5),r.Lc(t.ship.lloydsInfos.teu?t.ship.lloydsInfos.teu+" EVP":"?"),r.Db(5),r.Mc("",t.ship.lloydsInfos.loa?t.ship.lloydsInfos.loa+" m":"?"," (hors-tout)"),r.Db(2),r.Mc("",t.ship.lloydsInfos.lbp?t.ship.lloydsInfos.lbp+" m":"?"," (flottaison)"),r.Db(6),r.Lc(t.ship.lloydsInfos.vesselclasssocietyname||"?"),r.Db(5),r.Lc(t.ship.lloydsInfos.yearofbuild||"?"),r.Db(6),r.Lc(t.ship.lloydsInfos.registeredownerid||"?"),r.Db(6),r.Lc(t.ship.lloydsInfos.registeredownerallegiancecountry||"?"),r.Db(5),r.Lc(t.ship.lloydsInfos.registeredownerheadofficecountry||"?"),r.Db(6),r.Lc(t.ship.lloydsInfos.beneficialownerid||"?"),r.Db(6),r.Lc(t.ship.lloydsInfos.beneficialownerallegiancecountry||"?"),r.Db(5),r.Lc(t.ship.lloydsInfos.beneficialownerheadofficecountry||"?"),r.Db(6),r.Lc(t.ship.lloydsInfos.commercialoperatorid||"?"),r.Db(6),r.Lc(t.ship.lloydsInfos.commercialoperatorallegiancecountry||"?"),r.Db(5),r.Lc(t.ship.lloydsInfos.commercialoperatorheadofficecountry||"?"),r.Db(6),r.Lc(t.ship.lloydsInfos.thirdpartoperatorid||"?"),r.Db(6),r.Lc(t.ship.lloydsInfos.thirdpartoperatorallegiancecountry||"?"),r.Db(5),r.Lc(t.ship.lloydsInfos.thirdpartoperatorheadofficecountry||"?"),r.Db(6),r.Lc(t.ship.lloydsInfos.technicalmanagerid||"?"),r.Db(6),r.Lc(t.ship.lloydsInfos.technicalmanagerallegiancecountry||"?"),r.Db(5),r.Lc(t.ship.lloydsInfos.technicalmanagerheadofficecountry||"?")}}function xet(t,e){if(1&t&&(r.Vb(0,"mat-button-toggle",65),r.Kc(1),r.Ub()),2&t){const t=e.$implicit;r.nc("value",t.key),r.Db(1),r.Lc(t.label)}}function Cet(t,e){if(1&t&&r.Qb(0,"app-portcalls-list",66),2&t){const t=r.gc(3);r.nc("portCalls$",t.portCalls$)}}function ket(t,e){if(1&t&&r.Qb(0,"app-voyages-list",67),2&t){const t=r.gc(3);r.nc("voyages$",t.voyages$)}}function Eet(t,e){if(1&t&&r.Qb(0,"app-voyages-list",67),2&t){const t=r.gc(3);r.nc("voyages$",t.voyageGroups$)}}function Det(t,e){if(1&t){const t=r.Wb();r.Vb(0,"mat-expansion-panel",32),r.Vb(1,"mat-expansion-panel-header",28),r.Vb(2,"mat-panel-title"),r.Kc(3,"Derni\xe8res escales (1 mois)"),r.Ub(),r.Ub(),r.Vb(4,"mat-button-toggle-group",60),r.cc("ngModelChange",function(e){return r.Ac(t),r.gc(2).portsOfCallDisplayMode=e})("ngModelChange",function(e){return r.Ac(t),r.gc(2).updatePortsOfCallDisplayMode(e)}),r.Ic(5,xet,2,2,"mat-button-toggle",61),r.Ub(),r.Tb(6,62),r.Ic(7,Cet,1,1,"app-portcalls-list",63),r.Ic(8,ket,1,1,"app-voyages-list",64),r.Ic(9,Eet,1,1,"app-voyages-list",64),r.Sb(),r.Ub()}if(2&t){const t=r.gc(2);r.nc("expanded",t.logbookPanelExpanded),r.Db(4),r.nc("ngModel",t.portsOfCallDisplayMode),r.Db(1),r.nc("ngForOf",t.portsOfCallDisplayModes),r.Db(1),r.nc("ngSwitch",t.portsOfCallDisplayMode),r.Db(1),r.nc("ngSwitchCase","portsOfCall"),r.Db(1),r.nc("ngSwitchCase","voyages"),r.Db(1),r.nc("ngSwitchCase","voyageGroups")}}function Iet(t,e){if(1&t&&(r.Vb(0,"span",68),r.Kc(1),r.Ub()),2&t){const t=r.gc(2);r.nc("title",t.getUnreadAlertsCount()+" nouvelle(s) alerte(s)"),r.Db(1),r.Mc(" ",t.getUnreadAlertsCount()," ")}}function Pet(t,e){if(1&t&&(r.Vb(0,"span"),r.Kc(1),r.Ub()),2&t){const t=e.alert;r.Db(1),r.Lc(t.rule_name)}}const Oet=function(t){return["/alerts/rules/",t]};function Met(t,e){1&t&&(r.Vb(0,"button",69),r.Vb(1,"mat-icon"),r.Kc(2,"info"),r.Ub(),r.Kc(3," Voir la r\xe8gle "),r.Ub()),2&t&&r.nc("routerLink",r.sc(1,Oet,e.alert.rule_id))}function Tet(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div",4),r.Vb(1,"div",5),r.Qb(2,"app-flag",6),r.Vb(3,"div",7),r.Vb(4,"div",8),r.Kc(5),r.Ub(),r.Vb(6,"div",9),r.Kc(7),r.Ic(8,met,1,1,"ng-template",2),r.Ub(),r.Ub(),r.Ub(),r.Vb(9,"div",10),r.Kc(10,"R\xe9ception : "),r.Vb(11,"span",11),r.hc(12,"timeago"),r.Kc(13),r.hc(14,"date"),r.Ub(),r.Ub(),r.Ub(),r.Ic(15,get,1,1,"img",12),r.hc(16,"async"),r.Vb(17,"div",5),r.Vb(18,"button",13),r.cc("click",function(){return r.Ac(t),r.gc().locateShip()})("dblclick",function(){return r.Ac(t),r.gc().locateAndZoomToShip()}),r.Vb(19,"mat-icon"),r.Kc(20,"center_focus_strong"),r.Ub(),r.Ub(),r.Vb(21,"a",14),r.Qb(22,"img",15),r.Ub(),r.Ic(23,Aet,2,1,"a",16),r.Vb(24,"button",17),r.cc("click",function(){return r.Ac(t),r.gc().mapConfigService.toggleTrailsLayer()}),r.Vb(25,"mat-icon"),r.Kc(26,"gesture"),r.Ub(),r.Ub(),r.Vb(27,"app-glitter",18),r.Vb(28,"button",17),r.cc("click",function(){return r.Ac(t),r.gc().mapConfigService.toggleDetailedShipTraces()}),r.Qb(29,"mat-icon",19),r.Ub(),r.Ub(),r.Vb(30,"button",17),r.cc("click",function(){return r.Ac(t),r.gc().mapConfigService.toggleOtherShips()}),r.Vb(31,"mat-icon"),r.Kc(32,"directions_boat"),r.Ub(),r.Ub(),r.Vb(33,"button",20),r.cc("click",function(){return r.Ac(t),r.gc().openAddToFleetDialog()}),r.Vb(34,"mat-icon"),r.Kc(35,"playlist_add"),r.Ub(),r.Ub(),r.Ub(),r.Vb(36,"app-glitter",21),r.Vb(37,"button",22),r.cc("click",function(){return r.Ac(t),r.gc().exportShipPositions()}),r.Kc(38,"Exporter la trace"),r.Ub(),r.Ub(),r.Qb(39,"mat-divider"),r.Vb(40,"div",23),r.Qb(41,"app-ship-infos",24),r.Ic(42,_et,3,2,"ng-template",2),r.Qb(43,"mat-divider"),r.Qb(44,"app-ship-note",25),r.Vb(45,"mat-accordion",26),r.Vb(46,"mat-expansion-panel",27),r.cc("afterCollapse",function(){return r.Ac(t),r.gc().mapConfigService.toggleExpandLloydsPanel()})("afterExpand",function(){return r.Ac(t),r.gc().mapConfigService.toggleExpandLloydsPanel()}),r.Vb(47,"mat-expansion-panel-header",28),r.Vb(48,"mat-panel-title"),r.Kc(49,"Informations Lloyd's"),r.Ub(),r.Ub(),r.Ic(50,yet,2,0,"div",29),r.Ic(51,wet,132,24,"div",30),r.Ub(),r.Ic(52,Det,10,7,"mat-expansion-panel",31),r.Vb(53,"mat-expansion-panel",32),r.Vb(54,"mat-expansion-panel-header",28),r.Vb(55,"mat-panel-title"),r.Kc(56," Alertes "),r.Ic(57,Iet,2,2,"span",33),r.Ub(),r.Ub(),r.Qb(58,"app-alerts-list",34),r.Ic(59,Pet,2,1,"ng-template",null,35,r.Jc),r.Ic(61,Met,4,3,"ng-template",null,36,r.Jc),r.Ub(),r.Vb(63,"mat-expansion-panel",37),r.Vb(64,"mat-expansion-panel-header",28),r.Vb(65,"mat-panel-title"),r.Kc(66," Journal de bord "),r.Ub(),r.Ub(),r.Qb(67,"app-events-list",38),r.Ub(),r.Ub(),r.Ub()}if(2&t){const t=r.wc(60),e=r.wc(62),i=r.gc();r.Db(2),r.nc("mmsi",i.ship.mmsi),r.Db(2),r.Hb("ship-details-panel__name--small",(null==i.ship.name?null:i.ship.name.length)>=14)("ship-details-panel__name--mini",(null==i.ship.name?null:i.ship.name.length)>=16)("ship-details-panel__name--tiny",(null==i.ship.name?null:i.ship.name.length)>=20),r.Db(1),r.Lc(i.ship.name||"?"),r.Db(2),r.Mc(" ",i.ship.cargo?i.vesselTypeLabelsByType[i.ship.cargo]:"?"," "),r.Db(1),r.nc("ngIf",null==i.ship.lloydsInfos?null:i.ship.lloydsInfos.generaltype),r.Db(3),r.oc("title",r.ic(12,40,1e3*i.ship.timestamp)),r.Db(2),r.Lc(r.kc(14,42,1e3*i.ship.timestamp,"yyyy-MM-dd HH:mm:ss z",i.mapConfigService.useUTCDates$.value&&"z")),r.Db(2),r.nc("ngIf",r.ic(16,46,i.mapConfigService.showMarineTrafficPhotos$)),r.Db(6),r.pc("href","https://www.marinetraffic.com/en/ais/details/ships/mmsi:",i.ship.mmsi,"",r.Dc),r.Db(2),r.nc("ngIf",i.ship.imo),r.Db(1),r.Hb("button-active",i.mapConfigService.showTrailsLayer$.value),r.pc("title","",i.mapConfigService.showTrailsLayer$.value?"Masquer":"Afficher"," la trace du navire"),r.Db(4),r.nc("title",i.mapConfigService.detailedShipTraces$.value?"Les traces d\xe9taill\xe9es sont affich\xe9es. Cliquer pour afficher les traces simplifi\xe9es.":"Les traces simplifi\xe9es sont affich\xe9es. Cliquer pour afficher les traces d\xe9taill\xe9es (Note: ~10x plus de donn\xe9es \xe0 t\xe9l\xe9charger)"),r.Db(1),r.nc("svgIcon",i.mapConfigService.detailedShipTraces$.value?"trail-detailed":"trail-simple"),r.Db(1),r.Hb("button-active",i.mapConfigService.showOtherShips$.value),r.pc("title","",i.mapConfigService.showOtherShips$.value?"Masquer":"Afficher"," les autres navires"),r.Db(11),r.nc("ship",i.ship)("full",!0),r.Db(1),r.nc("ngIf",i.mapConfigService.showMarineTrafficDeparture$.value),r.Db(2),r.nc("mmsi",i.ship.mmsi),r.Db(1),r.nc("multi",!0),r.Db(1),r.nc("expanded",i.expandLloydsPanel),r.Db(4),r.nc("ngIf",!i.ship.lloydsInfos),r.Db(1),r.nc("ngIf",i.ship.lloydsInfos),r.Db(1),r.nc("ngIf",i.portCallsEnable),r.Db(1),r.nc("expanded",i.alertsPanelExpanded),r.Db(4),r.nc("ngIf",i.getUnreadAlertsCount()>0),r.Db(1),r.nc("alerts$",i.alerts$)("enableRuleFilters",!0)("alertTitleRef",t)("alertMenuItemsRef",e),r.Db(5),r.nc("expanded",i.logbookPanelExpanded),r.Db(4),r.nc("events$",i.events$)}}let Ret=(()=>{class t extends LT{constructor(t,e,i,n,r,s,o,a,l,c,h,u,d,p,f,m){super(),this.changeDetectorRef=t,this.activatedRoute=e,this.domSanitizer=i,this.titleService=n,this.router=r,this.dialog=s,this.configService=o,this.eventsService=a,this.interactionsService=l,this.mapService=c,this.mapConfigService=h,this.selectionService=u,this.timeRangeService=d,this.uiService=p,this.workerService=f,this.zonesLayerService=m,this.loading=!1,this.ship=null,this.vesselTypeLabelsByType=ED,this.alertsPanelExpanded=!0,this.logbookPanelExpanded=!0,this.expandLloydsPanel=!1,this.portCalls$=new Av.a([]),this.voyages$=new Av.a([]),this.voyageGroups$=new Av.a([]),this.alerts$=new Av.a([]),this.events$=new Av.a([]),this.showMarineTrafficDeparture=!1,this.portsOfCallDisplayMode=SD,this.portsOfCallDisplayModes=CD,this.portCallsEnable=fD.a.portCallsEnable,this.getRiskAssessment=()=>Object(ue.a)(this,void 0,void 0,function*(){this.riskAssessment=yield this.workerService.ships.getShipRiskAssessment(this.mmsi)}),this.exportShipPositions=()=>Object(ue.a)(this,void 0,void 0,function*(){const t=this.timeRangeService.timeRange$.value,e=FO(1e3*t.start,"yyyy-MM-dd'T'HH-mm-ss"),i=FO(1e3*t.end,"yyyy-MM-dd'T'HH-mm-ss");YH(WH(this.ship.trail),`anais-traces-${this.ship.name}-${e}-${i}.csv`,"text/csv")}),this.portCalls$.subscribe(t=>{const e=function(t){if((t=t.filter((e,i)=>e.stop||i===t.length-1)).length<2)return[];const e=[];for(let i=1;i<t.length;i++){const n=t[i-1],r=t[i];e.push({origin:{port:{id:n.id,label:n.label,iso3:n.iso3,lon:n.lon,lat:n.lat},timestamp:n.stop,duration:UO(n.stop-n.start)},destination:{port:{id:r.id,label:r.label,iso3:r.iso3,lon:r.lon,lat:r.lat},timestamp:r.start,duration:UO(r.stop-r.start)},duration:UO(r.start-n.stop)})}return e}(t.slice().reverse());this.voyages$.next(e.slice().reverse()),this.voyageGroups$.next(function(t){if(t.length<2)return t;const e=[MD(t[0])];return t.splice(1).forEach(t=>{const i=e[e.length-1];if((t.destination.port.id===i.origin.port.id||t.destination.port.id===i.destination.port.id)&&t.origin.timestamp-i.destination.timestamp<14400){let n;n=void 0===i.voyages?e[e.length-1]=Object.assign(Object.assign({},MD(i)),{voyages:[]}):i,n.destination.timestamp=t.destination.timestamp,n.duration=UO(n.destination.timestamp-n.origin.timestamp),n.voyages.push(t)}else e.push(t)}),e}(e).reverse())})}ngOnInit(){this.subscriptions.push(this.selectionService.openEntity$.pipe(Gg(1),He(t=>t.type===OP.Ship&&t.id===this.mmsi)).subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){if(t.error)return this.loading=!1,this.uiService.error(`Le navire ${this.mmsi} est inconnu.`),void(this.mapService.hasBooted?yield this.router.navigateByUrl(`/${this.mapService.view$.value.toURL()}`):yield this.router.navigateByUrl("/"));if(!t.entity)return;this.loading=!1;const e=t.entity;this.mapService.hasBooted||this.mapService.locate([e.lon,e.lat]),this.titleService.setTitle(`Navire ${e.name||e.mmsi} - ANAIS`),this.ship=e,this.photoURL=this.domSanitizer.bypassSecurityTrustResourceUrl(fD.a.shipPhotoURL.replace("{{mmsi}}",e.mmsi).replace("{{imo}}",e.imo).replace("{{callsign}}",e.callsign)),this.portCalls$.next(e.portCalls),this.alerts$.next(e.alerts),this.events$.next(e.events)})),this.activatedRoute.paramMap.subscribe(t=>{this.loading=!0,this.mmsi!==t.get("mmsi")&&(this.mmsi=t.get("mmsi"),this.riskAssessment=null,this.eventsService.hideTranshipment(),this.zonesLayerService.clear()),this.showMarineTrafficDeparture=!1,this.expandLloydsPanel=this.mapConfigService.expandLloydsPanel$.value,this.marineTrafficUrl=this.domSanitizer.bypassSecurityTrustResourceUrl(`https://www.marinetraffic.com/en/ais/details/ships/mmsi:${this.mmsi}`),this.selectionService.openEntity(OP.Ship,this.mmsi)}),this.interactionsService.selectAlertFeature$.subscribe(()=>{this.alertsPanelExpanded=!0,this.changeDetectorRef.markForCheck()}),this.interactionsService.selectEventFeature$.subscribe(()=>{this.logbookPanelExpanded=!0,this.changeDetectorRef.markForCheck()}),this.mapConfigService.portsOfCallDisplayMode$.subscribe(t=>{this.portsOfCallDisplayMode=t,this.changeDetectorRef.markForCheck()}))}ngOnDestroy(){super.ngOnDestroy(),this.selectionService.closeOpenEntity(),this.eventsService.hideTranshipment(),this.zonesLayerService.clear()}locateShip(){this.mapService.centerOnLonLat([this.ship.lon,this.ship.lat])}locateAndZoomToShip(){this.mapService.locate([this.ship.lon,this.ship.lat])}getUnreadAlertsCount(){return this.ship.alerts.filter(t=>!t.read).length}openAddToFleetDialog(){this.dialog.open(J9,{panelClass:"add-to-fleet-dialog",autoFocus:!1,closeOnNavigation:!0,hasBackdrop:!0,data:{mmsi:this.ship.mmsi}})}updatePortsOfCallDisplayMode(t){this.mapConfigService.updatePortsOfCallDisplayMode(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(N_),r.Pb(ne),r.Pb(he),r.Pb(sw),r.Pb(Gl),r.Pb(cI),r.Pb(IT),r.Pb(ET),r.Pb(pI),r.Pb(hI),r.Pb(xT),r.Pb(yT),r.Pb(VI),r.Pb(_I.a),r.Pb(DT))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-ship-details-panel"]],viewQuery:function(t,e){if(1&t&&r.Pc(pet,1,r.l),2&t){let t;r.vc(t=r.dc())&&(e.eventElements=t)}},features:[r.Ab],decls:3,vars:2,consts:[[1,"panel","ship-details-panel"],["class","loader",4,"ngIf"],[3,"ngIf"],[1,"loader"],[1,"panel__header","d-flex-column"],[1,"d-flex"],[1,"ma-1",3,"mmsi"],[1,"ma-1","u-flex"],[1,"ship-details-panel__name"],[1,"ship-details-panel__type"],[1,"ship-details-panel__reception"],[3,"title"],["referrerpolicy","no-referrer","title","Photo du navire","class","d-block","style","display: none",3,"src","load","error",4,"ngIf"],["mat-button","","title","Centrer la vue sur le navire",1,"ship-details-panel__action",3,"click","dblclick"],["mat-button","","title","Ouvrir la page MarineTraffic","target","_blank","rel","noopener","referrerpolicy","no-referrer",1,"ship-details-panel__action",3,"href"],["src","/assets/images/marinetraffic-icon.png","width","20","alt","MarineTraffic"],["mat-button","","class","ship-details-panel__action","title","Ouvrir la page Lloyd's List Intelligence","target","_blank","rel","noopener","referrerpolicy","no-referrer",3,"href",4,"ngIf"],["mat-button","",1,"ship-details-panel__action",3,"title","click"],["gid","button-detailedshiptraces","date","2020-11-16",1,"u-flex","d-flex"],[3,"svgIcon"],["mat-button","","title","Ajouter \xe0 une flotte",1,"ship-details-panel__action",3,"click"],["gid","export-trace-ship","date","2020-12-14"],["mat-button","","title","Exporter la trace au format CSV",1,"d-block",3,"click"],[1,"scrollable"],[1,"ship-details-panel__infos",3,"ship","full"],[3,"mmsi"],["displayMode","flat",3,"multi"],[1,"ship-details-panel__section",3,"expanded","afterCollapse","afterExpand"],[1,"ship-details-panel__subheader"],["class","panel__content u-center",4,"ngIf"],["class","ship-details-panel__lloyds-infos",4,"ngIf"],["class","ship-details-panel__section",3,"expanded",4,"ngIf"],[1,"ship-details-panel__section",3,"expanded"],["style","color: red; padding-left: 1em",3,"title",4,"ngIf"],[3,"alerts$","enableRuleFilters","alertTitleRef","alertMenuItemsRef"],["alertTitleRef",""],["alertMenuItemsRef",""],[1,"ship-details-panel__section","mat-elevation-z0",3,"expanded"],[3,"events$"],["referrerpolicy","no-referrer","title","Photo du navire",1,"d-block",2,"display","none",3,"src","load","error"],["mat-button","","title","Ouvrir la page Lloyd's List Intelligence","target","_blank","rel","noopener","referrerpolicy","no-referrer",1,"ship-details-panel__action",3,"href"],["src","/assets/images/lloyds-icon.png","width","20","alt","Lloyd's List Intelligence"],["mat-button","","class","d-block","title","Affiche la provenance telle que d\xe9finie sur la fiche navire Marine Traffic (va charger la page MT)",3,"click",4,"ngIf"],["style","width: 250px; height: 60px; position: relative; overflow: hidden","title","Provenance (donn\xe9e Marine Traffic)",4,"ngIf"],["mat-button","","title","Affiche la provenance telle que d\xe9finie sur la fiche navire Marine Traffic (va charger la page MT)",1,"d-block",3,"click"],["title","Provenance (donn\xe9e Marine Traffic)",2,"width","250px","height","60px","position","relative","overflow","hidden"],["scrolling","no","referrerpolicy","no-referrer",2,"position","absolute","width","1400px","height","1100px","top","-370px","left","-90px","pointer-events","none",3,"src"],[1,"panel__content","u-center"],[1,"ship-details-panel__lloyds-infos"],[1,"property"],[1,"property-label"],[1,"property-value"],[1,"property","u-flex"],[1,"d-flex-column","u-flex"],[1,"property-label","mr-1"],["title","en \xe9quivalents vingt pieds",1,"property-label","mr-1"],[1,"property",2,"flex","0.8"],[1,"property","property--large"],[1,"u-flex"],[1,"countries-column"],["title","Mode d'affichage",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[3,"ngSwitch"],[3,"portCalls$",4,"ngSwitchCase"],[3,"voyages$",4,"ngSwitchCase"],[3,"value"],[3,"portCalls$"],[3,"voyages$"],[2,"color","red","padding-left","1em",3,"title"],["mat-menu-item","",3,"routerLink"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Ic(1,fet,1,0,"div",1),r.Ic(2,Tet,68,48,"ng-template",2),r.Ub()),2&t&&(r.Db(1),r.nc("ngIf",e.loading),r.Db(1),r.nc("ngIf",!e.loading&&e.ship))},directives:[ut,GF,Dl,Yp,Il,DL,GT,Q3,att,Itt,ktt,Ett,Dtt,Nj,Ntt,Ztt,Vc,uh,ct,mt,gt,Qtt,set,det,QL,ow],pipes:[Tx,kt,St],styles:[".ship-details-panel__name{font-size:1.4em;font-weight:500}.ship-details-panel__name--small{font-size:1.1em}.ship-details-panel__name--mini{font-size:1em}.ship-details-panel__name--tiny{font-size:.9em}.ship-details-panel__type{font-size:13px;color:#432e2e}.ship-details-panel__reception{font-size:14px;padding-left:.5em;padding-right:.5em;padding-bottom:.5em}.ship-details-panel__action{flex:1;min-width:inherit;padding:inherit}.ship-details-panel__infos{font-size:.9em}.ship-details-panel__section{margin-top:.4em}.ship-details-panel__section .mat-expansion-panel-body{padding:0}.ship-details-panel__section .mat-expansion-panel-header.mat-expanded{height:48px!important}.ship-details-panel__section-row{display:flex}.ship-details-panel__subheader{background-color:#abb8cb}.ship-details-panel__subheader:focus,.ship-details-panel__subheader:hover{background-color:#bbc5d5!important}.ship-details-panel__label{font-weight:300}.ship-details-panel__lloyds-infos{font-size:12px}.property{padding:4px;border:1px solid rgba(0,0,0,.12);text-align:center;min-width:100px}.property--large{flex-basis:100%;display:flex;align-items:center}.property-label{color:grey;font-weight:500}.property-value{font-weight:700}.countries-column{flex:1;max-width:140px}"],encapsulation:2}),t})();function Vet(t,e){1&t&&r.Qb(0,"mat-spinner",8)}function Fet(t,e){1&t&&(r.Vb(0,"p",11),r.Kc(1,"Vous n'avez pas encore cr\xe9\xe9 de zone."),r.Ub())}function Let(t,e){if(1&t&&r.Qb(0,"app-zone-item",14),2&t){const t=e.$implicit,i=r.gc(3);r.nc("zone",t)("editable",i.zonesEditable)("trueDeletion",!0)}}function Uet(t,e){if(1&t&&(r.Vb(0,"div",12),r.Ic(1,Let,1,3,"app-zone-item",13),r.Ub()),2&t){const t=r.gc(2);r.Db(1),r.nc("ngForOf",t.zones)("ngForTrackBy",t.trackById)}}function Bet(t,e){if(1&t&&(r.Ic(0,Fet,2,0,"p",9),r.Ic(1,Uet,2,2,"div",10)),2&t){const t=r.gc();r.nc("ngIf",0===t.zones.length),r.Db(1),r.nc("ngIf",t.zones.length>0)}}function Net(t,e){if(1&t){const t=r.Wb();r.Vb(0,"button",15),r.cc("click",function(){return r.Ac(t),r.gc().displayCreateZoneForm()}),r.Kc(1," Nouvelle zone "),r.Ub()}if(2&t){const t=r.gc();r.nc("disabled",!t.zonesEditable)}}function jet(t,e){if(1&t){const t=r.Wb();r.Vb(0,"div"),r.Vb(1,"app-zone-form",16),r.cc("save",function(){return r.Ac(t),r.gc().hideCreateZoneForm()})("cancel",function(){return r.Ac(t),r.gc().hideCreateZoneForm()}),r.Ub(),r.Ub()}}let zet=(()=>{class t extends LT{constructor(t,e,i,n,r){super(),this.titleService=t,this.editZoneService=e,this.zonesLayerService=i,this.zonesService=n,this.mapService=r,this.showCreateZoneForm=!1,this.zonesEditable=!0}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.titleService.setTitle("Liste des zones - ANAIS"),this.mapService.hasBooted||this.mapService.resetToDefaultView(),this.zonesService.zones$.subscribe(t=>{this.zones=t,this.zonesLayerService.updateZones(this.zones)}),yield this.zonesService.refreshZones(),this.subscriptions.push(this.editZoneService.editedZone$.pipe(mn(),fI(0)).subscribe(t=>{this.zonesEditable=!t,t||this.zonesLayerService.updateZones(this.zonesService.zones$.value)}))})}ngOnDestroy(){super.ngOnDestroy(),this.editZoneService.cancelEditing(),this.zonesLayerService.clear()}displayCreateZoneForm(){this.showCreateZoneForm=!0}hideCreateZoneForm(){this.showCreateZoneForm=!1}trackById(t,e){return e.id}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(he),r.Pb(sL),r.Pb(DT),r.Pb(kP),r.Pb(pI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-zones-panel"]],features:[r.Ab],decls:9,vars:4,consts:[["joyrideStep","zones-panel","title","Gestion des zones","text","C'est ici que vous pouvez g\xe9rer les zones que vous utilisez dans les r\xe8gles.",1,"panel"],[1,"panel__header","panel__header--blue"],[1,"panel__title","u-flex"],[1,"scrollable","d-flex-column"],["class","spinner","strokeWidth","4","diameter","80",4,"ngIf"],[3,"ngIf"],["mat-stroked-button","","color","primary","class","ma-2","title","Cr\xe9er une zone",3,"disabled","click",4,"ngIf"],[4,"ngIf"],["strokeWidth","4","diameter","80",1,"spinner"],["class","panel__content",4,"ngIf"],["class","d-flex-column",4,"ngIf"],[1,"panel__content"],[1,"d-flex-column"],[3,"zone","editable","trueDeletion",4,"ngFor","ngForOf","ngForTrackBy"],[3,"zone","editable","trueDeletion"],["mat-stroked-button","","color","primary","title","Cr\xe9er une zone",1,"ma-2",3,"disabled","click"],[3,"save","cancel"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Vb(2,"h2",2),r.Kc(3,"Zones"),r.Ub(),r.Ub(),r.Vb(4,"div",3),r.Ic(5,Vet,1,0,"mat-spinner",4),r.Ic(6,Bet,2,2,"ng-template",5),r.Ic(7,Net,2,1,"button",6),r.Ic(8,jet,2,0,"div",7),r.Ub(),r.Ub()),2&t&&(r.Db(5),r.nc("ngIf",!e.zones),r.Db(1),r.nc("ngIf",e.zones),r.Db(1),r.nc("ngIf",!e.showCreateZoneForm),r.Db(1),r.nc("ngIf",e.showCreateZoneForm))},directives:[ax,ut,fF,ct,uU,Dl,lU],encapsulation:2}),t})();function Het(t,e){1&t&&(r.Vb(0,"mat-error"),r.Kc(1,"L'email est obligatoire"),r.Ub())}function Ket(t,e){1&t&&(r.Vb(0,"mat-error"),r.Kc(1,"L'email doit \xeatre valide"),r.Ub())}const $et=function(){return["/login"]};let Get=(()=>{class t{constructor(t,e,i,n,r){this.formBuilder=t,this.router=e,this.workerService=i,this.authenticationService=n,this.uiService=r,this.askPasswordReset=()=>Object(ue.a)(this,void 0,void 0,function*(){this.form.valid&&(yield this.workerService.authentication.askPasswordReset(this.form.controls.email.value),this.uiService.success("Vous allez bient\xf4t recevoir un email contenant les instructions pour r\xe9initialiser votre mot de passe."),yield this.router.navigateByUrl("/login"))})}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.form=this.formBuilder.group({email:["",[pc.required,pc.email]]}),this.authenticationService.user$.value&&(yield this.router.navigateByUrl("/"))})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(Lh),r.Pb(sw),r.Pb(_I.a),r.Pb(yI),r.Pb(VI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-reset-password-page"]],decls:18,vars:6,consts:[[1,"unauthenticated-page","mat-typography"],[1,"unauthenticated-page__form",3,"formGroup"],["mat-button","",1,"reset-password__back-button",3,"routerLink"],[1,"reset-password__title"],["type","email","matInput","","placeholder","vous@exemple.com","formControlName","email","required",""],[4,"ngIf"],["mat-raised-button","","color","primary",1,"mt-2",3,"app-async-action"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"form",1),r.Vb(2,"button",2),r.Vb(3,"mat-icon"),r.Kc(4,"chevron_left"),r.Ub(),r.Kc(5," Retour "),r.Ub(),r.Vb(6,"h3",3),r.Kc(7,"R\xe9initialisation de votre mot de passe"),r.Ub(),r.Vb(8,"p"),r.Kc(9,"Pour r\xe9initialiser votre mot de passe, saisissez l'adresse e-mail de votre compte ANAIS."),r.Ub(),r.Vb(10,"mat-form-field"),r.Vb(11,"mat-label"),r.Kc(12,"Email"),r.Ub(),r.Qb(13,"input",4),r.Ic(14,Het,2,0,"mat-error",5),r.Ic(15,Ket,2,0,"mat-error",5),r.Ub(),r.Vb(16,"button",6),r.Kc(17,"Obtenir le lien de r\xe9initialisation"),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(1),r.nc("formGroup",e.form),r.Db(1),r.nc("routerLink",r.rc(5,$et)),r.Db(12),r.nc("ngIf",e.form.get("email").hasError("required")),r.Db(1),r.nc("ngIf",e.form.get("email").hasError("email")),r.Db(1),r.nc("app-async-action",e.askPasswordReset))},directives:[dh,Fc,_h,Dl,ow,Yp,_u,cu,Ou,ac,Vc,Eh,Ih,ut,dR,nu],styles:[".reset-password__back-button[_ngcontent-%COMP%]{color:#fff;font-weight:300;line-height:2em;height:2em;align-self:flex-start;margin-bottom:12px;padding:0}.reset-password__title[_ngcontent-%COMP%]{font-weight:700;font-size:1.5em}","[_nghost-%COMP%]{flex:1}.unauthenticated-page[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:auto;background-image:url(/assets/images/login_background.jpg);background-size:cover;background-position:70% 50%}.unauthenticated-page__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:300px;color:#fff;background-color:rgba(0,55,146,.9490196078431372);padding:2.5em 2.5em 1em;border-radius:2em;box-shadow:0 16px 24px 2px rgba(0,55,146,.64),0 6px 30px 5px rgba(0,55,146,.62)}.unauthenticated-page__form[_ngcontent-%COMP%] .mat-form-field-label{color:#fff}"]}),t})();function Wet(t,e){1&t&&(r.Vb(0,"mat-error"),r.Kc(1,"Le mot de passe est obligatoire"),r.Ub())}function Zet(t,e){1&t&&(r.Vb(0,"mat-error"),r.Kc(1,"Le mot de passe doit contenir 10 caract\xe8res minimum"),r.Ub())}function qet(t,e){1&t&&(r.Vb(0,"mat-error"),r.Kc(1,"La confirmation du mot de passe est obligatoire"),r.Ub())}function Yet(t,e){1&t&&(r.Vb(0,"mat-error"),r.Kc(1,"Les deux mots de passe doivent \xeatre identiques"),r.Ub())}let Qet=(()=>{class t{constructor(t,e,i,n,r){this.activatedRoute=t,this.formBuilder=e,this.router=i,this.workerService=n,this.uiService=r}ngOnInit(){return Object(ue.a)(this,void 0,void 0,function*(){this.form=this.formBuilder.group({password:["",[pc.required,pc.minLength(10)]],confirmPassword:["",pc.required]},{validator:t=>{const e=t.controls.confirmPassword;e.errors&&!e.errors.mustMatch||e.setErrors(t.controls.password.value!==e.value?{mustMatch:!0}:null)}}),this.activatedRoute.paramMap.subscribe(t=>{this.token=t.get("token")}),(yield this.workerService.authentication.isTokenValid(this.token))||(this.uiService.error("Le jeton n'est pas ou plus valide"),yield this.router.navigateByUrl("/login"))})}setPassword(){return Object(ue.a)(this,void 0,void 0,function*(){this.form.valid&&(yield this.workerService.authentication.setPassword(this.token,this.form.controls.password.value),this.uiService.success("Le mot de passe a \xe9t\xe9 chang\xe9."),yield this.router.navigateByUrl("/login"))})}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(N_),r.Pb(Lh),r.Pb(sw),r.Pb(_I.a),r.Pb(VI))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-set-password-page"]],decls:16,vars:6,consts:[[1,"unauthenticated-page","mat-typography"],[1,"unauthenticated-page__form",3,"formGroup","ngSubmit"],[1,"set-password-page__title"],["type","password","matInput","","placeholder","Mot de passe","formControlName","password","required",""],[4,"ngIf"],["type","password","matInput","","placeholder","Confirmation","formControlName","confirmPassword","required",""],["mat-raised-button","","type","submit","color","primary",1,"mt-2",3,"disabled"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"form",1),r.cc("ngSubmit",function(){return e.setPassword()}),r.Vb(2,"h3",2),r.Kc(3,"Mise \xe0 jour de votre mot de passe"),r.Ub(),r.Vb(4,"p"),r.Kc(5,"Veuillez saisir votre nouveau mot de passe."),r.Ub(),r.Vb(6,"mat-form-field"),r.Qb(7,"input",3),r.Ic(8,Wet,2,0,"mat-error",4),r.Ic(9,Zet,2,0,"mat-error",4),r.Ub(),r.Vb(10,"mat-form-field"),r.Qb(11,"input",5),r.Ic(12,qet,2,0,"mat-error",4),r.Ic(13,Yet,2,0,"mat-error",4),r.Ub(),r.Vb(14,"button",6),r.Kc(15,"D\xe9finir le mot de passe"),r.Ub(),r.Ub(),r.Ub()),2&t&&(r.Db(1),r.nc("formGroup",e.form),r.Db(7),r.nc("ngIf",e.form.get("password").hasError("required")),r.Db(1),r.nc("ngIf",e.form.get("password").hasError("minlength")),r.Db(3),r.nc("ngIf",e.form.get("confirmPassword").hasError("required")),r.Db(1),r.nc("ngIf",e.form.get("confirmPassword").hasError("mustMatch")),r.Db(1),r.nc("disabled",!e.form.valid))},directives:[dh,Fc,_h,_u,Ou,ac,Vc,Eh,Ih,ut,Dl,nu],styles:[".set-password-page__title[_ngcontent-%COMP%]{font-weight:700;font-size:1.5em}","[_nghost-%COMP%]{flex:1}.unauthenticated-page[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:auto;background-image:url(/assets/images/login_background.jpg);background-size:cover;background-position:70% 50%}.unauthenticated-page__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:300px;color:#fff;background-color:rgba(0,55,146,.9490196078431372);padding:2.5em 2.5em 1em;border-radius:2em;box-shadow:0 16px 24px 2px rgba(0,55,146,.64),0 6px 30px 5px rgba(0,55,146,.62)}.unauthenticated-page__form[_ngcontent-%COMP%] .mat-form-field-label{color:#fff}"]}),t})();const Xet=[{path:"test",component:(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-test-page"]],decls:2,vars:0,template:function(t,e){1&t&&(r.Vb(0,"div"),r.Kc(1,"Test"),r.Ub())},styles:[""]}),t})()},{path:"maintenance",component:$F},{path:"login",component:KF},{path:"reset-password",component:Get},{path:"set-password/:token",component:Qet},{path:"",canActivateChild:[VT],children:[{path:"admin",canActivateChild:[FI],component:ZT,children:[{path:"",pathMatch:"prefix",redirectTo:"users"},{path:"users",component:BF},{path:"maintenance",component:AR}]},{path:"",component:w7,children:[{path:"alerts",component:uH,children:[{path:"",pathMatch:"prefix",redirectTo:"dashboard"},{path:"dashboard",component:Gz},{path:"rules",component:Vz},{path:"rules/new",component:uz,data:{edit:!0,new:!0}},{path:"rules/:alertRuleId",component:uz},{path:"rules/:alertRuleId/edit",component:uz,data:{edit:!0}}]},{path:"annotations",component:HH},{path:"fleets",component:MK},{path:"fleets/new",component:vK,data:{edit:!0,new:!0}},{path:"fleets/:fleetId",component:vK},{path:"fleets/:fleetId/edit",component:vK,data:{edit:!0}},{path:"ports",component:g9},{path:"search",component:j9,children:[{path:"",pathMatch:"prefix",redirectTo:"ships"},{path:"ships",component:q9},{path:"containers",component:B9}]},{path:"moves",component:m9},{path:"playback",component:TK},{path:"zones",component:zet},{path:"ships/:mmsi",component:Ret},{path:"aircrafts/:icao",component:rL},{path:"settings",component:x$},{path:"about",component:UT},{path:"statistics",redirectTo:"moves"},{path:"rules",redirectTo:"alerts/rules"},{path:"rules/new",redirectTo:"alerts/rules/new"},{path:"rules/:alertRuleId",redirectTo:"alerts/rules/:alertRuleId"},{path:"rules/:alertRuleId/edit",redirectTo:"alerts/rules/:alertRuleId/edit"},{path:"**",component:$H}]}]}];let Jet=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[yw.forRoot(Xet,{preloadingStrategy:pw})],yw]}),t})();function tit(t,e){if(1&t&&(r.Vb(0,"div",1),r.Kc(1),r.Ub()),2&t){const t=r.gc();r.Hb("maintenance-banner--inprogress",t.maintenance.type===t.AppMaintenanceType.InProgress),r.Db(1),r.Mc(" ",t.maintenance.message,"\n")}}let eit=(()=>{class t{constructor(t,e){this.changeDetectorRef=t,this.workerService=e,this.AppMaintenanceType=qT}ngOnInit(){this.changeDetectorRef.detach(),this.workerService.applicationHealth$.subscribe(t=>{this.maintenance=null==t?void 0:t.maintenance,this.changeDetectorRef.detectChanges()})}reload(){location.reload()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(_I.a))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-maintenance-banner"]],decls:1,vars:1,consts:[["class","maintenance-banner",3,"maintenance-banner--inprogress",4,"ngIf"],[1,"maintenance-banner"]],template:function(t,e){1&t&&r.Ic(0,tit,2,3,"div",0),2&t&&r.nc("ngIf",e.maintenance)},directives:[ut],styles:[".maintenance-banner[_ngcontent-%COMP%]{width:100%;padding:.5em;background-color:#58b9eb;text-align:center}.maintenance-banner--inprogress[_ngcontent-%COMP%]{background-color:#ff5353}"]}),t})();function iit(t,e){if(1&t){const t=r.Wb();r.Kc(0," \xc0 partir du 30 novembre 2020, ANAIS va changer d'URL pour passer vers\xa0"),r.Vb(1,"em"),r.Kc(2,"anais.beta.gouv.fr"),r.Ub(),r.Kc(3,". "),r.Vb(4,"button",4),r.cc("click",function(){return r.Ac(t),r.gc(2).migrate()}),r.Kc(5," Cliquez ici pour migrer vos param\xe8tres "),r.Ub()}}function nit(t,e){if(1&t){const t=r.Wb();r.Kc(0," Attention, vous avez d\xe9j\xe0 migr\xe9 vos param\xe8tres vers\xa0"),r.Vb(1,"em"),r.Kc(2,"anais.beta.gouv.fr"),r.Ub(),r.Kc(3,". "),r.Vb(4,"button",4),r.cc("click",function(){return r.Ac(t),r.gc(2).redirect()}),r.Kc(5," Retourner sur le nouveau serveur "),r.Ub()}}function rit(t,e){if(1&t&&(r.Vb(0,"div",1),r.Vb(1,"mat-icon",2),r.Kc(2,"warning"),r.Ub(),r.Ic(3,iit,6,0,"ng-template",3),r.Ic(4,nit,6,0,"ng-template",3),r.Ub()),2&t){const t=r.gc();r.Db(3),r.nc("ngIf",!t.migrated),r.Db(1),r.nc("ngIf",t.migrated)}}const sit=["anais-read-items","anais-seen-glitters","anais-config"];let oit=(()=>{class t{constructor(){this.show=fD.a.migrationEnable,this.migrated=!1}ngOnInit(){localStorage.getItem("anais-migrated-to-betagouv")&&(this.migrated=!0)}migrate(){const t=ND(JSON.stringify(sit.reduce((t,e)=>(t[e]=ND(localStorage.getItem(e)),t),{})));localStorage.setItem("anais-migrated-to-betagouv","1"),location.assign(`https://anais.beta.gouv.fr${location.pathname}#import-settings=${t}`)}redirect(){location.assign(`https://anais.beta.gouv.fr${location.pathname}`)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-server-migration-banner"]],decls:1,vars:1,consts:[["class","banner",4,"ngIf"],[1,"banner"],[1,"mr-2"],[3,"ngIf"],["mat-stroked-button","",1,"ml-2",3,"click"]],template:function(t,e){1&t&&r.Ic(0,rit,5,2,"div",0),2&t&&r.nc("ngIf",e.show)},directives:[ut,Yp,Dl],styles:[".banner[_ngcontent-%COMP%]{width:100%;padding:.5em;background-color:#ff5353;display:flex;justify-content:center;align-items:center}"]}),t})(),ait=(()=>{class t{constructor(t,e){this.changeDetectorRef=t,this.appVersionService=e,this.show=!1}ngOnInit(){this.changeDetectorRef.detach(),this.appVersionService.needsReload$.subscribe(()=>{this.show=!0,this.changeDetectorRef.detectChanges()})}reload(){location.reload()}}return t.\u0275fac=function(e){return new(e||t)(r.Pb(r.h),r.Pb(c8))},t.\u0275cmp=r.Jb({type:t,selectors:[["app-update-notification"]],decls:6,vars:2,consts:[[1,"update-notification","mat-elevation-z8"],[1,"update-notification__message"],["mat-button","","color","primary","title","Recharger la page",3,"click"]],template:function(t,e){1&t&&(r.Vb(0,"div",0),r.Vb(1,"div",1),r.Kc(2," Une mise \xe0 jour de l'application a \xe9t\xe9 d\xe9tect\xe9e. Veuillez rafraichir la page afin de b\xe9n\xe9ficier des derni\xe8res fonctionnalit\xe9s. "),r.Ub(),r.Vb(3,"button",2),r.cc("click",function(){return e.reload()}),r.Vb(4,"mat-icon"),r.Kc(5,"refresh"),r.Ub(),r.Ub(),r.Ub()),2&t&&r.Hb("update-notification--visible",e.show)},directives:[Dl,Yp],styles:[".update-notification[_ngcontent-%COMP%]{position:absolute;z-index:11;display:flex;bottom:3em;left:50%;height:60px;background:#fff;transition:all .5s;transform:translateX(-50%) translateY(200%);opacity:0}.update-notification--visible[_ngcontent-%COMP%]{transform:translateX(-50%) translateY(0);opacity:1}.update-notification__message[_ngcontent-%COMP%]{padding:1em;align-self:center;color:#383838}"]}),t})(),lit=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Jb({type:t,selectors:[["app-root"]],decls:4,vars:0,template:function(t,e){1&t&&(r.Qb(0,"app-maintenance-banner"),r.Qb(1,"app-server-migration-banner"),r.Vb(2,"router-outlet"),r.Qb(3,"app-update-notification"),r.Ub())},directives:[eit,oit,hw,ait],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}"]}),t})();var cit,hit=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(){cit=Function.prototype.toString,Function.prototype.toString=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var i=this.__sentry_original__||this;return cit.apply(i,t)}},t.id="FunctionToString",t}(),uit=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],dit=function(){function t(e){void 0===e&&(e={}),this._options=e,this.name=t.id}return t.prototype.setupOnce=function(){tC(function(e){var i=bC();if(!i)return e;var n=i.getIntegration(t);if(n){var r=i.getClient(),s=r?r.getOptions():{},o=n._mergeOptions(s);if(n._shouldDropEvent(e,o))return null}return e})},t.prototype._shouldDropEvent=function(t,e){return this._isSentryError(t,e)?(Zx.warn("Event dropped due to being internal Sentry Error.\nEvent: "+Object(zx.d)(t)),!0):this._isIgnoredError(t,e)?(Zx.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: "+Object(zx.d)(t)),!0):this._isDeniedUrl(t,e)?(Zx.warn("Event dropped due to being matched by `denyUrls` option.\nEvent: "+Object(zx.d)(t)+".\nUrl: "+this._getEventFilterUrl(t)),!0):!this._isAllowedUrl(t,e)&&(Zx.warn("Event dropped due to not being matched by `allowUrls` option.\nEvent: "+Object(zx.d)(t)+".\nUrl: "+this._getEventFilterUrl(t)),!0)},t.prototype._isSentryError=function(t,e){if(!e.ignoreInternal)return!1;try{return t&&t.exception&&t.exception.values&&t.exception.values[0]&&"SentryError"===t.exception.values[0].type||!1}catch(i){return!1}},t.prototype._isIgnoredError=function(t,e){return!(!e.ignoreErrors||!e.ignoreErrors.length)&&this._getPossibleEventMessages(t).some(function(t){return e.ignoreErrors.some(function(e){return Object(sC.a)(t,e)})})},t.prototype._isDeniedUrl=function(t,e){if(!e.denyUrls||!e.denyUrls.length)return!1;var i=this._getEventFilterUrl(t);return!!i&&e.denyUrls.some(function(t){return Object(sC.a)(i,t)})},t.prototype._isAllowedUrl=function(t,e){if(!e.allowUrls||!e.allowUrls.length)return!0;var i=this._getEventFilterUrl(t);return!i||e.allowUrls.some(function(t){return Object(sC.a)(i,t)})},t.prototype._mergeOptions=function(t){return void 0===t&&(t={}),{allowUrls:jx(this._options.whitelistUrls||[],this._options.allowUrls||[],t.whitelistUrls||[],t.allowUrls||[]),denyUrls:jx(this._options.blacklistUrls||[],this._options.denyUrls||[],t.blacklistUrls||[],t.denyUrls||[]),ignoreErrors:jx(this._options.ignoreErrors||[],t.ignoreErrors||[],uit),ignoreInternal:void 0===this._options.ignoreInternal||this._options.ignoreInternal}},t.prototype._getPossibleEventMessages=function(t){if(t.message)return[t.message];if(t.exception)try{var e=t.exception.values&&t.exception.values[0]||{},i=e.type,n=e.value,r=void 0===n?"":n;return[""+r,(void 0===i?"":i)+": "+r]}catch(s){return Zx.error("Cannot extract message for event "+Object(zx.d)(t)),[]}return[]},t.prototype._getEventFilterUrl=function(t){try{if(t.stacktrace){var e=t.stacktrace.frames;return e&&e[e.length-1].filename||null}if(t.exception){var i=t.exception.values&&t.exception.values[0].stacktrace&&t.exception.values[0].stacktrace.frames;return i&&i[i.length-1].filename||null}return null}catch(n){return Zx.error("Cannot extract url for event "+Object(zx.d)(t)),null}},t.id="InboundFilters",t}();function pit(){if(!("fetch"in Object(zx.e)()))return!1;try{return new Headers,new Request(""),new Response,!0}catch($nt){return!1}}function fit(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function mit(){if(!pit())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch($nt){return!1}}var git,Ait,bit,vit=Object(zx.e)(),_it={},yit={};function wit(t){t&&"string"==typeof t.type&&"function"==typeof t.callback&&(_it[t.type]=_it[t.type]||[],_it[t.type].push(t.callback),function(t){if(!yit[t])switch(yit[t]=!0,t){case"console":"console"in vit&&["debug","info","warn","error","log","assert"].forEach(function(t){t in vit.console&&oC(vit.console,t,function(e){return function(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];xit("console",{args:i,level:t}),e&&Function.prototype.apply.call(e,vit.console,i)}})});break;case"dom":!function(){if("document"in vit){var t=xit.bind(null,"dom"),e=kit(t,!0);vit.document.addEventListener("click",e,!1),vit.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(function(e){var i=vit[e]&&vit[e].prototype;i&&i.hasOwnProperty&&i.hasOwnProperty("addEventListener")&&(oC(i,"addEventListener",function(e){return function(i,n,r){if("click"===i||"keypress"==i)try{var s=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},o=s[i]=s[i]||{refCount:0};if(!o.handler){var a=kit(t);o.handler=a,e.call(this,i,a,r)}o.refCount+=1}catch($nt){}return e.call(this,i,n,r)}}),oC(i,"removeEventListener",function(t){return function(e,i,n){if("click"===e||"keypress"==e)try{var r=this.__sentry_instrumentation_handlers__||{},s=r[e];s&&(s.refCount-=1,s.refCount<=0&&(t.call(this,e,s.handler,n),s.handler=void 0,delete r[e]),0===Object.keys(r).length&&delete this.__sentry_instrumentation_handlers__)}catch($nt){}return t.call(this,e,i,n)}}))})}}();break;case"xhr":!function(){if("XMLHttpRequest"in vit){var t=[],e=[],i=XMLHttpRequest.prototype;oC(i,"open",function(i){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var s=this,o=n[1];s.__sentry_xhr__={method:Object(Yx.k)(n[0])?n[0].toUpperCase():n[0],url:n[1]},Object(Yx.k)(o)&&"POST"===s.__sentry_xhr__.method&&o.match(/sentry_key/)&&(s.__sentry_own_request__=!0);var a=function(){if(4===s.readyState){try{s.__sentry_xhr__&&(s.__sentry_xhr__.status_code=s.status)}catch($nt){}try{var i=t.indexOf(s);if(-1!==i){t.splice(i);var r=e.splice(i)[0];s.__sentry_xhr__&&void 0!==r[0]&&(s.__sentry_xhr__.body=r[0])}}catch($nt){}xit("xhr",{args:n,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:s})}};return"onreadystatechange"in s&&"function"==typeof s.onreadystatechange?oC(s,"onreadystatechange",function(t){return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return a(),t.apply(s,e)}}):s.addEventListener("readystatechange",a),i.apply(s,n)}}),oC(i,"send",function(i){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t.push(this),e.push(n),xit("xhr",{args:n,startTimestamp:Date.now(),xhr:this}),i.apply(this,n)}})}}();break;case"fetch":(function(){if(!pit())return!1;var t=Object(zx.e)();if(fit(t.fetch))return!0;var e=!1,i=t.document;if(i&&"function"==typeof i.createElement)try{var n=i.createElement("iframe");n.hidden=!0,i.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=fit(n.contentWindow.fetch)),i.head.removeChild(n)}catch(r){Zx.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e})()&&oC(vit,"fetch",function(t){return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var n={args:e,fetchData:{method:Cit(e),url:Sit(e)},startTimestamp:Date.now()};return xit("fetch",Ux({},n)),t.apply(vit,e).then(function(t){return xit("fetch",Ux(Ux({},n),{endTimestamp:Date.now(),response:t})),t},function(t){throw xit("fetch",Ux(Ux({},n),{endTimestamp:Date.now(),error:t})),t})}});break;case"history":!function(){if(function(){var t=Object(zx.e)(),e=t.chrome;return!(e&&e.app&&e.app.runtime||!("history"in t)||!t.history.pushState||!t.history.replaceState)}()){var t=vit.onpopstate;vit.onpopstate=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var n=vit.location.href,r=git;if(git=n,xit("history",{from:r,to:n}),t)return t.apply(this,e)},oC(vit.history,"pushState",e),oC(vit.history,"replaceState",e)}function e(t){return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var n=e.length>2?e[2]:void 0;if(n){var r=git,s=String(n);git=s,xit("history",{from:r,to:s})}return t.apply(this,e)}}}();break;case"error":Dit=vit.onerror,vit.onerror=function(t,e,i,n,r){return xit("error",{column:n,error:r,line:i,msg:t,url:e}),!!Dit&&Dit.apply(this,arguments)};break;case"unhandledrejection":Iit=vit.onunhandledrejection,vit.onunhandledrejection=function(t){return xit("unhandledrejection",t),!Iit||Iit.apply(this,arguments)};break;default:Zx.warn("unknown instrumentation type:",t)}}(t.type))}function xit(t,e){var i,n;if(t&&_it[t])try{for(var r=Bx(_it[t]||[]),s=r.next();!s.done;s=r.next()){var o=s.value;try{o(e)}catch($nt){Zx.error("Error while triggering instrumentation handler.\nType: "+t+"\nName: "+rC(o)+"\nError: "+$nt)}}}catch(a){i={error:a}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}}function Cit(t){return void 0===t&&(t=[]),"Request"in vit&&Object(Yx.g)(t[0],Request)&&t[0].method?String(t[0].method).toUpperCase():t[1]&&t[1].method?String(t[1].method).toUpperCase():"GET"}function Sit(t){return void 0===t&&(t=[]),"string"==typeof t[0]?t[0]:"Request"in vit&&Object(Yx.g)(t[0],Request)?t[0].url:String(t[0])}function kit(t,e){return void 0===e&&(e=!1),function(i){if(i&&bit!==i&&!function(t){if("keypress"!==t.type)return!1;try{var e=t.target;if(!e||!e.tagName)return!0;if("INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable)return!1}catch($nt){}return!0}(i)){var n="keypress"===i.type?"input":i.type;(void 0===Ait||function(t,e){if(!t)return!0;if(t.type!==e.type)return!0;try{if(t.target!==e.target)return!0}catch($nt){}return!1}(bit,i))&&(t({event:i,name:n,global:e}),bit=i),clearTimeout(Ait),Ait=vit.setTimeout(function(){Ait=void 0},1e3)}}}var Eit,Dit=null,Iit=null,Pit=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){return t.__proto__=e,t}:function(t,e){for(var i in e)t.hasOwnProperty(i)||(t[i]=e[i]);return t}),Oit=function(t){function e(e){var i=this.constructor,n=t.call(this,e)||this;return n.message=e,n.name=i.prototype.constructor.name,Pit(n,i.prototype),n}return Fx(e,t),e}(Error),Mit=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,Tit=function(){function t(t){"string"==typeof t?this._fromString(t):this._fromComponents(t),this._validate()}return t.prototype.toString=function(t){void 0===t&&(t=!1);var e=this,i=e.path,n=e.pass,r=e.port;return e.protocol+"://"+e.publicKey+(t&&n?":"+n:"")+"@"+e.host+(r?":"+r:"")+"/"+(i?i+"/":i)+e.projectId},t.prototype._fromString=function(t){var e=Mit.exec(t);if(!e)throw new Oit("Invalid Dsn");var i=Nx(e.slice(1),6),n=i[0],r=i[1],s=i[2],o=void 0===s?"":s,a=i[3],l=i[4],c=void 0===l?"":l,h="",u=i[5],d=u.split("/");if(d.length>1&&(h=d.slice(0,-1).join("/"),u=d.pop()),u){var p=u.match(/^\d+/);p&&(u=p[0])}this._fromComponents({host:a,pass:o,path:h,projectId:u,port:c,protocol:n,publicKey:r})},t.prototype._fromComponents=function(t){"user"in t&&!("publicKey"in t)&&(t.publicKey=t.user),this.user=t.publicKey||"",this.protocol=t.protocol,this.publicKey=t.publicKey||"",this.pass=t.pass||"",this.host=t.host,this.port=t.port||"",this.path=t.path||"",this.projectId=t.projectId},t.prototype._validate=function(){var t=this;if(["protocol","publicKey","host","projectId"].forEach(function(e){if(!t[e])throw new Oit("Invalid Dsn: "+e+" missing")}),!this.projectId.match(/^\d+$/))throw new Oit("Invalid Dsn: Invalid projectId "+this.projectId);if("http"!==this.protocol&&"https"!==this.protocol)throw new Oit("Invalid Dsn: Invalid protocol "+this.protocol);if(this.port&&isNaN(parseInt(this.port,10)))throw new Oit("Invalid Dsn: Invalid port "+this.port)},t}(),Rit=[],Vit=function(){function t(t,e){this._integrations={},this._processing=0,this._backend=new t(e),this._options=e,e.dsn&&(this._dsn=new Tit(e.dsn))}return t.prototype.captureException=function(t,e,i){var n=this,r=e&&e.event_id;return this._process(this._getBackend().eventFromException(t,e).then(function(t){return n._captureEvent(t,e,i)}).then(function(t){r=t})),r},t.prototype.captureMessage=function(t,e,i,n){var r=this,s=i&&i.event_id,o=Object(Yx.i)(t)?this._getBackend().eventFromMessage(String(t),e,i):this._getBackend().eventFromException(t,i);return this._process(o.then(function(t){return r._captureEvent(t,i,n)}).then(function(t){s=t})),s},t.prototype.captureEvent=function(t,e,i){var n=e&&e.event_id;return this._process(this._captureEvent(t,e,i).then(function(t){n=t})),n},t.prototype.captureSession=function(t){t.release?(this._sendSession(t),t.update({init:!1})):Zx.warn("Discarded session because of missing release")},t.prototype.getDsn=function(){return this._dsn},t.prototype.getOptions=function(){return this._options},t.prototype.flush=function(t){var e=this;return this._isClientProcessing(t).then(function(i){return e._getBackend().getTransport().close(t).then(function(t){return i&&t})})},t.prototype.close=function(t){var e=this;return this.flush(t).then(function(t){return e.getOptions().enabled=!1,t})},t.prototype.setupIntegrations=function(){var t;this._isEnabled()&&(this._integrations=(t={},function(t){var e=t.defaultIntegrations&&jx(t.defaultIntegrations)||[],i=t.integrations,n=[];if(Array.isArray(i)){var r=i.map(function(t){return t.name}),s=[];e.forEach(function(t){-1===r.indexOf(t.name)&&-1===s.indexOf(t.name)&&(n.push(t),s.push(t.name))}),i.forEach(function(t){-1===s.indexOf(t.name)&&(n.push(t),s.push(t.name))})}else"function"==typeof i?(n=i(e),n=Array.isArray(n)?n:[n]):n=jx(e);var o=n.map(function(t){return t.name});return-1!==o.indexOf("Debug")&&n.push.apply(n,jx(n.splice(o.indexOf("Debug"),1))),n}(this._options).forEach(function(e){t[e.name]=e,function(t){-1===Rit.indexOf(t.name)&&(t.setupOnce(tC,bC),Rit.push(t.name),Zx.log("Integration installed: "+t.name))}(e)}),t))},t.prototype.getIntegration=function(t){try{return this._integrations[t.id]||null}catch(e){return Zx.warn("Cannot retrieve integration "+t.id+" from the current Client"),null}},t.prototype._updateSessionFromEvent=function(t,e){var i,n,r,s=!1,o=!1,a=e.exception&&e.exception.values;if(a){o=!0;try{for(var l=Bx(a),c=l.next();!c.done;c=l.next()){var h=c.value.mechanism;if(h&&!1===h.handled){s=!0;break}}}catch(f){i={error:f}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}var u=e.user;if(!t.userAgent){var d=e.request?e.request.headers:{};for(var p in d)if("user-agent"===p.toLowerCase()){r=d[p];break}}t.update(Ux(Ux({},s&&{status:Lx.Crashed}),{user:u,userAgent:r,errors:t.errors+Number(o||s)})),this.captureSession(t)},t.prototype._sendSession=function(t){this._getBackend().sendSession(t)},t.prototype._isClientProcessing=function(t){var e=this;return new Qx(function(i){var n=0,r=setInterval(function(){0==e._processing?(clearInterval(r),i(!0)):(n+=1,t&&n>=t&&(clearInterval(r),i(!1)))},1)})},t.prototype._getBackend=function(){return this._backend},t.prototype._isEnabled=function(){return!1!==this.getOptions().enabled&&void 0!==this._dsn},t.prototype._prepareEvent=function(t,e,i){var n=this,r=this.getOptions().normalizeDepth,s=void 0===r?3:r,o=Ux(Ux({},t),{event_id:t.event_id||(i&&i.event_id?i.event_id:Object(zx.i)()),timestamp:t.timestamp||Object(Hx.a)()});this._applyClientOptions(o),this._applyIntegrationsMetadata(o);var a=e;i&&i.captureContext&&(a=Xx.clone(a).update(i.captureContext));var l=Qx.resolve(o);return a&&(l=a.applyToEvent(o,i)),l.then(function(t){return"number"==typeof s&&s>0?n._normalizeEvent(t,s):t})},t.prototype._normalizeEvent=function(t,e){if(!t)return null;var i=Ux(Ux(Ux(Ux(Ux({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(function(t){return Ux(Ux({},t),t.data&&{data:uC(t.data,e)})})}),t.user&&{user:uC(t.user,e)}),t.contexts&&{contexts:uC(t.contexts,e)}),t.extra&&{extra:uC(t.extra,e)});return t.contexts&&t.contexts.trace&&(i.contexts.trace=t.contexts.trace),i},t.prototype._applyClientOptions=function(t){var e=this.getOptions(),i=e.release,n=e.dist,r=e.maxValueLength,s=void 0===r?250:r;"environment"in t||(t.environment="environment"in e?e.environment:"production"),void 0===t.release&&void 0!==i&&(t.release=i),void 0===t.dist&&void 0!==n&&(t.dist=n),t.message&&(t.message=Object(sC.d)(t.message,s));var o=t.exception&&t.exception.values&&t.exception.values[0];o&&o.value&&(o.value=Object(sC.d)(o.value,s));var a=t.request;a&&a.url&&(a.url=Object(sC.d)(a.url,s))},t.prototype._applyIntegrationsMetadata=function(t){var e=t.sdk,i=Object.keys(this._integrations);e&&i.length>0&&(e.integrations=i)},t.prototype._sendEvent=function(t){this._getBackend().sendEvent(t)},t.prototype._captureEvent=function(t,e,i){return this._processEvent(t,e,i).then(function(t){return t.event_id},function(t){Zx.error(t)})},t.prototype._processEvent=function(t,e,i){var n=this,r=this.getOptions(),s=r.beforeSend,o=r.sampleRate;if(!this._isEnabled())return Qx.reject(new Oit("SDK not enabled, will not send event."));var a="transaction"===t.type;return!a&&"number"==typeof o&&Math.random()>o?Qx.reject(new Oit("Discarding event because it's not included in the random sample (sampling rate = "+o+")")):this._prepareEvent(t,i,e).then(function(t){if(null===t)throw new Oit("An event processor returned null, will not send event.");if(e&&e.data&&!0===e.data.__sentry__||a||!s)return t;var i=s(t,e);if(void 0===i)throw new Oit("`beforeSend` method has to return `null` or a valid event.");return Object(Yx.m)(i)?i.then(function(t){return t},function(t){throw new Oit("beforeSend rejected with "+t)}):i}).then(function(t){if(null===t)throw new Oit("`beforeSend` returned `null`, will not send event.");var e=i&&i.getSession&&i.getSession();return!a&&e&&n._updateSessionFromEvent(e,t),n._sendEvent(t),t}).then(null,function(t){if(t instanceof Oit)throw t;throw n.captureException(t,{data:{__sentry__:!0},originalException:t}),new Oit("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: "+t)})},t.prototype._process=function(t){var e=this;this._processing+=1,t.then(function(t){return e._processing-=1,t},function(t){return e._processing-=1,t})},t}();!function(t){t.Unknown="unknown",t.Skipped="skipped",t.Success="success",t.RateLimit="rate_limit",t.Invalid="invalid",t.Failed="failed"}(Eit||(Eit={})),function(t){t.fromHttpCode=function(e){return e>=200&&e<300?t.Success:429===e?t.RateLimit:e>=400&&e<500?t.Invalid:e>=500?t.Failed:t.Unknown}}(Eit||(Eit={}));var Fit,Lit=function(){function t(){}return t.prototype.sendEvent=function(t){return Qx.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:Eit.Skipped})},t.prototype.close=function(t){return Qx.resolve(!0)},t}(),Uit=function(){function t(t){this._options=t,this._options.dsn||Zx.warn("No DSN provided, backend will not do anything."),this._transport=this._setupTransport()}return t.prototype.eventFromException=function(t,e){throw new Oit("Backend has to implement `eventFromException` method")},t.prototype.eventFromMessage=function(t,e,i){throw new Oit("Backend has to implement `eventFromMessage` method")},t.prototype.sendEvent=function(t){this._transport.sendEvent(t).then(null,function(t){Zx.error("Error while sending event: "+t)})},t.prototype.sendSession=function(t){this._transport.sendSession?this._transport.sendSession(t).then(null,function(t){Zx.error("Error while sending session: "+t)}):Zx.warn("Dropping session because custom transport doesn't implement sendSession")},t.prototype.getTransport=function(){return this._transport},t.prototype._setupTransport=function(){return new Lit},t}();!function(t){t.Fatal="fatal",t.Error="error",t.Warning="warning",t.Log="log",t.Info="info",t.Debug="debug",t.Critical="critical"}(Fit||(Fit={})),function(t){t.fromString=function(e){switch(e){case"debug":return t.Debug;case"info":return t.Info;case"warn":case"warning":return t.Warning;case"error":return t.Error;case"fatal":return t.Fatal;case"critical":return t.Critical;case"log":default:return t.Log}}}(Fit||(Fit={}));var Bit=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Nit=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,jit=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,zit=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Hit=/\((\S*)(?::(\d+))(?::(\d+))\)/,Kit=/Minified React error #\d+;/i;function $it(t){var e=null,i=0;t&&("number"==typeof t.framesToPop?i=t.framesToPop:Kit.test(t.message)&&(i=1));try{if(e=function(t){if(!t||!t.stacktrace)return null;for(var e,i=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,n=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\((.*)\))? in (.*):\s*$/i,r=t.stacktrace.split("\n"),s=[],o=0;o<r.length;o+=2){var a=null;(e=i.exec(r[o]))?a={url:e[2],func:e[3],args:[],line:+e[1],column:null}:(e=n.exec(r[o]))&&(a={url:e[6],func:e[3]||e[4],args:e[5]?e[5].split(","):[],line:+e[1],column:+e[2]}),a&&(!a.func&&a.line&&(a.func="?"),s.push(a))}return s.length?{message:Wit(t),name:t.name,stack:s}:null}(t))return Git(e,i)}catch($nt){}try{if(e=function(t){if(!t||!t.stack)return null;for(var e,i,n,r=[],s=t.stack.split("\n"),o=0;o<s.length;++o){if(i=Bit.exec(s[o])){var a=i[2]&&0===i[2].indexOf("native");i[2]&&0===i[2].indexOf("eval")&&(e=Hit.exec(i[2]))&&(i[2]=e[1],i[3]=e[2],i[4]=e[3]),n={url:i[2]&&0===i[2].indexOf("address at ")?i[2].substr("address at ".length):i[2],func:i[1]||"?",args:a?[i[2]]:[],line:i[3]?+i[3]:null,column:i[4]?+i[4]:null}}else if(i=jit.exec(s[o]))n={url:i[2],func:i[1]||"?",args:[],line:+i[3],column:i[4]?+i[4]:null};else{if(!(i=Nit.exec(s[o])))continue;i[3]&&i[3].indexOf(" > eval")>-1&&(e=zit.exec(i[3]))?(i[1]=i[1]||"eval",i[3]=e[1],i[4]=e[2],i[5]=""):0!==o||i[5]||void 0===t.columnNumber||(r[0].column=t.columnNumber+1),n={url:i[3],func:i[1]||"?",args:i[2]?i[2].split(","):[],line:i[4]?+i[4]:null,column:i[5]?+i[5]:null}}!n.func&&n.line&&(n.func="?"),r.push(n)}return r.length?{message:Wit(t),name:t.name,stack:r}:null}(t))return Git(e,i)}catch($nt){}return{message:Wit(t),name:t&&t.name,stack:[],failed:!0}}function Git(t,e){try{return Ux(Ux({},t),{stack:t.stack.slice(e)})}catch($nt){return t}}function Wit(t){var e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}function Zit(t){var e=Yit(t.stack),i={type:t.name,value:t.message};return e&&e.length&&(i.stacktrace={frames:e}),void 0===i.type&&""===i.value&&(i.value="Unrecoverable error caught"),i}function qit(t){return{exception:{values:[Zit(t)]}}}function Yit(t){if(!t||!t.length)return[];var e=t,i=e[0].func||"",n=e[e.length-1].func||"";return-1===i.indexOf("captureMessage")&&-1===i.indexOf("captureException")||(e=e.slice(1)),-1!==n.indexOf("sentryWrapped")&&(e=e.slice(0,-1)),e.slice(0,50).map(function(t){return{colno:null===t.column?void 0:t.column,filename:t.url||e[0].url,function:t.func||"?",in_app:!0,lineno:null===t.line?void 0:t.line}}).reverse()}function Qit(t,e,i){var n;if(void 0===i&&(i={}),Object(Yx.e)(t)&&t.error)return qit($it(t=t.error));if(Object(Yx.a)(t)||Object(Yx.b)(t)){var r=t,s=r.name||(Object(Yx.a)(r)?"DOMError":"DOMException"),o=r.message?s+": "+r.message:s;return n=Xit(o,e,i),Object(zx.b)(n,o),"code"in r&&(n.tags=Ux(Ux({},n.tags),{"DOMException.code":""+r.code})),n}return Object(Yx.d)(t)?n=qit($it(t)):Object(Yx.h)(t)||Object(Yx.f)(t)?(n=function(t,e,i){var n={exception:{values:[{type:Object(Yx.f)(t)?t.constructor.name:i?"UnhandledRejection":"Error",value:"Non-Error "+(i?"promise rejection":"exception")+" captured with keys: "+dC(t)}]},extra:{__serialized__:lC(t)}};if(e){var r=Yit($it(e).stack);n.stacktrace={frames:r}}return n}(t,e,i.rejection),Object(zx.a)(n,{synthetic:!0}),n):(n=Xit(t,e,i),Object(zx.b)(n,""+t,void 0),Object(zx.a)(n,{synthetic:!0}),n)}function Xit(t,e,i){void 0===i&&(i={});var n={message:t};if(i.attachStacktrace&&e){var r=Yit($it(e).stack);n.stacktrace={frames:r}}return n}function Jit(t){if(t.metadata&&t.metadata.sdk){var e=t.metadata.sdk;return{name:e.name,version:e.version}}}function tnt(t,e){return e?(t.sdk=t.sdk||{name:e.name,version:e.version},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=jx(t.sdk.integrations||[],e.integrations||[]),t.sdk.packages=jx(t.sdk.packages||[],e.packages||[]),t):t}function ent(t,e){var i=Jit(e);return{body:JSON.stringify(Ux({sent_at:(new Date).toISOString()},i&&{sdk:i}))+"\n"+JSON.stringify({type:"session"})+"\n"+JSON.stringify(t),type:"session",url:e.getEnvelopeEndpointWithUrlEncodedAuth()}}function int(t,e){var i=Jit(e),n=t.type||"event",r="transaction"===n,s=t.debug_meta||{},o=s.transactionSampling,a=function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(i[n[r]]=t[n[r]])}return i}(s,["transactionSampling"]),l=o||{},c=l.method,h=l.rate;0===Object.keys(a).length?delete t.debug_meta:t.debug_meta=a;var u={body:JSON.stringify(i?tnt(t,e.metadata.sdk):t),type:n,url:r?e.getEnvelopeEndpointWithUrlEncodedAuth():e.getStoreEndpointWithUrlEncodedAuth()};if(r){var d=JSON.stringify(Ux({event_id:t.event_id,sent_at:(new Date).toISOString()},i&&{sdk:i})),p=JSON.stringify({type:t.type,sample_rates:[{id:c,rate:h}]});u.body=d+"\n"+p+"\n"+u.body}return u}var nnt=function(){function t(t,e){void 0===e&&(e={}),this.dsn=t,this._dsnObject=new Tit(t),this.metadata=e}return t.prototype.getDsn=function(){return this._dsnObject},t.prototype.getBaseApiEndpoint=function(){var t=this._dsnObject;return(t.protocol?t.protocol+":":"")+"//"+t.host+(t.port?":"+t.port:"")+(t.path?"/"+t.path:"")+"/api/"},t.prototype.getStoreEndpoint=function(){return this._getIngestEndpoint("store")},t.prototype.getStoreEndpointWithUrlEncodedAuth=function(){return this.getStoreEndpoint()+"?"+this._encodedAuth()},t.prototype.getEnvelopeEndpointWithUrlEncodedAuth=function(){return this._getEnvelopeEndpoint()+"?"+this._encodedAuth()},t.prototype.getStoreEndpointPath=function(){var t=this._dsnObject;return(t.path?"/"+t.path:"")+"/api/"+t.projectId+"/store/"},t.prototype.getRequestHeaders=function(t,e){var i=this._dsnObject,n=["Sentry sentry_version=7"];return n.push("sentry_client="+t+"/"+e),n.push("sentry_key="+i.publicKey),i.pass&&n.push("sentry_secret="+i.pass),{"Content-Type":"application/json","X-Sentry-Auth":n.join(", ")}},t.prototype.getReportDialogEndpoint=function(t){void 0===t&&(t={});var e=this._dsnObject,i=this.getBaseApiEndpoint()+"embed/error-page/",n=[];for(var r in n.push("dsn="+e.toString()),t)if("dsn"!==r)if("user"===r){if(!t.user)continue;t.user.name&&n.push("name="+encodeURIComponent(t.user.name)),t.user.email&&n.push("email="+encodeURIComponent(t.user.email))}else n.push(encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return n.length?i+"?"+n.join("&"):i},t.prototype._getEnvelopeEndpoint=function(){return this._getIngestEndpoint("envelope")},t.prototype._getIngestEndpoint=function(t){return""+this.getBaseApiEndpoint()+this._dsnObject.projectId+"/"+t+"/"},t.prototype._encodedAuth=function(){var t;return t={sentry_key:this._dsnObject.publicKey,sentry_version:"7"},Object.keys(t).map(function(e){return encodeURIComponent(e)+"="+encodeURIComponent(t[e])}).join("&")},t}(),rnt=function(){function t(t){this._limit=t,this._buffer=[]}return t.prototype.isReady=function(){return void 0===this._limit||this.length()<this._limit},t.prototype.add=function(t){var e=this;return this.isReady()?(-1===this._buffer.indexOf(t)&&this._buffer.push(t),t.then(function(){return e.remove(t)}).then(null,function(){return e.remove(t).then(null,function(){})}),t):Qx.reject(new Oit("Not adding Promise due to buffer limit reached."))},t.prototype.remove=function(t){return this._buffer.splice(this._buffer.indexOf(t),1)[0]},t.prototype.length=function(){return this._buffer.length},t.prototype.drain=function(t){var e=this;return new Qx(function(i){var n=setTimeout(function(){t&&t>0&&i(!1)},t);Qx.all(e._buffer).then(function(){clearTimeout(n),i(!0)}).then(null,function(){i(!0)})})},t}(),snt=function(){function t(t){this.options=t,this._buffer=new rnt(30),this._rateLimits={},this._api=new nnt(t.dsn,t._metadata),this.url=this._api.getStoreEndpointWithUrlEncodedAuth()}return t.prototype.sendEvent=function(t){throw new Oit("Transport Class has to implement `sendEvent` method")},t.prototype.close=function(t){return this._buffer.drain(t)},t.prototype._handleResponse=function(t){var e=t.requestType,i=t.response,n=t.headers,r=t.resolve,s=t.reject,o=Eit.fromHttpCode(i.status);this._handleRateLimit(n)&&Zx.warn("Too many requests, backing off until: "+this._disabledUntil(e)),o!==Eit.Success?s(i):r({status:o})},t.prototype._disabledUntil=function(t){return this._rateLimits[t]||this._rateLimits.all},t.prototype._isRateLimited=function(t){return this._disabledUntil(t)>new Date(Date.now())},t.prototype._handleRateLimit=function(t){var e,i,n,r,s=Date.now(),o=t["x-sentry-rate-limits"],a=t["retry-after"];if(o){try{for(var l=Bx(o.trim().split(",")),c=l.next();!c.done;c=l.next()){var h=c.value.split(":",2),u=parseInt(h[0],10),d=1e3*(isNaN(u)?60:u);try{for(var p=(n=void 0,Bx(h[1].split(";"))),f=p.next();!f.done;f=p.next())this._rateLimits[f.value||"all"]=new Date(s+d)}catch(m){n={error:m}}finally{try{f&&!f.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}}}catch(g){e={error:g}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(e)throw e.error}}return!0}return!!a&&(this._rateLimits.all=new Date(s+Object(zx.g)(s,a)),!0)},t}(),ont=function(t){function e(e,i){void 0===i&&(i=function(){var t,e,i=Object(zx.e)(),n=i.document;if("function"==typeof(null===(t=n)||void 0===t?void 0:t.createElement))try{var r=n.createElement("iframe");if(r.hidden=!0,n.head.appendChild(r),null===(e=r.contentWindow)||void 0===e?void 0:e.fetch)return r.contentWindow.fetch.bind(i);n.head.removeChild(r)}catch($nt){Zx.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",$nt)}return i.fetch.bind(i)}());var n=t.call(this,e)||this;return n._fetch=i,n}return Fx(e,t),e.prototype.sendEvent=function(t){return this._sendRequest(int(t,this._api),t)},e.prototype.sendSession=function(t){return this._sendRequest(ent(t,this._api),t)},e.prototype._sendRequest=function(t,e){var i=this;if(this._isRateLimited(t.type))return Promise.reject({event:e,type:t.type,reason:"Transport locked till "+this._disabledUntil(t.type)+" due to too many requests.",status:429});var n={body:t.body,method:"POST",referrerPolicy:mit()?"origin":""};return void 0!==this.options.fetchParameters&&Object.assign(n,this.options.fetchParameters),void 0!==this.options.headers&&(n.headers=this.options.headers),this._buffer.add(new Qx(function(e,r){i._fetch(t.url,n).then(function(n){var s={"x-sentry-rate-limits":n.headers.get("X-Sentry-Rate-Limits"),"retry-after":n.headers.get("Retry-After")};i._handleResponse({requestType:t.type,response:n,headers:s,resolve:e,reject:r})}).catch(r)}))},e}(snt),ant=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Fx(e,t),e.prototype.sendEvent=function(t){return this._sendRequest(int(t,this._api),t)},e.prototype.sendSession=function(t){return this._sendRequest(ent(t,this._api),t)},e.prototype._sendRequest=function(t,e){var i=this;return this._isRateLimited(t.type)?Promise.reject({event:e,type:t.type,reason:"Transport locked till "+this._disabledUntil(t.type)+" due to too many requests.",status:429}):this._buffer.add(new Qx(function(e,n){var r=new XMLHttpRequest;for(var s in r.onreadystatechange=function(){if(4===r.readyState){var s={"x-sentry-rate-limits":r.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":r.getResponseHeader("Retry-After")};i._handleResponse({requestType:t.type,response:r,headers:s,resolve:e,reject:n})}},r.open("POST",t.url),i.options.headers)i.options.headers.hasOwnProperty(s)&&r.setRequestHeader(s,i.options.headers[s]);r.send(t.body)}))},e}(snt),lnt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Fx(e,t),e.prototype.eventFromException=function(t,e){return function(t,e,i){var n=Qit(e,i&&i.syntheticException||void 0,{attachStacktrace:t.attachStacktrace});return Object(zx.a)(n,{handled:!0,type:"generic"}),n.level=Fit.Error,i&&i.event_id&&(n.event_id=i.event_id),Qx.resolve(n)}(this._options,t,e)},e.prototype.eventFromMessage=function(t,e,i){return void 0===e&&(e=Fit.Info),function(t,e,i,n){void 0===i&&(i=Fit.Info);var r=Xit(e,n&&n.syntheticException||void 0,{attachStacktrace:t.attachStacktrace});return r.level=i,n&&n.event_id&&(r.event_id=n.event_id),Qx.resolve(r)}(this._options,t,e,i)},e.prototype._setupTransport=function(){if(!this._options.dsn)return t.prototype._setupTransport.call(this);var e=Ux(Ux({},this._options.transportOptions),{dsn:this._options.dsn,_metadata:this._options._metadata});return this._options.transport?new this._options.transport(e):pit()?new ont(e):new ant(e)},e}(Uit),cnt=0;function hnt(){return cnt>0}function unt(){cnt+=1,setTimeout(function(){cnt-=1})}function dnt(t,e,i){if(void 0===e&&(e={}),"function"!=typeof t)return t;try{if(t.__sentry__)return t;if(t.__sentry_wrapped__)return t.__sentry_wrapped__}catch($nt){return t}var n=function(){var n=Array.prototype.slice.call(arguments);try{i&&"function"==typeof i&&i.apply(this,arguments);var r=n.map(function(t){return dnt(t,e)});return t.handleEvent?t.handleEvent.apply(this,r):t.apply(this,r)}catch(s){throw unt(),SC(function(t){t.addEventProcessor(function(t){var i=Ux({},t);return e.mechanism&&(Object(zx.b)(i,void 0,void 0),Object(zx.a)(i,e.mechanism)),i.extra=Ux(Ux({},i.extra),{arguments:n}),i}),xC(s)}),s}};try{for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}catch(s){}t.prototype=t.prototype||{},n.prototype=t.prototype,Object.defineProperty(t,"__sentry_wrapped__",{enumerable:!1,value:n}),Object.defineProperties(n,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:t}});try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:function(){return t.name}})}catch(s){}return n}var pnt=function(){function t(e){this.name=t.id,this._options=Ux({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},e)}return t.prototype.addSentryBreadcrumb=function(t){this._options.sentry&&bC().addBreadcrumb({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:Object(zx.d)(t)},{event:t})},t.prototype.setupOnce=function(){var t=this;this._options.console&&wit({callback:function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];t._consoleBreadcrumb.apply(t,jx(e))},type:"console"}),this._options.dom&&wit({callback:function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];t._domBreadcrumb.apply(t,jx(e))},type:"dom"}),this._options.xhr&&wit({callback:function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];t._xhrBreadcrumb.apply(t,jx(e))},type:"xhr"}),this._options.fetch&&wit({callback:function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];t._fetchBreadcrumb.apply(t,jx(e))},type:"fetch"}),this._options.history&&wit({callback:function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];t._historyBreadcrumb.apply(t,jx(e))},type:"history"})},t.prototype._consoleBreadcrumb=function(t){var e={category:"console",data:{arguments:t.args,logger:"console"},level:Fit.fromString(t.level),message:Object(sC.b)(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;e.message="Assertion failed: "+(Object(sC.b)(t.args.slice(1)," ")||"console.assert"),e.data.arguments=t.args.slice(1)}bC().addBreadcrumb(e,{input:t.args,level:t.level})},t.prototype._domBreadcrumb=function(t){var e;try{e=eC(t.event.target?t.event.target:t.event)}catch($nt){e="<unknown>"}0!==e.length&&bC().addBreadcrumb({category:"ui."+t.name,message:e},{event:t.event,name:t.name,global:t.global})},t.prototype._xhrBreadcrumb=function(t){if(t.endTimestamp){if(t.xhr.__sentry_own_request__)return;var e=t.xhr.__sentry_xhr__||{},i=e.method,n=e.url,r=e.status_code,s=e.body;bC().addBreadcrumb({category:"xhr",data:{method:i,url:n,status_code:r},type:"http"},{xhr:t.xhr,input:s})}},t.prototype._fetchBreadcrumb=function(t){t.endTimestamp&&(t.fetchData.url.match(/sentry_key/)&&"POST"===t.fetchData.method||(t.error?bC().addBreadcrumb({category:"fetch",data:t.fetchData,level:Fit.Error,type:"http"},{data:t.error,input:t.args}):bC().addBreadcrumb({category:"fetch",data:Ux(Ux({},t.fetchData),{status_code:t.response.status}),type:"http"},{input:t.args,response:t.response})))},t.prototype._historyBreadcrumb=function(t){var e=Object(zx.e)(),i=t.from,n=t.to,r=Object(zx.h)(e.location.href),s=Object(zx.h)(i),o=Object(zx.h)(n);s.path||(s=r),r.protocol===o.protocol&&r.host===o.host&&(n=o.relative),r.protocol===s.protocol&&r.host===s.host&&(i=s.relative),bC().addBreadcrumb({category:"navigation",data:{from:i,to:n}})},t.id="Breadcrumbs",t}(),fnt=function(t){function e(e){return void 0===e&&(e={}),e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:"6.2.2"}],version:"6.2.2"},t.call(this,lnt,e)||this}return Fx(e,t),e.prototype.showReportDialog=function(t){void 0===t&&(t={}),Object(zx.e)().document&&(this._isEnabled()?function(t){if(void 0===t&&(t={}),t.eventId)if(t.dsn){var e=document.createElement("script");e.async=!0,e.src=new nnt(t.dsn).getReportDialogEndpoint(t),t.onLoad&&(e.onload=t.onLoad),(document.head||document.body).appendChild(e)}else Zx.error("Missing dsn option in showReportDialog call");else Zx.error("Missing eventId option in showReportDialog call")}(Ux(Ux({},t),{dsn:t.dsn||this.getDsn()})):Zx.error("Trying to call showReportDialog with Sentry Client disabled"))},e.prototype._prepareEvent=function(e,i,n){return e.platform=e.platform||"javascript",t.prototype._prepareEvent.call(this,e,i,n)},e.prototype._sendEvent=function(e){var i=this.getIntegration(pnt);i&&i.addSentryBreadcrumb(e),t.prototype._sendEvent.call(this,e)},e}(Vit),mnt=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],gnt=function(){function t(e){this.name=t.id,this._options=Ux({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},e)}return t.prototype.setupOnce=function(){var t=Object(zx.e)();this._options.setTimeout&&oC(t,"setTimeout",this._wrapTimeFunction.bind(this)),this._options.setInterval&&oC(t,"setInterval",this._wrapTimeFunction.bind(this)),this._options.requestAnimationFrame&&oC(t,"requestAnimationFrame",this._wrapRAF.bind(this)),this._options.XMLHttpRequest&&"XMLHttpRequest"in t&&oC(XMLHttpRequest.prototype,"send",this._wrapXHR.bind(this)),this._options.eventTarget&&(Array.isArray(this._options.eventTarget)?this._options.eventTarget:mnt).forEach(this._wrapEventTarget.bind(this))},t.prototype._wrapTimeFunction=function(t){return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var n=e[0];return e[0]=dnt(n,{mechanism:{data:{function:rC(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}},t.prototype._wrapRAF=function(t){return function(e){return t.call(this,dnt(e,{mechanism:{data:{function:"requestAnimationFrame",handler:rC(t)},handled:!0,type:"instrument"}}))}},t.prototype._wrapEventTarget=function(t){var e=Object(zx.e)(),i=e[t]&&e[t].prototype;i&&i.hasOwnProperty&&i.hasOwnProperty("addEventListener")&&(oC(i,"addEventListener",function(e){return function(i,n,r){try{"function"==typeof n.handleEvent&&(n.handleEvent=dnt(n.handleEvent.bind(n),{mechanism:{data:{function:"handleEvent",handler:rC(n),target:t},handled:!0,type:"instrument"}}))}catch(s){}return e.call(this,i,dnt(n,{mechanism:{data:{function:"addEventListener",handler:rC(n),target:t},handled:!0,type:"instrument"}}),r)}}),oC(i,"removeEventListener",function(t){return function(e,i,n){var r,s=i;try{var o=null===(r=s)||void 0===r?void 0:r.__sentry_wrapped__;o&&t.call(this,e,o,n)}catch($nt){}return t.call(this,e,s,n)}}))},t.prototype._wrapXHR=function(t){return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var n=this,r=["onload","onerror","onprogress","onreadystatechange"];return r.forEach(function(t){t in n&&"function"==typeof n[t]&&oC(n,t,function(e){var i={mechanism:{data:{function:t,handler:rC(e)},handled:!0,type:"instrument"}};return e.__sentry_original__&&(i.mechanism.data.handler=rC(e.__sentry_original__)),dnt(e,i)})}),t.apply(this,e)}},t.id="TryCatch",t}(),Ant=function(){function t(e){this.name=t.id,this._onErrorHandlerInstalled=!1,this._onUnhandledRejectionHandlerInstalled=!1,this._options=Ux({onerror:!0,onunhandledrejection:!0},e)}return t.prototype.setupOnce=function(){Error.stackTraceLimit=50,this._options.onerror&&(Zx.log("Global Handler attached: onerror"),this._installGlobalOnErrorHandler()),this._options.onunhandledrejection&&(Zx.log("Global Handler attached: onunhandledrejection"),this._installGlobalOnUnhandledRejectionHandler())},t.prototype._installGlobalOnErrorHandler=function(){var e=this;this._onErrorHandlerInstalled||(wit({callback:function(i){var n=i.error,r=bC(),s=r.getIntegration(t),o=n&&!0===n.__sentry_own_request__;if(s&&!hnt()&&!o){var a=r.getClient(),l=Object(Yx.i)(n)?e._eventFromIncompleteOnError(i.msg,i.url,i.line,i.column):e._enhanceEventWithInitialFrame(Qit(n,void 0,{attachStacktrace:a&&a.getOptions().attachStacktrace,rejection:!1}),i.url,i.line,i.column);Object(zx.a)(l,{handled:!1,type:"onerror"}),r.captureEvent(l,{originalException:n})}},type:"error"}),this._onErrorHandlerInstalled=!0)},t.prototype._installGlobalOnUnhandledRejectionHandler=function(){var e=this;this._onUnhandledRejectionHandlerInstalled||(wit({callback:function(i){var n=i;try{"reason"in i?n=i.reason:"detail"in i&&"reason"in i.detail&&(n=i.detail.reason)}catch(c){}var r=bC(),s=r.getIntegration(t),o=n&&!0===n.__sentry_own_request__;if(!s||hnt()||o)return!0;var a=r.getClient(),l=Object(Yx.i)(n)?e._eventFromRejectionWithPrimitive(n):Qit(n,void 0,{attachStacktrace:a&&a.getOptions().attachStacktrace,rejection:!0});l.level=Fit.Error,Object(zx.a)(l,{handled:!1,type:"onunhandledrejection"}),r.captureEvent(l,{originalException:n})},type:"unhandledrejection"}),this._onUnhandledRejectionHandlerInstalled=!0)},t.prototype._eventFromIncompleteOnError=function(t,e,i,n){var r,s=Object(Yx.e)(t)?t.message:t;if(Object(Yx.k)(s)){var o=s.match(/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i);o&&(r=o[1],s=o[2])}return this._enhanceEventWithInitialFrame({exception:{values:[{type:r||"Error",value:s}]}},e,i,n)},t.prototype._eventFromRejectionWithPrimitive=function(t){return{exception:{values:[{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(t)}]}}},t.prototype._enhanceEventWithInitialFrame=function(t,e,i,n){t.exception=t.exception||{},t.exception.values=t.exception.values||[],t.exception.values[0]=t.exception.values[0]||{},t.exception.values[0].stacktrace=t.exception.values[0].stacktrace||{},t.exception.values[0].stacktrace.frames=t.exception.values[0].stacktrace.frames||[];var r=isNaN(parseInt(n,10))?void 0:n,s=isNaN(parseInt(i,10))?void 0:i,o=Object(Yx.k)(e)&&e.length>0?e:Object(zx.f)();return 0===t.exception.values[0].stacktrace.frames.length&&t.exception.values[0].stacktrace.frames.push({colno:r,filename:o,function:"?",in_app:!0,lineno:s}),t},t.id="GlobalHandlers",t}(),bnt=function(){function t(e){void 0===e&&(e={}),this.name=t.id,this._key=e.key||"cause",this._limit=e.limit||5}return t.prototype.setupOnce=function(){tC(function(e,i){var n=bC().getIntegration(t);return n?n._handler(e,i):e})},t.prototype._handler=function(t,e){if(!(t.exception&&t.exception.values&&e&&Object(Yx.g)(e.originalException,Error)))return t;var i=this._walkErrorTree(e.originalException,this._key);return t.exception.values=jx(i,t.exception.values),t},t.prototype._walkErrorTree=function(t,e,i){if(void 0===i&&(i=[]),!Object(Yx.g)(t[e],Error)||i.length+1>=this._limit)return i;var n=Zit($it(t[e]));return this._walkErrorTree(t[e],e,jx([n],i))},t.id="LinkedErrors",t}(),vnt=Object(zx.e)(),_nt=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(){tC(function(e){var i,n,r;if(bC().getIntegration(t)){if(!vnt.navigator&&!vnt.location&&!vnt.document)return e;var s=(null===(i=e.request)||void 0===i?void 0:i.url)||(null===(n=vnt.location)||void 0===n?void 0:n.href),o=(vnt.document||{}).referrer,a=(vnt.navigator||{}).userAgent,l=Ux(Ux(Ux({},null===(r=e.request)||void 0===r?void 0:r.headers),o&&{Referer:o}),a&&{"User-Agent":a}),c=Ux(Ux({},s&&{url:s}),{headers:l});return Ux(Ux({},e),{request:c})}return e})},t.id="UserAgent",t}(),ynt=[new n.InboundFilters,new n.FunctionToString,new gnt,new pnt,new Ant,new bnt,new _nt];fD.a.sentryURL&&function(t){if(void 0===t&&(t={}),void 0===t.defaultIntegrations&&(t.defaultIntegrations=ynt),void 0===t.release){var e=Object(zx.e)();e.SENTRY_RELEASE&&e.SENTRY_RELEASE.id&&(t.release=e.SENTRY_RELEASE.id)}void 0===t.autoSessionTracking&&(t.autoSessionTracking=!0),function(t,e){!0===e.debug&&Zx.enable();var i=bC(),n=new t(e);i.bindClient(n)}(fnt,t),t.autoSessionTracking&&function(){if(void 0!==Object(zx.e)().document){var t=bC();"startSession"in t&&(t.startSession(),t.captureSession(),wit({callback:function(){t.startSession(),t.captureSession()},type:"history"}))}else Zx.warn("Session tracking in non-browser environment with @sentry/browser is not supported.")}()}({dsn:fD.a.sentryURL});let wnt=(()=>{class t{constructor(t,e,i){this.router=t,this.ngZone=e,this.uiService=i,this.pendingErrors=[],this.unauthorizedError$=new _e.a,this.ngZone.runOutsideAngular(()=>{setInterval(()=>{var t,e;if(this.pendingErrors.length>0){const i=this.pendingErrors.shift();let n="";n="HttpErrorResponse"!==i.name||(null===(e=null===(t=i.headers)||void 0===t?void 0:t.get("x-server"))||void 0===e?void 0:e.startsWith("ANAIS-"))?i.rejection?i.rejection.message:i.message:"Le serveur n'a pas bien r\xe9pondu. Votre acc\xe8s \xe0 internet est-il bloqu\xe9 par un proxy ?",console.error(i),this.uiService.error(n);let r=i.originalError||i;"HttpErrorResponse"===r.name&&(r=Object.assign(new Error,i)),xC(r)}},2e3)})}handleError(t){var e,i;t&&(t.name===kC.Maintenance||(null===(e=t.message)||void 0===e?void 0:e.includes(kC.Maintenance))?this.ngZone.run(()=>{this.router.navigateByUrl("/maintenance").catch(()=>{})}):(t.name!==kC.Unauthorized&&(null===(i=t.rejection)||void 0===i?void 0:i.name)!==kC.Unauthorized||this.ngZone.run(()=>{this.unauthorizedError$.next(null)}),this.pendingErrors.push(t)))}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(sw),r.Zb(r.B),r.Zb(VI))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})(),xnt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Ji,Sa],Sa]}),t})(),Cnt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[zr,Sa,ve],Sa]}),t})(),Snt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Sa],Sa]}),t})(),knt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Za,Sa],Za,Sa]}),t})(),Ent=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[Et,Sa],Sa]}),t})(),Dnt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[[qn]]}),t})(),Int=(()=>{class t{constructor(){this.changes=new _e.a,this.optionalLabel="Optional"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(r.Lb)({factory:function(){return new t},token:t,providedIn:"root"}),t})();const Pnt={provide:Int,deps:[[new r.C,new r.M,Int]],useFactory:function(t){return t||new Int}};let Ont=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({providers:[Pnt,$a],imports:[[Sa,Et,ve,Pl,Dnt,Qp,nl],Sa]}),t})(),Mnt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t}),t.\u0275inj=r.Mb({imports:[aN,KN,xnt,Cnt,Pl,Xtt,Snt,iF,wL,Zd,Jl,WT,Ott,yu,knt,Qp,Mu,kU,aU,Ka,wA,Ent,mF,uR,nl,Lg,U$,zL,KK,MI,MR,Ont,BV,cH,$T,lA]}),t})(),Tnt=(()=>{class t{constructor(t,e,i,n,r,s,o,a,l,c,h,u,d,p,f,m,g,A,b,v,_,y,w,x,C,S,k,E,D,I,P,O,M,T,R,V,F,L,U,B,N,j,z,H){this.aircraftsService=t,this.alertRulesService=e,this.alertsService=i,this.annotationService=n,this.appVersionService=r,this.assetsService=s,this.authenticationService=o,this.configService=a,this.drawingService=l,this.editZoneService=c,this.errorHandler=h,this.eventsService=u,this.filterConfigurationsService=d,this.fleetsService=p,this.historyService=f,this.geolocationLayerService=m,this.initializationService=g,this.interactionsService=A,this.mapConfigService=b,this.mapRestrictionService=v,this.mapStateService=_,this.mapService=y,this.measureService=w,this.selectionService=x,this.permanentTooltipsService=C,this.playbackService=S,this.portsService=k,this.refreshTimerService=E,this.routeService=D,this.selectedShipsService=I,this.shipsService=P,this.timeRangeService=O,this.screenshotService=M,this.movesService=T,this.tooltipsService=R,this.uiService=V,this.visibilityService=F,this.workerService=L,this.zonesService=U,this.alertsLayerService=B,this.eventsLayerService=N,this.trailsLayerService=j,this.h3TracesLayerService=z,this.zonesLayerService=H}init(){fD.a.production||(window.app=this)}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(fX),r.Zb(DP),r.Zb(IP),r.Zb(MP),r.Zb(c8),r.Zb(iX),r.Zb(yI),r.Zb(cI),r.Zb(TP),r.Zb(sL),r.Zb(r.n),r.Zb(IT),r.Zb(PT),r.Zb(OT),r.Zb(bI),r.Zb(n$),r.Zb(RT),r.Zb(ET),r.Zb(hI),r.Zb(RK),r.Zb(gT),r.Zb(pI),r.Zb(WP),r.Zb(xT),r.Zb(a3),r.Zb(tM),r.Zb(TT),r.Zb(_T),r.Zb(vI),r.Zb(uX),r.Zb(wT),r.Zb(yT),r.Zb(z4),r.Zb(mT),r.Zb(kT),r.Zb(VI),r.Zb(vT),r.Zb(_I.a),r.Zb(kP),r.Zb(AX),r.Zb($P),r.Zb(KQ),r.Zb(GP),r.Zb(DT))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Rnt=(()=>{class t{constructor(t,e,i,n,r,s,o){this.historyService=t,this.mapService=e,this.mapConfigService=i,this.mapStateService=n,this.refreshTimerService=r,this.visibilityService=s,this.workerService=o}init(){Hg([this.mapStateService.showAircraftsLayer$,this.mapConfigService.manualMapFetch$]).pipe(Object(Ge.a)(([t,e])=>t&&!e),mn()).subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.aircraftsFeed.enable(t)})),Hg([this.mapStateService.showShipsLayer$,this.mapConfigService.manualMapFetch$]).pipe(Object(Ge.a)(([t,e])=>t&&!e),mn()).subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.shipsFeed.enable(t)})),this.mapConfigService.shipRefreshInterval$.subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.view.setRefreshInterval(t)})),this.mapConfigService.restrictedAreas$.subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.view.setRestrictedAreas(t)})),this.mapConfigService.longitudeCenter$.subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.viewport.setLongitudeCenter(t)})),Hg([this.refreshTimerService.pause$,this.visibilityService.userAFK$]).pipe(Object(Ge.a)(([t,e])=>t||e),mn()).subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){yield this.workerService.view.pauseRefresh(t)})),this.historyService.timestamp$.subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){this.mapConfigService.manualMapFetch$.value||(yield this.workerService.view.setHistoryTimestamp(t))})),this.mapService.view$.pipe(Gg(1),He(()=>!this.mapConfigService.manualMapFetch$.value)).subscribe(t=>Object(ue.a)(this,void 0,void 0,function*(){const e=qD.fromOLExtent(t.extent).toLatLonExtent();yield this.workerService.view.viewExtent(e)}))}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(bI),r.Zb(pI),r.Zb(hI),r.Zb(gT),r.Zb(_T),r.Zb(vT),r.Zb(_I.a))},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Vnt=(()=>{class t extends kx{tick(){return AT(2e4)}}return t.\u0275fac=function(e){return Fnt(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();const Fnt=r.Xb(Vnt);let Lnt=(()=>{class t extends ja{parse(t){return W5(t,"dd/MM/yyyy",new Date)}}return t.\u0275fac=function(e){return Unt(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();const Unt=r.Xb(Lnt);let Bnt=(()=>{class t{constructor(){this.changes=new _e.a,this.itemsPerPageLabel="\xc9l\xe9ments par page:",this.nextPageLabel="Page suivante",this.previousPageLabel="Page pr\xe9c\xe9dente",this.firstPageLabel="Premi\xe8re page",this.lastPageLabel="Derni\xe8re page",this.getRangeLabel=(t,e,i)=>{if(0===i||0===e)return`0 sur ${i}`;const n=t*e;return`${n+1} \u2013 ${n<(i=Math.max(i,0))?Math.min(n+e,i):n+e} sur ${i}`}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Nnt=(()=>{class t extends Px{format(t){return`il y a ${UO(Math.round(Math.abs(Date.now()-t)/1e3))}`}}return t.\u0275fac=function(e){return jnt(e||t)},t.\u0275prov=r.Lb({token:t,factory:t.\u0275fac}),t})();const jnt=r.Xb(Nnt);let znt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.Nb({type:t,bootstrap:[lit]}),t.\u0275inj=r.Mb({providers:[{provide:r.n,useClass:wnt},{provide:r.d,useFactory:(t,e)=>()=>Object(ue.a)(void 0,void 0,void 0,function*(){yield Promise.all(["anchor","danger","filter","fleets","hexagon","layers","tooltips","tooltips-mini","trail-detailed","trail-simple","zones"].map(i=>Object(ue.a)(void 0,void 0,void 0,function*(){t.addSvgIcon(i,e.bypassSecurityTrustResourceUrl(`../assets/images/${i}.svg`)),yield t.getNamedSvgIcon(i).toPromise()})))}),deps:[jp,ne],multi:!0},{provide:r.d,useFactory:(t,e,i,n,r,s,o)=>()=>Object(ue.a)(void 0,void 0,void 0,function*(){yield Promise.all([e.init(),Object(ue.a)(void 0,void 0,void 0,function*(){yield s.init(),o.init(),r.init()})]),yield i.init(),fD.a.production||n.init(),t.initialized$.next(!0)}),deps:[MT,iX,yI,Tnt,H4,_I.a,Rnt],multi:!0},{provide:Ta,useClass:Lnt},{provide:mm,useClass:Lnt},{provide:Ma,useValue:"fr"},{provide:mA,useClass:Bnt}],imports:[[Eb,xx.forRoot(),le,Rx.forRoot({clock:{provide:kx,useClass:Vnt},formatter:{provide:Px,useClass:Nnt}}),Jet,Et,Vh,Fh,Vp,Mnt,gv,mg,Ka,ma,cm,_m]]}),t})();fD.a.production&&Object(r.V)();let Hnt=!0;if(location.hash){const t="#import-settings=";if(location.hash.startsWith(t)){const e=location.hash.slice(t.length);console.log("Extract imported settings from hash:",e),history.pushState("",document.title,location.pathname+location.search);try{Object.entries(JSON.parse(jD(e))).forEach(([t,e])=>{localStorage.setItem(t,jD(e))})}catch($nt){document.body.innerHTML=`L'import de la configuration a \xe9chou\xe9 (raison : ${$nt.message}). Veuillez contacter un administrateur de la plateforme pour vous assister.<br><br>\n Donn\xe9es d'import : ${e}`,Hnt=!1}}}var Knt;Hnt&&(null!==(Knt=ZH.getParser(window.navigator.userAgent).satisfies({chrome:">=56",chromium:">=56",firefox:">=52"}))&&void 0!==Knt&&Knt||localStorage.getItem("bypass_browser")?oe().bootstrapModule(znt).catch(t=>console.log(t)):(document.querySelector(".loader").remove(),document.querySelector(".wrongbrowser").style.display="block"))},zn8P:function(t,e){function i(t){return Promise.resolve().then(function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e})}i.keys=function(){return[]},i.resolve=i,t.exports=i,i.id="zn8P"},zx2A:function(t,e,i){"use strict";i.d(e,"a",function(){return o}),i.d(e,"b",function(){return a}),i.d(e,"c",function(){return l});var n=i("7o/Q"),r=i("HDdC"),s=i("SeVD");class o extends n.a{constructor(t){super(),this.parent=t}_next(t){this.parent.notifyNext(t)}_error(t){this.parent.notifyError(t),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class a extends n.a{notifyNext(t){this.destination.next(t)}notifyError(t){this.destination.error(t)}notifyComplete(){this.destination.complete()}}function l(t,e){if(!e.closed)return t instanceof r.a?t.subscribe(e):Object(s.a)(t)(e)}}}

Reference

http://blogs.wsj.com/cio/2013/10/08/adobe-source-code-leak-is-bad-news-for-u-s-government/

CWE Id540
WASC Id13
Source ID3
Low (Low)Dangerous JS Functions
Description

A dangerous JS function seems to be in use that would leave the site vulnerable.

URLhttps://anais.beta.gouv.fr/main-es2015.153c6affb3ef3c75b08306b254d0a4f6fd8be68e.js
MethodGET
EvidencebypassSecurityTrustHtml
Instances1
Solution

See the references for security advice on the use of these functions.

Reference

https://angular.io/guide/security

CWE Id749
Source ID3
Low (Medium)Incomplete or No Cache-control Header Set
Description

The cache-control header has not been set properly or is missing, allowing the browser and proxies to cache content.

URLhttps://anais.beta.gouv.fr/
MethodGET
ParameterCache-Control
Evidenceno-store
URLhttps://anais.beta.gouv.fr/robots.txt
MethodGET
ParameterCache-Control
Evidenceno-store
URLhttps://anais.beta.gouv.fr
MethodGET
ParameterCache-Control
Evidenceno-store
URLhttps://anais.beta.gouv.fr/sitemap.xml
MethodGET
ParameterCache-Control
Evidenceno-store
Instances4
Solution

Whenever possible ensure the cache-control HTTP header is set with no-cache, no-store, must-revalidate.

Reference

https://cheatsheetseries.owasp.org/cheatsheets/Session_Management_Cheat_Sheet.html#web-content-caching

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control

CWE Id525
WASC Id13
Source ID3
Low (Medium)Permissions Policy Header Not Set
Description

Permissions Policy Header is an added layer of security that helps to restrict from unauthorized access or usage of browser/client features by web resources. This policy ensures the user privacy by limiting or specifying the features of the browsers can be used by the web resources. Permissions Policy provides a set of standard HTTP headers that allow website owners to limit which features of browsers can be used by the page such as camera, microphone, location, full screen etc.

URLhttps://anais.beta.gouv.fr/polyfills-es5.0e6a0b9c0a11bcded2d1.js
MethodGET
URLhttps://anais.beta.gouv.fr/sitemap.xml
MethodGET
URLhttps://anais.beta.gouv.fr/runtime-es2015.a4dadbc03350107420a4.js
MethodGET
URLhttps://anais.beta.gouv.fr/runtime-es5.a4dadbc03350107420a4.js
MethodGET
URLhttps://anais.beta.gouv.fr/
MethodGET
URLhttps://anais.beta.gouv.fr
MethodGET
URLhttps://anais.beta.gouv.fr/polyfills-es2015.9c6b185d9749aeb5fdb2.js
MethodGET
URLhttps://anais.beta.gouv.fr/main-es2015.153c6affb3ef3c75b08306b254d0a4f6fd8be68e.js
MethodGET
URLhttps://anais.beta.gouv.fr/robots.txt
MethodGET
Instances9
Solution

Ensure that your web server, application server, load balancer, etc. is configured to set the Permissions-Policy header.

Reference

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Feature-Policy

https://developers.google.com/web/updates/2018/06/feature-policy

https://scotthelme.co.uk/a-new-security-header-feature-policy/

https://w3c.github.io/webappsec-feature-policy/

https://www.smashingmagazine.com/2018/12/feature-policy/

CWE Id693
WASC Id15
Source ID3
Low (High)Server Leaks Version Information via "Server" HTTP Response Header Field
Description

The web/application server is leaking version information via the "Server" HTTP response header. Access to such information may facilitate attackers identifying other vulnerabilities your web/application server is subject to.

URLhttps://anais.beta.gouv.fr/runtime-es2015.a4dadbc03350107420a4.js
MethodGET
Evidencenginx/1.18.0
URLhttps://anais.beta.gouv.fr/sitemap.xml
MethodGET
Evidencenginx/1.18.0
URLhttps://anais.beta.gouv.fr
MethodGET
Evidencenginx/1.18.0
URLhttps://anais.beta.gouv.fr/polyfills-es5.0e6a0b9c0a11bcded2d1.js
MethodGET
Evidencenginx/1.18.0
URLhttps://anais.beta.gouv.fr/runtime-es5.a4dadbc03350107420a4.js
MethodGET
Evidencenginx/1.18.0
URLhttps://anais.beta.gouv.fr/assets/images/favicon_anais.png
MethodGET
Evidencenginx/1.18.0
URLhttps://anais.beta.gouv.fr/
MethodGET
Evidencenginx/1.18.0
URLhttps://anais.beta.gouv.fr/styles.2251a8b7f7c063556b97.css
MethodGET
Evidencenginx/1.18.0
URLhttps://anais.beta.gouv.fr/robots.txt
MethodGET
Evidencenginx/1.18.0
URLhttps://anais.beta.gouv.fr/polyfills-es2015.9c6b185d9749aeb5fdb2.js
MethodGET
Evidencenginx/1.18.0
URLhttps://anais.beta.gouv.fr/main-es2015.153c6affb3ef3c75b08306b254d0a4f6fd8be68e.js
MethodGET
Evidencenginx/1.18.0
Instances11
Solution

Ensure that your web server, application server, load balancer, etc. is configured to suppress the "Server" header or provide generic details.

Reference

http://httpd.apache.org/docs/current/mod/core.html#servertokens

http://msdn.microsoft.com/en-us/library/ff648552.aspx#ht_urlscan_007

http://blogs.msdn.com/b/varunm/archive/2013/04/23/remove-unwanted-http-response-headers.aspx

http://www.troyhunt.com/2012/02/shhh-dont-let-your-response-headers.html

CWE Id200
WASC Id13
Source ID3
Informational (Medium)Base64 Disclosure
Description

Base64 encoded data was disclosed by the application/web server. Note: in the interests of performance not all base64 strings in the response were analyzed individually, the entire response should be looked at by the analyst/security team/developer(s).

URLhttps://anais.beta.gouv.fr/main-es2015.153c6affb3ef3c75b08306b254d0a4f6fd8be68e.js
MethodGET
EvidenceiVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwkUFWbCCAAAAFxJREFUaN7t0kEKg0AQAME2x83/n2qu5qCgD1iDhCoYdpnbQC9bbY1qVO/jvc6k3ad91s7/7F1/csgPrujuQ17BDYSFsBAWwgJhISyEBcJCWAgLhIWwEBYIi2f7Ar/1TCgFH2X9AAAAAElFTkSuQmCC
Instances1
Solution

Manually confirm that the Base64 data does not leak sensitive information, and that the data cannot be aggregated/used to exploit other vulnerabilities.

Other information

�PNG

\x001a

\x0000\x0000\x0000 IHDR\x0000\x0000\x0000�\x0000\x0000\x0000\x0010\x0008\x0006\x0000\x0000\x0000��'\x0000\x0000\x0000\x0006bKGD\x0000�\x0000�\x0000�����\x0000\x0000\x0000 pHYs\x0000\x0000\x000b\x0013\x0000\x0000\x000b\x0013\x0001\x0000��\x0018\x0000\x0000\x0000\x0007tIME\x0007�\x0002\x0016\x000f \x0014\x0015f�\x0008\x0000\x0000\x0000\IDATh���A

�@\x0010\x0000�6����j�栠\x000fX��*\x0018v��@/[m�jT��Τݧ}����]r�\x000f���C^� ���\x0010\x0016�\x0002a!,�\x0005�BX\x0008\x000b���\x0010\x0016\x0008�g�\x0002��L(\x0005\x001fe�\x0000\x0000\x0000\x0000IEND�B`�

Reference

http://projects.webappsec.org/w/page/13246936/Information%20Leakage

CWE Id200
WASC Id13
Source ID3
Informational (Low)Information Disclosure - Suspicious Comments
Description

The response appears to contain suspicious comments which may help an attacker. Note: Matches made within script blocks or files are against the entire content not only comments.

URLhttps://anais.beta.gouv.fr/polyfills-es5.0e6a0b9c0a11bcded2d1.js
MethodGET
EvidenceSelect
URLhttps://anais.beta.gouv.fr/main-es2015.153c6affb3ef3c75b08306b254d0a4f6fd8be68e.js
MethodGET
Evidencebug
URLhttps://anais.beta.gouv.fr/main-es5.ba9759eec904f42a7da42e599be45e26bdfcae69.js
MethodGET
Evidencebug
URLhttps://anais.beta.gouv.fr/polyfills-es2015.9c6b185d9749aeb5fdb2.js
MethodGET
Evidenceselect
Instances4
Solution

Remove all comments that return information that may help an attacker and fix any underlying problems they refer to.

Other information

The following pattern was used: \bSELECT\b and was detected in the element starting with: "!function(){function t(t,n){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,n)", see evidence field for the suspicious comment/snippet.

Reference

CWE Id200
WASC Id13
Source ID3
Informational (Medium)Modern Web Application
Description

The application appears to be a modern web application. If you need to explore it automatically then the Ajax Spider may well be more effective than the standard one.

URLhttps://anais.beta.gouv.fr/
MethodGET
Evidence<noscript> Veuillez activer le JavaScript pour utiliser cette application. </noscript>
URLhttps://anais.beta.gouv.fr/robots.txt
MethodGET
Evidence<noscript> Veuillez activer le JavaScript pour utiliser cette application. </noscript>
URLhttps://anais.beta.gouv.fr
MethodGET
Evidence<noscript> Veuillez activer le JavaScript pour utiliser cette application. </noscript>
URLhttps://anais.beta.gouv.fr/polyfills-es5.0e6a0b9c0a11bcded2d1.js
MethodGET
Evidence<script>
URLhttps://anais.beta.gouv.fr/sitemap.xml
MethodGET
Evidence<noscript> Veuillez activer le JavaScript pour utiliser cette application. </noscript>
URLhttps://anais.beta.gouv.fr/polyfills-es2015.9c6b185d9749aeb5fdb2.js
MethodGET
Evidence<script>
Instances6
Solution

This is an informational alert and so no changes are required.

Other information

A noScript tag has been found, which is an indication that the application works differently with JavaScript enabled compared to when it is not.

Reference

Source ID3
Informational (Medium)Non-Storable Content
Description

The response contents are not storable by caching components such as proxy servers. If the response does not contain sensitive, personal or user-specific information, it may benefit from being stored and cached, to improve performance.

URLhttps://anais.beta.gouv.fr/
MethodGET
Evidenceno-store
URLhttps://anais.beta.gouv.fr/robots.txt
MethodGET
Evidenceno-store
URLhttps://anais.beta.gouv.fr
MethodGET
Evidenceno-store
URLhttps://anais.beta.gouv.fr/sitemap.xml
MethodGET
Evidenceno-store
Instances4
Solution

The content may be marked as storable by ensuring that the following conditions are satisfied:

The request method must be understood by the cache and defined as being cacheable ("GET", "HEAD", and "POST" are currently defined as cacheable)

The response status code must be understood by the cache (one of the 1XX, 2XX, 3XX, 4XX, or 5XX response classes are generally understood)

The "no-store" cache directive must not appear in the request or response header fields

For caching by "shared" caches such as "proxy" caches, the "private" response directive must not appear in the response

For caching by "shared" caches such as "proxy" caches, the "Authorization" header field must not appear in the request, unless the response explicitly allows it (using one of the "must-revalidate", "public", or "s-maxage" Cache-Control response directives)

In addition to the conditions above, at least one of the following conditions must also be satisfied by the response:

It must contain an "Expires" header field

It must contain a "max-age" response directive

For "shared" caches such as "proxy" caches, it must contain a "s-maxage" response directive

It must contain a "Cache Control Extension" that allows it to be cached

It must have a status code that is defined as cacheable by default (200, 203, 204, 206, 300, 301, 404, 405, 410, 414, 501).

Reference

https://tools.ietf.org/html/rfc7234

https://tools.ietf.org/html/rfc7231

http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html (obsoleted by rfc7234)

CWE Id524
WASC Id13
Source ID3
Informational (Medium)Storable and Cacheable Content
Description

The response contents are storable by caching components such as proxy servers, and may be retrieved directly from the cache, rather than from the origin server by the caching servers, in response to similar requests from other users. If the response data is sensitive, personal or user-specific, this may result in sensitive information being leaked. In some cases, this may even result in a user gaining complete control of the session of another user, depending on the configuration of the caching components in use in their environment. This is primarily an issue where "shared" caching servers such as "proxy" caches are configured on the local network. This configuration is typically found in corporate or educational environments, for instance.

URLhttps://anais.beta.gouv.fr/polyfills-es5.0e6a0b9c0a11bcded2d1.js
MethodGET
Evidencemax-age=2592000
URLhttps://anais.beta.gouv.fr/runtime-es5.a4dadbc03350107420a4.js
MethodGET
Evidencemax-age=2592000
URLhttps://anais.beta.gouv.fr/main-es2015.153c6affb3ef3c75b08306b254d0a4f6fd8be68e.js
MethodGET
Evidencemax-age=2592000
URLhttps://anais.beta.gouv.fr/assets/images/favicon_anais.png
MethodGET
Evidencemax-age=7200
URLhttps://anais.beta.gouv.fr/polyfills-es2015.9c6b185d9749aeb5fdb2.js
MethodGET
Evidencemax-age=2592000
URLhttps://anais.beta.gouv.fr/runtime-es2015.a4dadbc03350107420a4.js
MethodGET
Evidencemax-age=2592000
URLhttps://anais.beta.gouv.fr/styles.2251a8b7f7c063556b97.css
MethodGET
Evidencemax-age=2592000
Instances7
Solution

Validate that the response does not contain sensitive, personal or user-specific information. If it does, consider the use of the following HTTP response headers, to limit, or prevent the content being stored and retrieved from the cache by another user:

Cache-Control: no-cache, no-store, must-revalidate, private

Pragma: no-cache

Expires: 0

This configuration directs both HTTP 1.0 and HTTP 1.1 compliant caching servers to not store the response, and to not retrieve the response (without validation) from the cache, in response to a similar request.

Reference

https://tools.ietf.org/html/rfc7234

https://tools.ietf.org/html/rfc7231

http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html (obsoleted by rfc7234)

CWE Id524
WASC Id13
Source ID3
Informational (Low)Timestamp Disclosure - Unix
Description

A timestamp was disclosed by the application/web server - Unix

URLhttps://anais.beta.gouv.fr/main-es2015.153c6affb3ef3c75b08306b254d0a4f6fd8be68e.js
MethodGET
Evidence268435456
URLhttps://anais.beta.gouv.fr/main-es2015.153c6affb3ef3c75b08306b254d0a4f6fd8be68e.js
MethodGET
Evidence335544320
URLhttps://anais.beta.gouv.fr/polyfills-es5.0e6a0b9c0a11bcded2d1.js
MethodGET
Evidence62425156
URLhttps://anais.beta.gouv.fr/main-es2015.153c6affb3ef3c75b08306b254d0a4f6fd8be68e.js
MethodGET
Evidence285212672
URLhttps://anais.beta.gouv.fr/main-es2015.153c6affb3ef3c75b08306b254d0a4f6fd8be68e.js
MethodGET
Evidence2147483647
URLhttps://anais.beta.gouv.fr/main-es2015.153c6affb3ef3c75b08306b254d0a4f6fd8be68e.js
MethodGET
Evidence100663296
URLhttps://anais.beta.gouv.fr/main-es2015.153c6affb3ef3c75b08306b254d0a4f6fd8be68e.js
MethodGET
Evidence16777216
URLhttps://anais.beta.gouv.fr/main-es2015.153c6affb3ef3c75b08306b254d0a4f6fd8be68e.js
MethodGET
Evidence2130706432
URLhttps://anais.beta.gouv.fr/main-es2015.153c6affb3ef3c75b08306b254d0a4f6fd8be68e.js
MethodGET
Evidence536870912
URLhttps://anais.beta.gouv.fr/polyfills-es5.0e6a0b9c0a11bcded2d1.js
MethodGET
Evidence94906265
URLhttps://anais.beta.gouv.fr/main-es2015.153c6affb3ef3c75b08306b254d0a4f6fd8be68e.js
MethodGET
Evidence2013265920
URLhttps://anais.beta.gouv.fr/main-es2015.153c6affb3ef3c75b08306b254d0a4f6fd8be68e.js
MethodGET
Evidence33554432
URLhttps://anais.beta.gouv.fr/main-es2015.153c6affb3ef3c75b08306b254d0a4f6fd8be68e.js
MethodGET
Evidence318767104
URLhttps://anais.beta.gouv.fr/main-es2015.153c6affb3ef3c75b08306b254d0a4f6fd8be68e.js
MethodGET
Evidence16777215
URLhttps://anais.beta.gouv.fr/main-es2015.153c6affb3ef3c75b08306b254d0a4f6fd8be68e.js
MethodGET
Evidence352321536
URLhttps://anais.beta.gouv.fr/main-es2015.153c6affb3ef3c75b08306b254d0a4f6fd8be68e.js
MethodGET
Evidence2130706433
URLhttps://anais.beta.gouv.fr/main-es2015.153c6affb3ef3c75b08306b254d0a4f6fd8be68e.js
MethodGET
Evidence15728641
URLhttps://anais.beta.gouv.fr/main-es2015.153c6affb3ef3c75b08306b254d0a4f6fd8be68e.js
MethodGET
Evidence1431655768
URLhttps://anais.beta.gouv.fr/main-es2015.153c6affb3ef3c75b08306b254d0a4f6fd8be68e.js
MethodGET
Evidence301989888
URLhttps://anais.beta.gouv.fr/main-es2015.153c6affb3ef3c75b08306b254d0a4f6fd8be68e.js
MethodGET
Evidence134217728
Instances28
Solution

Manually confirm that the timestamp data is not sensitive, and that the data cannot be aggregated to disclose exploitable patterns.

Other information

268435456, which evaluates to: 1978-07-04 21:24:16

Reference

http://projects.webappsec.org/w/page/13246936/Information%20Leakage

CWE Id200
WASC Id13
Source ID3